It is currently 27 Apr 2024, 08:31
   
Text Size

Bug or a game rule?

by BetaSteward

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

Bug or a game rule?

Postby gecslam » 07 Apr 2015, 21:49

I'm not sure if this is a bug or an actual rule. I'm implementing the card Covetous Dragon from Urza's Destiny, which sacrifices when you control no artifacts. How does a card like this interact with flicker effects like Momentary Blink and Cloudshift? Say I cast either of those on my only artifact in play: for the brief second that that card is exiled, would I need to sac Covetous Dragon? I've implemented the rule as a triggered ability and have it working for obvious cases, but it's not working if I test it with a flicker effect.
gecslam
 
Posts: 4
Joined: 07 Apr 2015, 21:26
Has thanked: 0 time
Been thanked: 0 time

Re: Bug or a game rule?

Postby LevelX » 08 Apr 2015, 06:31

Probably a bug in implemenation of StateTriggeredAbilities.
I will have a look later.

603.8. Some triggered abilities trigger when a game state (such as a player controlling no permanents of a particular card type) is true, rather than triggering when an event occurs. These abilities trigger as soon as the game state matches the condition. They’ll go onto the stack at the next available opportunity. These are called state triggers. (Note that state triggers aren’t the same as state-based actions.) A state-triggered ability doesn’t trigger again until the ability has resolved, has been countered, or has otherwise left the stack. Then, if the object with the ability is still in the same zone and the game state still matches its trigger condition, the ability will trigger again.

Example: A permanent’s ability reads, “Whenever you have no cards in hand, draw a card.” If its controller plays the last card from his or her hand, the ability will trigger once and won’t trigger again until it has resolved. If its controller casts a spell that reads “Discard your hand, then draw that many cards,” the ability will trigger during the spell’s resolution because the player’s hand was momentarily empty.
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Bug or a game rule?

Postby emerald000 » 08 Apr 2015, 15:55

gecslam wrote:I'm not sure if this is a bug or an actual rule. I'm implementing the card Covetous Dragon from Urza's Destiny, which sacrifices when you control no artifacts. How does a card like this interact with flicker effects like Momentary Blink and Cloudshift? Say I cast either of those on my only artifact in play: for the brief second that that card is exiled, would I need to sac Covetous Dragon? I've implemented the rule as a triggered ability and have it working for obvious cases, but it's not working if I test it with a flicker effect.
You should use a StateTriggeredAbility. It is quite possible that there is a bug with blink effects though.
User avatar
emerald000
 
Posts: 92
Joined: 07 Jul 2014, 16:55
Has thanked: 1 time
Been thanked: 9 times

Re: Bug or a game rule?

Postby gecslam » 08 Apr 2015, 23:48

emerald000 wrote:You should use a StateTriggeredAbility. It is quite possible that there is a bug with blink effects though.
That's how I did it, and the flicker effect still doesn't work properly. I stepped through, and it looks like the card that gets flickered moves to exile and back to the battlefield before the GameEvent notifying the first zone change gets sent (for some reason, the moveToExile() method in CardImpl delays firing the event notice until later, but fires the event immediately in putOntoTheBattlefield()). So when the first zone change event fires, and my TriggeredAbility implementation checks the battlefield for artifact permanents, the artifact is already back in play. I'll add this info to the Issues page on Github.
gecslam
 
Posts: 4
Joined: 07 Apr 2015, 21:26
Has thanked: 0 time
Been thanked: 0 time


Return to XMage

Who is online

Users browsing this forum: No registered users and 131 guests


Who is online

In total there are 131 users online :: 0 registered, 0 hidden and 131 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 131 guests

Login Form