[M10] various text fixes

This commit is contained in:
Evan Kranzler 2022-03-07 09:00:39 -05:00
parent 1582321d26
commit 87a999ca0e
25 changed files with 167 additions and 250 deletions

View file

@ -1,12 +1,7 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.Effects;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -14,17 +9,17 @@ import mage.abilities.effects.common.counter.AddCountersAllEffect;
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.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent; import mage.game.permanent.token.AvatarToken;
import mage.game.Game;
import mage.game.permanent.Permanent; import java.util.UUID;
import mage.game.permanent.token.TokenImpl;
import mage.players.Player;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class AjaniGoldmane extends CardImpl { public final class AjaniGoldmane extends CardImpl {
@ -40,14 +35,18 @@ public final class AjaniGoldmane extends CardImpl {
this.addAbility(new LoyaltyAbility(new GainLifeEffect(2), 1)); this.addAbility(new LoyaltyAbility(new GainLifeEffect(2), 1));
// -1: Put a +1/+1 counter on each creature you control. Those creatures gain vigilance until end of turn. // -1: Put a +1/+1 counter on each creature you control. Those creatures gain vigilance until end of turn.
Effects effects1 = new Effects(); Ability ability = new LoyaltyAbility(new AddCountersAllEffect(
effects1.add(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent())); CounterType.P1P1.createInstance(),
effects1.add(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent())); StaticFilters.FILTER_CONTROLLED_CREATURE
this.addAbility(new LoyaltyAbility(effects1, -1)); ), -1);
ability.addEffect(new GainAbilityControlledEffect(
VigilanceAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_CONTROLLED_CREATURE
).setText("Those creatures gain vigilance until end of turn"));
this.addAbility(ability);
// -6: Create a white Avatar creature token. It has "This creature's power and toughness are each equal to your life total." // -6: Create a white Avatar creature token. It has "This creature's power and toughness are each equal to your life total."
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new AvatarToken()), -6)); this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new AvatarToken()), -6));
} }
private AjaniGoldmane(final AjaniGoldmane card) { private AjaniGoldmane(final AjaniGoldmane card) {
@ -58,54 +57,4 @@ public final class AjaniGoldmane extends CardImpl {
public AjaniGoldmane copy() { public AjaniGoldmane copy() {
return new AjaniGoldmane(this); return new AjaniGoldmane(this);
} }
}
class AvatarToken extends TokenImpl {
public AvatarToken() {
super("Avatar", "white Avatar creature token with \"This creature's power and toughness are each equal to your life total.\"");
cardType.add(CardType.CREATURE);
subtype.add(SubType.AVATAR);
color.setWhite(true);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AvatarTokenEffect()));
}
public AvatarToken(final AvatarToken token) {
super(token);
}
public AvatarToken copy() {
return new AvatarToken(this);
}
}
class AvatarTokenEffect extends ContinuousEffectImpl {
public AvatarTokenEffect() {
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature);
}
public AvatarTokenEffect(final AvatarTokenEffect effect) {
super(effect);
}
@Override
public AvatarTokenEffect copy() {
return new AvatarTokenEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent token = game.getPermanent(source.getSourceId());
if (token != null) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
token.getPower().setValue(controller.getLife());
token.getToughness().setValue(controller.getLife());
return true;
}
}
return false;
}
} }

View file

