[HOU] Added 5 black cards.

This commit is contained in:
LevelX2 2017-06-24 14:00:21 +02:00
parent 99260e2083
commit 128b972765
53 changed files with 1143 additions and 920 deletions

View file

@ -27,6 +27,7 @@
*/
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
@ -43,8 +44,7 @@ import mage.cards.CardSetInfo;
import mage.cards.d.DarthVader;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
@ -52,20 +52,12 @@ import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author Styxo
*/
public class AnakinSkywalker extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public AnakinSkywalker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}{R}");
addSuperType(SuperType.LEGENDARY);
@ -81,7 +73,8 @@ public class AnakinSkywalker extends CardImpl {
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, true));
// Sacrifice another creature: Target creature gets -1/-1 until end of turn. Activate this ability only as a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);

View file

@ -27,6 +27,7 @@
*/
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -45,27 +46,18 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetNonlandPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public class AyliEternalPilgrim extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public AyliEternalPilgrim(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}");
this.addSuperType(SuperType.LEGENDARY);
@ -81,7 +73,7 @@ public class AyliEternalPilgrim extends CardImpl {
Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness());
effect.setText("You gain life equal to the sacrificed creature's toughness");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
// {1}{W}{B}, Sacrifice another creature: Exile target nonland permanent. Activate this ability only if you have at least 10 life more than your starting life total.
@ -91,7 +83,7 @@ public class AyliEternalPilgrim extends CardImpl {
new ManaCostsImpl("{1}{W}{B}"),
new AyliEternalPilgrimCondition(),
"{1}{W}{B}, Sacrifice another creature: Exile target nonland permanent. Activate this ability only if you have at least 10 life more than your starting life total");
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
ability.addTarget(new TargetNonlandPermanent());
this.addAbility(ability);
}

View file

@ -37,13 +37,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreatureOrPlayer;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -51,12 +49,6 @@ import java.util.UUID;
*/
public class BlazingHellhound extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public BlazingHellhound(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}");
this.subtype.add("Elemental");
@ -66,7 +58,7 @@ public class BlazingHellhound extends CardImpl {
// {1}, Sacrifice another creature: Blazing Hellhound deals 1 damage to target creature or player.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
ability.addTarget(new TargetCreatureOrPlayer());
this.addAbility(ability);
}

View file

@ -36,11 +36,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -48,11 +47,6 @@ import java.util.UUID;
*/
public class BloodBairn extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public BloodBairn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add("Vampire");
@ -64,7 +58,7 @@ public class BloodBairn extends CardImpl {
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new BoostSourceEffect(2, 2, Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filter, true))));
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true))));
}

View file

@ -40,12 +40,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -53,11 +51,6 @@ import java.util.UUID;
*/
public class BloodHost extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public BloodHost(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
this.subtype.add("Vampire");
@ -69,7 +62,7 @@ public class BloodHost extends CardImpl {
Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance());
effect.setText("Put a +1/+1 counter on {this}");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{1}{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
// and you gain 2 life.
effect = new GainLifeEffect(2);
effect.setText("and you gain 2 life");

View file

@ -47,8 +47,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -61,12 +60,6 @@ import mage.watchers.common.CreaturesDiedWatcher;
*/
public class BontuTheGlorified extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public BontuTheGlorified(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
addSuperType(SuperType.LEGENDARY);
@ -89,7 +82,7 @@ public class BontuTheGlorified extends CardImpl {
Effect effect = new GainLifeEffect(1);
effect.setText("and you gain 1 life");
ability.addEffect(effect);
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
}

View file

@ -47,8 +47,6 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
@ -56,6 +54,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -63,12 +62,6 @@ import java.util.UUID;
*/
public class ButcherOfTheHorde extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public ButcherOfTheHorde(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}{B}");
this.subtype.add("Demon");
@ -80,7 +73,8 @@ public class ButcherOfTheHorde extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Sacrifice another creature: Butcher of the Horde gains your choice of vigilance, lifelink, or haste until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new ButcherOfTheHordeEffect(), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filter, false))));
new ButcherOfTheHordeEffect(), new SacrificeTargetCost(
new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false))));
}
public ButcherOfTheHorde(final ButcherOfTheHorde card) {
@ -94,6 +88,7 @@ public class ButcherOfTheHorde extends CardImpl {
}
class ButcherOfTheHordeEffect extends OneShotEffect {
ButcherOfTheHordeEffect() {
super(Outcome.AddAbility);
staticText = "{this} gains your choice of vigilance, lifelink, or haste until end of turn";

View file

@ -36,12 +36,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
* Gatecrash FAQ (01.2013) You choose the color when the ability resolves.
@ -50,12 +48,6 @@ import java.util.UUID;
*/
public class CartelAristocrat extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public CartelAristocrat(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}");
this.subtype.add("Human");
@ -66,7 +58,8 @@ public class CartelAristocrat extends CardImpl {
// Sacrifice another creature: Cartel Aristocrat gains protection from the color of your choice until end of turn.
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD, new GainProtectionFromColorSourceEffect(Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filter))));
Zone.BATTLEFIELD, new GainProtectionFromColorSourceEffect(Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE))));
}
public CartelAristocrat(final CartelAristocrat card) {

View file

@ -38,11 +38,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -50,11 +49,6 @@ import java.util.UUID;
*/
public class CorpseBlockade extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public CorpseBlockade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add("Zombie");
@ -69,7 +63,7 @@ public class CorpseBlockade extends CardImpl {
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filter, true))));
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true))));
}
public CorpseBlockade(final CorpseBlockade card) {

View file

@ -35,8 +35,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -44,6 +42,7 @@ import mage.target.Target;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -93,9 +92,7 @@ class DiscipleOfBolasEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
filter.add(new AnotherPredicate());
Target target = new TargetControlledCreaturePermanent(1,1, filter, true);
Target target = new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true);
target.setRequired(true);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
controller.chooseTarget(outcome, target, source, game);
@ -112,5 +109,3 @@ class DiscipleOfBolasEffect extends OneShotEffect {
return false;
}
}

