Feature/165 action save (#231)

* Roll All Save button + Merge Attack & Roll Chat message

* Fix conflicts again
This commit is contained in:
Dapoulp 2025-07-01 19:04:53 +02:00 committed by GitHub
parent b7e4169079
commit 8b834036fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 369 additions and 140 deletions

View file

@ -484,6 +484,9 @@ export default class DhpActor extends Actor {
let updates = { actor: { target: this, resources: {} }, armor: { target: this.system.armor, resources: {} } };
resources.forEach(r => {
switch (r.type) {
case 'fear':
ui.resources.updateFear(game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.Resources.Fear) + r.value);
break;
case 'armorStack':
updates.armor.resources['system.marks.value'] = Math.max(
Math.min(this.system.armor.system.marks.value + r.value, this.system.armorScore),
@ -502,7 +505,6 @@ export default class DhpActor extends Actor {
}
});
Object.values(updates).forEach(async u => {
console.log(updates, u);
if (Object.keys(u.resources).length > 0) {
if (game.user.isGM) {
await u.target.update(u.resources);