@ -1,12 +1,13 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -16,8 +17,9 @@ import mage.filter.common.FilterLandPermanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com, North * @author BetaSteward_at_googlemail.com, North
*/ */
public final class ArmoredAscension extends CardImpl { public final class ArmoredAscension extends CardImpl {
@ -29,8 +31,11 @@ public final class ArmoredAscension extends CardImpl {
filter.add(TargetController.YOU.getControllerPredicate()); filter.add(TargetController.YOU.getControllerPredicate());
} }
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
private static final Hint hint = new ValueHint("Plains you control", xValue);
public ArmoredAscension(UUID ownerId, CardSetInfo setInfo) { public ArmoredAscension(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
@ -41,10 +46,13 @@ public final class ArmoredAscension extends CardImpl {
this.addAbility(new EnchantAbility(auraTarget.getTargetName())); this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// Enchanted creature gets +1/+1 for each Plains you control and has flying. // Enchanted creature gets +1/+1 for each Plains you control and has flying.
PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter, 1); SimpleStaticAbility ability = new SimpleStaticAbility(
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield)); new BoostEnchantedEffect(xValue, xValue, Duration.WhileOnBattlefield)
ability.addEffect(new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA)); );
this.addAbility(ability); ability.addEffect(new GainAbilityAttachedEffect(
FlyingAbility.getInstance(), AttachmentType.AURA
).setText("and has flying"));
this.addAbility(ability.addHint(hint));
} }
private ArmoredAscension(final ArmoredAscension card) { private ArmoredAscension(final ArmoredAscension card) {

View file

@ -1,29 +1,26 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID; import mage.abilities.dynamicvalue.common.LandsYouControlCount;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.common.LandsYouControlHint;
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.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterControlledPermanent; import java.util.UUID;
/** /**
* @author Loki * @author Loki
*/ */
public final class BountifulHarvest extends CardImpl { public final class BountifulHarvest extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
public BountifulHarvest(UUID ownerId, CardSetInfo setInfo) { public BountifulHarvest(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
// You gain 1 life for each land you control. // You gain 1 life for each land you control.
this.getSpellAbility().addEffect(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addEffect(new GainLifeEffect(LandsYouControlCount.instance)
.setText("you gain 1 life for each land you control"));
this.getSpellAbility().addHint(LandsYouControlHint.instance);
} }
private BountifulHarvest(final BountifulHarvest card) { private BountifulHarvest(final BountifulHarvest card) {
@ -34,5 +31,4 @@ public final class BountifulHarvest extends CardImpl {
public BountifulHarvest copy() { public BountifulHarvest copy() {
return new BountifulHarvest(this); return new BountifulHarvest(this);
} }
} }

View file

@ -24,7 +24,7 @@ public final class BrambleCreeper extends CardImpl {
this.power = new MageInt(0); this.power = new MageInt(0);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// Whenever Bramble Creeper attacks, it gets +5/+0 until end of turn. // Whenever Bramble Creeper attacks, it gets +5/+0 until end of turn.
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(5, 0, Duration.EndOfTurn), false)); this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(5, 0, Duration.EndOfTurn).setText("it gets +5/+0 until end of turn"), false));
} }
private BrambleCreeper(final BrambleCreeper card) { private BrambleCreeper(final BrambleCreeper card) {

View file

@ -1,7 +1,5 @@
package mage.cards.b; package mage.cards.b;
import java.util.UUID;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -10,8 +8,9 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class BurstOfSpeed extends CardImpl { public final class BurstOfSpeed extends CardImpl {
@ -19,7 +18,10 @@ public final class BurstOfSpeed extends CardImpl {
public BurstOfSpeed(UUID ownerId, CardSetInfo setInfo) { public BurstOfSpeed(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}");
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false)); this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURES, false
));
} }
private BurstOfSpeed(final BurstOfSpeed card) { private BurstOfSpeed(final BurstOfSpeed card) {

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.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -15,33 +13,43 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.SoldierToken; import mage.game.permanent.token.SoldierToken;
import java.util.UUID;
/** /**
* @author Loki * @author Loki
*/ */
public final class CaptainOfTheWatch extends CardImpl { public final class CaptainOfTheWatch extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier creatures"); private static final FilterCreaturePermanent filter
= new FilterCreaturePermanent(SubType.SOLDIER, "Soldier creatures");
static {
filter.add(SubType.SOLDIER.getPredicate());
}
public CaptainOfTheWatch(UUID ownerId, CardSetInfo setInfo) { public CaptainOfTheWatch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.HUMAN);
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);
// Vigilance
this.addAbility(VigilanceAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance());
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true));
ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter, true)); // Other Soldier creatures you control get +1/+1 and have vigilance.
Ability ability = new SimpleStaticAbility(new BoostControlledEffect(
1, 1, Duration.WhileOnBattlefield, filter, true
));
ability.addEffect(new GainAbilityControlledEffect(
VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, filter, true
).setText("and have vigilance"));
this.addAbility(ability); this.addAbility(ability);
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), 3), false));
// When Captain of the Watch enters the battlefield, create three 1/1 white Soldier creature tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new CreateTokenEffect(new SoldierToken(), 3), false
));
} }
private CaptainOfTheWatch(final CaptainOfTheWatch card) { private CaptainOfTheWatch(final CaptainOfTheWatch card) {

View file

@ -1,16 +1,15 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
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.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class Disentomb extends CardImpl { public final class Disentomb extends CardImpl {
@ -18,8 +17,8 @@ public final class Disentomb extends CardImpl {
public Disentomb(UUID ownerId, CardSetInfo setInfo) { public Disentomb(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
} }
private Disentomb(final Disentomb card) { private Disentomb(final Disentomb card) {
@ -30,5 +29,4 @@ public final class Disentomb extends CardImpl {
public Disentomb copy() { public Disentomb copy() {
return new Disentomb(this); return new Disentomb(this);
} }
} }

View file

@ -1,7 +1,6 @@
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.ApprovingObject; import mage.ApprovingObject;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
@ -22,14 +21,13 @@ import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author nantuko * @author nantuko
*/ */
public final class DjinnOfWishes extends CardImpl { public final class DjinnOfWishes extends CardImpl {
private static final String ruleText = "{this} enters the battlefield with three wish counters on it";
public DjinnOfWishes(UUID ownerId, CardSetInfo setInfo) { public DjinnOfWishes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.subtype.add(SubType.DJINN); this.subtype.add(SubType.DJINN);
@ -40,7 +38,7 @@ public final class DjinnOfWishes extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Djinn of Wishes enters the battlefield with three wish counters on it. // Djinn of Wishes enters the battlefield with three wish counters on it.
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.WISH.createInstance(3)), ruleText)); this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.WISH.createInstance(3)), "with three wish counters on it"));
// {2}{U}{U}, Remove a wish counter from Djinn of Wishes: Reveal the top card of your library. You may play that card without paying its mana cost. If you don't, exile it. // {2}{U}{U}, Remove a wish counter from Djinn of Wishes: Reveal the top card of your library. You may play that card without paying its mana cost. If you don't, exile it.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DjinnOfWishesEffect(), new ManaCostsImpl("{2}{U}{U}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DjinnOfWishesEffect(), new ManaCostsImpl("{2}{U}{U}"));

View file

@ -1,41 +1,45 @@
package mage.cards.d; package mage.cards.d;
import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.InvertCondition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.BlueManaAbility;
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.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterLandPermanent; import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class DrownedCatacomb extends CardImpl { public final class DrownedCatacomb extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent(); private static final FilterPermanent filter = new FilterPermanent();
static { static {
filter.add(Predicates.or(SubType.SWAMP.getPredicate(), SubType.ISLAND.getPredicate())); filter.add(Predicates.or(
SubType.SWAMP.getPredicate(),
SubType.ISLAND.getPredicate()
));
} }
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0);
public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) { public DrownedCatacomb(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, null); super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
Condition controls = new InvertCondition(new PermanentsOnTheBattlefieldCondition(filter)); this.addAbility(new EntersBattlefieldAbility(
String abilityText = " tapped unless you control a Island or a Swamp"; new TapSourceEffect(), condition, null,
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new TapSourceEffect(), controls, abilityText), abilityText)); "tapped unless you control an Island or a Swamp"
));
this.addAbility(new BlackManaAbility()); this.addAbility(new BlackManaAbility());
this.addAbility(new BlueManaAbility()); this.addAbility(new BlueManaAbility());
} }

