[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

@ -17,18 +17,17 @@ import static org.mage.plugins.card.utils.CardImageUtils.getImagesDir;
*/ */
public class DirectLinksForDownload implements Iterable<DownloadJob> { public class DirectLinksForDownload implements Iterable<DownloadJob> {
private static final String backsideUrl = "https://upload.wikimedia.org/wikipedia/en/a/aa/Magic_the_gathering-card_back.jpg";
private static final Map<String, String> directLinks = new LinkedHashMap<>(); private static final Map<String, String> directLinks = new LinkedHashMap<>();
public static final String cardbackFilename = "cardback.jpg"; public static final String cardbackFilename = "cardback.jpg";
public static final String tokenFrameFilename = "tokenFrame.png"; public static final String foretellFilename = "foretell.jpg";
static { static {
directLinks.put(cardbackFilename, backsideUrl); directLinks.put(cardbackFilename, "https://upload.wikimedia.org/wikipedia/en/a/aa/Magic_the_gathering-card_back.jpg");
directLinks.put(foretellFilename, "https://api.scryfall.com/cards/tkhm/23/en?format=image");
} }
private File outDir; private final File outDir;
public DirectLinksForDownload() { public DirectLinksForDownload() {
this.outDir = new File(getImagesDir() + Constants.RESOURCE_PATH_DEFAULT_IMAGES); this.outDir = new File(getImagesDir() + Constants.RESOURCE_PATH_DEFAULT_IMAGES);

View file

@ -496,6 +496,30 @@ public class ScryfallImageSupportTokens {
put("CMR/Treasure", "https://api.scryfall.com/cards/tcmr/12/en?format=image"); put("CMR/Treasure", "https://api.scryfall.com/cards/tcmr/12/en?format=image");
put("CMR/Zombie", "https://api.scryfall.com/cards/tcmr/6/en?format=image"); put("CMR/Zombie", "https://api.scryfall.com/cards/tcmr/6/en?format=image");
// KHM
put("KHM/Angel Warrior", "https://api.scryfall.com/cards/tkhm/2/en?format=image");
put("KHM/Bear", "https://api.scryfall.com/cards/tkhm/13/en?format=image");
put("KHM/Bird", "https://api.scryfall.com/cards/tkhm/5/en?format=image");
put("KHM/Cat", "https://api.scryfall.com/cards/tkhm/14/en?format=image");
put("KHM/Demon Berserker", "https://api.scryfall.com/cards/tkhm/10/en?format=image");
put("KHM/Dragon", "https://api.scryfall.com/cards/tkhm/11/en?format=image");
put("KHM/Dwarf Berserker", "https://api.scryfall.com/cards/tkhm/12/en?format=image");
put("KHM/Elf Warrior", "https://api.scryfall.com/cards/tkhm/15/en?format=image");
put("KHM/Giant Wizard", "https://api.scryfall.com/cards/tkhm/6/en?format=image");
put("KHM/Human Warrior", "https://api.scryfall.com/cards/tkhm/3/en?format=image");
put("KHM/Icy Manalith", "https://api.scryfall.com/cards/tkhm/17/en?format=image");
put("KHM/Koma's Coil", "https://api.scryfall.com/cards/tkhm/7/en?format=image");
put("KHM/Replicated Ring", "https://api.scryfall.com/cards/tkhm/18/en?format=image");
put("KHM/Shapeshifter", "https://api.scryfall.com/cards/tkhm/8/en?format=image");
put("KHM/Shard", "https://api.scryfall.com/cards/tkhm/1/en?format=image");
put("KHM/Spirit", "https://api.scryfall.com/cards/tkhm/4/en?format=image");
put("KHM/Treasure", "https://api.scryfall.com/cards/tkhm/19/en?format=image");
put("KHM/Troll Warrior", "https://api.scryfall.com/cards/tkhm/16/en?format=image");
put("KHM/Zombie Berserker", "https://api.scryfall.com/cards/tkhm/9/en?format=image");
put("KHM/Emblem Kaya the Inexorable", "https://api.scryfall.com/cards/tkhm/20/en?format=image");
put("KHM/Emblem Tibalt Cosmic Imposter", "https://api.scryfall.com/cards/tkhm/21/en?format=image");
put("KHM/Emblem Tyvar Kell", "https://api.scryfall.com/cards/tkhm/22/en?format=image");
// generate supported sets // generate supported sets
supportedSets.clear(); supportedSets.clear();
for (String cardName : this.keySet()) { for (String cardName : this.keySet()) {

View file

@ -102,6 +102,9 @@
|Generate|EMBLEM:M21|Basri Ket||Emblem Basri|BasriKetEmblem| |Generate|EMBLEM:M21|Basri Ket||Emblem Basri|BasriKetEmblem|
|Generate|EMBLEM:M21|Garruk, Unleashed||Emblem Garruk|GarrukUnleashedEmblem| |Generate|EMBLEM:M21|Garruk, Unleashed||Emblem Garruk|GarrukUnleashedEmblem|
|Generate|EMBLEM:M21|Liliana, Waker of the Dead||Emblem Liliana|LilianaWakerOfTheDeadEmblem| |Generate|EMBLEM:M21|Liliana, Waker of the Dead||Emblem Liliana|LilianaWakerOfTheDeadEmblem|
|Generate|EMBLEM:KHM|Kaya the Inexorable||Emblem Kaya|KayaTheInexorableEmblem|
|Generate|EMBLEM:KHM|Tibalt Cosmic Imposter||Emblem Tibalt|TibaltCosmicImposterEmblem|
|Generate|EMBLEM:KHM|Tyvar Kell||Emblem Tyvar|TyvarKellEmblem|
# Planes # Planes
|Generate|PLANE:PCA|Plane - Academy at Tolaria West|||AcademyAtTolariaWestPlane| |Generate|PLANE:PCA|Plane - Academy at Tolaria West|||AcademyAtTolariaWestPlane|
@ -279,7 +282,7 @@
|Generate|TOK:C13|Elemental|2||WalkerOfTheGroveToken| |Generate|TOK:C13|Elemental|2||WalkerOfTheGroveToken|
|Generate|TOK:C13|Elemental|3||RedElementalToken| |Generate|TOK:C13|Elemental|3||RedElementalToken|
|Generate|TOK:C13|Elephant|||ElephantToken| |Generate|TOK:C13|Elephant|||ElephantToken|
|Generate|TOK:C13|Elf Warrior|||ElfToken| |Generate|TOK:C13|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:C13|Goat|||GoatToken| |Generate|TOK:C13|Goat|||GoatToken|
|Generate|TOK:C13|Graveborn|||SekKuarDeathkeeperGravebornToken| |Generate|TOK:C13|Graveborn|||SekKuarDeathkeeperGravebornToken|
|Generate|TOK:C13|Insect|||InsectToken| |Generate|TOK:C13|Insect|||InsectToken|
@ -304,7 +307,7 @@
|Generate|TOK:C14|Elephant|||ElephantToken| |Generate|TOK:C14|Elephant|||ElephantToken|
|Generate|TOK:C14|Elf Druid|||FreyaliseLlanowarsFuryToken| |Generate|TOK:C14|Elf Druid|||FreyaliseLlanowarsFuryToken|
|Generate|TOK:C14|Elf Druid|||LlanowarElvesToken| |Generate|TOK:C14|Elf Druid|||LlanowarElvesToken|
|Generate|TOK:C14|Elf Warrior|||ElfToken| |Generate|TOK:C14|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:C14|Equipment|||NahiriTheLithomancerEquipmentToken| |Generate|TOK:C14|Equipment|||NahiriTheLithomancerEquipmentToken|
|Generate|TOK:C14|Fish|||ReefWormFishToken| |Generate|TOK:C14|Fish|||ReefWormFishToken|
|Generate|TOK:C14|Gargoyle|||GargoyleToken| |Generate|TOK:C14|Gargoyle|||GargoyleToken|
@ -514,7 +517,7 @@
|Generate|TOK:DVD|Spirit|||SpiritWhiteToken| |Generate|TOK:DVD|Spirit|||SpiritWhiteToken|
|Generate|TOK:DVD|Thrull|||BreedingPitBlackInsectToken| |Generate|TOK:DVD|Thrull|||BreedingPitBlackInsectToken|
|Generate|TOK:DD3D|Elemental Shaman|| |Generate|TOK:DD3D|Elemental Shaman||
|Generate|TOK:EVG|Elf Warrior|||ElfToken| |Generate|TOK:EVG|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:EVG|Goblin|||GoblinToken| |Generate|TOK:EVG|Goblin|||GoblinToken|
|Generate|TOK:GVL|Ape|||PongifyApeToken| |Generate|TOK:GVL|Ape|||PongifyApeToken|
|Generate|TOK:GVL|Bat|||BatToken| |Generate|TOK:GVL|Bat|||BatToken|
@ -627,7 +630,7 @@
|Generate|TOK:EMA|Elemental|1||RedElementalToken| |Generate|TOK:EMA|Elemental|1||RedElementalToken|
|Generate|TOK:EMA|Elemental|2||CallTheSkyBreakerElementalToken| |Generate|TOK:EMA|Elemental|2||CallTheSkyBreakerElementalToken|
|Generate|TOK:EMA|Elephant|||ElephantToken| |Generate|TOK:EMA|Elephant|||ElephantToken|
|Generate|TOK:EMA|Elf Warrior|||ElfToken| |Generate|TOK:EMA|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:EMA|Goblin Soldier|||GoblinTrenchesToken| |Generate|TOK:EMA|Goblin Soldier|||GoblinTrenchesToken|
|Generate|TOK:EMA|Goblin|||GoblinToken| |Generate|TOK:EMA|Goblin|||GoblinToken|
|Generate|TOK:EMA|Serf|||SerfToken| |Generate|TOK:EMA|Serf|||SerfToken|
@ -661,7 +664,7 @@
|Generate|TOK:EVE|Wolf|||WolfToken| |Generate|TOK:EVE|Wolf|||WolfToken|
|Generate|TOK:EVE|Worm|||WormHarvestToken| |Generate|TOK:EVE|Worm|||WormHarvestToken|
|Generate|TOK:EVG|Elemental|||VoiceOfTheWoodsElementalToken| |Generate|TOK:EVG|Elemental|||VoiceOfTheWoodsElementalToken|
|Generate|TOK:EVG|Elf Warrior|||ElfToken| |Generate|TOK:EVG|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:EVG|Goblin|||GoblinToken| |Generate|TOK:EVG|Goblin|||GoblinToken|
|Generate|TOK:EXO|Pegasus|||PegasusToken| |Generate|TOK:EXO|Pegasus|||PegasusToken|
|Generate|TOK:EXO|Thopter|||ThopterColorlessToken| |Generate|TOK:EXO|Thopter|||ThopterColorlessToken|
@ -798,7 +801,7 @@
|Generate|TOK:LRW|Elemental Shaman|||ElementalShamanToken| |Generate|TOK:LRW|Elemental Shaman|||ElementalShamanToken|
|Generate|TOK:LRW|Elemental|1||WalkerOfTheGroveToken| |Generate|TOK:LRW|Elemental|1||WalkerOfTheGroveToken|
|Generate|TOK:LRW|Elemental|2||WhiteElementalToken| |Generate|TOK:LRW|Elemental|2||WhiteElementalToken|
|Generate|TOK:LRW|Elf Warrior|||ElfToken| |Generate|TOK:LRW|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:LRW|Goblin Rogue|||GoblinRogueToken| |Generate|TOK:LRW|Goblin Rogue|||GoblinRogueToken|
|Generate|TOK:LRW|Kithkin Soldier|||KithkinToken| |Generate|TOK:LRW|Kithkin Soldier|||KithkinToken|
|Generate|TOK:LRW|Merfolk Wizard|| |Generate|TOK:LRW|Merfolk Wizard||
@ -952,7 +955,7 @@
|Generate|TOK:MMQ|Spirit|||SpiritWhiteToken| |Generate|TOK:MMQ|Spirit|||SpiritWhiteToken|
|Generate|TOK:MMQ|Zombie|||ZombieToken| |Generate|TOK:MMQ|Zombie|||ZombieToken|
|Generate|TOK:MOR|Elemental|||WalkerOfTheGroveToken| |Generate|TOK:MOR|Elemental|||WalkerOfTheGroveToken|
|Generate|TOK:MOR|Elf Warrior|||ElfToken| |Generate|TOK:MOR|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:MOR|Faerie Rogue|||FaerieRogueToken| |Generate|TOK:MOR|Faerie Rogue|||FaerieRogueToken|
|Generate|TOK:MOR|Giant Warrior|||GiantWarriorToken| |Generate|TOK:MOR|Giant Warrior|||GiantWarriorToken|
|Generate|TOK:MOR|Goblin Rogue|||GoblinRogueToken| |Generate|TOK:MOR|Goblin Rogue|||GoblinRogueToken|
@ -1011,7 +1014,7 @@
|Generate|TOK:ORI|Ashaya, the Awoken World|||NissaSageAnimistToken| |Generate|TOK:ORI|Ashaya, the Awoken World|||NissaSageAnimistToken|
|Generate|TOK:ORI|Demon|||DemonToken| |Generate|TOK:ORI|Demon|||DemonToken|
|Generate|TOK:ORI|Elemental|||ZendikarsRoilElementalToken| |Generate|TOK:ORI|Elemental|||ZendikarsRoilElementalToken|
|Generate|TOK:ORI|Elf Warrior|||ElfToken| |Generate|TOK:ORI|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:ORI|Goblin|||GoblinToken| |Generate|TOK:ORI|Goblin|||GoblinToken|
|Generate|TOK:ORI|Knight|||KnightToken| |Generate|TOK:ORI|Knight|||KnightToken|
|Generate|TOK:ORI|Soldier|||SoldierToken| |Generate|TOK:ORI|Soldier|||SoldierToken|
@ -1084,7 +1087,7 @@
|Generate|TOK:SHM|Elemental|2||RedElementalToken| |Generate|TOK:SHM|Elemental|2||RedElementalToken|
|Generate|TOK:SHM|Elf Warrior|1| |Generate|TOK:SHM|Elf Warrior|1|
|Generate|TOK:SHM|Elf Warrior|2| |Generate|TOK:SHM|Elf Warrior|2|
|Generate|TOK:SHM|Elf Warrior|1||ElfToken| |Generate|TOK:SHM|Elf Warrior|1||ElfWarriorToken|
|Generate|TOK:SHM|Elf Warrior|2||RhysTheRedeemedToken| |Generate|TOK:SHM|Elf Warrior|2||RhysTheRedeemedToken|
|Generate|TOK:SHM|Faerie Rogue|||OonaQueenFaerieToken| |Generate|TOK:SHM|Faerie Rogue|||OonaQueenFaerieToken|
|Generate|TOK:SHM|Giant Warrior|||GiantBaitingGiantWarriorToken| |Generate|TOK:SHM|Giant Warrior|||GiantBaitingGiantWarriorToken|
@ -1315,7 +1318,7 @@
|Generate|TOK:M19|Cat|||CatToken2| |Generate|TOK:M19|Cat|||CatToken2|
|Generate|TOK:M19|Dragon|1||DragonEggDragonToken| |Generate|TOK:M19|Dragon|1||DragonEggDragonToken|
|Generate|TOK:M19|Dragon|2||DragonToken2| |Generate|TOK:M19|Dragon|2||DragonToken2|
|Generate|TOK:M19|Elf Warrior|||ElfToken| |Generate|TOK:M19|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:M19|Goblin|||GoblinToken| |Generate|TOK:M19|Goblin|||GoblinToken|
|Generate|TOK:M19|Knight|||KnightToken| |Generate|TOK:M19|Knight|||KnightToken|
|Generate|TOK:M19|Ox|||OxToken| |Generate|TOK:M19|Ox|||OxToken|
@ -1465,7 +1468,7 @@
|Generate|TOK:CMR|Cat|||CatToken| |Generate|TOK:CMR|Cat|||CatToken|
|Generate|TOK:CMR|Dragon|||DragonEggDragonToken| |Generate|TOK:CMR|Dragon|||DragonEggDragonToken|
|Generate|TOK:CMR|Elephant|||ElephantToken| |Generate|TOK:CMR|Elephant|||ElephantToken|
|Generate|TOK:CMR|Elf Warrior|||ElfToken| |Generate|TOK:CMR|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:CMR|Golem|||GolemToken| |Generate|TOK:CMR|Golem|||GolemToken|
|Generate|TOK:CMR|Horror|||PhyrexianRebirthHorrorToken| |Generate|TOK:CMR|Horror|||PhyrexianRebirthHorrorToken|
|Generate|TOK:CMR|Illusion|||MelokuTheCloudedMirrorToken| |Generate|TOK:CMR|Illusion|||MelokuTheCloudedMirrorToken|
@ -1478,4 +1481,25 @@
|Generate|TOK:CMR|Spirit|||SpiritWhiteToken| |Generate|TOK:CMR|Spirit|||SpiritWhiteToken|
|Generate|TOK:CMR|Thrull|||BreedingPitThrullToken| |Generate|TOK:CMR|Thrull|||BreedingPitThrullToken|
|Generate|TOK:CMR|Treasure|||TreasureToken| |Generate|TOK:CMR|Treasure|||TreasureToken|
|Generate|TOK:CMR|Zombie|||ZombieToken| |Generate|TOK:CMR|Zombie|||ZombieToken|
# KHM
|Generate|TOK:KHM|Angel Warrior|||AngelWarriorVigilanceToken|
|Generate|TOK:KHM|Bear|||BearToken|
|Generate|TOK:KHM|Bird|||OwlToken|
|Generate|TOK:KHM|Cat|||GreenCat2Token|
|Generate|TOK:KHM|Demon Berserker|||DemonBerserkerToken|
|Generate|TOK:KHM|Dragon|||DragonToken2|
|Generate|TOK:KHM|Dwarf Berserker|||DwarfBerserkerToken|
|Generate|TOK:KHM|Elf Warrior|||ElfWarriorToken|
|Generate|TOK:KHM|Giant Wizard|||GiantWizardToken|
|Generate|TOK:KHM|Human Warrior|||HumanWarriorToken|
|Generate|TOK:KHM|Icy Manalith|||IcyManalithToken|
|Generate|TOK:KHM|Koma's Coil|||KomasCoilToken|
|Generate|TOK:KHM|Replicated Ring|||ReplicatedRingToken|
|Generate|TOK:KHM|Shapeshifter|||ShapeshifterBlueToken|
|Generate|TOK:KHM|Shard|||ShardToken|
|Generate|TOK:KHM|Spirit|||SpiritWhiteToken|
|Generate|TOK:KHM|Treasure|||TreasureToken|
|Generate|TOK:KHM|Troll Warrior|||TrollWarriorToken|
|Generate|TOK:KHM|Zombie Berserker|||ZombieBerserkerToken|

View file

@ -1,7 +1,5 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
@ -9,22 +7,23 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class AmbassadorOak extends CardImpl { public final class AmbassadorOak extends CardImpl {
public AmbassadorOak(UUID ownerId, CardSetInfo setInfo) { public AmbassadorOak(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.TREEFOLK); this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken(), 1), false)); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken(), 1), false));
} }
private AmbassadorOak(final AmbassadorOak card) { private AmbassadorOak(final AmbassadorOak card) {

View file

@ -17,7 +17,7 @@ import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.TokenPredicate; import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.game.permanent.token.HumanWarriorToken; import mage.game.permanent.token.HumanWarriorToken;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -45,7 +45,7 @@ public final class BattleForBretagard extends CardImpl {
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new CreateTokenEffect(new HumanWarriorToken())); sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new CreateTokenEffect(new HumanWarriorToken()));
// II Create a 1/1 green Elf Warrior creature token. // II Create a 1/1 green Elf Warrior creature token.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new CreateTokenEffect(new ElfToken())); sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new CreateTokenEffect(new ElfWarriorToken()));
// III Choose any number of artifact tokens and/or creature tokens you control with different names. For each of them, create a token thats a copy of it. // III Choose any number of artifact tokens and/or creature tokens you control with different names. For each of them, create a token thats a copy of it.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new BattleForBretagardEffect()); sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new BattleForBretagardEffect());
@ -87,7 +87,7 @@ class BattleForBretagardEffect extends OneShotEffect {
if (player == null) { if (player == null) {
return false; return false;
} }
TargetPermanent target=new BattleForBretagardTarget(); TargetPermanent target = new BattleForBretagardTarget();
player.choose(outcome, target, source.getSourceId(), game); player.choose(outcome, target, source.getSourceId(), game);
for (UUID targetId : target.getTargets()) { for (UUID targetId : target.getTargets()) {
new CreateTokenCopyTargetEffect() new CreateTokenCopyTargetEffect()

View file

@ -1,4 +1,3 @@
package mage.cards.d; package mage.cards.d;
import mage.MageInt; import mage.MageInt;
@ -13,12 +12,11 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class DwynensElite extends CardImpl { public final class DwynensElite extends CardImpl {
@ -38,7 +36,7 @@ public final class DwynensElite extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Dwynen's Elite enters the battlefield, if you control another Elf, create a 1/1 green Elf Warrior creature token. // When Dwynen's Elite enters the battlefield, if you control another Elf, create a 1/1 green Elf Warrior creature token.
TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken())); TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken()));
this.addAbility(new ConditionalInterveningIfTriggeredAbility( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
triggeredAbility, triggeredAbility,
new PermanentsOnTheBattlefieldCondition(filter), new PermanentsOnTheBattlefieldCondition(filter),

View file

@ -7,7 +7,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID; import java.util.UUID;
@ -25,7 +25,7 @@ public final class ElderleafMentor extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Elderleaf Mentor enters the battlefield, create a 1/1 green Elf Warrior creature token. // When Elderleaf Mentor enters the battlefield, create a 1/1 green Elf Warrior creature token.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfToken()))); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken())));
} }
private ElderleafMentor(final ElderleafMentor card) { private ElderleafMentor(final ElderleafMentor card) {

View file

@ -1,7 +1,5 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
@ -11,10 +9,11 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author weirddan455 * @author weirddan455
*/ */
public final class ElvenAmbush extends CardImpl { public final class ElvenAmbush extends CardImpl {
@ -33,7 +32,7 @@ public final class ElvenAmbush extends CardImpl {
this.getSpellAbility().addHint(new ValueHint("Elves you control", elfCount)); this.getSpellAbility().addHint(new ValueHint("Elves you control", elfCount));
// Create a 1/1 green Elf Warrior creature token for each Elf you control. // Create a 1/1 green Elf Warrior creature token for each Elf you control.
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), elfCount)); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfWarriorToken(), elfCount));
} }
private ElvenAmbush(final ElvenAmbush card) { private ElvenAmbush(final ElvenAmbush card) {

View file

@ -15,7 +15,7 @@ import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID; import java.util.UUID;
@ -31,7 +31,7 @@ public final class ElvenBow extends CardImpl {
// When Elven Bow enters the battlefield, you may pay {2}. If you do, create a 1/1 green Elf Warrior creature token, then attach Elven Bow to it. // When Elven Bow enters the battlefield, you may pay {2}. If you do, create a 1/1 green Elf Warrior creature token, then attach Elven Bow to it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(
new CreateTokenAttachSourceEffect(new ElfToken()), new GenericManaCost(2) new CreateTokenAttachSourceEffect(new ElfWarriorToken()), new GenericManaCost(2)
))); )));
// Equipped creature gets +1/+2 and has reach. // Equipped creature gets +1/+2 and has reach.

