It is currently 23 May 2024, 13:55
   
Text Size

How to implement Obstinate Baloth's discard ability?

New decks and cards for Stainless Games' release

Moderator: CCGHQ Admins

How to implement Obstinate Baloth's discard ability?

Postby Jacques » 28 Jan 2011, 18:33

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? :)
Jacques
 
Posts: 1
Joined: 28 Jan 2011, 18:16
Has thanked: 0 time
Been thanked: 0 time

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

Postby kevlahnota » 30 Jan 2011, 05:23

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? :)
User avatar
kevlahnota
Programmer
 
Posts: 825
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 14 times
Been thanked: 264 times


Return to Magic: The Gathering - Duels of the Planeswalkers

Who is online

Users browsing this forum: No registered users and 8 guests


Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 8 guests

Login Form