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

@@ -0,0 +1,48 @@
let characteristics = {
"ws" : -10,
"bs" : 0,
"s" : 0,
"t" : 0,
"i" : -25,
"ag" : -20,
"dex" : 0,
"int" : -200,
"wp" : -200,
"fel" : -200
}
let traits = [ {name:"Fabriqué"}, {name:"Vision dans l'obscurité"}, {name:"Peur", value: 2}, {name:"Insensible à la douleur"},{name:"Mort-vivant"},{name:"Instable"} ];
let items = [];
let updateObj = this.actor.toObject();
for (let ch in characteristics)
{
updateObj.system.characteristics[ch].modifier += characteristics[ch];
}
updateObj.system.characteristics.int.initial = 0;
updateObj.system.characteristics.wp.initial = 0;
updateObj.system.characteristics.fel.initial = 0;
for (let trait of traits)
{
let traitItem = await game.wfrp4e.utility.find(trait.name, "trait")
if (traitItem)
{
let t = traitItem.toObject();
t.system.specification.value = trait.value;
items.push(t);
}
else
{
ui.notifications.warn(`: -200
}
let traits = [ {name:`, {permanent : true})
}
}
updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);