View file

@ -1,8 +1,5 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
@ -12,10 +9,11 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class ElvishPromenade extends CardImpl { public final class ElvishPromenade extends CardImpl {
@ -29,11 +27,11 @@ public final class ElvishPromenade extends CardImpl {
private static final DynamicValue elfCount = new PermanentsOnBattlefieldCount(filter); private static final DynamicValue elfCount = new PermanentsOnBattlefieldCount(filter);
public ElvishPromenade(UUID ownerId, CardSetInfo setInfo) { public ElvishPromenade(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{G}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.getSpellAbility().addHint(new ValueHint("Elves you control", elfCount)); this.getSpellAbility().addHint(new ValueHint("Elves you control", elfCount));
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), elfCount)); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfWarriorToken(), elfCount));
} }
private ElvishPromenade(final ElvishPromenade card) { private ElvishPromenade(final ElvishPromenade card) {

View file

@ -1,6 +1,5 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
@ -11,21 +10,22 @@ import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author weirddan455 * @author weirddan455
*/ */
public final class ElvishWarmaster extends CardImpl { public final class ElvishWarmaster extends CardImpl {
@ -46,7 +46,7 @@ public final class ElvishWarmaster extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// Whenever one or more other Elves enters the battlefield under your control, create a 1/1 green Elf Warrior creature token. This ability triggers only once each turn. // Whenever one or more other Elves enters the battlefield under your control, create a 1/1 green Elf Warrior creature token. This ability triggers only once each turn.
this.addAbility(new ElvishWarmasterTriggeredAbility(new CreateTokenEffect(new ElfToken()), filter)); this.addAbility(new ElvishWarmasterTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken()), filter));
// {5}{G}{G}: Elves you control get +2/+2 and gain deathtouch until end of turn. // {5}{G}{G}: Elves you control get +2/+2 and gain deathtouch until end of turn.
Ability ability = new SimpleActivatedAbility(new BoostControlledEffect( Ability ability = new SimpleActivatedAbility(new BoostControlledEffect(

View file

@ -9,7 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID; import java.util.UUID;
@ -27,7 +27,7 @@ public final class ExquisiteHuntmaster extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Exquisite Huntmaster dies, create a 1/1 green Elf Warrior creature token. // When Exquisite Huntmaster dies, create a 1/1 green Elf Warrior creature token.
this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new ElfToken()))); this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken())));
// Encore {4}{B} // Encore {4}{B}
this.addAbility(new EncoreAbility(new ManaCostsImpl<>("{4}{B}"))); this.addAbility(new EncoreAbility(new ManaCostsImpl<>("{4}{B}")));

