[ARB] various text fixes

This commit is contained in:
Evan Kranzler 2022-03-06 22:24:16 -05:00
parent 3833d7bab3
commit 1582321d26
35 changed files with 377 additions and 383 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -14,21 +12,19 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.SuperType; import mage.filter.StaticFilters;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game; import mage.game.Game;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class Anathemancer extends CardImpl { public final class Anathemancer extends CardImpl {
public Anathemancer(UUID ownerId, CardSetInfo setInfo) { public Anathemancer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
@ -36,11 +32,15 @@ public final class Anathemancer extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Anathemancer enters the battlefield, it deals damage to target player equal to the number of nonbasic lands that player controls. // When Anathemancer enters the battlefield, it deals damage to target player equal to the number of nonbasic lands that player controls.
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(new AnathemancerCount(), "it")); EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(
new DamageTargetEffect(AnathemancerCount.instance, "it")
.setText("it deals damage to target player equal to the number of nonbasic lands that player controls")
);
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(ability); this.addAbility(ability);
// Unearth {5}{B}{R} // Unearth {5}{B}{R}
this.addAbility(new UnearthAbility(new ManaCostsImpl("{5}{B}{R}"))); this.addAbility(new UnearthAbility(new ManaCostsImpl<>("{5}{B}{R}")));
} }
private Anathemancer(final Anathemancer card) { private Anathemancer(final Anathemancer card) {
@ -53,29 +53,29 @@ public final class Anathemancer extends CardImpl {
} }
} }
class AnathemancerCount implements DynamicValue { enum AnathemancerCount implements DynamicValue {
instance;
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
if (sourceAbility.getFirstTarget() == null) { if (sourceAbility.getFirstTarget() == null) {
return 0; return 0;
} }
return game.getBattlefield().count(
FilterLandPermanent filter = new FilterLandPermanent(); StaticFilters.FILTER_LANDS_NONBASIC,
filter.add(Predicates.not(SuperType.BASIC.getPredicate())); sourceAbility.getFirstTarget(),
filter.add(new ControllerIdPredicate(sourceAbility.getFirstTarget())); sourceAbility.getControllerId(), game
);
return game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
} }
@Override @Override
public AnathemancerCount copy() { public AnathemancerCount copy() {
return new AnathemancerCount(); return this;
} }
@Override @Override
public String toString() { public String toString() {
return "1"; return "";
} }
@Override @Override

View file

