add environmental protection
This commit is contained in:
parent
909457d1dd
commit
b6a42818c8
@ -6,7 +6,7 @@ export class ElementalManipulationEffect extends PowerEffect {
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/earth/projectiles-stone-salvo-gray.webp';
|
||||
return 'icons/magic/symbols/elements-air-earth-fire-water.webp';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
|
||||
80
src/module/powers/environmentalProtection.js
Normal file
80
src/module/powers/environmentalProtection.js
Normal file
@ -0,0 +1,80 @@
|
||||
import { moduleName } from '../globals.js';
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
|
||||
export class EnvironmentalProtectionEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Environmental Protection';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 600 * (this.data?.raise ? 8 : 1);
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/defensive/barrier-shield-dome-pink.webp';
|
||||
}
|
||||
|
||||
get hasAdditionalRecipients() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get additionalRecipientCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
return [
|
||||
...super.modifiers,
|
||||
{
|
||||
name: 'Environmental Resistance',
|
||||
id: 'resist',
|
||||
value: 1,
|
||||
type: 'checkbox',
|
||||
default: false,
|
||||
epic: false,
|
||||
effect: true,
|
||||
icon: 'icons/magic/defensive/barrier-shield-dome-blue-purple.webp',
|
||||
changes: [
|
||||
{
|
||||
key: `flags.${moduleName}.environmentalResistance`,
|
||||
value: true,
|
||||
priority: 0,
|
||||
mode: foundry.CONST.ACTIVE_EFFECT_MODES.OVERRIDE,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Planar Adaptation',
|
||||
id: 'planar',
|
||||
value: 2,
|
||||
type: 'checkbox',
|
||||
default: false,
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
get description() {
|
||||
let text = super.description;
|
||||
text += `<p>Breathe, speak, and move at normal pace in an otherwise fatal
|
||||
environment.
|
||||
`;
|
||||
if (this.data.resist) {
|
||||
text += `Gain resistances to one energy source, reducing damage by
|
||||
${this.data.raise ? 6 : 4}.
|
||||
`;
|
||||
}
|
||||
if (this.data.planar) {
|
||||
text += `This also protects against the extreme conditions that on other
|
||||
planes of existance.
|
||||
`;
|
||||
}
|
||||
text += '</p>';
|
||||
return text;
|
||||
}
|
||||
}
|
||||
@ -24,6 +24,7 @@ import { DrainPowerPointsEffect } from './drainPowerPoints.js';
|
||||
import { ElementalManipulationEffect } from './elementalManipulation.js';
|
||||
import { EmpathyEffect } from './empathy.js';
|
||||
import { EntangleEffect } from './entangle.js';
|
||||
import { EnvironmentalProtectionEffect } from './environmentalProtection.js';
|
||||
|
||||
const PowerClasses = {
|
||||
'arcane-protection': ArcaneProtectionEffect,
|
||||
@ -55,6 +56,7 @@ const PowerClasses = {
|
||||
'elemental-manipulation': ElementalManipulationEffect,
|
||||
empathy: EmpathyEffect,
|
||||
entangle: EntangleEffect,
|
||||
'environmental-protection': EnvironmentalProtectionEffect,
|
||||
'lower-trait': BoostLowerTraitEffect,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user