Start of different outcomes

This commit is contained in:
WBHarry 2026-05-03 19:04:44 +02:00
parent 482f712086
commit 3c99519660
4 changed files with 42 additions and 15 deletions

View file

@ -343,16 +343,18 @@ export class DHDamageData extends DHResourceData {
}
}
class AltDamageOutcome extends foundry.abstract.DataModel {
export class AltDamageOutcome extends foundry.abstract.DataModel {
static defineSchema() {
return {
copyStandard: new fields.BooleanField({ required: true, initial: true }),
useStandardHitPointDamage: new fields.BooleanField({ required: true, initial: true }),
...getDamageBaseFields(),
/* Stuff */
}
}
get data() {
return this.copyStandard ? this.parent : {}; // If not copying, return data from the this alternate outcome
return {
...this.parent,
...this,
}
}
}