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

@@ -10,13 +10,13 @@ let characteristics = {
"wp" : 10,
"fel" : 15
}
let skills = ["Focalisation", "Charm", "Perform (Dancing)"]
let skills = ["Focalisation", "Charme", "Représentation (Danse)"]
let skillAdvancements = [0, 6, 3]
let talents = ["Attractive", "Distract", "Mimic"]
let traits = ["Distracting", "Flight (6)", "Spellcaster (Petty)"]
let talents = ["Attirant", "Distraire", "Imitation"]
let traits = ["Perturbant", "Flight (6)", "Spellcaster (Petty)"]
let trappings = []
let items = [];
let spells = ["Marsh Lights", "Sleep"];
let spells = ["Feux follets", "Sommeil"];
let updateObj = this.actor.toObject();
@@ -32,7 +32,7 @@ for (let index = 0; index < skills.length; index++)
skillItem = updateObj.items.find(i => i.name == skill && i.type == "skill")
if (skillItem)
skillItem.system.advances.value += skillAdvancements[index]
else
else
{
skillItem = await game.wfrp4e.utility.findSkill(skill)
skillItem = skillItem.toObject();
@@ -48,7 +48,7 @@ for (let talent of talents)
{
items.push(talentItem.toObject());
}
else
else
{
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
}
@@ -74,17 +74,17 @@ for (let trait of traits)
if (Number.isNumeric(traitVal))
{
traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;
traitItem.system.specification.value = traitName.includes('Arme','Cornes','Tail','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;
traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim()
}
else
else
traitItem.system.specification.value = traitSpec
items.push(traitItem)
}
for (let trapping of trappings)
for (let trapping of trappings)
{
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
if (trappingItem)
@@ -95,13 +95,13 @@ for (let trapping of trappings)
items.push(trappingItem);
}
else
else
{
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
}
}
for (let spell of spells)
for (let spell of spells)
{
let spellItem = await game.wfrp4e.utility.findItem(spell)
if (spellItem)
@@ -110,13 +110,13 @@ for (let spell of spells)
items.push(spellItem);
}
else
else
{
ui.notifications.warn(`Impossible de trouver ${spell}`, {permanent : true})
ui.notifications.warn(`Could not find ${spell}`, {permanent : true})
}
}
updateObj.name = updateObj.name += " " + this.effect.name
updateObj.name = updateObj.name += " " + this.effet.name
await this.actor.update(updateObj)
this.actor.createEmbeddedDocuments("Item", items);