From 93f446aaf0c30fc7eeeec37d087897eba9abd866 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Fri, 7 Sep 2012 19:05:07 +0400 Subject: [PATCH] fixed Issue#51: Gravecrawler could block creatures with and without flying. All tests pass now --- Mage/src/mage/abilities/AbilityImpl.java | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/mage/abilities/AbilityImpl.java index 1648581dfda..98fffb6eab9 100644 --- a/Mage/src/mage/abilities/AbilityImpl.java +++ b/Mage/src/mage/abilities/AbilityImpl.java @@ -482,16 +482,18 @@ public abstract class AbilityImpl> implements Ability { } } - MageObject object = game.getObject(getSourceId()); - if (object != null && !object.getAbilities().contains(this)) { - boolean found = false; - // unfortunately we need to handle double faced cards separately and only this way - if (object instanceof PermanentCard && ((PermanentCard)object).canTransform()) { - PermanentCard permanent = (PermanentCard)object; - found = permanent.getSecondCardFace().getAbilities().contains(this) || permanent.getCard().getAbilities().contains(this); - } - if (!found) { - return false; + if (!(this instanceof MageSingleton)) { + MageObject object = game.getObject(getSourceId()); + if (object != null && !object.getAbilities().contains(this)) { + boolean found = false; + // unfortunately we need to handle double faced cards separately and only this way + if (object instanceof PermanentCard && ((PermanentCard)object).canTransform()) { + PermanentCard permanent = (PermanentCard)object; + found = permanent.getSecondCardFace().getAbilities().contains(this) || permanent.getCard().getAbilities().contains(this); + } + if (!found) { + return false; + } } }