DGoldDragon28 / Unangband

A roguelike originally created (and developed until version 0.6.4c) by Andrew Doull.
https://dgolddragon28.github.io/Unangband/
GNU General Public License v2.0
59 stars 6 forks source link

Spell "Change into Cat" in the "Book of Illusions" is bugged #22

Closed aeoo closed 5 years ago

aeoo commented 7 years ago

This is how my starting point looks like after I used contrl-A, e to give myself 20k gold and 20k experience points and then dropped me a "Book of Illusions":

sorc1

Nothing strange here yet.

After 'G'aining the Change into Cat spell:

sorc2

Still OK.

Right after a successful cast:

sorc3

This is a 'C'haracter sheet right after that same cast:

sorc4

Already I see something weird here. In the STR field, 10 - 1 is indeed 9. But in the AGI field, 13+4 is not in fact 13. But the speed bonus of +2 is what it would be with AGI 17 I believe, so at least the speed appears to be correct.

Now I 'R'est with '&' and I see this:

sorc5

Max SP dropped down to 17!

This lower max SP is now also reflected in the 'C'haracter sheet:

sorc6

Nothing in my stats tells me why I should suddenly have lower SP, because my wisdom stat appears unchanged throughout this exercise.

And now let's go back to the original form:

sorc7

Uh oh... this bad SP max is stuck too? Is it permanent?

Turns out if I 'R'est like that with full 17/17 SP, it stays as 17, but if I cast a spell and then rest, it goes back to 26.

I'm seeing shades of #11 in this bug too. It appears to me that after spells or other effects are applied to the game, the game doesn't always properly immediately refresh how this info is presented to the player but this is corrected on a second turn (but not always, like with this SP case where I first had to cast a spell and then rest, or it would stay as 17 indefinitely).

DGoldDragon28 commented 5 years ago

For anyone still following this issue and #29, I have now identified the issues, which were twofold:

1) The SP display issue was a result of changing shape not forcing a recalculation of HP and SP. The max SP of a caster in a form other than their own is reduced by 33%, but this did not get applied until something else forced a recalculation of SP. Likewise, on changing back, you go back to your original SP maximum, but this is not applied until a recalculation is triggered. This will be fixed.

2) The total AGI not being shown properly was actually an unrelated bug where AGI, due to sloppy code, did not benefit from shape or equipment bonuses. This will also be fixed.