Fix pictures for some tokens from recent sets

This commit is contained in:
Quercitron 2015-11-08 20:07:04 +03:00
parent 8caf33cdf0
commit e23fc13db0
29 changed files with 336 additions and 119 deletions

View file

@ -23,43 +23,43 @@
#Generate|TOK:C15|Wolf|
#Generate|TOK:C15|Zombie|
Generate|TOK:BFZ|Dragon|
Generate|TOK:BFZ|Eldrazi|
Generate|TOK:BFZ|Eldrazi Scion 1|
Generate|TOK:BFZ|Eldrazi Scion 2|
Generate|TOK:BFZ|Eldrazi Scion 3|
Generate|TOK:BFZ|Elemental 1|
Generate|TOK:BFZ|Elemental 2|
Generate|TOK:BFZ|Knight Ally|
Generate|TOK:BFZ|Kor Ally|
Generate|TOK:BFZ|Octopus|
Generate|TOK:BFZ|Plant|
|Generate|EMBLEM!:BFZ|Emblem Gideon, Ally of Zendikar|
|Generate|EMBLEM!:BFZ|Emblem Kiora, Master of the Depths|
|Generate|EMBLEM!:BFZ|Emblem Ob Nixilis Reignited|
|Generate|TOK:BFZ|Dragon|
|Generate|TOK:BFZ|Eldrazi|
|Generate|TOK:BFZ|Eldrazi Scion 1|
|Generate|TOK:BFZ|Eldrazi Scion 2|
|Generate|TOK:BFZ|Eldrazi Scion 3|
|Generate|TOK:BFZ|Elemental 1|
|Generate|TOK:BFZ|Elemental 2|
|Generate|TOK:BFZ|Knight Ally|
|Generate|TOK:BFZ|Kor Ally|
|Generate|TOK:BFZ|Octopus|
|Generate|TOK:BFZ|Plant|
#|Generate|EMBLEM!:BFZ|Emblem Gideon, Ally of Zendikar|
#|Generate|EMBLEM!:BFZ|Emblem Kiora, Master of the Depths|
#|Generate|EMBLEM!:BFZ|Emblem Ob Nixilis Reignited|
Generate|TOK:DDP|Eldrazi Spawn 1|
Generate|TOK:DDP|Eldrazi Spawn 2|
Generate|TOK:DDP|Eldrazi Spawn 3|
Generate|TOK:DDP|Hellion|
Generate|TOK:DDP|Plant|
|Generate|TOK:DDP|Eldrazi Spawn 1|
|Generate|TOK:DDP|Eldrazi Spawn 2|
|Generate|TOK:DDP|Eldrazi Spawn 3|
|Generate|TOK:DDP|Hellion|
|Generate|TOK:DDP|Plant|
Generate|TOK:MM2|Eldrazi Spawn 1|
Generate|TOK:MM2|Eldrazi Spawn 2|
Generate|TOK:MM2|Eldrazi Spawn 3|
Generate|TOK:MM2|Elephant|
Generate|TOK:MM2|Faerie Rogue|
Generate|TOK:MM2|Germ|
Generate|TOK:MM2|Golem|
Generate|TOK:MM2|Insect|
Generate|TOK:MM2|Myr|
Generate|TOK:MM2|Saproling|
Generate|TOK:MM2|Snake|
Generate|TOK:MM2|Soldier|
Generate|TOK:MM2|Spirit|
Generate|TOK:MM2|Thrull|
Generate|TOK:MM2|Wolf|
Generate|TOK:MM2|Wurm|
|Generate|TOK:MM2|Eldrazi Spawn 1|
|Generate|TOK:MM2|Eldrazi Spawn 2|
|Generate|TOK:MM2|Eldrazi Spawn 3|
|Generate|TOK:MM2|Elephant|
|Generate|TOK:MM2|Faerie Rogue|
|Generate|TOK:MM2|Germ|
|Generate|TOK:MM2|Golem|
|Generate|TOK:MM2|Insect|
|Generate|TOK:MM2|Myr|
|Generate|TOK:MM2|Saproling|
|Generate|TOK:MM2|Snake|
|Generate|TOK:MM2|Soldier|
|Generate|TOK:MM2|Spirit|
|Generate|TOK:MM2|Thrull|
|Generate|TOK:MM2|Wolf|
|Generate|TOK:MM2|Worm|
#Generate|TOK:TPR|Goblin|
#Generate|TOK:TPR|Pegasus|
@ -83,9 +83,9 @@ Generate|TOK:MM2|Wurm|
|Generate|TOK:ORI|Thopter 1|
|Generate|TOK:ORI|Thopter 2|
|Generate|TOK:ORI|Zombie|
|Generate|EMBLEM!:ORI|Emblem Chandra, Roaring Flame|
|Generate|EMBLEM!:ORI|Emblem Jace, Telepath Unbound|
|Generate|EMBLEM!:ORI|Emblem Liliana, Defiant Necromancer|
#|Generate|EMBLEM!:ORI|Emblem Chandra, Roaring Flame|
#|Generate|EMBLEM!:ORI|Emblem Jace, Telepath Unbound|
#|Generate|EMBLEM!:ORI|Emblem Liliana, Defiant Necromancer|
#|Generate|TOK:PTC|Angel|
#|Generate|TOK:PTC|Avatar|

