Hey Valmuadib, no need to feel stupid when it comes to this particular issue, that is for sure. Actions interrupting movement is one of the things I’ve personally struggled the most with when it comes to finding a clean and generic implementation. As you have noticed it is particularly problematic when it comes to a unit dying on its own turn, and particularly if that death also leads to game over. However, the last update was (among other things) an attempt to fix these issues, and you’ll find that there is both a spike trap and an Overwatch shot ability in the Maps - Experimental folder. These are exactly the two things you say you’re after, so check them out and see if they solve your problems.
Your code looks good from what I can tell, by the way. The issue does not lie in your specific code, but rather how unit death and Game Over is handled. If you’re using the very latest version I’m not sure why your solution does not work while mine does. I’ll have to check my code to figure that out, but I’m still on vacation away from home for another week.