Planechase: refactor planes;

This commit is contained in:
Oleg Agafonov 2020-04-13 21:50:40 +04:00
parent b6557201b4
commit 823d677068
25 changed files with 229 additions and 241 deletions

View file

@ -1,8 +1,5 @@
package mage.game.command.planes;
import java.util.ArrayList;
import java.util.List;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
@ -15,10 +12,7 @@ import mage.abilities.effects.common.DrawCardTargetEffect;
import mage.abilities.effects.common.RollPlanarDieEffect;
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect.HandSizeModification;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.game.command.Plane;
@ -30,8 +24,10 @@ import mage.target.Target;
import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.PlanarRollWatcher;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author spjspj
*/
public class UndercityReachesPlane extends Plane {
@ -43,7 +39,7 @@ public class UndercityReachesPlane extends Plane {
}
public UndercityReachesPlane() {
this.setName("Plane - Undercity Reaches");
this.setPlaneType(Planes.PLANE_UNDERCITY_REACHES);
this.setExpansionSetCodeForImage("PCA");
// Whenever a creature deals combat damage to a player, its controller may a draw a card
@ -94,7 +90,7 @@ class UndercityReachesTriggeredAbility extends TriggeredAbilityImpl {
if (cPlane == null) {
return false;
}
if (!cPlane.getName().equalsIgnoreCase("Plane - Undercity Reaches")) {
if (!cPlane.getPlaneType().equals(Planes.PLANE_UNDERCITY_REACHES)) {
return false;
}