Skip to content

Commit

Permalink
Merge pull request #71 from kaelad02/fix70
Browse files Browse the repository at this point in the history
fix #70
  • Loading branch information
kaelad02 authored Jun 1, 2024
2 parents e307948 + 82291b8 commit aa1fa5f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# upcoming

- bug fix: [#70](https://github.com/kaelad02/adv-reminder/issues/70) Fix error when using a damage or healing enricher

# 4.0.0

- feature: Support the system's new concentration rolls with sources and messages with `flags.adv-reminder.message.ability.concentration` (system already handles advantage/disadvantage)
Expand Down
3 changes: 3 additions & 0 deletions src/rollers/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ export default class CoreRollerHooks {
preRollDamage(item, config) {
debug("preRollDamage hook called");

// damage/healing enricher doesn't have an item, skip
if (!item) return;

if (this.isFastForwarding(config)) return;
const target = getTarget();
const distanceFn = getDistanceToTargetFn(config.messageData.speaker);
Expand Down
3 changes: 3 additions & 0 deletions src/rollers/midi.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ export default class MidiRollerHooks extends CoreRollerHooks {
preRollDamage(item, config) {
debug("preRollDamage hook called");

// damage/healing enricher doesn't have an item, skip
if (!item) return;

if (this.isFastForwarding(config)) return;
const target = getTarget();
// use distance from Midi's Workflow
Expand Down
3 changes: 3 additions & 0 deletions src/rollers/rsr.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ export default class ReadySetRollHooks extends CoreRollerHooks {
preRollDamage(item, config) {
debug("preRollDamage hook called");

// damage/healing enricher doesn't have an item, skip
if (!item) return;

const target = getTarget();

if (this._doMessages(config)) {
Expand Down

0 comments on commit aa1fa5f

Please sign in to comment.