Page 1 of 1

AI anticipating regeneration and damage prevention abilities

PostPosted: 22 May 2011, 16:33
by Sloth
I want to build in some code for the combat AI to anticipate regeneration and damage prevention abilities. I will check all cards on the human battlefield for activated regeneration and damage prevention abilities and if they can target the human attacking or blocking creature. So far so good.

Question: Is there a way to check whether the human has the ressources to activate an ability or not? (I know I should check canPay and canPayAdditionalCosts, but what about mana costs?).

Re: AI anticipating regeneration and damage prevention abili

PostPosted: 22 May 2011, 17:04
by friarsol
Sloth wrote:I want to build in some code for the combat AI to anticipate regeneration and damage prevention abilities. I will check all cards on the human battlefield for activated regeneration and damage prevention abilities and if they can target the human attacking or blocking creature. So far so good.

Question: Is there a way to check whether the human has the ressources to activate an ability or not? (I know I should check canPay and canPayAdditionalCosts, but what about mana costs?).
I don't think this exists yet, although it could be extremely useful for AIs considerations all over the place, along with adding some UI improvements for the player (Highlighting certain cards that the human can afford)

Re: AI anticipating regeneration and damage prevention abili

PostPosted: 22 May 2011, 17:24
by Sloth
So this will be a mid time project.