mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Refactor - make ElementToken classes inner classes to avoid collision
This commit is contained in:
parent
01592c7e50
commit
bb185c6844
9 changed files with 107 additions and 72 deletions
|
@ -64,18 +64,18 @@ public class CallTheSkybreaker extends CardImpl {
|
|||
public CallTheSkybreaker copy() {
|
||||
return new CallTheSkybreaker(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "a 5/5 blue and red Elemental creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlue(true);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
public ElementalToken() {
|
||||
super("Elemental", "a 5/5 blue and red Elemental creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlue(true);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,17 +72,17 @@ public class RakkaMar extends CardImpl {
|
|||
public RakkaMar copy() {
|
||||
return new RakkaMar(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
static class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "3/1 red Elemental creature with Haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
public ElementalToken() {
|
||||
super("Elemental", "3/1 red Elemental creature with Haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,18 +100,18 @@ class MoltenBirthEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "1/1 red Elemental creature");
|
||||
this.setOriginalExpansionSetCode("M14");
|
||||
this.setTokenType(RandomUtil.nextInt(2) + 1);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
public ElementalToken() {
|
||||
super("Elemental", "1/1 red Elemental creature");
|
||||
this.setOriginalExpansionSetCode("M14");
|
||||
this.setTokenType(RandomUtil.nextInt(2) + 1);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ import mage.constants.Rarity;
|
|||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -74,4 +76,18 @@ public class YoungPyromancer extends CardImpl {
|
|||
public YoungPyromancer copy() {
|
||||
return new YoungPyromancer(this);
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "1/1 red Elemental creature");
|
||||
this.setOriginalExpansionSetCode("M14");
|
||||
this.setTokenType(RandomUtil.nextInt(2) + 1);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -95,14 +95,14 @@ class DevastatingSummonsEffect extends OneShotEffect {
|
|||
public DevastatingSummonsEffect copy() {
|
||||
return new DevastatingSummonsEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "X/X red Elemental creature");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
public ElementalToken() {
|
||||
super("Elemental", "X/X red Elemental creature");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,17 +124,17 @@ class ElementalMasteryEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "1/1 red Elemental creature token with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Elemental");
|
||||
color.setRed(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
public ElementalToken() {
|
||||
super("Elemental", "1/1 red Elemental creature token with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Elemental");
|
||||
color.setRed(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,16 +81,16 @@ public class WindZendikon extends CardImpl {
|
|||
public WindZendikon copy() {
|
||||
return new WindZendikon(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
ElementalToken() {
|
||||
super("", "2/2 blue Elemental creature with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlue(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
class ElementalToken extends Token {
|
||||
ElementalToken() {
|
||||
super("", "2/2 blue Elemental creature with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlue(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
@ -44,6 +48,7 @@ import mage.abilities.keyword.KickerAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
@ -109,4 +114,18 @@ class ElementalAppealEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "7/1 red Elemental creature token with trample and haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(7);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,18 +109,18 @@ class ZektarShrineExpeditionEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class ElementalToken extends Token {
|
||||
class ElementalToken extends Token {
|
||||
|
||||
public ElementalToken() {
|
||||
super("Elemental", "7/1 red Elemental creature token with trample and haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(7);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
addAbility(HasteAbility.getInstance());
|
||||
public ElementalToken() {
|
||||
super("Elemental", "7/1 red Elemental creature token with trample and haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Elemental");
|
||||
power = new MageInt(7);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue