Sync to latest WFRP release

This commit is contained in:
2026-02-26 21:53:55 +01:00
parent e0383def30
commit 786afeab74
480 changed files with 4221 additions and 91 deletions

View File

@@ -0,0 +1,31 @@
let data = this.effect.getFlag("wfrp4e", "handOfGlory");
let changes = [];
if (!data)
{
return;
}
if (data.characteristic == "movement")
{
changes = [{key: "system.details.move.value", mode: 2, value: 2}]
}
else
{
let currentTotal = this.actor.system.characteristics[data.characteristic].value;
let newTotal = this.actor.system.characteristics[data.characteristic].value + data.roll;
let bonusOffset = Math.floor(currentTotal / 10) - Math.floor(newTotal / 10); // e.g. 37 + 15 bonus = 52, calculation bonus modifier should be -2
changes = changes.concat({
key: `system.characteristics.${data.characteristic}.modifier`,
mode: 2,
value: data.roll
},
{
key: `system.characteristics.${data.characteristic}.calculationBonusModifier`,
mode: 2,
value: bonusOffset
})
}
this.effect.updateSource({changes});