fixes for banish
This commit is contained in:
parent
b5b0ad01f6
commit
f962ee785e
@ -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 +
|
||||
`
|
||||
<p>An opposed roll of the caster's skill vs the target's Spirit.
|
||||
<strong>Success:</strong> Shaken, <strong>each Raise:</strong> 1 Wound
|
||||
Incapacitation results in banishment to home plane.</p>
|
||||
`
|
||||
`<p>An opposed roll of the caster's skill vs the target's Spirit.
|
||||
<strong>Success:</strong> Shaken, <strong>each Raise:</strong> 1 Wound
|
||||
Incapacitation results in banishment to home plane.</p>`
|
||||
);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
/* ---------------------------- */
|
||||
/* Sass */
|
||||
/* This is your Sass entry file */
|
||||
/* ---------------------------- */
|
||||
.mbSwadeForm {
|
||||
label.checkbox {
|
||||
font-size: var(--font-size-14);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<form class="flexcol">
|
||||
<form class="flexcol"><!-- vim: set ft=handlebars: -->
|
||||
<header class="sheet-header flexrow">
|
||||
<img src="{{icon}}" height="64" width="64" title="{{name}} Effect" alt=" " />
|
||||
<section class="flexcol">
|
||||
@ -6,38 +6,38 @@
|
||||
<p>Apply the affects of {{name}}.</p>
|
||||
</section>
|
||||
</header>
|
||||
{{#if targets.length}}
|
||||
<p>
|
||||
<strong>Targets</strong>:
|
||||
{{#each targets}}{{#if @index}}, {{/if}}{{this}}{{/each}}
|
||||
{{#if recipients.cost}}
|
||||
<br>(Additional Recipients {{recipients.cost}}pp each × {{recipients.count}} = {{recipients.total}})
|
||||
{{#if basePowerPoints}}
|
||||
<p><strong>Base Power Points</strong>: {{basePowerPoints}}
|
||||
{{/if}}
|
||||
</p>
|
||||
{{#if targets.length}}
|
||||
<p>
|
||||
<strong>Targets</strong>:
|
||||
{{#each targets}}{{#if @index}}, {{/if}}{{this}}{{/each}}
|
||||
{{#if recipients.cost}}
|
||||
<br>(Additional Recipients {{recipients.cost}}pp each × {{recipients.count}} = {{recipients.total}})
|
||||
{{/if}}
|
||||
</p>
|
||||
{{/if}}
|
||||
{{#each modifiers}}
|
||||
<div class="form-group">
|
||||
{{#if isCheckbox}}
|
||||
<input type="checkbox" name="{{id}}" {{checked default}} />
|
||||
<label for="{{id}}">
|
||||
{{#if epic}}⭐ {{/if}}{{name}} ({{numberFormat value decimals=0 sign=true}})
|
||||
</label>
|
||||
{{/if}}
|
||||
{{#if isSelect}}
|
||||
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label>
|
||||
<select name="{{id}}">
|
||||
{{selectOptions choices selected=default}}
|
||||
</select>
|
||||
{{/if}}
|
||||
{{#if isRadio}}
|
||||
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label>
|
||||
{{radioBoxes id choices checked=default}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{#if isCheckbox}}
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="{{id}}" {{checked default}} />
|
||||
{{#if epic}}⭐ {{/if}}{{name}} ({{numberFormat value decimals=0 sign=true}})
|
||||
</label>
|
||||
{{/if}}
|
||||
{{#if isSelect}}
|
||||
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label>
|
||||
<select name="{{id}}">{{selectOptions choices selected=default}}</select>
|
||||
{{/if}}
|
||||
{{#if isRadio}}
|
||||
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label> {{radioBoxes id choices checked=default}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<footer class="sheet-footer flexrow">
|
||||
{{#each buttons}}
|
||||
<button type="submit" name="submit" value="{{value}}">{{label}}</button>
|
||||
<button type="submit" name="submit" value="{{value}}">{{label}}</button>
|
||||
{{/each}}
|
||||
</footer>
|
||||
</form>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user