View file

@ -9,7 +9,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID; import java.util.UUID;
@ -27,7 +27,7 @@ public final class EyeblightCullers extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// When Eyeblight Cullers dies, create three 1/1 green Elf Warrior creature tokens, then mill three cards. // When Eyeblight Cullers dies, create three 1/1 green Elf Warrior creature tokens, then mill three cards.
Ability ability = new DiesSourceTriggeredAbility(new CreateTokenEffect(new ElfToken(), 3)); Ability ability = new DiesSourceTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken(), 3));
ability.addEffect(new MillCardsControllerEffect(3).concatBy(", then")); ability.addEffect(new MillCardsControllerEffect(3).concatBy(", then"));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -11,18 +9,18 @@ import mage.constants.Zone;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class FlourishingDefenses extends CardImpl { public final class FlourishingDefenses extends CardImpl {
public FlourishingDefenses(UUID ownerId, CardSetInfo setInfo) { public FlourishingDefenses(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
// Whenever a -1/-1 counter is put on a creature, you may create a 1/1 green Elf Warrior creature token. // Whenever a -1/-1 counter is put on a creature, you may create a 1/1 green Elf Warrior creature token.
this.addAbility(new FlourishingDefensesTriggeredAbility()); this.addAbility(new FlourishingDefensesTriggeredAbility());
@ -42,7 +40,7 @@ public final class FlourishingDefenses extends CardImpl {
class FlourishingDefensesTriggeredAbility extends TriggeredAbilityImpl { class FlourishingDefensesTriggeredAbility extends TriggeredAbilityImpl {
FlourishingDefensesTriggeredAbility() { FlourishingDefensesTriggeredAbility() {
super(Zone.BATTLEFIELD, new CreateTokenEffect(new ElfToken()), true); super(Zone.BATTLEFIELD, new CreateTokenEffect(new ElfWarriorToken()), true);
} }
FlourishingDefensesTriggeredAbility(final FlourishingDefensesTriggeredAbility ability) { FlourishingDefensesTriggeredAbility(final FlourishingDefensesTriggeredAbility ability) {
@ -63,9 +61,7 @@ class FlourishingDefensesTriggeredAbility extends TriggeredAbilityImpl {
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
if (event.getData().equals(CounterType.M1M1.getName())) { if (event.getData().equals(CounterType.M1M1.getName())) {
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());
if (permanent != null && permanent.isCreature()) { return permanent != null && permanent.isCreature();
return true;
}
} }
return false; return false;
} }

View file

@ -18,7 +18,7 @@ import mage.abilities.keyword.HexproofAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.game.permanent.token.GiantsAmuletToken; import mage.game.permanent.token.GiantWizardToken;
import java.util.UUID; import java.util.UUID;
@ -34,7 +34,7 @@ public final class GiantsAmulet extends CardImpl {
// When Giant's Amulet enters the battlefield, you may pay {3}{U}. If you do, create a 4/4 blue Giant Wizard creature token, then attach Giant's Amulet to it. // When Giant's Amulet enters the battlefield, you may pay {3}{U}. If you do, create a 4/4 blue Giant Wizard creature token, then attach Giant's Amulet to it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid( this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(
new CreateTokenAttachSourceEffect(new GiantsAmuletToken()), new ManaCostsImpl<>("{3}{U}") new CreateTokenAttachSourceEffect(new GiantWizardToken()), new ManaCostsImpl<>("{3}{U}")
))); )));
// Equipped creature gets +0/+1 and has "This creature has hexproof as long as it's untapped." // Equipped creature gets +0/+1 and has "This creature has hexproof as long as it's untapped."

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -12,23 +10,24 @@ import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.players.Player; import mage.players.Player;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
*
* @author Styxo * @author Styxo
*/ */
public final class GiltLeafAmbush extends CardImpl { public final class GiltLeafAmbush extends CardImpl {
public GiltLeafAmbush(UUID ownerId, CardSetInfo setInfo) { public GiltLeafAmbush(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.INSTANT},"{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.INSTANT}, "{2}{G}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
// Create two 1/1 green Elf Warrior creature tokens into play. Clash with an opponent. If you win, those creatures gain deathtouch until end of turn // Create two 1/1 green Elf Warrior creature tokens into play. Clash with an opponent. If you win, those creatures gain deathtouch until end of turn
@ -65,7 +64,7 @@ class GiltLeafAmbushCreateTokenEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
CreateTokenEffect effect = new CreateTokenEffect(new ElfToken(), 2); CreateTokenEffect effect = new CreateTokenEffect(new ElfWarriorToken(), 2);
effect.apply(game, source); effect.apply(game, source);
if (ClashEffect.getInstance().apply(game, source)) { if (ClashEffect.getInstance().apply(game, source)) {
for (UUID tokenId : effect.getLastAddedTokenIds()) { for (UUID tokenId : effect.getLastAddedTokenIds()) {

View file

@ -1,7 +1,5 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.ReinforceAbility; import mage.abilities.keyword.ReinforceAbility;
@ -9,19 +7,20 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class HuntingTriad extends CardImpl { public final class HuntingTriad extends CardImpl {
public HuntingTriad(UUID ownerId, CardSetInfo setInfo) { public HuntingTriad(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.SORCERY},"{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{G}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfToken(), 3)); this.getSpellAbility().addEffect(new CreateTokenEffect(new ElfWarriorToken(), 3));
this.addAbility(new ReinforceAbility(3, new ManaCostsImpl("{3}{G}"))); this.addAbility(new ReinforceAbility(3, new ManaCostsImpl("{3}{G}")));
} }

View file

@ -1,7 +1,5 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
@ -14,10 +12,11 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class ImperiousPerfect extends CardImpl { public final class ImperiousPerfect extends CardImpl {
@ -29,14 +28,14 @@ public final class ImperiousPerfect extends CardImpl {
} }
public ImperiousPerfect(UUID ownerId, CardSetInfo setInfo) { public ImperiousPerfect(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true)));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ElfToken(), 1), new ColoredManaCost(ColoredManaSymbol.G)); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ElfWarriorToken(), 1), new ColoredManaCost(ColoredManaSymbol.G));
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -20,7 +20,7 @@ import mage.constants.SuperType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.UntappedPredicate; import mage.filter.predicate.permanent.UntappedPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import java.util.UUID; import java.util.UUID;
@ -51,7 +51,7 @@ public final class LathrilBladeOfTheElves extends CardImpl {
// Whenever Lathril, Blade of the Elves deals combat damage to a player, create that many 1/1 green Elf Warrior creature tokens. // Whenever Lathril, Blade of the Elves deals combat damage to a player, create that many 1/1 green Elf Warrior creature tokens.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new CreateTokenEffect( this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new CreateTokenEffect(
new ElfToken(), LathrilBladeOfTheElvesValue.instance new ElfWarriorToken(), LathrilBladeOfTheElvesValue.instance
).setText("create that many 1/1 green Elf Warrior creature tokens"), false, true)); ).setText("create that many 1/1 green Elf Warrior creature tokens"), false, true));
// {T}, Tap ten untapped Elves you control: Each opponent loses 10 life and you gain 10 life. // {T}, Tap ten untapped Elves you control: Each opponent loses 10 life and you gain 10 life.

View file

@ -1,7 +1,5 @@
package mage.cards.l; package mage.cards.l;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
@ -10,10 +8,11 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.FilterSpell; import mage.filter.FilterSpell;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class LysAlanaHuntmaster extends CardImpl { public final class LysAlanaHuntmaster extends CardImpl {
@ -25,13 +24,13 @@ public final class LysAlanaHuntmaster extends CardImpl {
} }
public LysAlanaHuntmaster(UUID ownerId, CardSetInfo setInfo) { public LysAlanaHuntmaster(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new ElfToken()), filter, true)); this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken()), filter, true));
} }
private LysAlanaHuntmaster(final LysAlanaHuntmaster card) { private LysAlanaHuntmaster(final LysAlanaHuntmaster card) {

View file

@ -19,7 +19,7 @@ import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.TokenPredicate; import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID; import java.util.UUID;
@ -91,7 +91,7 @@ class NadierAgentOfTheDuskenelEffect extends OneShotEffect {
if (!permanent.isCreature() || permanent.getPower().getValue() < 1) { if (!permanent.isCreature() || permanent.getPower().getValue() < 1) {
return false; return false;
} }
return new ElfToken().putOntoBattlefield(permanent.getPower().getValue(), game, source, source.getControllerId() return new ElfWarriorToken().putOntoBattlefield(permanent.getPower().getValue(), game, source, source.getControllerId()
); );
} }
} }

