Skip to content

Commit

Permalink
v0.3.8
Browse files Browse the repository at this point in the history
- Fix for bug that caused errors and prevented exported macros from executing when *no* alt or ctrl key is held down. (reported in issue #37)
- compatibleCoreVersion bumped to 0.8.9
  • Loading branch information
Stendarpaval committed Sep 17, 2021
1 parent fbbdd1c commit af4c5aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
}
],
"url": "https://github.com/Stendarpaval/mob-attack-tool",
"version": "0.3.7",
"version": "0.3.8",
"minimumCoreVersion": "0.8.8",
"compatibleCoreVersion": "0.8.8",
"compatibleCoreVersion": "0.8.9",
"system": ["dnd5e"],
"esmodules": [
"scripts/mobAttack.js"
Expand All @@ -27,5 +27,5 @@
"styles/mob-attack-tool.css"
],
"manifest": "https://raw.githubusercontent.com/Stendarpaval/mob-attack-tool/main/module.json",
"download": "https://github.com/Stendarpaval/mob-attack-tool/releases/download/0.3.7/module.zip"
"download": "https://github.com/Stendarpaval/mob-attack-tool/releases/download/0.3.8/module.zip"
}
4 changes: 2 additions & 2 deletions scripts/individualRolls.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export async function rollMobAttackIndividually(data) {

let attackFormula = '';

if (data.withAdvantage || (!data.withDisadvantage && data.event.altKey)) {
if (data.withAdvantage || (!data.withDisadvantage && data.event?.altKey)) {
data.withAdvantage = true;
attackFormula = `2d20kh + ${finalAttackBonus}`;
} else if (data.withDisadvantage || (!data.withAdvantage && (game.settings.get(moduleName, "disadvantageKeyBinding") === 0 ? data.event.metaKey : data.event.ctrlKey))) {
} else if (data.withDisadvantage || (!data.withAdvantage && (game.settings.get(moduleName, "disadvantageKeyBinding") === 0 ? data.event?.metaKey : data.event?.ctrlKey))) {
data.withDisadvantage = true;
attackFormula = `2d20kl + ${finalAttackBonus}`;
} else {
Expand Down
4 changes: 2 additions & 2 deletions scripts/mobRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ export async function rollMobAttack(data) {
const weaponData = data.weapons[key];
const actorName = weaponData.actor.name;
const finalAttackBonus = getAttackBonus(weaponData);
if (!data.withDisadvantage && data.event.altKey) {
if (!data.withDisadvantage && data.event?.altKey) {
data.withAdvantage = true;
data.rollTypeValue = Math.floor(game.settings.get(moduleName,"rollTypeValue"));
data.rollTypeMessage = ` + ${data.rollTypeValue} [adv]`;
} else if (!data.withAdvantage && (game.settings.get(moduleName, "disadvantageKeyBinding") === 0 ? data.event.metaKey : data.event.ctrlKey)) {
} else if (!data.withAdvantage && (game.settings.get(moduleName, "disadvantageKeyBinding") === 0 ? data.event?.metaKey : data.event?.ctrlKey)) {
data.withDisadvantage = true;
data.rollTypeValue = -1 * Math.floor(game.settings.get(moduleName,"rollTypeValue"));
data.rollTypeMessage = ` - ${data.rollTypeValue} [adv]`;
Expand Down

0 comments on commit af4c5aa

Please sign in to comment.