Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels) 2014
AI availability blocks -- questions and discussion
Moderator: CCGHQ Admins
AI availability blocks -- questions and discussion
by Splinterverse » 03 Feb 2017, 13:54
I want to have a deeper understanding of how the AI availability blocks work so that I might use them to their fullest capability.
I grepped all of the cards in the CW to see which AI Availability blocks are in use.
These are pretty clear -- you use them to represent other players' turns within which the AI can play the card:
There are others that appear to be similar, but have window_step instead of step and they have type="window". What is the difference?
There are some that appear to be used for the step regardless of whose turn it is:
There are some that appear to be used for the step regardless of whose turn it is, but these are window_step instead of step:
There appears to be one that is specific to "my turn" (AI's turn) but does not have window_step:
These are the "window" versions for "my turn":
These have window_in_combat="1" -- what does that signify beyond the normal tags?
This one has blocking_or_blocked="1" -- does this mean that it is only available if it is the declar_blockers step and the creature is blocking or blocked?
These have restriction in their tags. How do these work?
These have in_response but I'm confused by response_source and response_target (as well as in_response_dangerous) -- how do these work?
I grepped all of the cards in the CW to see which AI Availability blocks are in use.
These are pretty clear -- you use them to represent other players' turns within which the AI can play the card:
- <AI_AVAILABILITY step="begin_combat" turn="their_turn" />
<AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
<AI_AVAILABILITY step="end_of_turn" turn="their_turn" />
There are others that appear to be similar, but have window_step instead of step and they have type="window". What is the difference?
- <AI_AVAILABILITY window_step="upkeep" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="their_turn" />
<AI_AVAILABILITY window_step="main_1" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="their_turn" type="window" />
There are some that appear to be used for the step regardless of whose turn it is:
- <AI_AVAILABILITY step="declare_blockers" />
<AI_AVAILABILITY step="end_of_turn" />
There are some that appear to be used for the step regardless of whose turn it is, but these are window_step instead of step:
- <AI_AVAILABILITY window_step="untap" />
<AI_AVAILABILITY window_step="untap" type="window" />
<AI_AVAILABILITY window_step="upkeep" />
<AI_AVAILABILITY window_step="upkeep" type="window" />
<AI_AVAILABILITY window_step="main" type="window" />
<AI_AVAILABILITY window_step="main1" type="window" />
<AI_AVAILABILITY window_step="begin_combat" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" type="window" />
There appears to be one that is specific to "my turn" (AI's turn) but does not have window_step:
- <AI_AVAILABILITY step="main_1" turn="my_turn" />
These are the "window" versions for "my turn":
- <AI_AVAILABILITY window_step="upkeep" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" window_turn="my_turn" type="window" />
These have window_in_combat="1" -- what does that signify beyond the normal tags?
- <AI_AVAILABILITY window_step="declare_attackers" type="window" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="my_turn" type="window" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_blockers" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_blockers" window_in_combat="1" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" window_turn="my_turn" type="window" window_in_combat="1" />
This one has blocking_or_blocked="1" -- does this mean that it is only available if it is the declar_blockers step and the creature is blocking or blocked?
- <AI_AVAILABILITY step="declare_blockers" blocking_or_blocked="1" />
These have restriction in their tags. How do these work?
- <AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_FIRST_STRIKE" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_HASTE" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_HEXPROOF" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_INDEASTRUCTIBLE" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_TRAMPLE" />
<AI_AVAILABILITY type="restriction" restriction_type="equip" />
<AI_AVAILABILITY type="restriction" restriction_type="no_regeneration_shield" />
These have in_response but I'm confused by response_source and response_target (as well as in_response_dangerous) -- how do these work?
- <AI_AVAILABILITY type="in_response" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
<AI_AVAILABILITY type="in_response" response_target="1" />
<AI_AVAILABILITY type="in_response_dangerous" />
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 75 times
Re: AI availability blocks -- questions and discussion
by thefiremind » 03 Feb 2017, 23:42
You should look at the official cards just to be sure, but I think that either they are equivalent, or only window_step is right while the other one is a leftover from the older DotP syntax.Splinterverse wrote:There are others that appear to be similar, but have window_step instead of step and they have type="window". What is the difference?
I don't know what changes when including type="window" (if anything changes at all).
The AI should activate the ability only when the creature with that ability is in combat. At least that's what I would guess.Splinterverse wrote:These have window_in_combat="1" -- what does that signify beyond the normal tags?
I think so.Splinterverse wrote:This one has blocking_or_blocked="1" -- does this mean that it is only available if it is the declar_blockers step and the creature is blocking or blocked?
By looking at the regeneration one, I assume it means: don't use this ability if the target already has what the ability would grant. For the regeneration, it avoids regenerating again if the creature already has a "regeneration shield" on it.Splinterverse wrote:These have restriction in their tags. How do these work?
These always confuse me as well. I look at how the official cards use them, I collect my thoughts, then the next time I can't remember the conclusion I came up with. I'm about to collect my thoughts again, but be aware that nothing is for sure.Splinterverse wrote:These have in_response but I'm confused by response_source and response_target (as well as in_response_dangerous) -- how do these work?
- response_source probably means that the AI should activate the ability in response to something targeting the source of the ability (for example, you activate your Prodigal Sorcerer one last time before he dies for a Shock).
- response_target probably means that you should activate the ability or cast the spell targeting something that has just been targeted by something else (for example, you Giant Growth your creature so that the Shock doesn't kill it). If you notice, spells have response_target but I don't remember them ever having response_source, that's what makes me come to this conclusion.
- response_dangerous probably means that you should activate the ability in response to something that harms you or your permanents. It was largely used in DotP2013, I didn't even realize it was still used in DotP2014.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: AI availability blocks -- questions and discussion
by Splinterverse » 04 Feb 2017, 11:20
Thanks for the info, TFM. This is very helpful.
Some of these might not actually be correct tags. I grepped everything, so it's possible that some of them are incorrect. Probably before I use one that I think might be wrong, I'll grep to see how many files use it.
Some of these might not actually be correct tags. I grepped everything, so it's possible that some of them are incorrect. Probably before I use one that I think might be wrong, I'll grep to see how many files use it.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 75 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 28 guests