It is currently 23 May 2013, 16:21
   
Text Size

Dredge Mechanic and Bridge from Below

Moderator: CCGHQ Admins

Dredge Mechanic and Bridge from Below

Postby agentx » 09 Jun 2012, 22:31

I saw in fireminds content this card
_DREDGE_FIREMIND_888262904

Looks like there has been some work done to get the dredge mechanic working.
I have been spending alot of time completing the dredge deck and added the following cards:
Lions Eye Diamond
Cephalid Coliseum
Dread Return
Faithless Looting

However I can't seem to get Bridge From Below to trigger correctly
This is a special card that has two triggers for the same ability "when some creature dies". I read in a forum that if you and your oppenents creatures die in combat then the stack should first trigger for your creature then your opponents. Meaning I should still get a zombie token before the card is removed from the bame.

Has anyone who has been working with dredge found a way to get "Bridge From Below" working?
Here is the code I have come up with so far:
Code: Select all
  <TRIGGERED_ABILITY internal="1" active_zone="Graveyard" zone="any">
  <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a nontoken creature is put into your graveyard from the battlefield, if Bridge from Below is in your graveyard, put a 2/2 black Zombie creature token onto the battlefield.]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[]]></LOCALISED_TEXT>
    <TRIGGER value="HIT_GRAVEYARD">
    return (TriggerObject() ~= Object() and TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
       TriggerObject():IsToken() == 0 and TriggerObject():GetErstwhileZone() == ZONE_IN_PLAY and
       TriggerObject():GetPlayer() == Object():GetPlayer())
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
       PutTokensIntoPlay( "TOKEN_ZOMBIE_2_2_247076", 1 )
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY internal="1" active_zone="Graveyard" zone="any">
  <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When a creature is put into an opponent's graveyard from the battlefield, if Bridge from Below is in your graveyard, exile Bridge from Below.]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[]]></LOCALISED_TEXT>
  <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[]]></LOCALISED_TEXT>
    <TRIGGER value="HIT_GRAVEYARD">
    return (TriggerObject() ~= Object() and TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
       TriggerObject():GetErstwhileZone() == ZONE_IN_PLAY and
       TriggerObject():GetPlayer():GetTeam() ~= Object():GetPlayer():GetTeam())
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if (Object():GetZone() == ZONE_GRAVEYARD) then
       Object():RemoveFromGame()
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Thanks
agentx
 
Posts: 12
Joined: 08 May 2012, 06:22
Has thanked: 0 time
Been thanked: 0 time

Re: Dredge Mechanic and Bridge from Below

Postby thefiremind » 09 Jun 2012, 22:53

agentx wrote:I read in a forum that if you and your oppenents creatures die in combat then the stack should first trigger for your creature then your opponents.
I think that in the real game you should be able to decide the resolution order of those triggers since you control both... and of course you always decide what's good for you. But on DotP2012 there's no way to decide the resolution order of anything. :( I had a similar problem while coding Momir Vig, Simic Visionary, and I had to make the card super-complex by adding a multiple choice that lets the player select the resolution order when playing a green+blue spell. Actually, I think that DotP2012 puts the triggers on the stack according to how they are ordered in the card's XML (when they are on the same card), even though I never tested it. Try to invert the order of the abilities: write the trigger for opponents' creatures first. Then let me know what happens.
< DotP2013 (and formerly 2012) modder >
WADs unrecognized by the game? Look here.
Need a basic modding tutorial? Try this.
Want to start coding cards? Try my web generator.
User avatar
thefiremind
Programmer
 
Posts: 1662
Joined: 07 Nov 2011, 10:55
Has thanked: 60 times
Been thanked: 364 times

Re: Dredge Mechanic and Bridge from Below

Postby Eglin » 10 Jun 2012, 21:09

I believe the version in my deck pack always spawns the critters. I can't remember testing it extensively, but one surefire way to fix yours is to move the check to see if bridge is in the graveyard to the trigger section instead of the resolution time section. Then, even if the other trigger resolves first and exiles bridge, the zombies will spawn.
User avatar
Eglin
Programmer
 
Posts: 185
Joined: 01 Mar 2012, 14:44
Has thanked: 35 times
Been thanked: 19 times

Re: Dredge Mechanic and Bridge from Below

Postby thefiremind » 11 Jun 2012, 00:07

Eglin wrote:I believe the version in my deck pack always spawns the critters. I can't remember testing it extensively, but one surefire way to fix yours is to move the check to see if bridge is in the graveyard to the trigger section instead of the resolution time section. Then, even if the other trigger resolves first and exiles bridge, the zombies will spawn.
If you want to closely follow the rules, the check should be both in trigger section and in resolution time section, because those abilities have the so-called "intervening 'if' clause" (see point 603.4 here): if the condition isn't true when the ability checks whether or not it can trigger, it won't trigger at all; but if it triggers, and the condition stops being true before resolution, it will have no effect.

You can't imagine how many rules I learned just while browsing Gatherer for cards I wanted to code! :D
< DotP2013 (and formerly 2012) modder >
WADs unrecognized by the game? Look here.
Need a basic modding tutorial? Try this.
Want to start coding cards? Try my web generator.
User avatar
thefiremind
Programmer
 
Posts: 1662
Joined: 07 Nov 2011, 10:55
Has thanked: 60 times
Been thanked: 364 times

Re: Dredge Mechanic and Bridge from Below

Postby Eglin » 11 Jun 2012, 06:51

No need - it says in plain language on the card. However, there aren't very many cards that can clear the graveyard as a fast action in this version of the game and we sometimes have to approximate the rules in the name of making fun decks.
User avatar
Eglin
Programmer
 
Posts: 185
Joined: 01 Mar 2012, 14:44
Has thanked: 35 times
Been thanked: 19 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 10 minutes)
Most users ever online was 177 on 10 Oct 2011, 16:37

Users browsing this forum: No registered users and 1 guest

Login Form