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

Replacement Effects

Post MTG Forge Related Programming Questions Here

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

Re: Replacement Effects

Postby slapshot5 » 29 Jan 2012, 17:09

Is there a way to temporarily suppress replacement effects as there is for static effects and triggers?

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Replacement Effects

Postby Hellfish » 29 Jan 2012, 17:22

Nope, but it's an easy add. Do you want a "suppress all" method, or just the ability to suppress any one event?
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: Replacement Effects

Postby slapshot5 » 29 Jan 2012, 17:29

My goal is to suppress all replacement effects on a card - to be used in Animate/AnimateAll for Sudden Spoiling and the like.
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Replacement Effects

Postby Sloth » 29 Jan 2012, 17:51

slapshot5 wrote:My goal is to suppress all replacement effects on a card - to be used in Animate/AnimateAll for Sudden Spoiling and the like.
I added setSuppressed and isSuppressed() to TriggerReplacementBase (the parent of triggers and replacements). So it's exactly the same as with triggers.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Replacement Effects

Postby Hellfish » 29 Jan 2012, 17:54

Try ReplacementHandler.suppressCard(Card) and clearCardSuppression(Card) in r13634 :)

NOTEDIT:Heh, darn it Sloth ;)
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: Replacement Effects

Postby slapshot5 » 29 Jan 2012, 18:11

I ended up using Sloth's suggestion as it is analogous to existing code to suppress triggers.

Thanks Sloth and Hellfish.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 14 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 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 14 guests

Login Form