Feature/416 reaction roll query (#445)

* Create files

* before fixing damage roll on main

* g

* Player query for Roll All Save

* Exec Save message as GM for players

* Fix DsN bug
This commit is contained in:
Dapoulp 2025-07-28 17:44:11 +02:00 committed by GitHub
parent 2fbbf98f88
commit 2be4ee8857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 91 additions and 38 deletions

View file

@ -1,5 +1,4 @@
import { emitAsGM, GMUpdateEvent } from '../systemRegistration/socket.mjs';
import DamageReductionDialog from '../applications/dialogs/damageReductionDialog.mjs';
import { LevelOptionType } from '../data/levelTier.mjs';
import DHFeature from '../data/item/feature.mjs';
import { damageKeyToNumber } from '../helpers/utils.mjs';
@ -483,10 +482,14 @@ export default class DhpActor extends Actor {
this.#canReduceDamage(hpDamage.value, hpDamage.damageTypes)
) {
const armorStackResult = await this.owner.query('armorStack', {
actorId: this.uuid,
damage: hpDamage.value,
type: [...hpDamage.damageTypes]
});
actorId: this.uuid,
damage: hpDamage.value,
type: [...hpDamage.damageTypes]
},
{
timeout: 30000
}
);
if (armorStackResult) {
const { modifiedDamage, armorSpent, stressSpent } = armorStackResult;
updates.find(u => u.key === 'hitPoints').value = modifiedDamage;
@ -638,7 +641,3 @@ export default class DhpActor extends Actor {
});
}
}
export const registerDHActorHooks = () => {
CONFIG.queries.armorStack = DamageReductionDialog.armorStackQuery;
};