Iteam cleanup + less migration
This commit is contained in:
@@ -20,16 +20,12 @@ export default class OathHammerActor extends Actor {
|
||||
}
|
||||
}
|
||||
|
||||
getArmorRating() {
|
||||
let rating = 0
|
||||
getArmorValue() {
|
||||
for (const item of this.items) {
|
||||
if (item.type === "armor" && item.system.equipped) {
|
||||
rating += Number(item.system.armorRating) || 0
|
||||
}
|
||||
if (item.type === "shield" && item.system.equipped) {
|
||||
rating += Number(item.system.shieldBonus) || 0
|
||||
return Number(item.system.armorValue) || 0
|
||||
}
|
||||
}
|
||||
return rating
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
const defaultItemImg = {
|
||||
weapon: "systems/fvtt-oath-hammer/assets/icons/icon_weapon.webp",
|
||||
armor: "systems/fvtt-oath-hammer/assets/icons/icon_armor.webp",
|
||||
shield: "systems/fvtt-oath-hammer/assets/icons/icon_shield.webp",
|
||||
ammunition: "systems/fvtt-oath-hammer/assets/icons/icon_ammunition.webp",
|
||||
equipment: "systems/fvtt-oath-hammer/assets/icons/icon_equipment.webp",
|
||||
spell: "systems/fvtt-oath-hammer/assets/icons/icon_spell.webp",
|
||||
miracle: "systems/fvtt-oath-hammer/assets/icons/icon_miracle.webp",
|
||||
weapon: "systems/fvtt-oath-hammer/assets/icons/icon_weapon.webp",
|
||||
armor: "systems/fvtt-oath-hammer/assets/icons/icon_armor.webp",
|
||||
ammunition: "systems/fvtt-oath-hammer/assets/icons/icon_ammunition.webp",
|
||||
equipment: "systems/fvtt-oath-hammer/assets/icons/icon_equipment.webp",
|
||||
spell: "systems/fvtt-oath-hammer/assets/icons/icon_spell.webp",
|
||||
miracle: "systems/fvtt-oath-hammer/assets/icons/icon_miracle.webp",
|
||||
"magic-item": "systems/fvtt-oath-hammer/assets/icons/icon_magic_item.webp",
|
||||
ability: "systems/fvtt-oath-hammer/assets/icons/icon_ability.webp",
|
||||
oath: "systems/fvtt-oath-hammer/assets/icons/icon_oath.webp",
|
||||
condition: "systems/fvtt-oath-hammer/assets/icons/icon_condition.webp"
|
||||
ability: "systems/fvtt-oath-hammer/assets/icons/icon_ability.webp",
|
||||
oath: "systems/fvtt-oath-hammer/assets/icons/icon_oath.webp"
|
||||
}
|
||||
|
||||
export default class OathHammerItem extends Item {
|
||||
|
||||
Reference in New Issue
Block a user