Ajout de la commande /voyage et grosse MAJK de la commande /auberge
This commit is contained in:
@@ -15,9 +15,9 @@ let skillAdvancements = [5, 15, 10, 10, 15, 10, 10, 20]
|
||||
|
||||
let talents = ["Magie des Arcanes", "Magie Mineure", "Seconde Vue"]
|
||||
let trappings = ["Arme simple", "Robes", "(2M) Bâton de combat"]
|
||||
let specialItems = [
|
||||
{name: "Objet magique", type: "trapping", trappingType: "misc" },
|
||||
]
|
||||
let specialItems = [
|
||||
{name: "Objet magique", type: "trapping", trappingType: "misc" },
|
||||
]
|
||||
let items = [];
|
||||
|
||||
let updateObj = this.actor.toObject();
|
||||
@@ -46,7 +46,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();
|
||||
@@ -62,13 +62,13 @@ for (let talent of talents)
|
||||
{
|
||||
items.push(talentItem.toObject());
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
|
||||
ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
|
||||
}
|
||||
}
|
||||
|
||||
for (let trapping of trappings)
|
||||
for (let trapping of trappings)
|
||||
{
|
||||
let trappingItem = await game.wfrp4e.utility.findItem(trapping)
|
||||
if (trappingItem)
|
||||
@@ -79,24 +79,24 @@ 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})
|
||||
}
|
||||
}
|
||||
|
||||
let ride = await Dialog.confirm({title : "Skill", content : "Add Chaos Steed and +20 Ride (Horse)?"})
|
||||
let ride = await foundry.applications.api.DialogV2.confirm({window : {title : "Compétence"}, content : "Add Chaos Steed and +20 Ride (Horse)?"})
|
||||
|
||||
if (ride)
|
||||
{
|
||||
let skill = await game.wfrp4e.utility.findSkill("Ride (Horse)")
|
||||
let skill = await game.wfrp4e.utility.findSkill("Chevaucher (Cheval)")
|
||||
skill = skill.toObject();
|
||||
skill.system.advances.value = 20;
|
||||
items = items.concat({name : "Chaos Steed", type: "trapping", "system.trappingType.value" : "misc"}, skill)
|
||||
}
|
||||
|
||||
|
||||
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