Basic rule of scripting:
The bigger the script, the higher the risk you fuck up somewhere and the longer it takes to fix it.
Seeing how this seems a TAD complex, how exactly does the wonder pot script handle the immunity before the elixir? I am tempted to add "more" wonder pots to the game, in different locations as rare encounter, eating different items with different rewards.
If you have played suikoden 5, like a map miniboss.