Update scripts
This commit is contained in:
@ -10,10 +10,10 @@ let characteristics = {
|
||||
"wp" : 0,
|
||||
"fel" : 10
|
||||
}
|
||||
let skills = ["Corps à corps (Base)", "Pistage"]
|
||||
let skills = ["Melee (Basic)", "Track"]
|
||||
let skillAdvancements = [8, 7]
|
||||
let talents = ["Charge Berserk", "Frappe précise", "Frappe blessante"]
|
||||
let traits = ["Vol (8)", "Rage", "Essaim", "Pisteur"]
|
||||
let talents = ["Berserk Charge", "Careful Strike", "Strike to Injure"]
|
||||
let traits = ["Flight (8)", "Fury", "Swarm", "Tracker"]
|
||||
let trappings = []
|
||||
let items = [];
|
||||
let spells = [];
|
||||
@ -74,7 +74,7 @@ for (let trait of traits)
|
||||
|
||||
if (Number.isNumeric(traitVal))
|
||||
{
|
||||
traitItem.system.specification.value = traitName.includes('Arme','Cornes','Queue','Tentacules','Morsure') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;
|
||||
traitItem.system.specification.value = traitName.includes('Weapon','Horns','Tail','Tentacles','Bite') ? traitVal - parseInt(characteristicValues[3]/10) : traitVal;
|
||||
traitItem.name = (traitItem.name + ` ${traitSpec ? "("+ traitSpec + ")" : ""}`).trim()
|
||||
}
|
||||
else
|
||||
@ -91,13 +91,13 @@ for (let trapping of trappings)
|
||||
{
|
||||
trappingItem = trappingItem.toObject()
|
||||
|
||||
equip(trappingItem)
|
||||
trappingItem.system.equipped.value = true;
|
||||
|
||||
items.push(trappingItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
|
||||
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,22 +112,11 @@ for (let spell of spells)
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.notifications.warn(`Could not find ${spell}`, {permanent : true})
|
||||
ui.notifications.warn(`Impossible de trouver ${spell}`, {permanent : true})
|
||||
}
|
||||
}
|
||||
|
||||
updateObj.name = updateObj.name += " " + this.effect.name
|
||||
|
||||
await this.actor.update(updateObj)
|
||||
this.actor.createEmbeddedDocuments("Item", items);
|
||||
|
||||
|
||||
function equip(item)
|
||||
{
|
||||
if (item.type == "armour")
|
||||
item.worn = true
|
||||
else if (item.type == "weapon")
|
||||
item.equipped = true
|
||||
else if (item.type == "trapping" && item.trappingType?.value == "clothingAccessories")
|
||||
item.worn = true
|
||||
}
|
||||
this.actor.createEmbeddedDocuments("Item", items);
|
Reference in New Issue
Block a user