View file

@ -0,0 +1,108 @@
/*
* 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.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.EternalizeAbility;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class Dreamstealer extends CardImpl {
public Dreamstealer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add("Human");
this.subtype.add("Wizard");
this.power = new MageInt(1);
this.toughness = new MageInt(2);
// Menace
this.addAbility(new MenaceAbility());
// When Dreamstealer deals combat damage to a player, that player discards that many cards.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new DreamstealerDiscardEffect(), false, true));
// Eternalize {4}{B}{B}
this.addAbility(new EternalizeAbility(new ManaCostsImpl("{4}{B}{B}"), this));
}
public Dreamstealer(final Dreamstealer card) {
super(card);
}
@Override
public Dreamstealer copy() {
return new Dreamstealer(this);
}
}
class DreamstealerDiscardEffect extends OneShotEffect {
public DreamstealerDiscardEffect() {
super(Outcome.Discard);
this.staticText = "that player discards that many cards";
}
public DreamstealerDiscardEffect(final DreamstealerDiscardEffect effect) {
super(effect);
}
@Override
public DreamstealerDiscardEffect copy() {
return new DreamstealerDiscardEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
if (targetPlayer != null) {
int damage = (Integer) getValue("damage");
targetPlayer.discard(damage, false, source, game);
game.informPlayers(targetPlayer.getLogName() + "discards " + damage + " card(s)");
return true;
}
return false;
}
}

View file

@ -27,6 +27,7 @@
*/
package mage.cards.e;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -39,24 +40,21 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author Quercitron
*/
public class EaterOfHope extends CardImpl {
private static final FilterControlledCreaturePermanent regenFilter = new FilterControlledCreaturePermanent("another creature");
private static final FilterControlledCreaturePermanent destroyFilter = new FilterControlledCreaturePermanent("two other creatures");
static {
regenFilter.add(new AnotherPredicate());
destroyFilter.add(new AnotherPredicate());
}
@ -72,7 +70,7 @@ public class EaterOfHope extends CardImpl {
// {B}, Sacrifice another creature: Regenerate Eater of Hope.
Ability regenAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}"));
regenAbility.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, regenFilter, true)));
regenAbility.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true)));
this.addAbility(regenAbility);
// {2}{B}, Sacrifice two other creatures: Destroy target creature.

View file

@ -27,23 +27,18 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.combat.CantBlockUnlessYouControlSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
*
@ -51,6 +46,13 @@ import java.util.UUID;
*/
public class FelhideBrawler extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Minotaur");
static {
filter.add(new SubtypePredicate(SubType.MINOTAUR));
filter.add(new AnotherPredicate());
}
public FelhideBrawler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.subtype.add("Minotaur");
@ -59,7 +61,7 @@ public class FelhideBrawler extends CardImpl {
this.toughness = new MageInt(2);
// Felhide Brawler can't block unless you control another Minotaur.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FelhideBrawlerRestrictionEffect()));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockUnlessYouControlSourceEffect(filter)));
}
public FelhideBrawler(final FelhideBrawler card) {
@ -71,42 +73,3 @@ public class FelhideBrawler extends CardImpl {
return new FelhideBrawler(this);
}
}
class FelhideBrawlerRestrictionEffect extends RestrictionEffect {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Minotaur");
static {
filter.add(new SubtypePredicate(SubType.MINOTAUR));
filter.add(new AnotherPredicate());
}
public FelhideBrawlerRestrictionEffect() {
super(Duration.WhileOnBattlefield);
staticText = "{this} can't block unless you control another Minotaur";
}
public FelhideBrawlerRestrictionEffect(final FelhideBrawlerRestrictionEffect effect) {
super(effect);
}
@Override
public FelhideBrawlerRestrictionEffect copy() {
return new FelhideBrawlerRestrictionEffect(this);
}
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
return false;
}
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
if (permanent.getId().equals(source.getSourceId())
&& game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) == 0) {
return true;
}
return false;
}
}

View file

