growthshrink pt1

This commit is contained in:
Mike Bloy 2024-05-20 18:12:05 -05:00
parent 4b087916b3
commit 36520fcee2
2 changed files with 56 additions and 1 deletions

View File

@ -67,7 +67,11 @@ export class PowerFormApplication extends FormApplication {
buttons: this.powerEffect.menuButtons, buttons: this.powerEffect.menuButtons,
}; };
if (this.powerEffect.isTargeted) { if (this.powerEffect.isTargeted) {
data.targets = this.powerEffect.targets.map((t) => t.name); if (this.powerEffect.oneTarget) {
data.targets = [this.powerEffect.targets?.[0]?.name ?? '<em>No Target Selected!</em>'];
} else {
data.targets = this.powerEffect.targets.map((t) => t.name);
}
} }
if (this.powerEffect.hasAdditionalRecipients && this.powerEffect.targets.length > 1) { if (this.powerEffect.hasAdditionalRecipients && this.powerEffect.targets.length > 1) {
data.recipients.cost = this.powerEffect.additionalRecipientCost; data.recipients.cost = this.powerEffect.additionalRecipientCost;

View File

@ -0,0 +1,51 @@
import { PowerEffect } from './basePowers.js';
export class GrowthShrinkEffect extends PowerEffect {
get name() {
return 'Growth/Shrink';
}
get icon() {
return 'icons/magic/control/silhouette-grow-shrink-tan.webp';
}
get basePowerPoints() {
return 2;
}
get duration() {
return 5;
}
get isTargeted() {
return true;
}
get oneTarget() {
return true;
}
get modifiers() {
return [
...super.modifiers,
{
name: 'Duration',
id: 'duration',
value: 2,
type: 'checkbox',
default: false,
epic: true,
effect: false,
},
{
name: 'Power',
id: 'power',
value: 2,
type: 'checkbox',
default: false,
epic: true,
effect: false,
},
];
}
}