Ah, indeed. I believe that damage formula needs to return a number.
so
a.addState(1); b.mhp/2
should be the correct formula, right?
Edit: just tested this. Our monster sucessfully do self destruct. But it doesn't show collapse animation.
Suggestion: maybe you'll need a plugin XD