@ -40,8 +40,6 @@ import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
@ -53,6 +51,7 @@ import mage.watchers.Watcher;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -60,11 +59,6 @@ import java.util.UUID;
*/
public class FellShepherd extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public FellShepherd(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}");
this.subtype.add("Avatar");
@ -77,7 +71,7 @@ public class FellShepherd extends CardImpl {
// {B}, Sacrifice another creature: Target creature gets -2/-2 until end of turn.
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl("{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);

View file

@ -27,22 +27,19 @@
*/
package mage.cards.f;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterArtifactOrEnchantmentPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author North
@ -54,7 +51,6 @@ public class FiligreeFracture extends CardImpl {
// Destroy target artifact or enchantment. If that permanent was blue or black, draw a card.
this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent()));
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addEffect(new FiligreeFractureEffect());
}
@ -71,8 +67,8 @@ public class FiligreeFracture extends CardImpl {
class FiligreeFractureEffect extends OneShotEffect {
public FiligreeFractureEffect() {
super(Outcome.DrawCard);
this.staticText = "If that permanent was blue or black, draw a card";
super(Outcome.DestroyPermanent);
this.staticText = "Destroy target artifact or enchantment. If that permanent was blue or black, draw a card";
}
public FiligreeFractureEffect(final FiligreeFractureEffect effect) {
@ -87,10 +83,13 @@ class FiligreeFractureEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
if (player != null && permanent != null
&& (permanent.getColor(game).isBlack() || permanent.getColor(game).isBlue())) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (player != null && permanent != null) {
permanent.destroy(source.getSourceId(), game, true);
game.applyEffects();
if (permanent.getColor(game).isBlack() || permanent.getColor(game).isBlue()) {
player.drawCards(1, game);
}
return true;
}
return false;

View file

@ -45,8 +45,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
@ -60,12 +59,6 @@ import mage.target.common.TargetControlledPermanent;
*/
public class FleshCarver extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public FleshCarver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add("Human");
@ -78,7 +71,7 @@ public class FleshCarver extends CardImpl {
this.addAbility(IntimidateAbility.getInstance());
// {1}{B}, Sacrifice another creature: Put two +1/+1 counters on Flesh Carver.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new ManaCostsImpl("{1}{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
// When Flesh Carver dies, create an X/X black Horror creature token, where X is Flesh Carver's power.

View file

@ -42,13 +42,12 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.ZombieToken;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -56,12 +55,6 @@ import java.util.UUID;
*/
public class GhoulcallerGisa extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public GhoulcallerGisa(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
addSuperType(SuperType.LEGENDARY);
@ -79,7 +72,7 @@ public class GhoulcallerGisa extends CardImpl {
effect.setText("create X 2/2 black Zombie creature tokens, where X is the sacrificed creature's power");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
}

View file

@ -38,11 +38,10 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -50,12 +49,6 @@ import java.util.UUID;
*/
public class GobblingOoze extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public GobblingOoze(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add("Ooze");
@ -65,7 +58,7 @@ public class GobblingOoze extends CardImpl {
// {G}, Sacrifice another creature: Put a +1/+1 counter on Gobbling Ooze.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new ManaCostsImpl("{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
this.addAbility(ability);
}

View file

@ -27,6 +27,7 @@
*/
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldAllTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
@ -35,22 +36,13 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
* @author Loki
*/
public class GoldnightCommander extends CardImpl {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public GoldnightCommander(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add("Human");
@ -61,7 +53,8 @@ public class GoldnightCommander extends CardImpl {
this.toughness = new MageInt(2);
// Whenever another creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.EndOfTurn), filter, false, null, true));
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD,
new BoostControlledEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false, null, true));
}
public GoldnightCommander(final GoldnightCommander card) {

View file

@ -36,10 +36,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -47,12 +46,6 @@ import java.util.UUID;
*/
public class GriffinProtector extends CardImpl {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public GriffinProtector(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add("Griffin");
@ -64,7 +57,8 @@ public class GriffinProtector extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever another creature enters the battlefield under your control, Griffin Protector gets +1/+1 until end of turn.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), filter, false, null, true));
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn),
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false, null, true));
}

View file

@ -43,9 +43,7 @@ import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.game.events.GameEvent;
@ -54,6 +52,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -61,11 +60,6 @@ import java.util.UUID;
*/
public class GrimgrinCorpseBorn extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public GrimgrinCorpseBorn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}");
addSuperType(SuperType.LEGENDARY);
@ -83,7 +77,7 @@ public class GrimgrinCorpseBorn extends CardImpl {
// Sacrifice another creature: Untap Grimgrin and put a +1/+1 counter on it.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
ability.addEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
this.addAbility(ability);
// Whenever Grimgrin attacks, destroy target creature defending player controls, then put a +1/+1 counter on Grimgrin.

View file

@ -35,8 +35,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
/**
*
@ -44,12 +43,6 @@ import mage.filter.predicate.permanent.AnotherPredicate;
*/
public class HealerOfThePride extends CardImpl {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public HealerOfThePride(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
this.subtype.add("Cat");
@ -59,7 +52,8 @@ public class HealerOfThePride extends CardImpl {
this.toughness = new MageInt(3);
// Whenever another creature enters the battlefield under your control, you gain 2 life.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), filter, false, null, true));
this.addAbility(new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(2),
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false, null, true));
}

View file

@ -43,8 +43,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
@ -91,12 +90,6 @@ public class HeartPiercerManticore extends CardImpl {
class HeartPiercerManticoreSacrificeEffect extends OneShotEffect {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public HeartPiercerManticoreSacrificeEffect() {
super(Outcome.Damage);
this.staticText = "you may sacrifice another creature";
@ -115,7 +108,7 @@ class HeartPiercerManticoreSacrificeEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
Target target = new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true);
if (controller.choose(outcome, target, source.getSourceId(), game)) {
Permanent toSacrifice = game.getPermanent(target.getFirstTarget());
if (toSacrifice != null) {

View file

@ -0,0 +1,113 @@
/*
* 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.cards.h;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author LevelX2
*/
public class HourOfGlory extends CardImpl {
public HourOfGlory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}");
// Exile target creature. If that creature was a God, its controller reveals his or her hand and exiles all cards with the same name as that creature.
this.getSpellAbility().addEffect(new HourOfGloryEffect());
}
public HourOfGlory(final HourOfGlory card) {
super(card);
}
@Override
public HourOfGlory copy() {
return new HourOfGlory(this);
}
}
class HourOfGloryEffect extends OneShotEffect {
public HourOfGloryEffect() {
super(Outcome.Exile);
this.staticText = "Exile target creature. If that creature was a God, its controller reveals his or her hand and exiles all cards with the same name as that creature";
}
public HourOfGloryEffect(final HourOfGloryEffect effect) {
super(effect);
}
@Override
public HourOfGloryEffect copy() {
return new HourOfGloryEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = source.getSourceObject(game);
if (controller != null && sourceObject != null) {
Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
if (targetCreature != null) {
controller.moveCards(targetCreature, Zone.EXILED, source, game);
if (targetCreature.hasSubtype(SubType.GOD.getDescription(), game)) {
game.applyEffects();
Player targetController = game.getPlayer(targetCreature.getControllerId());
if (targetController != null) {
targetController.revealCards(sourceObject.getIdName(), targetController.getHand(), game);
Set<Card> toExile = new HashSet<>();
for (Card card : targetController.getHand().getCards(game)) {
if (card.getName().equals(targetCreature.getName())) {
toExile.add(card);
}
}
targetController.moveCards(toExile, Zone.EXILED, source, game);
}
}
}
return true;
}
return false;
}
}

View file

@ -29,21 +29,17 @@ package mage.cards.h;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.combat.CantBlockUnlessYouControlSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
@ -51,6 +47,13 @@ import mage.game.permanent.Permanent;
*/
public class HowlpackWolf extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Wolf or Werewolf");
static {
filter.add(Predicates.or(new SubtypePredicate(SubType.WOLF), new SubtypePredicate(SubType.WEREWOLF)));
filter.add(new AnotherPredicate());
}
public HowlpackWolf(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add("Wolf");
@ -58,7 +61,7 @@ public class HowlpackWolf extends CardImpl {
this.toughness = new MageInt(3);
// Howlpack Wolf can't block unless you control another Wolf or Werewolf.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HowlpackWolfRestrictionEffect()));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockUnlessYouControlSourceEffect(filter)));
}
public HowlpackWolf(final HowlpackWolf card) {
@ -70,39 +73,3 @@ public class HowlpackWolf extends CardImpl {
return new HowlpackWolf(this);
}
}
class HowlpackWolfRestrictionEffect extends RestrictionEffect {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Wolf or Werewolf");
static {
filter.add(Predicates.or(new SubtypePredicate(SubType.WOLF), new SubtypePredicate(SubType.WEREWOLF)));
filter.add(new AnotherPredicate());
}
public HowlpackWolfRestrictionEffect() {
super(Duration.WhileOnBattlefield);
staticText = "{this} can't block unless you control another Wolf or Werewolf";
}
public HowlpackWolfRestrictionEffect(final HowlpackWolfRestrictionEffect effect) {
super(effect);
}
@Override
public HowlpackWolfRestrictionEffect copy() {
return new HowlpackWolfRestrictionEffect(this);
}
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
return false;
}
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return permanent.getId().equals(source.getSourceId())
&& game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) == 0;
}
}

View file

@ -39,14 +39,13 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SupertypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -55,10 +54,8 @@ import java.util.UUID;
public class JaliraMasterPolymorphist extends CardImpl {
private static final FilterCreatureCard filterCard = new FilterCreatureCard("nonlegendary creature card");
private static final FilterControlledCreaturePermanent filterPermanent = new FilterControlledCreaturePermanent("another creature");
static {
filterPermanent.add(new AnotherPredicate());
filterCard.add(Predicates.not(new SupertypePredicate(SuperType.LEGENDARY)));
}
@ -75,7 +72,7 @@ public class JaliraMasterPolymorphist extends CardImpl {
// Put that card onto the battlefield and the rest on the bottom of your library in a random order.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RevealCardsFromLibraryUntilEffect(filterCard, Zone.BATTLEFIELD, Zone.LIBRARY), new ManaCostsImpl("{2}{U}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterPermanent, true)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true)));
this.addAbility(ability);
}

View file

@ -42,15 +42,14 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -60,10 +59,8 @@ public class JaradGolgariLichLord extends CardImpl {
private static final FilterControlledPermanent filterSwamp = new FilterControlledPermanent("a Swamp");
private static final FilterControlledPermanent filterForest = new FilterControlledPermanent("a Forest");
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
filterSwamp.add(new SubtypePredicate(SubType.SWAMP));
filterForest.add(new SubtypePredicate(SubType.FOREST));
}
@ -74,8 +71,6 @@ public class JaradGolgariLichLord extends CardImpl {
this.subtype.add("Zombie");
this.subtype.add("Elf");
this.power = new MageInt(2);
this.toughness = new MageInt(2);
@ -86,7 +81,7 @@ public class JaradGolgariLichLord extends CardImpl {
// {1}{B}{G}, Sacrifice another creature: Each opponent loses life equal to the sacrificed creature's power.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeOpponentsEffect(new SacrificeCostCreaturesPower()), new ManaCostsImpl("{1}{B}{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
this.addAbility(ability);
// Sacrifice a Swamp and a Forest: Return Jarad from your graveyard to your hand.

View file

@ -44,15 +44,13 @@ import mage.constants.CardType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessPredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -60,11 +58,9 @@ import java.util.UUID;
*/
public class KheruBloodsucker extends CardImpl {
private static final FilterControlledPermanent anotherFilter = new FilterControlledCreaturePermanent("another creature");
private static final FilterCreaturePermanent toughnessFilter = new FilterCreaturePermanent("a creature you control with toughness 4 or greater");
static {
anotherFilter.add(new AnotherPredicate());
toughnessFilter.add(new ControllerPredicate(TargetController.YOU));
toughnessFilter.add(new ToughnessPredicate(ComparisonType.MORE_THAN, 3));
}
@ -85,7 +81,7 @@ public class KheruBloodsucker extends CardImpl {
// {2}{B}, Sacrifice another creature: Put a +1/+1 counter on Kheru Bloodsucker.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl<>("{2}{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(anotherFilter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
}

View file

@ -41,9 +41,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledPermanent;
/**
@ -52,11 +50,6 @@ import mage.target.common.TargetControlledPermanent;
*/
public class KheruDreadmaw extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public KheruDreadmaw(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add("Zombie");
@ -72,7 +65,7 @@ public class KheruDreadmaw extends CardImpl {
Effect effect = new GainLifeEffect(new SacrificeCostCreaturesToughness());
effect.setText("You gain life equal to the sacrificed creature's toughness");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{1}{G}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
}

View file

@ -38,9 +38,7 @@ import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
/**
*
@ -48,11 +46,6 @@ import mage.filter.predicate.permanent.AnotherPredicate;
*/
public class KruinStriker extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public KruinStriker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.subtype.add("Human");
@ -62,7 +55,7 @@ public class KruinStriker extends CardImpl {
this.toughness = new MageInt(1);
// Whenever another creature enters the battlefield under your control, Kruin Striker gets +1/+0 and gains trample until end of turn.
Ability ability = new EntersBattlefieldAllTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), filter,
Ability ability = new EntersBattlefieldAllTriggeredAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE,
"Whenever another creature enters the battlefield under your control, Kruin Striker gets +1/+0 and gains trample until end of turn.");
ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
this.addAbility(ability);

View file

@ -0,0 +1,105 @@
/*
* 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.cards.l;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
/**
*
* @author LevelX2
*/
public class LilianasDefeat extends CardImpl {
public LilianasDefeat(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent("black creature or black planeswalker");
filter.add(new ColorPredicate(ObjectColor.BLACK));
// Destroy target black creature or black planeswalker. If that permanent was a Liliana planeswalker, her controller loses 3 life.
this.getSpellAbility().addTarget(new TargetPermanent(filter));
}
public LilianasDefeat(final LilianasDefeat card) {
super(card);
}
@Override
public LilianasDefeat copy() {
return new LilianasDefeat(this);
}
}
class LilianasDefeatEffect extends OneShotEffect {
public LilianasDefeatEffect() {
super(Outcome.DestroyPermanent);
this.staticText = "Destroy target black creature or black planeswalker. If that permanent was a Liliana planeswalker, her controller loses 3 life";
}
public LilianasDefeatEffect(final LilianasDefeatEffect effect) {
super(effect);
}
@Override
public LilianasDefeatEffect copy() {
return new LilianasDefeatEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (player != null && permanent != null) {
permanent.destroy(source.getSourceId(), game, true);
game.applyEffects();
if (permanent.isPlaneswalker() && permanent.getSubtype(game).contains(SubType.LILIANA.getDescription())) {
Player permanentController = game.getPlayer(permanent.getControllerId());
if (permanentController != null) {
permanentController.loseLife(3, game, false);
}
}
return true;
}
return false;
}
}

View file

@ -46,8 +46,8 @@ import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
@ -57,12 +57,6 @@ import mage.game.permanent.Permanent;
*/
public class LukeSkywalker extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public LukeSkywalker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}{U}");
this.addSuperType(SuperType.LEGENDARY);
@ -78,7 +72,8 @@ public class LukeSkywalker extends CardImpl {
this.addAbility(VigilanceAbility.getInstance());
// Whenever another creature enters the battlefield under your conrol, put a +1/+1 counter on Luke Skywalker.
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new FilterControlledCreaturePermanent(filter)));
this.addAbility(new EntersBattlefieldAllTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
new FilterControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
// Remove all +1/+1 counters from Luke Skywalker: Luke gains hexproof until end of turn. Activate this ability only if at least one +1/+1 counter is removed this way.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(HexproofAbility.getInstance(), Duration.EndOfTurn), new LukeSkywalkerCost()));

View file

@ -0,0 +1,77 @@
/*
* 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.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.combat.CantBlockUnlessYouControlSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
/**
*
* @author LevelX2
*/
public class MauraudingBoneslasher extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Zombie");
static {
filter.add(new SubtypePredicate(SubType.ZOMBIE));
filter.add(new AnotherPredicate());
}
public MauraudingBoneslasher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add("Zombie");
this.subtype.add("Minotaur");
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Marauding Boneslasher can't block unless you control another Zombie.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockUnlessYouControlSourceEffect(filter)));
}
public MauraudingBoneslasher(final MauraudingBoneslasher card) {
super(card);
}
@Override
public MauraudingBoneslasher copy() {
return new MauraudingBoneslasher(this);
}
}

View file

@ -29,19 +29,13 @@ package mage.cards.m;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionEffect;
import mage.abilities.effects.common.combat.CantBlockUnlessYouControlSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
@ -56,7 +50,7 @@ public class MindlessNull extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MindlessNullEffect()));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockUnlessYouControlSourceEffect(new FilterControlledPermanent("Vampire"))));
}
public MindlessNull(final MindlessNull card) {
@ -68,33 +62,3 @@ public class MindlessNull extends CardImpl {
return new MindlessNull(this);
}
}
class MindlessNullEffect extends RestrictionEffect {
private final FilterControlledPermanent filter = new FilterControlledPermanent("Vampire");
public MindlessNullEffect() {
super(Duration.WhileOnBattlefield);
filter.add(new SubtypePredicate(SubType.VAMPIRE));
staticText = "{this} can't block unless you control a Vampire";
}
public MindlessNullEffect(final MindlessNullEffect effect) {
super(effect);
}
@Override
public MindlessNullEffect copy() {
return new MindlessNullEffect(this);
}
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
return game.getBattlefield().countAll(filter, source.getControllerId(), game) != 0;
}
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return permanent.getId().equals(source.getSourceId());
}
}

