Current Known Bugs list
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Current Known Bugs list
by Vecc » 06 Dec 2009, 22:07
HAHA, I had to edit my post to write Vendilion corrtectly, too.DennisBergkamp wrote:I see what's wrong with Vendilion Clique... I misspelled it in CardFactory_Creatures as "Vendillion Clique"![]()

Re: Current Known Bugs list
by Marek14 » 06 Dec 2009, 22:24
Forge made Bird token from Emeria Angel green.
Re: Current Known Bugs list
by zerker2000 » 07 Dec 2009, 02:33
It had two aforementioned thopters and three Phyrexian Walker s out at the time.Forge's AI wrote:Flight: Targeting Ornithopter
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Current Known Bugs list
by apthaven » 07 Dec 2009, 06:04
I tried it again this time with Crib Swap (which is similar to Swords to Plowshares for removing a creature from the game) which I targeted on a blue flying creature (Flying Men).DennisBergkamp wrote:I can't seem to reproduce the Tarmogoyf bug though.
Crib Swap is an instant, and goes into my graveyard. Tarmogoyf remains 0/1.
No other cards in either player's graveyard.
Seems like creature removal cards bug down Tarmogoyf based on this. Other cards which go to the graveyard seem to increase Tarmogoyf power and toughness as they should.
Or maybe it has something to do with instants interacting with Tarmogoyf in general

EDIT: I just noticed that Crib Swap is also a Tribal Instant meaning that it should add a +2/+2 for Tarmogoyf too.
"I am a man and real men do not consume pink beverages. Get thee gone woman, and bring me something brown." - Jace Wayland
Re: Current Known Bugs list
by DennisBergkamp » 07 Dec 2009, 08:07
Actually, very tricky in Forge. Currently, damage is assigned to players and creatures as summed up integer values. It doesn't really keep track of what the source of the damage was, although I did hack something in which allows to track some sources of damage, for cards like Spiritmonger and Sengir Vampire.How hard is damage prevention?
Anyway, I just spent a few hours trying to add a "Card source" when assigning (or adding) damage, (which should make a lot more cards possible), but it's very tricky, since there are so many places in the code where damage is assigned/added. Anyway, after a lot a lot of debugging, I got it working for just the simple combat stuff (first strike, lifelink, double strike, single blockers). It seems to be, anyway. Multiple blockers I haven't tested yet, and it might have broken a bunch of other things

