mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Bug] Downtime Actions Fixes (#421)
* . * Added a temp fix for a bug in action healing section * Corrected rules.attack.roll.trait * .
This commit is contained in:
parent
e6bfe08d83
commit
a54f4e3831
8 changed files with 71 additions and 10 deletions
|
|
@ -63,6 +63,19 @@ export default class DHWeapon extends AttachableItem {
|
|||
]
|
||||
}
|
||||
}
|
||||
}),
|
||||
rules: new fields.SchemaField({
|
||||
attack: new fields.SchemaField({
|
||||
roll: new fields.SchemaField({
|
||||
trait: new fields.StringField({
|
||||
required: true,
|
||||
choices: CONFIG.DH.ACTOR.abilities,
|
||||
nullable: true,
|
||||
initial: null,
|
||||
label: 'DAGGERHEART.GENERAL.Rules.attack.roll.trait.label'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
};
|
||||
}
|
||||
|
|
@ -77,6 +90,10 @@ export default class DHWeapon extends AttachableItem {
|
|||
);
|
||||
}
|
||||
|
||||
prepareDerivedData() {
|
||||
this.attack.roll.trait = this.rules.attack.roll.trait ?? this.attack.roll.trait;
|
||||
}
|
||||
|
||||
async _preUpdate(changes, options, user) {
|
||||
const allowed = await super._preUpdate(changes, options, user);
|
||||
if (allowed === false) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue