added duration to BecomesCreatureSourceEffect + refactored some cards

This commit is contained in:
BetaSteward 2011-08-09 22:41:24 -04:00
parent cc5b68976f
commit ac5e4c0fec
28 changed files with 124 additions and 328 deletions

View file

@ -58,7 +58,7 @@ import mage.abilities.costs.mana.MonoHybridManaCost;
import mage.abilities.costs.mana.VariableManaCost;
import mage.abilities.effects.Effect;
import mage.abilities.effects.ReplacementEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.abilities.keyword.EquipAbility;
@ -463,7 +463,7 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
if (playableAbilities.size() > 0) {
for (ActivatedAbility ability: playableAbilities) {
if (ability.canActivate(playerId, game)) {
if (!(ability.getEffects().get(0) instanceof BecomesCreatureSourceEOTEffect)) {
if (!(ability.getEffects().get(0) instanceof BecomesCreatureSourceEffect)) {
if (this.activateAbility(ability, game))
return;
}

View file

@ -32,10 +32,11 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
@ -57,7 +58,7 @@ public class JadeIdol extends CardImpl<JadeIdol> {
public JadeIdol(UUID ownerId) {
super(ownerId, 256, "Jade Idol", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "CHK";
this.addAbility(new SpellCastTriggeredAbility(new BecomesCreatureSourceEOTEffect(new JadeIdolToken(), ""), filter, false));
this.addAbility(new SpellCastTriggeredAbility(new BecomesCreatureSourceEffect(new JadeIdolToken(), "", Duration.EndOfTurn), filter, false));
}
public JadeIdol(final JadeIdol card) {

View file

@ -30,18 +30,17 @@ package mage.sets.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetLandPermanent;
/**
@ -64,7 +63,7 @@ public class Soilshaper extends CardImpl<Soilshaper> {
this.color.setGreen(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
Ability ability = new SpellCastTriggeredAbility(new SoilshaperEffect(), filter, false);
Ability ability = new SpellCastTriggeredAbility(new BecomesCreatureTargetEffect(new SoilshaperToken(), "land", Duration.EndOfTurn), filter, false);
ability.addTarget(new TargetLandPermanent());
this.addAbility(ability);
}
@ -80,51 +79,13 @@ public class Soilshaper extends CardImpl<Soilshaper> {
}
class SoilshaperEffect extends ContinuousEffectImpl<SoilshaperEffect> {
class SoilshaperToken extends Token {
public SoilshaperEffect() {
super(Constants.Duration.EndOfTurn, Constants.Outcome.BecomeCreature);
staticText = "target land becomes a 3/3 creature until end of turn. It's still a land";
}
public SoilshaperToken() {
super("", "3/3");
this.cardType.add(CardType.CREATURE);
public SoilshaperEffect(final SoilshaperEffect effect) {
super(effect);
}
@Override
public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == Constants.SubLayer.NA) {
permanent.getCardType().add(CardType.CREATURE);
}
break;
case PTChangingEffects_7:
if (sublayer == Constants.SubLayer.SetPT_7b) {
permanent.getPower().setValue(3);
permanent.getToughness().setValue(3);
}
}
return true;
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public SoilshaperEffect copy() {
return new SoilshaperEffect(this);
}
@Override
public boolean hasLayer(Constants.Layer layer) {
return layer == Constants.Layer.PTChangingEffects_7 || layer == Constants.Layer.ColorChangingEffects_5 || layer == layer.TypeChangingEffects_4;
}
}
this.power = new MageInt(3);
this.toughness = new MageInt(3);
}
}

View file

@ -32,13 +32,14 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.ColorlessManaAbility;
@ -64,7 +65,7 @@ public class BlinkmothNexus extends CardImpl<BlinkmothNexus> {
super(ownerId, 163, "Blinkmoth Nexus", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "DST";
this.addAbility(new ColorlessManaAbility());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new BlinkmothNexusToken(), "land"), new GenericManaCost(1)));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new BlinkmothNexusToken(), "land", Duration.EndOfTurn), new GenericManaCost(1)));
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Constants.Duration.EndOfTurn), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent(filter));

View file

@ -32,11 +32,12 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
@ -51,7 +52,7 @@ public class DarksteelBrute extends CardImpl<DarksteelBrute> {
super(ownerId, 108, "Darksteel Brute", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "DST";
this.addAbility(IndestructibleAbility.getInstance());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new DarksteelBruteToken(), ""), new GenericManaCost(3)));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new DarksteelBruteToken(), "", Duration.EndOfTurn), new GenericManaCost(3)));
}
public DarksteelBrute (final DarksteelBrute card) {

View file

@ -30,12 +30,13 @@ package mage.sets.guildpact;
import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.continious.GainAbilityControlledEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
@ -51,7 +52,7 @@ public class GruulWarPlow extends CardImpl<GruulWarPlow> {
super(ownerId, 151, "Gruul War Plow", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
this.expansionSetCode = "GPT";
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Constants.Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault())));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GruulWarPlowToken(), ""), new ManaCostsImpl("{1}{R}{G}")));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GruulWarPlowToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{G}")));
}
public GruulWarPlow(final GruulWarPlow card) {

View file

@ -31,18 +31,13 @@ package mage.sets.magic2010;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Layer;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.SubLayer;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterLandPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetLandPermanent;
@ -66,7 +61,7 @@ public class AwakenerDruid extends CardImpl<AwakenerDruid> {
this.subtype.add("Druid");
this.power = new MageInt(1);
this.toughness = new MageInt(1);
Ability ability = new EntersBattlefieldTriggeredAbility(new AwakenerDruidEffect(), false);
Ability ability = new EntersBattlefieldTriggeredAbility(new BecomesCreatureTargetEffect(new AwakenerDruidToken(), "land", Duration.WhileOnBattlefield), false);
ability.addTarget(new TargetLandPermanent(filter));
this.addAbility(ability);
}
@ -82,67 +77,6 @@ public class AwakenerDruid extends CardImpl<AwakenerDruid> {
}
}
class AwakenerDruidEffect extends ContinuousEffectImpl<AwakenerDruidEffect> {
protected static AwakenerDruidToken token = new AwakenerDruidToken();
public AwakenerDruidEffect() {
super(Duration.WhileOnBattlefield, Outcome.BecomeCreature);
staticText = "target Forest becomes a 4/5 green Treefolk creature for as long as {this} is on the battlefield. It's still a land.";
}
public AwakenerDruidEffect(final AwakenerDruidEffect effect) {
super(effect);
}
@Override
public AwakenerDruidEffect copy() {
return new AwakenerDruidEffect(this);
}
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == SubLayer.NA) {
if (token.getCardType().size() > 0)
permanent.getCardType().addAll(token.getCardType());
if (token.getSubtype().size() > 0)
permanent.getSubtype().addAll(token.getSubtype());
}
break;
case ColorChangingEffects_5:
if (sublayer == SubLayer.NA) {
if (token.getColor().hasColor())
permanent.getColor().setColor(token.getColor());
}
break;
case PTChangingEffects_7:
if (sublayer == SubLayer.SetPT_7b) {
if (token.getPower() != MageInt.EmptyMageInt)
permanent.getPower().setValue(token.getPower().getValue());
if (token.getToughness() != MageInt.EmptyMageInt)
permanent.getToughness().setValue(token.getToughness().getValue());
}
}
}
return true;
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public boolean hasLayer(Layer layer) {
return layer == Layer.PTChangingEffects_7 || layer == Layer.ColorChangingEffects_5 || layer == layer.TypeChangingEffects_4;
}
}
class AwakenerDruidToken extends Token {
public AwakenerDruidToken() {

View file

@ -29,6 +29,7 @@ package mage.sets.magic2012;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
@ -36,7 +37,7 @@ import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.ActivateOncePerTurnActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
@ -59,15 +60,15 @@ public class Skinshifter extends CardImpl<Skinshifter> {
this.toughness = new MageInt(1);
Ability ability = new ActivateOncePerTurnActivatedAbility(Zone.BATTLEFIELD,
new BecomesCreatureSourceEOTEffect(new RhinoToken(), ""),
new BecomesCreatureSourceEffect(new RhinoToken(), "", Duration.EndOfTurn),
new ManaCostsImpl("{G}"));
Mode mode = new Mode();
mode.getEffects().add(new BecomesCreatureSourceEOTEffect(new BirdToken(), ""));
mode.getEffects().add(new BecomesCreatureSourceEffect(new BirdToken(), "", Duration.EndOfTurn));
ability.addMode(mode);
mode = new Mode();
mode.getEffects().add(new BecomesCreatureSourceEOTEffect(new PlantToken(), ""));
mode.getEffects().add(new BecomesCreatureSourceEffect(new PlantToken(), "", Duration.EndOfTurn));
ability.addMode(mode);
this.addAbility(ability);

View file

@ -31,17 +31,18 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.DrawCardControllerEffect;
import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetLandPermanent;
/**
@ -53,7 +54,7 @@ public class LifesparkSpellbomb extends CardImpl<LifesparkSpellbomb> {
public LifesparkSpellbomb(UUID ownerId) {
super(ownerId, 197, "Lifespark Spellbomb", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}");
this.expansionSetCode = "MRD";
Ability firstAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new LifesparkSpellbombEffect(), new ColoredManaCost(Constants.ColoredManaSymbol.G));
Ability firstAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new LifesparkSpellbombToken(), "land", Duration.EndOfTurn), new ColoredManaCost(Constants.ColoredManaSymbol.G));
firstAbility.addCost(new SacrificeSourceCost());
firstAbility.addTarget(new TargetLandPermanent());
this.addAbility(firstAbility);
@ -71,54 +72,15 @@ public class LifesparkSpellbomb extends CardImpl<LifesparkSpellbomb> {
return new LifesparkSpellbomb(this);
}
}
class LifesparkSpellbombEffect extends ContinuousEffectImpl<LifesparkSpellbombEffect> {
class LifesparkSpellbombToken extends Token {
public LifesparkSpellbombEffect() {
super(Constants.Duration.EndOfTurn, Constants.Outcome.BecomeCreature);
staticText = "Until end of turn, target land becomes a 3/3 creature that's still a land";
}
public LifesparkSpellbombToken() {
super("", "3/3");
this.cardType.add(CardType.CREATURE);
public LifesparkSpellbombEffect(final LifesparkSpellbombEffect effect) {
super(effect);
}
@Override
public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == Constants.SubLayer.NA) {
permanent.getCardType().add(CardType.CREATURE);
}
break;
case PTChangingEffects_7:
if (sublayer == Constants.SubLayer.SetPT_7b) {
permanent.getPower().setValue(3);
permanent.getToughness().setValue(3);
}
}
return true;
}
return false;
this.power = new MageInt(3);
this.toughness = new MageInt(3);
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public LifesparkSpellbombEffect copy() {
return new LifesparkSpellbombEffect(this);
}
@Override
public boolean hasLayer(Constants.Layer layer) {
return layer == Constants.Layer.PTChangingEffects_7 || layer == layer.TypeChangingEffects_4;
}
}
}

View file

@ -30,12 +30,13 @@ package mage.sets.mirrodinbesieged;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.InfectAbility;
import mage.abilities.mana.ColorlessManaAbility;
@ -52,7 +53,7 @@ public class InkmothNexus extends CardImpl<InkmothNexus> {
super(ownerId, 145, "Inkmoth Nexus", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "MBS";
this.addAbility(new ColorlessManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new InkmothNexusToken(), "land"), new GenericManaCost(1)));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new InkmothNexusToken(), "land", Duration.EndOfTurn), new GenericManaCost(1)));
}
public InkmothNexus (final InkmothNexus card) {

View file

@ -38,7 +38,7 @@ import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.effects.RequirementEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.PreventAllDamageSourceEffect;
@ -79,7 +79,7 @@ public class GideonJura extends CardImpl<GideonJura> {
ability2.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability2);
LoyaltyAbility ability3 = new LoyaltyAbility(new BecomesCreatureSourceEOTEffect(new GideonJuraToken(), "planeswalker"), 0);
LoyaltyAbility ability3 = new LoyaltyAbility(new BecomesCreatureSourceEffect(new GideonJuraToken(), "planeswalker", Duration.EndOfTurn), 0);
ability3.addEffect(new PreventAllDamageSourceEffect(Duration.EndOfTurn));
this.addAbility(ability3);
}

View file

@ -47,7 +47,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CountersCount;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.game.Game;
@ -66,7 +66,7 @@ public class ChimericMass extends CardImpl<ChimericMass> {
this.addAbility(new EntersBattlefieldAbility(new ChimericMassEffect(), "{this} enters the battlefield with X charge counters on it"));
Costs costs = new CostsImpl();
costs.add(new GenericManaCost(1));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new ChimericMassToken(), ""), costs));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ChimericMassToken(), "", Duration.EndOfTurn), costs));
}
public ChimericMass(final ChimericMass card) {

View file

@ -32,13 +32,14 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Abilities;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.game.Game;
@ -57,8 +58,7 @@ public class GlintHawkIdol extends CardImpl<GlintHawkIdol> {
super(ownerId, 156, "Glint Hawk Idol", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
this.expansionSetCode = "SOM";
this.addAbility(new GlintHawkIdolTriggeredAbility());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GlintHawkIdolToken(), ""), new ColoredManaCost(Constants.ColoredManaSymbol.W)));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GlintHawkIdolToken(), "", Duration.EndOfTurn), new ColoredManaCost(Constants.ColoredManaSymbol.W)));
}
public GlintHawkIdol (final GlintHawkIdol card) {
@ -74,7 +74,7 @@ public class GlintHawkIdol extends CardImpl<GlintHawkIdol> {
class GlintHawkIdolTriggeredAbility extends TriggeredAbilityImpl<GlintHawkIdolTriggeredAbility> {
GlintHawkIdolTriggeredAbility() {
super(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new GlintHawkIdolToken(), ""), true);
super(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new GlintHawkIdolToken(), "", Duration.EndOfTurn), true);
}
GlintHawkIdolTriggeredAbility(final GlintHawkIdolTriggeredAbility ability) {

View file

@ -35,6 +35,7 @@ import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
@ -46,12 +47,14 @@ import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DynamicManaEffect;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continious.BecomesCreatureTargetEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.counters.CounterType;
import mage.filter.common.FilterLandPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetLandPermanent;
@ -77,7 +80,7 @@ public class KothOfTheHammer extends CardImpl<KothOfTheHammer> {
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), ""));
Ability ability = new LoyaltyAbility(new UntapTargetEffect(), 1);
ability.addEffect(new KothOfTheHammerFirstEffect());
ability.addEffect(new BecomesCreatureTargetEffect(new KothOfTheHammerToken(), "land", Duration.EndOfTurn));
ability.addTarget(new TargetLandPermanent(filter));
this.addAbility(ability);
this.addAbility(new LoyaltyAbility(new DynamicManaEffect(Mana.RedMana, new PermanentsOnBattlefieldCount(filterCount)), -2));
@ -93,60 +96,17 @@ public class KothOfTheHammer extends CardImpl<KothOfTheHammer> {
return new KothOfTheHammer(this);
}
}
class KothOfTheHammerToken extends Token {
class KothOfTheHammerFirstEffect extends ContinuousEffectImpl<KothOfTheHammerFirstEffect> {
public KothOfTheHammerToken() {
super("Elemental", "4/4 red Elemental");
this.cardType.add(CardType.CREATURE);
this.subtype.add("Elemental");
public KothOfTheHammerFirstEffect() {
super(Duration.EndOfTurn, Constants.Outcome.BecomeCreature);
staticText = "It becomes a 4/4 red Elemental creature until end of turn. It's still a land";
}
public KothOfTheHammerFirstEffect(final KothOfTheHammerFirstEffect effect) {
super(effect);
}
@Override
public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == Constants.SubLayer.NA) {
permanent.getCardType().add(CardType.CREATURE);
permanent.getSubtype().add("Elemental");
}
break;
case ColorChangingEffects_5:
if (sublayer == Constants.SubLayer.NA) {
permanent.getColor().setRed(true);
}
break;
case PTChangingEffects_7:
if (sublayer == Constants.SubLayer.SetPT_7b) {
permanent.getPower().setValue(4);
permanent.getToughness().setValue(4);
}
}
return true;
}
return false;
this.color.setRed(true);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public KothOfTheHammerFirstEffect copy() {
return new KothOfTheHammerFirstEffect(this);
}
@Override
public boolean hasLayer(Constants.Layer layer) {
return layer == Constants.Layer.PTChangingEffects_7 || layer == Constants.Layer.ColorChangingEffects_5 || layer == layer.TypeChangingEffects_4;
}
}
class KothOfTheHammerThirdEffect extends ContinuousEffectImpl<KothOfTheHammerThirdEffect> {

View file

@ -32,13 +32,14 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.Metalcraft;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
@ -54,7 +55,7 @@ public class RustedRelic extends CardImpl<RustedRelic> {
this.addAbility(
new SimpleStaticAbility(Zone.BATTLEFIELD,
new ConditionalContinousEffect(
new BecomesCreatureSourceEOTEffect(new RustedRelicToken(), "artifact"),
new BecomesCreatureSourceEffect(new RustedRelicToken(), "artifact", Duration.Custom),
Metalcraft.getInstance(),
"Metalcraft - Rusted Relic is a 5/5 Golem artifact creature as long as you control three or more artifacts")));
}

View file

@ -31,15 +31,15 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
/**
*
@ -51,7 +51,7 @@ public class StalkingStones extends CardImpl<StalkingStones> {
super(ownerId, 333, "Stalking Stones", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "TMP";
this.addAbility(new ColorlessManaAbility());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new StalkingStonesEffect(), new GenericManaCost(6)));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StalkingStonesToken(), "land", Duration.WhileOnBattlefield), new GenericManaCost(6)));
}
public StalkingStones(final StalkingStones card) {
@ -64,52 +64,14 @@ public class StalkingStones extends CardImpl<StalkingStones> {
}
}
class StalkingStonesEffect extends ContinuousEffectImpl<StalkingStonesEffect> {
class StalkingStonesToken extends Token {
public StalkingStonesEffect() {
super(Constants.Duration.WhileOnBattlefield, Constants.Outcome.BecomeCreature);
staticText = "{this} becomes a 3/3 Elemental artifact creature that's still a land";
}
public StalkingStonesToken() {
super("Elemental", "3/3 Elemental artifact");
this.cardType.add(CardType.CREATURE);
this.cardType.add(CardType.ARTIFACT);
public StalkingStonesEffect(final StalkingStonesEffect effect) {
super(effect);
}
@Override
public boolean apply(Constants.Layer layer, Constants.SubLayer sublayer, Ability source, Game game) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
switch (layer) {
case TypeChangingEffects_4:
if (sublayer == Constants.SubLayer.NA) {
permanent.getCardType().add(CardType.ARTIFACT);
permanent.getCardType().add(CardType.CREATURE);
permanent.getSubtype().add("Elemental");
}
break;
case PTChangingEffects_7:
if (sublayer == Constants.SubLayer.SetPT_7b) {
permanent.getPower().setValue(3);
permanent.getToughness().setValue(3);
}
}
return true;
}
return false;
this.power = new MageInt(3);
this.toughness = new MageInt(3);
}
@Override
public boolean apply(Game game, Ability source) {
return false;
}
@Override
public StalkingStonesEffect copy() {
return new StalkingStonesEffect(this);
}
@Override
public boolean hasLayer(Constants.Layer layer) {
return layer == Constants.Layer.PTChangingEffects_7 || layer == layer.TypeChangingEffects_4;
}
}
}

View file

@ -31,13 +31,14 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
@ -54,7 +55,7 @@ public class FaerieConclave extends CardImpl<FaerieConclave> {
this.expansionSetCode = "10E";
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new BlueManaAbility());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new FaerieConclaveToken(), "land"), new ManaCostsImpl("{1}{U}")));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new FaerieConclaveToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{U}")));
}
public FaerieConclave(final FaerieConclave card) {

View file

@ -31,13 +31,14 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.mana.BlueManaAbility;
import mage.abilities.mana.WhiteManaAbility;
@ -55,7 +56,7 @@ public class ForbiddingWatchtower extends CardImpl<ForbiddingWatchtower> {
this.expansionSetCode = "10E";
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new WhiteManaAbility());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new ForbiddingWatchtowerToken(), "land"), new ManaCostsImpl("{1}{W}")));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ForbiddingWatchtowerToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{W}")));
}
public ForbiddingWatchtower(final ForbiddingWatchtower card) {

View file

@ -29,13 +29,14 @@ package mage.sets.tenth;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
@ -54,7 +55,7 @@ public class GhituEncampment extends CardImpl<GhituEncampment> {
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new RedManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new BecomesCreatureSourceEOTEffect(new GhituEncampmentToken(), "land"),
new BecomesCreatureSourceEffect(new GhituEncampmentToken(), "land", Duration.EndOfTurn),
new ManaCostsImpl("{1}{R}")));
}

View file

@ -31,6 +31,7 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.ObjectColor;
@ -39,7 +40,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
@ -55,7 +56,7 @@ public class SpawningPool extends CardImpl<SpawningPool> {
this.expansionSetCode = "10E";
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new BlackManaAbility());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new SkeletonToken(), "land"), new ManaCostsImpl("{1}{B}")));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new SkeletonToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{B}")));
}
public SpawningPool(final SpawningPool card) {

View file

@ -31,6 +31,7 @@ import java.util.UUID;
import mage.Constants;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.ObjectColor;
@ -39,7 +40,7 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.cards.CardImpl;
@ -56,7 +57,7 @@ public class TreetopVillage extends CardImpl<TreetopVillage> {
this.expansionSetCode = "10E";
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new GreenManaAbility());
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new ApeToken(), "land"), new ManaCostsImpl("{1}{G}")));
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new ApeToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{G}")));
}
public TreetopVillage(final TreetopVillage card) {

View file

@ -30,13 +30,14 @@ package mage.sets.worldwake;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.abilities.mana.BlueManaAbility;
@ -56,7 +57,7 @@ public class CelestialColonnade extends CardImpl<CelestialColonnade> {
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new BlueManaAbility());
this.addAbility(new WhiteManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new CelestialColonnadeToken(), "land"), new ManaCostsImpl("{3}{W}{U}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new CelestialColonnadeToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{3}{W}{U}")));
}
public CelestialColonnade(final CelestialColonnade card) {

View file

@ -30,13 +30,14 @@ package mage.sets.worldwake;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.UnblockableAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.BlueManaAbility;
@ -55,7 +56,7 @@ public class CreepingTarPit extends CardImpl<CreepingTarPit> {
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new BlueManaAbility());
this.addAbility(new BlackManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new CreepingTarPitToken(), "land"), new ManaCostsImpl("{1}{U}{B}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new CreepingTarPitToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{U}{B}")));
}
public CreepingTarPit (final CreepingTarPit card) {

View file

@ -30,12 +30,13 @@ package mage.sets.worldwake;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
@ -50,7 +51,7 @@ public class DreadStatuary extends CardImpl<DreadStatuary> {
super(ownerId, 135, "Dread Statuary", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "WWK";
this.addAbility(new ColorlessManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new DreadStatuaryToken(), "land"), new ManaCostsImpl("{4}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new DreadStatuaryToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{4}")));
}
public DreadStatuary(final DreadStatuary card) {

View file

@ -37,7 +37,7 @@ import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.continious.BoostPowerXSourceEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.RedManaAbility;
@ -56,7 +56,7 @@ public class LavaclawReaches extends CardImpl<LavaclawReaches> {
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new BlackManaAbility());
this.addAbility(new RedManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new LavaclawReachesToken(), "land"), new ManaCostsImpl("{1}{B}{R}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new LavaclawReachesToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{B}{R}")));
}
public LavaclawReaches(final LavaclawReaches card) {

View file

@ -30,6 +30,7 @@ package mage.sets.worldwake;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
@ -37,7 +38,7 @@ import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.RedManaAbility;
@ -57,7 +58,7 @@ public class RagingRavine extends CardImpl<RagingRavine> {
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new GreenManaAbility());
this.addAbility(new RedManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new RagingRavineToken(), "land"), new ManaCostsImpl("{2}{R}{G}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new RagingRavineToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{2}{R}{G}")));
}
public RagingRavine(final RagingRavine card) {

View file

@ -30,13 +30,14 @@ package mage.sets.worldwake;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEOTEffect;
import mage.abilities.effects.common.continious.BecomesCreatureSourceEffect;
import mage.abilities.keyword.ReachAbility;
import mage.abilities.mana.GreenManaAbility;
import mage.abilities.mana.WhiteManaAbility;
@ -55,7 +56,7 @@ public class StirringWildwood extends CardImpl<StirringWildwood> {
this.addAbility(new EntersBattlefieldTappedAbility());
this.addAbility(new GreenManaAbility());
this.addAbility(new WhiteManaAbility());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new StirringWildwoodToken(), "land"), new ManaCostsImpl("{1}{G}{W}")));
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new StirringWildwoodToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{G}{W}")));
}
public StirringWildwood(final StirringWildwood card) {

View file

@ -44,27 +44,27 @@ import mage.game.permanent.token.Token;
*
* @author BetaSteward_at_googlemail.com
*/
public class BecomesCreatureSourceEOTEffect extends ContinuousEffectImpl<BecomesCreatureSourceEOTEffect> {
public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCreatureSourceEffect> {
protected Token token;
protected String type;
public BecomesCreatureSourceEOTEffect(Token token, String type) {
super(Duration.EndOfTurn, Outcome.BecomeCreature);
public BecomesCreatureSourceEffect(Token token, String type, Duration duration) {
super(duration, Outcome.BecomeCreature);
this.token = token;
this.type = type;
setText();
}
public BecomesCreatureSourceEOTEffect(final BecomesCreatureSourceEOTEffect effect) {
public BecomesCreatureSourceEffect(final BecomesCreatureSourceEffect effect) {
super(effect);
this.token = effect.token.copy();
this.type = effect.type;
}
@Override
public BecomesCreatureSourceEOTEffect copy() {
return new BecomesCreatureSourceEOTEffect(this);
public BecomesCreatureSourceEffect copy() {
return new BecomesCreatureSourceEffect(this);
}
@Override
@ -118,9 +118,9 @@ public class BecomesCreatureSourceEOTEffect extends ContinuousEffectImpl<Becomes
private void setText() {
if (type.length() > 0)
staticText = "Until end of turn {this} becomes a " + token.getDescription() + " that's still a " + this.type;
staticText = duration.toString() + " {this} becomes a " + token.getDescription() + " that's still a " + this.type;
else
staticText = "Until end of turn {this} becomes a " + token.getDescription();
staticText = duration.toString() + " {this} becomes a " + token.getDescription();
}
@Override