Skip to content

Commit

Permalink
Blindess/Deafness
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed Jan 19, 2025
1 parent 3e6772e commit a9e837f
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 83 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Fixes to Active-Auras condition application.
- Spell Effects: Insect Plague and Web.
- Blindness/Deafness improvements.

# 6.0.64

Expand Down
59 changes: 0 additions & 59 deletions macros/spells/blindnessDeafness.js

This file was deleted.

24 changes: 0 additions & 24 deletions src/effects/spells/blindnessDeafness.js

This file was deleted.

1 change: 1 addition & 0 deletions src/parser/enrichers/DDBSpellEnricher.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export default class DDBSpellEnricher extends DDBEnricherFactoryMixin {
"Wind Wall": SpellEnrichers.WindWall,
"Witch Bolt": SpellEnrichers.WitchBolt,
"Zephyr Strike": SpellEnrichers.ZephyrStrike,
"Blindness/Deafness": SpellEnrichers.BlindnessDeafness,
};

}
66 changes: 66 additions & 0 deletions src/parser/enrichers/spell/BlindnessDeafness.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* eslint-disable class-methods-use-this */
import DDBEnricherData from "../data/DDBEnricherData.mjs";

export default class BlindnessDeafness extends DDBEnricherData {

get type() {
return "utility";
}

get activity() {
return {
name: "Blindness",
};
}

get additionalActivities() {
return [
{
duplicate: true,
overrides: {
name: "Deafness",
},
},
];
}

get clearAutoEffects() {
return true;
}

get effects() {
const midiChanges = [
DDBEnricherData.ChangeHelper.overrideChange(
`label=${this.data.name} (End of Turn),turn=end,saveDC=@attributes.spelldc,saveAbility=con,savingThrow=true,saveMagic=true,killAnim=true`,
20,
"flags.midi-qol.OverTime",
),
];
return [
{
name: "Blindness",
activityMatch: "Blindness",
atlChanges: [
DDBEnricherData.ChangeHelper.overrideChange("0", 99, "ATL.sight.range"),
],
statuses: ["Blinded"],
midiChanges,
options: {
durationSeconds: 60,
durationRounds: 10,
},
},
{
name: "Deafness",
activityMatch: "Deafness",
statuses: ["Deafened"],
midiChanges,
options: {
durationSeconds: 60,
durationRounds: 10,
},
},
];
}

}
1 change: 1 addition & 0 deletions src/parser/enrichers/spell/_module.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export { default as Barkskin } from "./Barkskin.mjs";
export { default as BeaconOfHope } from "./BeaconOfHope.mjs";
export { default as BladeWard } from "./BladeWard.mjs";
export { default as Bless } from "./Bless.mjs";
export { default as BlindnessDeafness } from "./BlindnessDeafness.mjs";
export { default as Blur } from "./Blur.mjs";
export { default as BonesOfTheEarth } from "./BonesOfTheEarth.mjs";
export { default as BoomingBlade } from "./BoomingBlade.mjs";
Expand Down

0 comments on commit a9e837f

Please sign in to comment.