[MIC] added tokens and images support

This commit is contained in:
Oleg Agafonov 2022-02-03 21:40:34 +04:00
parent 0191e3251b
commit be114bb592
20 changed files with 96 additions and 73 deletions

View file

@ -650,6 +650,19 @@ public class ScryfallImageSupportTokens {
put("AFC/Servo", "https://api.scryfall.com/cards/tafc/11/en?format=image");
put("AFC/Thopter", "https://api.scryfall.com/cards/tafc/12/en?format=image");
// MIC
put("MIC/Beast", "https://api.scryfall.com/cards/tmic/7/en?format=image");
put("MIC/Centaur", "https://api.scryfall.com/cards/tmic/8/en?format=image");
put("MIC/Eldrazi Spawn", "https://api.scryfall.com/cards/tmic/1/en?format=image");
put("MIC/Elephant", "https://api.scryfall.com/cards/tmic/9/en?format=image");
put("MIC/Human Soldier", "https://api.scryfall.com/cards/tmic/2/en?format=image");
put("MIC/Knight", "https://api.scryfall.com/cards/tmic/3/en?format=image");
put("MIC/Rhino", "https://api.scryfall.com/cards/tmic/10/en?format=image");
put("MIC/Snake", "https://api.scryfall.com/cards/tmic/11/en?format=image");
put("MIC/Zombie Army", "https://api.scryfall.com/cards/tmic/6/en?format=image");
put("MIC/Zombie/1", "https://api.scryfall.com/cards/tmic/5/en?format=image"); // 2/2
put("MIC/Zombie/2", "https://api.scryfall.com/cards/tmic/4/en?format=image"); // */*
// generate supported sets
supportedSets.clear();
for (String cardName : this.keySet()) {

View file

@ -282,8 +282,8 @@
|Generate|TOK:BNG|Wolf|||WolfToken|
|Generate|TOK:BNG|Zombie|||ForlornPseudammaZombieToken|
|Generate|TOK:BOK|Snake|||SnakeToken|
|Generate|TOK:BOK|Spirit|||AnotherSpiritToken|
|Generate|TOK:BOK|Spirit|||SpiritToken|
|Generate|TOK:BOK|Spirit|1||AnotherSpiritToken|
|Generate|TOK:BOK|Spirit|2||SpiritToken|
|Generate|TOK:C13|Assembly-Worker|||AssembleWorkerToken|
|Generate|TOK:C13|Beast|1||BeastToken2|
|Generate|TOK:C13|Beast|2||CarnivoreToken|
@ -889,10 +889,9 @@
|Generate|TOK:MIR|Wall|||TidalWaveWallToken|
|Generate|TOK:MIR|Wall|||WoodToken|
|Generate|TOK:MIR|Zombie|||ZombieToken|
|Generate|TOK:MM2|Eldrazi Spawn|1|
|Generate|TOK:MM2|Eldrazi Spawn|2|
|Generate|TOK:MM2|Eldrazi Spawn|3|
|Generate|TOK:MM2|Eldrazi Spawn|||EldraziSpawnToken|
|Generate|TOK:MM2|Eldrazi Spawn|1||EldraziSpawnToken|
|Generate|TOK:MM2|Eldrazi Spawn|2||EldraziSpawnToken|
|Generate|TOK:MM2|Eldrazi Spawn|3||EldraziSpawnToken|
|Generate|TOK:MM2|Elephant|||ElephantToken|
|Generate|TOK:MM2|Faerie Rogue|||FaerieRogueToken|
|Generate|TOK:MM2|Germ|||PhyrexianGermToken|
@ -1603,4 +1602,17 @@
|Generate|TOK:AFC|Rat|||RatToken|
|Generate|TOK:AFC|Saproling|||SaprolingToken|
|Generate|TOK:AFC|Servo|||ServoToken|
|Generate|TOK:AFC|Thopter|||ThopterColorlessToken|
|Generate|TOK:AFC|Thopter|||ThopterColorlessToken|
# MIC
|Generate|TOK:MIC|Beast|||BeastToken|
|Generate|TOK:MIC|Centaur|||CentaurToken|
|Generate|TOK:MIC|Eldrazi Spawn|||EldraziSpawnToken|
|Generate|TOK:MIC|Elephant|||ElephantToken|
|Generate|TOK:MIC|Human Soldier|||HumanSoldierToken|
|Generate|TOK:MIC|Knight|||KnightToken|
|Generate|TOK:MIC|Rhino|||RhinoToken|
|Generate|TOK:MIC|Snake|||SnakeToken|
|Generate|TOK:MIC|Zombie|1||ZombieToken|
|Generate|TOK:MIC|Zombie|2||StitcherGeralfZombieToken|
|Generate|TOK:MIC|Zombie Army|||ZombieArmyToken|

View file

@ -18,6 +18,7 @@ public final class BestialMenace extends CardImpl {
public BestialMenace(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
// Create a 1/1 green Snake creature token, a 2/2 green Wolf creature token, and a 3/3 green Elephant creature token.
this.getSpellAbility().addEffect(new CreateTokenEffect(new SnakeToken()));
this.getSpellAbility().addEffect(new CreateTokenEffect(new WolfToken()).setText(", a 2/2 green Wolf creature token"));
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElephantToken()).setText(", and a 3/3 green Elephant creature token"));

View file

@ -1,4 +1,3 @@
package mage.cards.g;
import mage.abilities.effects.common.CreateTokenEffect;
@ -21,8 +20,10 @@ public final class GrowthSpasm extends CardImpl {
public GrowthSpasm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}");
// Search your library for a basic land card, put it onto the battlefield tapped, then shuffle.
this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true));
// Create a 0/1 colorless Eldrazi Spawn creature token. It has Sacrifice this creature: Add {C}.
this.getSpellAbility().addEffect(new CreateTokenEffect(new EldraziSpawnToken()));
}

