[KHC] added tokens and download support;

This commit is contained in:
Oleg Agafonov 2021-02-06 20:54:32 +04:00
parent f7bc745f10
commit 03952ae0d6
19 changed files with 121 additions and 113 deletions

View file

@ -520,6 +520,16 @@ public class ScryfallImageSupportTokens {
put("KHM/Emblem Tibalt Cosmic Imposter", "https://api.scryfall.com/cards/tkhm/21/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"); put("KHM/Emblem Tyvar Kell", "https://api.scryfall.com/cards/tkhm/22/en?format=image");
// TKHC
put("KHC/Bird", "https://api.scryfall.com/cards/tkhc/1/en?format=image");
put("KHC/Boar", "https://api.scryfall.com/cards/tkhc/5/en?format=image");
put("KHC/Elemental", "https://api.scryfall.com/cards/tkhc/6/en?format=image");
put("KHC/Kithkin Soldier", "https://api.scryfall.com/cards/tkhc/2/en?format=image");
put("KHC/Pegasus", "https://api.scryfall.com/cards/tkhc/3/en?format=image");
put("KHC/Servo", "https://api.scryfall.com/cards/tkhc/7/en?format=image");
put("KHC/Soldier", "https://api.scryfall.com/cards/tkhc/4/en?format=image");
put("KHC/Thopter", "https://api.scryfall.com/cards/tkhc/8/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

@ -448,7 +448,7 @@
|Generate|TOK:C14|Elf Druid|||LlanowarElvesToken| |Generate|TOK:C14|Elf Druid|||LlanowarElvesToken|
|Generate|TOK:CMA|Elf Warrior|| |Generate|TOK:CMA|Elf Warrior||
|Generate|TOK:CMA|Gargoyle|||GargoyleToken| |Generate|TOK:CMA|Gargoyle|||GargoyleToken|
|Generate|TOK:CMA|Kithkin Soldier|||KithkinToken| |Generate|TOK:CMA|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:CMA|Knight|||KnightToken| |Generate|TOK:CMA|Knight|||KnightToken|
|Generate|TOK:CMA|Saproling|||SaprolingToken| |Generate|TOK:CMA|Saproling|||SaprolingToken|
|Generate|TOK:CMA|Spirit|||SpiritWhiteToken| |Generate|TOK:CMA|Spirit|||SpiritWhiteToken|
@ -462,7 +462,7 @@
|Generate|TOK:CMD|Elemental|||CallTheSkyBreakerElementalToken| |Generate|TOK:CMD|Elemental|||CallTheSkyBreakerElementalToken|
|Generate|TOK:CMD|Elephant|||ElephantToken| |Generate|TOK:CMD|Elephant|||ElephantToken|
|Generate|TOK:CMD|Insect|||InsectToken| |Generate|TOK:CMD|Insect|||InsectToken|
|Generate|TOK:CMD|Kithkin Soldier|||KithkinToken| |Generate|TOK:CMD|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:CMD|Pegasus|||PegasusToken| |Generate|TOK:CMD|Pegasus|||PegasusToken|
|Generate|TOK:CMD|Saproling|||SaprolingToken| |Generate|TOK:CMD|Saproling|||SaprolingToken|
|Generate|TOK:CMD|Snake|||SnakeToken| |Generate|TOK:CMD|Snake|||SnakeToken|
@ -659,7 +659,7 @@
|Generate|TOK:EVE|Elemental|||CallTheSkyBreakerElementalToken| |Generate|TOK:EVE|Elemental|||CallTheSkyBreakerElementalToken|
|Generate|TOK:EVE|Goat|||GoatToken| |Generate|TOK:EVE|Goat|||GoatToken|
|Generate|TOK:EVE|Goblin Soldier|||GoblinTrenchesToken| |Generate|TOK:EVE|Goblin Soldier|||GoblinTrenchesToken|
|Generate|TOK:EVE|Kithkin Soldier|||KithkinToken| |Generate|TOK:EVE|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:EVE|Spirit|||BeckonApparitionToken| |Generate|TOK:EVE|Spirit|||BeckonApparitionToken|
|Generate|TOK:EVE|Wolf|||WolfToken| |Generate|TOK:EVE|Wolf|||WolfToken|
|Generate|TOK:EVE|Worm|||WormHarvestToken| |Generate|TOK:EVE|Worm|||WormHarvestToken|
@ -684,7 +684,7 @@
|Generate|TOK:FUT|Elf Druid|||FreyaliseLlanowarsFuryToken| |Generate|TOK:FUT|Elf Druid|||FreyaliseLlanowarsFuryToken|
|Generate|TOK:FUT|Elf Druid|||LlanowarElvesToken| |Generate|TOK:FUT|Elf Druid|||LlanowarElvesToken|
|Generate|TOK:FUT|Giant|||GiantToken| |Generate|TOK:FUT|Giant|||GiantToken|
|Generate|TOK:FUT|Kithkin Soldier|||KithkinToken| |Generate|TOK:FUT|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:FUT|Saproling|||SaprolingToken| |Generate|TOK:FUT|Saproling|||SaprolingToken|
|Generate|TOK:FUT|Sliver|||SliversmithToken| |Generate|TOK:FUT|Sliver|||SliversmithToken|
|Generate|TOK:FUT|Soldier|||SoldierToken| |Generate|TOK:FUT|Soldier|||SoldierToken|
@ -803,7 +803,7 @@
|Generate|TOK:LRW|Elemental|2||WhiteElementalToken| |Generate|TOK:LRW|Elemental|2||WhiteElementalToken|
|Generate|TOK:LRW|Elf Warrior|||ElfWarriorToken| |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|||KithkinSoldierToken|
|Generate|TOK:LRW|Merfolk Wizard|| |Generate|TOK:LRW|Merfolk Wizard||
|Generate|TOK:LRW|Shapeshifter|||CribSwapShapeshifterWhiteToken| |Generate|TOK:LRW|Shapeshifter|||CribSwapShapeshifterWhiteToken|
|Generate|TOK:LRW|Wolf|||WolfToken| |Generate|TOK:LRW|Wolf|||WolfToken|
@ -939,7 +939,7 @@
|Generate|TOK:MMA|Goblin Rogue|||GoblinRogueToken| |Generate|TOK:MMA|Goblin Rogue|||GoblinRogueToken|
|Generate|TOK:MMA|Goblin|||GoblinToken| |Generate|TOK:MMA|Goblin|||GoblinToken|
|Generate|TOK:MMA|Illusion|||MelokuTheCloudedMirrorToken| |Generate|TOK:MMA|Illusion|||MelokuTheCloudedMirrorToken|
|Generate|TOK:MMA|Kithkin Soldier|||KithkinToken| |Generate|TOK:MMA|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:MMA|Saproling|||SaprolingToken| |Generate|TOK:MMA|Saproling|||SaprolingToken|
|Generate|TOK:MMA|Soldier|||SoldierToken| |Generate|TOK:MMA|Soldier|||SoldierToken|
|Generate|TOK:MMA|Spider|||PenumbraSpiderToken| |Generate|TOK:MMA|Spider|||PenumbraSpiderToken|
@ -959,7 +959,7 @@
|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|
|Generate|TOK:MOR|Kithkin Soldier|||KithkinToken| |Generate|TOK:MOR|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:MOR|Treefolk Shaman|||TreefolkShamanToken| |Generate|TOK:MOR|Treefolk Shaman|||TreefolkShamanToken|
|Generate|TOK:MOR|Wolf|||WolfToken| |Generate|TOK:MOR|Wolf|||WolfToken|
|Generate|TOK:MRD|Beast|||OneDozenEyesBeastToken| |Generate|TOK:MRD|Beast|||OneDozenEyesBeastToken|
@ -1092,7 +1092,7 @@
|Generate|TOK:SHM|Faerie Rogue|||OonaQueenFaerieToken| |Generate|TOK:SHM|Faerie Rogue|||OonaQueenFaerieToken|
|Generate|TOK:SHM|Giant Warrior|||GiantBaitingGiantWarriorToken| |Generate|TOK:SHM|Giant Warrior|||GiantBaitingGiantWarriorToken|
|Generate|TOK:SHM|Goblin Warrior|||WortTheRaidmotherToken| |Generate|TOK:SHM|Goblin Warrior|||WortTheRaidmotherToken|
|Generate|TOK:SHM|Kithkin Soldier|||KithkinToken| |Generate|TOK:SHM|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:SHM|Rat|||RatToken| |Generate|TOK:SHM|Rat|||RatToken|
|Generate|TOK:SHM|Spider|||SpiderToken| |Generate|TOK:SHM|Spider|||SpiderToken|
|Generate|TOK:SHM|Spirit|||SpiritWhiteToken| |Generate|TOK:SHM|Spirit|||SpiritWhiteToken|
@ -1144,7 +1144,7 @@
|Generate|TOK:SWS|Tusken Raider|||TuskenRaiderToken| |Generate|TOK:SWS|Tusken Raider|||TuskenRaiderToken|
|Generate|TOK:SWS|Droid|||DroidToken| |Generate|TOK:SWS|Droid|||DroidToken|
|Generate|TOK:THS|Bird|||SwanSongBirdToken| |Generate|TOK:THS|Bird|||SwanSongBirdToken|
|Generate|TOK:THS|Boar|||CurseOfTheSwineBoarToken| |Generate|TOK:THS|Boar|||Boar2Token|
|Generate|TOK:THS|Cleric|||HeliodGodOfTheSunToken| |Generate|TOK:THS|Cleric|||HeliodGodOfTheSunToken|
|Generate|TOK:THS|Elemental|||MasterOfWavesElementalToken| |Generate|TOK:THS|Elemental|||MasterOfWavesElementalToken|
|Generate|TOK:THS|Golem|||HammerOfPurphorosGolemToken| |Generate|TOK:THS|Golem|||HammerOfPurphorosGolemToken|
@ -1503,3 +1503,13 @@
|Generate|TOK:KHM|Treasure|||TreasureToken| |Generate|TOK:KHM|Treasure|||TreasureToken|
|Generate|TOK:KHM|Troll Warrior|||TrollWarriorToken| |Generate|TOK:KHM|Troll Warrior|||TrollWarriorToken|
|Generate|TOK:KHM|Zombie Berserker|||ZombieBerserkerToken| |Generate|TOK:KHM|Zombie Berserker|||ZombieBerserkerToken|
# KHC
|Generate|TOK:KHC|Bird|||BirdToken|
|Generate|TOK:KHC|Boar|||Boar2Token|
|Generate|TOK:KHC|Elemental|||VoiceOfTheWoodsElementalToken|
|Generate|TOK:KHC|Kithkin Soldier|||KithkinSoldierToken|
|Generate|TOK:KHC|Pegasus|||PegasusToken|
|Generate|TOK:KHC|Servo|||ServoToken|
|Generate|TOK:KHC|Soldier|||SoldierToken|
|Generate|TOK:KHC|Thopter|||ThopterColorlessToken|

View file

@ -1,25 +1,24 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.RetraceAbility; import mage.abilities.keyword.RetraceAbility;
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.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import java.util.UUID;
/** /**
*
* @author Plopman * @author Plopman
*/ */
public final class CennsEnlistment extends CardImpl { public final class CennsEnlistment extends CardImpl {
public CennsEnlistment(UUID ownerId, CardSetInfo setInfo) { public CennsEnlistment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{W}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}");
// Create two 1/1 white Kithkin Soldier creature tokens. // Create two 1/1 white Kithkin Soldier creature tokens.
this.getSpellAbility().addEffect(new CreateTokenEffect(new KithkinToken(), 2)); this.getSpellAbility().addEffect(new CreateTokenEffect(new KithkinSoldierToken(), 2));
// Retrace // Retrace
this.addAbility(new RetraceAbility(this)); this.addAbility(new RetraceAbility(this));

View file

@ -1,7 +1,5 @@
package mage.cards.c; package mage.cards.c;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -21,11 +19,12 @@ import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.TappedPredicate; import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class CloudgoatRanger extends CardImpl { public final class CloudgoatRanger extends CardImpl {
@ -38,7 +37,7 @@ public final class CloudgoatRanger extends CardImpl {
} }
public CloudgoatRanger(UUID ownerId, CardSetInfo setInfo) { public CloudgoatRanger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
this.subtype.add(SubType.GIANT); this.subtype.add(SubType.GIANT);
this.subtype.add(SubType.WARRIOR); this.subtype.add(SubType.WARRIOR);
@ -46,8 +45,9 @@ public final class CloudgoatRanger extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// When Cloudgoat Ranger enters the battlefield, create three 1/1 white Kithkin Soldier creature tokens. // When Cloudgoat Ranger enters the battlefield, create three 1/1 white Kithkin Soldier creature tokens.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinToken(), 3), false)); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinSoldierToken(), 3), false));
//Tap three untapped Kithkin you control: Cloudgoat Ranger gets +2/+0 and gains flying until end of turn.
// Tap three untapped Kithkin you control: Cloudgoat Ranger gets +2/+0 and gains flying until end of turn.
Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn); Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn);
effect.setText("{this} gets +2/+0"); effect.setText("{this} gets +2/+0");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledPermanent(3, 3, filter, false))); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledPermanent(3, 3, filter, false)));

