From 03952ae0d6978dfb80551fac3ed6e653db2fe0bf Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 6 Feb 2021 20:54:32 +0400 Subject: [PATCH] [KHC] added tokens and download support; --- .../sources/ScryfallImageSupportTokens.java | 10 +++++++ .../src/main/resources/card-pictures-tok.txt | 30 ++++++++++++------- .../src/mage/cards/c/CennsEnlistment.java | 11 ++++--- .../src/mage/cards/c/CloudgoatRanger.java | 14 ++++----- .../src/mage/cards/c/CurseOfTheSwine.java | 4 +-- .../mage/cards/g/GuardianOfCloverdell.java | 11 ++++--- .../src/mage/cards/g/GwyllionHedgeMage.java | 12 ++++---- .../mage/cards/k/KinsbaileBorderguard.java | 17 +++++------ Mage.Sets/src/mage/cards/m/MilitiasPride.java | 12 ++++---- .../src/mage/cards/p/PatrolSignaler.java | 11 ++++--- .../src/mage/cards/r/RepelIntruders.java | 15 +++++----- .../mage/game/permanent/token/BirdToken.java | 3 +- ...TheSwineBoarToken.java => Boar2Token.java} | 19 ++++++------ ...kinToken.java => KithkinSoldierToken.java} | 17 ++++++----- .../game/permanent/token/PegasusToken.java | 13 ++++---- .../mage/game/permanent/token/ServoToken.java | 18 ++++------- .../game/permanent/token/SoldierToken.java | 2 +- .../token/ThopterColorlessToken.java | 2 +- .../token/VoiceOfTheWoodsElementalToken.java | 13 ++++---- 19 files changed, 121 insertions(+), 113 deletions(-) rename Mage/src/main/java/mage/game/permanent/token/{CurseOfTheSwineBoarToken.java => Boar2Token.java} (60%) rename Mage/src/main/java/mage/game/permanent/token/{KithkinToken.java => KithkinSoldierToken.java} (58%) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java index e5f6fa646e..bd7196c505 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java @@ -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 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 supportedSets.clear(); for (String cardName : this.keySet()) { diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 3cb0cc1465..56002e85b0 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -448,7 +448,7 @@ |Generate|TOK:C14|Elf Druid|||LlanowarElvesToken| |Generate|TOK:CMA|Elf Warrior|| |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|Saproling|||SaprolingToken| |Generate|TOK:CMA|Spirit|||SpiritWhiteToken| @@ -462,7 +462,7 @@ |Generate|TOK:CMD|Elemental|||CallTheSkyBreakerElementalToken| |Generate|TOK:CMD|Elephant|||ElephantToken| |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|Saproling|||SaprolingToken| |Generate|TOK:CMD|Snake|||SnakeToken| @@ -659,7 +659,7 @@ |Generate|TOK:EVE|Elemental|||CallTheSkyBreakerElementalToken| |Generate|TOK:EVE|Goat|||GoatToken| |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|Wolf|||WolfToken| |Generate|TOK:EVE|Worm|||WormHarvestToken| @@ -684,7 +684,7 @@ |Generate|TOK:FUT|Elf Druid|||FreyaliseLlanowarsFuryToken| |Generate|TOK:FUT|Elf Druid|||LlanowarElvesToken| |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|Sliver|||SliversmithToken| |Generate|TOK:FUT|Soldier|||SoldierToken| @@ -803,7 +803,7 @@ |Generate|TOK:LRW|Elemental|2||WhiteElementalToken| |Generate|TOK:LRW|Elf Warrior|||ElfWarriorToken| |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|Shapeshifter|||CribSwapShapeshifterWhiteToken| |Generate|TOK:LRW|Wolf|||WolfToken| @@ -939,7 +939,7 @@ |Generate|TOK:MMA|Goblin Rogue|||GoblinRogueToken| |Generate|TOK:MMA|Goblin|||GoblinToken| |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|Soldier|||SoldierToken| |Generate|TOK:MMA|Spider|||PenumbraSpiderToken| @@ -959,7 +959,7 @@ |Generate|TOK:MOR|Faerie Rogue|||FaerieRogueToken| |Generate|TOK:MOR|Giant Warrior|||GiantWarriorToken| |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|Wolf|||WolfToken| |Generate|TOK:MRD|Beast|||OneDozenEyesBeastToken| @@ -1092,7 +1092,7 @@ |Generate|TOK:SHM|Faerie Rogue|||OonaQueenFaerieToken| |Generate|TOK:SHM|Giant Warrior|||GiantBaitingGiantWarriorToken| |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|Spider|||SpiderToken| |Generate|TOK:SHM|Spirit|||SpiritWhiteToken| @@ -1144,7 +1144,7 @@ |Generate|TOK:SWS|Tusken Raider|||TuskenRaiderToken| |Generate|TOK:SWS|Droid|||DroidToken| |Generate|TOK:THS|Bird|||SwanSongBirdToken| -|Generate|TOK:THS|Boar|||CurseOfTheSwineBoarToken| +|Generate|TOK:THS|Boar|||Boar2Token| |Generate|TOK:THS|Cleric|||HeliodGodOfTheSunToken| |Generate|TOK:THS|Elemental|||MasterOfWavesElementalToken| |Generate|TOK:THS|Golem|||HammerOfPurphorosGolemToken| @@ -1502,4 +1502,14 @@ |Generate|TOK:KHM|Spirit|||SpiritWhiteToken| |Generate|TOK:KHM|Treasure|||TreasureToken| |Generate|TOK:KHM|Troll Warrior|||TrollWarriorToken| -|Generate|TOK:KHM|Zombie Berserker|||ZombieBerserkerToken| \ No newline at end of file +|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| \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/c/CennsEnlistment.java b/Mage.Sets/src/mage/cards/c/CennsEnlistment.java index a4aa1cf257..d3be772385 100644 --- a/Mage.Sets/src/mage/cards/c/CennsEnlistment.java +++ b/Mage.Sets/src/mage/cards/c/CennsEnlistment.java @@ -1,25 +1,24 @@ - package mage.cards.c; -import java.util.UUID; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.RetraceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; + +import java.util.UUID; /** - * * @author Plopman */ public final class CennsEnlistment extends CardImpl { 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. - this.getSpellAbility().addEffect(new CreateTokenEffect(new KithkinToken(), 2)); + this.getSpellAbility().addEffect(new CreateTokenEffect(new KithkinSoldierToken(), 2)); // Retrace this.addAbility(new RetraceAbility(this)); diff --git a/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java b/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java index 699e7d550f..7c5e922029 100644 --- a/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java +++ b/Mage.Sets/src/mage/cards/c/CloudgoatRanger.java @@ -1,7 +1,5 @@ - package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -21,11 +19,12 @@ import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TappedPredicate; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** - * * @author Loki */ public final class CloudgoatRanger extends CardImpl { @@ -38,7 +37,7 @@ public final class CloudgoatRanger extends CardImpl { } 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.WARRIOR); @@ -46,8 +45,9 @@ public final class CloudgoatRanger extends CardImpl { this.toughness = new MageInt(3); // 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)); - //Tap three untapped Kithkin you control: Cloudgoat Ranger gets +2/+0 and gains flying until end of turn. + 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. Effect effect = new BoostSourceEffect(2, 0, Duration.EndOfTurn); effect.setText("{this} gets +2/+0"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapTargetCost(new TargetControlledPermanent(3, 3, filter, false))); diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheSwine.java b/Mage.Sets/src/mage/cards/c/CurseOfTheSwine.java index d4aa9bb920..d9d389367e 100644 --- a/Mage.Sets/src/mage/cards/c/CurseOfTheSwine.java +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheSwine.java @@ -9,7 +9,7 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.game.permanent.token.CurseOfTheSwineBoarToken; +import mage.game.permanent.token.Boar2Token; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; import mage.target.targetadjustment.TargetAdjuster; @@ -85,7 +85,7 @@ class CurseOfTheSwineEffect extends OneShotEffect { } } } - CurseOfTheSwineBoarToken swineToken = new CurseOfTheSwineBoarToken(); + Boar2Token swineToken = new Boar2Token(); for (Map.Entry exiledByController : playersWithTargets.entrySet()) { swineToken.putOntoBattlefield(exiledByController.getValue(), game, source, exiledByController.getKey()); } diff --git a/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java b/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java index 40536e84bc..8430234bb1 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java +++ b/Mage.Sets/src/mage/cards/g/GuardianOfCloverdell.java @@ -1,7 +1,5 @@ - package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -17,11 +15,12 @@ import mage.constants.ColoredManaSymbol; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; import mage.target.common.TargetControlledPermanent; +import java.util.UUID; + /** - * * @author Loki */ public final class GuardianOfCloverdell extends CardImpl { @@ -33,13 +32,13 @@ public final class GuardianOfCloverdell extends CardImpl { } 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.SHAMAN); this.power = new MageInt(4); 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.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java b/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java index 3663ba8b22..4220ebbca6 100644 --- a/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java +++ b/Mage.Sets/src/mage/cards/g/GwyllionHedgeMage.java @@ -1,7 +1,5 @@ - package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -16,13 +14,13 @@ import mage.constants.ComparisonType; import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.common.FilterLandPermanent; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author jeffwadsworth - * */ 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."; 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.WIZARD); @@ -46,7 +44,7 @@ public final class GwyllionHedgeMage extends CardImpl { 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. - 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); // When Gwyllion Hedge-Mage enters the battlefield, if you control two or more Swamps, you may put a -1/-1 counter on target creature. diff --git a/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java b/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java index e8febc13f5..32f3a99026 100644 --- a/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java +++ b/Mage.Sets/src/mage/cards/k/KinsbaileBorderguard.java @@ -1,7 +1,5 @@ - package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesSourceTriggeredAbility; @@ -20,10 +18,11 @@ import mage.counters.CounterType; import mage.filter.common.FilterControlledPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; + +import java.util.UUID; /** - * * @author LoneFox */ public final class KinsbaileBorderguard extends CardImpl { @@ -35,7 +34,7 @@ public final class KinsbaileBorderguard extends CardImpl { } 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.SOLDIER); this.power = new MageInt(1); @@ -43,9 +42,9 @@ public final class KinsbaileBorderguard extends CardImpl { // Kinsbaile Borderguard enters the battlefield with a +1/+1 counter on it for each other Kithkin you control. 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. - 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) { @@ -63,9 +62,9 @@ class AllCountersCount implements DynamicValue { @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId()); - if(sourcePermanent != null) { + if (sourcePermanent != null) { int total = 0; - for(Counter counter : sourcePermanent.getCounters(game).values()) { + for (Counter counter : sourcePermanent.getCounters(game).values()) { total += counter.getCount(); } return total; diff --git a/Mage.Sets/src/mage/cards/m/MilitiasPride.java b/Mage.Sets/src/mage/cards/m/MilitiasPride.java index 5a261c23c8..6f238f0c5c 100644 --- a/Mage.Sets/src/mage/cards/m/MilitiasPride.java +++ b/Mage.Sets/src/mage/cards/m/MilitiasPride.java @@ -1,7 +1,5 @@ - package mage.cards.m; -import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; @@ -16,18 +14,18 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.TokenPredicate; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; + +import java.util.UUID; /** - * * @author Styxo */ public final class MilitiasPride extends CardImpl { 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); // 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 { 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) { diff --git a/Mage.Sets/src/mage/cards/p/PatrolSignaler.java b/Mage.Sets/src/mage/cards/p/PatrolSignaler.java index a49c8b6a04..6e84699085 100644 --- a/Mage.Sets/src/mage/cards/p/PatrolSignaler.java +++ b/Mage.Sets/src/mage/cards/p/PatrolSignaler.java @@ -1,7 +1,5 @@ - package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -13,16 +11,17 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; + +import java.util.UUID; /** - * * @author jeffwadsworth */ public final class PatrolSignaler extends CardImpl { 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.SOLDIER); @@ -30,7 +29,7 @@ public final class PatrolSignaler extends CardImpl { this.toughness = new MageInt(1); // {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()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RepelIntruders.java b/Mage.Sets/src/mage/cards/r/RepelIntruders.java index ddae67fd9b..caea78ac98 100644 --- a/Mage.Sets/src/mage/cards/r/RepelIntruders.java +++ b/Mage.Sets/src/mage/cards/r/RepelIntruders.java @@ -1,7 +1,5 @@ - package mage.cards.r; -import java.util.UUID; import mage.abilities.condition.common.ManaWasSpentCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CounterTargetEffect; @@ -12,25 +10,26 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.filter.common.FilterCreatureSpell; -import mage.game.permanent.token.KithkinToken; +import mage.game.permanent.token.KithkinSoldierToken; import mage.target.TargetSpell; import mage.watchers.common.ManaSpentToCastWatcher; +import java.util.UUID; + /** - * * @author jeffwadsworth */ public final class RepelIntruders extends CardImpl { 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. - TargetSpell target = new TargetSpell(0,1, new FilterCreatureSpell()); + TargetSpell target = new TargetSpell(0, 1, new FilterCreatureSpell()); target.setRequired(false); 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")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new CounterTargetEffect(), @@ -38,7 +37,7 @@ public final class RepelIntruders extends CardImpl { this.getSpellAbility().addTarget(target); this.getSpellAbility().addEffect(new InfoEffect("(Do both if {W}{U} was spent.)")); this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); - + } private RepelIntruders(final RepelIntruders card) { diff --git a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java index bd63d68217..06e9401ca7 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java @@ -20,9 +20,10 @@ public final class BirdToken extends TokenImpl { subtype.add(SubType.BIRD); power = new MageInt(1); toughness = new MageInt(1); + 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) { diff --git a/Mage/src/main/java/mage/game/permanent/token/CurseOfTheSwineBoarToken.java b/Mage/src/main/java/mage/game/permanent/token/Boar2Token.java similarity index 60% rename from Mage/src/main/java/mage/game/permanent/token/CurseOfTheSwineBoarToken.java rename to Mage/src/main/java/mage/game/permanent/token/Boar2Token.java index 373a82d8eb..647808448d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CurseOfTheSwineBoarToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/Boar2Token.java @@ -1,32 +1,33 @@ - - package mage.game.permanent.token; +import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; -import mage.MageInt; + +import java.util.Arrays; /** - * * @author spjspj */ -public final class CurseOfTheSwineBoarToken extends TokenImpl { +public final class Boar2Token extends TokenImpl { - public CurseOfTheSwineBoarToken() { + public Boar2Token() { super("Boar", "2/2 green Boar creature token"); cardType.add(CardType.CREATURE); color.setGreen(true); subtype.add(SubType.BOAR); power = new MageInt(2); toughness = new MageInt(2); + + availableImageSetCodes = Arrays.asList("THS", "KHC"); } - public CurseOfTheSwineBoarToken(final CurseOfTheSwineBoarToken token) { + public Boar2Token(final Boar2Token token) { super(token); } - public CurseOfTheSwineBoarToken copy() { - return new CurseOfTheSwineBoarToken(this); + public Boar2Token copy() { + return new Boar2Token(this); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/KithkinToken.java b/Mage/src/main/java/mage/game/permanent/token/KithkinSoldierToken.java similarity index 58% rename from Mage/src/main/java/mage/game/permanent/token/KithkinToken.java rename to Mage/src/main/java/mage/game/permanent/token/KithkinSoldierToken.java index f07a27b4d7..7520803743 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KithkinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KithkinSoldierToken.java @@ -1,17 +1,17 @@ package mage.game.permanent.token; -import java.util.Arrays; import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; +import java.util.Arrays; + /** - * * @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"); cardType.add(CardType.CREATURE); color.setWhite(true); @@ -19,14 +19,15 @@ public final class KithkinToken extends TokenImpl { subtype.add(SubType.SOLDIER); power = 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); } - public KithkinToken copy() { - return new KithkinToken(this); + public KithkinSoldierToken copy() { + return new KithkinSoldierToken(this); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java b/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java index 332b0d1cbe..61f32a87db 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PegasusToken.java @@ -1,14 +1,13 @@ - - package mage.game.permanent.token; -import mage.constants.CardType; -import mage.constants.SubType; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.Arrays; /** - * * @author LoneFox */ public final class PegasusToken extends TokenImpl { @@ -20,8 +19,10 @@ public final class PegasusToken extends TokenImpl { subtype.add(SubType.PEGASUS); power = new MageInt(1); toughness = new MageInt(1); + addAbility(FlyingAbility.getInstance()); - setOriginalExpansionSetCode("C14"); + + availableImageSetCodes = Arrays.asList("C14", "C19", "CMD", "EXO", "GPT", "MIR", "TMP", "TPR", "TSP", "THB", "KHC"); } public PegasusToken(final PegasusToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ServoToken.java b/Mage/src/main/java/mage/game/permanent/token/ServoToken.java index 43fc61957d..358ed980fe 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ServoToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ServoToken.java @@ -1,40 +1,32 @@ - package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; import mage.util.RandomUtil; +import java.util.Arrays; + /** - * * @author fireshoes */ public final class ServoToken extends TokenImpl { - static final private List tokenImageSets = new ArrayList<>(); - - static { - tokenImageSets.addAll(Collections.singletonList("KLD")); - tokenImageSets.addAll(Collections.singletonList("WAR")); - } - public ServoToken() { super("Servo", "1/1 colorless Servo artifact creature token"); - availableImageSetCodes = tokenImageSets; cardType.add(CardType.ARTIFACT); cardType.add(CardType.CREATURE); subtype.add(SubType.SERVO); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = Arrays.asList("C18", "KLD", "WAR", "KHC"); } @Override public void setExpansionSetCodeForImage(String code) { super.setExpansionSetCodeForImage(code); + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("KLD")) { this.setTokenType(RandomUtil.nextInt(3) + 1); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java index 08d507e015..14a288dcd5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java @@ -21,7 +21,7 @@ public final class SoldierToken extends TokenImpl { toughness = new MageInt(1); 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) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java b/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java index 3e6b27f9df..3355fddd40 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ThopterColorlessToken.java @@ -23,7 +23,7 @@ public final class ThopterColorlessToken extends TokenImpl { 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 diff --git a/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java b/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java index dd9bb168cf..8e87a5dd23 100644 --- a/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/VoiceOfTheWoodsElementalToken.java @@ -1,20 +1,19 @@ - - package mage.game.permanent.token; -import mage.constants.CardType; -import mage.constants.SubType; + import mage.MageInt; import mage.abilities.keyword.TrampleAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.Arrays; /** - * * @author spjspj */ public final class VoiceOfTheWoodsElementalToken extends TokenImpl { public VoiceOfTheWoodsElementalToken() { super("Elemental", "7/7 green Elemental creature token with trample"); - this.setOriginalExpansionSetCode("EVG"); cardType.add(CardType.CREATURE); subtype.add(SubType.ELEMENTAL); @@ -23,6 +22,8 @@ public final class VoiceOfTheWoodsElementalToken extends TokenImpl { toughness = new MageInt(7); addAbility(TrampleAbility.getInstance()); + + availableImageSetCodes.addAll(Arrays.asList("EVG", "KHC")); } public VoiceOfTheWoodsElementalToken(final VoiceOfTheWoodsElementalToken token) {