[CON] various text fixes

This commit is contained in:
Evan Kranzler 2022-03-06 18:07:25 -05:00
parent edaaac53d9
commit c8cdc0a502
28 changed files with 237 additions and 212 deletions

View file

@ -1,4 +1,3 @@
package mage.cards.a; package mage.cards.a;
import mage.MageInt; import mage.MageInt;
@ -16,7 +15,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -40,7 +38,9 @@ public final class ApocalypseHydra extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(new ApocalypseHydraEffect())); this.addAbility(new EntersBattlefieldAbility(new ApocalypseHydraEffect()));
// {1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to any target. // {1}{R}, Remove a +1/+1 counter from Apocalypse Hydra: Apocalypse Hydra deals 1 damage to any target.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{1}{R}")); Ability ability = new SimpleActivatedAbility(
new DamageTargetEffect(1, "it"), new ManaCostsImpl<>("{1}{R}")
);
ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance()));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,8 +1,5 @@
package mage.cards.a; package mage.cards.a;
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;
@ -13,33 +10,42 @@ import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
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 AshasFavor extends CardImpl { public final class AshasFavor extends CardImpl {
public AshasFavor (UUID ownerId, CardSetInfo setInfo) { public AshasFavor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
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 GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); Ability ability = new SimpleStaticAbility(new GainAbilityAttachedEffect(
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA))); FlyingAbility.getInstance(), AttachmentType.AURA
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA))); ));
ability.addEffect(new GainAbilityAttachedEffect(
FirstStrikeAbility.getInstance(), AttachmentType.AURA
).setText(", first strike"));
ability.addEffect(new GainAbilityAttachedEffect(
VigilanceAbility.getInstance(), AttachmentType.AURA
).setText(", and vigilance"));
this.addAbility(ability);
} }
public AshasFavor (final AshasFavor card) { public AshasFavor(final AshasFavor card) {
super(card); super(card);
} }
@ -47,5 +53,4 @@ public final class AshasFavor extends CardImpl {
public AshasFavor copy() { public AshasFavor copy() {
return new AshasFavor(this); return new AshasFavor(this);
} }
} }

View file