View file

@ -1,7 +1,5 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
@ -15,18 +13,18 @@ import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*
*/ */
public final class NathOfTheGiltLeaf extends CardImpl { public final class NathOfTheGiltLeaf extends CardImpl {
public NathOfTheGiltLeaf(UUID ownerId, CardSetInfo setInfo) { public NathOfTheGiltLeaf(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{G}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
@ -42,7 +40,7 @@ public final class NathOfTheGiltLeaf extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Whenever an opponent discards a card, you may create a 1/1 green Elf Warrior creature token. // Whenever an opponent discards a card, you may create a 1/1 green Elf Warrior creature token.
Effect effect2 = new CreateTokenEffect(new ElfToken()); Effect effect2 = new CreateTokenEffect(new ElfWarriorToken());
effect2.setText("you may create a 1/1 green Elf Warrior creature token"); effect2.setText("you may create a 1/1 green Elf Warrior creature token");
this.addAbility(new DiscardsACardOpponentTriggeredAbility(effect2, true)); this.addAbility(new DiscardsACardOpponentTriggeredAbility(effect2, true));

View file

@ -1,7 +1,5 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
@ -12,24 +10,20 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.*;
import mage.constants.CardType; import mage.game.permanent.token.ElfWarriorToken;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.permanent.token.ElfToken;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class PresenceOfGond extends CardImpl { public final class PresenceOfGond extends CardImpl {
public PresenceOfGond(UUID ownerId, CardSetInfo setInfo) { public PresenceOfGond(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
@ -41,7 +35,7 @@ public final class PresenceOfGond extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Enchanted creature has "{tap}: Create a 1/1 green Elf Warrior creature token." // Enchanted creature has "{tap}: Create a 1/1 green Elf Warrior creature token."
Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ElfToken()), new TapSourceCost()); Ability abilityToGain = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ElfWarriorToken()), new TapSourceCost());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(abilityToGain, AttachmentType.AURA, Duration.WhileOnBattlefield, this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(abilityToGain, AttachmentType.AURA, Duration.WhileOnBattlefield,
"Enchanted creature has \"{T}: Create a 1/1 green Elf Warrior creature token.\""))); "Enchanted creature has \"{T}: Create a 1/1 green Elf Warrior creature token.\"")));
} }

