add darksight
This commit is contained in:
parent
2caa2a4633
commit
57caeccad2
69
src/module/powers/darksight.js
Normal file
69
src/module/powers/darksight.js
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
import { PowerEffect } from './basePowers.js';
|
||||||
|
|
||||||
|
export class DarksightEffect extends PowerEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Darksight';
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/magic/perception/eye-ringed-glow-angry-small-teal.webp';
|
||||||
|
}
|
||||||
|
|
||||||
|
get duration() {
|
||||||
|
return 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
get basePowerPoints() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
get isTargeted() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
get hasAdditionalRecipients() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
get additionalRecipientCost() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
get modifiers() {
|
||||||
|
const mods = super.modifiers;
|
||||||
|
mods.push({
|
||||||
|
name: 'Greater Darksight',
|
||||||
|
type: 'checkbox',
|
||||||
|
value: 2,
|
||||||
|
id: 'greater',
|
||||||
|
epic: true,
|
||||||
|
effect: false,
|
||||||
|
});
|
||||||
|
return mods;
|
||||||
|
}
|
||||||
|
|
||||||
|
get description() {
|
||||||
|
let desc = super.description;
|
||||||
|
desc += '<p>';
|
||||||
|
if (this.data.greater) {
|
||||||
|
desc += `Can see in all darkness, ignoring all illumination penalties and
|
||||||
|
4 points of penalties from invisible creatures`;
|
||||||
|
} else if (this.data.raise) {
|
||||||
|
desc += 'Can see in Pitch Darkness and ignore up to 6 points of illumination penalties';
|
||||||
|
} else {
|
||||||
|
desc += 'Can see in darkness and ignore 4 points of illumination penalties';
|
||||||
|
}
|
||||||
|
desc += '</p>';
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
get effectName() {
|
||||||
|
if (this.data.greater) {
|
||||||
|
return 'Greater Darksight';
|
||||||
|
} else if (this.data.raise) {
|
||||||
|
return 'Major Darksight';
|
||||||
|
} else {
|
||||||
|
return 'Darksignt';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -14,73 +14,7 @@ import { BurstEffect } from './burst.js';
|
|||||||
import { ConfusionEffect } from './confusion.js';
|
import { ConfusionEffect } from './confusion.js';
|
||||||
import { CurseEffect } from './curse.js';
|
import { CurseEffect } from './curse.js';
|
||||||
import { DamageFieldEffect } from './damageField.js';
|
import { DamageFieldEffect } from './damageField.js';
|
||||||
|
import { DarksightEffect } from './darksight.js';
|
||||||
class DarksightEffect extends PowerEffect {
|
|
||||||
get name() {
|
|
||||||
return 'Darksight';
|
|
||||||
}
|
|
||||||
|
|
||||||
get icon() {
|
|
||||||
return 'icons/magic/perception/eye-ringed-glow-angry-small-teal.webp';
|
|
||||||
}
|
|
||||||
|
|
||||||
get duration() {
|
|
||||||
return 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
get basePowerPoints() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
get isTargeted() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
get hasAdditionalRecipients() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
get additionalRecipientCost() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
get modifiers() {
|
|
||||||
const mods = super.modifiers;
|
|
||||||
mods.push({
|
|
||||||
name: 'Greater Darksight',
|
|
||||||
value: 2,
|
|
||||||
id: 'greater',
|
|
||||||
epic: true,
|
|
||||||
effect: false,
|
|
||||||
});
|
|
||||||
return mods;
|
|
||||||
}
|
|
||||||
|
|
||||||
get description() {
|
|
||||||
let desc = super.description;
|
|
||||||
desc += '<p>';
|
|
||||||
if (this.data.mods.has('greater')) {
|
|
||||||
desc += `Can see in all darkness, ignoring all illumination penalties and
|
|
||||||
4 points of penalties from invisible creatures`;
|
|
||||||
} else if (this.data.raise) {
|
|
||||||
desc += 'Can see in Pitch Darkness and ignore up to 6 points of illumination penalties';
|
|
||||||
} else {
|
|
||||||
desc += 'Can see in darkness and ignore 4 points of illumination penalties';
|
|
||||||
}
|
|
||||||
desc += '</p>';
|
|
||||||
return desc;
|
|
||||||
}
|
|
||||||
|
|
||||||
get effectName() {
|
|
||||||
if (this.data.mods.has('greater')) {
|
|
||||||
return 'Greater Darksight';
|
|
||||||
} else if (this.data.raise) {
|
|
||||||
return 'Major Darksight';
|
|
||||||
} else {
|
|
||||||
return 'Darksignt';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class DeflectionEffect extends PowerEffect {
|
class DeflectionEffect extends PowerEffect {
|
||||||
get name() {
|
get name() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user