libram 0.11.2 → 0.11.4

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 +5 -9
  2. package/package.json +1 -1
package/dist/mood.js CHANGED
@@ -316,16 +316,12 @@ export class Mood {
316
316
  */
317
317
  effect(effect, gainEffect) {
318
318
  const skill = toSkill(effect);
319
- if (!gainEffect && skill !== $skill.none) {
320
- this.skill(skill);
321
- }
322
- else {
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));
319
+ if ([...aprilShieldEffects.values()].includes(effect)) {
320
+ return this.skill(skill, { requireAprilShield: true });
328
321
  }
322
+ if (!gainEffect && skill !== $skill.none)
323
+ return this.skill(skill);
324
+ this.elements.push(new CustomMoodElement(effect, gainEffect));
329
325
  return this;
330
326
  }
331
327
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libram",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "JavaScript helper library for KoLmafia",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",