diff --git a/src/lang/en.json b/src/lang/en.json index 556e93c..53dc372 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -42,7 +42,7 @@ "OSE.scores.cha.long": "Charisma", "OSE.scores.cha.short": "CHA", - "OSE.SavingThrow": "Saving Throw", + "OSE.SavingThrow": "Save", "OSE.saves.death.short": "D", "OSE.saves.death.long": "Death, Poison", "OSE.saves.wand.short": "W", diff --git a/src/module/item/entity.js b/src/module/item/entity.js index 78edbf4..7e1444b 100644 --- a/src/module/item/entity.js +++ b/src/module/item/entity.js @@ -42,11 +42,26 @@ export class OseItem extends Item { return data; } + rollWeapon() { + if (this.data.data.missile) { + this.actor.rollAttack('Missile'); + return true; + } else if (this.data.data.melee) { + this.actor.rollAttack('Melee'); + return true; + } + return false; + } + /** * Roll the item to Chat, creating a chat card which contains follow up attack or damage roll options * @return {Promise} */ async roll({ configureDialog = true } = {}) { + console.log(this.data) + if (this.data.type == 'weapon') { + if (this.rollWeapon()) return; + } // Basic template rendering data const token = this.actor.token; const templateData = {