Le massive export update

This commit is contained in:
WBHarry 2025-07-05 00:01:54 +02:00
parent 9c30e51546
commit ea9e96ae96
60 changed files with 919 additions and 914 deletions

View file

@ -0,0 +1,34 @@
import { DHDamageData } from './actionDice.mjs';
import DHDamageAction from './damageAction.mjs';
export default class DHAttackAction extends DHDamageAction {
static extraSchemas = [...super.extraSchemas, ...['roll', 'save']];
static getRollType(parent) {
return parent.type === 'weapon' ? 'weapon' : 'spellcast';
}
get chatTemplate() {
return 'systems/daggerheart/templates/ui/chat/duality-roll.hbs';
}
prepareData() {
super.prepareData();
if (this.damage.includeBase && !!this.item?.system?.damage) {
const baseDamage = this.getParentDamage();
this.damage.parts.unshift(new DHDamageData(baseDamage));
}
}
getParentDamage() {
return {
value: {
multiplier: 'prof',
dice: this.item?.system?.damage.dice,
bonus: this.item?.system?.damage.bonus ?? 0
},
type: this.item?.system?.damage.type,
base: true
};
}
}