I figure out that the code for wizard works as a last player added code.
So example if u enable and add characters from the tavern the last character added will have 999/current HP.
So just go on missing by yourself and you will have 999/xxx
That is how i was able to defeat legendary dragon.