View file

@ -34,6 +34,7 @@ import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
@ -46,7 +47,6 @@ import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.SpiritWhiteToken;
import mage.game.permanent.token.Token;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
@ -111,8 +111,7 @@ class GallowsAtWillowHillEffect extends OneShotEffect {
Player controller = game.getPlayer(permanent.getControllerId());
permanent.destroy(source.getSourceId(), game, false);
if (controller != null) {
Token spirit = new SpiritWhiteToken("AVR", 1);
spirit.putOntoBattlefield(1, game, source.getSourceId(), controller.getId());
new CreateTokenEffect(new SpiritWhiteToken()).apply(game, source);
}
affectedTargets++;
}

View file

@ -54,7 +54,7 @@ public class MoonsilverSpear extends CardImpl {
// Equipped creature has first strike.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)));
// Whenever equipped creature attacks, put a 4/4 white Angel creature token with flying onto the battlefield.
this.addAbility(new AttacksAttachedTriggeredAbility(new CreateTokenEffect(new AngelToken(expansionSetCode))));
this.addAbility(new AttacksAttachedTriggeredAbility(new CreateTokenEffect(new AngelToken())));
// Equip {4}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(4)));
}

View file

@ -122,5 +122,6 @@ class AkoumStonewakerElementalToken extends Token {
this.addAbility(TrampleAbility.getInstance());
this.addAbility(HasteAbility.getInstance());
this.setOriginalExpansionSetCode("BFZ");
this.setTokenType(1);
}
}

View file

@ -88,7 +88,7 @@ class OmnathElementalToken extends Token {
OmnathElementalToken() {
super("Elemental", "5/5 red and green Elemental creature token");
setTokenType(1);
setTokenType(2);
setOriginalExpansionSetCode("BFZ");
cardType.add(CardType.CREATURE);
subtype.add("Elemental");

View file

@ -45,7 +45,7 @@ import mage.filter.FilterSpell;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.ThrullToken;
import mage.game.stack.Spell;
import mage.target.targetpointer.FixedTarget;
@ -114,22 +114,10 @@ class EndrekSahrMasterBreederEffect extends OneShotEffect {
if (spell != null) {
int cmc = spell.getConvertedManaCost();
if (cmc > 0) {
return new CreateTokenEffect(new EndrekSahrMasterBreederThrullToken(), cmc).apply(game, source);
return new CreateTokenEffect(new ThrullToken(), cmc).apply(game, source);
}
return true;
}
return false;
}
}
class EndrekSahrMasterBreederThrullToken extends Token {
public EndrekSahrMasterBreederThrullToken() {
super("Thrull", "1/1 black Thrull creature token");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add("Thrull");
power = new MageInt(1);
toughness = new MageInt(1);
}
}

View file

@ -101,7 +101,7 @@ public class HuntmasterOfTheFells extends CardImpl {
class HuntmasterOfTheFellsAbility extends TriggeredAbilityImpl {
public HuntmasterOfTheFellsAbility() {
super(Zone.BATTLEFIELD, new CreateTokenEffect(new WolfToken(Token.Type.SECOND)), false);
super(Zone.BATTLEFIELD, new CreateTokenEffect(new WolfToken()), false);
this.addEffect(new GainLifeEffect(2));
}

View file

@ -67,7 +67,7 @@ public class RequiemAngel extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever another non-Spirit creature you control dies, put a 1/1 white Spirit creature token with flying onto the battlefield.
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken(expansionSetCode), 1), false, filter));
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken("ISD"), 1), false, filter));
}
public RequiemAngel(final RequiemAngel card) {

View file

@ -36,9 +36,8 @@ import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.constants.Outcome;
import mage.filter.common.FilterArtifactSpell;
import mage.game.Game;
import mage.game.permanent.token.MyrToken;
@ -71,9 +70,9 @@ public class Myrsmith extends CardImpl {
}
}
class MyrsmithEffect extends OneShotEffect {
class MyrsmithEffect extends CreateTokenEffect {
public MyrsmithEffect() {
super(Outcome.PutCreatureInPlay);
super(new MyrToken());
staticText = "you may pay {1}. If you do, put a 1/1 colorless Myr artifact creature token onto the battlefield";
}
@ -86,7 +85,7 @@ class MyrsmithEffect extends OneShotEffect {
Cost cost = new GenericManaCost(1);
cost.clearPaid();
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
new MyrToken().putOntoBattlefield(1, game, source.getControllerId(), source.getControllerId());
super.apply(game, source);
}
return true;
}

View file

@ -57,7 +57,7 @@ public class FieldOfSouls extends CardImpl {
this.expansionSetCode = "TPR";
// Whenever a nontoken creature is put into your graveyard from the battlefield, put a 1/1 white Spirit creature token with flying onto the battlefield.
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken("KTK")), false, filter));
this.addAbility(new DiesCreatureTriggeredAbility(new CreateTokenEffect(new SpiritWhiteToken()), false, filter));
}
public FieldOfSouls(final FieldOfSouls card) {

View file

@ -46,6 +46,7 @@ import mage.game.Game;
import mage.game.permanent.token.CitizenToken;
import mage.game.permanent.token.GoblinToken;
import mage.game.permanent.token.SaprolingToken;
import mage.game.permanent.token.ThrullToken;
import mage.game.permanent.token.Token;
import mage.players.Player;
@ -165,14 +166,3 @@ class CamaridToken extends Token {
toughness = new MageInt(1);
}
}
class ThrullToken extends Token {
public ThrullToken() {
super("Thrull", "1/1 black Thrull creature token");
cardType.add(CardType.CREATURE);
subtype.add("Thrull");
color.setBlack(true);
power = new MageInt(1);
toughness = new MageInt(1);
}
}