View file

@ -41,13 +41,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -55,12 +53,6 @@ import java.util.UUID;
*/
public class OliviaMobilizedForWar extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public OliviaMobilizedForWar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
addSuperType(SuperType.LEGENDARY);
@ -83,7 +75,8 @@ public class OliviaMobilizedForWar extends CardImpl {
effect = new BecomesCreatureTypeTargetEffect(Duration.WhileOnBattlefield, new ArrayList<>(Collections.singletonList("Vampire")), false);
effect.setText("and it becomes a Vampire in addition to its other types");
doIfCostPaid.addEffect(effect);
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, doIfCostPaid, filter, false, SetTargetPointer.PERMANENT, null));
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, doIfCostPaid,
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false, SetTargetPointer.PERMANENT, null));
}
public OliviaMobilizedForWar(final OliviaMobilizedForWar card) {

View file

@ -42,8 +42,7 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.permanent.token.ProsshKoboldToken;
import mage.target.common.TargetControlledCreaturePermanent;
@ -53,12 +52,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public class ProsshSkyraiderOfKher extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public ProsshSkyraiderOfKher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}{G}");
addSuperType(SuperType.LEGENDARY);
@ -72,7 +65,8 @@ public class ProsshSkyraiderOfKher extends CardImpl {
// When you cast Prossh, Skyraider of Kher, create X 0/1 red Kobold creature tokens named Kobolds of Kher Keep, where X is the amount of mana spent to cast Prossh.
this.addAbility(new CastSourceTriggeredAbility(new CreateTokenEffect(new ProsshKoboldToken(), new ManaSpentToCastCount()), false));
// Sacrifice another creature: Prossh gets +1/+0 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true))));
}
public ProsshSkyraiderOfKher(final ProsshSkyraiderOfKher card) {

View file

@ -39,8 +39,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
/**
@ -49,13 +48,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public class QarsiHighPriest extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public QarsiHighPriest(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add("Human");
@ -66,7 +58,7 @@ private static final FilterControlledCreaturePermanent filter = new FilterContro
// {1}{B}, {t}, Sacrifice another creature: Manifest the top card of your library.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ManifestEffect(1), new ManaCostsImpl("{1}{B}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
this.addAbility(ability);
}

View file

@ -39,8 +39,6 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -48,6 +46,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetControlledPermanent;
import static mage.cards.r.RavenousWampa.RAVENOUS_WAMPA_STATE_VALUE_KEY_PREFIX;
import mage.filter.StaticFilters;
/**
*
@ -55,12 +54,6 @@ import static mage.cards.r.RavenousWampa.RAVENOUS_WAMPA_STATE_VALUE_KEY_PREFIX;
*/
public class RavenousWampa extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
static final String RAVENOUS_WAMPA_STATE_VALUE_KEY_PREFIX = "TOU_SAC_CRE";
public RavenousWampa(UUID ownerId, CardSetInfo setInfo) {
@ -71,7 +64,7 @@ public class RavenousWampa extends CardImpl {
// {2}{G}, Sacrifice another creature: Monstrosity 2.
Ability ability = new MonstrosityAbility("{2}{G}", 2);
ability.addCost(new RavenousWampaSacrificeTargetCost(new TargetControlledCreaturePermanent(filter)));
ability.addCost(new RavenousWampaSacrificeTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
// When Ravenous Wampa becomes monstrous, you gain life equal to the sacrificied creature's toughness.

View file

@ -0,0 +1,84 @@
/*
* 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.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
* @author LevelX2
*/
public class RazakethTheFoulblooded extends CardImpl {
public RazakethTheFoulblooded(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}{B}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.DEMON.getDescription());
this.power = new MageInt(8);
this.toughness = new MageInt(8);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Trample
this.addAbility(TrampleAbility.getInstance());
// Pay 2 life, Sacrifice another creature: Search your library for a card and put that card into your hand. Then shuffle your library.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(), false, true), new PayLifeCost(2));
ability.addCost(new SacrificeTargetCost(
new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
this.addAbility(ability);
}
public RazakethTheFoulblooded(final RazakethTheFoulblooded card) {
super(card);
}
@Override
public RazakethTheFoulblooded copy() {
return new RazakethTheFoulblooded(this);
}
}

View file

@ -33,8 +33,6 @@ import mage.MageInt;
import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
/**
*
@ -42,12 +40,6 @@ import mage.filter.predicate.permanent.AnotherPredicate;
*/
public class RubblebackRhino extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public RubblebackRhino(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.subtype.add("Rhino");

View file

@ -45,8 +45,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
@ -57,12 +56,6 @@ import mage.target.common.TargetControlledPermanent;
*/
public class ScourgeOfSkolaVale extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public ScourgeOfSkolaVale(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add("Hydra");
@ -78,7 +71,7 @@ public class ScourgeOfSkolaVale extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(effect));
// {T}, Sacrifice another creature: Put a number of +1/+1 counters on Scourge of Skola Vale equal to the sacrificed creature's toughness.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScourgeOfSkolaValeEffect(), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)));
this.addAbility(ability);
}

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.s;
import java.util.UUID;
@ -40,9 +39,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.EntersTheBattlefieldEvent;
import mage.game.events.GameEvent;
@ -55,11 +52,6 @@ import mage.target.targetpointer.FixedTarget;
*/
public class SuturePriest extends CardImpl {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public SuturePriest(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add("Cleric");
@ -68,7 +60,8 @@ public class SuturePriest extends CardImpl {
this.toughness = new MageInt(1);
// Whenever another creature enters the battlefield under your control, you may gain 1 life.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filter, true));
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1),
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true));
// Whenever a creature enters the battlefield under an opponent's control, you may have that player lose 1 life.
this.addAbility(new SuturePriestSecondTriggeredAbility());
@ -86,6 +79,7 @@ public class SuturePriest extends CardImpl {
}
class SuturePriestSecondTriggeredAbility extends TriggeredAbilityImpl {
SuturePriestSecondTriggeredAbility() {
super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), true);
}

View file

@ -40,11 +40,11 @@ import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.TargetPlayer;
import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -52,11 +52,6 @@ import java.util.UUID;
*/
public class TymaretTheMurderKing extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public TymaretTheMurderKing(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}");
addSuperType(SuperType.LEGENDARY);
@ -68,7 +63,7 @@ public class TymaretTheMurderKing extends CardImpl {
// {1}{R}, Sacrifice another creature: Tymaret, the Murder King deals 2 damage to target player.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
// {1}{B}, Sacrifice a creature: Return Tymaret from your graveyard to your hand.

View file

@ -36,8 +36,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
/**
@ -46,11 +45,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public class VampireWarlord extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public VampireWarlord(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add("Vampire");
@ -60,7 +54,7 @@ public class VampireWarlord extends CardImpl {
this.toughness = new MageInt(2);
// Sacrifice another creature: Regenerate Vampire Warlord.
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1,1, filter, false);
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false);
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new SacrificeTargetCost(target)));
}

View file

@ -42,8 +42,7 @@ import mage.abilities.keyword.ScavengeAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
@ -54,12 +53,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public class VarolzTheScarStriped extends CardImpl {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public VarolzTheScarStriped(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}");
addSuperType(SuperType.LEGENDARY);
@ -73,7 +66,8 @@ public class VarolzTheScarStriped extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VarolzTheScarStripedEffect()));
// Sacrifice another creature: Regenerate Varolz, the Scar-Striped.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true))));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true))));
}
public VarolzTheScarStriped(final VarolzTheScarStriped card) {

View file

@ -39,8 +39,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
/**
@ -49,12 +48,6 @@ import mage.target.common.TargetControlledCreaturePermanent;
*/
public class VoraciousNull extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public VoraciousNull(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add("Zombie");
@ -63,7 +56,7 @@ public class VoraciousNull extends CardImpl {
// {1}{B}, Sacrifice another creature: Put two +1/+1 counters on Voracious Null. Activate this ability only any time you could cast a sorcery.
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), new ManaCostsImpl("{1}{B}"));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false)));
this.addAbility(ability);
}

