Added rollItem() family of methods

This commit is contained in:
Lyle hayhurst
2021-06-06 09:23:47 -05:00
parent ebdc1b5e5c
commit 560c3a573f
6 changed files with 23 additions and 1 deletions

View File

@@ -130,4 +130,8 @@ export class demonlord{
getSpellUses(token,level,item) {
return;
}
rollItem(item) {
return item.roll()
}
}

View File

@@ -195,4 +195,8 @@ export class dnd35e{
maximum: item.maxCharges
}
}
rollItem(item) {
return item.roll()
}
}

View File

@@ -198,4 +198,8 @@ export class dnd5e{
maximum: token.actor.data.data.spells?.[`spell${level}`].max
}
}
rollItem(item) {
return item.roll()
}
}

View File

@@ -192,4 +192,8 @@ export class pf2e{
maximum: spellbook.data.data.slots?.[`slot${level}`].max
}
}
rollItem(item) {
return item.roll()
}
}

View File

@@ -238,4 +238,8 @@ export class TokenHelper{
getSpellUses(token,level,item) {
return this.system.getSpellUses(token,level,item);
}
rollItem(item) {
return this.system.rollItem(item);
}
}

View File

@@ -739,7 +739,9 @@ export class TokenControl{
items = this.sortItems(items);
const item = items[itemNr];
if (item != undefined) item.roll();
if (item != undefined) {
tokenHelper.rollItem(item);
}
}
}