There are a lot of assumptions here that aren’t accurate but I’ll try to answer.
In my implementation, Dodge is triggered on your turn and the flag doesn’t get cleared until the start of your next turn. It reduces your chance to be hit as well as your chance to hit. You can make the AI strategy as complex or simple as you like. Fairly simple in this implementation,
if you have the dodge condition already or if there are no enemies in range, value is 0.
If you don’t have the condition and there are enemies in range the max value is multiplied by the ratio of enemies to friendlies.
When the AI chooses a target, it considers the value of both its chance to hit (I’ll implement ranges later), if the target is wounded.
Balance is an ongoing issue in any game.
1 dodge per turn, it lasts until your next turn. In my implementation I don’t use the blocking BUSY box, I have logic on the button to enable or disable it based on some conditions, in the case of Dodge it’s unavailable if you’ve dodged already.
Grenades don’t involve a to hit roll. (Again, I have that in my implementation, it’s not in the course)
Units can only dodge if they aren’t currently dodging.
There are a few questions assuming the AI ignores things, this just isn’t true. Ultimately, if things are too deterministic, I may add a weighted choice option for top actions if they are within a particular range. Stubbing out actions there are basically Spend and Use actions, and Use Once actions. Dodge is just stubbing out a Use Once action. If I polish this to actual game I’d probably implement cover instead, and add an Evade flag on a double move. For now though, Dodge puts in the mechanic I want to develop (modifications on the to hit chance and AI values for defense).
Again, the invincibility-invisibility-AI-ignores-them assumption isn’t applicable.
In terms of my own implementation, I just made an enum for conditions and stuck it in an array on the HealthSystem. I may expand that later to include timed conditions instead of simple set/clear conditions but it’s fine for now. The Dodge action sets the condition on the units health system, and adds a listener to clear it to the Turn System.
Hope that answers your questions.