From 48e1d8eb953da85a37cfc2a4a9f4aa09e2248aef Mon Sep 17 00:00:00 2001 From: U~man Date: Thu, 30 Jul 2020 15:07:52 +0200 Subject: [PATCH] FIX: macros --- src/module/item/entity.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/module/item/entity.js b/src/module/item/entity.js index b2b59f3..663a508 100644 --- a/src/module/item/entity.js +++ b/src/module/item/entity.js @@ -250,6 +250,27 @@ export class OseItem extends Item { return this.update({ data: newData }); } + roll() { + switch (this.type) { + case "weapon": + this.rollWeapon(); + break; + case "spell": + this.spendSpell(); + break; + case "ability": + if (this.data.data.roll) { + this.rollFormula(); + } else { + this.show(); + } + break; + case "item": + case "armor": + this.show(); + } + } + /** * Show the item to Chat, creating a chat card which contains follow up attack or damage roll options * @return {Promise}