View file

@ -1,7 +1,5 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility; import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -12,10 +10,11 @@ import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.filter.predicate.permanent.TokenPredicate; import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author LoneFox * @author LoneFox
*/ */
public final class ProwessOfTheFair extends CardImpl { public final class ProwessOfTheFair extends CardImpl {
@ -29,12 +28,12 @@ public final class ProwessOfTheFair extends CardImpl {
} }
public ProwessOfTheFair(UUID ownerId, CardSetInfo setInfo) { public ProwessOfTheFair(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{B}");
this.subtype.add(SubType.ELF); this.subtype.add(SubType.ELF);
// Whenever another nontoken Elf is put into your graveyard from the battlefield, you may create a 1/1 green Elf Warrior creature token. // Whenever another nontoken Elf is put into your graveyard from the battlefield, you may create a 1/1 green Elf Warrior creature token.
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new CreateTokenEffect(new ElfToken()), this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(new CreateTokenEffect(new ElfWarriorToken()),
true, filter, false, true)); true, filter, false, true));
} }
private ProwessOfTheFair(final ProwessOfTheFair card) { private ProwessOfTheFair(final ProwessOfTheFair card) {

View file

@ -13,7 +13,7 @@ import mage.constants.Zone;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCardInYourGraveyard; import mage.target.common.TargetCardInYourGraveyard;
@ -75,7 +75,7 @@ class ReturnUponTheTideEffect extends OneShotEffect {
return false; return false;
} }
if (permanent.hasSubtype(SubType.ELF, game)) { if (permanent.hasSubtype(SubType.ELF, game)) {
new ElfToken().putOntoBattlefield(2, game, source, player.getId()); new ElfWarriorToken().putOntoBattlefield(2, game, source, player.getId());
} }
return true; return true;
} }