@ -1,11 +1,7 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.common.CycleOrDiesTriggeredAbility;
import mage.abilities.common.CycleTriggeredAbility;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.CyclingAbility; import mage.abilities.keyword.CyclingAbility;
@ -15,27 +11,25 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.SoldierToken; import mage.game.permanent.token.SoldierToken;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class BantSojourners extends CardImpl { public final class BantSojourners extends CardImpl {
public BantSojourners(UUID ownerId, CardSetInfo setInfo) { public BantSojourners(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}");
this.subtype.add(SubType.HUMAN, SubType.SOLDIER); this.subtype.add(SubType.HUMAN, SubType.SOLDIER);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// When you cycle Bant Sojourners or it dies, you may create a 1/1 white Soldier creature token. // When you cycle Bant Sojourners or it dies, you may create a 1/1 white Soldier creature token.
Ability ability1 = new CycleTriggeredAbility(new CreateTokenEffect(new SoldierToken()), true); this.addAbility(new CycleOrDiesTriggeredAbility(new CreateTokenEffect(new SoldierToken()), true));
Ability ability2 = new DiesSourceTriggeredAbility(new CreateTokenEffect(new SoldierToken()), true);
this.addAbility(ability1);
this.addAbility(ability2);
// Cycling {2}{W} // Cycling {2}{W}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{W}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{W}")));
} }
private BantSojourners(final BantSojourners card) { private BantSojourners(final BantSojourners card) {

View file

@ -1,10 +1,7 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ShuffleIntoLibrarySourceEffect; import mage.abilities.effects.common.ShuffleIntoLibrarySourceEffect;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
@ -13,16 +10,16 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.constants.Zone;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class BlitzHellion extends CardImpl { public final class BlitzHellion extends CardImpl {
public BlitzHellion(UUID ownerId, CardSetInfo setInfo) { public BlitzHellion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}");
this.subtype.add(SubType.HELLION); this.subtype.add(SubType.HELLION);
this.power = new MageInt(7); this.power = new MageInt(7);
this.toughness = new MageInt(7); this.toughness = new MageInt(7);
@ -34,9 +31,11 @@ public final class BlitzHellion extends CardImpl {
this.addAbility(HasteAbility.getInstance()); this.addAbility(HasteAbility.getInstance());
// At the beginning of the end step, Blitz Hellion's owner shuffles it into their library. // At the beginning of the end step, Blitz Hellion's owner shuffles it into their library.
Effect effect = new ShuffleIntoLibrarySourceEffect(); this.addAbility(new BeginningOfEndStepTriggeredAbility(
effect.setText("{this}'s owner shuffles it into their library."); new ShuffleIntoLibrarySourceEffect()
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.ANY, null, false)); .setText("{this}'s owner shuffles it into their library."),
TargetController.NEXT, false
));
} }
private BlitzHellion(final BlitzHellion card) { private BlitzHellion(final BlitzHellion card) {

View file

@ -1,8 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
@ -12,22 +9,26 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class ColossalMight extends CardImpl { public final class ColossalMight extends CardImpl {
public ColossalMight (UUID ownerId, CardSetInfo setInfo) { public ColossalMight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{G}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{G}");
this.getSpellAbility().addEffect(new BoostTargetEffect(
4, 2, Duration.EndOfTurn
).setText("target creature gets +4/+2"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
TrampleAbility.getInstance(), Duration.EndOfTurn
).setText("and gains trample until end of turn"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(4, 2, Duration.EndOfTurn));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
} }
public ColossalMight (final ColossalMight card) { public ColossalMight(final ColossalMight card) {
super(card); super(card);
} }
@ -35,5 +36,4 @@ public final class ColossalMight extends CardImpl {
public ColossalMight copy() { public ColossalMight copy() {
return new ColossalMight(this); return new ColossalMight(this);
} }
} }

View file

@ -1,41 +1,36 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.SubType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class DauntlessEscort extends CardImpl { public final class DauntlessEscort extends CardImpl {
public DauntlessEscort(UUID ownerId, CardSetInfo setInfo) { public DauntlessEscort(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}");
this.subtype.add(SubType.RHINO); this.subtype.add(SubType.RHINO);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Sacrifice Dauntless Escort: Creatures you control are indestructible this turn. // Sacrifice Dauntless Escort: Creatures you control are indestructible this turn.
Effect effect = new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES, false); this.addAbility(new SimpleActivatedAbility(new GainAbilityAllEffect(
effect.setText("Creatures you control are indestructible this turn"); IndestructibleAbility.getInstance(), Duration.EndOfTurn,
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new SacrificeSourceCost())); StaticFilters.FILTER_CONTROLLED_CREATURES, false
), new SacrificeSourceCost()));
} }
private DauntlessEscort(final DauntlessEscort card) { private DauntlessEscort(final DauntlessEscort card) {

View file

@ -1,7 +1,5 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility;
@ -13,31 +11,33 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class DeathbringerThoctar extends CardImpl { public final class DeathbringerThoctar extends CardImpl {
public DeathbringerThoctar(UUID ownerId, CardSetInfo setInfo) { public DeathbringerThoctar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{R}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.BEAST); this.subtype.add(SubType.BEAST);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Whenever another creature dies, you may put a +1/+1 counter on Deathbringer Thoctar. // Whenever another creature dies, you may put a +1/+1 counter on Deathbringer Thoctar.
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true, true)); this.addAbility(new DiesCreatureTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true, true
));
// Remove a +1/+1 counter from Deathbringer Thoctar: Deathbringer Thoctar deals 1 damage to any target. // Remove a +1/+1 counter from Deathbringer Thoctar: Deathbringer Thoctar deals 1 damage to any target.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); Ability ability = new SimpleActivatedAbility(
new DamageTargetEffect(1, "it"),
new RemoveCountersSourceCost(CounterType.P1P1.createInstance())
);
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
@ -13,8 +11,9 @@ import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.game.permanent.token.DragonBroodmotherDragonToken; import mage.game.permanent.token.DragonBroodmotherDragonToken;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class DragonBroodmother extends CardImpl { public final class DragonBroodmother extends CardImpl {
@ -30,7 +29,10 @@ public final class DragonBroodmother extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// At the beginning of each upkeep, create a 1/1 red and green Dragon creature token with flying and devour 2. (As the token enters the battlefield, you may sacrifice any number of creatures. It enters the battlefield with twice that many +1/+1 counters on it.) // At the beginning of each upkeep, create a 1/1 red and green Dragon creature token with flying and devour 2. (As the token enters the battlefield, you may sacrifice any number of creatures. It enters the battlefield with twice that many +1/+1 counters on it.)
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonBroodmotherDragonToken()), TargetController.ANY, false)); this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new CreateTokenEffect(new DragonBroodmotherDragonToken()),
TargetController.EACH_PLAYER, false
));
} }
private DragonBroodmother(final DragonBroodmother card) { private DragonBroodmother(final DragonBroodmother card) {
@ -41,5 +43,4 @@ public final class DragonBroodmother extends CardImpl {
public DragonBroodmother copy() { public DragonBroodmother copy() {
return new DragonBroodmother(this); return new DragonBroodmother(this);
} }
} }

View file

@ -1,11 +1,8 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.CycleTriggeredAbility; import mage.abilities.common.CycleOrDiesTriggeredAbility;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.MayTapOrUntapTargetEffect; import mage.abilities.effects.common.MayTapOrUntapTargetEffect;
import mage.abilities.keyword.CyclingAbility; import mage.abilities.keyword.CyclingAbility;
@ -15,33 +12,28 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class EsperSojourners extends CardImpl { public final class EsperSojourners extends CardImpl {
public EsperSojourners(UUID ownerId, CardSetInfo setInfo) { public EsperSojourners(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{W}{U}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{W}{U}{B}");
this.subtype.add(SubType.VEDALKEN); this.subtype.add(SubType.VEDALKEN);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// When you cycle Esper Sojourners or it dies, you may tap or untap target permanent. // When you cycle Esper Sojourners or it dies, you may tap or untap target permanent.
Ability ability1 = new CycleTriggeredAbility(new MayTapOrUntapTargetEffect()); Ability ability = new CycleOrDiesTriggeredAbility(new MayTapOrUntapTargetEffect(), false);
Ability ability2 = new DiesSourceTriggeredAbility(new MayTapOrUntapTargetEffect()); ability.addTarget(new TargetPermanent());
ability1.addTarget(new TargetPermanent()); this.addAbility(ability);
ability2.addTarget(new TargetPermanent());
this.addAbility(ability1);
this.addAbility(ability2);
// Cycling {2}{U} // Cycling {2}{U}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{U}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{U}")));
} }
private EsperSojourners(final EsperSojourners card) { private EsperSojourners(final EsperSojourners card) {

View file

@ -28,10 +28,6 @@ public final class EtherwroughtPage extends CardImpl {
public EtherwroughtPage(UUID ownerId, CardSetInfo setInfo) { public EtherwroughtPage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{W}{U}{B}"); super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{W}{U}{B}");
// At the beginning of your upkeep, choose one - You gain 2 life; or look at the top card of your library, then you may put that card into your graveyard; or each opponent loses 1 life. // At the beginning of your upkeep, choose one - You gain 2 life; or look at the top card of your library, then you may put that card into your graveyard; or each opponent loses 1 life.
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), TargetController.YOU, false); Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(2), TargetController.YOU, false);
@ -46,7 +42,6 @@ public final class EtherwroughtPage extends CardImpl {
ability.addMode(mode1); ability.addMode(mode1);
this.addAbility(ability); this.addAbility(ability);
} }
private EtherwroughtPage(final EtherwroughtPage card) { private EtherwroughtPage(final EtherwroughtPage card) {
@ -63,7 +58,7 @@ class EtherwroughtPageEffect extends OneShotEffect {
public EtherwroughtPageEffect() { public EtherwroughtPageEffect() {
super(Outcome.DrawCard); super(Outcome.DrawCard);
this.staticText = "or look at the top card of your library, then you may put that card into your graveyard"; this.staticText = "look at the top card of your library. You may put that card into your graveyard";
} }
public EtherwroughtPageEffect(final EtherwroughtPageEffect effect) { public EtherwroughtPageEffect(final EtherwroughtPageEffect effect) {

View file

@ -1,7 +1,5 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyAllEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -11,29 +9,27 @@ import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.BlockedPredicate; import mage.filter.predicate.permanent.BlockedPredicate;
import mage.filter.predicate.permanent.BlockingPredicate; import mage.filter.predicate.permanent.BlockingPredicate;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class FightToTheDeath extends CardImpl { public final class FightToTheDeath extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("all blocking creatures and all blocked creatures"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blocking creatures and all blocked creatures");
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(
BlockingPredicate.instance, BlockingPredicate.instance,
BlockedPredicate.instance)); BlockedPredicate.instance
));
} }
public FightToTheDeath(UUID ownerId, CardSetInfo setInfo) { public FightToTheDeath(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{W}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{W}");
// Destroy all blocking creatures and all blocked creatures. // Destroy all blocking creatures and all blocked creatures.
this.getSpellAbility().addEffect(new DestroyAllEffect(filter)); this.getSpellAbility().addEffect(new DestroyAllEffect(filter));
} }
private FightToTheDeath(final FightToTheDeath card) { private FightToTheDeath(final FightToTheDeath card) {

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -10,23 +8,20 @@ import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class GiantAmbushBeetle extends CardImpl { public final class GiantAmbushBeetle extends CardImpl {
public GiantAmbushBeetle(UUID ownerId, CardSetInfo setInfo) { public GiantAmbushBeetle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B/G}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B/G}{R}");
this.subtype.add(SubType.INSECT); this.subtype.add(SubType.INSECT);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
@ -34,7 +29,10 @@ public final class GiantAmbushBeetle extends CardImpl {
this.addAbility(HasteAbility.getInstance()); this.addAbility(HasteAbility.getInstance());
// When Giant Ambush Beetle enters the battlefield, you may have target creature block it this turn if able. // When Giant Ambush Beetle enters the battlefield, you may have target creature block it this turn if able.
Ability ability = new EntersBattlefieldTriggeredAbility(new MustBeBlockedByTargetSourceEffect(Duration.EndOfTurn), true); Ability ability = new EntersBattlefieldTriggeredAbility(
new MustBeBlockedByTargetSourceEffect(Duration.EndOfTurn)
.setText("target creature block it this turn if able"), true
);
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,11 +1,9 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.CycleOrDiesTriggeredAbility;
import mage.abilities.common.CycleTriggeredAbility; import mage.abilities.common.CycleTriggeredAbility;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.ExileTargetEffect; import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.CyclingAbility; import mage.abilities.keyword.CyclingAbility;
@ -13,36 +11,29 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.FilterCard; import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetCardInASingleGraveyard;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class GrixisSojourners extends CardImpl { public final class GrixisSojourners extends CardImpl {
public GrixisSojourners(UUID ownerId, CardSetInfo setInfo) { public GrixisSojourners(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}{R}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.OGRE); this.subtype.add(SubType.OGRE);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// When you cycle Grixis Sojourners or it dies, you may exile target card from a graveyard. // When you cycle Grixis Sojourners or it dies, you may exile target card from a graveyard.
Ability ability1 = new CycleTriggeredAbility(new ExileTargetEffect(), true); Ability ability = new CycleOrDiesTriggeredAbility(new ExileTargetEffect(), true);
Ability ability2 = new DiesSourceTriggeredAbility(new ExileTargetEffect(), true); ability.addTarget(new TargetCardInGraveyard());
ability1.addTarget(new TargetCardInASingleGraveyard(1, 1, new FilterCard())); this.addAbility(ability);
ability2.addTarget(new TargetCardInASingleGraveyard(1, 1, new FilterCard()));
this.addAbility(ability1);
this.addAbility(ability2);
// Cycling {2}{B} // Cycling {2}{B}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{B}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{B}")));
} }
private GrixisSojourners(final GrixisSojourners card) { private GrixisSojourners(final GrixisSojourners card) {

View file

@ -1,7 +1,5 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
@ -11,19 +9,17 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class IllusoryDemon extends CardImpl { public final class IllusoryDemon extends CardImpl {
public IllusoryDemon(UUID ownerId, CardSetInfo setInfo) { public IllusoryDemon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}");
this.subtype.add(SubType.DEMON); this.subtype.add(SubType.DEMON);
this.subtype.add(SubType.ILLUSION); this.subtype.add(SubType.ILLUSION);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
@ -31,7 +27,7 @@ public final class IllusoryDemon extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When you cast a spell, sacrifice Illusory Demon. // When you cast a spell, sacrifice Illusory Demon.
this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), false)); this.addAbility(new SpellCastControllerTriggeredAbility(new SacrificeSourceEffect(), false).setTriggerPhrase("When you cast a spell, "));
} }
private IllusoryDemon(final IllusoryDemon card) { private IllusoryDemon(final IllusoryDemon card) {

View file

@ -1,11 +1,8 @@
package mage.cards.j; package mage.cards.j;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.CycleTriggeredAbility; import mage.abilities.common.CycleOrDiesTriggeredAbility;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.CyclingAbility; import mage.abilities.keyword.CyclingAbility;
@ -15,33 +12,28 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class JundSojourners extends CardImpl { public final class JundSojourners extends CardImpl {
public JundSojourners(UUID ownerId, CardSetInfo setInfo) { public JundSojourners(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}{R}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{R}{G}");
this.subtype.add(SubType.VIASHINO); this.subtype.add(SubType.VIASHINO);
this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When you cycle Jund Sojourners or it dies, you may have it deal 1 damage to any target. // When you cycle Jund Sojourners or it dies, you may have it deal 1 damage to any target.
Ability ability1 = new CycleTriggeredAbility(new DamageTargetEffect(1)); Ability ability = new CycleOrDiesTriggeredAbility(new DamageTargetEffect(1)
Ability ability2 = new DiesSourceTriggeredAbility(new DamageTargetEffect(1)); .setText("you may have it deal 1 damage to any target"), true);
ability1.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability);
this.addAbility(ability1);
this.addAbility(ability2);
// Cycling {2}{R} // Cycling {2}{R}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{R}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{R}")));
} }
private JundSojourners(final JundSojourners card) { private JundSojourners(final JundSojourners card) {

View file

@ -1,7 +1,5 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
@ -16,27 +14,28 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.GoblinToken; import mage.game.permanent.token.GoblinToken;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KathariBomber extends CardImpl { public final class KathariBomber extends CardImpl {
public KathariBomber(UUID ownerId, CardSetInfo setInfo) { public KathariBomber(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
this.subtype.add(SubType.BIRD); this.subtype.add(SubType.BIRD);
this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When Kathari Bomber deals combat damage to a player, create two 1/1 red Goblin creature tokens and sacrifice Kathari Bomber. // When Kathari Bomber deals combat damage to a player, create two 1/1 red Goblin creature tokens and sacrifice Kathari Bomber.
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new CreateTokenEffect(new GoblinToken(), 2), false); Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
ability.addEffect(new SacrificeSourceEffect()); new CreateTokenEffect(new GoblinToken(), 2), false
).setTriggerPhrase("When {this} deals combat damage to a player, ");
ability.addEffect(new SacrificeSourceEffect().concatBy("and"));
this.addAbility(ability); this.addAbility(ability);
// Unearth {3}{B}{R} // Unearth {3}{B}{R}

View file

@ -1,42 +1,48 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.TappedPredicate; import mage.filter.predicate.permanent.TappedPredicate;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class KnotvinePaladin extends CardImpl { public final class KnotvinePaladin extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("untapped creature you control");
static { static {
filter.add(TappedPredicate.UNTAPPED); filter.add(TappedPredicate.UNTAPPED);
} }
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
private static final Hint hint = new ValueHint("Untapped creatures you control", xValue);
public KnotvinePaladin(UUID ownerId, CardSetInfo setInfo) { public KnotvinePaladin(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT); this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new PermanentsOnBattlefieldCount(filter), Duration.EndOfTurn), false)); this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(
xValue, xValue, Duration.EndOfTurn, true, "it"
), false).addHint(hint));
} }
private KnotvinePaladin(final KnotvinePaladin card) { private KnotvinePaladin(final KnotvinePaladin card) {

View file

@ -1,36 +1,36 @@
package mage.cards.l; package mage.cards.l;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.ZombieWizardToken; import mage.game.permanent.token.ZombieWizardToken;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class LichLordOfUnx extends CardImpl { public final class LichLordOfUnx extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control"); private static final FilterPermanent filter = new FilterControlledPermanent(SubType.ZOMBIE);
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
static { private static final Hint hint = new ValueHint("Zombies you control", xValue);
filter.add(SubType.ZOMBIE.getPredicate());
}
public LichLordOfUnx(UUID ownerId, CardSetInfo setInfo) { public LichLordOfUnx(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{B}");
@ -40,13 +40,21 @@ public final class LichLordOfUnx extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieWizardToken()), new ManaCostsImpl("{U}{B}")); Ability ability = new SimpleActivatedAbility(
new CreateTokenEffect(new ZombieWizardToken()), new ManaCostsImpl<>("{U}{B}")
);
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(new PermanentsOnBattlefieldCount(filter)), new ManaCostsImpl("{U}{U}{B}{B}"));
ability.addEffect(new PutLibraryIntoGraveTargetEffect(new PermanentsOnBattlefieldCount(filter, 1))); ability = new SimpleActivatedAbility(
new LoseLifeTargetEffect(xValue)
.setText("target player loses X life"),
new ManaCostsImpl<>("{U}{U}{B}{B}")
);
ability.addEffect(new PutLibraryIntoGraveTargetEffect(xValue)
.setText("and mills X cards, where X is the number of Zombies you control"));
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(ability); this.addAbility(ability.addHint(hint));
} }
private LichLordOfUnx(final LichLordOfUnx card) { private LichLordOfUnx(final LichLordOfUnx card) {
@ -57,5 +65,4 @@ public final class LichLordOfUnx extends CardImpl {
public LichLordOfUnx copy() { public LichLordOfUnx copy() {
return new LichLordOfUnx(this); return new LichLordOfUnx(this);
} }
} }

View file

@ -1,12 +1,11 @@
package mage.cards.l; package mage.cards.l;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.dynamicvalue.common.CountersSourceCount;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FearAbility; import mage.abilities.keyword.FearAbility;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
@ -17,8 +16,6 @@ import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID; import java.util.UUID;
@ -27,12 +24,12 @@ import java.util.UUID;
*/ */
public final class LightningReaver extends CardImpl { public final class LightningReaver extends CardImpl {
private static final DynamicValue xValue = new CountersSourceCount(CounterType.CHARGE);
public LightningReaver(UUID ownerId, CardSetInfo setInfo) { public LightningReaver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.BEAST); this.subtype.add(SubType.BEAST);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
@ -41,10 +38,12 @@ public final class LightningReaver extends CardImpl {
this.addAbility(FearAbility.getInstance()); this.addAbility(FearAbility.getInstance());
// Whenever Lightning Reaver deals combat damage to a player, put a charge counter on it. // Whenever Lightning Reaver deals combat damage to a player, put a charge counter on it.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), false)); this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()).setText("put a charge counter on it"), false));
// At the beginning of your end step, Lightning Reaver deals damage equal to the number of charge counters on it to each opponent. // At the beginning of your end step, Lightning Reaver deals damage equal to the number of charge counters on it to each opponent.
this.addAbility(new BeginningOfEndStepTriggeredAbility(new DamageOpponentsEffect(), TargetController.YOU, false)); this.addAbility(new BeginningOfEndStepTriggeredAbility(new DamagePlayersEffect(
Outcome.Damage, xValue, TargetController.OPPONENT
).setText("{this} deals damage equal to the number of charge counters on it to each opponent"), TargetController.YOU, false));
} }
private LightningReaver(final LightningReaver card) { private LightningReaver(final LightningReaver card) {
@ -56,32 +55,3 @@ public final class LightningReaver extends CardImpl {
return new LightningReaver(this); return new LightningReaver(this);
} }
} }
class DamageOpponentsEffect extends OneShotEffect {
public DamageOpponentsEffect() {
super(Outcome.Damage);
staticText = "Lightning Reaver deals damage equal to the number of charge counters on it to each opponent";
}
public DamageOpponentsEffect(final DamageOpponentsEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
DynamicValue amount = new CountersSourceCount(CounterType.CHARGE);
for (UUID playerId : game.getOpponents(source.getControllerId())) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.damage(amount.calculate(game, source, this), source.getSourceId(), source, game);
}
}
return true;
}
@Override
public DamageOpponentsEffect copy() {
return new DamageOpponentsEffect(this);
}
}

View file

@ -1,8 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -10,32 +7,32 @@ import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Zone; import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class MadrushCyclops extends CardImpl { public final class MadrushCyclops extends CardImpl {
public MadrushCyclops (UUID ownerId, CardSetInfo setInfo) { public MadrushCyclops(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}{G}");
this.subtype.add(SubType.CYCLOPS); this.subtype.add(SubType.CYCLOPS);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// Creatures you control have haste. // Creatures you control have haste.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent()))); this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.WhileOnBattlefield,
StaticFilters.FILTER_PERMANENT_CREATURES
)));
} }
public MadrushCyclops (final MadrushCyclops card) { public MadrushCyclops(final MadrushCyclops card) {
super(card); super(card);
} }
@ -43,5 +40,4 @@ public final class MadrushCyclops extends CardImpl {
public MadrushCyclops copy() { public MadrushCyclops copy() {
return new MadrushCyclops(this); return new MadrushCyclops(this);
} }
} }

View file

@ -1,8 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
@ -12,38 +9,36 @@ import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class MagefireWings extends CardImpl { public final class MagefireWings extends CardImpl {
public MagefireWings (UUID ownerId, CardSetInfo setInfo) { public MagefireWings(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{R}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
TargetPermanent auraTarget = new TargetCreaturePermanent(); TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
this.addAbility(ability);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0, Duration.WhileOnBattlefield))); Ability ability = new SimpleStaticAbility(new BoostEnchantedEffect(
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); 2, 0, Duration.WhileOnBattlefield
));
ability.addEffect(new GainAbilityAttachedEffect(
FlyingAbility.getInstance(), AttachmentType.AURA
).setText("and has flying"));
this.addAbility(ability);
} }
public MagefireWings (final MagefireWings card) { public MagefireWings(final MagefireWings card) {
super(card); super(card);
} }
@ -51,5 +46,4 @@ public final class MagefireWings extends CardImpl {
public MagefireWings copy() { public MagefireWings copy() {
return new MagefireWings(this); return new MagefireWings(this);
} }
} }

View file

@ -1,11 +1,8 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.CycleTriggeredAbility; import mage.abilities.common.CycleOrDiesTriggeredAbility;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.CyclingAbility; import mage.abilities.keyword.CyclingAbility;
@ -16,33 +13,29 @@ import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class NayaSojourners extends CardImpl { public final class NayaSojourners extends CardImpl {
public NayaSojourners(UUID ownerId, CardSetInfo setInfo) { public NayaSojourners(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}{W}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// When you cycle Naya Sojourners or it dies, you may put a +1/+1 counter on target creature. // When you cycle Naya Sojourners or it dies, you may put a +1/+1 counter on target creature.
Ability ability1 = new CycleTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); Ability ability = new CycleOrDiesTriggeredAbility(
Ability ability2 = new DiesSourceTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance())); new AddCountersTargetEffect(CounterType.P1P1.createInstance()), true
ability1.addTarget(new TargetCreaturePermanent()); );
ability2.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability1); this.addAbility(ability);
this.addAbility(ability2);
// Cycling {2}{G} // Cycling {2}{G}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{G}"))); this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{G}")));
} }
private NayaSojourners(final NayaSojourners card) { private NayaSojourners(final NayaSojourners card) {

View file

@ -1,42 +1,39 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.PutOnLibraryTargetEffect; import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.target.Target; import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class NulltreadGargantuan extends CardImpl { public final class NulltreadGargantuan extends CardImpl {
public NulltreadGargantuan (UUID ownerId, CardSetInfo setInfo) { public NulltreadGargantuan(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{U}");
this.subtype.add(SubType.BEAST); this.subtype.add(SubType.BEAST);
this.power = new MageInt(5); this.power = new MageInt(5);
this.toughness = new MageInt(6); this.toughness = new MageInt(6);
// When Nulltread Gargantuan enters the battlefield, put a creature you control on top of its owner's library. // When Nulltread Gargantuan enters the battlefield, put a creature you control on top of its owner's library.
Ability ability = new EntersBattlefieldTriggeredAbility(new PutOnLibraryTargetEffect(true), false); this.addAbility(new EntersBattlefieldTriggeredAbility(new NulltreadGargantuanEffect()));
Target target = new TargetControlledCreaturePermanent();
target.setNotTarget(true);
ability.addTarget(target);
this.addAbility(ability);
} }
public NulltreadGargantuan (final NulltreadGargantuan card) { public NulltreadGargantuan(final NulltreadGargantuan card) {
super(card); super(card);
} }
@ -44,5 +41,36 @@ public final class NulltreadGargantuan extends CardImpl {
public NulltreadGargantuan copy() { public NulltreadGargantuan copy() {
return new NulltreadGargantuan(this); return new NulltreadGargantuan(this);
} }
}
class NulltreadGargantuanEffect extends OneShotEffect {
NulltreadGargantuanEffect() {
super(Outcome.UnboostCreature);
staticText = "put a creature you control on top of its owner's library";
}
private NulltreadGargantuanEffect(final NulltreadGargantuanEffect effect) {
super(effect);
}
@Override
public NulltreadGargantuanEffect copy() {
return new NulltreadGargantuanEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null || !game.getState().getBattlefield().contains(
StaticFilters.FILTER_CONTROLLED_CREATURE, source, game, 1
)) {
return false;
}
TargetPermanent target = new TargetControlledCreaturePermanent();
target.setNotTarget(true);
player.choose(outcome, target, source.getSourceId(), game);
Permanent permanent = game.getPermanent(target.getFirstTarget());
return permanent != null && player.putCardsOnTopOfLibrary(permanent, game, source, false);
}
} }

View file

@ -129,7 +129,7 @@ class SenTripletsPlayFromOpponentsHandEffect extends AsThoughEffectImpl {
public SenTripletsPlayFromOpponentsHandEffect() { public SenTripletsPlayFromOpponentsHandEffect() {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
staticText = "You may play cards from that player's hand this turn"; staticText = "You may play lands and cast spells from that player's hand this turn";
} }
public SenTripletsPlayFromOpponentsHandEffect(final SenTripletsPlayFromOpponentsHandEffect effect) { public SenTripletsPlayFromOpponentsHandEffect(final SenTripletsPlayFromOpponentsHandEffect effect) {

View file

@ -1,7 +1,6 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID; import mage.abilities.Ability;
import mage.abilities.common.BlocksAttachedTriggeredAbility; import mage.abilities.common.BlocksAttachedTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
@ -14,13 +13,13 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.SubType;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class ShieldOfTheRighteous extends CardImpl { public final class ShieldOfTheRighteous extends CardImpl {
@ -30,11 +29,16 @@ public final class ShieldOfTheRighteous extends CardImpl {
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +0/+2 and has vigilance. // Equipped creature gets +0/+2 and has vigilance.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(0, 2))); Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(0, 2));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT))); ability.addEffect(new GainAbilityAttachedEffect(
VigilanceAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has vigilance"));
// Whenever equipped creature blocks a creature, that creature doesn't untap during its controller's next untap step. // Whenever equipped creature blocks a creature, that creature doesn't untap during its controller's next untap step.
this.addAbility(new BlocksAttachedTriggeredAbility(new DontUntapInControllersNextUntapStepTargetEffect("that creature"), "equipped", false, false, true)); this.addAbility(new BlocksAttachedTriggeredAbility(
new DontUntapInControllersNextUntapStepTargetEffect("that creature"),
"equipped", false, false, true
));
// Equip {2} // Equip {2}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent())); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent()));

View file

@ -83,6 +83,6 @@ class SigilCaptainTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public String getRule() { public String getRule() {
return "Whenever a creature enters the battlefield under your control, if that creature is 1/1, put two +1/+1 counters on it"; return "Whenever a creature enters the battlefield under your control, if that creature is 1/1, put two +1/+1 counters on it.";
} }
} }

View file

@ -1,9 +1,6 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.effects.common.SacrificeTargetEffect;
@ -21,8 +18,9 @@ import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class SlaveOfBolas extends CardImpl { public final class SlaveOfBolas extends CardImpl {
@ -31,9 +29,11 @@ public final class SlaveOfBolas extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U/R}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U/R}{B}");
// Gain control of target creature. Untap that creature. It gains haste until end of turn. Sacrifice it at the beginning of the next end step. // Gain control of target creature. Untap that creature. It gains haste until end of turn. Sacrifice it at the beginning of the next end step.
this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.Custom));
this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature")); this.getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap that creature"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("It gains haste until end of turn")); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
).setText("It gains haste until end of turn"));
this.getSpellAbility().addEffect(new SlaveOfBolasEffect()); this.getSpellAbility().addEffect(new SlaveOfBolasEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
} }
@ -67,13 +67,13 @@ class SlaveOfBolasEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget()); Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) { if (permanent == null) {
SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice this", source.getControllerId());
sacrificeEffect.setTargetPointer(new FixedTarget(permanent, game));
DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect);
game.addDelayedTriggeredAbility(delayedAbility, source);
return true;
}
return false; return false;
} }
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
new SacrificeTargetEffect("sacrifice this", source.getControllerId())
.setTargetPointer(new FixedTarget(permanent, game))
), source);
return true;
}
} }