View file

@ -9,7 +9,7 @@ import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.CurseOfTheSwineBoarToken; import mage.game.permanent.token.Boar2Token;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.targetadjustment.TargetAdjuster; import mage.target.targetadjustment.TargetAdjuster;
@ -85,7 +85,7 @@ class CurseOfTheSwineEffect extends OneShotEffect {
} }
} }
} }
CurseOfTheSwineBoarToken swineToken = new CurseOfTheSwineBoarToken(); Boar2Token swineToken = new Boar2Token();
for (Map.Entry<UUID, Integer> exiledByController : playersWithTargets.entrySet()) { for (Map.Entry<UUID, Integer> exiledByController : playersWithTargets.entrySet()) {
swineToken.putOntoBattlefield(exiledByController.getValue(), game, source, exiledByController.getKey()); swineToken.putOntoBattlefield(exiledByController.getValue(), game, source, exiledByController.getKey());
} }

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -17,11 +15,12 @@ import mage.constants.ColoredManaSymbol;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/** /**
*
* @author Loki * @author Loki
*/ */
public final class GuardianOfCloverdell extends CardImpl { public final class GuardianOfCloverdell extends CardImpl {
@ -33,13 +32,13 @@ public final class GuardianOfCloverdell extends CardImpl {
} }
public GuardianOfCloverdell(UUID ownerId, CardSetInfo setInfo) { public GuardianOfCloverdell(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
this.subtype.add(SubType.TREEFOLK); this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinToken(), 3), false)); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinSoldierToken(), 3), false));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ColoredManaCost(ColoredManaSymbol.G)); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ColoredManaCost(ColoredManaSymbol.G));
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,7 +1,5 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -16,13 +14,13 @@ import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterLandPermanent; import mage.filter.common.FilterLandPermanent;
import mage.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*
*/ */
public final class GwyllionHedgeMage extends CardImpl { public final class GwyllionHedgeMage extends CardImpl {
@ -38,7 +36,7 @@ public final class GwyllionHedgeMage extends CardImpl {
private static final String rule2 = "When {this} enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature."; private static final String rule2 = "When {this} enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature.";
public GwyllionHedgeMage(UUID ownerId, CardSetInfo setInfo) { public GwyllionHedgeMage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W/B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W/B}");
this.subtype.add(SubType.HAG); this.subtype.add(SubType.HAG);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
@ -46,7 +44,7 @@ public final class GwyllionHedgeMage extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Plains, you may create a 1/1 white Kithkin Soldier creature token. // When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Plains, you may create a 1/1 white Kithkin Soldier creature token.
Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinToken()), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1); Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new KithkinSoldierToken()), true), new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1), rule1);
this.addAbility(ability); this.addAbility(ability);
// When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature. // When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature.

