diff --git a/src/module/powers/elementalManipulation.js b/src/module/powers/elementalManipulation.js index 86d6fac..ee14d2f 100644 --- a/src/module/powers/elementalManipulation.js +++ b/src/module/powers/elementalManipulation.js @@ -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() { diff --git a/src/module/powers/environmentalProtection.js b/src/module/powers/environmentalProtection.js new file mode 100644 index 0000000..fd9ff28 --- /dev/null +++ b/src/module/powers/environmentalProtection.js @@ -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 += `
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 += '
'; + return text; + } +} diff --git a/src/module/powers/powers.js b/src/module/powers/powers.js index 9c49d72..e080a7b 100644 --- a/src/module/powers/powers.js +++ b/src/module/powers/powers.js @@ -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, };