[KHM] added tokens and download support;

This commit is contained in:
Oleg Agafonov 2021-02-06 20:30:19 +04:00
parent abe65411b6
commit f7bc745f10
50 changed files with 267 additions and 194 deletions

View file

@ -1,6 +1,5 @@
package mage.game.command.emblems;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl;
@ -14,18 +13,17 @@ import mage.game.Game;
import mage.game.command.Emblem;
import mage.util.CardUtil;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class TibaltCosmicImposterEmblem extends Emblem {
// You may play cards exiled with Tibalt, Cosmic Impostor, and you may spend mana as though it were mana of any color to cast those spells."
public TibaltCosmicImposterEmblem() {
setName("Emblem Tibalt Cosmic Imposter");
this.setExpansionSetCodeForImage("KHM");
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new TibaltCosmicImposterPlayFromExileEffect());
this.getAbilities().add(ability);
setName("Emblem Tibalt");
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new TibaltCosmicImposterPlayFromExileEffect()));
}
}

View file

@ -6,6 +6,8 @@ import mage.abilities.keyword.VigilanceAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
public final class AngelWarriorVigilanceToken extends TokenImpl {
public AngelWarriorVigilanceToken() {
@ -16,8 +18,11 @@ public final class AngelWarriorVigilanceToken extends TokenImpl {
subtype.add(SubType.WARRIOR);
power = new MageInt(4);
toughness = new MageInt(4);
addAbility(FlyingAbility.getInstance());
addAbility(VigilanceAbility.getInstance());
availableImageSetCodes = Arrays.asList("KHM");
}
private AngelWarriorVigilanceToken(final AngelWarriorVigilanceToken token) {

View file

@ -1,13 +1,12 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public final class BearToken extends TokenImpl {
@ -19,6 +18,8 @@ public final class BearToken extends TokenImpl {
subtype.add(SubType.BEAR);
power = new MageInt(2);
toughness = new MageInt(2);
availableImageSetCodes = Arrays.asList("C15", "JUD", "LGN", "ODY", "ONS", "VMA", "MH1", "ELD", "KHM");
}
public BearToken(final BearToken token) {

View file

@ -5,20 +5,25 @@ import mage.abilities.keyword.MenaceAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
public final class DemonBerserkerToken extends TokenImpl {
public DemonBerserkerToken() {
super("Demon", "2/3 red Demon Berserker creature token with menace");
super("Demon Berserker", "2/3 red Demon Berserker creature token with menace");
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add(SubType.DEMON);
subtype.add(SubType.BERSERKER);
power = new MageInt(2);
toughness = new MageInt(3);
addAbility(new MenaceAbility());
availableImageSetCodes.addAll(Arrays.asList("KHM"));
}
private DemonBerserkerToken(final DemonBerserkerToken token) {

View file

@ -5,35 +5,24 @@ import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author LoneFox
*/
public final class DragonToken2 extends TokenImpl {
static final private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Arrays.asList("WWK", "10E", "BFZ", "C15", "CN2", "CMA", "C19"));
}
public DragonToken2() {
this((String) null);
}
public DragonToken2(String setCode) {
super("Dragon", "5/5 red Dragon creature token with flying");
availableImageSetCodes = tokenImageSets;
setOriginalExpansionSetCode(setCode);
cardType.add(CardType.CREATURE);
color.setRed(true);
subtype.add(SubType.DRAGON);
power = new MageInt(5);
toughness = new MageInt(5);
addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("10E", "BFZ", "C15", "C19", "CMA", "CMD", "ONS", "ROE", "SCG", "WWK", "M19", "KHM");
}
public DragonToken2(final DragonToken2 token) {
@ -43,4 +32,13 @@ public final class DragonToken2 extends TokenImpl {
public DragonToken2 copy() {
return new DragonToken2(this);
}
@Override
public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("M19")) {
this.setTokenType(2);
}
}
}

View file

@ -4,6 +4,8 @@ import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
public final class DwarfBerserkerToken extends TokenImpl {
public DwarfBerserkerToken() {
@ -14,6 +16,8 @@ public final class DwarfBerserkerToken extends TokenImpl {
subtype.add(SubType.BERSERKER);
power = new MageInt(2);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("KHM");
}
public DwarfBerserkerToken(final DwarfBerserkerToken token) {

View file

@ -9,9 +9,9 @@ import java.util.Arrays;
/**
* @author Loki
*/
public final class ElfToken extends TokenImpl {
public final class ElfWarriorToken extends TokenImpl {
public ElfToken() {
public ElfWarriorToken() {
super("Elf Warrior", "1/1 green Elf Warrior creature token");
cardType.add(CardType.CREATURE);
color.setGreen(true);
@ -20,16 +20,16 @@ public final class ElfToken extends TokenImpl {
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("C13", "C14", "EVG", "EMA", "LRW", "MOR", "ORI", "SHM", "M19", "CMR");
availableImageSetCodes = Arrays.asList("C13", "C14", "EVG", "EMA", "LRW", "MOR", "ORI", "SHM", "M19", "CMR", "KHM");
}
public ElfToken(final ElfToken token) {
public ElfWarriorToken(final ElfWarriorToken token) {
super(token);
}
@Override
public ElfToken copy() {
return new ElfToken(this);
public ElfWarriorToken copy() {
return new ElfWarriorToken(this);
}
@Override

View file

@ -4,9 +4,11 @@ import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
public final class GiantsAmuletToken extends TokenImpl {
import java.util.Arrays;
public GiantsAmuletToken() {
public final class GiantWizardToken extends TokenImpl {
public GiantWizardToken() {
super("Giant Wizard", "4/4 blue Giant Wizard creature token");
cardType.add(CardType.CREATURE);
color.setBlue(true);
@ -14,13 +16,15 @@ public final class GiantsAmuletToken extends TokenImpl {
subtype.add(SubType.WIZARD);
power = new MageInt(4);
toughness = new MageInt(4);
availableImageSetCodes = Arrays.asList("KHM");
}
public GiantsAmuletToken(final GiantsAmuletToken token) {
public GiantWizardToken(final GiantWizardToken token) {
super(token);
}
public GiantsAmuletToken copy() {
return new GiantsAmuletToken(this);
public GiantWizardToken copy() {
return new GiantWizardToken(this);
}
}

View file

@ -19,7 +19,7 @@ public final class GreenCat2Token extends TokenImpl {
power = new MageInt(2);
toughness = new MageInt(2);
availableImageSetCodes.addAll(Arrays.asList("M21", "KHM"));
availableImageSetCodes = Arrays.asList("M21", "KHM");
}
private GreenCat2Token(final GreenCat2Token token) {

View file

@ -4,6 +4,8 @@ import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
@ -17,6 +19,8 @@ public final class HumanWarriorToken extends TokenImpl {
subtype.add(SubType.WARRIOR);
power = new MageInt(1);
toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("KHM");
}
private HumanWarriorToken(final HumanWarriorToken token) {

View file

@ -4,6 +4,8 @@ import mage.abilities.mana.AnyColorManaAbility;
import mage.constants.CardType;
import mage.constants.SuperType;
import java.util.Arrays;
/**
* @author TheElk801
*/
@ -12,8 +14,11 @@ public final class IcyManalithToken extends TokenImpl {
public IcyManalithToken() {
super("Icy Manalith", "colorless snow artifact token named Icy Manalith with \"{T}: Add one mana of any color.\"");
this.addSuperType(SuperType.SNOW);
cardType.add(CardType.ARTIFACT);
this.cardType.add(CardType.ARTIFACT);
this.addAbility(new AnyColorManaAbility());
availableImageSetCodes = Arrays.asList("KHM");
}
private IcyManalithToken(final IcyManalithToken token) {

View file

@ -4,6 +4,8 @@ import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
public final class KomasCoilToken extends TokenImpl {
public KomasCoilToken() {
@ -13,6 +15,8 @@ public final class KomasCoilToken extends TokenImpl {
color.setBlue(true);
power = new MageInt(3);
toughness = new MageInt(3);
availableImageSetCodes = Arrays.asList("KHM");
}
private KomasCoilToken(final KomasCoilToken token) {

View file

@ -1,13 +1,13 @@
package mage.game.permanent.token;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
*
* @author spjspj
*/
public final class OwlToken extends TokenImpl {
@ -19,7 +19,10 @@ public final class OwlToken extends TokenImpl {
subtype.add(SubType.BIRD);
power = new MageInt(1);
toughness = new MageInt(1);
this.addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("EVE", "INV", "KHM");
}
public OwlToken(final OwlToken token) {

View file

@ -4,6 +4,8 @@ import mage.abilities.mana.AnyColorManaAbility;
import mage.constants.CardType;
import mage.constants.SuperType;
import java.util.Arrays;
/**
* @author TheElk801
*/
@ -13,7 +15,10 @@ public final class ReplicatedRingToken extends TokenImpl {
super("Replicated Ring", "colorless snow artifact token named Replicated Ring with \"{T}: Add one mana of any color.\"");
this.addSuperType(SuperType.SNOW);
cardType.add(CardType.ARTIFACT);
this.addAbility(new AnyColorManaAbility());
availableImageSetCodes = Arrays.asList("KHM");
}

View file

@ -5,6 +5,8 @@ import mage.abilities.keyword.ChangelingAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
@ -17,7 +19,10 @@ public final class ShapeshifterBlueToken extends TokenImpl {
color.setBlue(true);
power = new MageInt(2);
toughness = new MageInt(2);
addAbility(new ChangelingAbility());
availableImageSetCodes = Arrays.asList("KHM");
}
private ShapeshifterBlueToken(final ShapeshifterBlueToken token) {

View file

@ -9,6 +9,8 @@ import mage.abilities.effects.keyword.ScryEffect;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
@ -27,6 +29,8 @@ public final class ShardToken extends TokenImpl {
cost.setText("Sacrifice this enchantment");
ability.addCost(cost);
this.addAbility(ability);
availableImageSetCodes = Arrays.asList("KHM");
}
public ShardToken(final ShardToken token) {

View file

@ -23,7 +23,7 @@ public final class SpiritWhiteToken extends TokenImpl {
addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("AVR", "C14", "CNS", "DDC", "DDK", "FRF", "ISD", "KTK", "M15", "MM2", "SHM",
"SOI", "EMA", "C16", "MM3", "CMA", "E01", "ANA", "GPT", "RAV", "EMN", "RNA", "M20", "C20", "CMR");
"SOI", "EMA", "C16", "MM3", "CMA", "E01", "ANA", "GPT", "RAV", "EMN", "RNA", "M20", "C20", "CMR", "KHM");
}
@Override

View file

@ -29,7 +29,7 @@ public final class TreasureToken extends TokenImpl {
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
availableImageSetCodes = Arrays.asList("XLN", "RNA", "M20", "C19", "C20", "M21", "CMR");
availableImageSetCodes = Arrays.asList("XLN", "RNA", "M20", "C19", "C20", "M21", "CMR", "KHM");
}
public TreasureToken(final TreasureToken token) {

View file

@ -5,6 +5,8 @@ import mage.abilities.keyword.TrampleAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
* @author TheElk801
*/
@ -18,7 +20,10 @@ public final class TrollWarriorToken extends TokenImpl {
subtype.add(SubType.WARRIOR);
power = new MageInt(4);
toughness = new MageInt(4);
addAbility(TrampleAbility.getInstance());
availableImageSetCodes = Arrays.asList("KHM");
}
private TrollWarriorToken(final TrollWarriorToken token) {

View file

@ -1,13 +1,12 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/**
*
* @author TheElk801
*/
public final class ZombieBerserkerToken extends TokenImpl {
@ -20,6 +19,8 @@ public final class ZombieBerserkerToken extends TokenImpl {
subtype.add(SubType.BERSERKER);
power = new MageInt(2);
toughness = new MageInt(2);
availableImageSetCodes = Arrays.asList("KHM");
}
private ZombieBerserkerToken(final ZombieBerserkerToken token) {