Add 5/5 Dragon token and use it for existing cards.

This commit is contained in:
LoneFox 2015-09-26 11:44:03 +03:00
parent 54acb445db
commit 4e5bcddd56
5 changed files with 66 additions and 71 deletions

View file

@ -28,16 +28,15 @@
package mage.sets.commander;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.game.Game;
import mage.game.permanent.token.DragonToken2;
import mage.game.permanent.token.Token;
import mage.players.Player;
import mage.target.TargetPlayer;
@ -90,7 +89,7 @@ class DeathByDragonsEffect extends OneShotEffect {
if (controller != null) {
for (UUID playerId : controller.getInRange()) {
if (!playerId.equals(this.getTargetPointer().getFirst(game, source))) {
Token token = new DragonToken();
Token token = new DragonToken2();
token.putOntoBattlefield(1, game, source.getSourceId(), playerId);
}
}
@ -99,18 +98,3 @@ class DeathByDragonsEffect extends OneShotEffect {
return false;
}
}
class DragonToken extends Token {
public DragonToken() {
super("Dragon", "5/5 red Dragon creature token with flying");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add("Dragon");
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(FlyingAbility.getInstance());
// set a set with correct token image
this.setOriginalExpansionSetCode("WWK");
}
}

View file

@ -28,17 +28,19 @@
package mage.sets.scourge;
import java.util.UUID;
import mage.constants.*;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.mageobject.SubtypePredicate;
@ -46,7 +48,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.ExileZone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.DragonToken2;
/**
*
@ -106,7 +108,7 @@ class DayOfTheDragonsEntersEffect extends OneShotEffect {
}
}
}
DragonToken token = new DragonToken();
DragonToken2 token = new DragonToken2();
token.putOntoBattlefield(creaturesExiled, game, source.getSourceId(), source.getControllerId());
return true;
}
@ -163,16 +165,3 @@ class DayOfTheDragonsLeavesEffect extends OneShotEffect {
return new DayOfTheDragonsLeavesEffect(this);
}
}
class DragonToken extends Token {
public DragonToken() {
super("Dragon", "5/5 red Dragon creature token with flying");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add("Dragon");
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(FlyingAbility.getInstance());
}
}

View file

@ -28,18 +28,15 @@
package mage.sets.tenthedition;
import java.util.UUID;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.DragonToken2;
/**
*
@ -63,16 +60,3 @@ public class DragonRoost extends CardImpl {
return new DragonRoost(this);
}
}
class DragonToken2 extends Token {
DragonToken2() {
super("Dragon", "5/5 red Dragon creature token with flying");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add("Dragon");
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(FlyingAbility.getInstance());
}
}

View file

@ -38,12 +38,11 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.decorator.ConditionalTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.DragonToken2;
/**
*
@ -67,7 +66,7 @@ public class DragonmasterOutcast extends CardImpl {
this.toughness = new MageInt(1);
// At the beginning of your upkeep, if you control six or more lands, put a 5/5 red Dragon creature token with flying onto the battlefield.
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonToken(), 1), TargetController.YOU, false);
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonToken2(), 1), TargetController.YOU, false);
this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 5), "At the beginning of your upkeep, if you control six or more lands, put a 5/5 red Dragon creature token with flying onto the battlefield."));
}
@ -80,16 +79,3 @@ public class DragonmasterOutcast extends CardImpl {
return new DragonmasterOutcast(this);
}
}
class DragonToken extends Token {
public DragonToken() {
super("Dragon", "5/5 red Dragon creature token with flying");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add("Dragon");
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(FlyingAbility.getInstance());
}
}