AI Combat and Finest Hour
I have a local implementation of Finest Hour that seems to get the rules right, as far as I understand them. Before I check it in I'd like to make it so that playing Finest Hour isn't an automatic "I win" for the human player. However, to do that, I'll need to add some specific logic for Exalted, and it may be too specific. Since I haven't written logic for the AI before, I thought I'd post what I was thinking here for comment.
Currently, in ComputerUtil_Attack2, the AI has logic to keep back enough blockers so that it won't die if the human attacks. This logic ignores Exalted, so I'd add an additional check for the edge case when the AI is keeping back zero blockers and there are any Exalted creatures in play. If Finest Hour is in play, I'd make the computer consider keeping an additional blocker because the original attacker will untap and almost surely attack again (with twice the Exalted bonus...). I don't think multiple Finest Hours should change the logic because only the original attacker gets untapped (we could add an additional check for vigilance, but that definitely seems too specific).
What do you think? Is there a better way? Is this logic worth having at all?
I'm happy to post the code if it helps. I have to figure out how to fix Knotvine Paladin and other creatures that are supposed to get bonuses "whenever they attack", so there's no rush here.
Currently, in ComputerUtil_Attack2, the AI has logic to keep back enough blockers so that it won't die if the human attacks. This logic ignores Exalted, so I'd add an additional check for the edge case when the AI is keeping back zero blockers and there are any Exalted creatures in play. If Finest Hour is in play, I'd make the computer consider keeping an additional blocker because the original attacker will untap and almost surely attack again (with twice the Exalted bonus...). I don't think multiple Finest Hours should change the logic because only the original attacker gets untapped (we could add an additional check for vigilance, but that definitely seems too specific).
What do you think? Is there a better way? Is this logic worth having at all?
I'm happy to post the code if it helps. I have to figure out how to fix Knotvine Paladin and other creatures that are supposed to get bonuses "whenever they attack", so there's no rush here.