forked from public/foundryvtt-wh4-lang-fr-fr
Update scripts
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor;
|
||||
if (!actor || !(actor.system instanceof StandardActorModel))
|
||||
return ui.notifications.warn("Vous devez contrôler un Acteur capable de réaliser un Test de Force");
|
||||
return ui.notifications.warn("You must control an Actor capable of performing a Strength Test");
|
||||
|
||||
let test = await actor.setupCharacteristic("s", {
|
||||
skipTargets: true,
|
||||
appendTitle: " - Renflouement",
|
||||
appendTitle: " - Bailing Out",
|
||||
fields: {
|
||||
difficulty: "challenging"
|
||||
},
|
||||
@ -22,7 +22,7 @@ if (test.succeeded) {
|
||||
|
||||
let rating = parseInt(this.effect.name.match(/\d+/)?.[0]);
|
||||
if (rating <= 1) {
|
||||
const scriptData = this.effect.flags.wfrp4e.scriptData;
|
||||
const scriptData = this.effect.system.scriptData
|
||||
scriptData[2].trigger = '';
|
||||
await this.effect.update({disabled: true, "flags.wfrp4e.scriptData": scriptData});
|
||||
await this.effect.update({disabled: true, "system.scriptData": scriptData});
|
||||
}
|
Reference in New Issue
Block a user