forked from External/mage
Planechase: refactor planes;
This commit is contained in:
parent
b6557201b4
commit
823d677068
25 changed files with 229 additions and 241 deletions
|
|
@ -12,6 +12,7 @@ import mage.abilities.effects.RestrictionEffect;
|
|||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.RollPlanarDieEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Planes;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
|
@ -33,7 +34,7 @@ public class TazeemPlane extends Plane {
|
|||
private static final String rule = "Creatures can't block";
|
||||
|
||||
public TazeemPlane() {
|
||||
this.setName("Plane - Tazeem");
|
||||
this.setPlaneType(Planes.PLANE_TAZEEM);
|
||||
this.setExpansionSetCodeForImage("PCA");
|
||||
|
||||
// Creatures can't block
|
||||
|
|
@ -75,7 +76,7 @@ class TazeemCantBlockAllEffect extends RestrictionEffect {
|
|||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Plane cPlane = game.getState().getCurrentPlane();
|
||||
|
||||
if (cPlane == null || !cPlane.getName().equalsIgnoreCase("Plane - Tazeem")) {
|
||||
if (cPlane == null || !cPlane.getPlaneType().equals(Planes.PLANE_TAZEEM)) {
|
||||
return false;
|
||||
}
|
||||
return filter.match(permanent, source.getSourceId(), source.getControllerId(), game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue