Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Skipping a turn
Moderator: CCGHQ Admins
4 posts
• Page 1 of 1
Skipping a turn
by thefiremind » 14 Sep 2013, 16:08
Inspired by a post by GrovyleXShinyCelebi, I tried to code a turn skip by skipping all phases of that turn. It almost worked... but it seems that the end phase cannot be skipped, no matter what. I even tried to add a specific delayed trigger for the end phase, but no way, the end phase was still there.
EDIT: Good news! You can't skip the end phase with SkipPhase, but you can skip each step of it with SkipStep!
Here's my Chronosavant code.
Feel free to test the strategy in other cards and report bugs on this topic.
EDIT: Good news! You can't skip the end phase with SkipPhase, but you can skip each step of it with SkipStep!
Here's my Chronosavant code.
- Code: Select all
<ACTIVATED_ABILITY active_zone="ZONE_GRAVEYARD">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{W}: Return Chronosavant from your graveyard to the battlefield tapped. You skip your next turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{W} : Renvoyez en jeu, engagé, le Chronosavant depuis votre cimetière. Passez votre prochain tour.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{W}: Regresa el Cronósofo de tu cementerio al juego girado. Sáltate tu siguiente turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{W}: Bringe den Zeitkundigen aus deinem Friedhof getappt ins Spiel zurück. Übergehe deinen nächsten Zug.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{W}: Rimetti sul campo di battaglia TAPpato il Cronosapiente dal tuo cimitero. Salta il tuo prossimo turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{W}:あなたの墓地にあるクロノサヴァントをタップ状態で場に出す。 あなたの次のターンをとばす。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{W}: Return Chronosavant from your graveyard to the battlefield tapped. You skip your next turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{W}: Верните Хрономудреца из вашего кладбища в игру повернутым. Пропустите ваш следующий ход.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{W}: Devolva Cronosábio de seu cemitério para o jogo virado. Pule seu próximo turno.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{W}" type="Mana" />
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():PutOntoBattlefieldTapped( EffectController() )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
MTG():CreateDelayedTrigger(1, nil)
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY resource_id="1" replacement_effect="1">
<CLEANUP fire_once="1" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller" pre_trigger="1">
return MTG():GetPhase() == PHASE_BEGINNING
</TRIGGER>
<RESOLUTION_TIME_ACTION>
MTG():CreateDelayedTrigger(2, nil)
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
MTG():SkipPhase()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2" replacement_effect="1">
<CLEANUP simple_cleanup="EndOfTurn" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
MTG():SkipStep()
</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: 722 times
Re: Skipping a turn
by sumomole » 19 Oct 2013, 19:01
Can't skip discard step when hands more than 7.
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Skipping a turn
by thefiremind » 19 Oct 2013, 19:19
I guess that the cleanup step can't be skipped no matter what. Do you think we can find a way to give PLAYER_CHARACTERISTIC_NO_HAND_LIMIT during the cleanup step that should be skipped?sumomole wrote:Can't skip discard step when hands more than 7.
< 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: 722 times
Re: Skipping a turn
by sumomole » 19 Oct 2013, 20:05
Good idea, it seems ok.thefiremind wrote:I guess that the cleanup step can't be skipped no matter what. Do you think we can find a way to give PLAYER_CHARACTERISTIC_NO_HAND_LIMIT during the cleanup step that should be skipped?sumomole wrote:Can't skip discard step when hands more than 7.

- Code: Select all
<TRIGGERED_ABILITY resource_id="1" replacement_effect="1" priority="20">
<CLEANUP fire_once="1" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller" pre_trigger="1">
return MTG():GetPhase() == PHASE_BEGINNING
</TRIGGER>
<RESOLUTION_TIME_ACTION>
EffectDC():Set_Int( 0, MTG():GetTurnNumber() )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local delayDC = EffectDC():Make_Chest(2)
MTG():CreateDelayedTrigger(2, delayDC)
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
MTG():SkipPhase()
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="8">
EffectController():GetCurrentCharacteristics():Bool_Set( PLAYER_CHARACTERISTIC_NO_HAND_LIMIT, 1 )
</CONTINUOUS_ACTION>
<DURATION>
return EffectController() == nil or MTG():GetTurnNumber() > EffectDC():Get_Int(0)
</DURATION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="2" replacement_effect="1" priority="20">
<CLEANUP simple_cleanup="EndOfTurn" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
MTG():SkipStep()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest