Ajout creatures

This commit is contained in:
2022-04-10 16:38:09 +02:00
parent 477c86db0e
commit 45e239b8e9
4 changed files with 43 additions and 5 deletions

View File

@ -218,6 +218,9 @@ export class BoLActor extends Actor {
get equipment() {
return this.itemData.filter(i => i.type === "item")
}
get equipmentCreature() {
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && (( i.data.subtype === "weapon" && i.data.properties.natural === true) || (i.data.subtype === "armor")) )
}
get armors() {
return this.itemData.filter(i => i.type === "item" && i.data.category === "equipment" && i.data.subtype === "armor");
}
@ -243,6 +246,9 @@ export class BoLActor extends Actor {
get melee() {
return this.weapons.filter(i => i.data.properties.melee === true);
}
get natural() {
return this.weapons.filter(i => i.data.properties.natural === true);
}
get ranged() {
return this.weapons.filter(i => i.data.properties.ranged === true);
}
@ -488,6 +494,29 @@ export class BoLActor extends Actor {
}
}
buildCombatCreature() {
return {
"natural": {
"label": "BOL.combatCategory.natural",
"weapon": true,
"protection": false,
"blocking": false,
"ranged": false,
"options": false,
"items": this.natural
},
"protections": {
"label": "BOL.combatCategory.protections",
"weapon": false,
"protection": true,
"blocking": false,
"ranged": false,
"options": false,
"items": this.protections
},
}
}
/*-------------------------------------------- */
buildRollList() {
let rolls = []