I’m halfway through making a moster whose gimmick is teleporting randomly and frequently. I would want for this same ability to have a higher chance to trigger after the monster has taken damage.
Problem is that Im not entirely sure about the proper wat to do that.
I was thinking to add a new monster exclusive effect “efffect_monster_was_hit” and then make void monster::apply_damage() add the effect everytime a monster is damaged. Maybe limit the aplication of said effect if the monster has a certain flag.
Then make the monattack check if the monster has said effect and up the chances to teleport based on it.
Is this a decent way of implementing this behavior?