Add 5/5 Wurm token with trample and use it for existing cards.

This commit is contained in:
LoneFox 2015-09-26 11:50:41 +03:00
parent b64c495212
commit e16bec3472
4 changed files with 60 additions and 56 deletions

View file

@ -29,14 +29,12 @@
package mage.sets.dragonsmaze; package mage.sets.dragonsmaze;
import java.util.UUID; import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.game.permanent.token.Token; import mage.game.permanent.token.WurmToken2;
/** /**
* *
@ -50,9 +48,8 @@ public class AdventOfTheWurm extends CardImpl {
super(ownerId, 51, "Advent of the Wurm", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{G}{G}{W}"); super(ownerId, 51, "Advent of the Wurm", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{G}{G}{W}");
this.expansionSetCode = "DGM"; this.expansionSetCode = "DGM";
// Put a 5/5 green Wurm creature token with trample onto the battlefield. // Put a 5/5 green Wurm creature token with trample onto the battlefield.
this.getSpellAbility().addEffect(new CreateTokenEffect(new WurmToken())); this.getSpellAbility().addEffect(new CreateTokenEffect(new WurmToken2()));
} }
public AdventOfTheWurm(final AdventOfTheWurm card) { public AdventOfTheWurm(final AdventOfTheWurm card) {
@ -63,21 +60,4 @@ public class AdventOfTheWurm extends CardImpl {
public AdventOfTheWurm copy() { public AdventOfTheWurm copy() {
return new AdventOfTheWurm(this); return new AdventOfTheWurm(this);
} }
private class WurmToken extends Token {
private WurmToken() {
super("Wurm", "5/5 green Wurm creature token with trample");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Wurm");
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(TrampleAbility.getInstance());
// for image
setOriginalExpansionSetCode("RTR");
}
}
} }

View file

@ -38,7 +38,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.game.permanent.token.Token; import mage.game.permanent.token.WurmToken2;
/** /**
* *
@ -59,7 +59,7 @@ public class ArmadaWurm extends CardImpl {
this.addAbility(TrampleAbility.getInstance()); this.addAbility(TrampleAbility.getInstance());
// When Armada Wurm enters the battlefield, put a 5/5 green Wurm creature token with trample onto the battlefield. // When Armada Wurm enters the battlefield, put a 5/5 green Wurm creature token with trample onto the battlefield.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ArmadaWurmToken()), false)); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WurmToken2()), false));
} }
@ -71,18 +71,4 @@ public class ArmadaWurm extends CardImpl {
public ArmadaWurm copy() { public ArmadaWurm copy() {
return new ArmadaWurm(this); return new ArmadaWurm(this);
} }
private class ArmadaWurmToken extends Token {
private ArmadaWurmToken() {
super("Wurm", "a 5/5 green Wurm creature token with trample");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Wurm");
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(TrampleAbility.getInstance());
}
}
} }

View file

@ -37,7 +37,7 @@ import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.game.permanent.token.Token; import mage.game.permanent.token.WurmToken2;
/** /**
* *
@ -55,10 +55,10 @@ public class WorldspineWurm extends CardImpl {
// Trample // Trample
this.addAbility(TrampleAbility.getInstance()); this.addAbility(TrampleAbility.getInstance());
// When Worldspine Wurm dies, put three 5/5 green Wurm creature tokens with trample onto the battlefield. // When Worldspine Wurm dies, put three 5/5 green Wurm creature tokens with trample onto the battlefield.
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new WorldspineWurmToken(), 3))); this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new WurmToken2(), 3)));
// When Worldspine Wurm is put into a graveyard from anywhere, shuffle it into its owner's library. // When Worldspine Wurm is put into a graveyard from anywhere, shuffle it into its owner's library.
this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new ShuffleIntoLibrarySourceEffect())); this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new ShuffleIntoLibrarySourceEffect()));
} }
@ -72,17 +72,3 @@ public class WorldspineWurm extends CardImpl {
return new WorldspineWurm(this); return new WorldspineWurm(this);
} }
} }
class WorldspineWurmToken extends Token {
public WorldspineWurmToken() {
super("Wurm", "5/5 green Wurm creature tokens with trample");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Wurm");
power = new MageInt(5);
toughness = new MageInt(5);
this.addAbility(TrampleAbility.getInstance());
}
}

View file

@ -0,0 +1,52 @@
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.game.permanent.token;
import java.util.Arrays;
import mage.constants.CardType;
import mage.MageInt;
import mage.abilities.keyword.TrampleAbility;
/**
*
* @author LoneFox
*/
public class WurmToken2 extends Token {
public WurmToken2() {
super("Wurm", "5/5 green Wurm creature token with trample");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Wurm");
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(TrampleAbility.getInstance());
setOriginalExpansionSetCode("RTR");
}
}