Sync to v7.2.0

This commit is contained in:
2024-06-06 22:07:28 +02:00
parent e46d68b315
commit 2c5ff15830
180 changed files with 2323 additions and 0 deletions

View File

@ -0,0 +1,18 @@
if (args.attackerTest.data.preData.rollClass !== "CharacteristicTest") return;
if (args.attackerTest.data.preData.characteristic !== "s") return;
const SL = args.opposedTest.data.opposeResult.differenceSL;
const targetId = this.effect.getFlag("wfrp4e", "target");
const target = canvas.scene.tokens.get(targetId);
if (SL > 4) {
args.opposedTest.data.opposeResult.other.push(`<b>${args.defenderTest.actor.name}</b> a été obligé de lâcher çà <b>${target.name}</b>.`);
return await this.effect.delete();
}
if (SL > 0) {
args.opposedTest.data.opposeResult.other.push(`<b>${args.defenderTest.actor.name}</b> a été empêché de presser <b>${target.name}</b> pour un tour.`);
let turns = this.effect.getFlag("wfrp4e", "turns");
this.effect.setFlag("wfrp4e", "turns", turns + 1);
}