It is currently 29 Oct 2025, 12:26
   
Text Size

Trying to fix leaves play triggers for transformed cards

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Trying to fix leaves play triggers for transformed cards

Postby ArsenalNut » 15 Jan 2012, 04:05

I found what is causing the problem when a Ghastly Hunting is disenchanted. The leaves play zcTrigger associated with it has a restriction using its transformed name, but when leaving play, the card has the name of its original state. Thus, the restriction fails and the leaves play command is never executed.

Since transformed and cloned cards always leave as their original name, I propose to fix this by making the restriction reference the original name of the card when the zcTrigger gets created. Is there some rule situation where this not correct?
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Trying to fix leaves play triggers for transformed cards

Postby Hellfish » 15 Jan 2012, 07:22

Is this really still the case,though?I recently committed a fix for Unholy Fiend+Village Cannibals that makes sure the state that left the battlefield is the one that is passed to triggers.

EDIT: Wait, crap, you *did* mean *zc*triggers.. :oops: Not sure what's going on there, as I havn't touched them in a while. There's not much (anything?) they can do that a static Trigger with an OverridingAbility can't.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Trying to fix leaves play triggers for transformed cards

Postby ArsenalNut » 18 Jan 2012, 06:53

I ended up adding a check in the constructor for AbilityTriggered to check for alternate state then use the "original" name instead.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 13 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 13 guests

Login Form