libram 0.10.16 → 0.10.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/mood.js +7 -6
  2. package/package.json +1 -1
package/dist/mood.js CHANGED
@@ -316,14 +316,15 @@ export class Mood {
316
316
  */
317
317
  effect(effect, gainEffect) {
318
318
  const skill = toSkill(effect);
319
- const requireAprilShield = aprilShieldEffects
320
- .values()
321
- .some((ef) => ef === effect);
322
- if ((!gainEffect && skill !== $skill.none) || requireAprilShield) {
323
- this.skill(skill, { requireAprilShield });
319
+ if (!gainEffect && skill !== $skill.none) {
320
+ this.skill(skill);
324
321
  }
325
322
  else {
326
- this.elements.push(new CustomMoodElement(effect, gainEffect));
323
+ const aprilSkill = [...aprilShieldEffects.entries()].find(([, ef]) => ef === effect)?.[0];
324
+ if (aprilSkill)
325
+ this.skill(aprilSkill, { requireAprilShield: true });
326
+ else
327
+ this.elements.push(new CustomMoodElement(effect, gainEffect));
327
328
  }
328
329
  return this;
329
330
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libram",
3
- "version": "0.10.16",
3
+ "version": "0.10.18",
4
4
  "description": "JavaScript helper library for KoLmafia",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",