View file

@ -33,7 +33,7 @@ public final class StunSniper extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(1)); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(1));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addEffect(new TapTargetEffect()); ability.addEffect(new TapTargetEffect().setText("tap that creature"));
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -11,7 +11,9 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.common.FilterControlledArtifactPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
/** /**
@ -20,14 +22,14 @@ import mage.target.common.TargetControlledPermanent;
*/ */
public final class TimeSieve extends CardImpl { public final class TimeSieve extends CardImpl {
private static final FilterControlledPermanent filter=new FilterControlledArtifactPermanent("artifacts");
public TimeSieve(UUID ownerId, CardSetInfo setInfo) { public TimeSieve(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{U}{B}"); super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{U}{B}");
// {tap}, Sacrifice five artifacts: Take an extra turn after this one. // {tap}, Sacrifice five artifacts: Take an extra turn after this one.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddExtraTurnControllerEffect(), new TapSourceCost()); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddExtraTurnControllerEffect(), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterControlledArtifactPermanent("five artifacts"), true))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(5, filter)));
this.addAbility(ability); this.addAbility(ability);
} }
private TimeSieve(final TimeSieve card) { private TimeSieve(final TimeSieve card) {

View file

@ -1,12 +1,9 @@
package mage.cards.u; package mage.cards.u;
import java.util.UUID;
import mage.MageObjectReference; import mage.MageObjectReference;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect;
@ -23,29 +20,31 @@ import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.ZombieToken; import mage.game.permanent.token.ZombieToken;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class UnscytheKillerOfKings extends CardImpl { public final class UnscytheKillerOfKings extends CardImpl {
public UnscytheKillerOfKings(UUID ownerId, CardSetInfo setInfo) { public UnscytheKillerOfKings(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{U}{B}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{U}{B}{B}{R}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +3/+3 and has first strike. // Equipped creature gets +3/+3 and has first strike.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 3))); Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(3, 3));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); ability.addEffect(new GainAbilityAttachedEffect(
FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has first strike"));
// Whenever a creature dealt damage by equipped creature this turn dies, you may exile that card. If you do, create a 2/2 black Zombie creature token. // Whenever a creature dealt damage by equipped creature this turn dies, you may exile that card. If you do, create a 2/2 black Zombie creature token.
this.addAbility(new UnscytheKillerOfKingsTriggeredAbility(new UnscytheEffect())); this.addAbility(new UnscytheKillerOfKingsTriggeredAbility(new UnscytheEffect()));
// Equip {2} // Equip {2}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent())); this.addAbility(new EquipAbility(2));
} }
private UnscytheKillerOfKings(final UnscytheKillerOfKings card) { private UnscytheKillerOfKings(final UnscytheKillerOfKings card) {
@ -80,33 +79,31 @@ class UnscytheKillerOfKingsTriggeredAbility extends TriggeredAbilityImpl {
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent) event).isDiesEvent()) { if (!((ZoneChangeEvent) event).isDiesEvent()) {
return false;
}
ZoneChangeEvent zEvent = (ZoneChangeEvent) event; ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getTarget().isCreature(game)) { // target token can't create Zombie if (!zEvent.getTarget().isCreature(game)) {
return false;
} // target token can't create Zombie
Permanent equipment = game.getPermanent(getSourceId()); Permanent equipment = game.getPermanent(getSourceId());
// the currently equiped creature must have done damage to the dying creature // the currently equiped creature must have done damage to the dying creature
if (equipment != null && equipment.getAttachedTo() != null) { if (equipment == null || equipment.getAttachedTo() == null) {
return false;
}
boolean damageDealt = false; boolean damageDealt = false;
for (MageObjectReference mor : zEvent.getTarget().getDealtDamageByThisTurn()) { for (MageObjectReference mor : zEvent.getTarget().getDealtDamageByThisTurn()) {
if (mor.refersTo(equipment.getAttachedTo(), game)) { if (mor.refersTo(equipment.getAttachedTo(), game)) {
damageDealt = true; getEffects().setTargetPointer(new FixedTarget(event.getTargetId(), game));
break;
}
}
if (damageDealt) {
Effect effect = this.getEffects().get(0);
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
return true; return true;
} }
} }
}
}
return false; return false;
} }
@Override @Override
public String getTriggerPhrase() { public String getTriggerPhrase() {
return "Whenever a creature dealt damage by equipped creature this turn dies, " ; return "Whenever a creature dealt damage by equipped creature this turn dies, ";
} }
} }
@ -129,7 +126,9 @@ class UnscytheEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller == null) {
return false;
}
Card card = game.getCard(targetPointer.getFirst(game, source)); Card card = game.getCard(targetPointer.getFirst(game, source));
if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD && controller.moveCardToExileWithInfo(card, null, "", source, game, Zone.GRAVEYARD, true)) { if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD && controller.moveCardToExileWithInfo(card, null, "", source, game, Zone.GRAVEYARD, true)) {
ZombieToken zombie = new ZombieToken(); ZombieToken zombie = new ZombieToken();
@ -137,6 +136,4 @@ class UnscytheEffect extends OneShotEffect {
} }
return true; return true;
} }
return false;
}
} }

