* True-Name Nemesis - Fixed that the protection ability did not work correctly concerning abilities of cards of target player in graveyard (e.g. Vengeful Pharaoh).

This commit is contained in:
LevelX2 2015-03-10 01:34:25 +01:00
parent ec5923903e
commit 0aeba13f30

View file

@ -34,6 +34,7 @@ import mage.abilities.Ability;
import mage.abilities.common.AsEntersBattlefieldAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.ProtectionAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
@ -154,6 +155,9 @@ class ProtectionFromPlayerAbility extends ProtectionAbility {
if (source instanceof StackObject) {
return !((StackObject) source).getControllerId().equals(playerId);
}
if (source instanceof Card) { // e.g. for Vengeful Pharaoh
return !((Card) source).getOwnerId().equals(playerId);
}
}
return true;
}