Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Help with "Praetor's Counsel"
Moderator: CCGHQ Admins
Help with "Praetor's Counsel"
by Zambooo » 09 Aug 2012, 21:13
I need help to achieve the last effect of Praetor's Counsel (http://magiccards.info/mbs/en/88.html): "You have no maximum hand size for the rest of the game."
That's what I've tried to do:
That's what I've tried to do:
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="PRAETORS_COUNSEL_214034" />
<CARDNAME text="PRAETORS_COUNSEL" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Praetor's Counsel]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Consiglio del Pretore]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Rat der Prätoren]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Conseil du praetor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Consejo del magistrado]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[法務官の相談]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Praetor's Counsel]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Совет Претора]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Conselho do Pretor]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="214034" />
<ARTID value="214034" />
<ARTIST name="Daarken" />
<CASTING_COST cost="{5}{G}{G}{G}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As the Phyrexian contagion corroded Karn's body, the praetors whispered psalms to corrupt his mind.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Man mano che il contagio di Phyrexia corrodeva il corpo di Karn, i pretori gli sussurravano salmi per corromperne anche la mente.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Während die phyrexianische Seuche Karns Körper zersetze, flüsterten die Prätoren Psalme, um seinen Verstand zu korrumpieren.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Pendant que la contagion phyrexiane corrodait le corps de Karn, les praetors psalmodiaient pour corrompre son esprit.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mientras la enfermedad pirexiana corrompía el cuerpo de Karn, los magistrados susurraban salmos para corromper su mente.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ファイレクシアの病原がカーンの体を蝕む一方、法務官は聖歌を囁き彼の心を蝕んでいった。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As the Phyrexian contagion corroded Karn's body, the praetors whispered psalms to corrupt his mind.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Пока фирексийская зараза расползалась по телу Карна, преторы шептали псалмы, чтобы разложить его сознание.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Enquanto o contágio phyrexiano corroía o corpo de Karn, os pretores sussurravam salmos para corromper sua mente.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Sorcery" />
<EXPANSION value="DPG" />
<RARITY metaname="M" />
<SPELL_ABILITY filter_zone="ZONE_GRAVEYARD">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return all cards from your graveyard to your hand. Exile Praetor's Counsel. You have no maximum hand size for the rest of the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Riprendi in mano tutte le carte dal tuo cimitero. Esilia il Consiglio del Pretore. Non hai un limite massimo di carte in mano per il resto della partita.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bringe alle Karten aus deinem Friedhof auf deine Hand zurück. Schicke den Rat der Prätoren ins Exil. Du hast für den Rest des Spiels keine maximale Handkartenzahl.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Renvoyez toutes les cartes de votre cimetière dans votre main. Exilez le Conseil du praetor. Vous n'avez plus de limite au nombre de cartes dans votre main pour le restant de la partie.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Regresa a tu mano todas las cartas de tu cementerio. Exilia el Consejo del magistrado. Tu mano no tiene tamaño máximo por el resto del juego.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたの墓地にあるすべてのカードをあなたの手札に戻す。 法務官の相談を追放する。 残りのゲームの間、あなたの手札の上限はなくなる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Return all cards from your graveyard to your hand. Exile Praetor's Counsel. You have no maximum hand size for the rest of the game.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Верните все карты из вашего кладбища в вашу руку. Изгоните Совет Претора. Размер вашей руки неограничен до конца партии.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Devolva todos os cards de seu cemitério para sua mão. Exile Conselho do Pretor. Não há limite para o número máximo de cards em sua mão durante o restante do jogo.]]></LOCALISED_TEXT>
<FILTER>
return ( FilteredCard() ~= nil and
EffectSource() ~= nil and
FilteredCard():GetZone() == (ZONE_GRAVEYARD) and
FilteredCard():GetPlayer() == EffectController() )
</FILTER>
<RESOLUTION_TIME_ACTION>
if FilteredCard() ~= nil then
if FilteredCard():GetZone() == ZONE_GRAVEYARD then
FilteredCard():PutInHand()
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
Object():RemoveFromGame()
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectController() ~= nil then
local characteristics = EffectController():GetCurrentCharacteristics()
if characteristics ~= nil then
characteristics:Bool_Set( PLAYER_CHARACTERISTIC_NO_HAND_LIMIT , 1 )
end
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
</CARD_V2>
Re: Help with "Praetor's Counsel"
by thefiremind » 09 Aug 2012, 22:00
It doesn't work because you can't set a characteristic in a RESOLUTION_TIME_ACTION, it has to be a CONTINUOUS_TIME_ACTION. In order to make it last forever, add
While you are at it, I suggest to add the tag ignore_filter="1" to the actions that don't use the <FILTER> (all of them except the first one). In this card it probably doesn't make much difference, but using the <FILTER> forces the action to be repeated as many times as the number of cards that satisfy the filter, so it could lead to unwanted results.
- Code: Select all
<DURATION>
return false
</DURATION>
While you are at it, I suggest to add the tag ignore_filter="1" to the actions that don't use the <FILTER> (all of them except the first one). In this card it probably doesn't make much difference, but using the <FILTER> forces the action to be repeated as many times as the number of cards that satisfy the filter, so it could lead to unwanted results.
< 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
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 12 guests