Removed planeswalker uniqueness rule

This commit is contained in:
Evan Kranzler 2017-09-15 23:34:49 -04:00
parent 54ada45dfa
commit 217a17b864

View file

@ -60,9 +60,7 @@ import mage.filter.FilterCard;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterPlaneswalkerPermanent;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.combat.Combat;
@ -1934,33 +1932,6 @@ public abstract class GameImpl implements Game, Serializable {
}
}
}
//201300713 - 704.5j
// If a player controls two or more planeswalkers that share a planeswalker type, that player
// chooses one of them, and the rest are put into their owners' graveyards.
// This is called the "planeswalker uniqueness rule."
if (planeswalkers.size() > 1) { //don't bother checking if less than 2 planeswalkers in play
for (Permanent planeswalker : planeswalkers) {
for (SubType planeswalkertype : planeswalker.getSubtype(this)) {
FilterPlaneswalkerPermanent filterPlaneswalker = new FilterPlaneswalkerPermanent();
filterPlaneswalker.add(new SubtypePredicate(planeswalkertype));
filterPlaneswalker.add(new ControllerIdPredicate(planeswalker.getControllerId()));
if (getBattlefield().contains(filterPlaneswalker, planeswalker.getControllerId(), this, 2)) {
Player controller = this.getPlayer(planeswalker.getControllerId());
if (controller != null) {
Target targetPlaneswalkerToKeep = new TargetPermanent(filterPlaneswalker);
targetPlaneswalkerToKeep.setTargetName(planeswalkertype.toString() + " to keep?");
controller.chooseTarget(Outcome.Benefit, targetPlaneswalkerToKeep, null, this);
for (Permanent dupPlaneswalker : this.getBattlefield().getActivePermanents(filterPlaneswalker, planeswalker.getControllerId(), this)) {
if (!targetPlaneswalkerToKeep.getTargets().contains(dupPlaneswalker.getId())) {
movePermanentToGraveyardWithInfo(dupPlaneswalker);
}
}
}
return true;
}
}
}
}
//201300713 - 704.5k
// If a player controls two or more legendary permanents with the same name, that player
// chooses one of them, and the rest are put into their owners' graveyards.