Merge branch 'main' into feature/death-moves

This commit is contained in:
Chris Ryan 2025-12-28 10:30:00 +10:00
commit cee79ac4c2
4 changed files with 19 additions and 11 deletions

View file

@ -2,7 +2,7 @@ export const actionTypes = {
attack: {
id: 'attack',
name: 'DAGGERHEART.ACTIONS.TYPES.attack.name',
icon: 'fa-khanda',
icon: 'fa-hand-fist',
tooltip: 'DAGGERHEART.ACTIONS.TYPES.attack.tooltip'
},
countdown: {

View file

@ -164,14 +164,13 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
getRollData(data = {}) {
const actorData = this.actor ? this.actor.getRollData(false) : {};
return {
...actorData,
result: data.roll?.total ?? 1,
scale: data.costs?.length // Right now only return the first scalable cost.
? (data.costs.find(c => c.scalable)?.total ?? 1)
: 1,
roll: {}
};
actorData.result = data.roll?.total ?? 1;
actorData.scale = data.costs?.length // Right now only return the first scalable cost.
? (data.costs.find(c => c.scalable)?.total ?? 1)
: 1;
actorData.roll = {};
return actorData;
}
/**

View file

@ -539,7 +539,10 @@ export default class DhpActor extends Actor {
/**@inheritdoc */
getRollData() {
const rollData = super.getRollData().clone();
const rollData = foundry.utils.deepClone(super.getRollData());
/* system gets repeated infinately which causes issues when trying to use the data for document creation */
delete rollData.system;
rollData.name = this.name;
rollData.system = this.system.getRollData();
rollData.prof = this.system.proficiency ?? 1;