diff --git a/src/module/powers/banish.js b/src/module/powers/banish.js index d2b6c99..6477899 100644 --- a/src/module/powers/banish.js +++ b/src/module/powers/banish.js @@ -29,58 +29,40 @@ export class BanishEffect extends PowerEffect { return true; } - get menuInputs() { - const inputs = super.menuInputs; - inputs.push({ + get modifiers() { + const mods = super.modifiers; + mods.push({ type: 'select', - label: '⭐ Area of Effect', - options: [ - { html: 'None', value: 0, selected: true }, - { html: 'Small Blast Template (+1)', value: 1, selected: false }, - { html: 'Medium Blast Template (+2)', value: 2, selected: false }, - { html: 'Large Blast Template (+3)', value: 3, selected: false }, - ], + default: 'none', + name: 'Area of Effect', + id: 'aoe', + epic: true, + choices: { + none: 'None', + sbt: 'Small Blast Template', + mbt: 'Medium Blast Template', + lbt: 'Large Blast Template', + }, + effects: { none: null, sbt: null, mbt: null, lbt: null }, + values: { none: 0, sbt: 1, mbt: 2, lbt: 3 }, }); - return inputs; - } - - get powerPoints() { - let total = super.powerPoints; - total += this.data.aoe; - return total; + return mods; } get description() { return ( super.description + - ` -

An opposed roll of the caster's skill vs the target's Spirit. - Success: Shaken, each Raise: 1 Wound - Incapacitation results in banishment to home plane.

- ` + `

An opposed roll of the caster's skill vs the target's Spirit. + Success: Shaken, each Raise: 1 Wound + Incapacitation results in banishment to home plane.

` ); } get chatMessageEffects() { const list = super.chatMessageEffects; - switch (this.data.aoe) { - case 0: - break; - case 1: - list.push('SBT'); - break; - case 2: - list.push('MBT'); - break; - case 3: - list.push('LBT'); - break; + if (this.data.aoe !== 'none') { + list.push(this.data.aoe.toUpperCase()); } return list; } - - async parseValues() { - await super.parseValues(); - this.data.aoe = this.data.values.shift(); - } } diff --git a/src/module/powers/basePowers.js b/src/module/powers/basePowers.js index 06f49c4..3d5a351 100644 --- a/src/module/powers/basePowers.js +++ b/src/module/powers/basePowers.js @@ -12,7 +12,7 @@ export class PowerFormApplication extends FormApplication { static get defaultOptions() { return mergeObject(super.defaultOptions, { - classes: ['sheet', 'mbSwadePowerEffectsForm'], + classes: ['sheet', 'mbSwadeForm', 'mbSwadePowerEffectsForm'], popOut: true, template: templates['powerDialog.html'], id: ['mbSwadePowerEffectsApplication'], @@ -255,7 +255,6 @@ export class PowerEffect { }, }, epic: false, - effect: true, }); if (this.isDamaging) { mods.push({ @@ -297,7 +296,6 @@ export class PowerEffect { default: 'none', value: 1, epic: false, - effect: true, choices: { none: 'None', hinder: 'Hinder', hurry: 'Hurry' }, values: { none: 0, hinder: 1, hurry: 1 }, isGlobal: true, @@ -379,6 +377,7 @@ export class PowerEffect { async applyEffect() { await this.parseValues(); await this.apply(); + await this.chatMessage(); await this.sideEffects(); } @@ -532,7 +531,7 @@ export class PowerEffect { list.push('Different Trapping (Adaptable Caster)'); } if (this.data.fatigue) { - list.push('Fatigue (applied to targets'); + list.push('Fatigue (applied to targets)'); } if (this.data.heavyweapon) { list.push('Heavy Weapon'); diff --git a/src/styles/swade-mb-helpers.scss b/src/styles/swade-mb-helpers.scss index 02afb3d..1f95bd3 100644 --- a/src/styles/swade-mb-helpers.scss +++ b/src/styles/swade-mb-helpers.scss @@ -1,4 +1,5 @@ -/* ---------------------------- */ -/* Sass */ -/* This is your Sass entry file */ -/* ---------------------------- */ +.mbSwadeForm { + label.checkbox { + font-size: var(--font-size-14); + } +} diff --git a/src/templates/powerDialog.html b/src/templates/powerDialog.html index 284015b..85bf557 100644 --- a/src/templates/powerDialog.html +++ b/src/templates/powerDialog.html @@ -1,4 +1,4 @@ -
+
@@ -6,38 +6,38 @@

Apply the affects of {{name}}.

- {{#if targets.length}} -

- Targets: - {{#each targets}}{{#if @index}}, {{/if}}{{this}}{{/each}} - {{#if recipients.cost}} -
(Additional Recipients {{recipients.cost}}pp each × {{recipients.count}} = {{recipients.total}}) + {{#if basePowerPoints}} +

Base Power Points: {{basePowerPoints}} {{/if}} -

+ {{#if targets.length}} +

+ Targets: + {{#each targets}}{{#if @index}}, {{/if}}{{this}}{{/each}} + {{#if recipients.cost}} +
(Additional Recipients {{recipients.cost}}pp each × {{recipients.count}} = {{recipients.total}}) + {{/if}} +

{{/if}} {{#each modifiers}} -
- {{#if isCheckbox}} - - - {{/if}} - {{#if isSelect}} - - - {{/if}} - {{#if isRadio}} - - {{radioBoxes id choices checked=default}} - {{/if}} -
+
+ {{#if isCheckbox}} + + {{/if}} + {{#if isSelect}} + + + {{/if}} + {{#if isRadio}} + {{radioBoxes id choices checked=default}} + {{/if}} +
{{/each}}