Refactor - remove duplicate SkeletonToken classes

This commit is contained in:
JOAC69 2016-09-23 23:11:00 -05:00
parent a9e479f7dd
commit ecde8dd0b3
4 changed files with 28 additions and 57 deletions

View file

@ -27,7 +27,6 @@
*/
package mage.sets.homelands;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
@ -36,7 +35,6 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DestroyAllEffect;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
@ -45,9 +43,11 @@ import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreatureCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.SkeletonToken;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
*
* @author fireshoes
@ -85,18 +85,3 @@ public class DrudgeSpell extends CardImpl {
return new DrudgeSpell(this);
}
}
class SkeletonToken extends Token {
SkeletonToken() {
super("Skeleton", "1/1 black Skeleton creature token onto the battlefield. It has \"{B}: Regenerate this creature.\"");
this.setOriginalExpansionSetCode("HML");
this.getPower().modifyBaseValue(1);
this.getToughness().modifyBaseValue(1);
this.color.setBlack(true);
this.getSubtype(null).add("Skeleton");
this.getCardType().add(CardType.CREATURE);
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}")));
}
}

View file

@ -27,31 +27,26 @@
*/
package mage.sets.shardsofalara;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.DelayedTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.SkeletonToken;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.DamagedByWatcher;
import java.util.UUID;
/**
*
* @author North
@ -141,19 +136,3 @@ class SkeletonizeDelayedTriggeredAbility extends DelayedTriggeredAbility {
return "When a creature dealt damage this way dies this turn, " + super.getRule();
}
}
class SkeletonToken extends Token {
SkeletonToken() {
super("Skeleton", "1/1 black Skeleton creature token with \"{B}: Regenerate this creature.\"");
this.cardType.add(CardType.CREATURE);
this.color = ObjectColor.BLACK;
this.subtype.add("Skeleton");
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {B}: Regenerate this creature.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B}")));
}
}

View file

@ -30,16 +30,13 @@ package mage.sets.tenthedition;
import java.util.UUID;
import mage.constants.*;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTappedAbility;
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.continuous.BecomesCreatureSourceEffect;
import mage.abilities.mana.BlackManaAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.SkeletonToken;
/**
*
@ -65,14 +62,3 @@ public class SpawningPool extends CardImpl {
}
}
class SkeletonToken extends Token {
SkeletonToken() {
super("Skeleton", "a 1/1 black Skeleton creature with \"{B}: Regenerate this creature\"");
cardType.add(CardType.CREATURE);
this.subtype.add("Skeleton");
color.setBlack(true);
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ColoredManaCost(ColoredManaSymbol.B)));
}
}

View file

@ -0,0 +1,21 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Zone;
public class SkeletonToken extends Token {
public SkeletonToken() {
super("Skeleton", "1/1 black Skeleton creature with \"{B}: Regenerate this creature\"");
cardType.add(CardType.CREATURE);
this.subtype.add("Skeleton");
color.setBlack(true);
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ColoredManaCost(ColoredManaSymbol.B)));
}
}