[ORI] Fixed Erebos Titan trigger card selection.

This commit is contained in:
LevelX2 2015-07-02 09:25:42 +02:00
parent fe21465068
commit ead08ebdc3

View file

@ -45,9 +45,7 @@ import mage.constants.Duration;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.other.OwnerPredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
@ -61,11 +59,9 @@ import mage.players.Player;
public class ErebosTitan extends CardImpl { public class ErebosTitan extends CardImpl {
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent(); private final static FilterCreaturePermanent filter = new FilterCreaturePermanent();
private final static FilterCreatureCard filterCard = new FilterCreatureCard();
static { static {
filter.add(new ControllerPredicate(TargetController.OPPONENT)); filter.add(new ControllerPredicate(TargetController.OPPONENT));
filter.add(new OwnerPredicate(TargetController.OPPONENT));
} }
public ErebosTitan(UUID ownerId) { public ErebosTitan(UUID ownerId) {
@ -122,7 +118,10 @@ class ErebosTitanTriggeredAbility extends TriggeredAbilityImpl {
if (zEvent.getFromZone().equals(Zone.GRAVEYARD)) { if (zEvent.getFromZone().equals(Zone.GRAVEYARD)) {
Card card = game.getCard(zEvent.getTargetId()); Card card = game.getCard(zEvent.getTargetId());
Player controller = game.getPlayer(getControllerId()); Player controller = game.getPlayer(getControllerId());
return card != null && controller != null && controller.hasOpponent(card.getOwnerId(), game); return card != null
&& card.getCardType().contains(CardType.CREATURE)
&& controller != null
&& controller.hasOpponent(card.getOwnerId(), game);
} }
return false; return false;
} }