Page 1 of 1

Conditional AI Availability

PostPosted: 13 Nov 2014, 20:47
by Xander9009
Is there a way to use AI Availability tags only if a condition is met? For Teferi, Temporal Archmage we need to add the AI availability tags to the abilities if his ultimate has been activated. Only, I don't know of a way to conditionalize them.

Re: Conditional AI Availability

PostPosted: 13 Nov 2014, 20:58
by NeoAnderson
Xander9009 wrote:Is there a way to use AI Availability tags only if a condition is met? For Teferi, Temporal Archmage we need to add the AI availability tags to the abilities if his ultimate has been activated. Only, I don't know of a way to conditionalize them.
I think You can use Ai AVAILABILITY block as other blocks, set a variable to 1 when the ability is activated, reset it to 0 when the turn end. Inside the block you check the value and return true when the variable is 1.

Re: Conditional AI Availability

PostPosted: 13 Nov 2014, 23:07
by thefiremind
They are implicitly conditional already: if the AI can't follow some of the availability "advices", it will just ignore them. So I would add them without worrying about it. :)

NeoAnderson wrote:I think You can use Ai AVAILABILITY block as other blocks, set a variable to 1 when the ability is activated, reset it to 0 when the turn end. Inside the block you check the value and return true when the variable is 1.
This should need tests, I'm not sure if you can use AI_AVAILABILITY the same way as AI_CUSTOM_SCORE... if I were to guess, I'd guess not, but I can't be sure.

Re: Conditional AI Availability

PostPosted: 13 Nov 2014, 23:35
by Xander9009
I put it together and gave it to fallenangel to try out. So I'm just waiting to see if it worked. However, if it'll just ignore them, then I'll just add them and let the AI ignore them.

Re: Conditional AI Availability

PostPosted: 14 Nov 2014, 14:24
by NeoAnderson
thefiremind wrote:They are implicitly conditional already: if the AI can't follow some of the availability "advices", it will just ignore them. So I would add them without worrying about it. :)

NeoAnderson wrote:I think You can use Ai AVAILABILITY block as other blocks, set a variable to 1 when the ability is activated, reset it to 0 when the turn end. Inside the block you check the value and return true when the variable is 1.
This should need tests, I'm not sure if you can use AI_AVAILABILITY the same way as AI_CUSTOM_SCORE... if I were to guess, I'd guess not, but I can't be sure.
I also haven't test but what about to use normal <AVAILABILITY> block and inside this block check if the player IsAI() condition??