From ea4af25c77b960ca8580f3eab872d8ff3e250f76 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 27 Aug 2017 22:28:13 +0200 Subject: [PATCH 1/9] * Goaded creatures able to attack the goading player (in multiplayer) (fixes #3891). * Grenzo, Havoc Raiser - Fixed trigger handling and null pointer exception. --- .../src/mage/cards/g/GrenzoHavocRaiser.java | 20 +++++++++---------- .../common/combat/GoadTargetEffect.java | 15 ++++++++++---- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java b/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java index 64179d986e7..bf163641dcb 100644 --- a/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java +++ b/Mage.Sets/src/mage/cards/g/GrenzoHavocRaiser.java @@ -54,7 +54,9 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.ExileZone; import mage.game.Game; +import mage.game.events.DamageEvent; import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; import mage.players.ManaPoolItem; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; @@ -77,7 +79,7 @@ public class GrenzoHavocRaiser extends CardImpl { this.toughness = new MageInt(2); // Whenever a creature you control deals combat damage to a player, choose one — - //Goad target creature that player controls; + //Goad target creature that player controls; Effect effect = new GoadTargetEffect(); effect.setText("goad target creature that player controls"); Ability ability = new GrenzoHavocRaiserTriggeredAbility(effect); @@ -120,10 +122,13 @@ class GrenzoHavocRaiserTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - Player opponent = game.getPlayer(event.getPlayerId()); - if (opponent != null && game.getPermanent(event.getSourceId()).getControllerId() == this.controllerId) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + opponent.getLogName() + " controls"); - filter.add(new ControllerIdPredicate(opponent.getId())); + Player damagedPlayer = game.getPlayer(event.getPlayerId()); + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (damagedPlayer != null && permanent != null + && ((DamageEvent) event).isCombatDamage() + && getControllerId().equals(permanent.getControllerId())) { + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature " + damagedPlayer.getLogName() + " controls"); + filter.add(new ControllerIdPredicate(damagedPlayer.getId())); this.getTargets().clear(); this.addTarget(new TargetCreaturePermanent(filter)); for (Effect effect : this.getAllEffects()) { @@ -171,11 +176,6 @@ class GrenzoHavocRaiserEffect extends OneShotEffect { if (card != null) { // move card to exile controller.moveCardToExileWithInfo(card, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true); - // player gains life -// int cmc = card.getConvertedManaCost(); -// if (cmc > 0) { -// controller.gainLife(cmc, game); -// } // Add effects only if the card has a spellAbility (e.g. not for lands). if (card.getSpellAbility() != null) { // allow to cast the card diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java index 38364d4d819..8384f291b9f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/GoadTargetEffect.java @@ -41,6 +41,13 @@ import mage.target.targetpointer.FixedTarget; */ public class GoadTargetEffect extends OneShotEffect { + /** + * 701.36. Goad + * + * 701.36a Certain spells and abilities can goad a creature. Until the next + * turn of the controller of that spell or ability, that creature attacks + * each combat if able and attacks a player other than that player if able. + */ public GoadTargetEffect() { super(Outcome.Benefit); } @@ -57,11 +64,11 @@ public class GoadTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { ContinuousEffect effect = new AttacksIfAbleTargetEffect(Duration.UntilYourNextTurn); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); game.addEffect(effect, source); - effect = new CantAttackYouEffect(Duration.EndOfTurn, true); - effect.setTargetPointer(new FixedTarget(source.getFirstTarget())); + effect = new CantAttackYouEffect(Duration.UntilYourNextTurn, true); + effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); game.addEffect(effect, source); return true; } -} \ No newline at end of file +} From eb0ad63eca56c058de6e0390b7125eb0e3c9412e Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 27 Aug 2017 22:34:26 +0200 Subject: [PATCH 2/9] * Starke of Rath - Fixed cast exception. --- Mage.Sets/src/mage/cards/s/StarkeOfRath.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/StarkeOfRath.java b/Mage.Sets/src/mage/cards/s/StarkeOfRath.java index 3085fec35c2..6a263a7dd50 100644 --- a/Mage.Sets/src/mage/cards/s/StarkeOfRath.java +++ b/Mage.Sets/src/mage/cards/s/StarkeOfRath.java @@ -29,7 +29,6 @@ package mage.cards.s; import java.util.UUID; import mage.MageInt; -import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; @@ -63,7 +62,7 @@ public class StarkeOfRath extends CardImpl { } public StarkeOfRath(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add("Human"); this.subtype.add("Rogue"); @@ -110,13 +109,11 @@ class StarkeOfRathEffect extends OneShotEffect { Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (targetPermanent != null) { targetPermanent.destroy(source.getSourceId(), game, false); - } - MageObject sourceObject = source.getSourceObjectIfItStillExists(game); - if ((sourceObject instanceof Permanent) && targetPermanent != null) { ContinuousEffect effect = new StarkeOfRathControlEffect(); effect.setTargetPointer(new FixedTarget(targetPermanent.getControllerId())); game.addEffect(effect, source); } + return true; } return false; } @@ -140,10 +137,10 @@ class StarkeOfRathControlEffect extends ContinuousEffectImpl { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game); - Player controller = game.getPlayer(getTargetPointer().getFirst(game, source)); - if (permanent != null && controller != null) { - return permanent.changeControllerId(getTargetPointer().getFirst(game, source), game); + Permanent permanent = game.getPermanent(source.getSourceId()); + Player newController = game.getPlayer(getTargetPointer().getFirst(game, source)); + if (permanent != null && newController != null) { + return permanent.changeControllerId(newController.getId(), game); } else { discard(); } From 329b3a4f7497abd188350afe9d6b5b2d5e6d54b5 Mon Sep 17 00:00:00 2001 From: igoudt Date: Sat, 26 Aug 2017 23:07:07 +0200 Subject: [PATCH 3/9] fix names --- Mage.Sets/src/mage/cards/a/AetherStorm.java | 11 ++++------- Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java | 3 ++- Mage.Sets/src/mage/sets/Dissension.java | 6 +++--- Mage.Sets/src/mage/sets/FifthEdition.java | 4 ++-- Mage.Sets/src/mage/sets/Homelands.java | 2 +- Mage.Sets/src/mage/sets/HourOfDevastation.java | 8 ++++---- Mage.Sets/src/mage/sets/MastersEditionII.java | 4 ++-- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AetherStorm.java b/Mage.Sets/src/mage/cards/a/AetherStorm.java index f4598491ecd..dcf766f3c0d 100644 --- a/Mage.Sets/src/mage/cards/a/AetherStorm.java +++ b/Mage.Sets/src/mage/cards/a/AetherStorm.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -38,14 +37,12 @@ import mage.abilities.effects.common.InfoEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; +import java.util.UUID; + /** * * @author TheElk801 @@ -79,7 +76,7 @@ class AetherStormReplacementEffect extends ContinuousRuleModifyingEffectImpl { public AetherStormReplacementEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Creature spells with converted mana cost 4 or greater can't be cast."; + staticText = "Creature spells can't be cast."; } public AetherStormReplacementEffect(final AetherStormReplacementEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java b/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java index 500f03a6d2f..d2e30ceca0a 100644 --- a/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java +++ b/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -44,6 +43,8 @@ import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; +import java.util.UUID; + /** * * @author TheElk801 diff --git a/Mage.Sets/src/mage/sets/Dissension.java b/Mage.Sets/src/mage/sets/Dissension.java index 38e8b036786..86ce3a307e3 100644 --- a/Mage.Sets/src/mage/sets/Dissension.java +++ b/Mage.Sets/src/mage/sets/Dissension.java @@ -59,7 +59,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Assault Zeppelid", 103, Rarity.COMMON, mage.cards.a.AssaultZeppelid.class)); cards.add(new SetCardInfo("Aurora Eidolon", 1, Rarity.COMMON, mage.cards.a.AuroraEidolon.class)); cards.add(new SetCardInfo("Avatar of Discord", 140, Rarity.RARE, mage.cards.a.AvatarOfDiscord.class)); - cards.add(new SetCardInfo("Azorius AEthermage", 104, Rarity.UNCOMMON, mage.cards.a.AzoriusAEthermage.class)); + cards.add(new SetCardInfo("Azorius Aethermage", 104, Rarity.UNCOMMON, mage.cards.a.AzoriusAEthermage.class)); cards.add(new SetCardInfo("Azorius Chancery", 170, Rarity.COMMON, mage.cards.a.AzoriusChancery.class)); cards.add(new SetCardInfo("Azorius First-Wing", 105, Rarity.COMMON, mage.cards.a.AzoriusFirstWing.class)); cards.add(new SetCardInfo("Azorius Guildmage", 141, Rarity.UNCOMMON, mage.cards.a.AzoriusGuildmage.class)); @@ -96,7 +96,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Entropic Eidolon", 45, Rarity.COMMON, mage.cards.e.EntropicEidolon.class)); cards.add(new SetCardInfo("Evolution Vat", 161, Rarity.RARE, mage.cards.e.EvolutionVat.class)); cards.add(new SetCardInfo("Experiment Kraj", 110, Rarity.RARE, mage.cards.e.ExperimentKraj.class)); - cards.add(new SetCardInfo("Flame-Kin War Scout", 61, Rarity.UNCOMMON, mage.cards.f.FlameKinWarScout.class)); + cards.add(new SetCardInfo("Flame-Kin War Scout", 61, Rarity.UNCOMMON, mage.cards.f.FlameKinWarScout.class)); cards.add(new SetCardInfo("Flaring Flame-Kin", 62, Rarity.UNCOMMON, mage.cards.f.FlaringFlameKin.class)); cards.add(new SetCardInfo("Freewind Equenaut", 9, Rarity.COMMON, mage.cards.f.FreewindEquenaut.class)); cards.add(new SetCardInfo("Ghost Quarter", 173, Rarity.UNCOMMON, mage.cards.g.GhostQuarter.class)); @@ -183,7 +183,7 @@ public class Dissension extends ExpansionSet { cards.add(new SetCardInfo("Spell Snare", 33, Rarity.UNCOMMON, mage.cards.s.SpellSnare.class)); cards.add(new SetCardInfo("Sporeback Troll", 94, Rarity.COMMON, mage.cards.s.SporebackTroll.class)); cards.add(new SetCardInfo("Sprouting Phytohydra", 95, Rarity.RARE, mage.cards.s.SproutingPhytohydra.class)); - cards.add(new SetCardInfo("Squealing Devil", 72, Rarity.UNCOMMON, mage.cards.s.SquealingDevil.class)); + cards.add(new SetCardInfo("Squealing Devil", 72, Rarity.UNCOMMON, mage.cards.s.SquealingDevil.class)); cards.add(new SetCardInfo("Stalking Vengeance", 73, Rarity.RARE, mage.cards.s.StalkingVengeance.class)); cards.add(new SetCardInfo("Steeling Stance", 18, Rarity.COMMON, mage.cards.s.SteelingStance.class)); cards.add(new SetCardInfo("Stoic Ephemera", 19, Rarity.UNCOMMON, mage.cards.s.StoicEphemera.class)); diff --git a/Mage.Sets/src/mage/sets/FifthEdition.java b/Mage.Sets/src/mage/sets/FifthEdition.java index 5f38d5bfa19..57d1187fe94 100644 --- a/Mage.Sets/src/mage/sets/FifthEdition.java +++ b/Mage.Sets/src/mage/sets/FifthEdition.java @@ -32,7 +32,7 @@ public class FifthEdition extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; - cards.add(new SetCardInfo("AEther Storm", 70, Rarity.UNCOMMON, mage.cards.a.AetherStorm.class)); + cards.add(new SetCardInfo("Aether Storm", 70, Rarity.UNCOMMON, mage.cards.a.AetherStorm.class)); cards.add(new SetCardInfo("Abbey Gargoyles", 277, Rarity.UNCOMMON, mage.cards.a.AbbeyGargoyles.class)); cards.add(new SetCardInfo("Abyssal Specter", 1, Rarity.UNCOMMON, mage.cards.a.AbyssalSpecter.class)); cards.add(new SetCardInfo("Adarkar Wastes", 410, Rarity.RARE, mage.cards.a.AdarkarWastes.class)); @@ -272,7 +272,7 @@ public class FifthEdition extends ExpansionSet { cards.add(new SetCardInfo("Merfolk of the Pearl Trident", 104, Rarity.COMMON, mage.cards.m.MerfolkOfThePearlTrident.class)); cards.add(new SetCardInfo("Mesa Falcon", 322, Rarity.COMMON, MesaFalcon.class)); cards.add(new SetCardInfo("Millstone", 390, Rarity.RARE, mage.cards.m.Millstone.class)); - cards.add(new SetCardInfo("Mind Bomb", 105, Rarity.UNCOMMON, mage.cards.m.MindBomb.class)); + cards.add(new SetCardInfo("Mind Bomb", 105, Rarity.UNCOMMON, mage.cards.m.MindBomb.class)); cards.add(new SetCardInfo("Mind Ravel", 38, Rarity.COMMON, mage.cards.m.MindRavel.class)); cards.add(new SetCardInfo("Mindstab Thrull", 40, Rarity.COMMON, MindstabThrull.class)); cards.add(new SetCardInfo("Mind Warp", 39, Rarity.UNCOMMON, mage.cards.m.MindWarp.class)); diff --git a/Mage.Sets/src/mage/sets/Homelands.java b/Mage.Sets/src/mage/sets/Homelands.java index 19629bd5537..26330b11805 100644 --- a/Mage.Sets/src/mage/sets/Homelands.java +++ b/Mage.Sets/src/mage/sets/Homelands.java @@ -64,7 +64,7 @@ public class Homelands extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; - cards.add(new SetCardInfo("AEther Storm", 26, Rarity.UNCOMMON, mage.cards.a.AetherStorm.class)); + cards.add(new SetCardInfo("Aether Storm", 26, Rarity.UNCOMMON, mage.cards.a.AetherStorm.class)); cards.add(new SetCardInfo("Abbey Gargoyles", 101, Rarity.UNCOMMON, mage.cards.a.AbbeyGargoyles.class)); cards.add(new SetCardInfo("Abbey Matron", 102, Rarity.COMMON, AbbeyMatron.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Abbey Matron", 103, Rarity.COMMON, AbbeyMatron.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage.Sets/src/mage/sets/HourOfDevastation.java b/Mage.Sets/src/mage/sets/HourOfDevastation.java index 59b30479b75..7852e38f23d 100644 --- a/Mage.Sets/src/mage/sets/HourOfDevastation.java +++ b/Mage.Sets/src/mage/sets/HourOfDevastation.java @@ -27,9 +27,6 @@ */ package mage.sets; -import java.util.ArrayList; -import java.util.List; - import mage.cards.ExpansionSet; import mage.cards.repository.CardCriteria; import mage.cards.repository.CardInfo; @@ -37,6 +34,9 @@ import mage.cards.repository.CardRepository; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.ArrayList; +import java.util.List; + /** * @author fireshoes */ @@ -80,7 +80,7 @@ public class HourOfDevastation extends ExpansionSet { cards.add(new SetCardInfo("Aven of Enduring Hope", 5, Rarity.COMMON, mage.cards.a.AvenOfEnduringHope.class)); cards.add(new SetCardInfo("Avid Reclaimer", 201, Rarity.UNCOMMON, mage.cards.a.AvidReclaimer.class)); cards.add(new SetCardInfo("Banewhip Punisher", 59, Rarity.UNCOMMON, mage.cards.b.BanewhipPunisher.class)); - cards.add(new SetCardInfo("Beneath The Sands", 111, Rarity.COMMON, mage.cards.b.BeneathTheSands.class)); + cards.add(new SetCardInfo("Beneath the Sands", 111, Rarity.COMMON, mage.cards.b.BeneathTheSands.class)); cards.add(new SetCardInfo("Bitterbow Sharpshooters", 112, Rarity.COMMON, mage.cards.b.BitterbowSharpshooters.class)); cards.add(new SetCardInfo("Bloodwater Entity", 138, Rarity.UNCOMMON, mage.cards.b.BloodwaterEntity.class)); cards.add(new SetCardInfo("Blur of Blades", 84, Rarity.COMMON, mage.cards.b.BlurOfBlades.class)); diff --git a/Mage.Sets/src/mage/sets/MastersEditionII.java b/Mage.Sets/src/mage/sets/MastersEditionII.java index 92a1e5d118f..dafcebca4f1 100644 --- a/Mage.Sets/src/mage/sets/MastersEditionII.java +++ b/Mage.Sets/src/mage/sets/MastersEditionII.java @@ -64,7 +64,7 @@ public class MastersEditionII extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 0; - cards.add(new SetCardInfo("AEther Storm", 39, Rarity.UNCOMMON, mage.cards.a.AetherStorm.class)); + cards.add(new SetCardInfo("Aether Storm", 39, Rarity.UNCOMMON, mage.cards.a.AetherStorm.class)); cards.add(new SetCardInfo("Abbey Gargoyles", 1, Rarity.UNCOMMON, mage.cards.a.AbbeyGargoyles.class)); cards.add(new SetCardInfo("Adarkar Sentinel", 201, Rarity.COMMON, mage.cards.a.AdarkarSentinel.class)); cards.add(new SetCardInfo("Aeolipile", 202, Rarity.COMMON, mage.cards.a.Aeolipile.class)); @@ -102,7 +102,7 @@ public class MastersEditionII extends ExpansionSet { cards.add(new SetCardInfo("Deep Spawn", 45, Rarity.RARE, mage.cards.d.DeepSpawn.class)); cards.add(new SetCardInfo("Demonic Consultation", 85, Rarity.UNCOMMON, mage.cards.d.DemonicConsultation.class)); cards.add(new SetCardInfo("Despotic Scepter", 206, Rarity.RARE, mage.cards.d.DespoticScepter.class)); - cards.add(new SetCardInfo("Diabolic Vision", 191, Rarity.UNCOMMON, mage.cards.d.DiabolicVision.class)); + cards.add(new SetCardInfo("Diabolic Vision", 191, Rarity.UNCOMMON, mage.cards.d.DiabolicVision.class)); cards.add(new SetCardInfo("Disenchant", 10, Rarity.COMMON, mage.cards.d.Disenchant.class)); cards.add(new SetCardInfo("Dwarven Ruins", 227, Rarity.UNCOMMON, mage.cards.d.DwarvenRuins.class)); cards.add(new SetCardInfo("Dystopia", 88, Rarity.RARE, mage.cards.d.Dystopia.class)); From 9cf77fdaa7582c0f3e9d479dcb9c50887ac3bdb7 Mon Sep 17 00:00:00 2001 From: igoudt Date: Mon, 28 Aug 2017 12:30:00 +0200 Subject: [PATCH 4/9] subtypes for b --- .../src/mage/cards/b/BalduvianConjurer.java | 11 ++++------ .../src/mage/cards/b/BalduvianHydra.java | 10 ++++----- .../mage/cards/b/BaralChiefOfCompliance.java | 4 ++-- Mage.Sets/src/mage/cards/b/BarrageOgre.java | 4 ++-- .../src/mage/cards/b/BarrinMasterWizard.java | 4 ++-- .../src/mage/cards/b/BatteringCraghorn.java | 4 ++-- .../src/mage/cards/b/BatteringKrasis.java | 4 ++-- .../src/mage/cards/b/BattleMadRonin.java | 4 ++-- .../src/mage/cards/b/BattleRattleShaman.java | 11 ++++------ .../src/mage/cards/b/BattlefrontKrushok.java | 6 ++++-- .../src/mage/cards/b/BehemothSledge.java | 7 ++----- .../mage/cards/b/BellowingSaddlebrute.java | 4 ++-- .../src/mage/cards/b/BenBenAkkiHermit.java | 21 +++++++++---------- .../src/mage/cards/b/BlackMarketDealer.java | 6 +++--- .../src/mage/cards/b/BlackPoplarShaman.java | 6 +++--- Mage.Sets/src/mage/cards/b/BladedBracers.java | 5 +++-- Mage.Sets/src/mage/cards/b/BlazeCommando.java | 8 +++---- .../src/mage/cards/b/BlazethornScarecrow.java | 3 ++- Mage.Sets/src/mage/cards/b/BlazingTorch.java | 2 +- Mage.Sets/src/mage/cards/b/BlessedOrator.java | 7 ++++--- .../src/mage/cards/b/BlightedShaman.java | 7 +++---- .../src/mage/cards/b/BlightsoilDruid.java | 7 ++++--- .../src/mage/cards/b/BlindWithAnger.java | 3 ++- Mage.Sets/src/mage/cards/b/BlindingDrone.java | 4 ++-- Mage.Sets/src/mage/cards/b/BloodCrypt.java | 7 ++++--- Mage.Sets/src/mage/cards/b/BloodHound.java | 7 ++----- .../mage/cards/b/BloodforgedBattleAxe.java | 3 ++- .../mage/cards/b/BloodlineNecromancer.java | 6 +++--- .../src/mage/cards/b/BloodwaterEntity.java | 6 ++++-- .../src/mage/cards/b/BoaConstrictor.java | 3 ++- Mage.Sets/src/mage/cards/b/BobaFett.java | 7 ++++--- Mage.Sets/src/mage/cards/b/BolaWarrior.java | 8 +++---- .../src/mage/cards/b/BoneyardScourge.java | 6 +++--- Mage.Sets/src/mage/cards/b/BorosKeyrune.java | 3 ++- Mage.Sets/src/mage/cards/b/Bossk.java | 8 +++---- .../src/mage/cards/b/BoundByMoonsilver.java | 10 ++++----- .../src/mage/cards/b/BountyCollector.java | 4 ++-- Mage.Sets/src/mage/cards/b/BountyHunter.java | 8 +++---- Mage.Sets/src/mage/cards/b/BountySniper.java | 7 ++++--- Mage.Sets/src/mage/cards/b/BountySpotter.java | 7 ++++--- Mage.Sets/src/mage/cards/b/Brainwash.java | 10 ++++----- .../src/mage/cards/b/BrassTalonChimera.java | 5 +++-- Mage.Sets/src/mage/cards/b/Bravado.java | 5 +++-- Mage.Sets/src/mage/cards/b/BreathOfFury.java | 7 ++----- Mage.Sets/src/mage/cards/b/Breathstealer.java | 6 ++++-- Mage.Sets/src/mage/cards/b/BreedingPool.java | 7 ++++--- Mage.Sets/src/mage/cards/b/BrineShaman.java | 8 +++---- .../cards/b/BriselaVoiceOfNightmares.java | 4 ++-- Mage.Sets/src/mage/cards/b/BrownOuphe.java | 6 ++++-- .../src/mage/cards/b/BudokaGardener.java | 6 +++--- Mage.Sets/src/mage/cards/b/BudokaPupil.java | 5 +++-- .../src/mage/cards/b/BushiTenderfoot.java | 6 +++--- 52 files changed, 164 insertions(+), 163 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BalduvianConjurer.java b/Mage.Sets/src/mage/cards/b/BalduvianConjurer.java index 6336e5d2278..c96cf954a55 100644 --- a/Mage.Sets/src/mage/cards/b/BalduvianConjurer.java +++ b/Mage.Sets/src/mage/cards/b/BalduvianConjurer.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -35,15 +34,14 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SuperType; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterLandPermanent; import mage.filter.predicate.mageobject.SupertypePredicate; import mage.game.permanent.token.Token; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -59,8 +57,7 @@ public class BalduvianConjurer extends CardImpl { public BalduvianConjurer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BalduvianHydra.java b/Mage.Sets/src/mage/cards/b/BalduvianHydra.java index 8d31a87f108..31bde848f58 100644 --- a/Mage.Sets/src/mage/cards/b/BalduvianHydra.java +++ b/Mage.Sets/src/mage/cards/b/BalduvianHydra.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -40,12 +39,11 @@ import mage.abilities.effects.common.PreventDamageToSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.PhaseStep; -import mage.constants.Zone; +import mage.constants.*; import mage.counters.CounterType; +import java.util.UUID; + /** * * @author TheElk801 @@ -55,7 +53,7 @@ public class BalduvianHydra extends CardImpl { public BalduvianHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{R}{R}"); - this.subtype.add("Hydra"); + this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BaralChiefOfCompliance.java b/Mage.Sets/src/mage/cards/b/BaralChiefOfCompliance.java index 5d7f58e5316..098df222cd6 100644 --- a/Mage.Sets/src/mage/cards/b/BaralChiefOfCompliance.java +++ b/Mage.Sets/src/mage/cards/b/BaralChiefOfCompliance.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SpellCounteredControllerTriggeredAbility; @@ -43,6 +42,8 @@ import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; +import java.util.UUID; + /** * * @author fireshoes @@ -63,7 +64,6 @@ public class BaralChiefOfCompliance extends CardImpl { addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN, SubType.WIZARD); - this.subtype.add("Wizard"); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BarrageOgre.java b/Mage.Sets/src/mage/cards/b/BarrageOgre.java index d9bcb96197c..2dee5278af2 100644 --- a/Mage.Sets/src/mage/cards/b/BarrageOgre.java +++ b/Mage.Sets/src/mage/cards/b/BarrageOgre.java @@ -28,7 +28,6 @@ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -45,6 +44,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreatureOrPlayer; +import java.util.UUID; + /** * * @author Loki @@ -59,7 +60,6 @@ public class BarrageOgre extends CardImpl { public BarrageOgre (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{R}"); this.subtype.add(SubType.OGRE, SubType.WARRIOR); - this.subtype.add("Warrior"); this.color.setRed(true); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BarrinMasterWizard.java b/Mage.Sets/src/mage/cards/b/BarrinMasterWizard.java index 9cae3c21282..9e23d7f46b6 100644 --- a/Mage.Sets/src/mage/cards/b/BarrinMasterWizard.java +++ b/Mage.Sets/src/mage/cards/b/BarrinMasterWizard.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; @@ -42,6 +41,8 @@ import mage.constants.Zone; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Backfir3 @@ -52,7 +53,6 @@ public class BarrinMasterWizard extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN, SubType.WIZARD); - this.subtype.add("Wizard"); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BatteringCraghorn.java b/Mage.Sets/src/mage/cards/b/BatteringCraghorn.java index 728bd788019..e28f9ccff00 100644 --- a/Mage.Sets/src/mage/cards/b/BatteringCraghorn.java +++ b/Mage.Sets/src/mage/cards/b/BatteringCraghorn.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.keyword.FirstStrikeAbility; @@ -37,6 +36,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import java.util.UUID; + /** * * @author LoneFox @@ -46,7 +47,6 @@ public class BatteringCraghorn extends CardImpl { public BatteringCraghorn(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); this.subtype.add(SubType.GOAT, SubType.BEAST); - this.subtype.add("Beast"); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BatteringKrasis.java b/Mage.Sets/src/mage/cards/b/BatteringKrasis.java index 11859ac511e..44be2256167 100644 --- a/Mage.Sets/src/mage/cards/b/BatteringKrasis.java +++ b/Mage.Sets/src/mage/cards/b/BatteringKrasis.java @@ -28,7 +28,6 @@ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.keyword.EvolveAbility; import mage.abilities.keyword.TrampleAbility; @@ -37,6 +36,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import java.util.UUID; + /** * * @author LevelX2 @@ -48,7 +49,6 @@ public class BatteringKrasis extends CardImpl { public BatteringKrasis (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.FISH, SubType.BEAST); - this.subtype.add("Beast"); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BattleMadRonin.java b/Mage.Sets/src/mage/cards/b/BattleMadRonin.java index afc9b7f6c46..c374ac86df1 100644 --- a/Mage.Sets/src/mage/cards/b/BattleMadRonin.java +++ b/Mage.Sets/src/mage/cards/b/BattleMadRonin.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.AttacksEachTurnStaticAbility; import mage.abilities.keyword.BushidoAbility; @@ -36,6 +35,8 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import java.util.UUID; + /** * * @author loki @@ -45,7 +46,6 @@ public class BattleMadRonin extends CardImpl { public BattleMadRonin(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); this.subtype.add(SubType.HUMAN, SubType.SAMURAI); - this.subtype.add("Samurai"); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BattleRattleShaman.java b/Mage.Sets/src/mage/cards/b/BattleRattleShaman.java index 97bebe392d8..d21707d9a72 100644 --- a/Mage.Sets/src/mage/cards/b/BattleRattleShaman.java +++ b/Mage.Sets/src/mage/cards/b/BattleRattleShaman.java @@ -27,19 +27,17 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -48,8 +46,7 @@ public class BattleRattleShaman extends CardImpl { public BattleRattleShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN, SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BattlefrontKrushok.java b/Mage.Sets/src/mage/cards/b/BattlefrontKrushok.java index 8248bc90d0c..4e48f672134 100644 --- a/Mage.Sets/src/mage/cards/b/BattlefrontKrushok.java +++ b/Mage.Sets/src/mage/cards/b/BattlefrontKrushok.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneAllEffect; @@ -35,11 +34,14 @@ import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffe import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.CounterPredicate; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +56,7 @@ public class BattlefrontKrushok extends CardImpl { public BattlefrontKrushok(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); - this.subtype.add("Beast"); + this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/b/BehemothSledge.java b/Mage.Sets/src/mage/cards/b/BehemothSledge.java index d84626f957e..1226d351b58 100644 --- a/Mage.Sets/src/mage/cards/b/BehemothSledge.java +++ b/Mage.Sets/src/mage/cards/b/BehemothSledge.java @@ -38,10 +38,7 @@ import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; /** @@ -52,7 +49,7 @@ public class BehemothSledge extends CardImpl { public BehemothSledge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{G}{W}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); diff --git a/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java b/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java index 1704a41e596..59f3558e889 100644 --- a/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java +++ b/Mage.Sets/src/mage/cards/b/BellowingSaddlebrute.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.condition.InvertCondition; @@ -40,6 +39,8 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.watchers.common.PlayerAttackedWatcher; +import java.util.UUID; + /** * * @author LevelX2 @@ -49,7 +50,6 @@ public class BellowingSaddlebrute extends CardImpl { public BellowingSaddlebrute(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); this.subtype.add(SubType.ORC, SubType.WARRIOR); - this.subtype.add("Warrior"); this.power = new MageInt(4); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/b/BenBenAkkiHermit.java b/Mage.Sets/src/mage/cards/b/BenBenAkkiHermit.java index 2ef2ff4c7af..3e2550b45fc 100644 --- a/Mage.Sets/src/mage/cards/b/BenBenAkkiHermit.java +++ b/Mage.Sets/src/mage/cards/b/BenBenAkkiHermit.java @@ -28,7 +28,6 @@ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -47,24 +46,24 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.TappedPredicate; import mage.target.common.TargetAttackingCreature; +import java.util.UUID; + /** - * * @author Loki */ public class BenBenAkkiHermit extends CardImpl { private static final FilterLandPermanent filter = new FilterLandPermanent("untapped Mountain you control"); - static { - filter.add(Predicates.not(new TappedPredicate())); - filter.add(new SubtypePredicate(SubType.MOUNTAIN)); - } + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate(SubType.MOUNTAIN)); + } - public BenBenAkkiHermit (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + public BenBenAkkiHermit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Goblin"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.GOBLIN, SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -73,7 +72,7 @@ public class BenBenAkkiHermit extends CardImpl { this.addAbility(ability); } - public BenBenAkkiHermit (final BenBenAkkiHermit card) { + public BenBenAkkiHermit(final BenBenAkkiHermit card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/b/BlackMarketDealer.java b/Mage.Sets/src/mage/cards/b/BlackMarketDealer.java index 9d32f2aebba..cf677a16bc1 100644 --- a/Mage.Sets/src/mage/cards/b/BlackMarketDealer.java +++ b/Mage.Sets/src/mage/cards/b/BlackMarketDealer.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.DiesCreatureTriggeredAbility; @@ -49,6 +48,8 @@ import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.TargetPlayer; import mage.target.common.TargetOpponentsCreaturePermanent; +import java.util.UUID; + /** * * @author Styxo @@ -64,8 +65,7 @@ public class BlackMarketDealer extends CardImpl { public BlackMarketDealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Rogue"); + this.subtype.add(SubType.HUMAN, SubType.ROGUE); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BlackPoplarShaman.java b/Mage.Sets/src/mage/cards/b/BlackPoplarShaman.java index 1252a9d9478..c087a4c986f 100644 --- a/Mage.Sets/src/mage/cards/b/BlackPoplarShaman.java +++ b/Mage.Sets/src/mage/cards/b/BlackPoplarShaman.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -42,6 +41,8 @@ import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author Loki @@ -56,8 +57,7 @@ public class BlackPoplarShaman extends CardImpl { public BlackPoplarShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Treefolk"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.TREEFOLK, SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BladedBracers.java b/Mage.Sets/src/mage/cards/b/BladedBracers.java index 61153a9a482..369ea4a7ecf 100644 --- a/Mage.Sets/src/mage/cards/b/BladedBracers.java +++ b/Mage.Sets/src/mage/cards/b/BladedBracers.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.EquippedHasSubtypeCondition; import mage.abilities.costs.mana.GenericManaCost; @@ -41,6 +40,8 @@ import mage.cards.CardSetInfo; import mage.constants.*; import mage.util.SubTypeList; +import java.util.UUID; + /** * @author noxx */ @@ -50,7 +51,7 @@ public class BladedBracers extends CardImpl { public BladedBracers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); diff --git a/Mage.Sets/src/mage/cards/b/BlazeCommando.java b/Mage.Sets/src/mage/cards/b/BlazeCommando.java index affb2257120..2d6c42cd36f 100644 --- a/Mage.Sets/src/mage/cards/b/BlazeCommando.java +++ b/Mage.Sets/src/mage/cards/b/BlazeCommando.java @@ -28,9 +28,6 @@ package mage.cards.b; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.TriggeredAbilityImpl; @@ -45,6 +42,10 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.token.SoldierTokenWithHaste; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + /** * * @author LevelX2 @@ -56,7 +57,6 @@ public class BlazeCommando extends CardImpl { public BlazeCommando (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{W}"); this.subtype.add(SubType.MINOTAUR, SubType.SOLDIER); - this.subtype.add("Soldier"); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/b/BlazethornScarecrow.java b/Mage.Sets/src/mage/cards/b/BlazethornScarecrow.java index 2d8c728961b..f628fe5f102 100644 --- a/Mage.Sets/src/mage/cards/b/BlazethornScarecrow.java +++ b/Mage.Sets/src/mage/cards/b/BlazethornScarecrow.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; @@ -63,7 +64,7 @@ public class BlazethornScarecrow extends CardImpl { public BlazethornScarecrow(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{5}"); - this.subtype.add("Scarecrow"); + this.subtype.add(SubType.SCARECROW); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BlazingTorch.java b/Mage.Sets/src/mage/cards/b/BlazingTorch.java index cf94a863a33..5e30d3829fc 100644 --- a/Mage.Sets/src/mage/cards/b/BlazingTorch.java +++ b/Mage.Sets/src/mage/cards/b/BlazingTorch.java @@ -57,7 +57,7 @@ public class BlazingTorch extends CardImpl { public BlazingTorch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature can't be blocked by Vampires or Zombies. (!this is a static ability of the equipment) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlazingTorchEvasionEffect())); diff --git a/Mage.Sets/src/mage/cards/b/BlessedOrator.java b/Mage.Sets/src/mage/cards/b/BlessedOrator.java index e2117ebf92b..27e3f019386 100644 --- a/Mage.Sets/src/mage/cards/b/BlessedOrator.java +++ b/Mage.Sets/src/mage/cards/b/BlessedOrator.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; @@ -35,8 +34,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; +import java.util.UUID; + /** * * @author noxx (Angel of Jubilation), cbt33 @@ -45,8 +47,7 @@ public class BlessedOrator extends CardImpl { public BlessedOrator(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); + this.subtype.add(SubType.HUMAN, SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/b/BlightedShaman.java b/Mage.Sets/src/mage/cards/b/BlightedShaman.java index dcd182347f5..b25b33d82e0 100644 --- a/Mage.Sets/src/mage/cards/b/BlightedShaman.java +++ b/Mage.Sets/src/mage/cards/b/BlightedShaman.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -46,6 +45,8 @@ import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Quercitron @@ -60,9 +61,7 @@ public class BlightedShaman extends CardImpl { public BlightedShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN, SubType.CLERIC, SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BlightsoilDruid.java b/Mage.Sets/src/mage/cards/b/BlightsoilDruid.java index a1246686699..8b366eb4f8a 100644 --- a/Mage.Sets/src/mage/cards/b/BlightsoilDruid.java +++ b/Mage.Sets/src/mage/cards/b/BlightsoilDruid.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.costs.common.PayLifeCost; @@ -35,6 +34,9 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -44,8 +46,7 @@ public class BlightsoilDruid extends CardImpl { public BlightsoilDruid(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Elf"); - this.subtype.add("Druid"); + this.subtype.add(SubType.ELF, SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BlindWithAnger.java b/Mage.Sets/src/mage/cards/b/BlindWithAnger.java index 42d7b761164..a63a7e97b46 100644 --- a/Mage.Sets/src/mage/cards/b/BlindWithAnger.java +++ b/Mage.Sets/src/mage/cards/b/BlindWithAnger.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; @@ -57,7 +58,7 @@ public class BlindWithAnger extends CardImpl { public BlindWithAnger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{R}"); - this.subtype.add("Arcane"); + this.subtype.add(SubType.ARCANE); this.getSpellAbility().addEffect(new UntapTargetEffect()); this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/b/BlindingDrone.java b/Mage.Sets/src/mage/cards/b/BlindingDrone.java index b45a24b25c0..352567728a4 100644 --- a/Mage.Sets/src/mage/cards/b/BlindingDrone.java +++ b/Mage.Sets/src/mage/cards/b/BlindingDrone.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -42,6 +41,8 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -51,7 +52,6 @@ public class BlindingDrone extends CardImpl { public BlindingDrone(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.ELDRAZI, SubType.DRONE); - this.subtype.add("Drone"); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BloodCrypt.java b/Mage.Sets/src/mage/cards/b/BloodCrypt.java index d14d09288df..5b3397a9d20 100644 --- a/Mage.Sets/src/mage/cards/b/BloodCrypt.java +++ b/Mage.Sets/src/mage/cards/b/BloodCrypt.java @@ -28,7 +28,6 @@ package mage.cards.b; -import java.util.UUID; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.costs.common.PayLifeCost; import mage.abilities.effects.common.TapSourceUnlessPaysEffect; @@ -37,6 +36,9 @@ import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -46,8 +48,7 @@ public class BloodCrypt extends CardImpl { public BloodCrypt (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Swamp"); - this.subtype.add("Mountain"); + this.subtype.add(SubType.SWAMP, SubType.MOUNTAIN); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, {this} enters the battlefield tapped")); diff --git a/Mage.Sets/src/mage/cards/b/BloodHound.java b/Mage.Sets/src/mage/cards/b/BloodHound.java index 7e5560d499c..02db0969e28 100644 --- a/Mage.Sets/src/mage/cards/b/BloodHound.java +++ b/Mage.Sets/src/mage/cards/b/BloodHound.java @@ -36,10 +36,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.RemoveAllCountersSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.counters.CounterType; import mage.game.Game; import mage.game.events.GameEvent; @@ -54,7 +51,7 @@ public class BloodHound extends CardImpl { public BloodHound(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.subtype.add("Hound"); + this.subtype.add(SubType.HOUND); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java b/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java index d2e30ceca0a..10c5aab52af 100644 --- a/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java +++ b/Mage.Sets/src/mage/cards/b/BloodforgedBattleAxe.java @@ -37,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; import mage.game.events.DamagedPlayerEvent; @@ -54,7 +55,7 @@ public class BloodforgedBattleAxe extends CardImpl { public BloodforgedBattleAxe(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - this.subtype.add("Equipment"); + this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); diff --git a/Mage.Sets/src/mage/cards/b/BloodlineNecromancer.java b/Mage.Sets/src/mage/cards/b/BloodlineNecromancer.java index a09ecbe711c..0f5ad87392b 100644 --- a/Mage.Sets/src/mage/cards/b/BloodlineNecromancer.java +++ b/Mage.Sets/src/mage/cards/b/BloodlineNecromancer.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -43,6 +42,8 @@ import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.Target; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author TheElk801 @@ -58,8 +59,7 @@ public class BloodlineNecromancer extends CardImpl { public BloodlineNecromancer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}"); - this.subtype.add("Vampire"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.VAMPIRE, SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BloodwaterEntity.java b/Mage.Sets/src/mage/cards/b/BloodwaterEntity.java index 93be2c7ca1d..2cc85cecf3b 100644 --- a/Mage.Sets/src/mage/cards/b/BloodwaterEntity.java +++ b/Mage.Sets/src/mage/cards/b/BloodwaterEntity.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -38,11 +37,14 @@ import mage.abilities.keyword.ProwessAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterCard; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.target.common.TargetCardInYourGraveyard; +import java.util.UUID; + /** * * @author ciaccona007 @@ -60,7 +62,7 @@ public class BloodwaterEntity extends CardImpl { public BloodwaterEntity(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); - this.subtype.add("Elemental"); + this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BoaConstrictor.java b/Mage.Sets/src/mage/cards/b/BoaConstrictor.java index 1200af9109f..a776aaec7dd 100644 --- a/Mage.Sets/src/mage/cards/b/BoaConstrictor.java +++ b/Mage.Sets/src/mage/cards/b/BoaConstrictor.java @@ -36,6 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; /** @@ -47,7 +48,7 @@ public class BoaConstrictor extends CardImpl { public BoaConstrictor(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}"); - this.subtype.add("Snake"); + this.subtype.add(SubType.SNAKE); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BobaFett.java b/Mage.Sets/src/mage/cards/b/BobaFett.java index 6edb36284ef..7680e3cfdb6 100644 --- a/Mage.Sets/src/mage/cards/b/BobaFett.java +++ b/Mage.Sets/src/mage/cards/b/BobaFett.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -40,10 +39,13 @@ import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.counters.CounterType; import mage.target.common.TargetOpponentsCreaturePermanent; +import java.util.UUID; + /** * * @author Styxo @@ -53,8 +55,7 @@ public class BobaFett extends CardImpl { public BobaFett(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{R}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Human"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.HUMAN, SubType.HUNTER); this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/cards/b/BolaWarrior.java b/Mage.Sets/src/mage/cards/b/BolaWarrior.java index fb33e2a0b2d..07dc204772f 100644 --- a/Mage.Sets/src/mage/cards/b/BolaWarrior.java +++ b/Mage.Sets/src/mage/cards/b/BolaWarrior.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -39,9 +38,12 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -51,9 +53,7 @@ public class BolaWarrior extends CardImpl { public BolaWarrior(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.subtype.add("Human"); - this.subtype.add("Spellshaper"); - this.subtype.add("Warrior"); + this.subtype.add(SubType.HUMAN, SubType.SPELLSHAPER, SubType.WARRIOR); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BoneyardScourge.java b/Mage.Sets/src/mage/cards/b/BoneyardScourge.java index a2d83d3662a..6abc6183faf 100644 --- a/Mage.Sets/src/mage/cards/b/BoneyardScourge.java +++ b/Mage.Sets/src/mage/cards/b/BoneyardScourge.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; @@ -49,6 +48,8 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.ZoneChangeEvent; +import java.util.UUID; + /** * * @author TheElk801 @@ -65,8 +66,7 @@ public class BoneyardScourge extends CardImpl { public BoneyardScourge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); - this.subtype.add("Zombie"); - this.subtype.add("Dragon"); + this.subtype.add(SubType.ZOMBIE, SubType.DRAGON); this.power = new MageInt(4); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BorosKeyrune.java b/Mage.Sets/src/mage/cards/b/BorosKeyrune.java index 4aa22e581ed..0c77135741c 100644 --- a/Mage.Sets/src/mage/cards/b/BorosKeyrune.java +++ b/Mage.Sets/src/mage/cards/b/BorosKeyrune.java @@ -39,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.game.permanent.token.Token; @@ -75,7 +76,7 @@ public class BorosKeyrune extends CardImpl { cardType.add(CardType.CREATURE); color.setRed(true); color.setWhite(true); - subtype.add("Soldier"); + subtype.add(SubType.SOLDIER); power = new MageInt(1); toughness = new MageInt(1); this.addAbility(DoubleStrikeAbility.getInstance()); diff --git a/Mage.Sets/src/mage/cards/b/Bossk.java b/Mage.Sets/src/mage/cards/b/Bossk.java index 8874578dab2..676b9ea5134 100644 --- a/Mage.Sets/src/mage/cards/b/Bossk.java +++ b/Mage.Sets/src/mage/cards/b/Bossk.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.counter.AddCountersTargetEffect; @@ -37,11 +36,11 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.StaticFilters; -import mage.filter.common.FilterBasicLandCard; import mage.filter.common.FilterControlledLandPermanent; import mage.game.Game; import mage.game.events.GameEvent; @@ -49,6 +48,8 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetOpponentsCreaturePermanent; +import java.util.UUID; + /** * * @author Styxo @@ -58,8 +59,7 @@ public class Bossk extends CardImpl { public Bossk(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Trandoshan"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.TRANDOSHAN, SubType.HUNTER); this.power = new MageInt(3); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BoundByMoonsilver.java b/Mage.Sets/src/mage/cards/b/BoundByMoonsilver.java index ee28f5a5c88..ae21d3b7678 100644 --- a/Mage.Sets/src/mage/cards/b/BoundByMoonsilver.java +++ b/Mage.Sets/src/mage/cards/b/BoundByMoonsilver.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -38,16 +37,15 @@ import mage.abilities.effects.common.CantAttackBlockTransformAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TimingRule; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.permanent.AnotherPredicate; import mage.target.TargetPermanent; import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author halljared @@ -62,7 +60,7 @@ public class BoundByMoonsilver extends CardImpl { public BoundByMoonsilver(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/b/BountyCollector.java b/Mage.Sets/src/mage/cards/b/BountyCollector.java index 65ebe249932..6aead18351f 100644 --- a/Mage.Sets/src/mage/cards/b/BountyCollector.java +++ b/Mage.Sets/src/mage/cards/b/BountyCollector.java @@ -38,6 +38,7 @@ import mage.abilities.keyword.BountyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetLandPermanent; @@ -49,8 +50,7 @@ public class BountyCollector extends CardImpl { public BountyCollector(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); - this.subtype.add("Quarren"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.QUARREN, SubType.HUNTER); this.power = new MageInt(2); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BountyHunter.java b/Mage.Sets/src/mage/cards/b/BountyHunter.java index a8113cfc3ad..aeb555d3b3c 100644 --- a/Mage.Sets/src/mage/cards/b/BountyHunter.java +++ b/Mage.Sets/src/mage/cards/b/BountyHunter.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.Ability; @@ -38,6 +37,7 @@ import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.filter.common.FilterCreaturePermanent; @@ -46,6 +46,8 @@ import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.CounterPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -62,9 +64,7 @@ public class BountyHunter extends CardImpl { public BountyHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); - this.subtype.add("Human"); - this.subtype.add("Archer"); - this.subtype.add("Minion"); + this.subtype.add(SubType.HUMAN, SubType.ARCHER, SubType.MINION); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BountySniper.java b/Mage.Sets/src/mage/cards/b/BountySniper.java index 8d53ba68e87..769bc345048 100644 --- a/Mage.Sets/src/mage/cards/b/BountySniper.java +++ b/Mage.Sets/src/mage/cards/b/BountySniper.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,9 +37,12 @@ import mage.abilities.keyword.BountyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Styxo @@ -49,8 +51,7 @@ public class BountySniper extends CardImpl { public BountySniper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); - this.subtype.add("Gand"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.GAND, SubType.HUNTER); this.power = new MageInt(1); this.toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BountySpotter.java b/Mage.Sets/src/mage/cards/b/BountySpotter.java index fcbf8ebbec3..7b12e272da7 100644 --- a/Mage.Sets/src/mage/cards/b/BountySpotter.java +++ b/Mage.Sets/src/mage/cards/b/BountySpotter.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -40,10 +39,13 @@ import mage.abilities.keyword.BountyAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.counters.CounterType; import mage.target.common.TargetOpponentsCreaturePermanent; +import java.util.UUID; + /** * * @author Styxo @@ -52,8 +54,7 @@ public class BountySpotter extends CardImpl { public BountySpotter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); - this.subtype.add("Zabrak"); - this.subtype.add("Hunter"); + this.subtype.add(SubType.ZABRAK, SubType.HUNTER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/Brainwash.java b/Mage.Sets/src/mage/cards/b/Brainwash.java index 81510057514..f787a151bf7 100644 --- a/Mage.Sets/src/mage/cards/b/Brainwash.java +++ b/Mage.Sets/src/mage/cards/b/Brainwash.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -36,13 +35,12 @@ import mage.abilities.effects.common.combat.CantAttackUnlessPaysAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Galatolol @@ -52,7 +50,7 @@ public class Brainwash extends CardImpl { public Brainwash(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java b/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java index d78366e1ca6..3c316e29d78 100644 --- a/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java +++ b/Mage.Sets/src/mage/cards/b/BrassTalonChimera.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -46,6 +45,8 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -61,7 +62,7 @@ public class BrassTalonChimera extends CardImpl { public BrassTalonChimera(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); - this.subtype.add("Chimera"); + this.subtype.add(SubType.CHIMERA); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/Bravado.java b/Mage.Sets/src/mage/cards/b/Bravado.java index ddea68727ab..9ef5bbe17b1 100644 --- a/Mage.Sets/src/mage/cards/b/Bravado.java +++ b/Mage.Sets/src/mage/cards/b/Bravado.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousEffectImpl; @@ -42,6 +41,8 @@ import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author Backfir3 @@ -50,7 +51,7 @@ public class Bravado extends CardImpl { public Bravado(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature diff --git a/Mage.Sets/src/mage/cards/b/BreathOfFury.java b/Mage.Sets/src/mage/cards/b/BreathOfFury.java index fe4e83d15f2..a289d33ffeb 100644 --- a/Mage.Sets/src/mage/cards/b/BreathOfFury.java +++ b/Mage.Sets/src/mage/cards/b/BreathOfFury.java @@ -36,10 +36,7 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.TurnPhase; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.permanent.CanBeEnchantedByPredicate; import mage.game.Game; @@ -60,7 +57,7 @@ public class BreathOfFury extends CardImpl { public BreathOfFury(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/b/Breathstealer.java b/Mage.Sets/src/mage/cards/b/Breathstealer.java index cc0de9546d6..c80867040b2 100644 --- a/Mage.Sets/src/mage/cards/b/Breathstealer.java +++ b/Mage.Sets/src/mage/cards/b/Breathstealer.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -36,8 +35,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; +import java.util.UUID; + /** * * @author fireshoes @@ -46,7 +48,7 @@ public class Breathstealer extends CardImpl { public Breathstealer(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); - this.subtype.add("Nightstalker"); + this.subtype.add(SubType.NIGHTSTALKER); this.power = new MageInt(2); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BreedingPool.java b/Mage.Sets/src/mage/cards/b/BreedingPool.java index 57d4ead3b7b..d617b43993d 100644 --- a/Mage.Sets/src/mage/cards/b/BreedingPool.java +++ b/Mage.Sets/src/mage/cards/b/BreedingPool.java @@ -28,7 +28,6 @@ package mage.cards.b; -import java.util.UUID; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.costs.common.PayLifeCost; import mage.abilities.effects.common.TapSourceUnlessPaysEffect; @@ -37,6 +36,9 @@ import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; /** * @@ -46,8 +48,7 @@ public class BreedingPool extends CardImpl { public BreedingPool (UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.LAND},null); - this.subtype.add("Forest"); - this.subtype.add("Island"); + this.subtype.add(SubType.FOREST, SubType.ISLAND); this.addAbility(new GreenManaAbility()); this.addAbility(new BlueManaAbility()); this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new PayLifeCost(2)), "you may pay 2 life. If you don't, Breeding Pool enters the battlefield tapped")); diff --git a/Mage.Sets/src/mage/cards/b/BrineShaman.java b/Mage.Sets/src/mage/cards/b/BrineShaman.java index 95b315b4a45..1a36569a763 100644 --- a/Mage.Sets/src/mage/cards/b/BrineShaman.java +++ b/Mage.Sets/src/mage/cards/b/BrineShaman.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -40,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterSpell; import mage.filter.predicate.Predicates; @@ -48,6 +48,8 @@ import mage.target.TargetSpell; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -63,9 +65,7 @@ public class BrineShaman extends CardImpl { public BrineShaman(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.subtype.add("Shaman"); + this.subtype.add(SubType.HUMAN, SubType.CLERIC, SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BriselaVoiceOfNightmares.java b/Mage.Sets/src/mage/cards/b/BriselaVoiceOfNightmares.java index b7a1df10515..71169692a65 100644 --- a/Mage.Sets/src/mage/cards/b/BriselaVoiceOfNightmares.java +++ b/Mage.Sets/src/mage/cards/b/BriselaVoiceOfNightmares.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -45,6 +44,8 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,7 +55,6 @@ public class BriselaVoiceOfNightmares extends MeldCard { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ELDRAZI, SubType.ANGEL); - this.subtype.add("Angel"); this.power = new MageInt(9); this.toughness = new MageInt(10); diff --git a/Mage.Sets/src/mage/cards/b/BrownOuphe.java b/Mage.Sets/src/mage/cards/b/BrownOuphe.java index 5addadf05ca..0e8014f0325 100644 --- a/Mage.Sets/src/mage/cards/b/BrownOuphe.java +++ b/Mage.Sets/src/mage/cards/b/BrownOuphe.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -38,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; import mage.constants.CardType; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterStackObject; import mage.filter.predicate.Predicate; @@ -45,6 +45,8 @@ import mage.game.Game; import mage.game.stack.StackAbility; import mage.target.common.TargetActivatedOrTriggeredAbility; +import java.util.UUID; + /** * * @author TheElk801 @@ -60,7 +62,7 @@ public class BrownOuphe extends CardImpl { public BrownOuphe(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); - this.subtype.add("Ouphe"); + this.subtype.add(SubType.OUPHE); this.power = new MageInt(1); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/b/BudokaGardener.java b/Mage.Sets/src/mage/cards/b/BudokaGardener.java index 8375f29660c..de109a0e976 100644 --- a/Mage.Sets/src/mage/cards/b/BudokaGardener.java +++ b/Mage.Sets/src/mage/cards/b/BudokaGardener.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -47,6 +46,8 @@ import mage.game.permanent.token.DokaiWeaverofLifeToken; import mage.game.permanent.token.Token; import mage.players.Player; +import java.util.UUID; + /** * @author Loki */ @@ -117,8 +118,7 @@ class DokaiWeaverofLife extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Human"); - subtype.add("Monk"); + subtype.add(SubType.HUMAN, SubType.MONK); power = new MageInt(3); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BudokaPupil.java b/Mage.Sets/src/mage/cards/b/BudokaPupil.java index 9f528558e72..a1a0d1cb7d7 100644 --- a/Mage.Sets/src/mage/cards/b/BudokaPupil.java +++ b/Mage.Sets/src/mage/cards/b/BudokaPupil.java @@ -27,7 +27,6 @@ */ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.OnEventTriggeredAbility; @@ -49,6 +48,8 @@ import mage.game.events.GameEvent; import mage.game.permanent.token.Token; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -91,7 +92,7 @@ class IchigaWhoTopplesOaks extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setGreen(true); - subtype.add("Spirit"); + subtype.add(SubType.SPIRIT); power = new MageInt(4); toughness = new MageInt(3); diff --git a/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java b/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java index c3f55af8a1a..95874348dc6 100644 --- a/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java +++ b/Mage.Sets/src/mage/cards/b/BushiTenderfoot.java @@ -30,7 +30,6 @@ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.DealtDamageAndDiedTriggeredAbility; import mage.abilities.effects.Effect; @@ -46,6 +45,8 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.WasDealtDamageThisTurnPredicate; import mage.game.permanent.token.Token; +import java.util.UUID; + /** * @author LevelX */ @@ -89,8 +90,7 @@ class KenzoTheHardhearted extends Token { addSuperType(SuperType.LEGENDARY); cardType.add(CardType.CREATURE); color.setWhite(true); - subtype.add("Human"); - subtype.add("Samurai"); + subtype.add(SubType.HUMAN, SubType.SAMURAI); power = new MageInt(3); toughness = new MageInt(4); From 5d85874284d3a0ff1c547b142597585f7cd3e7f2 Mon Sep 17 00:00:00 2001 From: igoudt Date: Mon, 28 Aug 2017 12:30:27 +0200 Subject: [PATCH 5/9] subtypes for a --- Mage.Sets/src/mage/cards/a/AirBladder.java | 14 ++++++-------- .../src/mage/cards/a/AphettoExterminator.java | 7 ++++--- .../src/mage/cards/a/ArahboRoarOfTheWorld.java | 16 ++++------------ Mage.Sets/src/mage/cards/a/ArcboundFiend.java | 6 ++++-- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AirBladder.java b/Mage.Sets/src/mage/cards/a/AirBladder.java index f4b74539059..99fc7e6e817 100644 --- a/Mage.Sets/src/mage/cards/a/AirBladder.java +++ b/Mage.Sets/src/mage/cards/a/AirBladder.java @@ -27,22 +27,20 @@ */ package mage.cards.a; -import java.util.UUID; -import mage.target.common.TargetCreaturePermanent; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.combat.CanBlockOnlyFlyingAttachedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; -import mage.constants.Outcome; -import mage.target.TargetPermanent; import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.Zone; +import mage.constants.*; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; /** * @@ -53,7 +51,7 @@ public class AirBladder extends CardImpl { public AirBladder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); - this.subtype.add("Aura"); + this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); diff --git a/Mage.Sets/src/mage/cards/a/AphettoExterminator.java b/Mage.Sets/src/mage/cards/a/AphettoExterminator.java index d2aa49be395..85e5ebff752 100644 --- a/Mage.Sets/src/mage/cards/a/AphettoExterminator.java +++ b/Mage.Sets/src/mage/cards/a/AphettoExterminator.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; @@ -38,8 +37,11 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SubType; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -49,8 +51,7 @@ public class AphettoExterminator extends CardImpl { public AphettoExterminator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); - this.subtype.add("Human"); - this.subtype.add("Wizard"); + this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(3); this.toughness = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java b/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java index a79507d3cf0..d8feae173b7 100644 --- a/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java +++ b/Mage.Sets/src/mage/cards/a/ArahboRoarOfTheWorld.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; @@ -36,7 +35,6 @@ import mage.abilities.condition.common.SourceOnBattlefieldOrCommandZoneCondition import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.continuous.BoostTargetEffect; @@ -44,14 +42,7 @@ import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AbilityWord; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; @@ -62,6 +53,8 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author TheElk801 @@ -84,8 +77,7 @@ public class ArahboRoarOfTheWorld extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); - this.subtype.add("Cat"); - this.subtype.add("Avatar"); + this.subtype.add(SubType.CAT, SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/a/ArcboundFiend.java b/Mage.Sets/src/mage/cards/a/ArcboundFiend.java index 9afa80df664..83713be4926 100644 --- a/Mage.Sets/src/mage/cards/a/ArcboundFiend.java +++ b/Mage.Sets/src/mage/cards/a/ArcboundFiend.java @@ -27,7 +27,6 @@ */ package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -38,6 +37,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SubType; import mage.constants.TargetController; import mage.counters.CounterType; import mage.game.Game; @@ -45,6 +45,8 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -54,7 +56,7 @@ public class ArcboundFiend extends CardImpl { public ArcboundFiend(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{6}"); - this.subtype.add("Horror"); + this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); From 5660348f98790e0c04062b13bd6b4b33ef952b75 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 28 Aug 2017 12:44:08 +0200 Subject: [PATCH 6/9] C17 Added Alms Collector. --- Mage.Sets/src/mage/cards/a/AlmsCollector.java | 125 +++++++++++ Mage.Sets/src/mage/sets/Commander2017.java | 207 +++++++++--------- .../java/mage/actions/MageDrawAction.java | 52 +++-- .../main/java/mage/game/events/GameEvent.java | 4 +- 4 files changed, 259 insertions(+), 129 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/a/AlmsCollector.java diff --git a/Mage.Sets/src/mage/cards/a/AlmsCollector.java b/Mage.Sets/src/mage/cards/a/AlmsCollector.java new file mode 100644 index 00000000000..188ae36118c --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AlmsCollector.java @@ -0,0 +1,125 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class AlmsCollector extends CardImpl { + + public AlmsCollector(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.CAT, SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // If an opponent would draw two or more cards, instead you and that player each draw a card. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AlmsCollectorReplacementEffect())); + } + + public AlmsCollector(final AlmsCollector card) { + super(card); + } + + @Override + public AlmsCollector copy() { + return new AlmsCollector(this); + } +} + +class AlmsCollectorReplacementEffect extends ReplacementEffectImpl { + + public AlmsCollectorReplacementEffect() { + super(Duration.WhileOnBattlefield, Outcome.DrawCard); + staticText = "If an opponent would draw two or more cards, instead you and that player each draw a card"; + } + + public AlmsCollectorReplacementEffect(final AlmsCollectorReplacementEffect effect) { + super(effect); + } + + @Override + public AlmsCollectorReplacementEffect copy() { + return new AlmsCollectorReplacementEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player controller = game.getPlayer(source.getControllerId()); + Player opponent = game.getPlayer(event.getPlayerId()); + if (controller != null && opponent != null) { + controller.drawCards(1, game, event.getAppliedEffects()); + opponent.drawCards(1, game, event.getAppliedEffects()); + return true; + } + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DRAW_CARDS; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getAmount() > 1) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null && controller.hasOpponent(event.getPlayerId(), game)) { + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/Commander2017.java b/Mage.Sets/src/mage/sets/Commander2017.java index 85676e74e01..ed00435de7c 100644 --- a/Mage.Sets/src/mage/sets/Commander2017.java +++ b/Mage.Sets/src/mage/sets/Commander2017.java @@ -1,103 +1,104 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.sets; - -import mage.cards.ExpansionSet; -import mage.constants.Rarity; -import mage.constants.SetType; - -/** - * - * @author fireshoes - */ -public class Commander2017 extends ExpansionSet { - - private static final Commander2017 instance = new Commander2017(); - - public static Commander2017 getInstance() { - return instance; - } - - private Commander2017() { - super("Commander 2017 Edition", "C17", ExpansionSet.buildDate(2017, 8, 25), SetType.SUPPLEMENTAL); - this.blockName = "Command Zone"; - - cards.add(new SetCardInfo("Arahbo, Roar of the World", 35, Rarity.MYTHIC, mage.cards.a.ArahboRoarOfTheWorld.class)); - cards.add(new SetCardInfo("Balan, Wandering Knight", 2, Rarity.RARE, mage.cards.b.BalanWanderingKnight.class)); - cards.add(new SetCardInfo("Bloodforged Battle-Axe", 50, Rarity.RARE, mage.cards.b.BloodforgedBattleAxe.class)); - cards.add(new SetCardInfo("Bloodline Necromancer", 14, Rarity.UNCOMMON, mage.cards.b.BloodlineNecromancer.class)); - cards.add(new SetCardInfo("Bloodsworn Steward", 22, Rarity.RARE, mage.cards.b.BloodswornSteward.class)); - cards.add(new SetCardInfo("Boneyard Scourge", 15, Rarity.RARE, mage.cards.b.BoneyardScourge.class)); - cards.add(new SetCardInfo("Crimson Honor Guard", 23, Rarity.RARE, mage.cards.c.CrimsonHonorGuard.class)); - cards.add(new SetCardInfo("Curse of Bounty", 30, Rarity.UNCOMMON, mage.cards.c.CurseOfBounty.class)); - cards.add(new SetCardInfo("Curse of Disturbance", 16, Rarity.UNCOMMON, mage.cards.c.CurseOfDisturbance.class)); - cards.add(new SetCardInfo("Curse of Opulence", 24, Rarity.UNCOMMON, mage.cards.c.CurseOfOpulence.class)); - cards.add(new SetCardInfo("Curse of Verbosity", 9, Rarity.UNCOMMON, mage.cards.c.CurseOfVerbosity.class)); - cards.add(new SetCardInfo("Curse of Vitality", 3, Rarity.UNCOMMON, mage.cards.c.CurseOfVitality.class)); - cards.add(new SetCardInfo("Disrupt Decorum", 25, Rarity.RARE, mage.cards.d.DisruptDecorum.class)); - cards.add(new SetCardInfo("Edgar Markov", 36, Rarity.MYTHIC, mage.cards.e.EdgarMarkov.class)); - cards.add(new SetCardInfo("Fortunate Few", 4, Rarity.RARE, mage.cards.f.FortunateFew.class)); - cards.add(new SetCardInfo("Fractured Identity", 37, Rarity.RARE, mage.cards.f.FracturedIdentity.class)); - cards.add(new SetCardInfo("Galecaster Colossus", 10, Rarity.RARE, mage.cards.g.GalecasterColossus.class)); - cards.add(new SetCardInfo("Hammer of Nazahn", 51, Rarity.RARE, mage.cards.h.HammerOfNazahn.class)); - cards.add(new SetCardInfo("Herald's Horn", 53, Rarity.UNCOMMON, mage.cards.h.HeraldsHorn.class)); - cards.add(new SetCardInfo("Heirloom Blade", 52, Rarity.UNCOMMON, mage.cards.h.HeirloomBlade.class)); - cards.add(new SetCardInfo("Hungry Lynx", 31, Rarity.RARE, mage.cards.h.HungryLynx.class)); - cards.add(new SetCardInfo("Inalla, Archmage Ritualist", 38, Rarity.MYTHIC, mage.cards.i.InallaArchmageRitualist.class)); - cards.add(new SetCardInfo("Izzet Chemister", 26, Rarity.RARE, mage.cards.i.IzzetChemister.class)); - cards.add(new SetCardInfo("Kess, Dissident Mage", 39, Rarity.MYTHIC, mage.cards.k.KessDissidentMage.class)); - cards.add(new SetCardInfo("Kheru Mind-Eater", 17, Rarity.RARE, mage.cards.k.KheruMindEater.class)); - cards.add(new SetCardInfo("Kindred Boon", 5, Rarity.RARE, mage.cards.k.KindredBoon.class)); - cards.add(new SetCardInfo("Kindred Charge", 27, Rarity.RARE, mage.cards.k.KindredCharge.class)); - cards.add(new SetCardInfo("Kindred Discovery", 11, Rarity.RARE, mage.cards.k.KindredDiscovery.class)); - cards.add(new SetCardInfo("Kindred Dominance", 18, Rarity.RARE, mage.cards.k.KindredDominance.class)); - cards.add(new SetCardInfo("Kindred Summons", 32, Rarity.RARE, mage.cards.k.KindredSummons.class)); - cards.add(new SetCardInfo("Licia, Sanguine Tribune", 40, Rarity.MYTHIC, mage.cards.l.LiciaSanguineTribune.class)); - cards.add(new SetCardInfo("Magus of the Mind", 12, Rarity.RARE, mage.cards.m.MagusOfTheMind.class)); - cards.add(new SetCardInfo("Mairsil, the Pretender", 41, Rarity.MYTHIC, mage.cards.m.MairsilThePretender.class)); - cards.add(new SetCardInfo("Mathas, Fiend Seeker", 42, Rarity.MYTHIC, mage.cards.m.MathasFiendSeeker.class)); - cards.add(new SetCardInfo("Mirri, Weatherlight Duelist", 43, Rarity.MYTHIC, mage.cards.m.MirriWeatherlightDuelist.class)); - cards.add(new SetCardInfo("Mirror of the Forebears", 54, Rarity.UNCOMMON, mage.cards.m.MirrorOfTheForebears.class)); - cards.add(new SetCardInfo("Nazahn, Revered Bladesmith", 44, Rarity.MYTHIC, mage.cards.n.NazahnReveredBladesmith.class)); - cards.add(new SetCardInfo("O-Kagachi, Vengeful Kami", 45, Rarity.MYTHIC, mage.cards.o.OKagachiVengefulKami.class)); - cards.add(new SetCardInfo("Path of Ancestry", 56, Rarity.COMMON, mage.cards.p.PathOfAncestry.class)); - cards.add(new SetCardInfo("Patron of the Vein", 20, Rarity.RARE, mage.cards.p.PatronOfTheVein.class)); - cards.add(new SetCardInfo("Qasali Slingers", 33, Rarity.RARE, mage.cards.q.QasaliSlingers.class)); - cards.add(new SetCardInfo("Ramos, Dragon Engine", 55, Rarity.MYTHIC, mage.cards.r.RamosDragonEngine.class)); - cards.add(new SetCardInfo("Scalelord Reckoner", 6, Rarity.RARE, mage.cards.s.ScalelordReckoner.class)); - cards.add(new SetCardInfo("Shifting Shadow", 28, Rarity.RARE, mage.cards.s.ShiftingShadow.class)); - cards.add(new SetCardInfo("Taigam, Ojutai Master", 46, Rarity.MYTHIC, mage.cards.t.TaigamOjutaiMaster.class)); - cards.add(new SetCardInfo("Taigam, Sidisi's Hand", 47, Rarity.RARE, mage.cards.t.TaigamSidisisHand.class)); - cards.add(new SetCardInfo("Teferi's Protection", 8, Rarity.RARE, mage.cards.t.TeferisProtection.class)); - cards.add(new SetCardInfo("Territorial Hellkite", 29, Rarity.RARE, mage.cards.t.TerritorialHellkite.class)); - cards.add(new SetCardInfo("The Ur-Dragon", 48, Rarity.MYTHIC, mage.cards.t.TheUrDragon.class)); - cards.add(new SetCardInfo("Traverse the Outlands", 34, Rarity.RARE, mage.cards.t.TraverseTheOutlands.class)); - cards.add(new SetCardInfo("Vindictive Lich", 21, Rarity.RARE, mage.cards.v.VindictiveLich.class)); - cards.add(new SetCardInfo("Wasitora, Nekoru Queen", 49, Rarity.MYTHIC, mage.cards.w.WasitoraNekoruQueen.class)); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets; + +import mage.cards.ExpansionSet; +import mage.constants.Rarity; +import mage.constants.SetType; + +/** + * + * @author fireshoes + */ +public class Commander2017 extends ExpansionSet { + + private static final Commander2017 instance = new Commander2017(); + + public static Commander2017 getInstance() { + return instance; + } + + private Commander2017() { + super("Commander 2017 Edition", "C17", ExpansionSet.buildDate(2017, 8, 25), SetType.SUPPLEMENTAL); + this.blockName = "Command Zone"; + + cards.add(new SetCardInfo("Alms Collector", 1, Rarity.RARE, mage.cards.a.AlmsCollector.class)); + cards.add(new SetCardInfo("Arahbo, Roar of the World", 35, Rarity.MYTHIC, mage.cards.a.ArahboRoarOfTheWorld.class)); + cards.add(new SetCardInfo("Balan, Wandering Knight", 2, Rarity.RARE, mage.cards.b.BalanWanderingKnight.class)); + cards.add(new SetCardInfo("Bloodforged Battle-Axe", 50, Rarity.RARE, mage.cards.b.BloodforgedBattleAxe.class)); + cards.add(new SetCardInfo("Bloodline Necromancer", 14, Rarity.UNCOMMON, mage.cards.b.BloodlineNecromancer.class)); + cards.add(new SetCardInfo("Bloodsworn Steward", 22, Rarity.RARE, mage.cards.b.BloodswornSteward.class)); + cards.add(new SetCardInfo("Boneyard Scourge", 15, Rarity.RARE, mage.cards.b.BoneyardScourge.class)); + cards.add(new SetCardInfo("Crimson Honor Guard", 23, Rarity.RARE, mage.cards.c.CrimsonHonorGuard.class)); + cards.add(new SetCardInfo("Curse of Bounty", 30, Rarity.UNCOMMON, mage.cards.c.CurseOfBounty.class)); + cards.add(new SetCardInfo("Curse of Disturbance", 16, Rarity.UNCOMMON, mage.cards.c.CurseOfDisturbance.class)); + cards.add(new SetCardInfo("Curse of Opulence", 24, Rarity.UNCOMMON, mage.cards.c.CurseOfOpulence.class)); + cards.add(new SetCardInfo("Curse of Verbosity", 9, Rarity.UNCOMMON, mage.cards.c.CurseOfVerbosity.class)); + cards.add(new SetCardInfo("Curse of Vitality", 3, Rarity.UNCOMMON, mage.cards.c.CurseOfVitality.class)); + cards.add(new SetCardInfo("Disrupt Decorum", 25, Rarity.RARE, mage.cards.d.DisruptDecorum.class)); + cards.add(new SetCardInfo("Edgar Markov", 36, Rarity.MYTHIC, mage.cards.e.EdgarMarkov.class)); + cards.add(new SetCardInfo("Fortunate Few", 4, Rarity.RARE, mage.cards.f.FortunateFew.class)); + cards.add(new SetCardInfo("Fractured Identity", 37, Rarity.RARE, mage.cards.f.FracturedIdentity.class)); + cards.add(new SetCardInfo("Galecaster Colossus", 10, Rarity.RARE, mage.cards.g.GalecasterColossus.class)); + cards.add(new SetCardInfo("Hammer of Nazahn", 51, Rarity.RARE, mage.cards.h.HammerOfNazahn.class)); + cards.add(new SetCardInfo("Herald's Horn", 53, Rarity.UNCOMMON, mage.cards.h.HeraldsHorn.class)); + cards.add(new SetCardInfo("Heirloom Blade", 52, Rarity.UNCOMMON, mage.cards.h.HeirloomBlade.class)); + cards.add(new SetCardInfo("Hungry Lynx", 31, Rarity.RARE, mage.cards.h.HungryLynx.class)); + cards.add(new SetCardInfo("Inalla, Archmage Ritualist", 38, Rarity.MYTHIC, mage.cards.i.InallaArchmageRitualist.class)); + cards.add(new SetCardInfo("Izzet Chemister", 26, Rarity.RARE, mage.cards.i.IzzetChemister.class)); + cards.add(new SetCardInfo("Kess, Dissident Mage", 39, Rarity.MYTHIC, mage.cards.k.KessDissidentMage.class)); + cards.add(new SetCardInfo("Kheru Mind-Eater", 17, Rarity.RARE, mage.cards.k.KheruMindEater.class)); + cards.add(new SetCardInfo("Kindred Boon", 5, Rarity.RARE, mage.cards.k.KindredBoon.class)); + cards.add(new SetCardInfo("Kindred Charge", 27, Rarity.RARE, mage.cards.k.KindredCharge.class)); + cards.add(new SetCardInfo("Kindred Discovery", 11, Rarity.RARE, mage.cards.k.KindredDiscovery.class)); + cards.add(new SetCardInfo("Kindred Dominance", 18, Rarity.RARE, mage.cards.k.KindredDominance.class)); + cards.add(new SetCardInfo("Kindred Summons", 32, Rarity.RARE, mage.cards.k.KindredSummons.class)); + cards.add(new SetCardInfo("Licia, Sanguine Tribune", 40, Rarity.MYTHIC, mage.cards.l.LiciaSanguineTribune.class)); + cards.add(new SetCardInfo("Magus of the Mind", 12, Rarity.RARE, mage.cards.m.MagusOfTheMind.class)); + cards.add(new SetCardInfo("Mairsil, the Pretender", 41, Rarity.MYTHIC, mage.cards.m.MairsilThePretender.class)); + cards.add(new SetCardInfo("Mathas, Fiend Seeker", 42, Rarity.MYTHIC, mage.cards.m.MathasFiendSeeker.class)); + cards.add(new SetCardInfo("Mirri, Weatherlight Duelist", 43, Rarity.MYTHIC, mage.cards.m.MirriWeatherlightDuelist.class)); + cards.add(new SetCardInfo("Mirror of the Forebears", 54, Rarity.UNCOMMON, mage.cards.m.MirrorOfTheForebears.class)); + cards.add(new SetCardInfo("Nazahn, Revered Bladesmith", 44, Rarity.MYTHIC, mage.cards.n.NazahnReveredBladesmith.class)); + cards.add(new SetCardInfo("O-Kagachi, Vengeful Kami", 45, Rarity.MYTHIC, mage.cards.o.OKagachiVengefulKami.class)); + cards.add(new SetCardInfo("Path of Ancestry", 56, Rarity.COMMON, mage.cards.p.PathOfAncestry.class)); + cards.add(new SetCardInfo("Patron of the Vein", 20, Rarity.RARE, mage.cards.p.PatronOfTheVein.class)); + cards.add(new SetCardInfo("Qasali Slingers", 33, Rarity.RARE, mage.cards.q.QasaliSlingers.class)); + cards.add(new SetCardInfo("Ramos, Dragon Engine", 55, Rarity.MYTHIC, mage.cards.r.RamosDragonEngine.class)); + cards.add(new SetCardInfo("Scalelord Reckoner", 6, Rarity.RARE, mage.cards.s.ScalelordReckoner.class)); + cards.add(new SetCardInfo("Shifting Shadow", 28, Rarity.RARE, mage.cards.s.ShiftingShadow.class)); + cards.add(new SetCardInfo("Taigam, Ojutai Master", 46, Rarity.MYTHIC, mage.cards.t.TaigamOjutaiMaster.class)); + cards.add(new SetCardInfo("Taigam, Sidisi's Hand", 47, Rarity.RARE, mage.cards.t.TaigamSidisisHand.class)); + cards.add(new SetCardInfo("Teferi's Protection", 8, Rarity.RARE, mage.cards.t.TeferisProtection.class)); + cards.add(new SetCardInfo("Territorial Hellkite", 29, Rarity.RARE, mage.cards.t.TerritorialHellkite.class)); + cards.add(new SetCardInfo("The Ur-Dragon", 48, Rarity.MYTHIC, mage.cards.t.TheUrDragon.class)); + cards.add(new SetCardInfo("Traverse the Outlands", 34, Rarity.RARE, mage.cards.t.TraverseTheOutlands.class)); + cards.add(new SetCardInfo("Vindictive Lich", 21, Rarity.RARE, mage.cards.v.VindictiveLich.class)); + cards.add(new SetCardInfo("Wasitora, Nekoru Queen", 49, Rarity.MYTHIC, mage.cards.w.WasitoraNekoruQueen.class)); + } +} diff --git a/Mage/src/main/java/mage/actions/MageDrawAction.java b/Mage/src/main/java/mage/actions/MageDrawAction.java index 89ea2c89fb8..dba094ec986 100644 --- a/Mage/src/main/java/mage/actions/MageDrawAction.java +++ b/Mage/src/main/java/mage/actions/MageDrawAction.java @@ -1,5 +1,8 @@ package mage.actions; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import mage.actions.impl.MageAction; import mage.actions.score.ArtificialScoringSystem; import mage.cards.Card; @@ -9,10 +12,6 @@ import mage.game.events.GameEvent; import mage.players.Player; import mage.util.CardUtil; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - /** * Action for drawing cards. * @@ -20,12 +19,13 @@ import java.util.UUID; */ public class MageDrawAction extends MageAction { + private static final int NEGATIVE_VALUE = -1000000; + private final Player player; - private final int amount; private final List appliedEffects; private final List drawnCards; - private static final int NEGATIVE_VALUE = -1000000; + private int amount; public MageDrawAction(Player player, int amount, List appliedEffects) { this.player = player; @@ -44,27 +44,31 @@ public class MageDrawAction extends MageAction { public int doAction(Game game) { int numDrawn = 0; int score = 0; - for (int i = 0; i < amount; i++) { - int value = drawCard(game); - if (value == NEGATIVE_VALUE) { - continue; + GameEvent event = GameEvent.getEvent(GameEvent.EventType.DRAW_CARDS, player.getId(), null, player.getId(), null, amount); + event.addAppliedEffects(appliedEffects); + if (amount < 2 || !game.replaceEvent(event)) { + amount = event.getAmount(); + for (int i = 0; i < amount; i++) { + int value = drawCard(game); + if (value == NEGATIVE_VALUE) { + continue; + } + numDrawn++; + score += value; } - numDrawn++; - score += value; - } - if (!player.isTopCardRevealed() && numDrawn > 0) { - game.fireInformEvent(player.getLogName() + " draws " + CardUtil.numberToText(numDrawn, "a") + " card" + (numDrawn > 1 ? "s" : "")); - } - if (player.isEmptyDraw()) { - GameEvent event = GameEvent.getEvent(GameEvent.EventType.EMPTY_DRAW, player.getId(), player.getId()); - if (!game.replaceEvent(event)) { - game.doAction(new MageLoseGameAction(player, MageLoseGameAction.DRAW_REASON)); + if (!player.isTopCardRevealed() && numDrawn > 0) { + game.fireInformEvent(player.getLogName() + " draws " + CardUtil.numberToText(numDrawn, "a") + " card" + (numDrawn > 1 ? "s" : "")); } + if (player.isEmptyDraw()) { + event = GameEvent.getEvent(GameEvent.EventType.EMPTY_DRAW, player.getId(), player.getId()); + if (!game.replaceEvent(event)) { + game.doAction(new MageLoseGameAction(player, MageLoseGameAction.DRAW_REASON)); + } + } + + setScore(player, score); + game.setStateCheckRequired(); } - - setScore(player, score); - game.setStateCheckRequired(); - return numDrawn; } diff --git a/Mage/src/main/java/mage/game/events/GameEvent.java b/Mage/src/main/java/mage/game/events/GameEvent.java index 0e18ee927cd..5033931abce 100644 --- a/Mage/src/main/java/mage/game/events/GameEvent.java +++ b/Mage/src/main/java/mage/game/events/GameEvent.java @@ -27,12 +27,11 @@ */ package mage.game.events; -import mage.constants.Zone; - import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.UUID; +import mage.constants.Zone; /** * @@ -90,6 +89,7 @@ public class GameEvent implements Serializable { ZONE_CHANGE, ZONE_CHANGE_GROUP, EMPTY_DRAW, + DRAW_CARDS, // applies to an instruction to draw more than one card before any replacement effects apply to individual cards drawn DRAW_CARD, DREW_CARD, MIRACLE_CARD_REVEALED, MADNESS_CARD_EXILED, From e909f5c8011bb07c94264a0841745df5a95b8df8 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 28 Aug 2017 16:50:00 +0200 Subject: [PATCH 7/9] C17 Added Portal Mage. --- .../target/maven-archiver/pom.properties | 10 +- .../java/mage/player/ai/ComputerPlayer.java | 2 +- Mage.Sets/src/mage/cards/o/OathOfJace.java | 6 +- Mage.Sets/src/mage/cards/p/PortalMage.java | 160 ++++++++++++++++++ .../src/mage/cards/t/ToTheSlaughter.java | 3 +- Mage.Sets/src/mage/sets/Commander2017.java | 1 + .../java/org/mage/test/player/TestPlayer.java | 3 +- .../PlaneswalkerRedirectionEffect.java | 10 +- .../main/java/mage/filter/StaticFilters.java | 1 + .../main/java/mage/game/combat/Combat.java | 18 +- .../java/mage/game/combat/CombatGroup.java | 19 +++ .../mage/target/common/TargetDefender.java | 10 +- 12 files changed, 214 insertions(+), 29 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/p/PortalMage.java diff --git a/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties b/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties index 8a2cedc90dc..d7097083df5 100644 --- a/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties +++ b/Mage.Server.Plugins/Mage.Game.PennyDreadfulCommanderFreeForAll/target/maven-archiver/pom.properties @@ -1,5 +1,5 @@ -#Generated by Maven -#Tue Aug 15 00:36:02 CEST 2017 -version=1.4.26 -groupId=org.mage -artifactId=mage-game-pennydreadfulcommanderfreeforall +#Generated by Maven +#Mon Aug 28 09:53:46 CEST 2017 +version=1.4.26 +groupId=org.mage +artifactId=mage-game-pennydreadfulcommanderfreeforall diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 20201a7e306..27129fed99c 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -680,7 +680,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (target.getOriginalTarget() instanceof TargetDefender) { // TODO: Improve, now planeswalker is always chosen if it exits List targets; - targets = game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), randomOpponentId, game); + targets = game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, randomOpponentId, game); if (targets != null && !targets.isEmpty()) { for (Permanent planeswalker : targets) { if (target.canTarget(getId(), planeswalker.getId(), source, game)) { diff --git a/Mage.Sets/src/mage/cards/o/OathOfJace.java b/Mage.Sets/src/mage/cards/o/OathOfJace.java index ae036ea5195..5e17e2e9b1e 100644 --- a/Mage.Sets/src/mage/cards/o/OathOfJace.java +++ b/Mage.Sets/src/mage/cards/o/OathOfJace.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.TargetController; -import mage.filter.common.FilterPlaneswalkerPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; @@ -50,7 +50,7 @@ import mage.players.Player; public class OathOfJace extends CardImpl { public OathOfJace(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); addSuperType(SuperType.LEGENDARY); // When Oath of Jace enters the battlefield, draw three cards, then discard two cards. @@ -91,7 +91,7 @@ class OathOfJaceEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - int planeswalker = game.getBattlefield().countAll(new FilterPlaneswalkerPermanent(), source.getControllerId(), game); + int planeswalker = game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_PLANESWALKER, source.getControllerId(), game); if (planeswalker > 0) { controller.scry(planeswalker, source, game); } diff --git a/Mage.Sets/src/mage/cards/p/PortalMage.java b/Mage.Sets/src/mage/cards/p/PortalMage.java new file mode 100644 index 00000000000..0d311349b81 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PortalMage.java @@ -0,0 +1,160 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.p; + +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.IsStepCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.filter.StaticFilters; +import mage.filter.common.FilterAttackingCreature; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetDefender; + +/** + * + * @author LevelX2 + */ +public class PortalMage extends CardImpl { + + public PortalMage(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // If Portal Mage enters the battlefield during the declare attackers step, you may reselect the player or planeswalker that the target attacking creature attacks. + Ability ability = new ConditionalTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new PortalMageEffect(), true), + new IsStepCondition(PhaseStep.DECLARE_ATTACKERS, false), + "If {this} enters the battlefield during the declare attackers step, you may reselect the player or planeswalker that the target attacking creature attacks. " + + "(It can't attack its controller or its controller's planeswalkers.)"); + ability.addTarget(new TargetCreaturePermanent(new FilterAttackingCreature())); + this.addAbility(ability); + } + + public PortalMage(final PortalMage card) { + super(card); + } + + @Override + public PortalMage copy() { + return new PortalMage(this); + } +} + +class PortalMageEffect extends OneShotEffect { + + public PortalMageEffect() { + super(Outcome.Benefit); + this.staticText = "you may reselect the player or planeswalker that the target attacking creature attacks"; + } + + public PortalMageEffect(final PortalMageEffect effect) { + super(effect); + } + + @Override + public PortalMageEffect copy() { + return new PortalMageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent attackingCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (attackingCreature != null) { + CombatGroup combatGroupTarget = null; + for (CombatGroup combatGroup : game.getCombat().getGroups()) { + if (combatGroup.getAttackers().contains(attackingCreature.getId())) { + combatGroupTarget = combatGroup; + break; + } + } + if (combatGroupTarget == null) { + return false; + } + // Reselecting which player or planeswalker a creature is attacking ignores all requirements, + // restrictions, and costs associated with attacking. + + // Update possible defender + Set defenders = new LinkedHashSet<>(); + for (UUID playerId : game.getCombat().getAttackablePlayers(game)) { + defenders.add(playerId); + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, playerId, game)) { + defenders.add(permanent.getId()); + } + } + // Select the new defender + TargetDefender target = new TargetDefender(defenders, null); + target.setNotTarget(true); // player or planswalker hexproof does not prevent attacking a player + if (controller.chooseTarget(Outcome.Damage, target, source, game)) { + if (!combatGroupTarget.getDefenderId().equals(target.getFirstTarget())) { + if (combatGroupTarget.changeDefenderPostDeclaration(target.getFirstTarget(), game)) { + String attacked = ""; + Player player = game.getPlayer(target.getFirstTarget()); + if (player != null) { + attacked = player.getLogName(); + } else { + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + attacked = permanent.getLogName(); + } + } + game.informPlayers(attackingCreature.getLogName() + " attacks now " + attacked); + return true; + } + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java b/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java index 5936bfe4664..b0a42032451 100644 --- a/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java +++ b/Mage.Sets/src/mage/cards/t/ToTheSlaughter.java @@ -37,7 +37,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.StaticFilters; import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; -import mage.filter.common.FilterPlaneswalkerPermanent; import mage.target.TargetPlayer; /** @@ -61,7 +60,7 @@ public class ToTheSlaughter extends CardImpl { DeliriumCondition.instance, "
Delirium — If there are four or more card types among cards in your graveyard, instead that player sacrifices a creature")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new SacrificeEffect(new FilterPlaneswalkerPermanent(), 1, "Target player"), + new SacrificeEffect(StaticFilters.FILTER_PERMANENT_PLANESWALKER, 1, "Target player"), DeliriumCondition.instance, "and a planeswalker.")); this.getSpellAbility().addTarget(new TargetPlayer()); } diff --git a/Mage.Sets/src/mage/sets/Commander2017.java b/Mage.Sets/src/mage/sets/Commander2017.java index ed00435de7c..f74fc1779ba 100644 --- a/Mage.Sets/src/mage/sets/Commander2017.java +++ b/Mage.Sets/src/mage/sets/Commander2017.java @@ -88,6 +88,7 @@ public class Commander2017 extends ExpansionSet { cards.add(new SetCardInfo("O-Kagachi, Vengeful Kami", 45, Rarity.MYTHIC, mage.cards.o.OKagachiVengefulKami.class)); cards.add(new SetCardInfo("Path of Ancestry", 56, Rarity.COMMON, mage.cards.p.PathOfAncestry.class)); cards.add(new SetCardInfo("Patron of the Vein", 20, Rarity.RARE, mage.cards.p.PatronOfTheVein.class)); + cards.add(new SetCardInfo("Portal Mage", 13, Rarity.RARE, mage.cards.p.PortalMage.class)); cards.add(new SetCardInfo("Qasali Slingers", 33, Rarity.RARE, mage.cards.q.QasaliSlingers.class)); cards.add(new SetCardInfo("Ramos, Dragon Engine", 55, Rarity.MYTHIC, mage.cards.r.RamosDragonEngine.class)); cards.add(new SetCardInfo("Scalelord Reckoner", 6, Rarity.RARE, mage.cards.s.ScalelordReckoner.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index ce65580ab56..74a9d873994 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -51,6 +51,7 @@ import mage.counters.Counter; import mage.counters.Counters; import mage.filter.Filter; import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; import mage.filter.common.*; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.NamePredicate; @@ -594,7 +595,7 @@ public class TestPlayer implements Player { String group = groups[i]; if (group.startsWith("planeswalker=")) { String planeswalkerName = group.substring(group.indexOf("planeswalker=") + 13); - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterPlaneswalkerPermanent(), game)) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, game)) { if (permanent.getName().equals(planeswalkerName)) { defenderId = permanent.getId(); } diff --git a/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java index be713663adb..00857194670 100644 --- a/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java @@ -32,7 +32,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.constants.Duration; import mage.constants.Outcome; -import mage.filter.common.FilterPlaneswalkerPermanent; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.DamageEvent; import mage.game.events.GameEvent; @@ -48,8 +48,6 @@ import mage.target.TargetPermanent; */ public class PlaneswalkerRedirectionEffect extends RedirectionEffect { - private static FilterPlaneswalkerPermanent filter = new FilterPlaneswalkerPermanent(); - public PlaneswalkerRedirectionEffect() { super(Duration.EndOfGame); } @@ -76,11 +74,11 @@ public class PlaneswalkerRedirectionEffect extends RedirectionEffect { Player target = game.getPlayer(event.getTargetId()); Player player = game.getPlayer(playerId); if (target != null && player != null) { - int numPlaneswalkers = game.getBattlefield().countAll(filter, target.getId(), game); + int numPlaneswalkers = game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_PLANESWALKER, target.getId(), game); if (numPlaneswalkers > 0 && player.chooseUse(outcome, "Redirect damage to planeswalker?", source, game)) { - redirectTarget = new TargetPermanent(filter); + redirectTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_PLANESWALKER); if (numPlaneswalkers == 1) { - List planeswalker = game.getBattlefield().getAllActivePermanents(filter, target.getId(), game); + List planeswalker = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, target.getId(), game); if (!planeswalker.isEmpty()) { redirectTarget.add(planeswalker.get(0).getId(), game); } diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 8638ff9ddd1..8b0b40b5a65 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -53,6 +53,7 @@ public final class StaticFilters { public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES = new FilterCreaturePermanent("creatures"); public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent(SubType.GOBLIN, "Goblin creatures"); public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "Sliver creatures"); + public static final FilterPlaneswalkerPermanent FILTER_PERMANENT_PLANESWALKER = new FilterPlaneswalkerPermanent(); public static final FilterPermanent FILTER_PERMANENT_NON_LAND = new FilterNonlandPermanent(); diff --git a/Mage/src/main/java/mage/game/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java index 3dc593d64ca..496520ed0c4 100644 --- a/Mage/src/main/java/mage/game/combat/Combat.java +++ b/Mage/src/main/java/mage/game/combat/Combat.java @@ -40,7 +40,6 @@ import mage.filter.StaticFilters; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreatureForCombatBlock; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.common.FilterPlaneswalkerPermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -60,7 +59,6 @@ public class Combat implements Serializable, Copyable { private static final Logger logger = Logger.getLogger(Combat.class); - private static FilterPlaneswalkerPermanent filterPlaneswalker = new FilterPlaneswalkerPermanent(); private static FilterCreatureForCombatBlock filterBlockers = new FilterCreatureForCombatBlock(); // There are effects that let creatures assigns combat damage equal to its toughness rather than its power private boolean useToughnessForDamage; @@ -1026,6 +1024,13 @@ public class Combat implements Serializable, Copyable { } public void setDefenders(Game game) { + for (UUID playerId : getAttackablePlayers(game)) { + addDefender(playerId, game); + } + } + + public List getAttackablePlayers(Game game) { + List attackablePlayers = new ArrayList<>(); Player attackingPlayer = game.getPlayer(attackingPlayerId); if (attackingPlayer != null) { PlayerList players; @@ -1035,7 +1040,7 @@ public class Combat implements Serializable, Copyable { while (attackingPlayer.isInGame()) { Player opponent = players.getNext(game); if (attackingPlayer.hasOpponent(opponent.getId(), game)) { - addDefender(opponent.getId(), game); + attackablePlayers.add(opponent.getId()); break; } } @@ -1045,18 +1050,19 @@ public class Combat implements Serializable, Copyable { while (attackingPlayer.isInGame()) { Player opponent = players.getPrevious(game); if (attackingPlayer.hasOpponent(opponent.getId(), game)) { - addDefender(opponent.getId(), game); + attackablePlayers.add(opponent.getId()); break; } } break; case MULTIPLE: for (UUID opponentId : game.getOpponents(attackingPlayerId)) { - addDefender(opponentId, game); + attackablePlayers.add(opponentId); } break; } } + return attackablePlayers; } private void addDefender(UUID defenderId, Game game) { @@ -1074,7 +1080,7 @@ public class Combat implements Serializable, Copyable { } } defenders.add(defenderId); - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filterPlaneswalker, defenderId, game)) { + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, defenderId, game)) { defenders.add(permanent.getId()); } } diff --git a/Mage/src/main/java/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java index f0ecf761ea0..3b900692b7b 100644 --- a/Mage/src/main/java/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -655,4 +655,23 @@ public class CombatGroup implements Serializable, Copyable { public CombatGroup copy() { return new CombatGroup(this); } + + public boolean changeDefenderPostDeclaration(UUID newDefenderId, Game game) { + Permanent permanent = game.getPermanent(newDefenderId); + if (permanent != null) { + defenderId = newDefenderId; + defendingPlayerId = permanent.getControllerId(); + defenderIsPlaneswalker = true; + return true; + } else { + Player defender = game.getPlayer(newDefenderId); + if (defender != null) { + defenderId = newDefenderId; + defendingPlayerId = newDefenderId; + defenderIsPlaneswalker = false; + return true; + } + } + return false; + } } diff --git a/Mage/src/main/java/mage/target/common/TargetDefender.java b/Mage/src/main/java/mage/target/common/TargetDefender.java index 1fbbaaa8939..d63d1ab3535 100644 --- a/Mage/src/main/java/mage/target/common/TargetDefender.java +++ b/Mage/src/main/java/mage/target/common/TargetDefender.java @@ -34,8 +34,8 @@ import mage.MageObject; import mage.abilities.Ability; import mage.constants.Zone; import mage.filter.Filter; +import mage.filter.StaticFilters; import mage.filter.common.FilterPlaneswalkerOrPlayer; -import mage.filter.common.FilterPlaneswalkerPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -93,7 +93,7 @@ public class TargetDefender extends TargetImpl { } } } - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, sourceControllerId, game)) { if ((notTarget || permanent.canBeTargetedBy(targetSource, sourceControllerId, game)) && filter.match(permanent, game)) { count++; @@ -117,7 +117,7 @@ public class TargetDefender extends TargetImpl { } } } - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, sourceControllerId, game)) { if (filter.match(permanent, game)) { count++; if (count >= this.minNumberOfTargets) { @@ -140,7 +140,7 @@ public class TargetDefender extends TargetImpl { possibleTargets.add(playerId); } } - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, sourceControllerId, game)) { if ((notTarget || permanent.canBeTargetedBy(targetSource, sourceControllerId, game)) && filter.match(permanent, game)) { possibleTargets.add(permanent.getId()); @@ -158,7 +158,7 @@ public class TargetDefender extends TargetImpl { possibleTargets.add(playerId); } } - for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterPlaneswalkerPermanent(), sourceControllerId, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_PLANESWALKER, sourceControllerId, game)) { if (filter.match(permanent, game)) { possibleTargets.add(permanent.getId()); } From 5a3b76698787d5d7931f63aceb253164ada247ad Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 28 Aug 2017 17:24:28 +0200 Subject: [PATCH 8/9] * Wanderwine Prophets - Fixed wrong subtype of Champion ability. --- Mage.Sets/src/mage/cards/w/WanderwineProphets.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WanderwineProphets.java b/Mage.Sets/src/mage/cards/w/WanderwineProphets.java index 9858892bdf3..ec1dc319225 100644 --- a/Mage.Sets/src/mage/cards/w/WanderwineProphets.java +++ b/Mage.Sets/src/mage/cards/w/WanderwineProphets.java @@ -55,20 +55,19 @@ public class WanderwineProphets extends CardImpl { } public WanderwineProphets(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}"); - this.subtype.add("Merfolk"); - this.subtype.add("Wizard"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + this.subtype.add(SubType.MERFOLK, SubType.WIZARD); this.power = new MageInt(4); this.toughness = new MageInt(4); // Champion a Merfolk - this.addAbility(new ChampionAbility(this, SubType.MERCENARY, false)); + this.addAbility(new ChampionAbility(this, SubType.MERFOLK, false)); // Whenever Wanderwine Prophets deals combat damage to a player, you may sacrifice a Merfolk. If you do, take an extra turn after this one. Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new AddExtraTurnControllerEffect(), true); ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true))); this.addAbility(ability); - + } public WanderwineProphets(final WanderwineProphets card) { From 7f60f15bc281acf1bdfd884da652cf9312739ef5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 28 Aug 2017 17:34:41 +0200 Subject: [PATCH 9/9] * War's Toll - Fixed the land tapping effect to only tap the lands of the one opponent that tapped a land for mana. --- Mage.Sets/src/mage/cards/w/WarsToll.java | 302 +++++++++++------------ 1 file changed, 144 insertions(+), 158 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WarsToll.java b/Mage.Sets/src/mage/cards/w/WarsToll.java index bc0ab5ac593..d89629b1a09 100644 --- a/Mage.Sets/src/mage/cards/w/WarsToll.java +++ b/Mage.Sets/src/mage/cards/w/WarsToll.java @@ -1,158 +1,144 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.cards.w; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.AttacksAllTriggeredAbility; -import mage.abilities.common.TapForManaAllTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.TapAllEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SetTargetPointer; -import mage.constants.TargetController; -import mage.filter.FilterPermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; - -/** - * - * @author jeffwadsworth - */ -public class WarsToll extends CardImpl { - - private final static FilterCreaturePermanent filterOpponentCreature = new FilterCreaturePermanent("creature an opponent controls"); - private final static FilterLandPermanent filterOpponentLand = new FilterLandPermanent("an opponent taps a land"); - - static { - filterOpponentCreature.add(new ControllerPredicate(TargetController.OPPONENT)); - filterOpponentLand.add(new ControllerPredicate(TargetController.OPPONENT)); - } - - public WarsToll(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); - - // Whenever an opponent taps a land for mana, tap all lands that player controls. - Effect effect = new TapAllEffect(filterOpponentLand); - effect.setText("tap all lands that player controls"); - this.addAbility(new TapForManaAllTriggeredAbility(effect, filterOpponentLand, SetTargetPointer.PLAYER)); - - // If a creature an opponent controls attacks, all creatures that opponent controls attack if able. - this.addAbility(new AttacksAllTriggeredAbility(new WarsTollEffect(), false, filterOpponentCreature, SetTargetPointer.PERMANENT, true)); - - } - - public WarsToll(final WarsToll card) { - super(card); - } - - @Override - public WarsToll copy() { - return new WarsToll(this); - } -} - -class TapAlEffect extends OneShotEffect { - - protected FilterPermanent filter; - - public TapAlEffect(FilterPermanent filter) { - super(Outcome.Tap); - this.filter = filter; - setText(); - } - - public TapAlEffect(final TapAlEffect effect) { - super(effect); - this.filter = effect.filter.copy(); - } - - @Override - public TapAlEffect copy() { - return new TapAlEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - if (permanent.getControllerId().equals(source.getFirstTarget())) { - permanent.tap(game); - } - } - return true; - } - - private void setText() { - staticText = "tap all " + filter.getMessage(); - } - -} - -class WarsTollEffect extends OneShotEffect { - - private static final FilterCreaturePermanent filterOpponentCreatures = new FilterCreaturePermanent(); - - public WarsTollEffect() { - super(Outcome.Neutral); - staticText = "all creatures that opponent controls attack if able"; - } - - public WarsTollEffect(final WarsTollEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - Player opponent = game.getPlayer(game.getPermanent(getTargetPointer().getFirst(game, source)).getControllerId()); - if (opponent != null) { - filterOpponentCreatures.add(new ControllerIdPredicate(opponent.getId())); - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(CardType.CREATURE)) { - if (filterOpponentCreatures.match(permanent, source.getSourceId(), source.getControllerId(), game)) { - //TODO: allow the player to choose between a planeswalker and player - opponent.declareAttacker(permanent.getId(), source.getControllerId(), game, false); - } - } - return true; - } - return false; - } - - @Override - public WarsTollEffect copy() { - return new WarsTollEffect(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.w; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAllTriggeredAbility; +import mage.abilities.common.TapForManaAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class WarsToll extends CardImpl { + + private final static FilterCreaturePermanent filterOpponentCreature = new FilterCreaturePermanent("creature an opponent controls"); + private final static FilterLandPermanent filterOpponentLand = new FilterLandPermanent("an opponent taps a land"); + + static { + filterOpponentCreature.add(new ControllerPredicate(TargetController.OPPONENT)); + filterOpponentLand.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public WarsToll(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); + + // Whenever an opponent taps a land for mana, tap all lands that player controls. + this.addAbility(new TapForManaAllTriggeredAbility(new WarsTollTapEffect(), filterOpponentLand, SetTargetPointer.PLAYER)); + + // If a creature an opponent controls attacks, all creatures that opponent controls attack if able. + this.addAbility(new AttacksAllTriggeredAbility(new WarsTollEffect(), false, filterOpponentCreature, SetTargetPointer.PERMANENT, true)); + + } + + public WarsToll(final WarsToll card) { + super(card); + } + + @Override + public WarsToll copy() { + return new WarsToll(this); + } +} + +class WarsTollTapEffect extends OneShotEffect { + + public WarsTollTapEffect() { + super(Outcome.Tap); + staticText = "tap all lands that player controls"; + } + + public WarsTollTapEffect(final WarsTollTapEffect effect) { + super(effect); + } + + @Override + public WarsTollTapEffect copy() { + return new WarsTollTapEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + filter.add(new ControllerIdPredicate(getTargetPointer().getFirst(game, source))); + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + permanent.tap(game); + } + return true; + } +} + +class WarsTollEffect extends OneShotEffect { + + private static final FilterCreaturePermanent filterOpponentCreatures = new FilterCreaturePermanent(); + + public WarsTollEffect() { + super(Outcome.Neutral); + staticText = "all creatures that opponent controls attack if able"; + } + + public WarsTollEffect(final WarsTollEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player opponent = game.getPlayer(game.getPermanent(getTargetPointer().getFirst(game, source)).getControllerId()); + if (opponent != null) { + filterOpponentCreatures.add(new ControllerIdPredicate(opponent.getId())); + for (Permanent permanent : game.getBattlefield().getAllActivePermanents(CardType.CREATURE)) { + if (filterOpponentCreatures.match(permanent, source.getSourceId(), source.getControllerId(), game)) { + //TODO: allow the player to choose between a planeswalker and player + opponent.declareAttacker(permanent.getId(), source.getControllerId(), game, false); + } + } + return true; + } + return false; + } + + @Override + public WarsTollEffect copy() { + return new WarsTollEffect(this); + } +}