Ajout de la commande /voyage et grosse MAJK de la commande /auberge

This commit is contained in:
2026-01-07 15:04:49 +01:00
parent c8119601d8
commit f525b6c07a
1329 changed files with 24138 additions and 4397 deletions

View File

@@ -1,28 +1,28 @@
let actor = game.user.character ?? canvas.tokens.controlled[0]?.actor;
if (!actor || !(actor.system instanceof StandardActorModel))
return ui.notifications.warn("You must control an Actor capable of performing a Strength Test");
return ui.notifications.warn("Vous devez contrôler un acteur capable d'effectuer un test de Force");
let test = await actor.setupCharacteristic("s", {
skipTargets: true,
appendTitle: " - Bailing Out",
skipTargets: true,
appendTitle: " - Évacuation",
fields: {
difficulty: "challenging"
},
context: {
success: "Reduced the Holed rating!"
success: "Réduction du niveau de Perforation !"
}
});
await test.roll();
if (test.succeeded) {
let SL = parseInt(test.result.SL);
let name = this.effect.name.replace(/\d+/, rating => parseInt(rating) - SL);
await this.effect.update({name});
await Test.roll();
if (Test.succeeded) {
let SL = parseInt(Test.result.SL);
let name = this.effet.name.replace(/\d+/, rating => parseInt(rating) - SL);
await this.effet.update({name});
}
let rating = parseInt(this.effect.name.match(/\d+/)?.[0]);
let rating = parseInt(this.effet.name.match(/\d+/)?.[0]);
if (rating <= 1) {
const scriptData = this.effect.system.scriptData
const scriptData = this.effet.system.scriptData
scriptData[2].trigger = '';
await this.effect.update({disabled: true, "system.scriptData": scriptData});
await this.effet.update({disabled: true, "system.scriptData": scriptData});
}