View file

@ -31,7 +31,7 @@ public final class VengefulRebirth extends CardImpl {
this.getSpellAbility().addEffect(new VengefulRebirthEffect()); this.getSpellAbility().addEffect(new VengefulRebirthEffect());
// Exile Vengeful Rebirth. // Exile Vengeful Rebirth.
this.getSpellAbility().addEffect(new ExileSpellEffect()); this.getSpellAbility().addEffect(new ExileSpellEffect().concatBy("<br>"));
} }
private VengefulRebirth(final VengefulRebirth card) { private VengefulRebirth(final VengefulRebirth card) {

View file

@ -62,7 +62,7 @@ public class VerifyCardDataTest {
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class); private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
private static final String FULL_ABILITIES_CHECK_SET_CODE = "CON"; // check all abilities and output cards with wrong abilities texts; private static final String FULL_ABILITIES_CHECK_SET_CODE = "ARB"; // check all abilities and output cards with wrong abilities texts;
private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run
private static final boolean ONLY_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages private static final boolean ONLY_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages
@ -83,7 +83,7 @@ public class VerifyCardDataTest {
private static final String SKIP_LIST_WRONG_CARD_NUMBERS = "WRONG_CARD_NUMBERS"; private static final String SKIP_LIST_WRONG_CARD_NUMBERS = "WRONG_CARD_NUMBERS";
private static final String SKIP_LIST_SAMPLE_DECKS = "SAMPLE_DECKS"; private static final String SKIP_LIST_SAMPLE_DECKS = "SAMPLE_DECKS";
private static final List<String> evergreenKeywords = Arrays.asList( private static final List<String> evergreenKeywords = Arrays.asList(
"flying", "lifelink", "menace", "trample", "haste", "first strike", "hexproof", "flying", "lifelink", "menace", "trample", "haste", "first strike", "hexproof", "fear",
"deathtouch", "double strike", "indestructible", "reach", "flash", "defender", "vigilance", "deathtouch", "double strike", "indestructible", "reach", "flash", "defender", "vigilance",
"plainswalk", "islandwalk", "swampwalk", "mountainwalk", "forestwalk" "plainswalk", "islandwalk", "swampwalk", "mountainwalk", "forestwalk"
); );

View file

@ -0,0 +1,45 @@
package mage.abilities.common;
import mage.abilities.effects.Effect;
import mage.abilities.keyword.CyclingAbility;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.stack.StackObject;
/**
* @author TheElk801
*/
public class CycleOrDiesTriggeredAbility extends ZoneChangeTriggeredAbility {
public CycleOrDiesTriggeredAbility(Effect effect, boolean optional) {
super(Zone.ALL, effect, "When you cycle {this} or it dies, ", optional);
}
public CycleOrDiesTriggeredAbility(CycleOrDiesTriggeredAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (!event.getSourceId().equals(this.getSourceId())) {
return false;
}
if (((ZoneChangeEvent) event).isDiesEvent()) {
return true;
}
StackObject object = game.getStack().getStackObject(event.getSourceId());
return object != null && object.getStackAbility() instanceof CyclingAbility;
}
@Override
public CycleOrDiesTriggeredAbility copy() {
return new CycleOrDiesTriggeredAbility(this);
}
}

View file

@ -86,7 +86,11 @@ public class DealsDamageToAPlayerAttachedTriggeredAbility extends TriggeredAbili
@Override @Override
public String getTriggerPhrase() { public String getTriggerPhrase() {
StringBuilder sb = new StringBuilder("Whenever ").append(attachedDescription); StringBuilder sb = new StringBuilder("Whenever ");
sb.append(attachedDescription);
if (!attachedDescription.endsWith("creature")) {
sb.append(" creature");
}
sb.append(" deals"); sb.append(" deals");
if (onlyCombat) { if (onlyCombat) {
sb.append(" combat"); sb.append(" combat");

View file

@ -37,7 +37,7 @@ public class PreventAllDamageToAllEffect extends PreventionEffectImpl {
public PreventAllDamageToAllEffect(Duration duration, FilterPermanentOrPlayer filter, boolean onlyCombat) { public PreventAllDamageToAllEffect(Duration duration, FilterPermanentOrPlayer filter, boolean onlyCombat) {
super(duration, Integer.MAX_VALUE, onlyCombat, false); super(duration, Integer.MAX_VALUE, onlyCombat, false);
this.filter = filter; this.filter = filter;
staticText = "Prevent all " staticText = "prevent all "
+ (onlyCombat ? "combat " : "") + (onlyCombat ? "combat " : "")
+ "damage that would be dealt to " + "damage that would be dealt to "
+ filter.getMessage() + filter.getMessage()

View file

@ -22,7 +22,7 @@ public class MustBeBlockedByTargetSourceEffect extends RequirementEffect {
public MustBeBlockedByTargetSourceEffect(Duration duration) { public MustBeBlockedByTargetSourceEffect(Duration duration) {
super(duration); super(duration);
staticText = "Target creature blocks {this} this turn if able"; staticText = "target creature blocks {this} this turn if able";
} }
public MustBeBlockedByTargetSourceEffect(final MustBeBlockedByTargetSourceEffect effect) { public MustBeBlockedByTargetSourceEffect(final MustBeBlockedByTargetSourceEffect effect) {