Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Force a draw game? (Edit, new problem involving counters.)
Moderator: CCGHQ Admins
Force a draw game? (Edit, new problem involving counters.)
by Chakan » 11 Sep 2014, 16:56
Sorry for the second help topic in two days, but I just wanted to know what, or if there is, a string for forcing a draw game? I'm asking because I'm doing Divine Intervention.
EDIT
I've figured out how to force a draw game, but the card is doing it's trigger too early. It should trigger only if there are 0 counters on it, instead, it triggers when there is 1 counter on it.
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio del tuo mantenimento, rimuovi un segnalino intervento dall’Intervento Divino. Se non ha più segnalini intervento, la partita è patta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_UPKEEP
</TRIGGER>
<COUNTER_REGISTRATION name="Intervention" proliferate="11" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():RemoveCounters( MTG():GetCountersType("Intervention"), 1 )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil and EffectSource():CountCounters( MTG():GetCountersType("Intervention") ) > 0 then
EffectController():TieGame()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
EDIT
I've figured out how to force a draw game, but the card is doing it's trigger too early. It should trigger only if there are 0 counters on it, instead, it triggers when there is 1 counter on it.
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio del tuo mantenimento, rimuovi un segnalino intervento dall’Intervento Divino. Se non ha più segnalini intervento, la partita è patta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_UPKEEP
</TRIGGER>
<COUNTER_REGISTRATION name="Intervention" proliferate="11" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():RemoveCounters( MTG():GetCountersType("Intervention"), 1 )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil and EffectSource():CountCounters( MTG():GetCountersType("Intervention") ) > 0 then
EffectController():TieGame()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Re: Force a draw game? (Edit, new problem involving counters
by RiiakShiNal » 11 Sep 2014, 22:24
Chakan wrote:Sorry for the second help topic in two days, but I just wanted to know what, or if there is, a string for forcing a draw game? I'm asking because I'm doing Divine Intervention.(I've tried both TieGame and DrawGame, none of them seems to work.)
- | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio del tuo mantenimento, rimuovi un segnalino intervento dall’Intervento Divino. Se non ha più segnalini intervento, la partita è patta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_UPKEEP
</TRIGGER>
<COUNTER_REGISTRATION name="Intervention" proliferate="11" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():RemoveCounters( MTG():GetCountersType("Intervention"), 1 )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil and EffectSource():CountCounters( MTG():GetCountersType("Intervention") ) > 0 then
EffectController():TieGame()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
EDIT
I've figured out how to force a draw game, but the card is doing it's trigger too early. It should trigger only if there are 0 counters on it, instead, it triggers when there is 1 counter on it.
- | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[All’inizio del tuo mantenimento, rimuovi un segnalino intervento dall’Intervento Divino. Se non ha più segnalini intervento, la partita è patta.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of your upkeep, remove an intervention counter from Divine Intervention.]]></LOCALISED_TEXT>
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_UPKEEP
</TRIGGER>
<COUNTER_REGISTRATION name="Intervention" proliferate="11" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():RemoveCounters( MTG():GetCountersType("Intervention"), 1 )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil and EffectSource():CountCounters( MTG():GetCountersType("Intervention") ) > 0 then
EffectController():TieGame()
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Code: Select all
if EffectSource() ~= nil and EffectSource():CountCounters( MTG():GetCountersType("Intervention") ) > 0 then
- Code: Select all
if EffectSource() ~= nil and EffectSource():CountCounters( MTG():GetCountersType("Intervention") ) <= 0 then
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: Force a draw game? (Edit, new problem involving counters
by migookman » 11 Sep 2014, 22:51
Thanks! I'm a noob when it comes to coding and I was wondering what the lt meant. Now I know to change some of my coded cards to gt that needs to be greater than a certain characteristic.
Re: Force a draw game? (Edit, new problem involving counters
by RiiakShiNal » 12 Sep 2014, 00:49
Those are actually HTML symbols for greater than (>, >) and less than (<, <). Certain symbols can't be used directly inside of XML without either being converted to HTML friendly symbols such as in this case or using <!CDATA[Some text here.]]> to allow characters that would not otherwise be allowed. For code purposes about the only ones you will need to convert will be greater than and less than.
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
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 23 guests