@ -1,28 +1,27 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.DomainValue;
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
import mage.abilities.hint.common.DomainHint; import mage.abilities.hint.common.DomainHint;
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.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.SubType; import java.util.UUID;
import mage.constants.Zone;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class AvenTrailblazer extends CardImpl { public final class AvenTrailblazer extends CardImpl {
private static final DynamicValue xValue = new DomainValue();
public AvenTrailblazer(UUID ownerId, CardSetInfo setInfo) { public AvenTrailblazer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.BIRD); this.subtype.add(SubType.BIRD);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
@ -33,8 +32,10 @@ public final class AvenTrailblazer extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Domain - Aven Trailblazer's toughness is equal to the number of basic land types among lands you control. // Domain - Aven Trailblazer's toughness is equal to the number of basic land types among lands you control.
this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(new DomainValue(), Duration.EndOfGame)).addHint(DomainHint.instance)); this.addAbility(new SimpleStaticAbility(
Zone.ALL, new SetToughnessSourceEffect(xValue, Duration.EndOfGame)
.setText("{this}'s toughness is equal to the number of basic land types among lands you control")
).addHint(DomainHint.instance).setAbilityWord(AbilityWord.DOMAIN));
} }
private AvenTrailblazer(final AvenTrailblazer card) { private AvenTrailblazer(final AvenTrailblazer card) {

View file

@ -1,41 +1,38 @@
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.AttacksOrBlocksTriggeredAbility; import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.SacrificeTargetEffect; import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.keyword.UnearthAbility; import mage.abilities.keyword.UnearthAbility;
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.game.Game;
import mage.game.permanent.Permanent; import java.util.UUID;
import mage.target.targetpointer.FixedTarget;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class BrackwaterElemental extends CardImpl { public final class BrackwaterElemental extends CardImpl {
public BrackwaterElemental(UUID ownerId, CardSetInfo setInfo) { public BrackwaterElemental(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.ELEMENTAL);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// When Brackwater Elemental attacks or blocks, sacrifice it at the beginning of the next end step. // When Brackwater Elemental attacks or blocks, sacrifice it at the beginning of the next end step.
this.addAbility(new AttacksOrBlocksTriggeredAbility(new BrackwaterElementalSacrificeEffect(), false)); this.addAbility(new AttacksOrBlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new SacrificeSourceEffect())
).setText("sacrifice it at the beginning of the next end step"), false).setTriggerPhrase("When {this} attacks or blocks, "));
// Unearth {2}{U} // Unearth {2}{U}
this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{U}"))); this.addAbility(new UnearthAbility(new ManaCostsImpl<>("{2}{U}")));
} }
private BrackwaterElemental(final BrackwaterElemental card) { private BrackwaterElemental(final BrackwaterElemental card) {
@ -47,31 +44,3 @@ public final class BrackwaterElemental extends CardImpl {
return new BrackwaterElemental(this); return new BrackwaterElemental(this);
} }
} }
class BrackwaterElementalSacrificeEffect extends OneShotEffect {
public BrackwaterElementalSacrificeEffect() {
super(Outcome.Sacrifice);
this.staticText = "sacrifice it at the beginning of the next end step";
}
public BrackwaterElementalSacrificeEffect(final BrackwaterElementalSacrificeEffect effect) {
super(effect);
}
@Override
public BrackwaterElementalSacrificeEffect copy() {
return new BrackwaterElementalSacrificeEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent != null) {
SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice {this}");
sacrificeEffect.setTargetPointer(new FixedTarget(sourcePermanent.getId(), game));
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(sacrificeEffect), source);
}
return false;
}
}

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -9,26 +7,31 @@ import mage.abilities.effects.common.continuous.BoostAllEffect;
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.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.NamePredicate; import mage.filter.predicate.ObjectSourcePlayer;
import mage.filter.predicate.ObjectSourcePlayerPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class CylianSunsinger extends CardImpl { public final class CylianSunsinger extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Cylian Sunsinger and each other creature with the same name"); private static final FilterCreaturePermanent filter
= new FilterCreaturePermanent("{this} and each other creature with the same name as it");
static { static {
filter.add(new NamePredicate("Cylian Sunsinger")); filter.add(CylianSunsingerPredicate.instance);
} }
public CylianSunsinger(UUID ownerId, CardSetInfo setInfo) { public CylianSunsinger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.SHAMAN);
@ -36,8 +39,9 @@ public final class CylianSunsinger extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// {R}{G}{W}: Cylian Sunsinger and each other creature with the same name as it get +3/+3 until end of turn. // {R}{G}{W}: Cylian Sunsinger and each other creature with the same name as it get +3/+3 until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(3, 3, Duration.EndOfTurn, filter, false), new ManaCostsImpl("{R}{G}{W}"))); this.addAbility(new SimpleActivatedAbility(new BoostAllEffect(
3, 3, Duration.EndOfTurn, filter, false
), new ManaCostsImpl<>("{R}{G}{W}")));
} }
private CylianSunsinger(final CylianSunsinger card) { private CylianSunsinger(final CylianSunsinger card) {
@ -49,3 +53,14 @@ public final class CylianSunsinger extends CardImpl {
return new CylianSunsinger(this); return new CylianSunsinger(this);
} }
} }
enum CylianSunsingerPredicate implements ObjectSourcePlayerPredicate<Permanent> {
instance;
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
return input.getObject().getId().equals(input.getSourceId()) || CardUtil.haveSameNames(
input.getObject(), game.getPermanentOrLKIBattlefield(input.getSourceId())
);
}
}

View file

