101 lines
2.2 KiB
JavaScript
101 lines
2.2 KiB
JavaScript
import { PowerEffect } from './basePowers.js';
|
|
|
|
export class ConjureItemEffect extends PowerEffect {
|
|
get name() {
|
|
return 'Conjure Item';
|
|
}
|
|
|
|
get icon() {
|
|
return 'icons/commodities/tech/cog-steel-grey.webp';
|
|
}
|
|
|
|
get duration() {
|
|
return 0;
|
|
}
|
|
|
|
get isTargeted() {
|
|
return false;
|
|
}
|
|
|
|
get isRaisable() {
|
|
return true;
|
|
}
|
|
|
|
get basePowerPoints() {
|
|
return 2;
|
|
}
|
|
|
|
get modifiers() {
|
|
return [
|
|
{
|
|
name: 'Weight in pounds OR daily rations',
|
|
type: 'number',
|
|
default: 1,
|
|
value: 0,
|
|
id: 'weight',
|
|
epic: false,
|
|
effect: false,
|
|
},
|
|
{
|
|
name: 'Complete Set',
|
|
type: 'checkbox',
|
|
default: false,
|
|
value: 1,
|
|
id: 'complete',
|
|
epic: false,
|
|
effect: false,
|
|
},
|
|
{
|
|
name: 'Create Food and Water (Special)',
|
|
type: 'checkbox',
|
|
default: false,
|
|
value: 0,
|
|
id: 'rations',
|
|
epic: false,
|
|
effect: false,
|
|
},
|
|
{
|
|
name: 'Durable (+1 per pound)',
|
|
type: 'checkbox',
|
|
default: false,
|
|
value: 0,
|
|
id: 'durable',
|
|
epic: false,
|
|
effect: false,
|
|
},
|
|
];
|
|
}
|
|
|
|
get powerPoints() {
|
|
if (this.data.rations) {
|
|
return this.data.weight;
|
|
}
|
|
return this.data.weight * (this.data.durable ? 3 : 2) + (this.data.complete ? 1 : 0);
|
|
}
|
|
|
|
get description() {
|
|
if (this.data.rations) {
|
|
return (
|
|
super.description +
|
|
`<p>Conjure enough food and drink to feed ${this.data.weight} size 0
|
|
humanoid${this.data.weight > 1 ? 's' : ''} for 1 day. The food decays
|
|
and is inedible after 24 hours if not consumed.</p>`
|
|
);
|
|
}
|
|
let desc = super.description + `<p>Conjure an item up to ${this.data.weight} in pounds. `;
|
|
if (this.data.raise) {
|
|
desc += 'It is a more durable item than usual for its type. ';
|
|
}
|
|
if (this.data.complete) {
|
|
desc += 'Whatever is conjured is a complete set. ';
|
|
}
|
|
if (this.data.durable) {
|
|
desc += 'The item remains until it is dispelled or dismissed by the caster. ';
|
|
} else {
|
|
desc += 'The item lasts for one hour. ';
|
|
}
|
|
desc += 'Once it is dismissed or expires, the item fades from existance.</p>';
|
|
return desc;
|
|
}
|
|
}
|