View file

@ -14,7 +14,7 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID; import java.util.UUID;
@ -41,7 +41,7 @@ public final class SkemfarElderhall extends CardImpl {
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
ability.addEffect(new CreateTokenEffect(new ElfToken(), 2)); ability.addEffect(new CreateTokenEffect(new ElfWarriorToken(), 2));
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false)); ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
@ -11,15 +9,16 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.game.permanent.token.SylvanOfferingTreefolkToken; import mage.game.permanent.token.SylvanOfferingTreefolkToken;
import mage.players.Player; import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class SylvanOffering extends CardImpl { public final class SylvanOffering extends CardImpl {
@ -105,7 +104,7 @@ class SylvanOfferingEffect2 extends OneShotEffect {
Player opponent = game.getPlayer(target.getFirstTarget()); Player opponent = game.getPlayer(target.getFirstTarget());
if (opponent != null) { if (opponent != null) {
int xValue = source.getManaCostsToPay().getX(); int xValue = source.getManaCostsToPay().getX();
Effect effect = new CreateTokenTargetEffect(new ElfToken(), xValue); Effect effect = new CreateTokenTargetEffect(new ElfWarriorToken(), xValue);
effect.setTargetPointer(new FixedTarget(controller.getId())); effect.setTargetPointer(new FixedTarget(controller.getId()));
effect.apply(game, source); effect.apply(game, source);
effect.setTargetPointer(new FixedTarget(opponent.getId())); effect.setTargetPointer(new FixedTarget(opponent.getId()));

View file

@ -1,22 +1,22 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BecomesTargetTriggeredAbility; import mage.abilities.common.BecomesTargetTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.constants.SubType;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID;
/** /**
*
* @author TheElk801 * @author TheElk801
*/ */
public final class ThornLieutenant extends CardImpl { public final class ThornLieutenant extends CardImpl {
@ -31,7 +31,7 @@ public final class ThornLieutenant extends CardImpl {
// Whenever Thorn Lieutenant becomes the target of a spell or ability an opponent controls, create a 1/1 green Elf Warrior creature token. // Whenever Thorn Lieutenant becomes the target of a spell or ability an opponent controls, create a 1/1 green Elf Warrior creature token.
this.addAbility(new BecomesTargetTriggeredAbility( this.addAbility(new BecomesTargetTriggeredAbility(
new CreateTokenEffect(new ElfToken()), new CreateTokenEffect(new ElfWarriorToken()),
StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS StaticFilters.FILTER_SPELL_OR_ABILITY_OPPONENTS
)); ));

View file

@ -1,7 +1,5 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility; import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
@ -14,20 +12,21 @@ import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlackManaAbility;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.game.command.emblems.TyvarKellEmblem; import mage.game.command.emblems.TyvarKellEmblem;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
*
* @author weirddan455 * @author weirddan455
*/ */
public final class TyvarKell extends CardImpl { public final class TyvarKell extends CardImpl {
@ -57,7 +56,7 @@ public final class TyvarKell extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// 0: Create a 1/1 green Elf Warrior creature token. // 0: Create a 1/1 green Elf Warrior creature token.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new ElfToken()), 0)); this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new ElfWarriorToken()), 0));
// 6: You get an emblem with "Whenever you cast an Elf spell, it gains haste until end of turn and you draw two cards." // 6: You get an emblem with "Whenever you cast an Elf spell, it gains haste until end of turn and you draw two cards."
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new TyvarKellEmblem()), -6)); this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new TyvarKellEmblem()), -6));

View file

@ -17,7 +17,7 @@ import mage.filter.FilterPermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.ElfToken; import mage.game.permanent.token.ElfWarriorToken;
import java.util.UUID; import java.util.UUID;
@ -42,7 +42,7 @@ public final class WolverineRiders extends CardImpl {
// At the beginning of each upkeep, create a 1/1 green Elf Warrior creature token. // At the beginning of each upkeep, create a 1/1 green Elf Warrior creature token.
this.addAbility(new BeginningOfUpkeepTriggeredAbility( this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new CreateTokenEffect(new ElfToken()), TargetController.EACH_PLAYER, false new CreateTokenEffect(new ElfWarriorToken()), TargetController.EACH_PLAYER, false
)); ));
// Whenever another Elf enters the battlefield under your control, you gain life equal to its toughness. // Whenever another Elf enters the battlefield under your control, you gain life equal to its toughness.

View file

@ -1,6 +1,5 @@
package mage.game.command.emblems; package mage.game.command.emblems;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.AsThoughEffectImpl;
@ -14,18 +13,17 @@ import mage.game.Game;
import mage.game.command.Emblem; import mage.game.command.Emblem;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class TibaltCosmicImposterEmblem extends Emblem { 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." // 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() { public TibaltCosmicImposterEmblem() {
setName("Emblem Tibalt Cosmic Imposter"); setName("Emblem Tibalt");
this.setExpansionSetCodeForImage("KHM"); this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new TibaltCosmicImposterPlayFromExileEffect()));
Ability ability = new SimpleStaticAbility(Zone.COMMAND, new TibaltCosmicImposterPlayFromExileEffect());
this.getAbilities().add(ability);
} }
} }