-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Current Known Bugs list
by Niv-Mizzet » 07 Dec 2009, 08:23
I used Sower of Temptation to steal Computer's Tarmogoyf, which he'd equipped with a Jitte (with 0 counters). Then on the following turn I attacked with the stolen Goyf, plus one of my own and got the following error during the combat damage step:
Index: 0, Size: 0
Version:
MTG Forge -- official beta: 09/11/24, SVN revision: 98
Detailed error trace:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at forge.CardList.getCard(CardList.java:74)
at forge.CardList.get(CardList.java:75)
at forge.Input_CombatDamage.damageCreatureAndPlayer(Input_CombatDamage.java:128)
at forge.Input_CombatDamage.selectButtonOK(Input_CombatDamage.java:23)
at forge.GuiInput.selectButtonOK(GuiInput.java:32)
at forge.GuiDisplay3.okButtonActionPerformed(GuiDisplay3.java:1052)
at forge.GuiDisplay3.access$3(GuiDisplay3.java:1051)
at forge.GuiDisplay3$25.actionPerformed(GuiDisplay3.java:780)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at forge.GuiDisplay3$26.keyPressed(GuiDisplay3.java:799)
at java.awt.Component.processKeyEvent(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Index: 0, Size: 0
Version:
MTG Forge -- official beta: 09/11/24, SVN revision: 98
Detailed error trace:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at forge.CardList.getCard(CardList.java:74)
at forge.CardList.get(CardList.java:75)
at forge.Input_CombatDamage.damageCreatureAndPlayer(Input_CombatDamage.java:128)
at forge.Input_CombatDamage.selectButtonOK(Input_CombatDamage.java:23)
at forge.GuiInput.selectButtonOK(GuiInput.java:32)
at forge.GuiDisplay3.okButtonActionPerformed(GuiDisplay3.java:1052)
at forge.GuiDisplay3.access$3(GuiDisplay3.java:1051)
at forge.GuiDisplay3$25.actionPerformed(GuiDisplay3.java:780)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at forge.GuiDisplay3$26.keyPressed(GuiDisplay3.java:799)
at java.awt.Component.processKeyEvent(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
-
Niv-Mizzet - Posts: 125
- Joined: 17 Oct 2009, 21:20
- Has thanked: 0 time
- Been thanked: 5 times
Re: Current Known Bugs list
by freestorageaccount » 07 Dec 2009, 08:25
Sometimes I noticed the computer get very mana-screwed after I play Necropotence, but only just now did I ascribe it to a bug rather than to the usually merciless random-number generator: my Necropotence stops him from drawing cards! (If the computer were somehow to use Necropotence, would something similar happen to me or could I use the ability?)
-- freestorageaccount (= accurate forge notes) This is not a subliminal message. At least for the prosilver theme.
The Great Wall of Bugs. Gando, you will not be forgotten.
And a chip off the old block.
The Great Wall of Bugs. Gando, you will not be forgotten.
And a chip off the old block.
-
freestorageaccount - Posts: 246
- Joined: 21 Sep 2009, 01:42
- Location: Hilbert's Hotel
- Has thanked: 1 time
- Been thanked: 0 time
Re: Current Known Bugs list
by Marek14 » 07 Dec 2009, 08:55
I was thinking about that, and my solution would run something like this:DennisBergkamp wrote:Actually, very tricky in Forge. Currently, damage is assigned to players and creatures as summed up integer values. It doesn't really keep track of what the source of the damage was, although I did hack something in which allows to track some sources of damage, for cards like Spiritmonger and Sengir Vampire.How hard is damage prevention?
Anyway, I just spent a few hours trying to add a "Card source" when assigning (or adding) damage, (which should make a lot more cards possible), but it's very tricky, since there are so many places in the code where damage is assigned/added. Anyway, after a lot a lot of debugging, I got it working for just the simple combat stuff (first strike, lifelink, double strike, single blockers). It seems to be, anyway. Multiple blockers I haven't tested yet, and it might have broken a bunch of other things
When damage is dealt, a table is generated with information about damage (mainly source and recipient). This table is then acted upon by replacement effects. When all effects are processed the damage is dealt (and here things like lifelink, wither or Ali from Cairo come into consideration). The exact algorithm would be:
Consolidate packets (if there are multiple with same source and recipient, leave only one with combined amount of damage).
For each packet, do the following:
If recipient is a creature, damage source doesn't have wither, and the pseudo-wither flag (set by Everlasting Torment) is false, increase the marked damage on the recipient by AMOUNT.
If recipient is a creature and (damage source has wither or the pseudo-wither flag is set) and no-counter flag on the recipient is false (to take into account Tatterkite), put AMOUNT -1/-1 counters on the recipient.
If recipient is a creature and source has deathtouch, mark the creature as "deathtouched" - will be checked by SBE later.
If recipient is a planeswalker, remove AMOUNT loyalty counters from it.
If recipient is a player and its worship flag is false (this flag is set by Ali from Cairo, Angel's Grace, Fortune Thief, Sustaining Spirit and Worship), make him/her lose AMOUNT life.
If recipient is a player and its worship flag is true, make him/her lose min(AMOUNT, LIFE_TOTAL - 1) life.
Send Damage event marking source, recipient, amount of damage and whether it was combat damage or not.
After all packets are processed, send DamageDealt event for each source, marking source, amount of damage and whether it was combat (I think it's impossible to do combat and noncombat damage at the same time). This event is important, for example, for "old-style lifelink" like on Armadillo Cloak, which triggers only once, no matter how many recipients of damage there was. Also, if source has lifelink, its controller (or owner if there is no controller) gains life here.
Send DamageReceived event for each recipient, marking recipient, amount of damage and whether it was combat. This is for triggers like Dromad Purebred, which gives you only 1 life even if it was damaged by multiple sources at once.
The exact logic can branch more, I just note that the "creature" and "planeswalker" branches shouldn't be mutually exclusive.
For simplicity, there would be one "packet" (if I use the old terminology) for each source/recipient combination (althought they could be split later).
The tricky part is when a player is required to choose what to prevent.
Examples:
I'm attacked with Hypnotic Specter and Augury Adept. I cast Healing Salve on myself to prevent 3 damage. I can either prevent 1 damage from Specter and 2 from Adept or vice versa, but I need to have a choice because one or the other will trigger on the damage and do its stuff.
I control an en-Kor creature that somehow got protection from white. I use its ability three times to redirect four points of damage to another creature I control, and I cast Healing Salve on that creature. Since each of the points was redirected by a separate effect, rules say I need to choose which three points will be prevented, exactly.
For these cases, there has to be a way to display the damage packet in a reasonable way, for example in a form of table.
Re: Current Known Bugs list
by Fracturedorb » 07 Dec 2009, 19:56
Timber Protector doesn't work quite right. If you have 2 of them in play they give each other the +1/+1 and indestructable but they don't effect other treefolk you control or forests like they are supposed to. Not sure the issue as they are considered treefolk by other cards.
- Fracturedorb
- Posts: 72
- Joined: 06 Jun 2009, 23:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Current Known Bugs list
by DennisBergkamp » 07 Dec 2009, 20:45
Currently, to a certain extent it works like this already in Forge. I mean, the Phantom Creatures for instance, or Planeswalkers. They get damaged, and a damage replacement effect occurs (remove a +1/+1 counter, or remove a loyalty counter). Wither and Deathtouch currently get evaluated too in the correct order and place, except it's a bit hacky and doesn't work 100% (wither for instance I don't think works correctly if there are multiple blockers). This is mostly because in Forge in combat, if creatures get assigned damage, it is treated as ONE damage source (it just sums the attack of multiple blockers).Marek14 wrote:I was thinking about that, and my solution would run something like this:DennisBergkamp wrote:Actually, very tricky in Forge. Currently, damage is assigned to players and creatures as summed up integer values. It doesn't really keep track of what the source of the damage was, although I did hack something in which allows to track some sources of damage, for cards like Spiritmonger and Sengir Vampire.How hard is damage prevention?
Anyway, I just spent a few hours trying to add a "Card source" when assigning (or adding) damage, (which should make a lot more cards possible), but it's very tricky, since there are so many places in the code where damage is assigned/added. Anyway, after a lot a lot of debugging, I got it working for just the simple combat stuff (first strike, lifelink, double strike, single blockers). It seems to be, anyway. Multiple blockers I haven't tested yet, and it might have broken a bunch of other things
When damage is dealt, a table is generated with information about damage (mainly source and recipient). This table is then acted upon by replacement effects. When all effects are processed the damage is dealt (and here things like lifelink, wither or Ali from Cairo come into consideration). The exact algorithm would be:
Consolidate packets (if there are multiple with same source and recipient, leave only one with combined amount of damage).
For each packet, do the following:
If recipient is a creature, damage source doesn't have wither, and the pseudo-wither flag (set by Everlasting Torment) is false, increase the marked damage on the recipient by AMOUNT.
If recipient is a creature and (damage source has wither or the pseudo-wither flag is set) and no-counter flag on the recipient is false (to take into account Tatterkite), put AMOUNT -1/-1 counters on the recipient.
If recipient is a creature and source has deathtouch, mark the creature as "deathtouched" - will be checked by SBE later.
If recipient is a planeswalker, remove AMOUNT loyalty counters from it.
If recipient is a player and its worship flag is false (this flag is set by Ali from Cairo, Angel's Grace, Fortune Thief, Sustaining Spirit and Worship), make him/her lose AMOUNT life.
If recipient is a player and its worship flag is true, make him/her lose min(AMOUNT, LIFE_TOTAL - 1) life.
Send Damage event marking source, recipient, amount of damage and whether it was combat damage or not.
After all packets are processed, send DamageDealt event for each source, marking source, amount of damage and whether it was combat (I think it's impossible to do combat and noncombat damage at the same time). This event is important, for example, for "old-style lifelink" like on Armadillo Cloak, which triggers only once, no matter how many recipients of damage there was. Also, if source has lifelink, its controller (or owner if there is no controller) gains life here.
Send DamageReceived event for each recipient, marking recipient, amount of damage and whether it was combat. This is for triggers like Dromad Purebred, which gives you only 1 life even if it was damaged by multiple sources at once.
The exact logic can branch more, I just note that the "creature" and "planeswalker" branches shouldn't be mutually exclusive.
For simplicity, there would be one "packet" (if I use the old terminology) for each source/recipient combination (althought they could be split later).
The tricky part is when a player is required to choose what to prevent.
Examples:
I'm attacked with Hypnotic Specter and Augury Adept. I cast Healing Salve on myself to prevent 3 damage. I can either prevent 1 damage from Specter and 2 from Adept or vice versa, but I need to have a choice because one or the other will trigger on the damage and do its stuff.
I control an en-Kor creature that somehow got protection from white. I use its ability three times to redirect four points of damage to another creature I control, and I cast Healing Salve on that creature. Since each of the points was redirected by a separate effect, rules say I need to choose which three points will be prevented, exactly.
For these cases, there has to be a way to display the damage packet in a reasonable way, for example in a form of table.
Another problem currently is that there is no source passed along, so for instance, cards like Swans of Bryn Argoll aren't possible. I'm very close to fixing this though (I spent a few hours on it this morning), and it looks like the combat code works fine again. Now each creature that gets damage assigned, has a HashMap containing the (separate) sources of damage and how much damage was assigned to the creature.
I'm not sure about Damage Prevention like Healing Salve (tricky stuff!), but with these code changes a lot of extra cards should be possible. Also, it should be possible to save a creature when giving it protection from {color} AFTER combat damage has been assigned. A good point you brought up is specifying whether a source is combat damage or not, I'll see if I can add that in easily.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Current Known Bugs list
by Triadasoul » 07 Dec 2009, 21:05
Drifting Meadow Cycling couldn't be activated.
- Triadasoul
- Posts: 223
- Joined: 21 Jun 2008, 20:17
- Has thanked: 0 time
- Been thanked: 4 times
Re: Current Known Bugs list
by Marek14 » 07 Dec 2009, 21:42
There can be also flags on damage marking it as unpreventable or unredirectable.DennisBergkamp wrote:Currently, to a certain extent it works like this already in Forge. I mean, the Phantom Creatures for instance, or Planeswalkers. They get damaged, and a damage replacement effect occurs (remove a +1/+1 counter, or remove a loyalty counter). Wither and Deathtouch currently get evaluated too in the correct order and place, except it's a bit hacky and doesn't work 100% (wither for instance I don't think works correctly if there are multiple blockers). This is mostly because in Forge in combat, if creatures get assigned damage, it is treated as ONE damage source (it just sums the attack of multiple blockers).
Another problem currently is that there is no source passed along, so for instance, cards like Swans of Bryn Argoll aren't possible. I'm very close to fixing this though (I spent a few hours on it this morning), and it looks like the combat code works fine again. Now each creature that gets damage assigned, has a HashMap containing the (separate) sources of damage and how much damage was assigned to the creature.
I'm not sure about Damage Prevention like Healing Salve (tricky stuff!), but with these code changes a lot of extra cards should be possible. Also, it should be possible to save a creature when giving it protection from {color} AFTER combat damage has been assigned. A good point you brought up is specifying whether a source is combat damage or not, I'll see if I can add that in easily.
Perhaps the easiest would be a global flag that would turn any damage prevention off. This is done by Everlasting Torment, Flaring Pain and Unstable Footing.
More specific unpreventable effects are Banefire, Demonfire, Flames of the Blood Hand, Lava Burst (which has also unredirectable damage, very rare instance), Lightning Surge, Pinpoint Avalanche, Urza's Rage, Volcano Hellion and Whippoorwill (also deals with unredirectable damage).
Excruciator is probably trickiest since its damage is unpreventable only as long as it's on the battlefield. Fortunately, that rarely matters in real life after combat damage changes - now it requires something like Hermetic Study and dying with ability on stack.
As for Healing Salve, as I say - it requires some capability to pick which points of damage to prevent.
Even more troublesome are things like Circles of Protection, I think, since you need to choose a source of damage, which is not trivial, UI-wise. (You can choose something that is no longer on battlefield, but is refered by something on stack, etc.) The simplest one is Circle of Protection: Shadow.
Re: Current Known Bugs list
by freestorageaccount » 07 Dec 2009, 23:34
Wow! All this talk about how to implement damage prevention sure is fascinating!
If you click a non-land card in your hand after Mox Diamond comes into play, you will lose both even if you hold a land (you shouldn't even be able to discard a card not asked for).
I lost the third game of a match by this and careless clicking -- who would've thought the game would let you do that?
EDIT: (1) Computer attacked with Rafiq of the Many, and (playing a similar deck) I was hoping to destroy it with a Giltspire Avenger between the dealing of first-strike and ordinary combat damage. Unfortunately, clicking it didn't call up the message asking for a target, so I ate a second dose of damage.
(2) Also, regenerating creatures can survive without having strictly positive toughness! I'm not sure how this is possible, since even in a not-perfectly-faithful-to-the-rules system the finite number of 'regenerate me' effects would be removed one at a time by the lethal-damage state-based effect until none were left. (If you want to be technical, zero toughness is its own state-based effect that kills a creature regardless of regeneration. I don't believe it counts as a destruction if a variation on Karmic Justice were to be printed.)
If you click a non-land card in your hand after Mox Diamond comes into play, you will lose both even if you hold a land (you shouldn't even be able to discard a card not asked for).

EDIT: (1) Computer attacked with Rafiq of the Many, and (playing a similar deck) I was hoping to destroy it with a Giltspire Avenger between the dealing of first-strike and ordinary combat damage. Unfortunately, clicking it didn't call up the message asking for a target, so I ate a second dose of damage.

-- freestorageaccount (= accurate forge notes) This is not a subliminal message. At least for the prosilver theme.
The Great Wall of Bugs. Gando, you will not be forgotten.
And a chip off the old block.
The Great Wall of Bugs. Gando, you will not be forgotten.
And a chip off the old block.
-
freestorageaccount - Posts: 246
- Joined: 21 Sep 2009, 01:42
- Location: Hilbert's Hotel
- Has thanked: 1 time
- Been thanked: 0 time
Re: Current Known Bugs list
by zerker2000 » 08 Dec 2009, 08:04
2)Correct, it should be moved to a graveyard from play without setting off any "destroy" triggers.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Current Known Bugs list
by Marek14 » 08 Dec 2009, 08:23
It does not - while this doesn't matter for Karmic Justice itself (which specifies noncreature permanents), it is important for Sacred Ground. I actually realized how its check could be implemented - if a land is put into your graveyard during resolution of spell or ability controlled by opponent, it's eligible for redemption via Sacred Ground! This would automatically take care of animated lands killed by damage or toughness (they don't die during the resolution, but just after), but special care would have to be taken of lands sacrificed for mana abilities during resolution (if opponent casts Mana Leak and you sacrifice lands to Squandered Resources in order to pay, Sacred Ground won't give them back).freestorageaccount wrote:Wow! All this talk about how to implement damage prevention sure is fascinating!
If you click a non-land card in your hand after Mox Diamond comes into play, you will lose both even if you hold a land (you shouldn't even be able to discard a card not asked for).I lost the third game of a match by this and careless clicking -- who would've thought the game would let you do that?
EDIT: (1) Computer attacked with Rafiq of the Many, and (playing a similar deck) I was hoping to destroy it with a Giltspire Avenger between the dealing of first-strike and ordinary combat damage. Unfortunately, clicking it didn't call up the message asking for a target, so I ate a second dose of damage.(2) Also, regenerating creatures can survive without having strictly positive toughness! I'm not sure how this is possible, since even in a not-perfectly-faithful-to-the-rules system the finite number of 'regenerate me' effects would be removed one at a time by the lethal-damage state-based effect until none were left. (If you want to be technical, zero toughness is its own state-based effect that kills a creature regardless of regeneration. I don't believe it counts as a destruction if a variation on Karmic Justice were to be printed.)
Similar logic could be used for cards that care if they're being discarded by opponent (Dodecapod, Guerilla Tactics, Mangara's Blessing, Metrognome, Psychic Purge, Pure Intentions, Quagnoth, Sand Golem, Spiritual Focus, Wilt-Liefe Liege, and (easier, without opponent check) Library of Leng). As long as card is not discarded by mana ability during resolution, it should work.
Yesterday, I also thought up a complete algorithm to do state-based checks:
Life check: For each player, if his life total is 0 or less and he doesn't have flags "lich" or "no-lose" set, mark him for loss. (Lich flag means he can survive on 0 or less life and is set by Lich, Lich's Tomb, Soul Echo and Transcendence. No-lose flag means you can't lose game by any means and is set by Angel's Grace and Platinum Angel.)
Library check: For each player, if he has "illegal-draw" flag (set by drawing when library is empty), set that flag to false, then mark that player for loss unless he has "no-lose" flag.
Poison check: For each player, if he has 10 or more poison counters, mark him for loss unless he has "no-lose" flag.
Token check: For each token that is in phased-out state or in any zone except the battlefield, mark it for disappearance.
Copy check: For each spell copy in a zone other than stack and for each card copy in a zone other than stack or battlefield, mark it for disappearance.
0 toughness check: Each creature with toughness 0 or less is marked for death.
Lethal damage check: Each creature with toughness > 0 and lethal damage marked is marked for destruction unless indestructible. If the creature has "ogre-enforcer" flag, it's subjected to additional check (whether a damage from any single source this turn is greater or equal to its toughness), and is only marked for destruction if it passes. (Marked for destruction means: if there is a regeneration shield on this permanent and it doesn't have the "no-regen" flag set, mark it for regeneration. Otherwise, mark it for death. The "no-regen" flag is set by Bone Shaman, Carbonize, Clergy of the Holy Nimbus, Disintegrate, Engulfing Flames, Flamebreak, Furnace Brood, Gravebind, Hurr Jackal, Incinerate, Jaya Ballard, Task Mage, Knight of the Holy Nimbus, Lim-Dul's Cohort, Orcish Healer, Runesword, Scorching Lava and Whippoorwill.)
Deathtouch check: If a creature has "deathtouched" flag set (which is set by taking damage from source with deathtouch), mark it for destruction unless it's indestructible.
Loyalty check: If a planeswalker has loyalty 0 (i.e. no loyalty counters), mark it for death.
Planeswalker check: For each planeswalker, mark it for death if there is another planeswalker that shares a planeswalker subtype with it.
Legend check: If the "no-legendary-rule" flag is not set (it's set by Mirror Gallery), then for each legendary permanent it's checked total number of legendary permanents of that name. If this exceeds "legendary-value" for the permanent (normally 1, but Brothers Yamazaki have 2), then the permanent is marked for death.
World check: As a World permanent is entering the battlefield, it does two things: sets its own "current-world" flag, and sets this flag to false for all World permanents that are already on the battlefield. If two or more are coming into play at the same time, they will all end up with the "current-world" flag set to true. The World check does following:
If there are at least two World permanents, check how many of them has "current-world" flag. If it's exactly one, mark for death all but that one. Otherwise, mark all for death.
Illegal Aura check: For each Aura, check whether it's attached to an existing object. If it is, check whether that object is legal (it matches Aura's Enchant ability, it doesn't have protection from any of the Aura's characteristics, and it's not stopped from being enchanted by the Aura by other means [except if the Aura is marked within the ability as "exception-aura", which is necessary for things like original Ward cycle or Anti-Magic Aura]. The effects which need to be checked for Aura legality are Anti-Magic Aura, Consecrate Land, Guardian Beast and Tetravus.) Any Aura found to be illegal is marked for death.
Equipment/Fortification check: For each Equipment and Fortification, check whether it's attached to an existing, legal object. Object is illegal if it's not a creature (for Equipment) or land (for Fortification), or if the object is somehow precluded from being equipped/fortified (by relevant protection or by being Goblin Brawler). Any illegal equipment or fortification is marked for unattachment.
Attachment check: For each creature that is attached to something, mark it for unattachment. Also, each permanent that is attached without being Aura, Equipment or Fortification is marked for unattachment.
Counter cancellation check: Each permanent that has at least one +1/+1 counter and at least one -1/-1 counter is marked for removal of the minimum amount of each.
Counter maximum check: Each permanent with a "counter-limit" variable (it consists of fields (counter_name, number)) that has more than "number" counters of "counter_name" type is marked for counter removal of enough "counter_name" counters to have only "number" of them. This rule currently only exists for the benefit of Rasputin Dreamweaver.
After all of this is performed, the marks are resolved.
Anything marked for disappearance ceases to exist.
Anything marked for unattachment is unattached.
Anything marked for counter removal has the requisite counters removed.
Anything marked for death is put into graveyard (ignoring if it's also marked for regeneration, which can only happen in very strange cases, as with creature with both deathtouch and wither).
Anything marked for regeneration regenerates (if there are multiple regeneration shields, controller can choose which one to apply - usually it's not important, but it's important if some of the shields come from Debt of Loyalty, Matopi Golem, Skeleton Scavengers, or Soldevi Sentry).
If one player is marked for loss, he loses the game. If both are marked for loss, the game is a draw.
Note that anything that looks back in time will only see situation before ANY of the effects were done. This leads to a well-known example of Kinsbaile Borderguard being killed by -1/-1 counters: the counters are removed at the same time Borderguard dies, so when it checks number of its counters later, it will still see all of them. If problematic, could be simulated by putting counter removals after deaths. The counters, though, are still removed and trigger the relevant abilities, like Protean Hydra.
Who is online
Users browsing this forum: Google [Bot] and 45 guests