Page 1 of 1

Skipping a turn

PostPosted: 14 Sep 2013, 16:08
by thefiremind
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.
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>
A little explanation: since I cannot know when my next turn will come, I only create a delayed trigger for skipping my next beginning phase, then that trigger will create other delayed triggers for the remaining steps of the same turn. This should allow the code to work even when one of the phases is skipped because of another card... or maybe it screws up exactly those scenarios, I don't know. :lol: Feel free to test the strategy in other cards and report bugs on this topic.

Re: Skipping a turn

PostPosted: 19 Oct 2013, 19:01
by sumomole
Can't skip discard step when hands more than 7.

Re: Skipping a turn

PostPosted: 19 Oct 2013, 19:19
by thefiremind
sumomole wrote:Can't skip discard step when hands more than 7.
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?

Re: Skipping a turn

PostPosted: 19 Oct 2013, 20:05
by sumomole
thefiremind wrote:
sumomole wrote:Can't skip discard step when hands more than 7.
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?
Good idea, it seems ok. :lol:
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() &gt; 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>