Add ONC token images

This commit is contained in:
PurpleCrowbar 2023-02-25 14:40:29 +00:00
parent afde23e803
commit 580a69782c
27 changed files with 187 additions and 54 deletions

View file

@ -1876,6 +1876,30 @@ public class ScryfallImageSupportTokens {
put ("ONE/Samurai", "https://api.scryfall.com/cards/tone/2/en?format=image");
put ("ONE/The Hollow Sentinel", "https://api.scryfall.com/cards/tone/9/en?format=image");
// ONC
put ("ONC/Angel/1", "https://api.scryfall.com/cards/tonc/2/en?format=image");
put ("ONC/Angel/2", "https://api.scryfall.com/cards/tonc/3/en?format=image");
put ("ONC/Beast", "https://api.scryfall.com/cards/tonc/13/en?format=image");
put ("ONC/Bird", "https://api.scryfall.com/cards/tonc/4/en?format=image");
put ("ONC/Dragon", "https://api.scryfall.com/cards/tonc/10/en?format=image");
put ("ONC/Eldrazi", "https://api.scryfall.com/cards/tonc/1/en?format=image");
put ("ONC/Elephant", "https://api.scryfall.com/cards/tonc/14/en?format=image");
put ("ONC/Goblin", "https://api.scryfall.com/cards/tonc/11/en?format=image");
put ("ONC/Golem", "https://api.scryfall.com/cards/tonc/18/en?format=image");
put ("ONC/Human", "https://api.scryfall.com/cards/tonc/5/en?format=image");
put ("ONC/Human Soldier", "https://api.scryfall.com/cards/tonc/6/en?format=image");
put ("ONC/Kobolds of Kher Keep", "https://api.scryfall.com/cards/tonc/12/en?format=image");
put ("ONC/Myr", "https://api.scryfall.com/cards/tonc/19/en?format=image");
put ("ONC/Phyrexian Germ", "https://api.scryfall.com/cards/tonc/23/en?format=image");
put ("ONC/Phyrexian Horror", "https://api.scryfall.com/cards/tonc/20/en?format=image");
put ("ONC/Phyrexian Insect", "https://api.scryfall.com/cards/tonc/15/en?format=image");
put ("ONC/Phyrexian Wurm", "https://api.scryfall.com/cards/tonc/16/en?format=image");
put ("ONC/Soldier/1", "https://api.scryfall.com/cards/tonc/7/en?format=image");
put ("ONC/Soldier/2", "https://api.scryfall.com/cards/tonc/8/en?format=image");
put ("ONC/Soldier/3", "https://api.scryfall.com/cards/tonc/17/en?format=image");
put ("ONC/Spirit", "https://api.scryfall.com/cards/tonc/9/en?format=image");
put ("ONC/Thopter", "https://api.scryfall.com/cards/tonc/21/en?format=image");
// generate supported sets
supportedSets.clear();
for (String cardName : this.keySet()) {

View file

@ -1992,5 +1992,31 @@
|Generate|TOK:ONE|Samurai|||DoublestrikeSamuraiToken|
|Generate|TOK:ONE|The Hollow Sentinel|||TheHollowSentinelToken|
# ONC
|Generate|TOK:ONC|Angel|1||AngelToken|
|Generate|TOK:ONC|Angel|2||AngelVigilanceToken|
|Generate|TOK:ONC|Beast|||BeastToken|
|Generate|TOK:ONC|Bird|||BirdToken|
|Generate|TOK:ONC|Dragon|||DragonToken2|
|Generate|TOK:ONC|Eldrazi|||EldraziToken|
|Generate|TOK:ONC|Elephant|||ElephantToken|
|Generate|TOK:ONC|Goblin|||GoblinToken|
|Generate|TOK:ONC|Golem|||HasteGolemToken|
|Generate|TOK:ONC|Human|||HumanToken|
|Generate|TOK:ONC|Human Soldier|||HumanSoldierToken|
|Generate|TOK:ONC|Kobolds of Kher Keep|||KherKeepKoboldToken|
|Generate|TOK:ONC|Myr|||MyrToken|
|Generate|TOK:ONC|Phyrexian Germ|||PhyrexianGermToken|
|Generate|TOK:ONC|Phyrexian Horror|||PhyrexianRebirthHorrorToken|
|Generate|TOK:ONC|Phyrexian Insect|||InsectInfectToken|
|Generate|TOK:ONC|Phyrexian Wurm|||PhyrexianWurmToken|
|Generate|TOK:ONC|Soldier|1||SoldierToken|
|Generate|TOK:ONC|Soldier|2||SoldierVigilanceToken|
|Generate|TOK:ONC|Soldier|3||SoldierTokenWithHaste|
|Generate|TOK:ONC|Spirit|||SpiritWhiteToken|
|Generate|TOK:ONC|Thopter|||ThopterColorlessToken|

View file

@ -15,10 +15,9 @@ import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.CountersSourceCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.keyword.HasteAbility;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.token.GolemXXToken;
import mage.game.permanent.token.HasteGolemToken;
import mage.game.permanent.token.Token;
/**
@ -79,8 +78,7 @@ class VulshokFactoryEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Token token = new GolemXXToken(xValue.calculate(game, source, this));
token.addAbility(HasteAbility.getInstance());
Token token = new HasteGolemToken(xValue.calculate(game, source, this));
return token.putOntoBattlefield(1, game, source);
}
}

View file

@ -2,12 +2,9 @@ package mage.cards.w;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.keyword.FlashbackAbility;
import mage.abilities.keyword.ToxicAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
@ -16,10 +13,9 @@ import mage.constants.Outcome;
import mage.abilities.dynamicvalue.common.ManaSpentToCastCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.PhyrexianWurmToken;
/**
*
@ -68,7 +64,7 @@ class WurmquakeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
int xValue = ManaSpentToCastCount.instance.calculate(game, source, this);
new CreateTokenEffect(new XXWurmToken(xValue)).apply(game, source);
new CreateTokenEffect(new PhyrexianWurmToken(xValue)).apply(game, source);
int amount = 0;
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
if (game.getPlayer(opponentId).getCounters().getCount(CounterType.POISON) >= 3) {
@ -76,31 +72,8 @@ class WurmquakeEffect extends OneShotEffect {
}
}
new CreateTokenEffect(new XXWurmToken(xValue), amount).apply(game, source);
new CreateTokenEffect(new PhyrexianWurmToken(xValue), amount).apply(game, source);
return true;
}
}
class XXWurmToken extends TokenImpl {
public XXWurmToken(int amount) {
super("Wurm", "X/X green Phyrexian Wurm creature token with trample and toxic 1");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add(SubType.PHYREXIAN);
subtype.add(SubType.WURM);
power = new MageInt(amount);
toughness = new MageInt(amount);
addAbility(TrampleAbility.getInstance());
addAbility(new ToxicAbility(1));
}
public XXWurmToken(final XXWurmToken token) {
super(token);
}
public XXWurmToken copy() {
return new XXWurmToken(this);
}
}

View file

@ -15,7 +15,7 @@ public final class MarchOfTheMachineCommander extends ExpansionSet {
}
private MarchOfTheMachineCommander() {
super("March of the Machine Commander", "ONC", ExpansionSet.buildDate(2023, 4, 21), SetType.SUPPLEMENTAL);
super("March of the Machine Commander", "MOC", ExpansionSet.buildDate(2023, 4, 21), SetType.SUPPLEMENTAL);
this.hasBasicLands = false;
}
}

View file

@ -20,7 +20,15 @@ public final class AngelToken extends TokenImpl {
addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("APC", "AVR", "C14", "C15", "C18", "CON", "DDQ", "GTC",
"ISD", "M14", "MM3", "NEM", "OGW", "ORI", "PC2", "SCG", "SOI", "ZEN", "C20", "M21", "CMR", "AFC", "VOC", "2XM", "IMA", "PCA", "A25", "GN3");
"ISD", "M14", "MM3", "NEM", "OGW", "ORI", "PC2", "SCG", "SOI", "ZEN", "C20", "M21", "CMR", "AFC", "VOC", "2XM", "IMA", "PCA", "A25", "GN3", "ONC");
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ONC")) {
this.setTokenType(1);
}
}
public AngelToken(final AngelToken token) {

View file

@ -20,7 +20,15 @@ public final class AngelVigilanceToken extends TokenImpl {
addAbility(FlyingAbility.getInstance());
addAbility(VigilanceAbility.getInstance());
availableImageSetCodes = Arrays.asList("NEC", "MH1", "WAR", "GRN", "M19", "2X2", "DMC");
availableImageSetCodes = Arrays.asList("NEC", "MH1", "WAR", "GRN", "M19", "2X2", "DMC", "ONC");
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ONC")) {
this.setTokenType(2);
}
}
public AngelVigilanceToken(final AngelVigilanceToken token) {

View file

@ -23,7 +23,7 @@ public final class BeastToken extends TokenImpl {
availableImageSetCodes = Arrays.asList("C14", "C16", "C19", "CMA", "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", "MIC", "NEC", "2XM", "NCC", "BBD", "PCA", "CLB", "DMU");
"AFC", "MIC", "NEC", "2XM", "NCC", "BBD", "PCA", "CLB", "DMU", "ONC");
}
@Override

View file

@ -23,7 +23,7 @@ public final class BirdToken extends TokenImpl {
addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("BNG", "CSP", "JUD", "MM3", "RTR", "VMA", "ZEN",
"MH1", "C16", "C20", "M21", "ZNC", "KHC", "MH2", "IMA", "CM2", "DMU", "DMR");
"MH1", "C16", "C20", "M21", "ZNC", "KHC", "MH2", "IMA", "CM2", "DMU", "DMR", "ONC");
}
public BirdToken(final BirdToken token) {

View file

@ -22,7 +22,7 @@ public final class DragonToken2 extends TokenImpl {
addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("10E", "BFZ", "C15", "C19", "CMA", "SCG", "WWK", "M19", "KHM", "AFC", "IMA", "PCA", "CN2", "GN2", "CLB");
availableImageSetCodes = Arrays.asList("10E", "BFZ", "C15", "C19", "CMA", "SCG", "WWK", "M19", "KHM", "AFC", "IMA", "PCA", "CN2", "GN2", "CLB", "ONC");
}
public DragonToken2(final DragonToken2 token) {

View file

@ -18,7 +18,7 @@ public final class EldraziToken extends TokenImpl {
power = new MageInt(10);
toughness = new MageInt(10);
availableImageSetCodes = Arrays.asList("BFZ", "C19", "C21", "NCC", "BRC");
availableImageSetCodes = Arrays.asList("BFZ", "C19", "C21", "NCC", "BRC", "ONC");
}
public EldraziToken(final EldraziToken token) {

View file

@ -20,7 +20,7 @@ public final class ElephantToken extends TokenImpl {
toughness = new MageInt(3);
availableImageSetCodes = Arrays.asList("C14", "C15", "CMA", "CNS", "GVL", "DDD",
"EMA", "INV", "JUD", "MM2", "ODY", "VMA", "WWK", "MH1", "CMR", "C21", "MIC", "NEC", "2XM", "NCC", "MM3", "DDS", "DMC", "DMR");
"EMA", "INV", "JUD", "MM2", "ODY", "VMA", "WWK", "MH1", "CMR", "C21", "MIC", "NEC", "2XM", "NCC", "MM3", "DDS", "DMC", "DMR", "ONC");
}
public ElephantToken(final ElephantToken token) {

View file

@ -34,7 +34,7 @@ public final class GoblinToken extends TokenImpl {
"MMA", "M15", "C14", "KTK", "EVG", "DTK", "ORI", "DDG", "DDN",
"MM3", "EMA", "DOM", "RNA", "WAR", "MH1", "TSR", "MH2", "AFR",
"NEC", "M19", "CM2", "PCA", "DD1", "DDS", "DDT", "A25", "GRN",
"GK1", "DMU", "DMR");
"GK1", "DMU", "DMR", "ONC");
}
public GoblinToken(final GoblinToken token) {

View file

@ -11,6 +11,10 @@ import java.util.Arrays;
*/
public final class GolemXXToken extends TokenImpl {
public GolemXXToken() {
this(0);
}
public GolemXXToken(int xValue) {
super("Golem Token", "X/X colorless Golem artifact creature token");
cardType.add(CardType.ARTIFACT);

View file

@ -0,0 +1,38 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.HasteAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author PurpleCrowbar
*/
public final class HasteGolemToken extends TokenImpl {
public HasteGolemToken() {
this(0);
}
public HasteGolemToken(int xValue) {
super("Golem Token", "X/X colorless Golem artifact creature token");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add(SubType.GOLEM);
power = new MageInt(xValue);
toughness = new MageInt(xValue);
this.addAbility(HasteAbility.getInstance());
availableImageSetCodes = Arrays.asList("ONC");
}
public HasteGolemToken(final HasteGolemToken token) {
super(token);
}
public HasteGolemToken copy() {
return new HasteGolemToken(this);
}
}

View file

@ -18,7 +18,7 @@ public final class HumanSoldierToken extends TokenImpl {
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("SOI", "THB", "IKO", "MIC", "2XM", "NCC", "GN3");
availableImageSetCodes = Arrays.asList("SOI", "THB", "IKO", "MIC", "2XM", "NCC", "GN3", "ONC");
}
@Override

View file

@ -19,7 +19,7 @@ public final class HumanToken extends TokenImpl {
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP", "RNA", "ELD", "C19", "C20", "MID", "VOW", "NCC", "DDQ", "CLB", "DMC"));
availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP", "RNA", "ELD", "C19", "C20", "MID", "VOW", "NCC", "DDQ", "CLB", "DMC", "ONC"));
}
public HumanToken(final HumanToken token) {

View file

@ -21,7 +21,7 @@ public final class KherKeepKoboldToken extends TokenImpl {
power = new MageInt(0);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("A25", "TSR", "CLB", "DMC");
availableImageSetCodes = Arrays.asList("A25", "TSR", "CLB", "DMC", "ONC");
}
public KherKeepKoboldToken(final KherKeepKoboldToken token) {
super(token);

View file

@ -16,7 +16,7 @@ public final class MyrToken extends TokenImpl {
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("C14", "C16", "C18", "DST", "MM2", "MRD", "SOM", "MH1", "C21", "NEC", "2XM", "BBD", "DDU", "CM2", "BRC");
availableImageSetCodes = Arrays.asList("C14", "C16", "C18", "DST", "MM2", "MRD", "SOM", "MH1", "C21", "NEC", "2XM", "BBD", "DDU", "CM2", "BRC", "ONC");
}
public MyrToken(final MyrToken token) {

View file

@ -20,7 +20,7 @@ public final class PhyrexianGermToken extends TokenImpl {
power = new MageInt(0);
toughness = new MageInt(0);
availableImageSetCodes = Arrays.asList("C14", "C15", "C16", "MBS", "MM2", "PC2", "MH2", "NEC", "2XM", "CM2", "CMA", "PCA");
availableImageSetCodes = Arrays.asList("C14", "C15", "C16", "MBS", "MM2", "PC2", "MH2", "NEC", "2XM", "CM2", "CMA", "PCA", "ONC");
}
@Override

View file

@ -24,7 +24,7 @@ public final class PhyrexianRebirthHorrorToken extends TokenImpl {
this.power = new MageInt(power);
this.toughness = new MageInt(toughness);
availableImageSetCodes = Arrays.asList("C16", "C18", "C19", "MBS", "CMR", "BRC");
availableImageSetCodes = Arrays.asList("C16", "C18", "C19", "MBS", "CMR", "BRC", "ONC");
}
public PhyrexianRebirthHorrorToken(final PhyrexianRebirthHorrorToken token) {

View file

@ -0,0 +1,38 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.ToxicAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
public final class PhyrexianWurmToken extends TokenImpl {
public PhyrexianWurmToken() {
this(0);
}
public PhyrexianWurmToken(int amount) {
super("Phyrexian Wurm Token", "X/X green Phyrexian Wurm creature token with trample and toxic 1");
cardType.add(CardType.CREATURE);
color.setGreen(true);
subtype.add(SubType.PHYREXIAN);
subtype.add(SubType.WURM);
power = new MageInt(amount);
toughness = new MageInt(amount);
addAbility(TrampleAbility.getInstance());
addAbility(new ToxicAbility(1));
availableImageSetCodes = Arrays.asList("ONC");
}
public PhyrexianWurmToken(final PhyrexianWurmToken token) {
super(token);
}
public PhyrexianWurmToken copy() {
return new PhyrexianWurmToken(this);
}
}

View file

@ -22,7 +22,7 @@ public final class SoldierToken extends TokenImpl {
availableImageSetCodes = Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13",
"MM2", "MMA", "RTR", "SOM", "DDO", "M10", "ORI", "EMN", "EMA", "CN2", "C16", "C18", "MM3", "E01",
"DOM", "MH1", "M20", "C20", "M21", "CMR", "KHC", "TSR", "2XM", "MED", "M19", "MD1", "A25", "CLB", "2X2", "DMU", "GN3", "40K");
"DOM", "MH1", "M20", "C20", "M21", "CMR", "KHC", "TSR", "2XM", "MED", "M19", "MD1", "A25", "CLB", "2X2", "DMU", "GN3", "40K", "ONC");
}
public SoldierToken(final SoldierToken token) {
@ -50,5 +50,8 @@ public final class SoldierToken extends TokenImpl {
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("40K")) {
this.setTokenType(RandomUtil.nextInt(3) + 1);
}
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ONC")) {
this.setTokenType(1);
}
}
}

View file

@ -22,7 +22,7 @@ public final class SoldierTokenWithHaste extends TokenImpl {
toughness = new MageInt(1);
addAbility(HasteAbility.getInstance());
availableImageSetCodes = Arrays.asList("GTC", "MM3", "NCC", "GK1");
availableImageSetCodes = Arrays.asList("GTC", "MM3", "NCC", "GK1", "ONC");
}
@ -36,6 +36,9 @@ public final class SoldierTokenWithHaste extends TokenImpl {
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("NCC")) {
setTokenType(2);
}
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ONC")) {
setTokenType(3);
}
}
public SoldierTokenWithHaste(final SoldierTokenWithHaste token) {

View file

@ -5,6 +5,8 @@ import mage.abilities.keyword.VigilanceAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
@ -20,7 +22,15 @@ public final class SoldierVigilanceToken extends TokenImpl {
toughness = new MageInt(2);
addAbility(VigilanceAbility.getInstance());
setOriginalExpansionSetCode("WAR");
availableImageSetCodes = Arrays.asList("WAR", "ONC");
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("ONC")) {
this.setTokenType(2);
}
}
private SoldierVigilanceToken(final SoldierVigilanceToken token) {

View file

@ -24,7 +24,7 @@ public final class SpiritWhiteToken extends TokenImpl {
availableImageSetCodes = Arrays.asList("AVR", "C14", "CNS", "DDC", "DDK", "FRF", "ISD", "KTK", "M15", "MM2", "SHM",
"SOI", "EMA", "C16", "MM3", "CMA", "E01", "RAV", "EMN", "M20", "C19", "C20", "CMR", "KHM",
"MID", "VOW", "UMA", "BBD", "IMA", "CM2", "MD1", "DVD", "DDQ", "CN2", "A25", "GK2", "2X2");
"MID", "VOW", "UMA", "BBD", "IMA", "CM2", "MD1", "DVD", "DDQ", "CN2", "A25", "GK2", "2X2", "ONC");
}
@Override

View file

@ -24,7 +24,7 @@ public final class ThopterColorlessToken extends TokenImpl {
addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("C18", "KLD", "MBS", "ORI", "VMA", "M19", "ZNC",
"KHC", "C21", "MH2", "AFC", "VOC", "NEC", "2XM", "RNA", "NCC", "DDU", "BRO");
"KHC", "C21", "MH2", "AFC", "VOC", "NEC", "2XM", "RNA", "NCC", "DDU", "BRO", "ONC");
}
@Override