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?
by 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:
Now, I'm trying to implement Obstinate Baloth, that has the ability:
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: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.
- 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>
- 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?
by 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.
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>
- 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>
- 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: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: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.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?
- 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>
-
kevlahnota - Programmer
- Posts: 825
- Joined: 19 Jul 2010, 17:45
- Location: Philippines
- Has thanked: 14 times
- Been thanked: 264 times
2 posts
• Page 1 of 1
Return to Magic: The Gathering - Duels of the Planeswalkers
Who is online
Users browsing this forum: No registered users and 8 guests