View file

@ -60,7 +60,7 @@ public class DecreeOfJustice extends CardImpl {
// Put X 4/4 white Angel creature tokens with flying onto the battlefield.
this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken("C14"), new ManacostVariableValue()));
this.getSpellAbility().addEffect(new CreateTokenEffect(new AngelToken(), new ManacostVariableValue()));
// Cycling {2}{W}
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}{W}")));

View file

@ -1,11 +1,14 @@
package mage.abilities.keyword;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
@ -31,9 +34,9 @@ public class LivingWeaponAbility extends EntersBattlefieldTriggeredAbility {
}
}
class LivingWeaponEffect extends OneShotEffect {
class LivingWeaponEffect extends CreateTokenEffect {
LivingWeaponEffect() {
super(Outcome.PutCreatureInPlay);
super(new GermToken());
}
LivingWeaponEffect(final LivingWeaponEffect effect) {
@ -44,13 +47,13 @@ class LivingWeaponEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
GermToken token = new GermToken();
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
Permanent p = game.getPermanent(token.getLastAddedToken());
if (p != null) {
p.addAttachment(source.getSourceId(), game);
return true;
}
if (super.apply(game, source)) {
Permanent p = game.getPermanent(this.getLastAddedTokenId());
if (p != null) {
p.addAttachment(source.getSourceId(), game);
return true;
}
}
}
return false;
}
@ -62,9 +65,16 @@ class LivingWeaponEffect extends OneShotEffect {
}
class GermToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("C14", "MBS", "MM2"));
}
public GermToken() {
super("Germ", "a 0/0 black Germ creature token");
this.setOriginalExpansionSetCode("MBS");
availableImageSetCodes = tokenImageSets;
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add("Germ");

View file

@ -1,25 +1,34 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
public class AngelToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("AVR", "C14", "CFX", "GTC", "ISD", "M14", "ORI", "ZEN"));
}
public AngelToken() {
this("M14");
this(null);
}
public AngelToken(String setCode) {
super("Angel", "4/4 white Angel creature token with flying");
this.setOriginalExpansionSetCode(setCode);
availableImageSetCodes = tokenImageSets;
setOriginalExpansionSetCode(setCode);
cardType.add(CardType.CREATURE);
color.setWhite(true);
subtype.add("Angel");
power = new MageInt(4);
toughness = new MageInt(4);
addAbility(FlyingAbility.getInstance());
}
}

View file