View file

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

View file

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

View file

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

View file

@ -5,35 +5,24 @@ import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
/** /**
* @author LoneFox * @author LoneFox
*/ */
public final class DragonToken2 extends TokenImpl { 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() { public DragonToken2() {
this((String) null);
}
public DragonToken2(String setCode) {
super("Dragon", "5/5 red Dragon creature token with flying"); super("Dragon", "5/5 red Dragon creature token with flying");
availableImageSetCodes = tokenImageSets;
setOriginalExpansionSetCode(setCode);
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
color.setRed(true); color.setRed(true);
subtype.add(SubType.DRAGON); subtype.add(SubType.DRAGON);
power = new MageInt(5); power = new MageInt(5);
toughness = new MageInt(5); toughness = new MageInt(5);
addAbility(FlyingAbility.getInstance()); addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("10E", "BFZ", "C15", "C19", "CMA", "CMD", "ONS", "ROE", "SCG", "WWK", "M19", "KHM");
} }
public DragonToken2(final DragonToken2 token) { public DragonToken2(final DragonToken2 token) {
@ -43,4 +32,13 @@ public final class DragonToken2 extends TokenImpl {
public DragonToken2 copy() { public DragonToken2 copy() {
return new DragonToken2(this); 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.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import java.util.Arrays;
public final class DwarfBerserkerToken extends TokenImpl { public final class DwarfBerserkerToken extends TokenImpl {
public DwarfBerserkerToken() { public DwarfBerserkerToken() {
@ -14,6 +16,8 @@ public final class DwarfBerserkerToken extends TokenImpl {
subtype.add(SubType.BERSERKER); subtype.add(SubType.BERSERKER);
power = new MageInt(2); power = new MageInt(2);
toughness = new MageInt(1); toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("KHM");
} }
public DwarfBerserkerToken(final DwarfBerserkerToken token) { public DwarfBerserkerToken(final DwarfBerserkerToken token) {

View file

@ -9,9 +9,9 @@ import java.util.Arrays;
/** /**
* @author Loki * @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"); super("Elf Warrior", "1/1 green Elf Warrior creature token");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
color.setGreen(true); color.setGreen(true);
@ -20,16 +20,16 @@ public final class ElfToken extends TokenImpl {
power = new MageInt(1); power = new MageInt(1);
toughness = 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); super(token);
} }
@Override @Override
public ElfToken copy() { public ElfWarriorToken copy() {
return new ElfToken(this); return new ElfWarriorToken(this);
} }
@Override @Override

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -4,6 +4,8 @@ import mage.abilities.mana.AnyColorManaAbility;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SuperType; import mage.constants.SuperType;
import java.util.Arrays;
/** /**
* @author TheElk801 * @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.\""); super("Replicated Ring", "colorless snow artifact token named Replicated Ring with \"{T}: Add one mana of any color.\"");
this.addSuperType(SuperType.SNOW); this.addSuperType(SuperType.SNOW);
cardType.add(CardType.ARTIFACT); cardType.add(CardType.ARTIFACT);
this.addAbility(new AnyColorManaAbility()); 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.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import java.util.Arrays;
/** /**
* @author TheElk801 * @author TheElk801
*/ */
@ -17,7 +19,10 @@ public final class ShapeshifterBlueToken extends TokenImpl {
color.setBlue(true); color.setBlue(true);
power = new MageInt(2); power = new MageInt(2);
toughness = new MageInt(2); toughness = new MageInt(2);
addAbility(new ChangelingAbility()); addAbility(new ChangelingAbility());
availableImageSetCodes = Arrays.asList("KHM");
} }
private ShapeshifterBlueToken(final ShapeshifterBlueToken token) { private ShapeshifterBlueToken(final ShapeshifterBlueToken token) {

View file

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

View file

@ -23,7 +23,7 @@ public final class SpiritWhiteToken extends TokenImpl {
addAbility(FlyingAbility.getInstance()); addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("AVR", "C14", "CNS", "DDC", "DDK", "FRF", "ISD", "KTK", "M15", "MM2", "SHM", 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 @Override

View file

@ -29,7 +29,7 @@ public final class TreasureToken extends TokenImpl {
ability.addCost(new SacrificeSourceCost()); ability.addCost(new SacrificeSourceCost());
this.addAbility(ability); 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) { public TreasureToken(final TreasureToken token) {

View file

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

View file

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