fixes for banish
This commit is contained in:
parent
b5b0ad01f6
commit
f962ee785e
@ -29,58 +29,40 @@ export class BanishEffect extends PowerEffect {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
get menuInputs() {
|
get modifiers() {
|
||||||
const inputs = super.menuInputs;
|
const mods = super.modifiers;
|
||||||
inputs.push({
|
mods.push({
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '⭐ Area of Effect',
|
default: 'none',
|
||||||
options: [
|
name: 'Area of Effect',
|
||||||
{ html: 'None', value: 0, selected: true },
|
id: 'aoe',
|
||||||
{ html: 'Small Blast Template (+1)', value: 1, selected: false },
|
epic: true,
|
||||||
{ html: 'Medium Blast Template (+2)', value: 2, selected: false },
|
choices: {
|
||||||
{ html: 'Large Blast Template (+3)', value: 3, selected: false },
|
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;
|
return mods;
|
||||||
}
|
|
||||||
|
|
||||||
get powerPoints() {
|
|
||||||
let total = super.powerPoints;
|
|
||||||
total += this.data.aoe;
|
|
||||||
return total;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get description() {
|
get description() {
|
||||||
return (
|
return (
|
||||||
super.description +
|
super.description +
|
||||||
`
|
`<p>An opposed roll of the caster's skill vs the target's Spirit.
|
||||||
<p>An opposed roll of the caster's skill vs the target's Spirit.
|
|
||||||
<strong>Success:</strong> Shaken, <strong>each Raise:</strong> 1 Wound
|
<strong>Success:</strong> Shaken, <strong>each Raise:</strong> 1 Wound
|
||||||
Incapacitation results in banishment to home plane.</p>
|
Incapacitation results in banishment to home plane.</p>`
|
||||||
`
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get chatMessageEffects() {
|
get chatMessageEffects() {
|
||||||
const list = super.chatMessageEffects;
|
const list = super.chatMessageEffects;
|
||||||
switch (this.data.aoe) {
|
if (this.data.aoe !== 'none') {
|
||||||
case 0:
|
list.push(this.data.aoe.toUpperCase());
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
list.push('SBT');
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
list.push('MBT');
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
list.push('LBT');
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return list;
|
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() {
|
static get defaultOptions() {
|
||||||
return mergeObject(super.defaultOptions, {
|
return mergeObject(super.defaultOptions, {
|
||||||
classes: ['sheet', 'mbSwadePowerEffectsForm'],
|
classes: ['sheet', 'mbSwadeForm', 'mbSwadePowerEffectsForm'],
|
||||||
popOut: true,
|
popOut: true,
|
||||||
template: templates['powerDialog.html'],
|
template: templates['powerDialog.html'],
|
||||||
id: ['mbSwadePowerEffectsApplication'],
|
id: ['mbSwadePowerEffectsApplication'],
|
||||||
@ -255,7 +255,6 @@ export class PowerEffect {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
epic: false,
|
epic: false,
|
||||||
effect: true,
|
|
||||||
});
|
});
|
||||||
if (this.isDamaging) {
|
if (this.isDamaging) {
|
||||||
mods.push({
|
mods.push({
|
||||||
@ -297,7 +296,6 @@ export class PowerEffect {
|
|||||||
default: 'none',
|
default: 'none',
|
||||||
value: 1,
|
value: 1,
|
||||||
epic: false,
|
epic: false,
|
||||||
effect: true,
|
|
||||||
choices: { none: 'None', hinder: 'Hinder', hurry: 'Hurry' },
|
choices: { none: 'None', hinder: 'Hinder', hurry: 'Hurry' },
|
||||||
values: { none: 0, hinder: 1, hurry: 1 },
|
values: { none: 0, hinder: 1, hurry: 1 },
|
||||||
isGlobal: true,
|
isGlobal: true,
|
||||||
@ -379,6 +377,7 @@ export class PowerEffect {
|
|||||||
async applyEffect() {
|
async applyEffect() {
|
||||||
await this.parseValues();
|
await this.parseValues();
|
||||||
await this.apply();
|
await this.apply();
|
||||||
|
await this.chatMessage();
|
||||||
await this.sideEffects();
|
await this.sideEffects();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,7 +531,7 @@ export class PowerEffect {
|
|||||||
list.push('Different Trapping (Adaptable Caster)');
|
list.push('Different Trapping (Adaptable Caster)');
|
||||||
}
|
}
|
||||||
if (this.data.fatigue) {
|
if (this.data.fatigue) {
|
||||||
list.push('Fatigue (applied to targets');
|
list.push('Fatigue (applied to targets)');
|
||||||
}
|
}
|
||||||
if (this.data.heavyweapon) {
|
if (this.data.heavyweapon) {
|
||||||
list.push('Heavy Weapon');
|
list.push('Heavy Weapon');
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
/* ---------------------------- */
|
.mbSwadeForm {
|
||||||
/* Sass */
|
label.checkbox {
|
||||||
/* This is your Sass entry file */
|
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">
|
<header class="sheet-header flexrow">
|
||||||
<img src="{{icon}}" height="64" width="64" title="{{name}} Effect" alt=" " />
|
<img src="{{icon}}" height="64" width="64" title="{{name}} Effect" alt=" " />
|
||||||
<section class="flexcol">
|
<section class="flexcol">
|
||||||
@ -6,6 +6,9 @@
|
|||||||
<p>Apply the affects of {{name}}.</p>
|
<p>Apply the affects of {{name}}.</p>
|
||||||
</section>
|
</section>
|
||||||
</header>
|
</header>
|
||||||
|
{{#if basePowerPoints}}
|
||||||
|
<p><strong>Base Power Points</strong>: {{basePowerPoints}}
|
||||||
|
{{/if}}
|
||||||
{{#if targets.length}}
|
{{#if targets.length}}
|
||||||
<p>
|
<p>
|
||||||
<strong>Targets</strong>:
|
<strong>Targets</strong>:
|
||||||
@ -18,20 +21,17 @@
|
|||||||
{{#each modifiers}}
|
{{#each modifiers}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{#if isCheckbox}}
|
{{#if isCheckbox}}
|
||||||
|
<label class="checkbox">
|
||||||
<input type="checkbox" name="{{id}}" {{checked default}} />
|
<input type="checkbox" name="{{id}}" {{checked default}} />
|
||||||
<label for="{{id}}">
|
|
||||||
{{#if epic}}⭐ {{/if}}{{name}} ({{numberFormat value decimals=0 sign=true}})
|
{{#if epic}}⭐ {{/if}}{{name}} ({{numberFormat value decimals=0 sign=true}})
|
||||||
</label>
|
</label>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if isSelect}}
|
{{#if isSelect}}
|
||||||
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label>
|
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label>
|
||||||
<select name="{{id}}">
|
<select name="{{id}}">{{selectOptions choices selected=default}}</select>
|
||||||
{{selectOptions choices selected=default}}
|
|
||||||
</select>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if isRadio}}
|
{{#if isRadio}}
|
||||||
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label>
|
<label>{{#if epic}}⭐ {{/if}}{{name}}:</label> {{radioBoxes id choices checked=default}}
|
||||||
{{radioBoxes id choices checked=default}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user