@ -28,6 +28,9 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import mage.constants.CardType;
import mage.constants.Zone;
@ -42,6 +45,12 @@ import mage.abilities.mana.SimpleManaAbility;
*/
public class EldraziSpawnToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("ROE", "MM2", "DDP"));
}
public EldraziSpawnToken() {
super("Eldrazi Spawn", "0/1 colorless Eldrazi Spawn creature with \"Sacrifice this creature: Add {1} to your mana pool.\"");
cardType.add(CardType.CREATURE);
@ -50,7 +59,8 @@ public class EldraziSpawnToken extends Token {
power = new MageInt(0);
toughness = new MageInt(1);
addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana, new SacrificeSourceCost()));
this.setOriginalExpansionSetCode("ROE");
availableImageSetCodes = tokenImageSets;
// Get one of the three possible token images
this.setTokenType(new Random().nextInt(3) + 1);
}

View file

@ -28,6 +28,10 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.ObjectColor;
import mage.constants.CardType;
@ -38,6 +42,12 @@ import mage.constants.CardType;
*/
public class ElephantToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("C14", "CNS", "DDD", "MM2", "WWK"));
}
public ElephantToken() {
super("Elephant", "3/3 green Elephant creature token");
cardType.add(CardType.CREATURE);
@ -46,7 +56,7 @@ public class ElephantToken extends Token {
power = new MageInt(3);
toughness = new MageInt(3);
this.setOriginalExpansionSetCode("DDD");
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -28,7 +28,10 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.constants.CardType;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
@ -39,6 +42,12 @@ import mage.abilities.keyword.FlyingAbility;
*/
public class FaerieRogueToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("SHM", "MOR", "MMA", "MM2"));
}
public FaerieRogueToken() {
super("Faerie Rogue", "1/1 black Faerie Rogue creature token with flying");
cardType.add(CardType.CREATURE);
@ -48,6 +57,7 @@ public class FaerieRogueToken extends Token {
power = new MageInt(1);
toughness = new MageInt(1);
addAbility(FlyingAbility.getInstance());
availableImageSetCodes.addAll(Arrays.asList("SHM", "MOR", "MMA"));
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -27,6 +27,10 @@
*/
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.constants.CardType;
import mage.MageInt;
@ -36,8 +40,14 @@ import mage.MageInt;
*/
public class GolemToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("MM2", "NPH", "SOM"));
}
public GolemToken() {
this("SOM");
this(null);
}
public GolemToken(String setCode) {
@ -48,5 +58,7 @@ public class GolemToken extends Token {
subtype.add("Golem");
power = new MageInt(3);
toughness = new MageInt(3);
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -28,6 +28,10 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.constants.CardType;
@ -37,8 +41,14 @@ import mage.constants.CardType;
*/
public class InsectToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("M10", "MM2"));
}
public InsectToken() {
this("M10");
this(null);
}
public InsectToken(String setCode) {
@ -49,5 +59,7 @@ public class InsectToken extends Token {
subtype.add("Insect");
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -1,5 +1,8 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.constants.CardType;
import mage.MageInt;
import mage.abilities.keyword.VigilanceAbility;
@ -10,15 +13,21 @@ import mage.abilities.keyword.VigilanceAbility;
*/
public class KnightToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("ORI", "RTR"));
}
public KnightToken() {
super("Knight", "2/2 white Knight creature token with vigilance");
cardType.add(CardType.CREATURE);
color.setWhite(true);
subtype.add("Knight");
power = new MageInt(2);
toughness = new MageInt(2);
this.addAbility(VigilanceAbility.getInstance());
setOriginalExpansionSetCode("RTR");
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -1,12 +1,22 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.constants.CardType;
public class MyrToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("C14", "MM2", "NPH", "SOM"));
}
public MyrToken() {
this("SOM");
this(null);
}
public MyrToken(String expansionSetCode) {
@ -17,5 +27,7 @@ public class MyrToken extends Token {
subtype.add("Myr");
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -28,10 +28,21 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.constants.CardType;
public class PlantToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("WWK", "DDP"));
}
public PlantToken() {
super("Plant", "0/1 green Plant creature");
cardType.add(CardType.CREATURE);
@ -39,6 +50,7 @@ public class PlantToken extends Token {
subtype.add("Plant");
power = new MageInt(0);
toughness = new MageInt(1);
this.setOriginalExpansionSetCode("WWK");
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -28,6 +28,10 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.constants.CardType;
@ -37,6 +41,12 @@ import mage.constants.CardType;
*/
public class SaprolingToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("10E", "ALA", "DDE", "DDH", "DDJ", "M12", "M13", "M14", "MM2", "MMA", "RTR"));
}
public SaprolingToken() {
super("Saproling", "1/1 green Saproling creature token");
this.setOriginalExpansionSetCode("MMA");
@ -45,5 +55,7 @@ public class SaprolingToken extends Token {
subtype.add("Saproling");
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -28,6 +28,10 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.constants.CardType;
@ -37,18 +41,26 @@ import mage.constants.CardType;
*/
public class SnakeToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("ZEN", "KTK", "MM2"));
}
public SnakeToken() {
this("ZEN");
this(null);
}
public SnakeToken(String setCode) {
super("Snake", "1/1 green Snake creature token");
setOriginalExpansionSetCode(setCode);
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Snake");
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = tokenImageSets;
setOriginalExpansionSetCode(setCode);
}
}

