Skip to content

Commit

Permalink
Final bugfixes for 0.80 release
Browse files Browse the repository at this point in the history
  • Loading branch information
aaclayton committed Jan 10, 2020
1 parent d3aeeee commit 1aef2ee
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions dnd5e.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,8 @@ function rollItemMacro(itemName) {
if ( !actor ) actor = game.actors.get(speaker.actor);
const item = actor ? actor.items.find(i => i.name === itemName) : null;
if ( !item ) return ui.notifications.warn(`Your controlled Actor does not have an item named ${itemName}`);

// Trigger the item roll
if ( item.data.type === "spell" ) return actor.useSpell(item);
return item.roll();
}
2 changes: 1 addition & 1 deletion module/actor/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export class Actor5e extends Actor {
const checkBonus = getProperty(this.data.data, "bonuses.abilityCheck");

if (![undefined, "", "0"].includes(checkBonus)) {
parts.push("@checkBonus")
parts.push("@checkBonus");
data.checkBonus = checkBonus;
}

Expand Down
2 changes: 1 addition & 1 deletion module/item/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ export class Item5e extends Item {
const [sceneId, tokenId] = tokenKey.split(".");
const scene = game.scenes.get(sceneId);
if (!scene) return null;
const tokenData = scene.getEmbeddedEntity("tokens", tokenId);
const tokenData = scene.getEmbeddedEntity("Token", tokenId);
if (!tokenData) return null;
const token = new Token(tokenData);
return token.actor;
Expand Down
4 changes: 1 addition & 3 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@
"value": 0,
"bonus": 0
},
"prof": 2,
"speed": {
"value": "30 ft",
"special": ""
},
"spellcasting": "int",
"spelldc": 10
"spellcasting": "int"
},
"details": {
"alignment": "",
Expand Down

0 comments on commit 1aef2ee

Please sign in to comment.