Help with Stitcher Geralf

by volrathxp
Having some issues with Geralf. Am I on the right track here, or is there a better way to do this?
- Stitcher Geralf | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="STITCHER_GERALF_1000389694" />
<CARDNAME text="STITCHER_GERALF" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Stitcher Geralf]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Geralf, raccommodeur]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Suturador Geralf]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Geralf der Leichenflicker]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Cucitore Geralf]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[縫い師、ゲラルフ]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Stitcher Geralf]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Stitcher Geralf]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Stitcher Geralf]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="1000389694" />
<ARTID value="1000389694" />
<ARTIST name="Karla Ortiz" />
<CASTING_COST cost="{3}{U}{U}" />
<SUPERTYPE metaname="Legendary" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Wizard" />
<EXPANSION value="C14" />
<RARITY metaname="M" />
<POWER value="3" />
<TOUGHNESS value="4" />
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{2}{U}, {T}: Each player puts the top three cards of his or her library into his or her graveyard. Exile up to two creature cards put into graveyards this way. Put an X/X blue Zombie creature token onto the battlefield, where X is the total power of the cards exiled this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{2}{U}, {T} : Chaque joueur met les trois cartes du dessus de sa bibliothèque dans son cimetière. Exilez jusqu’à deux cartes de créature mises dans des cimetières de cette manière. Mettez sur le champ de bataille un jeton de créature X/X bleue Zombie, X étant la force totale des cartes exilées de cette manière.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{2}{U}, {T}: Cada jugador pone las tres primeras cartas de su biblioteca en su cementerio. Exilia hasta dos cartas de criatura puestas en los cementerios de esta manera. Pon en el campo de batalla una ficha de criatura Zombie azul X/X, donde X es igual a la fuerza total de las cartas exiliadas de esta manera.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{2}{U}, {T}: Jeder Spieler legt die obersten drei Karten seiner Bibliothek auf seinen Friedhof. Schicke bis zu zwei Kreaturenkarten, die auf diese Weise auf den Friedhof gelegt wurden, ins Exil. Bringe einen X/X blauen Zombie-Kreaturenspielstein ins Spiel, wobei X der Gesamtstärke der Karten entspricht, die auf diese Weise ins Exil geschickt wurden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{2}{U}, {T}: Ogni giocatore mette nel proprio cimitero le prime tre carte del proprio grimorio. Esilia fino a due carte creatura messe nei cimiteri in questo modo. Metti sul campo di battaglia una pedina creatura Zombie X/X blu, dove X è la forza totale delle carte esiliate in questo modo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{2}{U}, {T}:各プレイヤーはそれぞれ、自分のライブラリーの一番上から3枚のカードを自分の墓地に置く。これにより墓地に置かれたクリーチャー・カードを最大2体まで追放する。青のX/Xのゾンビ・クリーチャー・トークンを1体戦場に出す。Xはこれにより追放されたカードのパワーの合計に等しい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{2}{U}, {T}: Each player puts the top three cards of his or her library into his or her graveyard. Exile up to two creature cards put into graveyards this way. Put an X/X blue Zombie creature token onto the battlefield, where X is the total power of the cards exiled this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{2}{U}, {T}: Each player puts the top three cards of his or her library into his or her graveyard. Exile up to two creature cards put into graveyards this way. Put an X/X blue Zombie creature token onto the battlefield, where X is the total power of the cards exiled this way.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{2}{U}, {T}: Each player puts the top three cards of his or her library into his or her graveyard. Exile up to two creature cards put into graveyards this way. Put an X/X blue Zombie creature token onto the battlefield, where X is the total power of the cards exiled this way.]]></LOCALISED_TEXT>
<COST mana_cost="{2}{U}" type="Mana" />
<COST type="TapSelf" />
<RESOLUTION_TIME_ACTION>
local answerDC = EffectDC():Make_Targets(0)
local queryDC = EffectDC():Make_Chest(1)
for i=0,MTG():GetNumberOfPlayers()-1 do
local player = MTG():GetNthPlayer(i)
if player ~= nil then
for i=0,(3-1) do
local card = player:Library_GetNth(i)
if card ~= nil then
queryDC:Set_CardPtr(i, card)
queryDC:Protect_CardPtr(i)
if card:GetCardType():Test(CARD_TYPE_CREATURE) == false then
queryDC:QueryUnselect_CardPtr(i)
end
card:PutInGraveyard()
else
break
end
end
end
end
EffectController():SetItemCount(2)
for n=0,(2-1) do
EffectController():SetItemPrompt(n, "CARD_QUERY_CHOOSE_CREATURE_TO_EXILE")
end
EffectController():ChooseItemsFromDC( queryDC, answerDC )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local answerDC = EffectDC():Get_Targets(0)
local num_cards = answerDC():Count()
local max_power = 0
for i=0,num_cards-1 do
local card = answerDC:Get_CardPtr(i)
if card ~= nil then
local card_power = card:GetCurrentCharacteristics():Power_Get()
max_power = max_power + card_power
card:Exile()
end
end
MTG():PutPTTokensOntoBattlefield( "TOKEN_ZOMBIE_X_X_U_100038969", 1, EffectController(), max_power, max_power )
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<TOKEN_REGISTRATION reservation="1" type="TOKEN_ZOMBIE_X_X_U_100038969" />
</CARD_V2>