This commit is contained in:
jeffwadsworth 2019-11-30 05:27:00 -06:00
parent 22f5168386
commit 5a1fb5f90e

View file

@ -29,7 +29,6 @@ import mage.filter.Filter;
import mage.filter.FilterCard; import mage.filter.FilterCard;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate; import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.filter.predicate.permanent.ControllerIdPredicate;
@ -69,6 +68,7 @@ import java.io.IOException;
import java.io.Serializable; import java.io.Serializable;
import java.util.*; import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
import mage.filter.common.FilterControlledPermanent;
public abstract class GameImpl implements Game, Serializable { public abstract class GameImpl implements Game, Serializable {
@ -1011,7 +1011,6 @@ public abstract class GameImpl implements Game, Serializable {
} }
} }
public void initGameDefaultWatchers() { public void initGameDefaultWatchers() {
getState().addWatcher(new MorbidWatcher()); getState().addWatcher(new MorbidWatcher());
getState().addWatcher(new CastSpellLastTurnWatcher()); getState().addWatcher(new CastSpellLastTurnWatcher());
@ -1924,8 +1923,8 @@ public abstract class GameImpl implements Game, Serializable {
} }
} else { } else {
Filter auraFilter = spellAbility.getTargets().get(0).getFilter(); Filter auraFilter = spellAbility.getTargets().get(0).getFilter();
if (auraFilter instanceof FilterControlledCreaturePermanent) { if (auraFilter instanceof FilterControlledPermanent) {
if (!((FilterControlledCreaturePermanent) auraFilter).match(attachedTo, perm.getId(), perm.getControllerId(), this) if (!((FilterControlledPermanent) auraFilter).match(attachedTo, perm.getId(), perm.getControllerId(), this)
|| attachedTo.cantBeAttachedBy(perm, this)) { || attachedTo.cantBeAttachedBy(perm, this)) {
if (movePermanentToGraveyardWithInfo(perm)) { if (movePermanentToGraveyardWithInfo(perm)) {
somethingHappened = true; somethingHappened = true;