CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.32k stars 4.14k forks source link

Stat boosting spells not swapping on cast #48841

Open LetterShapedGlyphs opened 3 years ago

LetterShapedGlyphs commented 3 years ago

Describe the bug

Unless I'm misreading it horribly, the JSON for the various stat boosting spell's effects indicates that they're supposed to remove any other stat boosting spell when cast. (That's not indicated anywhere in the spell-text but that's a separate issue). However, I am entirely unable to switch to a different stat boost without waiting for the first to wear off.

Steps To Reproduce

  1. Learn the spells for Fox's Cunning and Ogre's Strength
  2. Cast Fox's Cunning on yourself.
  3. Wait a turn because sometimes the stat change isn't reflected immediately.
  4. Notice your Intelligence has gone up
  5. Try casting Ogre's Strength
  6. Wait a few more turns.
  7. Notice that your Intelligence is still boosted and your Strength remains the same.

Expected behavior

Casting two different stat boosting spells should either apply both stat boosts, or replace the previous stat boost.

Versions and configuration

Additional context

A very cursory read through of the JSON makes me think that there's something wonky going on with non-equipped magical effects being applied because the effect data seems to indicate it SHOULD remove any other effects, but I haven't looked at the relevant code yet.

hexagonrecursion commented 3 years ago

confirmed

https://github.com/CleverRaven/Cataclysm-DDA/blob/2e8fe64358deea41e3e6c193b713bdb7c1fb626d/data/mods/Magiclysm/effects/effects.json#L173-L183

GuardianDll commented 1 year ago

removes_effects also prevent the effect from implying, and there is nothing we can do with it