View file

@ -41,7 +41,7 @@ public final class HoodedHydra extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance())));
// When Hooded Hydra dies, create a 1/1 green Snake creature token for each +1/+1 counter on it.
this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new SnakeToken("KTK"), new CountersSourceCount(CounterType.P1P1)), false));
this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new SnakeToken(), new CountersSourceCount(CounterType.P1P1)), false));
// Morph {3}{G}{G}
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{G}{G}")));

View file

@ -1,4 +1,3 @@
package mage.cards.p;
import java.util.UUID;

View file

@ -63,7 +63,7 @@ class RiteOfTheSerpentEffect extends OneShotEffect {
Permanent targetCreature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (targetCreature != null) {
if (targetCreature.getCounters(game).containsKey(CounterType.P1P1)) {
new CreateTokenEffect(new SnakeToken("KTK")).apply(game, source);
new CreateTokenEffect(new SnakeToken()).apply(game, source);
}
return true;
}

View file

@ -1,4 +1,3 @@
package mage.cards.s;
import java.util.UUID;

View file

@ -22,7 +22,7 @@ public final class BeastToken extends TokenImpl {
availableImageSetCodes = Arrays.asList("5DN", "C14", "C16", "C19", "CMA", "CMD", "CN2", "GVL",
"DD3C", "DD3GVL", "DDD", "DDL", "DST", "E01", "EVE", "LRW", "M10", "M11", "M12",
"M13", "M14", "M15", "MM3", "NPH", "PC2", "USG", "M19", "IKO", "M21", "CMR", "C21", "AFC");
"M13", "M14", "M15", "MM3", "NPH", "PC2", "USG", "M19", "IKO", "M21", "CMR", "C21", "AFC", "MIC");
}
@Override

View file

