Ajout de la commande /voyage et grosse MAJK de la commande /auberge
This commit is contained in:
@@ -10,10 +10,10 @@ let characteristics = {
|
||||
"wp" : 10,
|
||||
"fel" : 10
|
||||
}
|
||||
let skills = ["Charm", "Intimidate", "Melee (Basic)"]
|
||||
let skills = ["Charme", "Intimidation", "Mêlée (Base)"]
|
||||
let skillAdvancements = [7, 60, 7]
|
||||
let talents = ["Menaçant", "Ombres"]
|
||||
let traits = ["Distracting"]
|
||||
let talents = ["Menaçant", "Discret"]
|
||||
let traits = ["Perturbant"]
|
||||
let trappings = []
|
||||
let items = [];
|
||||
let spells = [];
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user