Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Help with "Thought Reflection" [draw 2 cards instead of 1]
Moderator: CCGHQ Admins
Help with "Thought Reflection" [draw 2 cards instead of 1]
by Zambooo » 24 Mar 2014, 21:17
Hello everyone, I was trying to code the card "Thought Reflection" (http://magiccards.info/shm/en/53.html) [for DotP 2013!] but I have no idea of how doing that following the "rule" specified:
Maybe some of you may hel me
Here it is where I am atmThought Reflection doesn't cause you to draw cards. Rather, it causes card-drawing effects to have you draw more cards. It also causes the draw action during your draw step to have you draw two cards.
- Code: Select all
<?xml version='1.0'?>
<CARD_V2>
<FILENAME text="THOUGHT_REFLECTION_146728" />
<CARDNAME text="THOUGHT_REFLECTION" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Thought Reflection]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Riflesso di Pensiero]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gedankenspiegelung]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Réverbération de pensée]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Reflejo del pensamiento]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[思考の反射]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Thought Reflection]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Отражение Мысли]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Reflexo de Pensamento]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="146728" />
<ARTID value="A146728" />
<ARTIST name="Terese Nielsen & Ron Spencer" />
<CASTING_COST cost="{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Knowledge fills the mind of a fool and opens the mind of the sage.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La sapienza riempie la mente del folle e apre quella del saggio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wissen füllt den Verstand eines Dummkopfs und öffnet den eines Weisen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Le savoir emplit l'esprit de l'imbécile et ouvre celui du sage.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El conocimiento llena la mente de un tonto y abre la mente de un sabio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[知識は愚か者の精神を満たし、賢者の精神を開く。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Knowledge fills the mind of a fool and opens the mind of the sage.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Знание заполняет разум глупца и расширяет горизонты умного.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O conhecimento preenche a mente de um tolo e abre a mente de um sábio.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="DPG" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY internal="1" pre_trigger="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[If you would draw a card, draw two cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se stai per pescare una carta, pesca invece due carte.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Falls du eine Karte ziehen würdest, ziehe stattdessen zwei Karten.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si vous deviez piocher une carte, piochez deux cartes à la place.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Si fueras a robar una carta, en vez de eso, roba dos cartas.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがカードを1枚引く場合、代わりにカードを2枚引く。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[If you would draw a card, draw two cards instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Если вы должны взять карту, возьмите две карты вместо этого.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Se você for comprar um card, em vez disso, compre dois cards.]]></LOCALISED_TEXT>
<TRIGGER value="DREW_CARD" simple_qualifier="controller">
if TriggerPlayer() == EffectController() then
override = 1
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
EffectDC():SetAmount( 2 )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<AI_BASE_SCORE score="1200" zone="ZONE_IN_PLAY" />
</CARD_V2>
Maybe some of you may hel me
Re: Help with "Thought Reflection" [draw 2 cards instead of
by thefiremind » 24 Mar 2014, 21:28
Substitute
- Code: Select all
EffectDC():SetAmount( 2 )
- Code: Select all
for i=0,1 do
EffectController():DrawCard()
end
< 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: Help with "Thought Reflection" [draw 2 cards instead of
by Zambooo » 24 Mar 2014, 21:38
I already tried a solution like that, but when I have two of them in play, for some reasons I draw 5 cards instead of 4 during my draw step..
Edit: now with your solution I draw two more cards and not two instead of one and without the cycle I still draw 5 cards instead of 4 with two Thought Reflection in play.. how is that possible? :/The effects of multiple Thought Reflections are cumulative. For example, if you have three Thought Reflections on the battlefield, you'll draw eight times the original number of cards.
Re: Help with "Thought Reflection" [draw 2 cards instead of
by thefiremind » 24 Mar 2014, 23:10
It's possible that I don't remember how to properly override in DotP2013 anymore... for that reason I went and checked my Laboratory Maniac. It doesn't have the internal tag... maybe it wasn't needed for overrides? I really can't remember. Anyway, here's how my Laboratory Maniac would look like when substituting his effect with what you need:Zambooo wrote:Edit: now with your solution I draw two more cards and not two instead of one and without the cycle I still draw 5 cards instead of 4 with two Thought Reflection in play.. how is that possible? :/
- Code: Select all
<TRIGGERED_ABILITY pre_trigger="1" priority="1">
-- Localised text omitted
<TRIGGER value="DREW_CARD" simple_qualifier="controller">
if override == false then
override = true
return true
end
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
for i=0,1 do
EffectController():DrawCard()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
< 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: Help with "Thought Reflection" [draw 2 cards instead of
by Zambooo » 24 Mar 2014, 23:36
As far as I know the "internal" tag is intented for not "animate" the trigger, but let it happen automatically, so that you can't put on pile spells while the ability is resolving.. (and in that case would save the player a lot of time watching the enchantment trigger)
Anyways thanks, I will test it soon
Anyways thanks, I will test it soon
Re: Help with "Thought Reflection" [draw 2 cards instead of
by RiiakShiNal » 24 Mar 2014, 23:47
The internal tag is primarily intended to prevent an ability from being responded to or seen, but there are also some other side effects to it that can make it necessary for some abilities while other abilities won't work right with it. I don't think anyone has gone through to try and determine all of its effects on an ability and actually listed them out. Also I don't really remember instances that required it or where its presence screwed things up so I can't really point you in the right direction.Zambooo wrote:As far as I know the "internal" tag is intented for not "animate" the trigger, but let it happen automatically, so that you can't put on pile spells while the ability is resolving.. (and in that case would save the player a lot of time watching the enchantment trigger)
You can also prevent responding to an ability and eliminate the pause by using forced_skip="1". It can be used in places that internal="1" can't be used, but forced_skip will show a brief activation animation (still virtually no wait, but it gives an indication of what triggered). Though it is not a replacement for internal as there are places where internal is needed and forced_skip just won't work.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Help with "Thought Reflection" [draw 2 cards instead of
by Zambooo » 25 Mar 2014, 00:04
Tested. With the trigger from Laboratory Maniac the card works perfectly (at least with 2 of them on the field) even with the internal tag. Thanks to everyone
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 18 guests