@ -1,30 +1,33 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.DomainValue;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.DomainHint; import mage.abilities.hint.common.DomainHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType; 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 North * @author North
*/ */
public final class DragDown extends CardImpl { public final class DragDown extends CardImpl {
public DragDown(UUID ownerId, CardSetInfo setInfo) { private static final DynamicValue xValue = new DomainValue(-1);
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
public DragDown(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// Domain - Target creature gets -1/-1 until end of turn for each basic land type among lands you control. // Domain - Target creature gets -1/-1 until end of turn for each basic land type among lands you control.
this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(-1), new DomainValue(-1), Duration.EndOfTurn, true)); this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addHint(DomainHint.instance); this.getSpellAbility().addHint(DomainHint.instance);
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
} }
private DragDown(final DragDown card) { private DragDown(final DragDown card) {

View file

@ -1,7 +1,5 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -17,29 +15,37 @@ import mage.constants.*;
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 ElderMastery extends CardImpl { public final class ElderMastery extends CardImpl {
public ElderMastery(UUID ownerId, CardSetInfo setInfo) { public ElderMastery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{B}{R}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant creature // Enchant creature
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);
// Enchanted creature gets +3/+3 and has flying. // Enchanted creature gets +3/+3 and has flying.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield))); Ability ability = new SimpleStaticAbility(new BoostEnchantedEffect(
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield))); 3, 3, Duration.WhileOnBattlefield
));
ability.addEffect(new GainAbilityAttachedEffect(
FlyingAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield
).setText("and has flying"));
this.addAbility(ability);
// Whenever enchanted creature deals damage to a player, that player discards two cards. // Whenever enchanted creature deals damage to a player, that player discards two cards.
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DiscardTargetEffect(2), "enchanted", false, true, false)); this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(
new DiscardTargetEffect(2), "enchanted creature",
false, true, false
));
} }
private ElderMastery(final ElderMastery card) { private ElderMastery(final ElderMastery card) {

View file

@ -1,10 +1,10 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
@ -14,42 +14,44 @@ import mage.abilities.keyword.ReachAbility;
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.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.mageobject.ColorPredicate;
import java.util.UUID;
/** /**
* @author Loki * @author Loki
*/ */
public final class EmberWeaver extends CardImpl { public final class EmberWeaver extends CardImpl {
private static final FilterPermanent redPermanentFilter = new FilterPermanent("red");
private static final FilterPermanent filter = new FilterPermanent();
static { static {
redPermanentFilter.add(new ColorPredicate(ObjectColor.RED)); filter.add(new ColorPredicate(ObjectColor.RED));
} }
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
public EmberWeaver(UUID ownerId, CardSetInfo setInfo) { public EmberWeaver(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.SPIDER); this.subtype.add(SubType.SPIDER);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.addAbility(ReachAbility.getInstance()); this.addAbility(ReachAbility.getInstance());
// As long as you control a red permanent, Ember Weaver gets +1/+0 and has first strike.
this.addAbility(new SimpleStaticAbility(
Zone.BATTLEFIELD,
new ConditionalContinuousEffect(
new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield),
new PermanentsOnTheBattlefieldCondition(redPermanentFilter), "{this} gets +1/+0 as long as you control a red permanent")));
this.addAbility(new SimpleStaticAbility(
Zone.BATTLEFIELD,
new ConditionalContinuousEffect(
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
new PermanentsOnTheBattlefieldCondition(redPermanentFilter), "{this} has first strike as long as you control a red permanent")));
// As long as you control a red permanent, Ember Weaver gets +1/+0 and has first strike.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield),
condition, "as long as you control a red permanent, {this} gets +1/+0"
));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(
FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield
), condition, "and has first strike"));
this.addAbility(ability);
} }
private EmberWeaver(final EmberWeaver card) { private EmberWeaver(final EmberWeaver card) {

View file

@ -1,4 +1,3 @@
package mage.cards.e; package mage.cards.e;
import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.DomainValue;
@ -7,15 +6,15 @@ import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.hint.common.DomainHint; import mage.abilities.hint.common.DomainHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType; import mage.constants.CardType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.common.TargetPlayerOrPlaneswalker;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class ExplodingBorders extends CardImpl { public final class ExplodingBorders extends CardImpl {
@ -28,6 +27,7 @@ public final class ExplodingBorders extends CardImpl {
this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue())); this.getSpellAbility().addEffect(new DamageTargetEffect(new DomainValue()));
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
this.getSpellAbility().addHint(DomainHint.instance); this.getSpellAbility().addHint(DomainHint.instance);
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
} }
private ExplodingBorders(final ExplodingBorders card) { private ExplodingBorders(final ExplodingBorders card) {

View file

@ -1,7 +1,5 @@
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.LeavesBattlefieldAllTriggeredAbility; import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility;
@ -17,10 +15,10 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate; import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*
*/ */
public final class ExtractorDemon extends CardImpl { public final class ExtractorDemon extends CardImpl {
@ -41,12 +39,16 @@ public final class ExtractorDemon extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Whenever another creature leaves the battlefield, you may have target player put the top two cards of their library into their graveyard. // Whenever another creature leaves the battlefield, you may have target player put the top two cards of their library into their graveyard.
Ability ability = new LeavesBattlefieldAllTriggeredAbility(new PutLibraryIntoGraveTargetEffect(2), filter, true); Ability ability = new LeavesBattlefieldAllTriggeredAbility(
new PutLibraryIntoGraveTargetEffect(2)
.setText("you may have target player mill two cards"),
filter, true
);
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(ability); this.addAbility(ability);
// Unearth {2}{B} // Unearth {2}{B}
this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{B}"))); this.addAbility(new UnearthAbility(new ManaCostsImpl<>("{2}{B}")));
} }
private ExtractorDemon(final ExtractorDemon card) { private ExtractorDemon(final ExtractorDemon card) {

View file

@ -1,9 +1,9 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.DevouredCreaturesCondition; import mage.abilities.condition.common.DevouredCreaturesCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.DevourEffect.DevourFactor; import mage.abilities.effects.common.DevourEffect.DevourFactor;
@ -14,18 +14,20 @@ import mage.abilities.keyword.TrampleAbility;
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.ComparisonType; import mage.constants.ComparisonType;
import mage.constants.Zone; import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class HellkiteHatchling extends CardImpl { public final class HellkiteHatchling extends CardImpl {
private static final Condition condition = new DevouredCreaturesCondition(ComparisonType.MORE_THAN, 0);
public HellkiteHatchling(UUID ownerId, CardSetInfo setInfo) { public HellkiteHatchling(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}");
this.subtype.add(SubType.DRAGON); this.subtype.add(SubType.DRAGON);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -35,14 +37,15 @@ public final class HellkiteHatchling extends CardImpl {
this.addAbility(new DevourAbility(DevourFactor.Devour1)); this.addAbility(new DevourAbility(DevourFactor.Devour1));
// Hellkite Hatchling has flying and trample if it devoured a creature. // Hellkite Hatchling has flying and trample if it devoured a creature.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(FlyingAbility.getInstance()), new GainAbilitySourceEffect(FlyingAbility.getInstance()),
new DevouredCreaturesCondition(ComparisonType.MORE_THAN, 0), condition, "{this} has flying"
"{this} has flying if it devoured a creature"))); ));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( ability.addEffect(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(TrampleAbility.getInstance()), new GainAbilitySourceEffect(TrampleAbility.getInstance()),
new DevouredCreaturesCondition(ComparisonType.MORE_THAN, 0), condition, "and trample if it devoured a creature"
"{this} has trample if it devoured a creature"))); ));
this.addAbility(ability);
} }
private HellkiteHatchling(final HellkiteHatchling card) { private HellkiteHatchling(final HellkiteHatchling card) {

View file

@ -1,7 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.DomainValue;
@ -10,24 +8,27 @@ import mage.abilities.hint.common.DomainHint;
import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
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 java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class ManaforceMace extends CardImpl { public final class ManaforceMace extends CardImpl {
public ManaforceMace(UUID ownerId, CardSetInfo setInfo) { public ManaforceMace(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
// Domain - Equipped creature gets +1/+1 for each basic land type among lands you control. // Domain - Equipped creature gets +1/+1 for each basic land type among lands you control.
DomainValue value = new DomainValue(); this.addAbility(new SimpleStaticAbility(
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(value, value)).addHint(DomainHint.instance)); new BoostEquippedEffect(new DomainValue(), new DomainValue())
).addHint(DomainHint.instance).setAbilityWord(AbilityWord.DOMAIN));
// Equip {3} // Equip {3}
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3))); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3)));
} }

