foundryvtt-wh4-lang-fr-fr/scripts/MOZn375tGD2060cC.js

7 lines
322 B
JavaScript
Raw Normal View History

2024-10-08 20:52:09 +02:00
const diff = foundry.utils.diffObject(this.item.toObject(), args.data);
if (args.data?.system?.APdamage?.head > this.item.system.APdamage.head) {
const result = await game.wfrp4e.tables.rollTable('armet-damage');
this.script.message(result.result);
if (result.total > 5)
delete args.data.system.APdamage.head;
}