foundryvtt-wh4-lang-fr-fr/scripts/6ZS1rQLkNvMDO0Fp.js

12 lines
437 B
JavaScript
Raw Permalink Normal View History

2024-05-16 17:57:51 +02:00
let roll = Math.ceil(CONFIG.Dice.randomUniform() * 10)
if (args.test.isFumble && roll == 1 && !args.test.result.misfire)
{
args.test.result.misfire = game.i18n.localize("Misfire") + " (Résultat 1)"
2024-05-16 17:57:51 +02:00
args.test.result.misfireDamage = eval(parseInt(args.test.result.roll.toString().split('').pop()) + args.test.item.Damage)
}
else if (args.test.isFumble && roll != 1)
{
args.test.result.other.push("Résultat du Raté: " + roll)
2024-05-16 17:57:51 +02:00
}