View file

@ -42,12 +42,11 @@ import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterOpponentsCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
import mage.filter.StaticFilters;
/**
*
@ -55,12 +54,6 @@ import java.util.UUID;
*/
public class YahenniUndyingPartisan extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature");
static {
filter.add(new AnotherPredicate());
}
public YahenniUndyingPartisan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
@ -80,7 +73,7 @@ public class YahenniUndyingPartisan extends CardImpl {
this.addAbility(new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn),
new SacrificeTargetCost(new TargetControlledPermanent(filter)))
new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE)))
);
}

View file

@ -78,15 +78,20 @@ public class HourOfDevastation extends ExpansionSet {
cards.add(new SetCardInfo("Desert of the Mindful", 173, Rarity.COMMON, mage.cards.d.DesertOfTheMindful.class));
cards.add(new SetCardInfo("Desert of the True", 174, Rarity.COMMON, mage.cards.d.DesertOfTheTrue.class));
cards.add(new SetCardInfo("Doomfall", 62, Rarity.UNCOMMON, mage.cards.d.Doomfall.class));
cards.add(new SetCardInfo("Dreamstealer", 63, Rarity.RARE, mage.cards.d.Dreamstealer.class));
cards.add(new SetCardInfo("Hour of Glory", 065, Rarity.RARE, mage.cards.h.HourOfGlory.class));
cards.add(new SetCardInfo("Hour of Revelation", 15, Rarity.RARE, mage.cards.h.HourOfRevelation.class));
cards.add(new SetCardInfo("Inferno Jet", 99, Rarity.UNCOMMON, mage.cards.i.InfernoJet.class));
cards.add(new SetCardInfo("Khenra Eternal", 66, Rarity.COMMON, mage.cards.k.KhenraEternal.class));
cards.add(new SetCardInfo("Khenra Scrapper", 100, Rarity.COMMON, mage.cards.k.KhenraScrapper.class));
cards.add(new SetCardInfo("Liliana's Defeat", 68, Rarity.UNCOMMON, mage.cards.l.LilianasDefeat.class));
cards.add(new SetCardInfo("Marauding Boneslasher", 70, Rarity.COMMON, mage.cards.m.MaraudingBoneslasher.class));
cards.add(new SetCardInfo("Maurauding Boneslasher", 70, Rarity.COMMON, mage.cards.m.MauraudingBoneslasher.class));
cards.add(new SetCardInfo("Nicol Bolas, God-Pharaoh", 140, Rarity.MYTHIC, mage.cards.n.NicolBolasGodPharaoh.class));
cards.add(new SetCardInfo("Open Fire", 105, Rarity.COMMON, mage.cards.o.OpenFire.class));
cards.add(new SetCardInfo("Proven Combatant", 42, Rarity.COMMON, mage.cards.p.ProvenCombatant.class));
cards.add(new SetCardInfo("Ramunap Excavator", 129, Rarity.RARE, mage.cards.r.RamunapExcavator.class));
cards.add(new SetCardInfo("Razaketh, the Foulblooded", 73, Rarity.MYTHIC, mage.cards.r.RazakethTheFoulblooded.class));
cards.add(new SetCardInfo("Samut, the Tested", 144, Rarity.MYTHIC, mage.cards.s.SamutTheTested.class));
cards.add(new SetCardInfo("Sinuous Striker", 45, Rarity.UNCOMMON, mage.cards.s.SinuousStriker.class));
cards.add(new SetCardInfo("Solemnity", 22, Rarity.RARE, mage.cards.s.Solemnity.class));

View file

@ -0,0 +1,71 @@
/*
* 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.abilities.effects.common.combat;
import mage.abilities.Ability;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.Duration;
import mage.filter.common.FilterControlledPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
* @author LevelX2
*/
public class CantBlockUnlessYouControlSourceEffect extends RestrictionEffect {
private final FilterControlledPermanent filter;
public CantBlockUnlessYouControlSourceEffect(FilterControlledPermanent filter) {
super(Duration.WhileOnBattlefield);
this.filter = filter;
staticText = "{this} can't block unless you control" + filter.getMessage();
}
public CantBlockUnlessYouControlSourceEffect(final CantBlockUnlessYouControlSourceEffect effect) {
super(effect);
this.filter = effect.filter;
}
@Override
public CantBlockUnlessYouControlSourceEffect copy() {
return new CantBlockUnlessYouControlSourceEffect(this);
}
@Override
public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) {
return false;
}
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return permanent.getId().equals(source.getSourceId())
&& game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) == 0;
}
}

