Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk
Cryptic Command
Moderator: CCGHQ Admins
5 posts
• Page 1 of 1
Cryptic Command
by BlindWillow » 01 Sep 2012, 04:22
I just thought I would post what I came up with for Cryptic Command to see if anyone has any comments on possible problems with it or ways to improve it. It works well enough for me. It's a little cumbersome to "choose" linearly, but it gets the job done, and I think follows the rules, since there is never going to be a time when you can't cast it for lack of targets, as the final two options are not targeted.
Here's the code:
Here's the code:
- Code: Select all
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose two — Counter target spell; or return target permanent to its owner’s hand; or tap all creatures your opponents control; or draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli due — Neutralizza una magia bersaglio; oppure fai tornare un permanente bersaglio in mano al suo proprietario; oppure TAPpa tutte le creature controllate dai tuoi avversari; oppure pesca una carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bestimme zwei — Neutralisiere einen Zauberspruch deiner Wahl; oder bringe eine bleibende Karte deiner Wahl auf die Hand ihres Besitzers zurück; oder tappe alle Kreaturen, die deine Gegner kontrollieren; oder ziehe eine Karte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez deux — Contrecarrez le sort ciblé ; ou renvoyez le permanent ciblé dans la main de son propriétaire ; ou engagez toutes les créatures que vos adversaires contrôlent ; ou piochez une carte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elige dos: Contrarresta el hechizo objetivo; o regresa el permanente objetivo a la mano de su propietario; o gira todas las criaturas que controlan tus oponentes; o roba una carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[以下の4つから2つを選ぶ。「呪文1つを対象とし、それを打ち消す。」「パーマネント1つを対象とし、それをオーナーの手札に戻す。」「あなたの対戦相手がコントロールするすべてのクリーチャーをタップする。」「カードを1枚引く。」]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Choose two — Counter target spell; or return target permanent to its owner’s hand; or tap all creatures your opponents control; or draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите два — Отмените целевое заклинание; или верните целевой перманент в руку его владельца; или поверните все существа под контролем вашего оппонента; или возьмите карту.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha dois — Anule a mágica alvo; ou devolva a permanente alvo para a mão de seu dono; ou vire todas as criaturas que seus oponentes controlam; ou compre um card.]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION ignore_filter="1">
EffectDC():Float_Set(0, 0)
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_STACK )
filter:SetStackObjectType( STACK_OBJECT_CARD )
filter:SetCardInstance( Object() )
filter:AddExtra( FILTER_EXTRA_FLIP_CARD_INSTANCE )
if filter:CountStopAt(1) ~= 0 then
filter:Clear()
filter:May()
filter:SetZone( ZONE_STACK )
filter:SetStackObjectType( STACK_OBJECT_CARD )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
EffectController():ChooseTarget( NO_VALIDATION, "1138_QUERY_CRYPTIC_COUNTER", EffectDC():Make_Targets(0) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local target = targetDC:Get_CardPtr(0)
if target ~= nil then
target:CounterSpell()
EffectDC():Float_Inc(0)
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_IN_PLAY )
if filter:CountStopAt(1) ~= 0 then
filter:Clear()
filter:May()
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
EffectController():ChooseTarget( NO_VALIDATION, "1138_QUERY_CRYPTIC_RETURN", EffectDC():Make_Targets(1) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local targetDC = EffectDC():Get_Targets(1)
if targetDC ~= nil then
local target = targetDC:Get_CardPtr(0)
if target ~= nil then
target:PutInHand()
EffectDC():Float_Inc(0)
end
end
</RESOLUTION_TIME_ACTION>
<FILTER>
return (FilteredCard() ~= nil and
FilteredCard():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
FilteredCard():GetZone() == ZONE_IN_PLAY and
FilteredCard():GetController():GetTeam() ~= EffectController():GetTeam())
</FILTER>
<RESOLUTION_TIME_ACTION ignore_filter="1">
if EffectDC():Float_Get(0) == 1 then
EffectController():BeginNewMultipleChoice()
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )
EffectController():AskMultipleChoiceQuestion( "1138_QUERY_CRYPTIC_TAP")
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectDC():Float_Get(0) == 0 then
if FilteredCard() ~= nil then
FilteredCard():Tap()
end
elseif EffectDC():Float_Get(0) == 1 then
local decision = Object():GetMultipleChoiceResult()
if decision == 0 then
if FilteredCard() ~= nil then
FilteredCard():Tap()
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
if EffectDC():Float_Get(0) == 0 then
EffectController():DrawCard()
elseif Object():GetMultipleChoiceResult() == 1 then
EffectController():DrawCard()
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
- BlindWillow
- Posts: 213
- Joined: 19 Jul 2012, 00:26
- Has thanked: 11 times
- Been thanked: 46 times
Re: Cryptic Command
by --Dream-- » 06 Sep 2012, 11:16
Could you please post the full card xml and the query strings? I was coding this one in a different way and I would like to test your solution 
Re: Cryptic Command
by BlindWillow » 07 Sep 2012, 04:16
Here's the full code:
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="CRYPTIC_COMMAND_38141819" />
<CARDNAME text="CRYPTIC_COMMAND" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cryptic Command]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ordine Criptico]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Kryptischer Befehl]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Commandement cryptique]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Dictado críptico]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[謎めいた命令]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Cryptic Command]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Тайная Команда]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Comando Críptico]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="38141819" />
<ARTID value="38141819" />
<ARTIST name="Wayne England" />
<CASTING_COST cost="{1}{U}{U}{U}" />
<TYPE metaname="Instant" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose two — Counter target spell; or return target permanent to its owner’s hand; or tap all creatures your opponents control; or draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli due — Neutralizza una magia bersaglio; oppure fai tornare un permanente bersaglio in mano al suo proprietario; oppure TAPpa tutte le creature controllate dai tuoi avversari; oppure pesca una carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bestimme zwei — Neutralisiere einen Zauberspruch deiner Wahl; oder bringe eine bleibende Karte deiner Wahl auf die Hand ihres Besitzers zurück; oder tappe alle Kreaturen, die deine Gegner kontrollieren; oder ziehe eine Karte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez deux — Contrecarrez le sort ciblé ; ou renvoyez le permanent ciblé dans la main de son propriétaire ; ou engagez toutes les créatures que vos adversaires contrôlent ; ou piochez une carte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elige dos: Contrarresta el hechizo objetivo; o regresa el permanente objetivo a la mano de su propietario; o gira todas las criaturas que controlan tus oponentes; o roba una carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[以下の4つから2つを選ぶ。「呪文1つを対象とし、それを打ち消す。」「パーマネント1つを対象とし、それをオーナーの手札に戻す。」「あなたの対戦相手がコントロールするすべてのクリーチャーをタップする。」「カードを1枚引く。」]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Choose two — Counter target spell; or return target permanent to its owner’s hand; or tap all creatures your opponents control; or draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите два — Отмените целевое заклинание; или верните целевой перманент в руку его владельца; или поверните все существа под контролем вашего оппонента; или возьмите карту.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha dois — Anule a mágica alvo; ou devolva a permanente alvo para a mão de seu dono; ou vire todas as criaturas que seus oponentes controlam; ou compre um card.]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION ignore_filter="1">
EffectDC():Float_Set(0, 0)
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_STACK )
filter:SetStackObjectType( STACK_OBJECT_CARD )
filter:SetCardInstance( Object() )
filter:AddExtra( FILTER_EXTRA_FLIP_CARD_INSTANCE )
if filter:CountStopAt(1) ~= 0 then
filter:Clear()
filter:May()
filter:SetZone( ZONE_STACK )
filter:SetStackObjectType( STACK_OBJECT_CARD )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
EffectController():ChooseTarget( NO_VALIDATION, "1138_QUERY_CRYPTIC_COUNTER", EffectDC():Make_Targets(0) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local target = targetDC:Get_CardPtr(0)
if target ~= nil then
target:CounterSpell()
EffectDC():Float_Inc(0)
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_IN_PLAY )
if filter:CountStopAt(1) ~= 0 then
filter:Clear()
filter:May()
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
EffectController():ChooseTarget( NO_VALIDATION, "1138_QUERY_CRYPTIC_RETURN", EffectDC():Make_Targets(1) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local targetDC = EffectDC():Get_Targets(1)
if targetDC ~= nil then
local target = targetDC:Get_CardPtr(0)
if target ~= nil then
target:PutInHand()
EffectDC():Float_Inc(0)
end
end
</RESOLUTION_TIME_ACTION>
<FILTER>
return (FilteredCard() ~= nil and
FilteredCard():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
FilteredCard():GetZone() == ZONE_IN_PLAY and
FilteredCard():GetController():GetTeam() ~= EffectController():GetTeam())
</FILTER>
<RESOLUTION_TIME_ACTION ignore_filter="1">
if EffectDC():Float_Get(0) == 1 then
EffectController():BeginNewMultipleChoice()
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )
EffectController():AskMultipleChoiceQuestion( "1138_QUERY_CRYPTIC_TAP")
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectDC():Float_Get(0) == 0 then
if FilteredCard() ~= nil then
FilteredCard():Tap()
end
elseif EffectDC():Float_Get(0) == 1 then
local decision = Object():GetMultipleChoiceResult()
if decision == 0 then
if FilteredCard() ~= nil then
FilteredCard():Tap()
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
if EffectDC():Float_Get(0) == 0 then
EffectController():DrawCard()
elseif Object():GetMultipleChoiceResult() == 1 then
EffectController():DrawCard()
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<AI_BASE_SCORE score="1250" zone="ZONE_HAND" />
</CARD_V2>
- BlindWillow
- Posts: 213
- Joined: 19 Jul 2012, 00:26
- Has thanked: 11 times
- Been thanked: 46 times
Re: Cryptic Command
by BlindWillow » 07 Sep 2012, 04:19
And here're the query strings:
- Code: Select all
<Row>
<Cell><Data ss:Type="String">1138_QUERY_CRYPTIC_COUNTER</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">Choose a spell to counter. (Click Finish to skip to the next option.)</Data></Cell>
<Cell><Data ss:Type="String">Choisissez un sort à contrecarrer. (Sur Finir pour sauter à l’option suivante.)</Data></Cell>
<Cell><Data ss:Type="String">Elige un hechizo para contrarrestar. (Haz clic en Finalizar para saltar a la siguiente opción.)</Data></Cell>
<Cell><Data ss:Type="String">Bestimme einen Zauberspruch zum Neutralisieren. (Klicke auf „Beenden“ zur folgenden Wahl zu hüpfen.)</Data></Cell>
<Cell><Data ss:Type="String">Scegli una magia da neutralizzare. (Clicca su Fine per saltellare alla prossima scelta.)</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">打ち消す呪文を選択。 (次の選択にスキップするために「完了」をクリック。)</Data></Cell>
<Cell><Data ss:Type="String">Choose a spell to counter. (Click Finish to skip to the next option.)</Data></Cell>
<Cell><Data ss:Type="String">Выберите заклинание для отмены. (Hажмите "Закончить", перескакивать к следующему выбору.)</Data></Cell>
<Cell><Data ss:Type="String">Escolha uma mágica para anular. (Clique em Terminar para saltar à próxima opção.)</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">1138_QUERY_CRYPTIC_RETURN</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">Choose a permanent to put into it’s owner’s hand. (Click Finish to skip to the next option.)</Data></Cell>
<Cell><Data ss:Type="String">Choisissez un permanent pour le mettre dans la main de son propriétaire. (Sur Finir pour sauter à l’option suivante.)</Data></Cell>
<Cell><Data ss:Type="String">Elige un permanente para poner en la mano de su propietario. (Haz clic en Finalizar para saltar a la siguiente opción.)</Data></Cell>
<Cell><Data ss:Type="String">Bestimme eine bleibende Karte, die auf die Hand ihres Besitzers gebracht werden soll. (Klicke auf „Beenden“ zur folgenden Wahl zu hüpfen.)</Data></Cell>
<Cell><Data ss:Type="String">Scegli un permanente da mettere in mano al suo proprietario. (Clicca su Fine per saltellare alla prossima scelta.)</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">オーナーの手札に戻すパーマネントを選択。 (次の選択にスキップするために「完了」をクリック。)</Data></Cell>
<Cell><Data ss:Type="String">Choose a permanent to put into it’s owner’s hand. (Click Finish to skip to the next option.)</Data></Cell>
<Cell><Data ss:Type="String">Выберите перманент, который нужно положить в руку его владельца. (Hажмите "Закончить", перескакивать к следующему выбору.)</Data></Cell>
<Cell><Data ss:Type="String">Escolha uma permanente para colocar na mão de seu dono. (Clique em Terminar para saltar à próxima opção.)</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">1138_QUERY_CRYPTIC_TAP</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">Do you want to tap all creatures your opponents control?</Data></Cell>
<Cell><Data ss:Type="String">Voulez-vous engager toutes les créatures que vos adversaires contrôlent ?</Data></Cell>
<Cell><Data ss:Type="String">¿Quieres girar todas las criaturas que controlan tus oponentes?</Data></Cell>
<Cell><Data ss:Type="String">Möchtest du tappen alle Kreaturen, die deine Gegner kontrollieren?</Data></Cell>
<Cell><Data ss:Type="String">Vuoi TAPpare tutte le creature controllate dai tuoi avversari?</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">あなたの対戦相手がコントロールするすべてのクリーチャーをタップするますか?</Data></Cell>
<Cell><Data ss:Type="String">Do you want to tap all creatures your opponents control?</Data></Cell>
<Cell><Data ss:Type="String">Вы хотите повернуть все существа под контролем вашего оппонента?</Data></Cell>
<Cell><Data ss:Type="String">Deseja virar todas as criaturas que seus oponentes controlam?</Data></Cell>
</Row>
- BlindWillow
- Posts: 213
- Joined: 19 Jul 2012, 00:26
- Has thanked: 11 times
- Been thanked: 46 times
Re: Cryptic Command
by BlindWillow » 11 Sep 2012, 18:10
I noticed that the code was still tapping opponents' creatures if you chose both of the first two options. Still not sure why, but adding an additional integer flag after asking the multiple choice question appears to have fixed that. Plus, the original problem I was having with Set_Int and Int_Inc seems to have been resolved somewhere along the way. So, I have reverted to using those instead of Float_Set and Float_Inc. Here's the latest code:
- Code: Select all
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Choose two — Counter target spell; or return target permanent to its owner’s hand; or tap all creatures your opponents control; or draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Scegli due — Neutralizza una magia bersaglio; oppure fai tornare un permanente bersaglio in mano al suo proprietario; oppure TAPpa tutte le creature controllate dai tuoi avversari; oppure pesca una carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bestimme zwei — Neutralisiere einen Zauberspruch deiner Wahl; oder bringe eine bleibende Karte deiner Wahl auf die Hand ihres Besitzers zurück; oder tappe alle Kreaturen, die deine Gegner kontrollieren; oder ziehe eine Karte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Choisissez deux — Contrecarrez le sort ciblé ; ou renvoyez le permanent ciblé dans la main de son propriétaire ; ou engagez toutes les créatures que vos adversaires contrôlent ; ou piochez une carte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Elige dos: Contrarresta el hechizo objetivo; o regresa el permanente objetivo a la mano de su propietario; o gira todas las criaturas que controlan tus oponentes; o roba una carta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[以下の4つから2つを選ぶ。「呪文1つを対象とし、それを打ち消す。」「パーマネント1つを対象とし、それをオーナーの手札に戻す。」「あなたの対戦相手がコントロールするすべてのクリーチャーをタップする。」「カードを1枚引く。」]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Choose two — Counter target spell; or return target permanent to its owner’s hand; or tap all creatures your opponents control; or draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Выберите два — Отмените целевое заклинание; или верните целевой перманент в руку его владельца; или поверните все существа под контролем вашего оппонента; или возьмите карту.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Escolha dois — Anule a mágica alvo; ou devolva a permanente alvo para a mão de seu dono; ou vire todas as criaturas que seus oponentes controlam; ou compre um card.]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION ignore_filter="1">
EffectDC():Set_Int(0, 0)
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_STACK )
filter:SetStackObjectType( STACK_OBJECT_CARD )
filter:SetCardInstance( Object() )
filter:AddExtra( FILTER_EXTRA_FLIP_CARD_INSTANCE )
if filter:CountStopAt(1) ~= 0 then
filter:Clear()
filter:May()
filter:SetZone( ZONE_STACK )
filter:SetStackObjectType( STACK_OBJECT_CARD )
filter:SetHint( HINT_ENEMY_ONLY, EffectController() )
EffectController():ChooseTarget( NO_VALIDATION, "1138_QUERY_CRYPTIC_COUNTER", EffectDC():Make_Targets(0) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local target = targetDC:Get_CardPtr(0)
if target ~= nil then
target:CounterSpell()
EffectDC():Int_Inc(0)
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local filter = Object():GetFilter()
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_IN_PLAY )
if filter:CountStopAt(1) ~= 0 then
filter:Clear()
filter:May()
filter:SetZone( ZONE_IN_PLAY )
filter:SetHint( HINT_ENEMY, EffectController() )
EffectController():ChooseTarget( NO_VALIDATION, "1138_QUERY_CRYPTIC_RETURN", EffectDC():Make_Targets(1) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
local targetDC = EffectDC():Get_Targets(1)
if targetDC ~= nil then
local target = targetDC:Get_CardPtr(0)
if target ~= nil then
target:PutInHand()
EffectDC():Int_Inc(0)
end
end
</RESOLUTION_TIME_ACTION>
<FILTER>
return (FilteredCard() ~= nil and
FilteredCard():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
FilteredCard():GetZone() == ZONE_IN_PLAY and
FilteredCard():GetController():GetTeam() ~= EffectController():GetTeam())
</FILTER>
<RESOLUTION_TIME_ACTION ignore_filter="1">
if EffectDC():Get_Int(0) == 1 then
EffectController():BeginNewMultipleChoice()
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )
EffectController():AskMultipleChoiceQuestion( "1138_QUERY_CRYPTIC_TAP")
EffectDC():Set_Int(1, 1)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectDC():Get_Int(0) == 0 then
if FilteredCard() ~= nil then
FilteredCard():Tap()
end
elseif ( EffectDC():Get_Int(1) == 1 and EffectDC():Get_Int(0) == 1 ) then
local decision = Object():GetMultipleChoiceResult()
if decision == 0 then
if FilteredCard() ~= nil then
FilteredCard():Tap()
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION ignore_filter="1">
if EffectDC():Get_Int(0) == 0 then
EffectController():DrawCard()
elseif Object():GetMultipleChoiceResult() == 1 then
EffectController():DrawCard()
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
- BlindWillow
- Posts: 213
- Joined: 19 Jul 2012, 00:26
- Has thanked: 11 times
- Been thanked: 46 times
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests