Fixed Issue#35. All tests pass now.

This commit is contained in:
magenoxx 2012-08-22 22:36:19 +04:00
parent aa071912cb
commit c61e4f2b32
13 changed files with 230 additions and 18 deletions

View file

@ -29,7 +29,6 @@
package mage.game.permanent;
import mage.Constants.Zone;
import mage.abilities.effects.ContinuousEffect;
import mage.cards.Card;
import mage.cards.LevelerCard;
import mage.game.Game;
@ -174,11 +173,7 @@ public class PermanentCard extends PermanentImpl<PermanentCard> {
ZoneChangeEvent event = new ZoneChangeEvent(this, sourceId, controllerId, fromZone, toZone);
if (!game.replaceEvent(event)) {
if (event.getFromZone().equals(Zone.BATTLEFIELD)) {
for (ContinuousEffect effect : game.getContinuousEffects().getLayeredEffects(game)) {
if (effect.getAffectedObjects().contains(getId())) {
effect.getAffectedObjects().remove(getId());
}
}
game.resetForSourceId(getId());
}
Player owner = game.getPlayer(ownerId);
game.rememberLKI(objectId, Zone.BATTLEFIELD, this);