Page 1 of 1

canPlayAI

PostPosted: 12 Dec 2010, 17:00
by Sloth
I noticed that the AI cast Tivadar of Thorn even though it already had one in play. I looked into etbDestroyTgt and found that canPlayAI() sometimes returns true without checking super.canPlayAI(). So I replaced "return true" with "return super.canPlayAI()" and the AI won't cast a second Tivadar of Thorn any more.

I don't know so much about this part of the code. So if someone thinks this is a bad idea please help. If not, should I try to find other instances of canPlayAI() not checking super.canPlayAI() and do the same?

Re: canPlayAI

PostPosted: 12 Dec 2010, 20:44
by Rob Cashwalker
I'd say put a check near the beginning of canPlayAI, which just checks if super.canPlayAI is False, if it is, return False, but otherwise, let the ability AI do its thing.

Re: canPlayAI

PostPosted: 12 Dec 2010, 20:49
by Sloth
Rob Cashwalker wrote:I'd say put a check near the beginning of canPlayAI, which just checks if super.canPlayAI is False, if it is, return False, but otherwise, let the ability AI do its thing.
The result is the same, for more complicated canPlayAI() functions I did just that. I don't know if super.canPlayAI takes more into consideration, but at least fighting against Leyline of Singularity .deck is now possible.