Replacement Effects
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			21 posts
			 • Page 2 of 2 • 1, 2
		
	
Re: Replacement Effects
 by slapshot5 » 29 Jan 2012, 17:09
by 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
- 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
 by Hellfish » 29 Jan 2012, 17:22
by 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
		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
- 
				 
 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
 by slapshot5 » 29 Jan 2012, 17:29
by 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
 by Sloth » 29 Jan 2012, 17:51
by Sloth » 29 Jan 2012, 17:51 
I added setSuppressed and isSuppressed() to TriggerReplacementBase (the parent of triggers and replacements). So it's exactly the same as with triggers.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.
- 
				 
 Sloth
- Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Replacement Effects
 by Hellfish » 29 Jan 2012, 17:54
by Hellfish » 29 Jan 2012, 17:54 
Try ReplacementHandler.suppressCard(Card) and clearCardSuppression(Card) in r13634 
NOTEDIT:Heh, darn it Sloth
			
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
		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
- 
				 
 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
 by slapshot5 » 29 Jan 2012, 18:11
by 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
			
		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
			21 posts
			 • Page 2 of 2 • 1, 2
		
	
Who is online
Users browsing this forum: No registered users and 17 guests