@ -5,32 +5,22 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.util.RandomUtil;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author LevelX2
*/
public final class CentaurToken extends TokenImpl {
static final private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("RTR", "MM3", "RNA", "C19"));
}
public CentaurToken() {
super("Centaur", "3/3 green Centaur creature token");
cardType.add(CardType.CREATURE);
availableImageSetCodes = tokenImageSets;
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("RNA")) {
setTokenType(RandomUtil.nextInt(2) + 1); // randomly take image 1 or 2
}
color.setGreen(true);
subtype.add(SubType.CENTAUR);
power = new MageInt(3);
toughness = new MageInt(3);
availableImageSetCodes = Arrays.asList("C19", "DGM", "ONS", "RTR", "RNA", "MIC");
}
public CentaurToken(final CentaurToken token) {

View file

@ -1,10 +1,6 @@
package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mage.MageInt;
import mage.Mana;
import mage.abilities.costs.common.SacrificeSourceCost;
@ -14,18 +10,13 @@ import mage.constants.SubType;
import mage.constants.Zone;
import mage.util.RandomUtil;
import java.util.Arrays;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public final class EldraziSpawnToken extends TokenImpl {
static final private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("ROE", "MM2", "DDP", "C17"));
}
public EldraziSpawnToken() {
super("Eldrazi Spawn", "0/1 colorless Eldrazi Spawn creature with \"Sacrifice this creature: Add {C}.\"");
cardType.add(CardType.CREATURE);
@ -35,9 +26,24 @@ public final class EldraziSpawnToken extends TokenImpl {
toughness = new MageInt(1);
addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(1), new SacrificeSourceCost()));
availableImageSetCodes = tokenImageSets;
// Get one of the four possible token images
this.setTokenType(RandomUtil.nextInt(4) + 1);
availableImageSetCodes = Arrays.asList("CMD", "DDP", "MM2", "PC2", "ROE", "MIC");
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("DDP")) {
this.setTokenType(RandomUtil.nextInt(3) + 1); // randomly take image 1, 2 or 3
}
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("MM2")) {
this.setTokenType(RandomUtil.nextInt(3) + 1); // randomly take image 1, 2 or 3
}
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ROE")) {
this.setTokenType(RandomUtil.nextInt(3) + 1); // randomly take image 1, 2 or 3
}
}
public EldraziSpawnToken(final EldraziSpawnToken token) {

View file

@ -20,7 +20,7 @@ public final class ElephantToken extends TokenImpl {
toughness = new MageInt(3);
availableImageSetCodes = Arrays.asList("C13", "C14", "C15", "CMA", "CMD", "CNS", "GVL", "DDD",
"EMA", "INV", "JUD", "MM2", "ODY", "ROE", "TSP", "VMA", "WWK", "MH1", "CMR", "C21");
"EMA", "INV", "JUD", "MM2", "ODY", "ROE", "TSP", "VMA", "WWK", "MH1", "CMR", "C21", "MIC");
}
public ElephantToken(final ElephantToken token) {

View file

@ -5,6 +5,8 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.util.RandomUtil;
import java.util.Arrays;
public final class HumanSoldierToken extends TokenImpl {
public HumanSoldierToken() {
@ -15,6 +17,8 @@ public final class HumanSoldierToken extends TokenImpl {
color.setWhite(true);
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("SOI", "THB", "IKO", "MIC");
}
@Override

View file

@ -23,7 +23,7 @@ public final class KnightToken extends TokenImpl {
toughness = new MageInt(2);
this.addAbility(VigilanceAbility.getInstance());
availableImageSetCodes = Arrays.asList("C13", "C15", "CMA", "DGM", "ORI", "RTR", "M19", "ELD", "M21", "AFC");
availableImageSetCodes = Arrays.asList("C13", "C15", "CMA", "DGM", "ORI", "RTR", "M19", "ELD", "M21", "AFC", "MIC");
}
public KnightToken(final KnightToken token) {

View file

@ -21,7 +21,7 @@ public final class RhinoToken extends TokenImpl {
toughness = new MageInt(4);
addAbility(TrampleAbility.getInstance());
availableImageSetCodes.addAll(Arrays.asList("DGM", "RTR", "MH1", "C19"));
availableImageSetCodes = Arrays.asList("DGM", "RTR", "MH1", "C19", "MIC");
}
public RhinoToken(final RhinoToken token) {

View file

@ -4,37 +4,23 @@ import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author BetaSteward_at_googlemail.com
*/
public final class SnakeToken extends TokenImpl {
static final private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("ZEN", "KTK", "MM2", "C15", "C19"));
}
public SnakeToken() {
this((String) null);
}
public SnakeToken(String setCode) {
super("Snake", "1/1 green Snake creature token");
availableImageSetCodes = tokenImageSets;
setOriginalExpansionSetCode(setCode);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("C15")) {
setTokenType(1);
}
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add(SubType.SNAKE);
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("6ED", "BOK", "C15", "C19", "CHK", "CMD", "KTK", "MM2", "MMQ", "SOK",
"VIS", "WWK", "ZEN", "C20", "MIC");
}
public SnakeToken(final SnakeToken token) {

View file

@ -43,11 +43,9 @@ public final class SpiritToken extends TokenImpl {
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("EMA")) {
setTokenType(1);
}
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("C16")) {
setTokenType(1);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("BOK")) {
setTokenType(2);
}
}

View file

@ -1,12 +1,12 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.MageInt;
import java.util.Arrays;
/**
*
* @author spjspj
*/
public final class StitcherGeralfZombieToken extends TokenImpl {
@ -14,15 +14,29 @@ public final class StitcherGeralfZombieToken extends TokenImpl {
public StitcherGeralfZombieToken() {
this(1);
}
public StitcherGeralfZombieToken(int xValue) {
super("Zombie", "X/X blue Zombie creature token");
setOriginalExpansionSetCode("C14");
setTokenType(1);
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add(SubType.ZOMBIE);
power = new MageInt(xValue);
toughness = new MageInt(xValue);
availableImageSetCodes = Arrays.asList("C14", "MIC");
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode().equals("C14")) {
this.setTokenType(2);
}
if (getOriginalExpansionSetCode().equals("MIC")) {
this.setTokenType(2);
}
}
public StitcherGeralfZombieToken(final StitcherGeralfZombieToken token) {

View file

@ -22,7 +22,7 @@ public final class ZombieArmyToken extends TokenImpl {
power = new MageInt(0);
toughness = new MageInt(0);
availableImageSetCodes = Arrays.asList("WAR", "MH2");
availableImageSetCodes = Arrays.asList("WAR", "MH2", "MIC");
}
private ZombieArmyToken(final ZombieArmyToken token) {

View file

@ -25,7 +25,7 @@ public final class ZombieToken extends TokenImpl {
"CNS", "MMA", "BNG", "KTK", "DTK", "ORI", "OGW",
"SOI", "EMN", "EMA", "MM3", "AKH", "CMA", "E01",
"RNA", "WAR", "MH1", "M20", "C19", "THB", "M21",
"CMR", "C21", "MH2", "AFR");
"CMR", "C21", "MH2", "AFR", "MIC");
}
@Override