Kieran wrote:I can't seem to get
Counterbore to work properly. Will someone take a look @ this code and let me know what's wrong?
After you counter the spell, it goes to the graveyard (or anywhere else, according to what card you used, but surely it doesn't stay on the stack), so the target pointer gets lost. You need to protect it before countering.
- Code: Select all
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
EffectDC():Get_Targets(0):Protect_CardPtr(0)
target:CounterSpell()
end
</RESOLUTION_TIME_ACTION>
-------------------------
And here's
Guided Passage. No illustration because I couldn't find a satisfying one (the art on MagicVille is too green if you compare it to the real card).
- Guided Passage (untested) | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="GUIDED_PASSAGE_27169" />
<CARDNAME text="GUIDED_PASSAGE" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Guided Passage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Passage guidé]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Guided Passage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gesicherter Durchgang]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Passaggio Guidato]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Guided Passage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Guided Passage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Guided Passage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Passagem Dirigida]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="27169" />
<ARTID value="27169" />
<ARTIST name="Alex Horley-Orlandelli" />
<CASTING_COST cost="{U}{R}{G}" />
<TYPE metaname="Sorcery" />
<EXPANSION value="AP" />
<RARITY metaname="R" />
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Révélez les cartes de votre bibliothèque. Un adversaire choisit parmi elles une carte de créature, une carte de terrain et une carte non-créature et non-terrain. Vous mettez les cartes choisies dans votre main. Mélangez ensuite votre bibliothèque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Decke alle Karten deiner Bibliothek auf. Ein Gegner bestimmt aus diesen Karten eine Kreaturenkarte, ein Land und eine Karte, die weder ein Land noch eine Kreatur ist. Du nimmst diese Karten auf deine Hand. Mische danach deine Bibliothek.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rivela le carte del tuo grimorio. Un avversario sceglie da esse una carta creatura, una carta terra e una carta che non sia una creatura né una terra. Aggiungi alla tua mano le carte scelte. Poi rimescola il tuo grimorio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Reveal the cards in your library. An opponent chooses from among them a creature card, a land card, and a noncreature, nonland card. You put the chosen cards into your hand. Then shuffle your library.]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION>
local card = EffectController():Library_GetTop()
local index = 0
while card ~= nil do
card:Reveal()
index = index + 1
card = EffectController():Library_GetNth(i)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:SetFilterType(FILTER_TYPE_PLAYERS)
filter:Add( FE_TEAM, OP_NOT, EffectController():GetTeam() )
EffectController():ChooseItem( "CARD_QUERY_CHOOSE_OPPONENT", EffectDC():Make_Targets(0) )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if player ~= nil then
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
filter:SetZone( ZONE_LIBRARY, EffectController() )
player:ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_TO_PUT_INTO_HAND", EffectDC():Make_Targets(1) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if player ~= nil then
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)
local creature = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(0)
if creature ~= nil then
filter:Add(FE_CARD_INSTANCE, OP_NOT, creature)
end
filter:SetZone( ZONE_LIBRARY, EffectController() )
player:ChooseItem( "CARD_QUERY_CHOOSE_LAND_TO_PUT_INTO_HAND", EffectDC():Make_Targets(2) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if player ~= nil then
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_NOT, CARD_TYPE_CREATURE)
filter:Add(FE_TYPE, OP_NOT, CARD_TYPE_LAND)
filter:SetZone( ZONE_LIBRARY, EffectController() )
player:ChooseItem( "CARD_QUERY_CHOOSE_CARD_TO_PUT_INTO_HAND", EffectDC():Make_Targets(3) )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
for i=1,3 do
local card = EffectDC():Get_Targets(i) and EffectDC():Get_Targets(i):Get_CardPtr(0)
if card ~= nil then
card:Reveal()
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
for i=1,3 do
local card = EffectDC():Get_Targets(i) and EffectDC():Get_Targets(i):Get_CardPtr(0)
if card ~= nil then
card:PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
EffectController():ShuffleLibrary()
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<AI_BASE_SCORE score="1200" zone="ZONE_HAND" />
</CARD_V2>
I'm not sure if the chosen cards need to be revealed, but I did it. I guess if you play this card in real Magic, you put your whole library on the table and all players watch while the chosen opponent selects the cards.