mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Added FilterControlledLandPermanent and revised affected cards.
This commit is contained in:
parent
7f629bf3dc
commit
f18337557c
74 changed files with 441 additions and 515 deletions
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,14 +50,13 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class FieldmistBorderpost extends CardImpl<FieldmistBorderpost> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("basic land");
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Fieldmist Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public FieldmistBorderpost (UUID ownerId) {
|
||||
|
@ -65,9 +64,15 @@ public class FieldmistBorderpost extends CardImpl<FieldmistBorderpost> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setWhite(true);
|
||||
this.color.setBlue(true);
|
||||
|
||||
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Fieldmist Borderpost's mana cost.
|
||||
Cost cost = new CompositeCost(new GenericManaCost(1), new ReturnToHandTargetCost(new TargetControlledPermanent(filter)), COST_DESCRIPTION);
|
||||
this.getSpellAbility().addAlternativeCost(new AlternativeCostImpl(ALTERNATIVE_COST_DESCRIPTION, cost));
|
||||
|
||||
// Fieldmist Borderpost enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// Tap: Add {W} or {U} to your mana pool.
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,14 +50,13 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class FirewildBorderpost extends CardImpl<FirewildBorderpost> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("basic land");
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Firewild Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public FirewildBorderpost (UUID ownerId) {
|
||||
|
@ -65,9 +64,15 @@ public class FirewildBorderpost extends CardImpl<FirewildBorderpost> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
|
||||
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Firewild Borderpost's mana cost.
|
||||
Cost cost = new CompositeCost(new GenericManaCost(1), new ReturnToHandTargetCost(new TargetControlledPermanent(filter)), COST_DESCRIPTION);
|
||||
this.getSpellAbility().addAlternativeCost(new AlternativeCostImpl(ALTERNATIVE_COST_DESCRIPTION, cost));
|
||||
|
||||
// Veinfire Firewild enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// Tap: Add {R} or {G} to your mana pool.
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.BlueManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,14 +50,13 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class MistveinBorderpost extends CardImpl<MistveinBorderpost> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("basic land");
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Mistvein Borderpos's mana cost";
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public MistveinBorderpost (UUID ownerId) {
|
||||
|
@ -65,9 +64,15 @@ public class MistveinBorderpost extends CardImpl<MistveinBorderpost> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setBlue(true);
|
||||
this.color.setBlack(true);
|
||||
|
||||
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Mistvein Borderpost's mana cost.
|
||||
Cost cost = new CompositeCost(new GenericManaCost(1), new ReturnToHandTargetCost(new TargetControlledPermanent(filter)), COST_DESCRIPTION);
|
||||
this.getSpellAbility().addAlternativeCost(new AlternativeCostImpl(ALTERNATIVE_COST_DESCRIPTION, cost));
|
||||
|
||||
// Mistvein Borderpost enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// Tap: Add {U} or {B} to your mana pool.
|
||||
this.addAbility(new BlueManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.BlackManaAbility;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,14 +50,13 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class VeinfireBorderpost extends CardImpl<VeinfireBorderpost> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("basic land");
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Veinfire Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public VeinfireBorderpost (UUID ownerId) {
|
||||
|
@ -65,9 +64,15 @@ public class VeinfireBorderpost extends CardImpl<VeinfireBorderpost> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setBlack(true);
|
||||
this.color.setRed(true);
|
||||
|
||||
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Veinfire Borderpost's mana cost.
|
||||
Cost cost = new CompositeCost(new GenericManaCost(1), new ReturnToHandTargetCost(new TargetControlledPermanent(filter)), COST_DESCRIPTION);
|
||||
this.getSpellAbility().addAlternativeCost(new AlternativeCostImpl(ALTERNATIVE_COST_DESCRIPTION, cost));
|
||||
|
||||
// Veinfire Borderpost enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// Tap: Add {B} or {R} to your mana pool.
|
||||
this.addAbility(new BlackManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,14 +50,13 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class WildfieldBorderpost extends CardImpl<WildfieldBorderpost> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("basic land");
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("basic land");
|
||||
private static final String COST_DESCRIPTION = "pay {1} and return a basic land you control to its owner's hand";
|
||||
private static final String ALTERNATIVE_COST_DESCRIPTION = "You may pay {1} and return a basic land you control to its owner's hand rather than pay Wildfield Borderpost's mana cost";
|
||||
|
||||
static {
|
||||
filter.add(new SupertypePredicate("Basic"));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public WildfieldBorderpost (UUID ownerId) {
|
||||
|
@ -65,9 +64,15 @@ public class WildfieldBorderpost extends CardImpl<WildfieldBorderpost> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setGreen(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
// You may pay {1} and return a basic land you control to its owner's hand rather than pay Wildfield Borderpost's mana cost.
|
||||
Cost cost = new CompositeCost(new GenericManaCost(1), new ReturnToHandTargetCost(new TargetControlledPermanent(filter)), COST_DESCRIPTION);
|
||||
this.getSpellAbility().addAlternativeCost(new AlternativeCostImpl(ALTERNATIVE_COST_DESCRIPTION, cost));
|
||||
|
||||
// Wildfield Borderpost enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {T}: Add {G} or {W} to your mana pool.
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class SageOfLatNam extends CardImpl<SageOfLatNam> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an Artifact");
|
||||
|
||||
static
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ public class SageOfLatNam extends CardImpl<SageOfLatNam> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {tap}, Sacrifice an artifact: Draw a card.
|
||||
// {T}, Sacrifice an artifact: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(1), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -39,8 +38,8 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,18 +49,16 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class GoblinTrenches extends CardImpl<GoblinTrenches> {
|
||||
|
||||
final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public GoblinTrenches(UUID ownerId) {
|
||||
super(ownerId, 104, "Goblin Trenches", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{W}");
|
||||
this.expansionSetCode = "APC";
|
||||
this.color.setRed(true);
|
||||
this.color.setWhite(true);
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new GoblinTrenchesToken(), 2), new GenericManaCost(2));
|
||||
|
||||
// {2}, Sacrifice a land: Put two 1/1 red and white Goblin Soldier creature tokens onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GoblinTrenchesToken(), 2), new GenericManaCost(2));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -28,16 +28,15 @@
|
|||
package mage.sets.apocalypse;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,12 +44,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class OvergrownEstate extends CardImpl<OvergrownEstate> {
|
||||
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public OvergrownEstate(UUID ownerId) {
|
||||
super(ownerId, 113, "Overgrown Estate", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{B}{G}{W}");
|
||||
|
@ -58,7 +52,9 @@ public class OvergrownEstate extends CardImpl<OvergrownEstate> {
|
|||
this.color.setGreen(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setWhite(true);
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainLifeEffect(3), new SacrificeTargetCost(new TargetControlledPermanent(filter))));
|
||||
|
||||
// Sacrifice a land: You gain 3 life.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new SacrificeTargetCost(new TargetControlledPermanent(filter))));
|
||||
}
|
||||
|
||||
public OvergrownEstate(final OvergrownEstate card) {
|
||||
|
|
|
@ -28,15 +28,14 @@
|
|||
package mage.sets.betrayersofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -44,10 +43,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class AkkiBlizzardHerder extends CardImpl<AkkiBlizzardHerder> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public AkkiBlizzardHerder(UUID ownerId) {
|
||||
super(ownerId, 91, "Akki Blizzard-Herder", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
@ -57,6 +53,7 @@ public class AkkiBlizzardHerder extends CardImpl<AkkiBlizzardHerder> {
|
|||
this.color.setRed(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// When Akki Blizzard-Herder dies, each player sacrifices a land.
|
||||
this.addAbility(new DiesTriggeredAbility(new SacrificeAllEffect(filter)));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ package mage.sets.betrayersofkamigawa;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -39,8 +38,6 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
|
@ -52,11 +49,6 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class AkkiRaider extends CardImpl<AkkiRaider> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public AkkiRaider(UUID ownerId) {
|
||||
super(ownerId, 92, "Akki Raider", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.expansionSetCode = "BOK";
|
||||
|
@ -65,6 +57,7 @@ public class AkkiRaider extends CardImpl<AkkiRaider> {
|
|||
this.color.setRed(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever a land is put into a graveyard from the battlefield, Akki Raider gets +1/+0 until end of turn.
|
||||
this.addAbility(new AkkiRaiderTriggeredAbility(new BoostSourceEffect(1,0,Duration.EndOfTurn)));
|
||||
}
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.betrayersofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -40,8 +39,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
|
@ -51,11 +50,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class Floodbringer extends CardImpl<Floodbringer> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land (return to hand)");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land you control (return to hand)");
|
||||
|
||||
public Floodbringer(UUID ownerId) {
|
||||
super(ownerId, 34, "Floodbringer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
@ -66,8 +61,9 @@ public class Floodbringer extends CardImpl<Floodbringer> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {2}, Return a land you control to its owner's hand: Tap target land.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(2));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -29,18 +29,17 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateOncePerTurnActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,11 +47,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class AkkiAvalanchers extends CardImpl<AkkiAvalanchers> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public AkkiAvalanchers(UUID ownerId) {
|
||||
super(ownerId, 151, "Akki Avalanchers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
|
@ -62,8 +57,9 @@ public class AkkiAvalanchers extends CardImpl<AkkiAvalanchers> {
|
|||
this.color.setRed(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
Ability ability = new ActivateOncePerTurnActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(2, 0, Constants.Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Sacrifice a land: Akki Avalanchers gets +2/+0 until end of turn. Activate this ability only once each turn.
|
||||
this.addAbility(new ActivateOncePerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 0, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filter))));
|
||||
}
|
||||
|
||||
public AkkiAvalanchers(final AkkiAvalanchers card) {
|
||||
|
|
|
@ -27,9 +27,12 @@
|
|||
*/
|
||||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import mage.Constants;
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -38,6 +41,7 @@ import mage.abilities.condition.common.FlippedCondition;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalContinousEffect;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CopyTokenEffect;
|
||||
|
@ -45,20 +49,20 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public class BudokaGardener extends CardImpl<BudokaGardener> {
|
||||
|
||||
public BudokaGardener(UUID ownerId) {
|
||||
super(ownerId, 202, "Budoka Gardener", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
@ -68,10 +72,12 @@ public class BudokaGardener extends CardImpl<BudokaGardener> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
this.flipCard = true;
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BudokaGardenerEffect(), new TapSourceCost());
|
||||
|
||||
// {T}: You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip Budoka Gardener.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BudokaGardenerEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCardInHand(new FilterLandCard()));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new DokaiWeaverofLife()), FlippedCondition.getInstance(), "")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new DokaiWeaverofLife()), FlippedCondition.getInstance(), "")));
|
||||
}
|
||||
|
||||
public BudokaGardener(final BudokaGardener card) {
|
||||
|
@ -86,8 +92,9 @@ public class BudokaGardener extends CardImpl<BudokaGardener> {
|
|||
}
|
||||
|
||||
class BudokaGardenerEffect extends OneShotEffect<BudokaGardenerEffect> {
|
||||
|
||||
BudokaGardenerEffect() {
|
||||
super(Constants.Outcome.PutLandInPlay);
|
||||
super(Outcome.PutLandInPlay);
|
||||
staticText = "You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip {this}";
|
||||
}
|
||||
|
||||
|
@ -99,7 +106,7 @@ class BudokaGardenerEffect extends OneShotEffect<BudokaGardenerEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Card c = game.getCard(targetPointer.getFirst(game, source));
|
||||
if (c != null) {
|
||||
c.moveToZone(Constants.Zone.BATTLEFIELD, source.getSourceId(), game, false);
|
||||
c.moveToZone(Zone.BATTLEFIELD, source.getSourceId(), game, false);
|
||||
}
|
||||
if (game.getBattlefield().count(DokaiWeaverofLifeToken.filterLands, source.getControllerId(), game) >= 10) {
|
||||
Permanent p = game.getPermanent(source.getSourceId());
|
||||
|
@ -118,6 +125,7 @@ class BudokaGardenerEffect extends OneShotEffect<BudokaGardenerEffect> {
|
|||
}
|
||||
|
||||
class DokaiWeaverofLife extends Token {
|
||||
|
||||
DokaiWeaverofLife() {
|
||||
super("Dokai, Weaver of Life", "");
|
||||
supertype.add("Legendary");
|
||||
|
@ -127,18 +135,17 @@ class DokaiWeaverofLife extends Token {
|
|||
subtype.add("Monk");
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(3);
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new DokaiWeaverofLifeToken()), new ManaCostsImpl("{4}{G}{G}"));
|
||||
|
||||
// {4}{G}{G}, {T}: Put an X/X green Elemental creature token onto the battlefield, where X is the number of lands you control.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DokaiWeaverofLifeToken()), new ManaCostsImpl("{4}{G}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
}
|
||||
|
||||
class DokaiWeaverofLifeToken extends Token {
|
||||
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("lands");
|
||||
|
||||
static {
|
||||
filterLands.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
final static FilterControlledPermanent filterLands = new FilterControlledLandPermanent("lands you control");
|
||||
|
||||
DokaiWeaverofLifeToken() {
|
||||
super("Elemental", "a X/X green Elemental creature token onto the battlefield, where X is the number of lands you control");
|
||||
|
@ -147,7 +154,8 @@ class DokaiWeaverofLifeToken extends Token {
|
|||
subtype.add("Elemental");
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filterLands), new PermanentsOnBattlefieldCount(filterLands), Constants.Duration.WhileOnBattlefield)));
|
||||
DynamicValue controlledLands = new PermanentsOnBattlefieldCount(filterLands);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(controlledLands, controlledLands, Duration.WhileOnBattlefield)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -52,12 +52,6 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class FeastOfWorms extends CardImpl<FeastOfWorms> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
|
||||
public FeastOfWorms (UUID ownerId) {
|
||||
super(ownerId, 216, "Feast of Worms", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
@ -101,10 +95,8 @@ class FeastOfWormsEffect extends OneShotEffect<FeastOfWormsEffect> {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
|
||||
Player targetPlayer = game.getPlayer(permanent.getControllerId());
|
||||
if (targetPlayer != null && permanent != null
|
||||
&& (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("land to sacrifice");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
if (targetPlayer != null && permanent != null && (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
|
||||
FilterPermanent filter = new FilterLandPermanent("land to sacrifice");
|
||||
filter.add(new ControllerIdPredicate(targetPlayer.getId()));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
|
@ -43,8 +42,6 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -58,12 +55,6 @@ import mage.watchers.common.DamagedByWatcher;
|
|||
*/
|
||||
public class Frostwielder extends CardImpl<Frostwielder> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public Frostwielder(UUID ownerId) {
|
||||
super(ownerId, 167, "Frostwielder", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
@ -128,11 +119,11 @@ class FrostwielderEffect extends ReplacementEffectImpl<FrostwielderEffect> {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) {
|
||||
DamagedByWatcher watcher =
|
||||
(DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
|
||||
if (watcher != null)
|
||||
return watcher.damagedCreatures.contains(event.getTargetId());
|
||||
}
|
||||
DamagedByWatcher watcher = (DamagedByWatcher) game.getState().getWatchers().get("DamagedByWatcher", source.getSourceId());
|
||||
if (watcher != null) {
|
||||
return watcher.damagedCreatures.contains(event.getTargetId());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,17 +43,15 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class JoyousRespite extends CardImpl<JoyousRespite> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public JoyousRespite (UUID ownerId) {
|
||||
super(ownerId, 216, "Joyous Respite", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{G}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
this.color.setGreen(true);
|
||||
|
||||
// You gain 1 life for each land you control.
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Outcome;
|
||||
|
@ -45,8 +44,6 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -62,12 +59,6 @@ import mage.watchers.common.DamagedByWatcher;
|
|||
*/
|
||||
public class KumanoMasterYamabushi extends CardImpl<KumanoMasterYamabushi> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public KumanoMasterYamabushi(UUID ownerId) {
|
||||
super(ownerId, 176, "Kumano, Master Yamabushi", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
@ -55,12 +55,6 @@ import mage.watchers.common.DamagedByWatcher;
|
|||
*/
|
||||
public class KumanosPupils extends CardImpl<KumanosPupils> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public KumanosPupils(UUID ownerId) {
|
||||
super(ownerId, 177, "Kumano's Pupils", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
this.expansionSetCode = "CHK";
|
||||
|
|
|
@ -29,10 +29,9 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -41,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -51,11 +50,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class MelokuTheCloudedMirror extends CardImpl<MelokuTheCloudedMirror> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public MelokuTheCloudedMirror(UUID ownerId) {
|
||||
super(ownerId, 74, "Meloku the Clouded Mirror", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||
|
@ -66,8 +61,11 @@ public class MelokuTheCloudedMirror extends CardImpl<MelokuTheCloudedMirror> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new MelokuTheCloudedMirrorToken(), 1), new GenericManaCost(1));
|
||||
|
||||
// {1}, Return a land you control to its owner's hand: Put a 1/1 blue Illusion creature token with flying onto the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new MelokuTheCloudedMirrorToken(), 1), new GenericManaCost(1));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -29,10 +29,9 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -41,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -50,11 +49,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class SoratamiCloudskater extends CardImpl<SoratamiCloudskater> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public SoratamiCloudskater(UUID ownerId) {
|
||||
super(ownerId, 86, "Soratami Cloudskater", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
@ -64,8 +59,12 @@ public class SoratamiCloudskater extends CardImpl<SoratamiCloudskater> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
//Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new GenericManaCost(2));
|
||||
|
||||
// {2}, Return a land you control to its owner's hand: Draw a card, then discard a card.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardControllerEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
|
@ -42,9 +41,9 @@ import mage.abilities.effects.common.UnblockableTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -54,11 +53,10 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class SoratamiMirrorGuard extends CardImpl<SoratamiMirrorGuard> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
private final static FilterCreaturePermanent filterCreature = new FilterCreaturePermanent("creature with power 2 or less");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filterCreature.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3));
|
||||
}
|
||||
|
||||
|
@ -73,6 +71,7 @@ public class SoratamiMirrorGuard extends CardImpl<SoratamiMirrorGuard> {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {2}, Return a land you control to its owner's hand: Target creature with power 2 or less is unblockable this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UnblockableTargetEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
|
|
|
@ -29,10 +29,9 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -41,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -51,11 +50,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class SoratamiMirrorMage extends CardImpl<SoratamiMirrorMage> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("lands");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control");
|
||||
|
||||
public SoratamiMirrorMage(UUID ownerId) {
|
||||
super(ownerId, 88, "Soratami Mirror-Mage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
|
@ -65,8 +60,12 @@ public class SoratamiMirrorMage extends CardImpl<SoratamiMirrorMage> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(3));
|
||||
|
||||
// {3}, Return three lands you control to their owner's hand: Return target creature to its owner's hand.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new GenericManaCost(3));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(3, 3, filter, false)));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -42,8 +41,8 @@ import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ShroudAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -52,11 +51,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class SoratamiRainshaper extends CardImpl<SoratamiRainshaper> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public SoratamiRainshaper(UUID ownerId) {
|
||||
super(ownerId, 89, "Soratami Rainshaper", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
@ -66,7 +61,11 @@ public class SoratamiRainshaper extends CardImpl<SoratamiRainshaper> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {3}, Return a land you control to its owner's hand: Target creature you control gains shroud until end of turn. (It can't be the target of spells or abilities.)
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new GainAbilityTargetEffect(ShroudAbility.getInstance(), Constants.Duration.EndOfTurn), new GenericManaCost(3));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
|
@ -81,5 +80,4 @@ public class SoratamiRainshaper extends CardImpl<SoratamiRainshaper> {
|
|||
public SoratamiRainshaper copy() {
|
||||
return new SoratamiRainshaper(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -41,8 +40,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -51,11 +50,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class SoratamiSavant extends CardImpl<SoratamiSavant> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public SoratamiSavant(UUID ownerId) {
|
||||
super(ownerId, 90, "Soratami Savant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
|
||||
|
@ -65,7 +60,11 @@ public class SoratamiSavant extends CardImpl<SoratamiSavant> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {3}, Return a land you control to its owner's hand: Counter target spell unless its controller pays {3}.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(3)), new GenericManaCost(3));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.addTarget(new TargetSpell());
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -42,8 +42,8 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
@ -53,11 +53,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class SoratamiSeer extends CardImpl<SoratamiSeer> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("lands");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control");
|
||||
|
||||
public SoratamiSeer(UUID ownerId) {
|
||||
super(ownerId, 91, "Soratami Seer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||
|
@ -67,8 +63,12 @@ public class SoratamiSeer extends CardImpl<SoratamiSeer> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new SoratamiSeerEffect(), new GenericManaCost(4));
|
||||
|
||||
// {4}, Return two lands you control to their owner's hand: Discard all the cards in your hand, then draw that many cards.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SoratamiSeerEffect(), new GenericManaCost(4));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(2, 2, filter, false)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -29,15 +29,15 @@
|
|||
package mage.sets.championsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Duration;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,19 +45,17 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class StrengthOfCedars extends CardImpl<StrengthOfCedars> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land your control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control");
|
||||
|
||||
public StrengthOfCedars (UUID ownerId) {
|
||||
super(ownerId, 245, "Strength of Cedars", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{G}");
|
||||
this.expansionSetCode = "CHK";
|
||||
this.subtype.add("Arcane");
|
||||
this.color.setGreen(true);
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter),
|
||||
new PermanentsOnBattlefieldCount(filter), Constants.Duration.EndOfTurn, true));
|
||||
|
||||
// Target creature gets +X/+X until end of turn, where X is the number of lands you control.
|
||||
DynamicValue controlledLands = new PermanentsOnBattlefieldCount(filter);
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(controlledLands, controlledLands, Duration.EndOfTurn, true));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
|
|
|
@ -29,10 +29,9 @@
|
|||
package mage.sets.conflux;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||
|
@ -44,8 +43,8 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -54,11 +53,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class GoblinRazerunners extends CardImpl<GoblinRazerunners> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public GoblinRazerunners (UUID ownerId) {
|
||||
super(ownerId, 64, "Goblin Razerunners", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}");
|
||||
|
@ -68,9 +64,13 @@ public class GoblinRazerunners extends CardImpl<GoblinRazerunners> {
|
|||
this.color.setRed(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}{R}"));
|
||||
|
||||
// {1}{R}, Sacrifice a land: Put a +1/+1 counter on Goblin Razerunners.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}{R}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
|
||||
// At the beginning of your end step, you may have Goblin Razerunners deal damage equal to the number of +1/+1 counters on it to target player.
|
||||
ability = new BeginningOfYourEndStepTriggeredAbility(new DamageTargetEffect(new CountersCount(CounterType.P1P1)), true);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -44,10 +44,10 @@ import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
|||
import mage.abilities.effects.common.continious.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
@ -58,10 +58,9 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class KnightOfTheReliquary extends CardImpl<KnightOfTheReliquary> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest or Plains");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("Forest or Plains");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.add(Predicates.or(new SubtypePredicate("Forest"), new SubtypePredicate("Plains")));
|
||||
}
|
||||
|
||||
|
@ -76,9 +75,11 @@ public class KnightOfTheReliquary extends CardImpl<KnightOfTheReliquary> {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Knight of the Reliquary gets +1/+1 for each land card in your graveyard.
|
||||
CardsInControllerGraveyardCount value = new CardsInControllerGraveyardCount(new FilterLandCard());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(value, value, Duration.WhileOnBattlefield)));
|
||||
|
||||
// {T}, Sacrifice a Forest or Plains: Search your library for a land card, put it onto the battlefield, then shuffle your library.
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard());
|
||||
Costs costs = new CostsImpl();
|
||||
costs.add(new TapSourceCost());
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.darksteel;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -43,8 +42,8 @@ import mage.abilities.effects.common.DrawCardControllerEffect;
|
|||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -53,20 +52,20 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class ArcaneSpyglass extends CardImpl<ArcaneSpyglass> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public ArcaneSpyglass (UUID ownerId) {
|
||||
super(ownerId, 93, "Arcane Spyglass", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
this.expansionSetCode = "DST";
|
||||
|
||||
// {2}, {T} , Sacrifice a land: Draw a card and put a charge counter on Arcane Spyglass.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(1), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Remove three charge counters from Arcane Spyglass: Draw a card.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(1), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance(3))));
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.abilities.effects.common.UnblockableAllEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
|
@ -49,11 +50,10 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class Tanglewalker extends CardImpl<Tanglewalker> {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
private static final FilterPermanent filter = new FilterLandPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.ARTIFACT));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public Tanglewalker(UUID ownerId) {
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.dissension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -40,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,11 +49,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class AzoriusChancery extends CardImpl<AzoriusChancery> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public AzoriusChancery(UUID ownerId) {
|
||||
super(ownerId, 170, "Azorius Chancery", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
|
@ -69,7 +65,7 @@ public class AzoriusChancery extends CardImpl<AzoriusChancery> {
|
|||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// {tap}: Add {W}{U} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0), new TapSourceCost()));
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 1, 0, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public AzoriusChancery(final AzoriusChancery card) {
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.dissension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -40,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -49,11 +48,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class RakdosCarnarium extends CardImpl<RakdosCarnarium> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public RakdosCarnarium(UUID ownerId) {
|
||||
super(ownerId, 178, "Rakdos Carnarium", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
|
@ -68,7 +64,7 @@ public class RakdosCarnarium extends CardImpl<RakdosCarnarium> {
|
|||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// {tap}: Add {B}{R} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0), new TapSourceCost()));
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 0, 1, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public RakdosCarnarium(final RakdosCarnarium card) {
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.dissension;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -40,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,11 +49,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class SimicGrowthChamber extends CardImpl<SimicGrowthChamber> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public SimicGrowthChamber(UUID ownerId) {
|
||||
super(ownerId, 180, "Simic Growth Chamber", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
|
@ -69,7 +65,7 @@ public class SimicGrowthChamber extends CardImpl<SimicGrowthChamber> {
|
|||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// {tap}: Add {G}{U} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0), new TapSourceCost()));
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 1, 0, 0, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public SimicGrowthChamber(final SimicGrowthChamber card) {
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.eventide;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -36,8 +35,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -45,11 +44,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class NoggleBridgebreaker extends CardImpl<NoggleBridgebreaker> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public NoggleBridgebreaker(UUID ownerId) {
|
||||
super(ownerId, 107, "Noggle Bridgebreaker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U/R}{U/R}");
|
||||
|
@ -60,6 +55,8 @@ public class NoggleBridgebreaker extends CardImpl<NoggleBridgebreaker> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Noggle Bridgebreaker enters the battlefield, return a land you control to its owner's hand.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
|
||||
ability.addTarget(new TargetControlledPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -28,19 +28,16 @@
|
|||
package mage.sets.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import javax.smartcardio.CardTerminal;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
@ -75,9 +72,8 @@ public class Karma extends CardImpl<Karma> {
|
|||
|
||||
class KarmaDamageTargetEffect extends OneShotEffect<KarmaDamageTargetEffect>{
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamps");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("Swamps");
|
||||
static{
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.add(new SubtypePredicate("Swamp"));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
|
@ -44,11 +44,7 @@ import mage.game.permanent.token.Token;
|
|||
*/
|
||||
public class DuneBroodNephilim extends CardImpl<DuneBroodNephilim> {
|
||||
|
||||
final static FilterControlledPermanent filterLands = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filterLands.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
final static FilterControlledPermanent filterLands = new FilterControlledLandPermanent();
|
||||
|
||||
public DuneBroodNephilim(UUID ownerId) {
|
||||
super(ownerId, 110, "Dune-Brood Nephilim", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{B}{R}{G}{W}");
|
||||
|
@ -60,6 +56,8 @@ public class DuneBroodNephilim extends CardImpl<DuneBroodNephilim> {
|
|||
this.color.setWhite(true);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever Dune-Brood Nephilim deals combat damage to a player, put a 1/1 colorless Sand creature token onto the battlefield for each land you control.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new CreateTokenEffect(new DuneBroodNephilimToken(), new PermanentsOnBattlefieldCount(filterLands)), false));
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -50,11 +50,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class GruulGuildmage extends CardImpl<GruulGuildmage> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public GruulGuildmage(UUID ownerId) {
|
||||
super(ownerId, 144, "Gruul Guildmage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R/G}{R/G}");
|
||||
|
@ -65,10 +61,13 @@ public class GruulGuildmage extends CardImpl<GruulGuildmage> {
|
|||
this.color.setGreen(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// {3}{R}, Sacrifice a land: Gruul Guildmage deals 2 damage to target player.
|
||||
Ability firstAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{3}{R}"));
|
||||
firstAbility.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
firstAbility.addTarget(new TargetPlayer(1));
|
||||
this.addAbility(firstAbility);
|
||||
// {3}{G}: Target creature gets +2/+2 until end of turn.
|
||||
Ability secondAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Constants.Duration.EndOfTurn), new ManaCostsImpl("{3}{G}"));
|
||||
secondAbility.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(secondAbility);
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
package mage.sets.guildpact;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -49,22 +49,23 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class IzzetBoilerworks extends CardImpl<IzzetBoilerworks> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(Constants.CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public IzzetBoilerworks(UUID ownerId) {
|
||||
super(ownerId, 159, "Izzet Boilerworks", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "GPT";
|
||||
|
||||
// Izzet Boilerworks enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// When Izzet Boilerworks enters the battlefield, return a land you control to its owner's hand.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
|
||||
Target target = new TargetControlledPermanent(filter);
|
||||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new TapSourceCost()));
|
||||
// {T}: Add {U}{R} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 1, 0, 0, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public IzzetBoilerworks(final IzzetBoilerworks card) {
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
package mage.sets.guildpact;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,22 +50,24 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class OrzhovBasilica extends CardImpl<OrzhovBasilica> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(Constants.CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public OrzhovBasilica(UUID ownerId) {
|
||||
super(ownerId, 161, "Orzhov Basilica", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "GPT";
|
||||
|
||||
// Orzhov Basilica enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// When Orzhov Basilica enters the battlefield, return a land you control to its owner's hand.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false);
|
||||
Target target = new TargetControlledPermanent(filter);
|
||||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new TapSourceCost()));
|
||||
|
||||
// {T}: Add {W}{B} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 0, 1, 1, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public OrzhovBasilica(final OrzhovBasilica card) {
|
||||
|
|
|
@ -32,13 +32,11 @@ import java.util.UUID;
|
|||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -73,6 +71,8 @@ public class YawningFissure extends CardImpl<YawningFissure> {
|
|||
|
||||
class YawningFissureEffect extends OneShotEffect<YawningFissureEffect> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public YawningFissureEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
this.staticText = "Each opponent sacrifices a land";
|
||||
|
@ -89,10 +89,6 @@ class YawningFissureEffect extends OneShotEffect<YawningFissureEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
for (UUID opponentId : opponents) {
|
||||
Player player = game.getPlayer(opponentId);
|
||||
|
|
|
@ -34,9 +34,10 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -44,18 +45,19 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class DestructiveForce extends CardImpl<DestructiveForce> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
private static final FilterControlledPermanent filterLand = new FilterControlledLandPermanent();
|
||||
private static final FilterPermanent filterCreature = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public DestructiveForce(UUID ownerId) {
|
||||
super(ownerId, 133, "Destructive Force", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{R}{R}");
|
||||
this.expansionSetCode = "M11";
|
||||
this.color.setRed(true);
|
||||
this.getSpellAbility().addEffect(new SacrificeAllEffect(5, filter));
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(5, new FilterCreaturePermanent()));
|
||||
|
||||
// Each player sacrifices five lands.
|
||||
this.getSpellAbility().addEffect(new SacrificeAllEffect(5, filterLand));
|
||||
// Destructive Force deals 5 damage to each creature.
|
||||
this.getSpellAbility().addEffect(new DamageAllEffect(5, filterCreature));
|
||||
}
|
||||
|
||||
public DestructiveForce(final DestructiveForce card) {
|
||||
|
|
|
@ -29,30 +29,27 @@
|
|||
package mage.sets.magic2012;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public class BountifulHarvest extends CardImpl<BountifulHarvest> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public BountifulHarvest(UUID ownerId) {
|
||||
super(ownerId, 166, "Bountiful Harvest", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{G}");
|
||||
this.expansionSetCode = "M12";
|
||||
this.color.setGreen(true);
|
||||
|
||||
// You gain 1 life for each land you control.
|
||||
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.BeastToken;
|
||||
|
@ -56,21 +56,24 @@ import mage.players.Player;
|
|||
* @author Loki
|
||||
*/
|
||||
public class GarrukPrimalHunter extends CardImpl<GarrukPrimalHunter> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land your control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public GarrukPrimalHunter (UUID ownerId) {
|
||||
super(ownerId, 174, "Garruk, Primal Hunter", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{G}{G}{G}");
|
||||
this.expansionSetCode = "M12";
|
||||
this.subtype.add("Garruk");
|
||||
this.color.setGreen(true);
|
||||
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), false));
|
||||
|
||||
// +1: Put a 3/3 green Beast creature token onto the battlefield.
|
||||
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new BeastToken()), 1));
|
||||
|
||||
// -3: Draw cards equal to the greatest power among creatures you control.
|
||||
this.addAbility(new LoyaltyAbility(new GarrukPrimalHunterEffect(), -3));
|
||||
|
||||
// -6: Put a 6/6 green Wurm creature token onto the battlefield for each land you control.
|
||||
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new WurmToken(), new PermanentsOnBattlefieldCount(filter)), -6));
|
||||
}
|
||||
|
||||
|
|
|
@ -28,16 +28,15 @@
|
|||
package mage.sets.magic2012;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -72,18 +71,11 @@ public class Smallpox extends CardImpl<Smallpox> {
|
|||
|
||||
class SmallpoxEffect extends OneShotEffect<SmallpoxEffect> {
|
||||
|
||||
private static final FilterPermanent filterCreature = new FilterPermanent("a creature you control");
|
||||
private static final FilterPermanent filterLand = new FilterPermanent("a land you control");
|
||||
|
||||
static {
|
||||
filterCreature.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filterCreature.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
filterLand.add(new CardTypePredicate(CardType.LAND));
|
||||
filterLand.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
}
|
||||
private static final FilterPermanent filterCreature = new FilterControlledCreaturePermanent();
|
||||
private static final FilterPermanent filterLand = new FilterControlledLandPermanent();
|
||||
|
||||
SmallpoxEffect() {
|
||||
super(Constants.Outcome.DestroyPermanent);
|
||||
super(Outcome.DestroyPermanent);
|
||||
staticText = "Each player loses 1 life, discards a card, sacrifices a creature, then sacrifices a land";
|
||||
}
|
||||
|
||||
|
@ -134,7 +126,7 @@ class SmallpoxEffect extends OneShotEffect<SmallpoxEffect> {
|
|||
Target target = new TargetControlledPermanent(1, 1, filter, false);
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
while (!target.isChosen() && target.canChoose(player.getId(), game)) {
|
||||
player.choose(Constants.Outcome.Sacrifice, target, source.getSourceId(), game);
|
||||
player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
|
||||
}
|
||||
|
||||
for ( int idx = 0; idx < target.getTargets().size(); idx++) {
|
||||
|
|
|
@ -38,8 +38,6 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,14 +46,8 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class RishadanPort extends CardImpl<RishadanPort> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("Tap Target Land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public RishadanPort(UUID ownerId) {
|
||||
super(ownerId, 324, "Rishadan Port", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
super(ownerId, 324, "Rishadan Port", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "MMQ";
|
||||
|
||||
// {tap}: Add {1} to your mana pool.
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
|
@ -44,17 +44,17 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
*/
|
||||
public class ShardVolley extends CardImpl<ShardVolley> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public ShardVolley(UUID ownerId) {
|
||||
super(ownerId, 103, "Shard Volley", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
this.expansionSetCode = "MOR";
|
||||
this.color.setRed(true);
|
||||
|
||||
// As an additional cost to cast Shard Volley, sacrifice a land.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
|
||||
// Shard Volley deals 3 damage to target creature or player.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
|
||||
}
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.planechase;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -40,33 +39,36 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class BorosGarrison extends CardImpl<BorosGarrison> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public BorosGarrison(UUID ownerId) {
|
||||
super(ownerId, 131, "Boros Garrison", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "HOP";
|
||||
|
||||
// Boros Garrison enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// When Boros Garrison enters the battlefield, return a land you control to its owner's hand.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect());
|
||||
Target target = new TargetControlledPermanent(filter);
|
||||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0), new TapSourceCost()));
|
||||
|
||||
// {T}: Add {R}{W} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(1, 0, 0, 1, 0, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public BorosGarrison(final BorosGarrison card) {
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -49,11 +49,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class GruulTurf extends CardImpl<GruulTurf> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(Constants.CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public GruulTurf(UUID ownerId) {
|
||||
super(ownerId, 134, "Gruul Turf", Rarity.COMMON, new CardType[]{CardType.LAND}, "");
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author * @author LevelX2
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DimirAqueduct extends mage.sets.ravnika.DimirAqueduct {
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
|
||||
/**
|
||||
*
|
||||
* @author * @author LevelX2
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class SelesnyaSanctuary extends mage.sets.ravnika.SelesnyaSanctuary {
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continious.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -50,13 +50,9 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class AgentOfShauku extends CardImpl<AgentOfShauku> {
|
||||
|
||||
final static FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
final static FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public AgentOfShauku(UUID ownerId) {
|
||||
public AgentOfShauku(UUID ownerId) {
|
||||
super(ownerId, 55, "Agent of Shauku", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.expansionSetCode = "PCY";
|
||||
this.subtype.add("Human");
|
||||
|
|
|
@ -40,9 +40,9 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.Filter.ComparisonType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
@ -54,16 +54,15 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class BogGlider extends CardImpl<BogGlider> {
|
||||
|
||||
final static FilterControlledPermanent landFilter = new FilterControlledPermanent("a land");
|
||||
final static FilterControlledPermanent landFilter = new FilterControlledLandPermanent("a land");
|
||||
private static final FilterCreatureCard filter = new FilterCreatureCard("Mercenary permanent card with converted mana cost 2 or less");
|
||||
|
||||
static {
|
||||
landFilter.add(new CardTypePredicate(CardType.LAND));
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Mercenary"));
|
||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 3));
|
||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.LessThan, 3));
|
||||
}
|
||||
|
||||
public BogGlider(UUID ownerId) {
|
||||
public BogGlider(UUID ownerId) {
|
||||
super(ownerId, 58, "Bog Glider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.expansionSetCode = "PCY";
|
||||
this.subtype.add("Human");
|
||||
|
@ -72,11 +71,13 @@ public class BogGlider extends CardImpl<BogGlider> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// {T}, Sacrifice a land: Search your library for a Mercenary permanent card with converted mana cost 2 or less and put it onto the battlefield. Then shuffle your library.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), new TapSourceCost());
|
||||
|
||||
// {T}, Sacrifice a land: Search your library for a Mercenary permanent card with converted mana cost 2 or less and put it onto the battlefield. Then shuffle your library.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(landFilter)));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public BogGlider(final BogGlider card) {
|
||||
|
|
|
@ -37,8 +37,8 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,13 +48,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
public class CoastalHornclaw extends CardImpl<CoastalHornclaw> {
|
||||
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
|
||||
static
|
||||
{
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("a land");
|
||||
|
||||
public CoastalHornclaw(UUID ownerId) {
|
||||
super(ownerId, 31, "Coastal Hornclaw", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.common.UnblockableSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
|
@ -49,11 +50,10 @@ import mage.filter.predicate.permanent.TappedPredicate;
|
|||
*/
|
||||
public class HazyHomunculus extends CardImpl<HazyHomunculus> {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
private static final FilterPermanent filter = new FilterLandPermanent();
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new TappedPredicate()));
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public HazyHomunculus(UUID ownerId) {
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.ravnika;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -40,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -49,12 +48,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class DimirAqueduct extends CardImpl<DimirAqueduct> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public DimirAqueduct(UUID ownerId) {
|
||||
super(ownerId, 276, "Dimir Aqueduct", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
|
@ -69,7 +64,7 @@ public class DimirAqueduct extends CardImpl<DimirAqueduct> {
|
|||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// {tap}: Add {U}{B} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0), new TapSourceCost()));
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 0, 1, 0, 1, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public DimirAqueduct(final DimirAqueduct card) {
|
||||
|
|
|
@ -26,12 +26,10 @@
|
|||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.ravnika;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -40,8 +38,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,11 +48,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class GolgariRotFarm extends CardImpl<GolgariRotFarm> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public GolgariRotFarm(UUID ownerId) {
|
||||
super(ownerId, 278, "Golgari Rot Farm", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
|
@ -69,7 +64,7 @@ public class GolgariRotFarm extends CardImpl<GolgariRotFarm> {
|
|||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// {tap}: Add {B}{G} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 1, 0, 0), new TapSourceCost()));
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 0, 1, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public GolgariRotFarm(final GolgariRotFarm card) {
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.ravnika;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
@ -40,8 +39,8 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -50,11 +49,9 @@ import mage.target.common.TargetControlledPermanent;
|
|||
* @author Loki
|
||||
*/
|
||||
public class SelesnyaSanctuary extends CardImpl<SelesnyaSanctuary> {
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
|
||||
public SelesnyaSanctuary(UUID ownerId) {
|
||||
super(ownerId, 281, "Selesnya Sanctuary", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
|
@ -69,7 +66,7 @@ public class SelesnyaSanctuary extends CardImpl<SelesnyaSanctuary> {
|
|||
ability.addTarget(target);
|
||||
this.addAbility(ability);
|
||||
// {tap}: Add {G}{W} to your mana pool.
|
||||
this.addAbility(new SimpleManaAbility(Constants.Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0), new TapSourceCost()));
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new Mana(0, 1, 0, 1, 0, 0, 0), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public SelesnyaSanctuary(final SelesnyaSanctuary card) {
|
||||
|
|
|
@ -34,8 +34,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.costs.common.ReturnToHandTargetCost;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -45,17 +45,16 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class Deprive extends CardImpl<Deprive> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public Deprive(UUID ownerId) {
|
||||
super(ownerId, 59, "Deprive", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}{U}");
|
||||
this.expansionSetCode = "ROE";
|
||||
this.color.setBlue(true);
|
||||
// As an additional cost to cast Deprive, return a land you control to its owner's hand.
|
||||
this.getSpellAbility().addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
|
||||
// Counter target spell.
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
}
|
||||
|
|
|
@ -28,10 +28,9 @@
|
|||
package mage.sets.saviorsofkamigawa;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -40,8 +39,8 @@ import mage.abilities.costs.mana.GenericManaCost;
|
|||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
|
@ -51,11 +50,7 @@ import mage.target.common.TargetLandPermanent;
|
|||
*/
|
||||
public class OboroBreezecaller extends CardImpl<OboroBreezecaller> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public OboroBreezecaller(UUID ownerId) {
|
||||
super(ownerId, 48, "Oboro Breezecaller", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
@ -65,9 +60,12 @@ public class OboroBreezecaller extends CardImpl<OboroBreezecaller> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {2}, Return a land you control to its owner's hand: Untap target land.
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(filter)));
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.costs.common.DiscardTargetCost;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
|
||||
|
@ -47,11 +47,7 @@ import mage.target.common.TargetCreatureOrPlayer;
|
|||
*/
|
||||
public class SeismicAssault extends CardImpl<SeismicAssault> {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("land card");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterCard filter = new FilterLandCard();
|
||||
|
||||
public SeismicAssault(UUID ownerId) {
|
||||
super(ownerId, 216, "Seismic Assault", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{R}{R}{R}");
|
||||
|
|
|
@ -42,9 +42,8 @@ import mage.abilities.effects.common.DrawCardControllerEffect;
|
|||
import mage.abilities.mana.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -115,6 +114,8 @@ class ElsewhereFlaskEffect extends OneShotEffect<ElsewhereFlaskEffect> {
|
|||
|
||||
class ElsewhereFlaskContinuousEffect extends ContinuousEffectImpl<ElsewhereFlaskContinuousEffect> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public ElsewhereFlaskContinuousEffect() {
|
||||
super(Constants.Duration.EndOfTurn, Constants.Outcome.Neutral);
|
||||
}
|
||||
|
@ -130,9 +131,6 @@ class ElsewhereFlaskContinuousEffect extends ContinuousEffectImpl<ElsewhereFlask
|
|||
|
||||
@Override
|
||||
public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) {
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.add(new ControllerPredicate(Constants.TargetController.YOU));
|
||||
String choice = (String) game.getState().getValue(source.getSourceId().toString() + "_ElsewhereFlask");
|
||||
if (choice != null) {
|
||||
for (Permanent land : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
|
|
|
@ -32,21 +32,18 @@ import java.util.UUID;
|
|||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.TargetController;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Abilities;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -61,7 +58,7 @@ public class ReflectingPool extends CardImpl<ReflectingPool> {
|
|||
super(ownerId, 328, "Reflecting Pool", Rarity.RARE, new CardType[]{CardType.LAND}, "");
|
||||
this.expansionSetCode = "TMP";
|
||||
|
||||
// {tap}: Add to your mana pool one mana of any type that a land you control could produce.
|
||||
// {T}: Add to your mana pool one mana of any type that a land you control could produce.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ReflectingPoolEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
|
@ -77,6 +74,8 @@ public class ReflectingPool extends CardImpl<ReflectingPool> {
|
|||
|
||||
class ReflectingPoolEffect extends ManaEffect<ReflectingPoolEffect> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public ReflectingPoolEffect() {
|
||||
super();
|
||||
staticText = "Add to your mana pool one mana of any type that a land you control could produce";
|
||||
|
@ -88,9 +87,6 @@ class ReflectingPoolEffect extends ManaEffect<ReflectingPoolEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
List<Permanent> lands = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game);
|
||||
for (Permanent land : lands) {
|
||||
Abilities<ManaAbility> mana = land.getAbilities().getManaAbilities(Constants.Zone.BATTLEFIELD);
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.tenth;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
|
@ -38,8 +37,8 @@ import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
|||
import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,11 +46,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class MolimoMaroSorcerer extends CardImpl<MolimoMaroSorcerer> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledPermanent("lands you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent("lands you control");
|
||||
|
||||
public MolimoMaroSorcerer(UUID ownerId) {
|
||||
super(ownerId, 280, "Molimo, Maro-Sorcerer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}{G}");
|
||||
|
@ -61,7 +56,10 @@ public class MolimoMaroSorcerer extends CardImpl<MolimoMaroSorcerer> {
|
|||
this.color.setGreen(true);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
// Molimo, Maro-Sorcerer's power and toughness are each equal to the number of lands you control.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter), Constants.Duration.WhileOnBattlefield)));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
|
@ -46,11 +46,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class CropRotation extends CardImpl<CropRotation> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a land.");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public CropRotation(UUID ownerId) {
|
||||
super(ownerId, 98, "Crop Rotation", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
|
@ -60,6 +56,7 @@ public class CropRotation extends CardImpl<CropRotation> {
|
|||
|
||||
// As an additional cost to cast Crop Rotation, sacrifice a land.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
|
||||
// Search your library for a land card and put that card onto the battlefield. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterLandCard()), false, Outcome.PutLandInPlay));
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -43,16 +43,14 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class RainOfSalt extends CardImpl<RainOfSalt> {
|
||||
|
||||
private final static FilterPermanent filter = new FilterPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private final static FilterPermanent filter = new FilterLandPermanent();
|
||||
|
||||
public RainOfSalt(UUID ownerId) {
|
||||
super(ownerId, 206, "Rain of Salt", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
|
||||
this.expansionSetCode = "USG";
|
||||
this.color.setRed(true);
|
||||
|
||||
// Destroy two target lands.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(2, filter));
|
||||
}
|
||||
|
|
|
@ -33,9 +33,9 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,11 +43,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
|
|||
*/
|
||||
public class Wildfire extends CardImpl<Wildfire> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent("land");
|
||||
|
||||
public Wildfire(UUID ownerId) {
|
||||
super(ownerId, 228, "Wildfire", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{R}{R}");
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
package mage.sets.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
@ -40,8 +39,9 @@ import mage.abilities.effects.common.CreateTokenEffect;
|
|||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.PlantToken;
|
||||
|
||||
|
@ -50,14 +50,12 @@ import mage.game.permanent.token.PlantToken;
|
|||
* @author Loki, nantuko, North
|
||||
*/
|
||||
public class AvengerOfZendikar extends CardImpl<AvengerOfZendikar> {
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Plant creature you control");
|
||||
private static final FilterControlledPermanent filterLand = new FilterControlledPermanent("land you control");
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("Plant creature you control");
|
||||
private static final FilterControlledPermanent filterLand = new FilterControlledLandPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new SubtypePredicate("Plant"));
|
||||
|
||||
filterLand.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public AvengerOfZendikar (UUID ownerId) {
|
||||
|
@ -69,7 +67,10 @@ public class AvengerOfZendikar extends CardImpl<AvengerOfZendikar> {
|
|||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// When Avenger of Zendikar enters the battlefield, put a 0/1 green Plant creature token onto the battlefield for each land you control.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PlantToken(), new PermanentsOnBattlefieldCount(filterLand)), false));
|
||||
|
||||
// Landfall - Whenever a land enters the battlefield under your control, you may put a +1/+1 counter on each Plant creature you control.
|
||||
this.addAbility(new LandfallAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), true));
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ import mage.abilities.effects.common.continious.ControlEnchantedEffect;
|
|||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -62,16 +61,16 @@ public class VaporSnare extends CardImpl<VaporSnare> {
|
|||
this.color.setBlue(true);
|
||||
|
||||
// Enchant creature
|
||||
// You control enchanted creature.
|
||||
// At the beginning of your upkeep, sacrifice Vapor Snare unless you return a land you control to its owner's hand.
|
||||
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.Detriment));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// You control enchanted creature.
|
||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ControlEnchantedEffect()));
|
||||
|
||||
// At the beginning of your upkeep, sacrifice Vapor Snare unless you return a land you control to its owner's hand.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new VaporSnareEffect(), Constants.TargetController.YOU, false));
|
||||
}
|
||||
|
||||
|
@ -87,14 +86,9 @@ public class VaporSnare extends CardImpl<VaporSnare> {
|
|||
|
||||
class VaporSnareEffect extends OneShotEffect<VaporSnareEffect> {
|
||||
|
||||
private static final FilterControlledPermanent filter;
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
private static final String effectText = "sacrifice {this} unless you return a land you control to its owner's hand";
|
||||
|
||||
static {
|
||||
filter = new FilterControlledPermanent("land");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
VaporSnareEffect( ) {
|
||||
super(Constants.Outcome.Sacrifice);
|
||||
staticText = effectText;
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterBasicLandCard;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
@ -47,7 +48,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class Harrow extends CardImpl<Harrow> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a land.");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
static{
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
|
@ -58,7 +59,10 @@ public class Harrow extends CardImpl<Harrow> {
|
|||
this.expansionSetCode = "ZEN";
|
||||
this.color.setGreen(true);
|
||||
|
||||
// As an additional cost to cast Harrow, sacrifice a land.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
|
||||
// Search your library for up to two basic land cards and put them onto the battlefield. Then shuffle your library.
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard());
|
||||
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay));
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
|||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
|
@ -54,12 +54,7 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class KhalniGem extends CardImpl<KhalniGem> {
|
||||
|
||||
private static final FilterControlledPermanent filter;
|
||||
|
||||
static {
|
||||
filter = new FilterControlledPermanent("land you control");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public KhalniGem (UUID ownerId) {
|
||||
super(ownerId, 205, "Khalni Gem", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
|
|
@ -33,8 +33,8 @@ import mage.Constants.Rarity;
|
|||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -44,19 +44,17 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class MagmaRift extends CardImpl<MagmaRift> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public MagmaRift(UUID ownerId) {
|
||||
super(ownerId, 136, "Magma Rift", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
// As an additional cost to cast Magma Rift, sacrifice a land.
|
||||
this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
|
||||
// Magma Rift deals 5 damage to target creature.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(5));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
@ -73,11 +73,7 @@ public class RuinousMinotaur extends CardImpl<RuinousMinotaur> {
|
|||
|
||||
class RuinousMinotaurTriggeredAbility extends TriggeredAbilityImpl<RuinousMinotaurTriggeredAbility> {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("land you control");
|
||||
|
||||
static {
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public RuinousMinotaurTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new SacrificeTargetEffect(), true);
|
||||
|
|
|
@ -36,8 +36,8 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||
import mage.abilities.keyword.ShroudAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -46,6 +46,8 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class ScytheTiger extends CardImpl<ScytheTiger> {
|
||||
|
||||
private final static FilterControlledPermanent filter = new FilterControlledLandPermanent();
|
||||
|
||||
public ScytheTiger(UUID ownerId) {
|
||||
super(ownerId, 183, "Scythe Tiger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
this.expansionSetCode = "ZEN";
|
||||
|
@ -55,11 +57,10 @@ public class ScytheTiger extends CardImpl<ScytheTiger> {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Shroud (This creature can't be the target of spells or abilities.)
|
||||
this.addAbility(ShroudAbility.getInstance());
|
||||
// When Scythe Tiger enters the battlefield, sacrifice it unless you
|
||||
// sacrifice a land.
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("a land");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
|
||||
// When Scythe Tiger enters the battlefield, sacrifice it unless you sacrifice a land.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter)))));
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.filter.common;
|
||||
|
||||
import mage.Constants.CardType;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class FilterControlledLandPermanent extends FilterControlledPermanent {
|
||||
|
||||
public FilterControlledLandPermanent() {
|
||||
this("land you control");
|
||||
}
|
||||
|
||||
public FilterControlledLandPermanent(String name) {
|
||||
super(name);
|
||||
this.add(new CardTypePredicate(CardType.LAND));
|
||||
}
|
||||
|
||||
public FilterControlledLandPermanent(final FilterControlledLandPermanent filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterControlledLandPermanent copy() {
|
||||
return new FilterControlledLandPermanent(this);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue