mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
fixed landwalk abilities counting all lands and not just defending player's (fixes #7427)
This commit is contained in:
parent
680083dd53
commit
5f80dba107
17 changed files with 145 additions and 125 deletions
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -9,21 +7,23 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class AyumiTheLastVisitor extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Legendary land");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Legendary land");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
public AyumiTheLastVisitor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
|
||||
|
@ -32,7 +32,6 @@ public final class AyumiTheLastVisitor extends CardImpl {
|
|||
|
||||
// Legendary landwalk
|
||||
this.addAbility(new LandwalkAbility(filter));
|
||||
|
||||
}
|
||||
|
||||
private AyumiTheLastVisitor(final AyumiTheLastVisitor card) {
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class DesertNomads extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("desert");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("desert");
|
||||
|
||||
static {
|
||||
filter.add(SubType.DESERT.getPredicate());
|
||||
|
|
|
@ -1,30 +1,37 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class DryadSophisticate extends CardImpl {
|
||||
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("nonbasic land");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
|
||||
}
|
||||
|
||||
public DryadSophisticate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.DRYAD);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Nonbasic landwalk
|
||||
this.addAbility(new LandwalkAbility(FilterLandPermanent.nonbasicLand()));
|
||||
this.addAbility(new LandwalkAbility(filter));
|
||||
}
|
||||
|
||||
private DryadSophisticate(final DryadSophisticate card) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -10,36 +8,36 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.ChoiceBasicLandType;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class GiantSlug extends CardImpl {
|
||||
|
||||
|
||||
public GiantSlug(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add(SubType.SLUG);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {5}: At the beginning of your next upkeep, choose a basic land type. Giant Slug gains landwalk of the chosen type until the end of that turn.
|
||||
AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility ability = new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(new GiantSlugEffect());
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateDelayedTriggeredAbilityEffect(ability), new ManaCostsImpl("{5}")));
|
||||
this.addAbility(new SimpleActivatedAbility(new CreateDelayedTriggeredAbilityEffect(
|
||||
new AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(new GiantSlugEffect())
|
||||
), new ManaCostsImpl("{5}")));
|
||||
}
|
||||
|
||||
private GiantSlug(final GiantSlug card) {
|
||||
|
@ -50,17 +48,17 @@ public final class GiantSlug extends CardImpl {
|
|||
public GiantSlug copy() {
|
||||
return new GiantSlug(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class GiantSlugEffect extends OneShotEffect {
|
||||
|
||||
public GiantSlugEffect() {
|
||||
GiantSlugEffect() {
|
||||
super(Outcome.AddAbility);
|
||||
this.staticText = "At the beginning of your next upkeep, choose a basic land type. {this} gains landwalk of the chosen type until the end of that turn";
|
||||
this.staticText = "At the beginning of your next upkeep, choose a basic land type. " +
|
||||
"{this} gains landwalk of the chosen type until the end of that turn";
|
||||
}
|
||||
|
||||
public GiantSlugEffect(final GiantSlugEffect effect) {
|
||||
private GiantSlugEffect(final GiantSlugEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -73,31 +71,42 @@ class GiantSlugEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (controller != null && sourcePermanent != null) {
|
||||
ChoiceImpl choices = new ChoiceBasicLandType();
|
||||
if (controller.choose(outcome, choices, game)) {
|
||||
game.informPlayers(sourcePermanent.getName() + ": Chosen basic land type is " + choices.getChoice());
|
||||
FilterLandPermanent filter = new FilterLandPermanent(choices.getChoice());
|
||||
if (choices.getChoice().equals("Plains")) {
|
||||
filter.add(SubType.PLAINS.getPredicate());
|
||||
}
|
||||
if (choices.getChoice().equals("Island")) {
|
||||
filter.add(SubType.ISLAND.getPredicate());
|
||||
}
|
||||
if (choices.getChoice().equals("Swamp")) {
|
||||
filter.add(SubType.SWAMP.getPredicate());
|
||||
}
|
||||
if (choices.getChoice().equals("Mountain")) {
|
||||
filter.add(SubType.MOUNTAIN.getPredicate());
|
||||
}
|
||||
if (choices.getChoice().equals("Forest")) {
|
||||
filter.add(SubType.FOREST.getPredicate());
|
||||
}
|
||||
Ability landwalkAbility = new LandwalkAbility(filter);
|
||||
game.addEffect(new GainAbilitySourceEffect(landwalkAbility, Duration.EndOfTurn, false), source);
|
||||
return true;
|
||||
}
|
||||
if (controller == null || sourcePermanent == null) {
|
||||
return false;
|
||||
}
|
||||
ChoiceImpl choices = new ChoiceBasicLandType();
|
||||
if (!controller.choose(outcome, choices, game)) {
|
||||
return false;
|
||||
}
|
||||
game.informPlayers(sourcePermanent.getName() + ": Chosen basic land type is " + choices.getChoice());
|
||||
switch (choices.getChoice()) {
|
||||
case "Plains":
|
||||
game.addEffect(new GainAbilitySourceEffect(
|
||||
new PlainswalkAbility(), Duration.EndOfTurn, false
|
||||
), source);
|
||||
return true;
|
||||
case "Island":
|
||||
game.addEffect(new GainAbilitySourceEffect(
|
||||
new IslandwalkAbility(), Duration.EndOfTurn, false
|
||||
), source);
|
||||
return true;
|
||||
case "Swamp":
|
||||
game.addEffect(new GainAbilitySourceEffect(
|
||||
new SwampwalkAbility(), Duration.EndOfTurn, false
|
||||
), source);
|
||||
return true;
|
||||
case "Mountain":
|
||||
game.addEffect(new GainAbilitySourceEffect(
|
||||
new MountainwalkAbility(), Duration.EndOfTurn, false
|
||||
), source);
|
||||
return true;
|
||||
case "Forest":
|
||||
game.addEffect(new GainAbilitySourceEffect(
|
||||
new ForestwalkAbility(), Duration.EndOfTurn, false
|
||||
), source);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -9,23 +7,24 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class LegionsOfLimDul extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("snow swamp");
|
||||
|
||||
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("snow swamp");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.SNOW.getPredicate());
|
||||
filter.add(SubType.SWAMP .getPredicate());
|
||||
filter.add(SubType.SWAMP.getPredicate());
|
||||
}
|
||||
|
||||
public LegionsOfLimDul(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
|
@ -10,22 +8,23 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class LivonyaSilone extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("Legendary land");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Legendary land");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
public LivonyaSilone(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{G}{G}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
|
@ -34,6 +33,7 @@ public final class LivonyaSilone extends CardImpl {
|
|||
|
||||
// First strike
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
|
||||
// legendary landwalk
|
||||
this.addAbility(new LandwalkAbility(filter));
|
||||
}
|
||||
|
|
|
@ -1,33 +1,25 @@
|
|||
package mage.cards.o;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.keyword.BandsWithOtherAbility;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
import mage.abilities.keyword.EchoAbility;
|
||||
import mage.abilities.keyword.FadingAbility;
|
||||
import mage.abilities.keyword.FlankingAbility;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.abilities.keyword.PhasingAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.abilities.keyword.RampageAbility;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class OldFogey extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("Homarids");
|
||||
private static final FilterLandPermanent filter2 = new FilterLandPermanent("snow-covered plains");
|
||||
private static final FilterControlledLandPermanent filter2 = new FilterControlledLandPermanent("snow-covered plains");
|
||||
|
||||
static {
|
||||
filter.add(SubType.HOMARID.getPredicate());
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -9,15 +7,16 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class RimeDryad extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("snow forest");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("snow forest");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.SNOW.getPredicate());
|
||||
|
@ -25,7 +24,7 @@ public final class RimeDryad extends CardImpl {
|
|||
}
|
||||
|
||||
public RimeDryad(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
this.subtype.add(SubType.DRYAD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
|
@ -9,25 +7,32 @@ import mage.abilities.keyword.EquipAbility;
|
|||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public final class TrailblazersBoots extends CardImpl {
|
||||
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("nonbasic land");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
|
||||
}
|
||||
|
||||
public TrailblazersBoots(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature has nonbasic landwalk.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new LandwalkAbility(FilterLandPermanent.nonbasicLand()), AttachmentType.EQUIPMENT)));
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||
new LandwalkAbility(filter), AttachmentType.EQUIPMENT
|
||||
)));
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import mage.abilities.keyword.LandwalkAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -31,6 +31,12 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class TravelersCloak extends CardImpl {
|
||||
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("chosen type");
|
||||
|
||||
static {
|
||||
filter.add(TravelersCloakChosenSubtypePredicate.instance);
|
||||
}
|
||||
|
||||
public TravelersCloak(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
@ -49,8 +55,6 @@ public final class TravelersCloak extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1), false));
|
||||
|
||||
// Enchanted creature has landwalk of the chosen type.
|
||||
FilterLandPermanent filter = new FilterLandPermanent("Landwalk of the chosen type");
|
||||
filter.add(TravelersCloakChosenSubtypePredicate.instance);
|
||||
Effect effect = new TravelersCloakGainAbilityAttachedEffect(filter);
|
||||
effect.setText("Enchanted creature has landwalk of the chosen type");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
@ -68,7 +72,7 @@ public final class TravelersCloak extends CardImpl {
|
|||
|
||||
class TravelersCloakGainAbilityAttachedEffect extends GainAbilityAttachedEffect {
|
||||
|
||||
public TravelersCloakGainAbilityAttachedEffect(FilterLandPermanent filter) {
|
||||
TravelersCloakGainAbilityAttachedEffect(FilterControlledLandPermanent filter) {
|
||||
super(new LandwalkAbility(filter), AttachmentType.AURA);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
|
||||
package mage.cards.z;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.RegenerateSourceEffect;
|
||||
import mage.abilities.keyword.LandwalkAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ZombieMusher extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("snow land");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("snow land");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.SNOW.getPredicate());
|
||||
|
@ -39,7 +37,7 @@ public final class ZombieMusher extends CardImpl {
|
|||
this.addAbility(new LandwalkAbility(filter));
|
||||
|
||||
// {snow}: Regenerate Zombie Musher.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{S}")));
|
||||
this.addAbility(new SimpleActivatedAbility(new RegenerateSourceEffect(), new ManaCostsImpl("{S}")));
|
||||
}
|
||||
|
||||
private ZombieMusher(final ZombieMusher card) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +11,7 @@ import mage.filter.common.FilterLandPermanent;
|
|||
*/
|
||||
public class ForestwalkAbility extends LandwalkAbility {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("forest");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("forest");
|
||||
|
||||
static {
|
||||
filter.add(SubType.FOREST.getPredicate());
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +11,7 @@ import mage.filter.common.FilterLandPermanent;
|
|||
*/
|
||||
public class IslandwalkAbility extends LandwalkAbility {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("island");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("island");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ISLAND.getPredicate());
|
||||
|
|
|
@ -5,7 +5,7 @@ import mage.abilities.EvasionAbility;
|
|||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
|
@ -20,15 +20,15 @@ public class LandwalkAbility extends EvasionAbility {
|
|||
*
|
||||
* @param filter
|
||||
*/
|
||||
public LandwalkAbility(FilterLandPermanent filter) {
|
||||
public LandwalkAbility(FilterControlledLandPermanent filter) {
|
||||
this(filter, true);
|
||||
}
|
||||
|
||||
public LandwalkAbility(FilterLandPermanent filter, boolean withHintText) {
|
||||
public LandwalkAbility(FilterControlledLandPermanent filter, boolean withHintText) {
|
||||
this.addEffect(new LandwalkEffect(filter, withHintText));
|
||||
}
|
||||
|
||||
public LandwalkAbility(final LandwalkAbility ability) {
|
||||
protected LandwalkAbility(final LandwalkAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
@ -49,15 +49,15 @@ public class LandwalkAbility extends EvasionAbility {
|
|||
|
||||
class LandwalkEffect extends RestrictionEffect {
|
||||
|
||||
protected FilterLandPermanent filter;
|
||||
private final FilterControlledLandPermanent filter;
|
||||
|
||||
public LandwalkEffect(FilterLandPermanent filter, boolean withHintText) {
|
||||
LandwalkEffect(FilterControlledLandPermanent filter, boolean withHintText) {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
this.filter = filter;
|
||||
staticText = setText(withHintText);
|
||||
}
|
||||
|
||||
public LandwalkEffect(final LandwalkEffect effect) {
|
||||
private LandwalkEffect(final LandwalkEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter.copy();
|
||||
}
|
||||
|
@ -95,6 +95,9 @@ class LandwalkEffect extends RestrictionEffect {
|
|||
}
|
||||
|
||||
private String setText(boolean withHintText) {
|
||||
if (filter.getMessage().startsWith("chosen type")) {
|
||||
return "landwalk of the chosen type";
|
||||
}
|
||||
// Swampwalk (This creature can't be blocked as long as defending player controls a Swamp.)
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(filter.getMessage()).append("walk");
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +11,7 @@ import mage.filter.common.FilterLandPermanent;
|
|||
*/
|
||||
public class MountainwalkAbility extends LandwalkAbility {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("mountain");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("mountain");
|
||||
|
||||
static {
|
||||
filter.add(SubType.MOUNTAIN.getPredicate());
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +11,7 @@ import mage.filter.common.FilterLandPermanent;
|
|||
*/
|
||||
public class PlainswalkAbility extends LandwalkAbility {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("plains");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("plains");
|
||||
|
||||
static {
|
||||
filter.add(SubType.PLAINS.getPredicate());
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -10,7 +11,7 @@ import mage.filter.common.FilterLandPermanent;
|
|||
*/
|
||||
public class SwampwalkAbility extends LandwalkAbility {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("swamp");
|
||||
private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("swamp");
|
||||
|
||||
static {
|
||||
filter.add(SubType.SWAMP.getPredicate());
|
||||
|
|
Loading…
Reference in a new issue