View file

@ -1,30 +1,33 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.DomainValue;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.common.DomainHint; import mage.abilities.hint.common.DomainHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType; 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 MightOfAlara extends CardImpl { public final class MightOfAlara extends CardImpl {
public MightOfAlara(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
public MightOfAlara(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
// Domain - Target creature gets +1/+1 until end of turn for each basic land type among lands you control. // Domain - Target creature gets +1/+1 until end of turn for each basic land type among lands you control.
this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(), new DomainValue(), Duration.EndOfTurn, true)); this.getSpellAbility().addEffect(new BoostTargetEffect(
new DomainValue(), new DomainValue(), Duration.EndOfTurn, true
));
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addHint(DomainHint.instance); this.getSpellAbility().addHint(DomainHint.instance);
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
} }
private MightOfAlara(final MightOfAlara card) { private MightOfAlara(final MightOfAlara card) {

View file

@ -54,7 +54,7 @@ public final class NicolBolasPlaneswalker extends CardImpl {
.setText("That player or that planeswalker's controller discards seven cards") .setText("That player or that planeswalker's controller discards seven cards")
); );
ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then") ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then")
.setText("then sacrifices seven permanents") .setText(", then sacrifices seven permanents")
); );
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -74,7 +74,7 @@ class CardsInChosenPlayerHandCount implements DynamicValue {
@Override @Override
public String getMessage() { public String getMessage() {
return "card in chosen opponents hand"; return "card in the chosen player's hand";
} }
@Override @Override

View file

@ -1,7 +1,5 @@
package mage.cards.s; package mage.cards.s;
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;
@ -12,18 +10,18 @@ import mage.abilities.keyword.VigilanceAbility;
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 java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class ScornfulAetherLich extends CardImpl { public final class ScornfulAetherLich extends CardImpl {
public ScornfulAetherLich(UUID ownerId, CardSetInfo setInfo) { public ScornfulAetherLich(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{U}");
this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
@ -31,8 +29,12 @@ public final class ScornfulAetherLich extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// {W}{B}: Scornful Aether-Lich gains fear and vigilance until end of turn. // {W}{B}: Scornful Aether-Lich gains fear and vigilance until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FearAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{W}{B}")); Ability ability = new SimpleActivatedAbility(new GainAbilitySourceEffect(
ability.addEffect(new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn)); FearAbility.getInstance(), Duration.EndOfTurn
).setText("{this} gains fear"), new ManaCostsImpl<>("{W}{B}"));
ability.addEffect(new GainAbilitySourceEffect(
VigilanceAbility.getInstance(), Duration.EndOfTurn
).setText("and vigilance until end of turn"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -36,7 +36,7 @@ public final class SphinxSummoner extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// When Sphinx Summoner enters the battlefield, you may search your library for an artifact creature card, reveal it, and put it into your hand. If you do, shuffle your library. // When Sphinx Summoner enters the battlefield, you may search your library for an artifact creature card, reveal it, and put it into your hand. If you do, shuffle your library.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, false), true)); this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), true));
} }
private SphinxSummoner(final SphinxSummoner card) { private SphinxSummoner(final SphinxSummoner card) {

View file

@ -7,6 +7,7 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.common.DomainHint; import mage.abilities.hint.common.DomainHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType; import mage.constants.CardType;
import mage.game.permanent.token.SaprolingToken; import mage.game.permanent.token.SaprolingToken;
@ -23,6 +24,7 @@ public final class SporeBurst extends CardImpl {
// Domain - Create a 1/1 green Saproling creature token for each basic land type among lands you control. // Domain - Create a 1/1 green Saproling creature token for each basic land type among lands you control.
this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new DomainValue())); this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new DomainValue()));
this.getSpellAbility().addHint(DomainHint.instance); this.getSpellAbility().addHint(DomainHint.instance);
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
} }
private SporeBurst(final SporeBurst card) { private SporeBurst(final SporeBurst card) {

View file

@ -1,8 +1,5 @@
package mage.cards.v; package mage.cards.v;
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;
@ -12,19 +9,18 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
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 java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class VectisAgents extends CardImpl { public final class VectisAgents extends CardImpl {
public VectisAgents(UUID ownerId, CardSetInfo setInfo) { public VectisAgents(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{3}{U}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{U}{B}");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.ROGUE); this.subtype.add(SubType.ROGUE);
@ -32,10 +28,10 @@ public final class VectisAgents extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// {U}{B}: Vectis Agents gets -2/-0 until end of turn and can't be blocked this turn. // {U}{B}: Vectis Agents gets -2/-0 until end of turn and can't be blocked this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, Ability ability = new SimpleActivatedAbility(new BoostSourceEffect(
new BoostSourceEffect(-2, -0, Duration.EndOfTurn), -2, -0, Duration.EndOfTurn
new ManaCostsImpl("{U}{B}")); ), new ManaCostsImpl<>("{U}{B}"));
ability.addEffect(new CantBeBlockedSourceEffect(Duration.EndOfTurn)); ability.addEffect(new CantBeBlockedSourceEffect(Duration.EndOfTurn).setText("and can't be blocked this turn"));
this.addAbility(ability); this.addAbility(ability);
} }
@ -47,5 +43,4 @@ public final class VectisAgents extends CardImpl {
public VectisAgents copy() { public VectisAgents copy() {
return new VectisAgents(this); return new VectisAgents(this);
} }
} }

