How to implement Obstinate Baloth's discard ability?

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>