View file

@ -57,7 +57,7 @@ class FireballEffect extends OneShotEffect {
public FireballEffect() { public FireballEffect() {
super(Outcome.Damage); super(Outcome.Damage);
staticText = "this spell costs {1} more to cast for each target beyond the first.<br> {this} deals " + staticText = "this spell costs {1} more to cast for each target beyond the first.<br> {this} deals " +
"X damage divided evenly, rounded down, among any number of target creatures and/or players."; "X damage divided evenly, rounded down, among any number of targets";
} }
public FireballEffect(final FireballEffect effect) { public FireballEffect(final FireballEffect effect) {

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -9,8 +7,9 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class GloriousCharge extends CardImpl { public final class GloriousCharge extends CardImpl {
@ -19,7 +18,10 @@ public final class GloriousCharge extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
// Creatures you control get +1/+1 until end of turn. // Creatures you control get +1/+1 until end of turn.
this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false)); this.getSpellAbility().addEffect(new BoostControlledEffect(
1, 1, Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURES, false
));
} }
private GloriousCharge(final GloriousCharge card) { private GloriousCharge(final GloriousCharge 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.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -12,25 +10,25 @@ 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.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class GoblinArtillery extends CardImpl { public final class GoblinArtillery extends CardImpl {
public GoblinArtillery(UUID ownerId, CardSetInfo setInfo) { public GoblinArtillery(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost()); Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(2), new TapSourceCost());
ability.addEffect(new DamageControllerEffect(3).setText("and 3 damage to you"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
ability.addEffect(new DamageControllerEffect(3));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,9 +1,7 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
@ -13,22 +11,24 @@ 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.SubType;
import mage.constants.Outcome;
import mage.constants.Zone; import java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class GorgonFlail extends CardImpl { public final class GorgonFlail extends CardImpl {
public GorgonFlail(UUID ownerId, CardSetInfo setInfo) { public GorgonFlail(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(1, 1));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DeathtouchAbility.getInstance(), AttachmentType.EQUIPMENT))); ability.addEffect(new GainAbilityAttachedEffect(
this.addAbility(new EquipAbility(Outcome.BoostCreature, new ManaCostsImpl("{2}"))); DeathtouchAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has deathtouch"));
this.addAbility(new EquipAbility(2));
} }
private GorgonFlail(final GorgonFlail card) { private GorgonFlail(final GorgonFlail card) {

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.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -13,8 +11,9 @@ import mage.constants.SubType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class Gravedigger extends CardImpl { public final class Gravedigger extends CardImpl {
@ -26,7 +25,7 @@ public final class Gravedigger 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 EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect(), true);
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
this.addAbility(ability); this.addAbility(ability);
} }
@ -39,5 +38,4 @@ public final class Gravedigger extends CardImpl {
public Gravedigger copy() { public Gravedigger copy() {
return new Gravedigger(this); return new Gravedigger(this);
} }
} }

View file

@ -17,7 +17,7 @@ import mage.game.permanent.token.WolfToken;
*/ */
public final class HowlOfTheNightPack extends CardImpl { public final class HowlOfTheNightPack extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("for each Forest you control"); private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest you control");
static { static {
filter.add(SubType.FOREST.getPredicate()); filter.add(SubType.FOREST.getPredicate());

View file

@ -25,7 +25,7 @@ public final class IllusionaryServant extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect())); this.addAbility(new BecomesTargetTriggeredAbility(new SacrificeSourceEffect().setText("sacrifice it")));
} }
private IllusionaryServant(final IllusionaryServant card) { private IllusionaryServant(final IllusionaryServant card) {

View file

@ -1,43 +1,37 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
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.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 java.util.UUID;
/** /**
*
* @author North * @author North
*/ */
public final class Indestructibility extends CardImpl { public final class Indestructibility extends CardImpl {
public Indestructibility(UUID ownerId, CardSetInfo setInfo) { public Indestructibility(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant permanent // Enchant permanent
TargetPermanent auraTarget = new TargetPermanent(); TargetPermanent auraTarget = new TargetPermanent();
this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit));
this.addAbility(new EnchantAbility(auraTarget.getTargetName())); this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
// Enchanted permanent is indestructible. // Enchanted permanent is indestructible.
Effect effect = new GainAbilityAttachedEffect(IndestructibleAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
effect.setText("Enchanted permanent is indestructible"); IndestructibleAbility.getInstance(), AttachmentType.AURA,
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); Duration.WhileOnBattlefield, null, "permanent"
)));
} }
private Indestructibility(final Indestructibility card) { private Indestructibility(final Indestructibility card) {

View file

@ -30,7 +30,7 @@ public final class MagmaPhoenix extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
this.addAbility(new DiesSourceTriggeredAbility(new DamageEverythingEffect(3), false)); this.addAbility(new DiesSourceTriggeredAbility(new DamageEverythingEffect(3, "it"), false));
this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{3}{R}{R}"))); this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{3}{R}{R}")));
} }

View file

@ -21,7 +21,7 @@ import mage.filter.predicate.mageobject.ColorPredicate;
*/ */
public final class MoldAdder extends CardImpl { public final class MoldAdder extends CardImpl {
private static final FilterSpell filter = new FilterSpell("blue or black spell"); private static final FilterSpell filter = new FilterSpell("a blue or black spell");
static { static {
filter.add(Predicates.or( filter.add(Predicates.or(
new ColorPredicate(ObjectColor.BLUE), new ColorPredicate(ObjectColor.BLUE),

View file

@ -1,26 +1,27 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
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.filter.FilterCard;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class NaturesSpiral extends CardImpl { public final class NaturesSpiral extends CardImpl {
public NaturesSpiral(UUID ownerId, CardSetInfo setInfo) { private static final FilterCard filter = new FilterPermanentCard("permanent card from your graveyard");
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}");
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterPermanentCard("permanent card from your graveyard"))); public NaturesSpiral(UUID ownerId, CardSetInfo setInfo) {
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}");
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect());
} }
private NaturesSpiral(final NaturesSpiral card) { private NaturesSpiral(final NaturesSpiral card) {

View file

@ -25,7 +25,7 @@ public final class SparkmageApprentice extends CardImpl {
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1), false); Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "it"), false);
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.v; package mage.cards.v;
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.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
@ -10,28 +8,28 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import java.util.UUID;
/** /**
* @author Loki * @author Loki
*/ */
public final class VeteranSwordsmith extends CardImpl { public final class VeteranSwordsmith extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Soldier"); private static final FilterCreaturePermanent filter
= new FilterCreaturePermanent(SubType.SOLDIER, "Soldier creatures");
static {
filter.add(SubType.SOLDIER.getPredicate());
}
public VeteranSwordsmith(UUID ownerId, CardSetInfo setInfo) { public VeteranSwordsmith(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.HUMAN); this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, filter, true))); this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
1, 0, Duration.WhileOnBattlefield, filter, true
)));
} }
private VeteranSwordsmith(final VeteranSwordsmith card) { private VeteranSwordsmith(final VeteranSwordsmith card) {

View file

@ -1,8 +1,6 @@
package mage.cards.w; package mage.cards.w;
import java.util.UUID; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.combat.CantBeBlockedAttachedEffect; import mage.abilities.effects.common.combat.CantBeBlockedAttachedEffect;
@ -13,24 +11,27 @@ 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 java.util.UUID;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public final class WhispersilkCloak extends CardImpl { public final class WhispersilkCloak extends CardImpl {
public WhispersilkCloak(UUID ownerId, CardSetInfo setInfo) { public WhispersilkCloak(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
this.subtype.add(SubType.EQUIPMENT); this.subtype.add(SubType.EQUIPMENT);
// Equipped creature can't be blocked and has shroud. // Equipped creature can't be blocked and has shroud.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedAttachedEffect(AttachmentType.EQUIPMENT))); Ability ability = new SimpleStaticAbility(new CantBeBlockedAttachedEffect(AttachmentType.EQUIPMENT));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.EQUIPMENT))); ability.addEffect(new GainAbilityAttachedEffect(
ShroudAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has shroud"));
this.addAbility(ability);
// Equip {2} // Equip {2}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
} }
@ -43,5 +44,4 @@ public final class WhispersilkCloak extends CardImpl {
public WhispersilkCloak copy() { public WhispersilkCloak copy() {
return new WhispersilkCloak(this); return new WhispersilkCloak(this);
} }
} }

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 = "ARB"; // check all abilities and output cards with wrong abilities texts; private static final String FULL_ABILITIES_CHECK_SET_CODE = "M10"; // 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

@ -1,33 +1,27 @@
package mage.game.permanent.token; package mage.game.permanent.token;
import mage.abilities.Ability;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.dynamicvalue.common.ControllerLifeCount;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.SubLayer; import mage.constants.SubLayer;
import mage.constants.Zone; import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public final class AvatarToken extends TokenImpl { public final class AvatarToken extends TokenImpl {
public AvatarToken() { public AvatarToken() {
super("Avatar", "white Avatar creature token with \"This creature's power and toughness are each equal to your life total.\""); super("Avatar", "white Avatar creature token. It has \"This creature's power and toughness are each equal to your life total.\"");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
subtype.add(SubType.AVATAR); subtype.add(SubType.AVATAR);
color.setWhite(true); color.setWhite(true);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AvatarTokenEffect())); this.addAbility(new SimpleStaticAbility(new SetPowerToughnessSourceEffect(
ControllerLifeCount.instance, Duration.WhileOnBattlefield,
SubLayer.CharacteristicDefining_7a
).setText("this creature's power and toughness are each equal to your life total")));
} }
public AvatarToken(final AvatarToken token) { public AvatarToken(final AvatarToken token) {
@ -38,34 +32,3 @@ public final class AvatarToken extends TokenImpl {
return new AvatarToken(this); return new AvatarToken(this);
} }
} }
class AvatarTokenEffect extends ContinuousEffectImpl {
public AvatarTokenEffect() {
super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature);
}
public AvatarTokenEffect(final AvatarTokenEffect effect) {
super(effect);
}
@Override
public AvatarTokenEffect copy() {
return new AvatarTokenEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent token = game.getPermanent(source.getSourceId());
if (token != null) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
token.getPower().setValue(controller.getLife());
token.getToughness().setValue(controller.getLife());
return true;
}
}
return false;
}
}