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

10 lines
536 B
JavaScript
Raw Normal View History

if (args.test.options.useOnesArgumentative && (args.test.result.roll <= game.settings.get("wfrp4e", "automaticSuccess") || args.test.result.roll <= args.test.target)) {
2024-05-16 17:57:51 +02:00
let SL = Math.floor(args.test.target / 10) - Math.floor(args.test.result.roll / 10)
let ones = Number(args.test.result.roll.toString().split("").pop())
2024-05-16 17:57:51 +02:00
if (ones > SL) {
args.test.data.result.SL = "+" + (ones + args.test.successBonus + args.test.slBonus)
args.test.result.other.push(`<b>${this.effect.name}</b>: Utilise le dé d'unité comme DR`)
}
2024-05-16 17:57:51 +02:00
}