View file

@ -1,29 +1,32 @@
package mage.cards.v; package mage.cards.v;
import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.DomainValue;
import mage.abilities.effects.common.discard.DiscardTargetEffect; import mage.abilities.effects.common.discard.DiscardTargetEffect;
import mage.abilities.hint.common.DomainHint; import mage.abilities.hint.common.DomainHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType; import mage.constants.CardType;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class VoicesFromTheVoid extends CardImpl { public final class VoicesFromTheVoid extends CardImpl {
public VoicesFromTheVoid(UUID ownerId, CardSetInfo setInfo) { private static final DynamicValue xValue = new DomainValue();
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}");
public VoicesFromTheVoid(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}");
// Domain - Target player discards a card for each basic land type among lands you control. // Domain - Target player discards a card for each basic land type among lands you control.
this.getSpellAbility().addEffect(new DiscardTargetEffect(new DomainValue())); this.getSpellAbility().addEffect(new DiscardTargetEffect(xValue));
this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addHint(DomainHint.instance); this.getSpellAbility().addHint(DomainHint.instance);
this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN);
} }
private VoicesFromTheVoid(final VoicesFromTheVoid card) { private VoicesFromTheVoid(final VoicesFromTheVoid card) {

View file

@ -1,29 +1,31 @@
package mage.cards.w; package mage.cards.w;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.DomainValue;
import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.common.DomainHint; import mage.abilities.hint.common.DomainHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
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 java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class WanderingGoblins extends CardImpl { public final class WanderingGoblins extends CardImpl {
private static final DynamicValue xValue = new DomainValue();
public WanderingGoblins(UUID ownerId, CardSetInfo setInfo) { public WanderingGoblins(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
@ -31,7 +33,9 @@ public final class WanderingGoblins extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Domain - {3}: Wandering Goblins gets +1/+0 until end of turn for each basic land type among lands you control. // Domain - {3}: Wandering Goblins gets +1/+0 until end of turn for each basic land type among lands you control.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), StaticValue.get(0), Duration.EndOfTurn, true), new GenericManaCost(3)).addHint(DomainHint.instance)); this.addAbility(new SimpleActivatedAbility(new BoostSourceEffect(
xValue, StaticValue.get(0), Duration.EndOfTurn, true
), new GenericManaCost(3)).addHint(DomainHint.instance).setAbilityWord(AbilityWord.DOMAIN));
} }
private WanderingGoblins(final WanderingGoblins card) { private WanderingGoblins(final WanderingGoblins card) {

View file

@ -1,8 +1,5 @@
package mage.cards.y; package mage.cards.y;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility; import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DestroyAttachedToEffect; import mage.abilities.effects.common.DestroyAttachedToEffect;
@ -10,34 +7,34 @@ import mage.abilities.keyword.EnchantAbility;
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.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class YokeOfTheDamned extends CardImpl { public final class YokeOfTheDamned extends CardImpl {
public YokeOfTheDamned(UUID ownerId, CardSetInfo setInfo) { public YokeOfTheDamned(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant creature // Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent(); TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
this.addAbility(ability);
// When a creature dies, destroy enchanted creature. // When a creature dies, destroy enchanted creature.
this.addAbility(new DiesCreatureTriggeredAbility(new DestroyAttachedToEffect("enchanted creature"), false, StaticFilters.FILTER_PERMANENT_A_CREATURE)); this.addAbility(new DiesCreatureTriggeredAbility(
new DestroyAttachedToEffect("enchanted creature"),
false, StaticFilters.FILTER_PERMANENT_A_CREATURE
).setTriggerPhrase("When a creature dies, "));
} }
private YokeOfTheDamned(final YokeOfTheDamned card) { private YokeOfTheDamned(final YokeOfTheDamned 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 = "ALA"; // check all abilities and output cards with wrong abilities texts; private static final String FULL_ABILITIES_CHECK_SET_CODE = "CON"; // 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

View file

@ -161,6 +161,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
} }
} else if (this.getTargets().isEmpty() } else if (this.getTargets().isEmpty()
|| ruleLow.startsWith("exile") || ruleLow.startsWith("exile")
|| ruleLow.startsWith("gain")
|| ruleLow.startsWith("destroy") || ruleLow.startsWith("destroy")
|| ruleLow.startsWith("return") || ruleLow.startsWith("return")
|| ruleLow.startsWith("tap") || ruleLow.startsWith("tap")

View file

@ -90,6 +90,6 @@ public class DomainValue implements DynamicValue {
@Override @Override
public String getMessage() { public String getMessage() {
return "basic land types among lands " + (countTargetPlayer ? "they control" : "you control"); return "basic land type among lands " + (countTargetPlayer ? "they control" : "you control");
} }
} }

View file

@ -153,7 +153,10 @@ public class DamageTargetEffect extends OneShotEffect {
String message = amount.getMessage(); String message = amount.getMessage();
sb.append(this.sourceName).append(" deals "); sb.append(this.sourceName).append(" deals ");
if (message.isEmpty() || !message.equals("1")) { if (message.isEmpty() || !message.equals("1")) {
sb.append(amount).append(' '); sb.append(amount);
}
if (!sb.toString().endsWith(" ")) {
sb.append(' ');
} }
sb.append("damage to "); sb.append("damage to ");
if (!targetDescription.isEmpty()) { if (!targetDescription.isEmpty()) {

View file

@ -2,6 +2,7 @@ package mage.abilities.effects.common.continuous;
import mage.abilities.Abilities; import mage.abilities.Abilities;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.mana.*; import mage.abilities.mana.*;
import mage.choices.Choice; import mage.choices.Choice;
@ -61,7 +62,6 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
} }
this.chooseLandType = chooseLandType; this.chooseLandType = chooseLandType;
this.loseOther = loseOther; this.loseOther = loseOther;
this.staticText = setText();
} }
public BecomesBasicLandTargetEffect(final BecomesBasicLandTargetEffect effect) { public BecomesBasicLandTargetEffect(final BecomesBasicLandTargetEffect effect) {
@ -147,8 +147,18 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
return true; return true;
} }
private String setText() { @Override
StringBuilder sb = new StringBuilder("target land becomes "); public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("target ");
if (!mode.getTargets().isEmpty()) {
sb.append(mode.getTargets().get(0).getTargetName());
} else {
sb.append("land");
}
sb.append(" becomes ");
if (chooseLandType) { if (chooseLandType) {
sb.append("the basic land type of your choice"); sb.append("the basic land type of your choice");
} else { } else {
@ -162,7 +172,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl {
sb.append(" in addition to its other types"); sb.append(" in addition to its other types");
} }
if (!duration.toString().isEmpty() && duration != Duration.EndOfGame) { if (!duration.toString().isEmpty() && duration != Duration.EndOfGame) {
sb.append(' ').append(duration.toString()); sb.append(' ').append(duration);
} }
return sb.toString(); return sb.toString();
} }

View file

@ -1,4 +1,3 @@
package mage.game.permanent.token; package mage.game.permanent.token;
import mage.MageInt; import mage.MageInt;
@ -7,13 +6,12 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public final class RakkaMarElementalToken extends TokenImpl { public final class RakkaMarElementalToken extends TokenImpl {
public RakkaMarElementalToken () { public RakkaMarElementalToken() {
super("Elemental", "3/1 red Elemental creature with Haste"); super("Elemental", "3/1 red Elemental creature token with haste");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
color.setRed(true); color.setRed(true);
subtype.add(SubType.ELEMENTAL); subtype.add(SubType.ELEMENTAL);