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