View file

@ -43,7 +43,7 @@ public class SoldierToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13", "MM2", "MMA", "RTR", "SOM"));
tokenImageSets.addAll(Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13", "MM2", "MMA", "RTR", "SOM", "DDF", "M10"));
}
public SoldierToken() {

View file

@ -27,6 +27,9 @@
*/
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
@ -36,15 +39,23 @@ import mage.constants.CardType;
*/
public class SpiritWhiteToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("AVR", "C14", "CNS", "DDC", "DDK", "FRF", "ISD", "KTK", "M15", "MM2", "SHM"));
}
public SpiritWhiteToken() {
this("SHM", 0);
this(null, 0);
}
public SpiritWhiteToken(String setCode) {
this(setCode, 0);
}
public SpiritWhiteToken(String setCode, int tokenType) {
super("Spirit", "1/1 white Spirit creature token with flying");
availableImageSetCodes = tokenImageSets;
setOriginalExpansionSetCode(setCode);
if (tokenType > 0) {
setTokenType(tokenType);
@ -57,4 +68,21 @@ public class SpiritWhiteToken extends Token {
addAbility(FlyingAbility.getInstance());
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("AVR")) {
setTokenType(1);
}
}
public SpiritWhiteToken(final SpiritWhiteToken token) {
super(token);
}
@Override
public SpiritWhiteToken copy() {
return new SpiritWhiteToken(this);
}
}

View file

@ -0,0 +1,59 @@
/*
* 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.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.constants.CardType;
/**
*
* @author Quercitron
*/
public class ThrullToken extends Token {
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("MM2"));
}
public ThrullToken() {
super("Thrull", "1/1 black Thrull creature token");
cardType.add(CardType.CREATURE);
subtype.add("Thrull");
color.setBlack(true);
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = tokenImageSets;
}
}

View file

@ -235,7 +235,11 @@ public class Token extends MageObjectImpl {
if (availableImageSetCodes.contains(code)) {
setOriginalExpansionSetCode(code);
} else {
setOriginalExpansionSetCode(availableImageSetCodes.get(new Random().nextInt(availableImageSetCodes.size())));
// we should not set random set if appropriate set is already used
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()
|| !availableImageSetCodes.contains(getOriginalExpansionSetCode())) {
setOriginalExpansionSetCode(availableImageSetCodes.get(new Random().nextInt(availableImageSetCodes.size())));
}
}
} else {
if (getOriginalExpansionSetCode() == null || getOriginalExpansionSetCode().isEmpty()) {

View file

@ -28,9 +28,12 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.constants.CardType;
import mage.MageInt;
import mage.ObjectColor;
/**
*
@ -38,16 +41,21 @@ import mage.ObjectColor;
*/
public class WolfToken extends Token {
public WolfToken() {
this("ISD");
final static private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("BNG", "C14", "CNS", "FNMP", "ISD", "LRW", "M10", "M14", "MM2", "SHM", "SOM", "ZEN"));
}
public WolfToken() {
this((String) null);
}
public WolfToken(String setCode) {
super("Wolf", "2/2 green Wolf creature token");
this.setOriginalExpansionSetCode(setCode);
if (setCode.equals("ISD")) {
setTokenType(Type.SECOND.code);
}
availableImageSetCodes = tokenImageSets;
setOriginalExpansionSetCode(setCode);
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add("Wolf");
@ -55,9 +63,20 @@ public class WolfToken extends Token {
toughness = new MageInt(2);
}
public WolfToken(Token.Type type) {
this();
setTokenType(type.getCode());
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ISD")) {
this.setTokenType(2);
}
}
public WolfToken(final WolfToken token) {
super(token);
}
@Override
public Token copy() {
return new WolfToken(this);
}
}