View file

@ -117,7 +117,7 @@ class EternalizeEffect extends OneShotEffect {
token.getToughness().modifyBaseValue(4);
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.EMBALMED_CREATURE, token.getId(), source.getSourceId(), controller.getId()));
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), false, false, null);
// Probably it makes sense to remove also the Embalm ability (it's not shown on the token cards).
// Probably it makes sense to remove also the Eternalize ability (it's not shown on the token cards).
// Also it can never get active or? But it's not mentioned in the reminder text.
return true;
}

View file

@ -17,6 +17,7 @@ import mage.filter.common.FilterCreatureSpell;
import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.AttackingPredicate;
import mage.filter.predicate.permanent.TokenPredicate;
@ -30,6 +31,7 @@ public final class StaticFilters {
public static final FilterPermanent FILTER_PERMANENT_ARTIFACT_OR_CREATURE = new FilterPermanent("artifact or creature");
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE = new FilterControlledPermanent("artifact or creature you control");
public static final FilterControlledPermanent FILTER_CONTROLLED_A_CREATURE = new FilterControlledCreaturePermanent("a creature you control");
public static final FilterControlledCreaturePermanent FILTER_CONTROLLED_ANOTHER_CREATURE = new FilterControlledCreaturePermanent("another creature");
public static final FilterControlledPermanent FILTER_CONTROLLED_PERMANENT_ARTIFACT = new FilterControlledArtifactPermanent();
public static final FilterArtifactCard FILTER_CARD_ARTIFACT = new FilterArtifactCard();
public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard();
@ -63,6 +65,8 @@ public final class StaticFilters {
new CardTypePredicate(CardType.ARTIFACT),
new CardTypePredicate(CardType.CREATURE)
));
FILTER_CONTROLLED_ANOTHER_CREATURE.add(new AnotherPredicate());
FILTER_CARD_ARTIFACT_OR_CREATURE.add(Predicates.or(
new CardTypePredicate(CardType.ARTIFACT),
new CardTypePredicate(CardType.CREATURE)

View file

@ -24,6 +24,7 @@ Echo|manaString|
Embalm|cost, card|
Enchant|type|
Entwine|manaString|
Eternalize|cost, card|
Evoke|card, manaString|
Evolve|new|
Exalted|new|

View file

@ -31657,7 +31657,7 @@ Hour of Glory|Hour of Devastation|065|R|{3}{B}|Instant|||Exile target creature.
Khenra Eternal|Hour of Devastation|66|C|{1}{B}|Creature - Zombie Jackal Warrior|2|2|Afflict 1 <i>(Whenever this creature becomes blocked, defending player loses 1 life.)</i>|
Liliana's Defeat|Hour of Devastation|68|U|{B}|Sorcery|||Destroy target black creature or black planeswalker. If that permanent was a Liliana planeswalker, her controller loses 3 life.|
Maurauding Boneslasher|Hour of Devastation|70|C|{2}{B}|Creature - Zombie Minotaur|3|3|Marauding Boneslasher can't block unless you control another Zombie.|
Razaketh the Foulblooded|Hour of Devastation|73|M|{5}{B}{B}{B}|Legendary Creature - Demon|8|8|Flying, trample$Pay 2 life, Sacrifice another creature: Search your library for a card and put that card into your hand. Then shuffle your library.|
Razaketh, the Foulblooded|Hour of Devastation|73|M|{5}{B}{B}{B}|Legendary Creature - Demon|8|8|Flying, trample$Pay 2 life, Sacrifice another creature: Search your library for a card and put that card into your hand. Then shuffle your library.|
Torment of Hailfire|Hour of Devastation|077|R|{X}{B}{B}|Sorcery|||Repeat the following process X times. Each opponent loses 3 life unless he or she sacrifices a nonland permanent or discards a card.|
Torment of Scarabs|Hour of Devastation|078|U|{3}{B}|Enchantment - Aura Curse|||Enchant player$At the beginning of enchanted player's upkeep, that player loses 3 life unless he or she sacrifices a nonland permanent or discards a card.|
Torment of Venom|Hour of Devastation|079|C|{2}{B}{B}|Instant|||Put three -1/-1 counters on target creature. Its controller loses 3 life unless he or she sacrifices another nonland permanent or discards a card.|