forked from public/foundryvtt-wh4-lang-fr-fr
Update scripts
This commit is contained in:
@ -10,10 +10,10 @@ let characteristics = {
|
||||
"wp" : 10,
|
||||
"fel" : 10
|
||||
}
|
||||
let skills = ["Charme", "Intimidation", "Corps à corps (Base)"]
|
||||
let skills = ["Charm", "Intimidate", "Melee (Basic)"]
|
||||
let skillAdvancements = [7, 60, 7]
|
||||
let talents = ["Menaçant", "Discret"]
|
||||
let traits = ["Perturbant"]
|
||||
let talents = ["Menaçant", "Ombres"]
|
||||
let traits = ["Distracting"]
|
||||
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,7 +91,7 @@ for (let trapping of trappings)
|
||||
{
|
||||
trappingItem = trappingItem.toObject()
|
||||
|
||||
equip(trappingItem)
|
||||
trappingItem.system.equipped.value = true;
|
||||
|
||||
items.push(trappingItem);
|
||||
}
|
||||
@ -119,15 +119,4 @@ for (let spell of spells)
|
||||
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