I have something working at the moment so I won't complain, we can leave it later
Critical issue: Interaction between !!EA (use on negative stack id) and Battle Replay
This is a critical issue in scripting that if a stack is set with !!EA and kill and transform into another stack, its stats will remain the ones after its transformation after battle replay.
Ok I understand this doesn't sound understandable. Let me show you my testing script:
And my testing video
In this video, I used raw ERA + GEM (for battle replay) + my testing script (see above). I picked a random fight and ran my script.
As you can see in the video,
- The gnoll had a standard HP stats initially
- It got killed with script, with (MON_FLAG_SUMMONED) added
- An Azure Dragon was summoned, due to the vacancy left by the Gnoll, it occupied the killed Gnoll's stack Id
- Set any !!EA on the summoned Azure Dragon
- Killed the Azure and Summoned again (optional)
- Ended the battle and replayed
- Found the Gnolls had 1000 HP
My guess is that !!EA for stack id has some cache that needs to be reset on Battle Replay. However, I don't know where to find them. I don't know how to fix.
Currently, the mechanism corrupts "Metamorph" script's behaviour.