Page 1 of 1

How to implement Obstinate Baloth's discard ability?

PostPosted: 28 Jan 2011, 18:33
by Jacques
Since I came across this board I have been experimenting the the card creation abilities in MtG DotP. Easier cards such as Tidespout Tyrant and Whispersilk Cloak posed no problem, not in the least thanks to some great guides on this forum.

Now, I'm trying to implement Obstinate Baloth, that has the ability:

If a spell or ability an opponent controls causes you to discard Obstinate Baloth, put it onto the battlefield instead of putting it into your graveyard.
For some reason I just can't get this to work, and there doesn't seem to be any other card in both the 'official cards' (up until EXP3) and the community DLC. I've currently got the following markup:

Code: Select all
    <!-- Reset trigger to watch for discard events -->
    <TRIGGERED_ABILITY layer="0" zone="hand" internal="1">
      <TRIGGER value="BEGINNING_OF_STEP">
        return true
      </TRIGGER>
      <EFFECT>
        Object():Register_Set(0,0)
      </EFFECT>
    </TRIGGERED_ABILITY>

    <!-- Register any discard event caused by the opponent -->
    <TRIGGERED_ABILITY zone="hand" layer="0">
      <TRIGGER value="DISCARD">
        return TriggerObject():GetPlayer():GetTeam() ~= Object():GetPlayer():GetTeam()
      </TRIGGER>
      <EFFECT>
        Object():Register_Set(0,1)
      </EFFECT>
    </TRIGGERED_ABILITY>

    <!-- When card is moved to graveyard and discard event has been registered, put this card into play instead -->
    <TRIGGERED_ABILITY zone="Graveyard" tag="OBSTINATE_BALOTH_RULE_2" layer="0">
      <TRIGGER value="ZONECHANGE">
        return ( SelfTriggered() and (Object():GetZone() == ZONE_GRAVEYARD) and (Object():GetErstwhileZone() == ZONE_HAND) and (Object():Register_Get(0) == 1) )
      </TRIGGER>
      <EFFECT>
        Object():PutIntoPlay( Object():GetOwner() )
      </EFFECT>
    </TRIGGERED_ABILITY>
I've already figured out that the DISCARD trigger doesn't fire for whatever reason. I'm also wondering though if this ability can't be implemented much easier... So, does anyone have some advice for me? :)

Re: How to implement Obstinate Baloth's discard ability?

PostPosted: 30 Jan 2011, 05:23
by kevlahnota
maybe you can try whenever Obstinate Baloth is targetted in your hand by opponent and when it's discarded by it's owner.
This is just an idea, it may or may not work.
Example trigger for Obstinate Baloth when targetted by opponent.

Code: Select all
<TRIGGERED_ABILITY zone="hand" layer="0" internal="1">
      <TRIGGER value="TARGETS_CHOSEN">
        return SecondaryObject():GetPlayer():GetTeam() ~= Object():GetPlayer():GetTeam() and SecondaryObject():GetTargetCard() == Object()
      </TRIGGER>
      <EFFECT>
        Object():Register_Set(0,1)
      </EFFECT>
</TRIGGERED_ABILITY>
Example when discarded with Register 0 is 1.

Code: Select all
<TRIGGERED_ABILITY zone="any" layer="0" internal="1">
      <TRIGGER value="DISCARD">
        return SelfTriggered() and Object():Register_Get(0) == 1
      </TRIGGER>
      <EFFECT>
        Object():PutIntoPlay( Object():GetOwner() )
      </EFFECT>
</TRIGGERED_ABILITY>
Now when it's not discarded this step, reset the Register 0 after the step is ended if it's 1.

Code: Select all
<TRIGGERED_ABILITY internal="1" zone="ANY" layer="0">
      <TRIGGER value="BEGINNING_OF_STEP">
        return Object():Register_Get(0) == 1
      </TRIGGER>
      <EFFECT>
        Object():Register_Clear( 0 )
      </EFFECT>
</TRIGGERED_ABILITY>
Jacques wrote:Since I came across this board I have been experimenting the the card creation abilities in MtG DotP. Easier cards such as Tidespout Tyrant and Whispersilk Cloak posed no problem, not in the least thanks to some great guides on this forum.

Now, I'm trying to implement Obstinate Baloth, that has the ability:

If a spell or ability an opponent controls causes you to discard Obstinate Baloth, put it onto the battlefield instead of putting it into your graveyard.
For some reason I just can't get this to work, and there doesn't seem to be any other card in both the 'official cards' (up until EXP3) and the community DLC. I've currently got the following markup:

Code: Select all
    <!-- Reset trigger to watch for discard events -->
    <TRIGGERED_ABILITY layer="0" zone="hand" internal="1">
      <TRIGGER value="BEGINNING_OF_STEP">
        return true
      </TRIGGER>
      <EFFECT>
        Object():Register_Set(0,0)
      </EFFECT>
    </TRIGGERED_ABILITY>

    <!-- Register any discard event caused by the opponent -->
    <TRIGGERED_ABILITY zone="hand" layer="0">
      <TRIGGER value="DISCARD">
        return TriggerObject():GetPlayer():GetTeam() ~= Object():GetPlayer():GetTeam()
      </TRIGGER>
      <EFFECT>
        Object():Register_Set(0,1)
      </EFFECT>
    </TRIGGERED_ABILITY>

    <!-- When card is moved to graveyard and discard event has been registered, put this card into play instead -->
    <TRIGGERED_ABILITY zone="Graveyard" tag="OBSTINATE_BALOTH_RULE_2" layer="0">
      <TRIGGER value="ZONECHANGE">
        return ( SelfTriggered() and (Object():GetZone() == ZONE_GRAVEYARD) and (Object():GetErstwhileZone() == ZONE_HAND) and (Object():Register_Get(0) == 1) )
      </TRIGGER>
      <EFFECT>
        Object():PutIntoPlay( Object():GetOwner() )
      </EFFECT>
    </TRIGGERED_ABILITY>
I've already figured out that the DISCARD trigger doesn't fire for whatever reason. I'm also wondering though if this ability can't be implemented much easier... So, does anyone have some advice for me? :)