diff --git a/src/module/powers/basePowers.js b/src/module/powers/basePowers.js index 597e3a5..e998fa8 100644 --- a/src/module/powers/basePowers.js +++ b/src/module/powers/basePowers.js @@ -79,7 +79,7 @@ export class PowerFormApplication extends FormApplication { } if (this.powerEffect.hasAdditionalRecipients && this.powerEffect.targets.length > 1) { data.recipients.cost = this.powerEffect.additionalRecipientCost; - data.recipients.count = this.powerEffect.targets.length - 1; + data.recipients.count = this.powerEffect.additionalRecipientCount; data.recipients.total = data.recipients.cost * data.recipients.count; data.recipients.epic = this.powerEffect.additionalRecipientsIsEpic; } @@ -179,11 +179,11 @@ export class PowerEffect { return true; } - get hasAdditionalRecipients() { + get isDamaging() { return false; } - get isDamaging() { + get hasAdditionalRecipients() { return false; } @@ -191,6 +191,13 @@ export class PowerEffect { return false; } + get additionalRecipientCount() { + if (!this.hasAdditionalRecipients) { + return 0; + } + return Math.max(0, this.targets.length - 1); + } + get additionalRecipientCost() { return 0; } @@ -587,9 +594,7 @@ export class PowerEffect { } } } - if (this.targets.length > 1 && this.hasAdditionalRecipients) { - total += (this.targets.length - 1) * this.additionalRecipientCost; - } + total += this.additionalRecipientCost * this.additionalRecipientCount; return total; } diff --git a/src/module/powers/environmentalProtection.js b/src/module/powers/environmentalProtection.js index fd9ff28..a9f00e5 100644 --- a/src/module/powers/environmentalProtection.js +++ b/src/module/powers/environmentalProtection.js @@ -26,6 +26,10 @@ export class EnvironmentalProtectionEffect extends PowerEffect { return true; } + get basePowerPoints() { + return 2; + } + get modifiers() { return [ ...super.modifiers, diff --git a/src/module/powers/mindLink.js b/src/module/powers/mindLink.js new file mode 100644 index 0000000..6e1e4ef --- /dev/null +++ b/src/module/powers/mindLink.js @@ -0,0 +1,81 @@ +import { PowerEffect } from './basePowers.js'; + +export class MindLinkEffect extends PowerEffect { + get name() { + return 'Mind Link'; + } + + get duration() { + return 50; + } + + get icon() { + return 'icons/skills/social/diplomacy-unity-alliance.webp'; + } + + get hasAdditionalRecipients() { + return true; + } + + get additionalRecipientCost() { + return 1; + } + + get isTargeted() { + return true; + } + + get basePowerPoints() { + return 1; + } + + get modifiers() { + return [ + ...super.modifiers, + { + name: 'Broadcast', + id: 'broadcast', + value: 2, + type: 'checkbox', + default: false, + epic: true, + effect: false, + }, + { + name: 'Long Distance Link', + id: 'longlink', + value: 3, + type: 'checkbox', + default: false, + epic: true, + effect: false, + }, + ]; + } + + get additionalRecipientCount() { + return Math.max(0, this.targets.length - 2); + } + + get description() { + let text = super.description; + if (this.data.broadcast) { + text += `
The caster can broadcast a short message to everyone within + Smarts ✕${this.data.raise ? 8 : 4}.
`; + } else { + text += `Create a telepathic link that functions like speach between + two minds. + `; + if (this.data.longlink) { + text += `The ends of the link may be anywhere on the same plane. `; + } else { + text += `Once activated, Range between linked minds is + ${this.data.raise ? 'five miles' : 'one mile'}. `; + } + text += `
+ If a linked character suffers a Wound, all others in the link must make + a Smarts roll or be Shaken (this can't cause a Wound).
`; + } + return text; + } +} diff --git a/src/module/powers/powers.js b/src/module/powers/powers.js index d64fa82..75bb021 100644 --- a/src/module/powers/powers.js +++ b/src/module/powers/powers.js @@ -36,6 +36,7 @@ import { IntangibilityEffect } from './intangibility.js'; import { InvisibliltyEffect } from './invisibility.js'; import { LightDarknessEffect } from './lightdarkness.js'; import { LocateEffect } from './locate.js'; +import { MindLinkEffect } from './mindLink.js'; const PowerClasses = { 'arcane-protection': ArcaneProtectionEffect, @@ -85,6 +86,7 @@ const PowerClasses = { light: LightDarknessEffect, locate: LocateEffect, 'lower-trait': BoostLowerTraitEffect, + 'mind-link': MindLinkEffect, shrink: GrowthShrinkEffect, };