View file

@ -1,7 +1,5 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility; import mage.abilities.common.DiesSourceTriggeredAbility;
@ -20,10 +18,11 @@ import mage.counters.CounterType;
import mage.filter.common.FilterControlledPermanent; import mage.filter.common.FilterControlledPermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import java.util.UUID;
/** /**
*
* @author LoneFox * @author LoneFox
*/ */
public final class KinsbaileBorderguard extends CardImpl { public final class KinsbaileBorderguard extends CardImpl {
@ -35,7 +34,7 @@ public final class KinsbaileBorderguard extends CardImpl {
} }
public KinsbaileBorderguard(UUID ownerId, CardSetInfo setInfo) { public KinsbaileBorderguard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}");
this.subtype.add(SubType.KITHKIN); this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(1); this.power = new MageInt(1);
@ -45,7 +44,7 @@ public final class KinsbaileBorderguard extends CardImpl {
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(0),
new PermanentsOnBattlefieldCount(filter), true), "with a +1/+1 counter on it for each other Kithkin you control")); new PermanentsOnBattlefieldCount(filter), true), "with a +1/+1 counter on it for each other Kithkin you control"));
// When Kinsbaile Borderguard dies, create a 1/1 white Kithkin Soldier creature token for each counter on it. // When Kinsbaile Borderguard dies, create a 1/1 white Kithkin Soldier creature token for each counter on it.
this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new KithkinToken(), new AllCountersCount()))); this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new KithkinSoldierToken(), new AllCountersCount())));
} }
private KinsbaileBorderguard(final KinsbaileBorderguard card) { private KinsbaileBorderguard(final KinsbaileBorderguard card) {
@ -63,9 +62,9 @@ class AllCountersCount implements DynamicValue {
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId());
if(sourcePermanent != null) { if (sourcePermanent != null) {
int total = 0; int total = 0;
for(Counter counter : sourcePermanent.getCounters(game).values()) { for (Counter counter : sourcePermanent.getCounters(game).values()) {
total += counter.getCount(); total += counter.getCount();
} }
return total; return total;

View file

@ -1,7 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
@ -16,18 +14,18 @@ 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.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.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import java.util.UUID;
/** /**
*
* @author Styxo * @author Styxo
*/ */
public final class MilitiasPride extends CardImpl { public final class MilitiasPride extends CardImpl {
public MilitiasPride(UUID ownerId, CardSetInfo setInfo) { public MilitiasPride(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ENCHANTMENT},"{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ENCHANTMENT}, "{1}{W}");
this.subtype.add(SubType.KITHKIN); this.subtype.add(SubType.KITHKIN);
// Whenever a creature you control attacks, you may pay {W}. If you do create a 1/1 white Kithkin Soldier creature token in play tapped and attacking // Whenever a creature you control attacks, you may pay {W}. If you do create a 1/1 white Kithkin Soldier creature token in play tapped and attacking
@ -48,7 +46,7 @@ public final class MilitiasPride extends CardImpl {
class MilitiasPrideTriggerAbility extends TriggeredAbilityImpl { class MilitiasPrideTriggerAbility extends TriggeredAbilityImpl {
public MilitiasPrideTriggerAbility() { public MilitiasPrideTriggerAbility() {
super(Zone.BATTLEFIELD, new DoIfCostPaid(new CreateTokenEffect(new KithkinToken(), 1, true, true), new ManaCostsImpl("{W}"))); super(Zone.BATTLEFIELD, new DoIfCostPaid(new CreateTokenEffect(new KithkinSoldierToken(), 1, true, true), new ManaCostsImpl("{W}")));
} }
public MilitiasPrideTriggerAbility(final MilitiasPrideTriggerAbility ability) { public MilitiasPrideTriggerAbility(final MilitiasPrideTriggerAbility ability) {

View file

@ -1,7 +1,5 @@
package mage.cards.p; package mage.cards.p;
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;
@ -13,16 +11,17 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class PatrolSignaler extends CardImpl { public final class PatrolSignaler extends CardImpl {
public PatrolSignaler(UUID ownerId, CardSetInfo setInfo) { public PatrolSignaler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.KITHKIN); this.subtype.add(SubType.KITHKIN);
this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.SOLDIER);
@ -30,7 +29,7 @@ public final class PatrolSignaler extends CardImpl {
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
// {1}{W}, {untap}: Create a 1/1 white Kithkin Soldier creature token. // {1}{W}, {untap}: Create a 1/1 white Kithkin Soldier creature token.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new KithkinToken()), new ManaCostsImpl("{1}{W}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new KithkinSoldierToken()), new ManaCostsImpl("{1}{W}"));
ability.addCost(new UntapSourceCost()); ability.addCost(new UntapSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,5 @@
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.abilities.condition.common.ManaWasSpentCondition; import mage.abilities.condition.common.ManaWasSpentCondition;
import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.common.CounterTargetEffect;
@ -12,25 +10,26 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.filter.common.FilterCreatureSpell; import mage.filter.common.FilterCreatureSpell;
import mage.game.permanent.token.KithkinToken; import mage.game.permanent.token.KithkinSoldierToken;
import mage.target.TargetSpell; import mage.target.TargetSpell;
import mage.watchers.common.ManaSpentToCastWatcher; import mage.watchers.common.ManaSpentToCastWatcher;
import java.util.UUID;
/** /**
*
* @author jeffwadsworth * @author jeffwadsworth
*/ */
public final class RepelIntruders extends CardImpl { public final class RepelIntruders extends CardImpl {
public RepelIntruders(UUID ownerId, CardSetInfo setInfo) { public RepelIntruders(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W/U}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W/U}");
// Create two 1/1 white Kithkin Soldier creature tokens if {W} was spent to cast Repel Intruders. Counter up to one target creature spell if {U} was spent to cast Repel Intruders. // Create two 1/1 white Kithkin Soldier creature tokens if {W} was spent to cast Repel Intruders. Counter up to one target creature spell if {U} was spent to cast Repel Intruders.
TargetSpell target = new TargetSpell(0,1, new FilterCreatureSpell()); TargetSpell target = new TargetSpell(0, 1, new FilterCreatureSpell());
target.setRequired(false); target.setRequired(false);
this.getSpellAbility().addEffect(new ConditionalOneShotEffect( this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new CreateTokenEffect(new KithkinToken(), 2), new CreateTokenEffect(new KithkinSoldierToken(), 2),
new ManaWasSpentCondition(ColoredManaSymbol.W), "Create two 1/1 white Kithkin Soldier creature tokens if {W} was spent to cast this spell")); new ManaWasSpentCondition(ColoredManaSymbol.W), "Create two 1/1 white Kithkin Soldier creature tokens if {W} was spent to cast this spell"));
this.getSpellAbility().addEffect(new ConditionalOneShotEffect( this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
new CounterTargetEffect(), new CounterTargetEffect(),

View file

@ -20,9 +20,10 @@ public final class BirdToken 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);
addAbility(FlyingAbility.getInstance()); addAbility(FlyingAbility.getInstance());
availableImageSetCodes.addAll(Arrays.asList("BNG", "CSP", "DGM", "JUD", "MM3", "RTR", "VMA", "ZEN", "MH1", "C20", "M21", "ZNC")); availableImageSetCodes.addAll(Arrays.asList("BNG", "CSP", "DGM", "JUD", "MM3", "RTR", "VMA", "ZEN", "MH1", "C20", "M21", "ZNC", "KHC"));
} }
public BirdToken(final BirdToken token) { public BirdToken(final BirdToken token) {

View file

@ -1,32 +1,33 @@
package mage.game.permanent.token; package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.MageInt;
import java.util.Arrays;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public final class CurseOfTheSwineBoarToken extends TokenImpl { public final class Boar2Token extends TokenImpl {
public CurseOfTheSwineBoarToken() { public Boar2Token() {
super("Boar", "2/2 green Boar creature token"); super("Boar", "2/2 green Boar creature token");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
color.setGreen(true); color.setGreen(true);
subtype.add(SubType.BOAR); subtype.add(SubType.BOAR);
power = new MageInt(2); power = new MageInt(2);
toughness = new MageInt(2); toughness = new MageInt(2);
availableImageSetCodes = Arrays.asList("THS", "KHC");
} }
public CurseOfTheSwineBoarToken(final CurseOfTheSwineBoarToken token) { public Boar2Token(final Boar2Token token) {
super(token); super(token);
} }
public CurseOfTheSwineBoarToken copy() { public Boar2Token copy() {
return new CurseOfTheSwineBoarToken(this); return new Boar2Token(this);
} }
} }

View file

@ -1,17 +1,17 @@
package mage.game.permanent.token; package mage.game.permanent.token;
import java.util.Arrays;
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 Loki * @author Loki
*/ */
public final class KithkinToken extends TokenImpl { public final class KithkinSoldierToken extends TokenImpl {
public KithkinToken() { public KithkinSoldierToken() {
super("Kithkin Soldier", "1/1 white Kithkin Soldier creature token"); super("Kithkin Soldier", "1/1 white Kithkin Soldier creature token");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
color.setWhite(true); color.setWhite(true);
@ -19,14 +19,15 @@ public final class KithkinToken extends TokenImpl {
subtype.add(SubType.SOLDIER); subtype.add(SubType.SOLDIER);
power = new MageInt(1); power = new MageInt(1);
toughness = new MageInt(1); toughness = new MageInt(1);
availableImageSetCodes.addAll(Arrays.asList("LRW", "SHM", "MMA"));
availableImageSetCodes = Arrays.asList("CMD", "EVE", "FUT", "LRW", "MMA", "MOR", "SHM", "MMA", "KHC");
} }
public KithkinToken(final KithkinToken token) { public KithkinSoldierToken(final KithkinSoldierToken token) {
super(token); super(token);
} }
public KithkinToken copy() { public KithkinSoldierToken copy() {
return new KithkinToken(this); return new KithkinSoldierToken(this);
} }
} }

View file

@ -1,14 +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 LoneFox * @author LoneFox
*/ */
public final class PegasusToken extends TokenImpl { public final class PegasusToken extends TokenImpl {
@ -20,8 +19,10 @@ public final class PegasusToken extends TokenImpl {
subtype.add(SubType.PEGASUS); subtype.add(SubType.PEGASUS);
power = new MageInt(1); power = new MageInt(1);
toughness = new MageInt(1); toughness = new MageInt(1);
addAbility(FlyingAbility.getInstance()); addAbility(FlyingAbility.getInstance());
setOriginalExpansionSetCode("C14");
availableImageSetCodes = Arrays.asList("C14", "C19", "CMD", "EXO", "GPT", "MIR", "TMP", "TPR", "TSP", "THB", "KHC");
} }
public PegasusToken(final PegasusToken token) { public PegasusToken(final PegasusToken token) {

View file

@ -1,40 +1,32 @@
package mage.game.permanent.token; package mage.game.permanent.token;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import mage.MageInt; import mage.MageInt;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.util.RandomUtil; import mage.util.RandomUtil;
import java.util.Arrays;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public final class ServoToken extends TokenImpl { public final class ServoToken extends TokenImpl {
static final private List<String> tokenImageSets = new ArrayList<>();
static {
tokenImageSets.addAll(Collections.singletonList("KLD"));
tokenImageSets.addAll(Collections.singletonList("WAR"));
}
public ServoToken() { public ServoToken() {
super("Servo", "1/1 colorless Servo artifact creature token"); super("Servo", "1/1 colorless Servo artifact creature token");
availableImageSetCodes = tokenImageSets;
cardType.add(CardType.ARTIFACT); cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
subtype.add(SubType.SERVO); subtype.add(SubType.SERVO);
power = new MageInt(1); power = new MageInt(1);
toughness = new MageInt(1); toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("C18", "KLD", "WAR", "KHC");
} }
@Override @Override
public void setExpansionSetCodeForImage(String code) { public void setExpansionSetCodeForImage(String code) {
super.setExpansionSetCodeForImage(code); super.setExpansionSetCodeForImage(code);
if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("KLD")) { if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("KLD")) {
this.setTokenType(RandomUtil.nextInt(3) + 1); this.setTokenType(RandomUtil.nextInt(3) + 1);
} }

View file

@ -21,7 +21,7 @@ public final class SoldierToken extends TokenImpl {
toughness = new MageInt(1); toughness = new MageInt(1);
availableImageSetCodes = Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13", "MM2", "MMA", "RTR", availableImageSetCodes = Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13", "MM2", "MMA", "RTR",
"SOM", "DDO", "M10", "ORI", "EMN", "EMA", "CN2", "C16", "MM3", "E01", "DOM", "MH1", "M20", "C20", "M21", "CMR"); "SOM", "DDO", "M10", "ORI", "EMN", "EMA", "CN2", "C16", "MM3", "E01", "DOM", "MH1", "M20", "C20", "M21", "CMR", "KHC");
} }
public SoldierToken(final SoldierToken token) { public SoldierToken(final SoldierToken token) {

View file

@ -23,7 +23,7 @@ public final class ThopterColorlessToken extends TokenImpl {
addAbility(FlyingAbility.getInstance()); addAbility(FlyingAbility.getInstance());
availableImageSetCodes = Arrays.asList("C18", "EXO", "KLD", "MBS", "ORI", "TPR", "VMA", "M19", "ZNC"); availableImageSetCodes = Arrays.asList("C18", "EXO", "KLD", "MBS", "ORI", "TPR", "VMA", "M19", "ZNC", "KHC");
} }
@Override @Override

View file

@ -1,20 +1,19 @@
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.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.Arrays;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public final class VoiceOfTheWoodsElementalToken extends TokenImpl { public final class VoiceOfTheWoodsElementalToken extends TokenImpl {
public VoiceOfTheWoodsElementalToken() { public VoiceOfTheWoodsElementalToken() {
super("Elemental", "7/7 green Elemental creature token with trample"); super("Elemental", "7/7 green Elemental creature token with trample");
this.setOriginalExpansionSetCode("EVG");
cardType.add(CardType.CREATURE); cardType.add(CardType.CREATURE);
subtype.add(SubType.ELEMENTAL); subtype.add(SubType.ELEMENTAL);
@ -23,6 +22,8 @@ public final class VoiceOfTheWoodsElementalToken extends TokenImpl {
toughness = new MageInt(7); toughness = new MageInt(7);
addAbility(TrampleAbility.getInstance()); addAbility(TrampleAbility.getInstance());
availableImageSetCodes.addAll(Arrays.asList("EVG", "KHC"));
} }
public VoiceOfTheWoodsElementalToken(final VoiceOfTheWoodsElementalToken token) { public VoiceOfTheWoodsElementalToken(final VoiceOfTheWoodsElementalToken token) {