From e0b43883612d551873445ace182c5fc433b283d7 Mon Sep 17 00:00:00 2001 From: BetaSteward Date: Sat, 25 Sep 2010 20:35:23 +0000 Subject: [PATCH] ... --- Mage.Client/config/config.properties | 9 +- .../release/sample-decks/SanJuanMatignon.dck | Bin 0 -> 1187 bytes Mage.Client/release/startClient.bat | 6 + Mage.Client/src/mage/client/MageFrame.java | 56 ++++- Mage.Client/src/mage/client/cards/Card.java | 65 ++++-- .../src/mage/client/cards/Permanent.java | 30 +++ .../mage/client/deckeditor/CardSelector.java | 8 +- .../client/deckeditor/DeckEditorPanel.java | 12 +- .../src/mage/client/dialog/ConnectDialog.form | 33 ++- .../src/mage/client/dialog/ConnectDialog.java | 112 +++++---- .../src/mage/client/dialog/MageDialog.java | 4 +- .../mage/client/dialog/ShowCardsDialog.java | 3 +- .../mage/client/game/BattlefieldPanel.form | 9 + .../mage/client/game/BattlefieldPanel.java | 4 + .../src/mage/client/game/GamePanel.java | 23 +- .../src/mage/client/game/PlayerPanel.java | 2 +- .../src/mage/client/remote/Client.java | 8 +- .../src/mage/client/remote/Session.java | 23 +- .../src/mage/client/table/NewPlayerPanel.java | 8 +- Mage.Client/src/mage/client/util/Config.java | 3 + .../src/mage/client/util/Constants.java | 28 +-- Mage.Client/src/mage/client/util/Frames.java | 55 ++--- .../src/mage/client/util/ImageHelper.java | 101 ++++++--- Mage.Common/src/mage/view/CardView.java | 13 ++ .../src/mage/view/CombatGroupView.java | 14 +- Mage.Common/src/mage/view/GameView.java | 4 +- Mage.Common/src/mage/view/PermanentView.java | 9 +- Mage.Common/src/mage/view/PlayerView.java | 14 +- .../src/mage/player/ai/ComputerPlayer.java | 74 +++++- .../src/mage/player/ai/ComputerPlayer3.java | 14 +- .../src/mage/player/human/HumanPlayer.java | 23 +- Mage.Server/plugins/Mage.Deck.Constructed.jar | Bin 2630 -> 2630 bytes Mage.Server/plugins/Mage.Game.FreeForAll.jar | Bin 5207 -> 5207 bytes .../plugins/Mage.Game.TwoPlayerDuel.jar | Bin 4411 -> 4411 bytes Mage.Server/plugins/Mage.Player.AI.jar | Bin 57060 -> 58250 bytes Mage.Server/plugins/Mage.Player.AIMinimax.jar | Bin 70592 -> 70487 bytes Mage.Server/plugins/Mage.Player.Human.jar | Bin 19671 -> 20064 bytes Mage.Server/release/startServer.bat | 8 +- .../src/mage/server/game/TableController.java | 2 +- Mage.Sets/src/mage/sets/AlaraReborn.java | 12 +- Mage.Sets/src/mage/sets/Conflux.java | 11 +- Mage.Sets/src/mage/sets/Magic2010.java | 56 +---- Mage.Sets/src/mage/sets/Magic2011.java | 56 +---- Mage.Sets/src/mage/sets/Planechase.java | 5 +- Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java | 11 +- Mage.Sets/src/mage/sets/Sets.java | 40 +++- Mage.Sets/src/mage/sets/ShardsOfAlara.java | 20 +- Mage.Sets/src/mage/sets/Tenth.java | 8 +- Mage.Sets/src/mage/sets/Worldwake.java | 18 +- Mage.Sets/src/mage/sets/Zendikar.java | 30 +-- .../mage/sets/alarareborn/BehemothSledge.java | 8 +- .../sets/alarareborn/BituminousBlast.java | 7 +- .../mage/sets/alarareborn/BloodbraidElf.java | 7 +- .../src/mage/sets/alarareborn/FinestHour.java | 7 +- .../mage/sets/alarareborn/MaelstromPulse.java | 7 +- .../mage/sets/alarareborn/PutridLeech.java | 7 +- .../alarareborn/SpellbreakerBehemoth.java | 22 +- .../src/mage/sets/alarareborn/Terminate.java | 7 +- .../sets/alarareborn/VengefulRebirth.java | 11 +- .../src/mage/sets/conflux/CanyonMinotaur.java | 68 ++++++ .../src/mage/sets/conflux/CelestialPurge.java | 79 +++++++ .../src/mage/sets/conflux/FontOfMythos.java | 7 +- .../mage/sets/conflux/HellsparkElemental.java | 7 +- .../sets/conflux/KnightOfTheReliquary.java | 9 +- .../src/mage/sets/conflux/MartialCoup.java | 12 +- .../src/mage/sets/conflux/NobleHierarch.java | 7 +- .../src/mage/sets/conflux/PathToExile.java | 7 +- .../src/mage/sets/conflux/QuenchableFire.java | 7 +- .../src/mage/sets/conflux/Thornling.java | 7 +- .../src/mage/sets/magic2010/AcidicSlime.java | 6 +- .../mage/sets/magic2010/AcolyteOfXathrid.java | 6 +- .../src/mage/sets/magic2010/ActOfTreason.java | 10 +- .../src/mage/sets/magic2010/AirElemental.java | 6 +- .../mage/sets/magic2010/AjaniGoldmane.java | 8 +- .../mage/sets/magic2010/AlluringSiren.java | 19 +- .../mage/sets/magic2010/AngelsFeather.java | 65 +----- .../src/mage/sets/magic2010/AngelsMercy.java | 6 +- .../src/mage/sets/magic2010/AntQueen.java | 6 +- .../mage/sets/magic2010/ArmoredAscension.java | 10 +- .../src/mage/sets/magic2010/Assassinate.java | 38 +--- .../mage/sets/magic2010/AwakenerDruid.java | 6 +- .../mage/sets/magic2010/BallLightning.java | 6 +- .../mage/sets/magic2010/BaneslayerAngel.java | 6 +- .../magic2010/BerserkersOfBloodRidge.java | 6 +- .../mage/sets/magic2010/BirdsOfParadise.java | 40 +--- .../src/mage/sets/magic2010/BlackKnight.java | 6 +- .../src/mage/sets/magic2010/BlindingMage.java | 6 +- .../src/mage/sets/magic2010/BogWraith.java | 6 +- .../mage/sets/magic2010/BogardanHellkite.java | 6 +- Mage.Sets/src/mage/sets/magic2010/Cancel.java | 30 +-- .../mage/sets/magic2010/CanyonMinotaur.java | 44 ++++ .../mage/sets/magic2010/CelestialPurge.java | 42 +--- .../mage/sets/magic2010/ChandraNalaar.java | 88 +++++++ .../src/mage/sets/magic2010/ChildOfNight.java | 69 ++++++ Mage.Sets/src/mage/sets/magic2010/Clone.java | 44 ++++ .../src/mage/sets/magic2010/CudgelTroll.java | 73 ++++++ .../src/mage/sets/magic2010/Deathmark.java | 49 ++++ .../src/mage/sets/magic2010/DemonsHorn.java | 44 ++++ .../mage/sets/magic2010/DiabolicTutor.java | 31 +-- .../src/mage/sets/magic2010/Disentomb.java | 70 ++++++ .../src/mage/sets/magic2010/DoomBlade.java | 8 +- .../src/mage/sets/magic2010/DragonsClaw.java | 44 ++++ .../sets/magic2010/DragonskullSummit.java | 10 +- .../mage/sets/magic2010/DrownedCatacomb.java | 78 +++++++ Mage.Sets/src/mage/sets/magic2010/Duress.java | 124 ++++++++++ .../src/mage/sets/magic2010/Earthquake.java | 22 +- .../mage/sets/magic2010/EliteVanguard.java | 6 +- .../mage/sets/magic2010/ElvishArchdruid.java | 124 ++++++++++ .../mage/sets/magic2010/Excommunicate.java | 44 ++++ .../mage/sets/magic2010/FieryHellhound.java | 74 ++++++ .../src/mage/sets/magic2010/Fireball.java | 123 ++++++++++ .../src/mage/sets/magic2010/Flashfreeze.java | 41 +--- Mage.Sets/src/mage/sets/magic2010/Fog.java | 65 ++++++ .../src/mage/sets/magic2010/Forest1.java | 49 ++++ .../src/mage/sets/magic2010/Forest2.java | 49 ++++ .../src/mage/sets/magic2010/Forest3.java | 49 ++++ .../src/mage/sets/magic2010/Forest4.java | 49 ++++ .../mage/sets/magic2010/GargoyleCastle.java | 6 +- .../sets/magic2010/GarrukWildspeaker.java | 8 +- .../src/mage/sets/magic2010/GiantGrowth.java | 31 +-- .../src/mage/sets/magic2010/GiantSpider.java | 44 ++++ .../mage/sets/magic2010/GlacialFortress.java | 10 +- .../mage/sets/magic2010/GoblinChieftain.java | 83 +++++++ .../src/mage/sets/magic2010/GoblinPiker.java | 44 ++++ .../src/mage/sets/magic2010/Gravedigger.java | 44 ++++ .../mage/sets/magic2010/GreatSableStag.java | 6 +- .../mage/sets/magic2010/HauntingEchoes.java | 123 ++++++++++ .../src/mage/sets/magic2010/HolyStrength.java | 44 ++++ .../mage/sets/magic2010/HonorOfThePure.java | 8 +- .../mage/sets/magic2010/HowlingBanshee.java | 107 +++++++++ .../src/mage/sets/magic2010/HowlingMine.java | 6 +- .../src/mage/sets/magic2010/IceCage.java | 165 ++++++++++++++ .../src/mage/sets/magic2010/Island1.java | 49 ++++ .../src/mage/sets/magic2010/Island2.java | 49 ++++ .../src/mage/sets/magic2010/Island3.java | 49 ++++ .../src/mage/sets/magic2010/Island4.java | 49 ++++ .../src/mage/sets/magic2010/JaceBeleren.java | 6 +- .../src/mage/sets/magic2010/KrakensEye.java | 44 ++++ .../src/mage/sets/magic2010/LavaAxe.java | 44 ++++ .../mage/sets/magic2010/LightningBolt.java | 6 +- .../mage/sets/magic2010/LlanowarElves.java | 6 +- .../sets/magic2010/MasterOfTheWildHunt.java | 8 +- .../src/mage/sets/magic2010/MightOfOaks.java | 6 +- .../src/mage/sets/magic2010/MindRot.java | 6 +- .../src/mage/sets/magic2010/MindSpring.java | 8 +- .../src/mage/sets/magic2010/Naturalize.java | 6 +- Mage.Sets/src/mage/sets/magic2010/Negate.java | 6 +- .../src/mage/sets/magic2010/Overrun.java | 8 +- .../mage/sets/magic2010/RampantGrowth.java | 6 +- .../mage/sets/magic2010/RootboundCrag.java | 10 +- .../mage/sets/magic2010/RoyalAssassin.java | 8 +- .../src/mage/sets/magic2010/SafePassage.java | 6 +- .../src/mage/sets/magic2010/SoulWarden.java | 110 +++++++++ .../mage/sets/magic2010/SunpetalGrove.java | 10 +- .../sets/magic2010/TerramorphicExpanse.java | 7 +- .../src/mage/sets/magic2010/TimeWarp.java | 6 +- .../src/mage/sets/magic2010/WhiteKnight.java | 6 +- .../src/mage/sets/magic2011/AcidicSlime.java | 3 +- .../src/mage/sets/magic2011/ActOfTreason.java | 3 +- .../src/mage/sets/magic2011/AetherAdept.java | 8 +- .../src/mage/sets/magic2011/AirServant.java | 8 +- .../mage/sets/magic2011/AjaniGoldmane.java | 3 +- .../src/mage/sets/magic2011/AjanisMantra.java | 66 ++++++ .../mage/sets/magic2011/AjanisPridemate.java | 106 +++++++++ .../mage/sets/magic2011/AlluringSiren.java | 44 ++++ .../mage/sets/magic2011/AncientHellkite.java | 153 +++++++++++++ .../mage/sets/magic2011/AngelicArbiter.java | 214 ++++++++++++++++++ .../mage/sets/magic2011/AngelsFeather.java | 44 ++++ .../src/mage/sets/magic2011/ArcRunner.java | 74 ++++++ .../mage/sets/magic2011/ArmoredAscension.java | 44 ++++ .../mage/sets/magic2011/ArmoredCancrix.java | 66 ++++++ .../src/mage/sets/magic2011/Assassinate.java | 44 ++++ .../mage/sets/magic2011/AssaultGriffin.java | 70 ++++++ .../src/mage/sets/magic2011/AuguryOwl.java | 72 ++++++ .../src/mage/sets/magic2011/AutumnsVeil.java | 76 +++++++ .../mage/sets/magic2011/AwakenerDruid.java | 44 ++++ .../src/mage/sets/magic2011/AzureDrake.java | 70 ++++++ .../src/mage/sets/magic2011/BackToNature.java | 71 ++++++ .../mage/sets/magic2011/BaneslayerAngel.java | 44 ++++ .../mage/sets/magic2011/BaronyVampire.java | 66 ++++++ .../magic2011/BerserkersOfBloodRidge.java | 44 ++++ .../mage/sets/magic2011/BirdsOfParadise.java | 44 ++++ .../src/mage/sets/magic2011/BlackKnight.java | 44 ++++ .../src/mage/sets/magic2011/BlindingMage.java | 44 ++++ .../src/mage/sets/magic2011/BloodTithe.java | 95 ++++++++ .../sets/magic2011/BloodcrazedGoblin.java | 146 ++++++++++++ .../sets/magic2011/BloodthroneVampire.java | 44 ++++ .../src/mage/sets/magic2011/BogRaiders.java | 77 +++++++ .../src/mage/sets/magic2011/BrindleBoar.java | 72 ++++++ .../mage/sets/magic2011/BrittleEffigy.java | 78 +++++++ .../src/mage/sets/magic2011/CallToMind.java | 79 +++++++ Mage.Sets/src/mage/sets/magic2011/Cancel.java | 44 ++++ .../mage/sets/magic2011/CanyonMinotaur.java | 44 ++++ .../sets/magic2011/CaptivatingVampire.java | 149 ++++++++++++ .../mage/sets/magic2011/CelestialPurge.java | 44 ++++ .../mage/sets/magic2011/ChandraNalaar.java | 44 ++++ .../mage/sets/magic2011/ChandrasOutrage.java | 102 +++++++++ .../mage/sets/magic2011/ChandrasSpitfire.java | 110 +++++++++ .../src/mage/sets/magic2011/ChildOfNight.java | 44 ++++ Mage.Sets/src/mage/sets/magic2011/Clone.java | 44 ++++ .../mage/sets/magic2011/CloudCrusader.java | 72 ++++++ .../mage/sets/magic2011/CloudElemental.java | 44 ++++ .../src/mage/sets/magic2011/Combust.java | 79 +++++++ .../src/mage/sets/magic2011/Condemn.java | 44 ++++ .../mage/sets/magic2011/ConundrumSphinx.java | 129 +++++++++++ .../src/mage/sets/magic2011/Corrupt.java | 125 ++++++++++ .../src/mage/sets/magic2011/CrystalBall.java | 73 ++++++ .../src/mage/sets/magic2011/CudgelTroll.java | 44 ++++ .../src/mage/sets/magic2011/Cultivate.java | 142 ++++++++++++ .../mage/sets/magic2011/CyclopsGladiator.java | 129 +++++++++++ .../src/mage/sets/magic2011/DarkTutelage.java | 110 +++++++++ .../mage/sets/magic2011/DayOfJudgment.java | 44 ++++ .../src/mage/sets/magic2011/Deathmark.java | 44 ++++ .../src/mage/sets/magic2011/Demolish.java | 44 ++++ .../sets/magic2011/DemonOfDeathsGate.java | 109 +++++++++ .../src/mage/sets/magic2011/DemonsHorn.java | 44 ++++ .../mage/sets/magic2011/DestructiveForce.java | 69 ++++++ .../mage/sets/magic2011/DiabolicTutor.java | 44 ++++ .../src/mage/sets/magic2011/Diminish.java | 67 ++++++ .../src/mage/sets/magic2011/Disentomb.java | 44 ++++ .../src/mage/sets/magic2011/DoomBlade.java | 44 ++++ .../src/mage/sets/magic2011/DragonsClaw.java | 44 ++++ .../sets/magic2011/DragonskullSummit.java | 44 ++++ .../src/mage/sets/magic2011/DryadsFavor.java | 144 ++++++++++++ Mage.Sets/src/mage/sets/magic2011/Duress.java | 44 ++++ .../src/mage/sets/magic2011/DuskdaleWurm.java | 70 ++++++ .../src/mage/sets/magic2011/EarthServant.java | 134 +++++++++++ .../mage/sets/magic2011/EliteVanguard.java | 44 ++++ .../sets/magic2011/ElixirOfImmortality.java | 111 +++++++++ .../mage/sets/magic2011/ElvishArchdruid.java | 44 ++++ .../src/mage/sets/magic2011/EmberHauler.java | 84 +++++++ .../mage/sets/magic2011/Excommunicate.java | 44 ++++ .../src/mage/sets/magic2011/FaunaShaman.java | 88 +++++++ .../mage/sets/magic2011/FieryHellhound.java | 44 ++++ .../src/mage/sets/magic2011/FireServant.java | 123 ++++++++++ .../src/mage/sets/magic2011/Fireball.java | 44 ++++ .../src/mage/sets/magic2011/Flashfreeze.java | 44 ++++ Mage.Sets/src/mage/sets/magic2011/Fling.java | 114 ++++++++++ Mage.Sets/src/mage/sets/magic2011/Fog.java | 44 ++++ .../src/mage/sets/magic2011/Foresee.java | 65 ++++++ .../src/mage/sets/magic2011/Forest1.java | 49 ++++ .../src/mage/sets/magic2011/Forest2.java | 49 ++++ .../src/mage/sets/magic2011/Forest3.java | 49 ++++ .../src/mage/sets/magic2011/Forest4.java | 49 ++++ .../src/mage/sets/magic2011/FrostTitan.java | 156 +++++++++++++ .../src/mage/sets/magic2011/GaeasRevenge.java | 86 +++++++ .../mage/sets/magic2011/GargoyleSentinel.java | 133 +++++++++++ .../sets/magic2011/GarrukWildspeaker.java | 44 ++++ .../mage/sets/magic2011/GarruksCompanion.java | 69 ++++++ .../sets/magic2011/GarruksPackleader.java | 113 +++++++++ .../src/mage/sets/magic2011/GiantGrowth.java | 44 ++++ .../src/mage/sets/magic2011/GiantSpider.java | 45 ++++ .../mage/sets/magic2011/GlacialFortress.java | 44 ++++ .../sets/magic2011/GoblinBalloonBrigade.java | 75 ++++++ .../mage/sets/magic2011/GoblinChieftain.java | 44 ++++ .../src/mage/sets/magic2011/GoblinPiker.java | 44 ++++ .../mage/sets/magic2011/GoblinTunneler.java | 44 ++++ .../mage/sets/magic2011/GoldenglowMoth.java | 73 ++++++ .../src/mage/sets/magic2011/GraveTitan.java | 116 ++++++++++ .../src/mage/sets/magic2011/Gravedigger.java | 44 ++++ .../mage/sets/magic2011/GreaterBasilisk.java | 69 ++++++ .../mage/sets/magic2011/HarborSerpent.java | 133 +++++++++++ .../mage/sets/magic2011/HauntingEchoes.java | 44 ++++ .../mage/sets/magic2011/HoardingDragon.java | 133 +++++++++++ .../src/mage/sets/magic2011/HolyStrength.java | 44 ++++ .../mage/sets/magic2011/HonorOfThePure.java | 44 ++++ .../src/mage/sets/magic2011/HornetSting.java | 65 ++++++ .../mage/sets/magic2011/HowlingBanshee.java | 44 ++++ .../src/mage/sets/magic2011/HuntersFeast.java | 65 ++++++ .../src/mage/sets/magic2011/IceCage.java | 44 ++++ Mage.Sets/src/mage/sets/magic2011/Incite.java | 105 +++++++++ .../mage/sets/magic2011/InfantryVeteran.java | 78 +++++++ .../src/mage/sets/magic2011/InfernoTitan.java | 118 ++++++++++ .../mage/sets/magic2011/InspiredCharge.java | 64 ++++++ .../src/mage/sets/magic2011/Island1.java | 49 ++++ .../src/mage/sets/magic2011/Island2.java | 49 ++++ .../src/mage/sets/magic2011/Island3.java | 49 ++++ .../src/mage/sets/magic2011/Island4.java | 49 ++++ .../src/mage/sets/magic2011/JaceBeleren.java | 44 ++++ .../src/mage/sets/magic2011/JacesErasure.java | 104 +++++++++ .../mage/sets/magic2011/JacesIngenuity.java | 64 ++++++ .../src/mage/sets/magic2011/JinxedIdol.java | 112 +++++++++ .../src/mage/sets/magic2011/Juggernaut.java | 49 ++++ .../mage/sets/magic2011/KnightExemplar.java | 85 +++++++ .../src/mage/sets/magic2011/KrakensEye.java | 44 ++++ .../src/mage/sets/magic2011/LavaAxe.java | 44 ++++ .../mage/sets/planechase/OblivionRing.java | 41 +--- .../src/mage/sets/planechase/SoulWarden.java | 72 +----- .../sets/riseoftheeldrazi/AwakeningZone.java | 67 ++++++ .../riseoftheeldrazi/BloodthroneVampire.java | 73 ++++++ .../mage/sets/riseoftheeldrazi/Deprive.java | 8 +- .../riseoftheeldrazi/EmrakulsHatcher.java | 8 +- .../sets/riseoftheeldrazi/EvolvingWilds.java | 8 +- .../sets/riseoftheeldrazi/FlameSlash.java | 8 +- .../mage/sets/riseoftheeldrazi/Forest1.java | 49 ++++ .../mage/sets/riseoftheeldrazi/Forest2.java | 49 ++++ .../mage/sets/riseoftheeldrazi/Forest3.java | 49 ++++ .../mage/sets/riseoftheeldrazi/Forest4.java | 49 ++++ .../sets/riseoftheeldrazi/GideonJura.java | 8 +- .../sets/riseoftheeldrazi/GoblinTunneler.java | 88 +++++++ .../mage/sets/riseoftheeldrazi/Island1.java | 49 ++++ .../mage/sets/riseoftheeldrazi/Island2.java | 49 ++++ .../mage/sets/riseoftheeldrazi/Island3.java | 49 ++++ .../mage/sets/riseoftheeldrazi/Island4.java | 49 ++++ .../riseoftheeldrazi/JoragaTreespeaker.java | 7 +- .../riseoftheeldrazi/KarganDragonlord.java | 6 +- .../riseoftheeldrazi/KozileksPredator.java | 6 +- .../sets/riseoftheeldrazi/NestInvader.java | 6 +- .../sets/riseoftheeldrazi/SeaGateOracle.java | 128 +++++++++++ .../mage/sets/riseoftheeldrazi/SeeBeyond.java | 115 ++++++++++ .../sets/riseoftheeldrazi/UnifiedWill.java | 104 +++++++++ .../mage/sets/riseoftheeldrazi/Vengevine.java | 6 +- .../sets/riseoftheeldrazi/WallOfOmens.java | 6 +- .../sets/shardsofalara/AjaniVengeant.java | 6 +- .../mage/sets/shardsofalara/Angelsong.java | 6 +- .../mage/sets/shardsofalara/Blightning.java | 6 +- .../sets/shardsofalara/BroodmateDragon.java | 6 +- .../src/mage/sets/shardsofalara/Cancel.java | 48 ++++ .../shardsofalara/CrumblingNecropolis.java | 10 +- .../shardsofalara/ElspethKnightErrant.java | 6 +- .../sets/shardsofalara/Excommunicate.java | 65 ++++++ .../src/mage/sets/shardsofalara/Forest1.java | 49 ++++ .../src/mage/sets/shardsofalara/Forest2.java | 49 ++++ .../src/mage/sets/shardsofalara/Forest3.java | 49 ++++ .../src/mage/sets/shardsofalara/Forest4.java | 49 ++++ .../mage/sets/shardsofalara/HellsThunder.java | 7 +- .../src/mage/sets/shardsofalara/Island1.java | 49 ++++ .../src/mage/sets/shardsofalara/Island2.java | 49 ++++ .../src/mage/sets/shardsofalara/Island3.java | 49 ++++ .../src/mage/sets/shardsofalara/Island4.java | 49 ++++ .../mage/sets/shardsofalara/JundPanorama.java | 6 +- .../shardsofalara/KnightOfTheWhiteOrchid.java | 6 +- .../mage/sets/shardsofalara/OblivionRing.java | 79 +++++++ .../sets/shardsofalara/RafiqOfTheMany.java | 6 +- .../mage/sets/shardsofalara/RangerOfEos.java | 6 +- .../mage/sets/shardsofalara/RhoxWarMonk.java | 6 +- .../mage/sets/shardsofalara/SarkhanVol.java | 12 +- .../mage/sets/shardsofalara/SavageLands.java | 10 +- .../sets/shardsofalara/SproutingThrinax.java | 6 +- .../mage/sets/shardsofalara/WildNacatl.java | 6 +- .../sets/shardsofalara/WoollyThoctar.java | 6 +- .../src/mage/sets/tenth/AngelsFeather.java | 103 +++++++++ .../src/mage/sets/tenth/Assassinate.java | 76 +++++++ .../src/mage/sets/tenth/BirdsOfParadise.java | 78 +++++++ Mage.Sets/src/mage/sets/tenth/Cancel.java | 66 ++++++ Mage.Sets/src/mage/sets/tenth/Clone.java | 77 +++++++ .../src/mage/sets/tenth/CloudElemental.java | 122 ++++++++++ Mage.Sets/src/mage/sets/tenth/Condemn.java | 108 +++++++++ Mage.Sets/src/mage/sets/tenth/Deathmark.java | 75 ++++++ Mage.Sets/src/mage/sets/tenth/Demolish.java | 76 +++++++ Mage.Sets/src/mage/sets/tenth/DemonsHorn.java | 103 +++++++++ .../src/mage/sets/tenth/DiabolicTutor.java | 65 ++++++ .../src/mage/sets/tenth/DragonsClaw.java | 103 +++++++++ .../src/mage/sets/tenth/Flashfreeze.java | 77 +++++++ Mage.Sets/src/mage/sets/tenth/Forest1.java | 17 +- Mage.Sets/src/mage/sets/tenth/Forest2.java | 49 ++++ Mage.Sets/src/mage/sets/tenth/Forest3.java | 49 ++++ Mage.Sets/src/mage/sets/tenth/Forest4.java | 49 ++++ .../src/mage/sets/tenth/GiantGrowth.java | 66 ++++++ .../src/mage/sets/tenth/GiantSpider.java | 69 ++++++ .../src/mage/sets/tenth/GoblinPiker.java | 68 ++++++ .../src/mage/sets/tenth/Gravedigger.java | 74 ++++++ .../src/mage/sets/tenth/HolyStrength.java | 135 +++++++++++ Mage.Sets/src/mage/sets/tenth/Island1.java | 17 +- Mage.Sets/src/mage/sets/tenth/Island2.java | 49 ++++ Mage.Sets/src/mage/sets/tenth/Island3.java | 49 ++++ Mage.Sets/src/mage/sets/tenth/Island4.java | 49 ++++ Mage.Sets/src/mage/sets/tenth/Juggernaut.java | 98 ++++++++ Mage.Sets/src/mage/sets/tenth/KrakensEye.java | 103 +++++++++ Mage.Sets/src/mage/sets/tenth/LavaAxe.java | 65 ++++++ Mage.Sets/src/mage/sets/tenth/Mountain1.java | 15 +- Mage.Sets/src/mage/sets/tenth/Plains1.java | 15 +- Mage.Sets/src/mage/sets/tenth/Swamp1.java | 15 +- .../src/mage/sets/worldwake/ArborElf.java | 6 +- .../mage/sets/worldwake/BasiliskCollar.java | 6 +- .../mage/sets/worldwake/BestialMenace.java | 69 ++++++ .../sets/worldwake/CelestialColonnade.java | 10 +- .../mage/sets/worldwake/DreadStatuary.java | 6 +- .../sets/worldwake/EverflowingChalice.java | 6 +- .../sets/worldwake/JaceTheMindSculptor.java | 6 +- .../src/mage/sets/worldwake/KhalniGarden.java | 10 +- .../mage/sets/worldwake/LavaclawReaches.java | 15 +- .../src/mage/sets/worldwake/RagingRavine.java | 10 +- .../src/mage/sets/worldwake/SearingBlaze.java | 14 +- .../src/mage/sets/worldwake/SejiriSteppe.java | 15 +- .../mage/sets/worldwake/StirringWildwood.java | 10 +- .../mage/sets/worldwake/StoneforgeMystic.java | 6 +- .../src/mage/sets/worldwake/TectonicEdge.java | 12 +- .../sets/worldwake/WolfbriarElemental.java | 6 +- .../mage/sets/zendikar/AdventuringGear.java | 6 +- .../src/mage/sets/zendikar/AetherFigment.java | 6 +- .../src/mage/sets/zendikar/ArchiveTrap.java | 6 +- .../src/mage/sets/zendikar/AridMesa.java | 6 +- .../sets/zendikar/BeastmasterAscension.java | 6 +- .../mage/sets/zendikar/BraveTheElements.java | 6 +- .../mage/sets/zendikar/BurstLightning.java | 6 +- Mage.Sets/src/mage/sets/zendikar/Cancel.java | 49 ++++ .../mage/sets/zendikar/ConquerorsPledge.java | 6 +- .../src/mage/sets/zendikar/DayOfJudgment.java | 6 +- .../src/mage/sets/zendikar/Demolish.java | 49 ++++ .../mage/sets/zendikar/EldraziMonument.java | 28 +-- .../src/mage/sets/zendikar/EmeriaAngel.java | 6 +- Mage.Sets/src/mage/sets/zendikar/Forest1.java | 49 ++++ Mage.Sets/src/mage/sets/zendikar/Forest2.java | 49 ++++ Mage.Sets/src/mage/sets/zendikar/Forest3.java | 49 ++++ Mage.Sets/src/mage/sets/zendikar/Forest4.java | 49 ++++ .../src/mage/sets/zendikar/GoblinGuide.java | 6 +- .../mage/sets/zendikar/GoblinRuinblaster.java | 20 +- Mage.Sets/src/mage/sets/zendikar/Island1.java | 49 ++++ Mage.Sets/src/mage/sets/zendikar/Island2.java | 49 ++++ Mage.Sets/src/mage/sets/zendikar/Island3.java | 49 ++++ Mage.Sets/src/mage/sets/zendikar/Island4.java | 49 ++++ .../mage/sets/zendikar/KabiraCrossroads.java | 10 +- .../src/mage/sets/zendikar/LotusCobra.java | 6 +- .../src/mage/sets/zendikar/MarshFlats.java | 6 +- .../mage/sets/zendikar/MistyRainforest.java | 6 +- .../sets/zendikar/OranRiefTheVastwood.java | 11 +- .../mage/sets/zendikar/RampagingBaloths.java | 6 +- .../src/mage/sets/zendikar/RiverBoa.java | 6 +- .../src/mage/sets/zendikar/ScaldingTarn.java | 6 +- .../src/mage/sets/zendikar/ScuteMob.java | 6 +- .../src/mage/sets/zendikar/SpreadingSeas.java | 10 +- .../src/mage/sets/zendikar/SteppeLynx.java | 6 +- .../sets/zendikar/SunspringExpedition.java | 7 +- .../mage/sets/zendikar/TeeteringPeaks.java | 10 +- .../mage/sets/zendikar/VerdantCatacombs.java | 6 +- Mage/src/mage/Constants.java | 54 ++++- Mage/src/mage/MageInt.java | 9 +- Mage/src/mage/MageObject.java | 13 +- Mage/src/mage/MageObjectImpl.java | 87 +++++-- Mage/src/mage/MageObjects.java | 3 +- Mage/src/mage/MageObjectsImpl.java | 8 +- Mage/src/mage/Mana.java | 47 ++-- Mage/src/mage/ObjectColor.java | 16 +- Mage/src/mage/abilities/AbilityImpl.java | 9 +- .../mage/abilities/ActivatedAbilityImpl.java | 2 +- Mage/src/mage/abilities/EvasionAbility.java | 2 +- Mage/src/mage/abilities/LoyaltyAbility.java | 10 + Mage/src/mage/abilities/SpellAbility.java | 11 +- .../mage/abilities/TriggeredAbilityImpl.java | 1 + .../common/AttacksEachTurnStaticAbility.java | 2 +- .../common/AttacksTriggeredAbility.java | 2 +- .../common/BlocksTriggeredAbility.java | 72 ++++++ .../EntersBattlefieldStaticAbility.java | 13 +- .../abilities/common/LandfallAbility.java | 2 +- .../common/OnEventTriggeredAbility.java | 6 + Mage/src/mage/abilities/costs/Cost.java | 6 +- Mage/src/mage/abilities/costs/Costs.java | 1 + Mage/src/mage/abilities/costs/CostsImpl.java | 24 +- .../mage/abilities/costs/VariableCost.java | 39 ++++ .../costs/common/DiscardSourceCost.java | 11 +- .../costs/common/DiscardTargetCost.java | 79 +++++++ .../costs/common/ExileSourceCost.java | 74 ++++++ .../abilities/costs/common/PayLifeCost.java | 8 +- .../costs/common/PayLoyaltyCost.java | 9 +- .../costs/common/PayVariableLoyaltyCost.java | 89 ++++++++ .../common/RemoveCountersSourceCost.java | 10 +- .../costs/common/ReturnToHandTargetCost.java | 16 +- .../costs/common/SacrificeSourceCost.java | 10 +- .../costs/common/SacrificeTargetCost.java | 29 ++- .../abilities/costs/common/TapSourceCost.java | 8 +- .../abilities/costs/common/TapTargetCost.java | 78 +++++++ .../abilities/costs/mana/GenericManaCost.java | 4 + .../abilities/costs/mana/ManaCostImpl.java | 7 +- .../mage/abilities/costs/mana/ManaCosts.java | 3 +- .../abilities/costs/mana/ManaCostsImpl.java | 18 +- .../costs/mana/VariableManaCost.java | 6 +- .../effects/EntersBattlefieldEffect.java | 192 ++++++++-------- .../AddPlusOneCountersControlledEffect.java | 2 +- .../common/AttacksIfAbleTargetEffect.java | 82 +++++++ .../effects/common/BoostControlledEffect.java | 23 +- .../effects/common/BoostEquippedEffect.java | 2 +- .../common/BoostPowerXSourceEffect.java | 75 ++++++ .../common/CantCounterControlledEffect.java | 44 +++- .../common/CantTargetControlledEffect.java | 117 ++++++++++ .../common/CantTargetSourceEffect.java | 94 ++++++++ .../abilities/effects/common/CopyEffect.java | 101 +++++++++ .../common/CounterUnlessPaysEffect.java | 82 +++++++ .../DamageAllControlledTargetEffect.java | 77 +++++++ .../effects/common/DamageAllEffect.java | 77 +++++++ .../common/DamageControllerEffect.java | 91 ++++++++ .../effects/common/DamageMultiEffect.java | 4 +- .../effects/common/DamageTargetEffect.java | 18 +- .../effects/common/DamageXTargetEffect.java | 78 +++++++ .../effects/common/DestroySourceEffect.java | 79 +++++++ .../common/EntersBattlefieldTappedEffect.java | 114 +++++----- .../effects/common/ExileTargetEffect.java | 1 - .../common/GainAbilityAttachedEffect.java | 2 +- .../common/GainControlTargetEffect.java | 72 ++++++ .../effects/common/GainLifeEffect.java | 2 +- .../effects/common/GainLifeTargetEffect.java | 77 +++++++ .../GainProtectionFromColorTargetEffect.java | 81 +++++++ .../PutLibraryIntoGraveTargetEffect.java | 7 +- .../common/PutOnLibraryTargetEffect.java | 95 ++++++++ .../common/RegenerateSourceEffect.java | 1 - .../common/ReturnToHandTargetEffect.java | 20 +- .../effects/common/SacrificeAllEffect.java | 105 +++++++++ .../abilities/effects/common/ScryEffect.java | 104 +++++++++ .../common/SetPowerToughnessTargetEffect.java | 86 +++++++ .../common/TapSourceUnlessControlsEffect.java | 79 +++++++ .../mage/abilities/keyword/FlyingAbility.java | 4 +- .../abilities/keyword/LandwalkAbility.java | 4 +- .../abilities/keyword/UnblockableAbility.java | 2 +- .../abilities/keyword/UnearthAbility.java | 1 - Mage/src/mage/abilities/mana/ManaAbility.java | 2 +- Mage/src/mage/cards/Card.java | 7 +- Mage/src/mage/cards/CardImpl.java | 40 ++-- Mage/src/mage/cards/ExpansionSet.java | 74 +++++- Mage/src/mage/cards/LevelerCard.java | 5 +- Mage/src/mage/cards/basiclands/BasicLand.java | 3 +- Mage/src/mage/cards/basiclands/Forest.java | 14 +- Mage/src/mage/cards/basiclands/Island.java | 12 +- Mage/src/mage/cards/basiclands/Mountain.java | 12 +- Mage/src/mage/cards/basiclands/Plains.java | 12 +- Mage/src/mage/cards/basiclands/Swamp.java | 12 +- Mage/src/mage/choices/Choice.java | 5 +- Mage/src/mage/choices/ChoiceImpl.java | 11 +- Mage/src/mage/filter/FilterCard.java | 20 +- Mage/src/mage/filter/FilterObject.java | 6 +- Mage/src/mage/filter/FilterSpell.java | 2 +- Mage/src/mage/filter/FilterStackObject.java | 86 +++++++ .../filter/common/FilterCreatureCard.java | 58 +++++ .../filter/common/FilterCreatureOrPlayer.java | 2 +- .../common/FilterCreaturePermanent.java | 8 + Mage/src/mage/game/Exile.java | 8 + Mage/src/mage/game/combat/CombatGroup.java | 22 +- Mage/src/mage/game/events/GameEvent.java | 4 + Mage/src/mage/game/permanent/Permanent.java | 5 +- .../mage/game/permanent/PermanentCard.java | 26 ++- .../mage/game/permanent/PermanentImpl.java | 30 ++- .../mage/game/permanent/PermanentToken.java | 5 +- .../game/permanent/token/ElephantToken.java | 50 ++++ .../mage/game/permanent/token/SnakeToken.java | 50 ++++ .../game/permanent/token/ZombieToken.java | 50 ++++ Mage/src/mage/game/stack/Spell.java | 34 ++- Mage/src/mage/game/stack/StackAbility.java | 6 + Mage/src/mage/players/Player.java | 4 +- Mage/src/mage/players/PlayerImpl.java | 46 ++-- Mage/src/mage/target/Target.java | 6 +- Mage/src/mage/target/TargetAmount.java | 2 +- Mage/src/mage/target/TargetImpl.java | 55 ++++- Mage/src/mage/target/TargetObject.java | 14 +- Mage/src/mage/target/TargetPermanent.java | 14 +- Mage/src/mage/target/TargetPlayer.java | 17 +- Mage/src/mage/target/TargetStackObject.java | 116 ++++++++++ Mage/src/mage/target/Targets.java | 15 +- .../common/TargetAttackingCreature.java | 8 +- .../target/common/TargetCardInLibrary.java | 2 +- .../common/TargetControlledPermanent.java | 8 +- .../target/common/TargetCreatureOrPlayer.java | 16 +- .../common/TargetCreatureOrPlayerAmount.java | 16 +- .../common/TargetCreaturePermanent.java | 10 +- .../mage/target/common/TargetDefender.java | 13 ++ .../target/common/TargetLandPermanent.java | 10 +- .../target/common/TargetNonlandPermanent.java | 8 +- 555 files changed, 20323 insertions(+), 1942 deletions(-) create mode 100644 Mage.Client/release/sample-decks/SanJuanMatignon.dck create mode 100644 Mage.Sets/src/mage/sets/conflux/CanyonMinotaur.java create mode 100644 Mage.Sets/src/mage/sets/conflux/CelestialPurge.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/CanyonMinotaur.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/ChandraNalaar.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/ChildOfNight.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Clone.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/CudgelTroll.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Deathmark.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/DemonsHorn.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Disentomb.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/DragonsClaw.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Duress.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Excommunicate.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/FieryHellhound.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Fireball.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Fog.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Forest1.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Forest2.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Forest3.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Forest4.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/GiantSpider.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/GoblinChieftain.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/GoblinPiker.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Gravedigger.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/HauntingEchoes.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/HolyStrength.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/HowlingBanshee.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/IceCage.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Island1.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Island2.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Island3.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/Island4.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/KrakensEye.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/LavaAxe.java create mode 100644 Mage.Sets/src/mage/sets/magic2010/SoulWarden.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AjanisMantra.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AlluringSiren.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AncientHellkite.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AngelsFeather.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ArcRunner.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ArmoredAscension.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ArmoredCancrix.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Assassinate.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AssaultGriffin.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AuguryOwl.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AutumnsVeil.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AwakenerDruid.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/AzureDrake.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BackToNature.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BaneslayerAngel.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BaronyVampire.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BerserkersOfBloodRidge.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BirdsOfParadise.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BlackKnight.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BlindingMage.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BloodTithe.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BloodthroneVampire.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BogRaiders.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BrindleBoar.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/BrittleEffigy.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CallToMind.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Cancel.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CanyonMinotaur.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CelestialPurge.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ChandraNalaar.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ChandrasSpitfire.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ChildOfNight.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Clone.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CloudCrusader.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CloudElemental.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Combust.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Condemn.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Corrupt.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CrystalBall.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CudgelTroll.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Cultivate.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DayOfJudgment.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Deathmark.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Demolish.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DemonOfDeathsGate.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DemonsHorn.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DestructiveForce.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DiabolicTutor.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Diminish.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Disentomb.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DoomBlade.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DragonsClaw.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DragonskullSummit.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DryadsFavor.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Duress.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/DuskdaleWurm.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/EarthServant.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/EliteVanguard.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ElixirOfImmortality.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/ElvishArchdruid.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/EmberHauler.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Excommunicate.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/FaunaShaman.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/FieryHellhound.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/FireServant.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Fireball.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Flashfreeze.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Fling.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Fog.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Foresee.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Forest1.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Forest2.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Forest3.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Forest4.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/FrostTitan.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GaeasRevenge.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GargoyleSentinel.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GarrukWildspeaker.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GarruksCompanion.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GarruksPackleader.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GiantGrowth.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GiantSpider.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GlacialFortress.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GoblinBalloonBrigade.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GoblinChieftain.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GoblinPiker.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GoblinTunneler.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GoldenglowMoth.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GraveTitan.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Gravedigger.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/GreaterBasilisk.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HarborSerpent.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HauntingEchoes.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HoardingDragon.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HolyStrength.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HonorOfThePure.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HornetSting.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HowlingBanshee.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/HuntersFeast.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/IceCage.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Incite.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/InfantryVeteran.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/InfernoTitan.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/InspiredCharge.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Island1.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Island2.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Island3.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Island4.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/JaceBeleren.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/JacesErasure.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/JacesIngenuity.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/JinxedIdol.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/Juggernaut.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/KnightExemplar.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/KrakensEye.java create mode 100644 Mage.Sets/src/mage/sets/magic2011/LavaAxe.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/BloodthroneVampire.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest1.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest2.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest3.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest4.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinTunneler.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Island1.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Island2.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Island3.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/Island4.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/SeaGateOracle.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/SeeBeyond.java create mode 100644 Mage.Sets/src/mage/sets/riseoftheeldrazi/UnifiedWill.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Cancel.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Excommunicate.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Forest1.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Forest2.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Forest3.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Forest4.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Island1.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Island2.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Island3.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Island4.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/OblivionRing.java create mode 100644 Mage.Sets/src/mage/sets/tenth/AngelsFeather.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Assassinate.java create mode 100644 Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Cancel.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Clone.java create mode 100644 Mage.Sets/src/mage/sets/tenth/CloudElemental.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Condemn.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Deathmark.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Demolish.java create mode 100644 Mage.Sets/src/mage/sets/tenth/DemonsHorn.java create mode 100644 Mage.Sets/src/mage/sets/tenth/DiabolicTutor.java create mode 100644 Mage.Sets/src/mage/sets/tenth/DragonsClaw.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Flashfreeze.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Forest2.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Forest3.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Forest4.java create mode 100644 Mage.Sets/src/mage/sets/tenth/GiantGrowth.java create mode 100644 Mage.Sets/src/mage/sets/tenth/GiantSpider.java create mode 100644 Mage.Sets/src/mage/sets/tenth/GoblinPiker.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Gravedigger.java create mode 100644 Mage.Sets/src/mage/sets/tenth/HolyStrength.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Island2.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Island3.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Island4.java create mode 100644 Mage.Sets/src/mage/sets/tenth/Juggernaut.java create mode 100644 Mage.Sets/src/mage/sets/tenth/KrakensEye.java create mode 100644 Mage.Sets/src/mage/sets/tenth/LavaAxe.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/BestialMenace.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Cancel.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Demolish.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Forest1.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Forest2.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Forest3.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Forest4.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Island1.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Island2.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Island3.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/Island4.java create mode 100644 Mage/src/mage/abilities/common/BlocksTriggeredAbility.java create mode 100644 Mage/src/mage/abilities/costs/VariableCost.java create mode 100644 Mage/src/mage/abilities/costs/common/DiscardTargetCost.java create mode 100644 Mage/src/mage/abilities/costs/common/ExileSourceCost.java create mode 100644 Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java create mode 100644 Mage/src/mage/abilities/costs/common/TapTargetCost.java create mode 100644 Mage/src/mage/abilities/effects/common/AttacksIfAbleTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/BoostPowerXSourceEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/CantTargetControlledEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/CantTargetSourceEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/CopyEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/CounterUnlessPaysEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/DamageAllEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/DamageControllerEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/DamageXTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/DestroySourceEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/GainControlTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/GainLifeTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/GainProtectionFromColorTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/PutOnLibraryTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/SacrificeAllEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/ScryEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/SetPowerToughnessTargetEffect.java create mode 100644 Mage/src/mage/abilities/effects/common/TapSourceUnlessControlsEffect.java create mode 100644 Mage/src/mage/filter/FilterStackObject.java create mode 100644 Mage/src/mage/filter/common/FilterCreatureCard.java create mode 100644 Mage/src/mage/game/permanent/token/ElephantToken.java create mode 100644 Mage/src/mage/game/permanent/token/SnakeToken.java create mode 100644 Mage/src/mage/game/permanent/token/ZombieToken.java create mode 100644 Mage/src/mage/target/TargetStackObject.java diff --git a/Mage.Client/config/config.properties b/Mage.Client/config/config.properties index b550d59982..5b4f8d43b4 100644 --- a/Mage.Client/config/config.properties +++ b/Mage.Client/config/config.properties @@ -1,7 +1,10 @@ server-name=localhost port=17171 remote-server=mage-server -cards-resource-path=resources/images/cards/ -symbols-resource-path=resources/images/symbols/ -resource-path=resources/images/ +cards-resource-path=C:\\Program Files (x86)\\Wizards of the Coast\\Magic Online III\\Graphics\\Cards\\ +symbols-resource-path=C:\\Program Files (x86)\\Wizards of the Coast\\Magic Online III\\Graphics\\Chat\\chat_graphic_typingicon_ +resource-path=C:\\Program Files (x86)\\Wizards of the Coast\\Magic Online III\\Graphics\\Cards\\Pics\\ +#cards-resource-path=resources/images/cards/ +#symbols-resource-path=resources/images/symbols/ +#resource-path=resources/images/ card-scaling-factor=0.4 \ No newline at end of file diff --git a/Mage.Client/release/sample-decks/SanJuanMatignon.dck b/Mage.Client/release/sample-decks/SanJuanMatignon.dck new file mode 100644 index 0000000000000000000000000000000000000000..23af100da760e109eab1d005aae62c1c42fcfdda GIT binary patch literal 1187 zcmaJ=$!-%t5UmhLBoT;^2ofW9u?eKHB5{L@4M{Mu0mVTM=F!%EZNQtS>E&pP6jxJQ@75y2%JUFS!B2x}II6+;R1g_PnJC4A-M#N?OP+nxyH9o9v;~?cl=Gmm@Hgqo#1%%mM z_ORn>-9uL~`9P;4FkFez4jr^oRKiL2(FDt 0) - ImageHelper.DrawCosts(card.getManaCost(), gImage, FRAME_MAX_WIDTH - SYMBOL_MAX_XOFFSET, SYMBOL_MAX_YOFFSET, this); + ImageHelper.drawCosts(card.getManaCost(), gImage, FRAME_MAX_WIDTH - SYMBOL_MAX_XOFFSET, SYMBOL_MAX_YOFFSET, this); gSmall.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); gSmall.setColor(Color.BLACK); - gSmall.drawImage(ImageHelper.ScaleImage(image, Config.dimensions.frameWidth, Config.dimensions.frameHeight), 0, 0, this); + gSmall.drawImage(ImageHelper.scaleImage(image, Config.dimensions.frameWidth, Config.dimensions.frameHeight), 0, 0, this); gImage.setFont(new Font("Arial", Font.PLAIN, NAME_FONT_MAX_SIZE)); gImage.drawString(card.getName(), CONTENT_MAX_XOFFSET, NAME_MAX_YOFFSET); @@ -172,24 +182,47 @@ public class Card extends javax.swing.JPanel implements MouseMotionListener, Mou protected String getText(String cardType) { StringBuilder sb = new StringBuilder(); - sb.append(card.getName()); - if (card.getManaCost().size() > 0) { - sb.append("\n").append(card.getManaCost()); + if (card instanceof StackAbilityView || card instanceof AbilityView) { + for (String rule: getRules()) { + sb.append("\n").append(rule); + } } - sb.append("\n").append(cardType); - if (card.getColor().hasColor()) { - sb.append("\n").append(card.getColor().toString()); + else { + sb.append(card.getName()); + if (card.getManaCost().size() > 0) { + sb.append("\n").append(card.getManaCost()); + } + sb.append("\n").append(cardType); + if (card.getColor().hasColor()) { + sb.append("\n").append(card.getColor().toString()); + } + if (card.getCardTypes().contains(CardType.CREATURE)) { + sb.append("\n").append(card.getPower()).append("/").append(card.getToughness()); + } + else if (card.getCardTypes().contains(CardType.PLANESWALKER)) { + sb.append("\n").append(card.getLoyalty()); + } + for (String rule: getRules()) { + sb.append("\n").append(rule); + } + sb.append("\n").append(Sets.getInstance().get(card.getExpansionSetCode()).getName()).append(" - ").append(card.getRarity().toString()); } - if (card.getCardTypes().contains(CardType.CREATURE)) { - sb.append("\n").append(card.getPower()).append("/").append(card.getToughness()); +// sb.append("\n").append(card.getId()); + return sb.toString(); + } + + protected String getBackgroundName() { + if (card instanceof StackAbilityView || card instanceof AbilityView) { + return "effect"; } - else if (card.getCardTypes().contains(CardType.PLANESWALKER)) { - sb.append("\n").append(card.getLoyalty()); + StringBuilder sb = new StringBuilder(); + if (card.getCardTypes().contains(CardType.LAND)) { + sb.append("land").append(card.getSuperTypes()).append(card.getSubTypes()); } - for (String rule: getRules()) { - sb.append("\n").append(rule); + else if (card.getCardTypes() != null && (card.getCardTypes().contains(CardType.CREATURE) || card.getCardTypes().contains(CardType.PLANESWALKER))) { + sb.append("creature"); } - sb.append("\n").append(card.getId()); + sb.append(card.getColor()).append(card.getArt()).append(card.getRarity()).append(card.getExpansionSetCode()); return sb.toString(); } diff --git a/Mage.Client/src/mage/client/cards/Permanent.java b/Mage.Client/src/mage/client/cards/Permanent.java index 2759a697a9..7819a611db 100644 --- a/Mage.Client/src/mage/client/cards/Permanent.java +++ b/Mage.Client/src/mage/client/cards/Permanent.java @@ -46,8 +46,10 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; import javax.swing.PopupFactory; +import mage.Constants.CardType; import mage.client.util.Config; import mage.client.util.ImageHelper; +import mage.sets.Sets; import mage.view.CounterView; import mage.view.PermanentView; import static mage.client.util.Constants.*; @@ -89,6 +91,34 @@ public class Permanent extends Card { this.linked = linked; } + @Override + protected String getText(String cardType) { + StringBuilder sb = new StringBuilder(); + sb.append(super.getText(cardType)); + sb.append("\n----- Originally -------\n"); + sb.append(permanent.getOriginal().getName()); + if (permanent.getOriginal().getManaCost().size() > 0) { + sb.append("\n").append(permanent.getOriginal().getManaCost()); + } + sb.append("\n").append(getType(permanent.getOriginal())); + if (permanent.getOriginal().getColor().hasColor()) { + sb.append("\n").append(permanent.getOriginal().getColor().toString()); + } + if (permanent.getOriginal().getCardTypes().contains(CardType.CREATURE)) { + sb.append("\n").append(permanent.getOriginal().getPower()).append("/").append(permanent.getOriginal().getToughness()); + } + else if (permanent.getOriginal().getCardTypes().contains(CardType.PLANESWALKER)) { + sb.append("\n").append(permanent.getOriginal().getLoyalty()); + } + for (String rule: getRules()) { + sb.append("\n").append(rule); + } + sb.append("\n").append(Sets.getInstance().get(permanent.getOriginal().getExpansionSetCode()).getName()).append(" - ").append(permanent.getOriginal().getRarity().toString()); +// sb.append("\n").append(card.getId()); + return sb.toString(); + + } + @Override protected List getRules() { if (permanent.getCounters() != null) { diff --git a/Mage.Client/src/mage/client/deckeditor/CardSelector.java b/Mage.Client/src/mage/client/deckeditor/CardSelector.java index 156d2304aa..4632e0edd5 100644 --- a/Mage.Client/src/mage/client/deckeditor/CardSelector.java +++ b/Mage.Client/src/mage/client/deckeditor/CardSelector.java @@ -71,10 +71,10 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene public void loadCards(BigCard bigCard) { this.bigCard = bigCard; - cbExpansionSet.setModel(new DefaultComboBoxModel(Sets.getInstance().toArray())); + cbExpansionSet.setModel(new DefaultComboBoxModel(Sets.getInstance().values().toArray())); cbExpansionSet.insertItemAt("All sets", 0); cbExpansionSet.setSelectedIndex(0); - for (ExpansionSet set: Sets.getInstance()) { + for (ExpansionSet set: Sets.getInstance().values()) { allCards.addAll(set.createCards()); } filter.setUseColor(true); @@ -427,9 +427,9 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene }//GEN-LAST:event_rdoPlaneswalkersActionPerformed private void cbExpansionSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbExpansionSetActionPerformed - filter.getExpansionSetId().clear(); + filter.getExpansionSetCode().clear(); if (cbExpansionSet.getSelectedItem() instanceof ExpansionSet) { - filter.getExpansionSetId().add(((ExpansionSet)this.cbExpansionSet.getSelectedItem()).getId()); + filter.getExpansionSetCode().add(((ExpansionSet)this.cbExpansionSet.getSelectedItem()).getCode()); } filterCards(); }//GEN-LAST:event_cbExpansionSetActionPerformed diff --git a/Mage.Client/src/mage/client/deckeditor/DeckEditorPanel.java b/Mage.Client/src/mage/client/deckeditor/DeckEditorPanel.java index 1482266681..a4c7b122b7 100644 --- a/Mage.Client/src/mage/client/deckeditor/DeckEditorPanel.java +++ b/Mage.Client/src/mage/client/deckeditor/DeckEditorPanel.java @@ -41,12 +41,12 @@ import java.lang.reflect.Constructor; import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.prefs.Preferences; import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; import mage.cards.Card; import mage.cards.decks.Deck; import mage.cards.decks.DeckCardLists; +import mage.client.MageFrame; import mage.client.util.Event; import mage.client.util.Listener; import mage.view.CardsView; @@ -59,12 +59,10 @@ public class DeckEditorPanel extends javax.swing.JPanel { private JFileChooser fcSelectDeck; private Deck deck = new Deck();; - private Preferences prefs; /** Creates new form DeckEditorPanel */ public DeckEditorPanel() { initComponents(); - prefs = Preferences.userNodeForPackage(this.getClass()); fcSelectDeck = new JFileChooser(); fcSelectDeck.setAcceptAllFileFilterUsed(false); fcSelectDeck.addChoosableFileFilter(new DeckFilter()); @@ -250,7 +248,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { }// //GEN-END:initComponents private void btnLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoadActionPerformed - String lastFolder = prefs.get("lastDeckFolder", ""); + String lastFolder = MageFrame.getPreferences().get("lastDeckFolder", ""); if (!lastFolder.isEmpty()) fcSelectDeck.setCurrentDirectory(new File(lastFolder)); int ret = fcSelectDeck.showOpenDialog(this); @@ -267,14 +265,14 @@ public class DeckEditorPanel extends javax.swing.JPanel { } refreshDeck(); try { - prefs.put("lastDeckFolder", file.getCanonicalPath()); + MageFrame.getPreferences().put("lastDeckFolder", file.getCanonicalPath()); } catch (IOException ex) { } } fcSelectDeck.setSelectedFile(null); }//GEN-LAST:event_btnLoadActionPerformed private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed - String lastFolder = prefs.get("lastDeckFolder", ""); + String lastFolder = MageFrame.getPreferences().get("lastDeckFolder", ""); if (!lastFolder.isEmpty()) fcSelectDeck.setCurrentDirectory(new File(lastFolder)); deck.setName(this.txtDeckName.getText()); @@ -294,7 +292,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } try { - prefs.put("lastDeckFolder", file.getCanonicalPath()); + MageFrame.getPreferences().put("lastDeckFolder", file.getCanonicalPath()); } catch (IOException ex) { } } }//GEN-LAST:event_btnSaveActionPerformed diff --git a/Mage.Client/src/mage/client/dialog/ConnectDialog.form b/Mage.Client/src/mage/client/dialog/ConnectDialog.form index dc85cea637..4a5449d7df 100644 --- a/Mage.Client/src/mage/client/dialog/ConnectDialog.form +++ b/Mage.Client/src/mage/client/dialog/ConnectDialog.form @@ -25,10 +25,15 @@ - + - - + + + + + + + @@ -40,15 +45,11 @@ - - + + + - - - - - @@ -72,7 +73,9 @@ - + + + @@ -132,5 +135,13 @@ + + + + + + + + diff --git a/Mage.Client/src/mage/client/dialog/ConnectDialog.java b/Mage.Client/src/mage/client/dialog/ConnectDialog.java index f0fd39510c..f6fb105820 100644 --- a/Mage.Client/src/mage/client/dialog/ConnectDialog.java +++ b/Mage.Client/src/mage/client/dialog/ConnectDialog.java @@ -39,8 +39,8 @@ import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.prefs.Preferences; import javax.swing.JOptionPane; +import mage.client.MageFrame; import mage.client.remote.Session; import mage.client.util.Config; import mage.util.Logging; @@ -52,20 +52,17 @@ import mage.util.Logging; public class ConnectDialog extends MageDialog { private final static Logger logger = Logging.getLogger(ConnectDialog.class.getName()); - private Session session; - private Preferences prefs; /** Creates new form ConnectDialog */ - public ConnectDialog(Session session) { - this.session = session; - prefs = Preferences.userNodeForPackage(this.getClass()); - initComponents(); + public ConnectDialog() { + initComponents(); } public void showDialog() { - this.txtServer.setText(prefs.get("serverAddress", Config.serverName)); - this.txtPort.setText(prefs.get("serverPort", Integer.toString(Config.port))); - this.txtUserName.setText(prefs.get("userName", "")); + this.txtServer.setText(MageFrame.getPreferences().get("serverAddress", Config.serverName)); + this.txtPort.setText(MageFrame.getPreferences().get("serverPort", Integer.toString(Config.port))); + this.txtUserName.setText(MageFrame.getPreferences().get("userName", "")); + this.chkAutoConnect.setSelected(Boolean.parseBoolean(MageFrame.getPreferences().get("autoConnect", "false"))); this.setModal(true); this.setLocation(50, 50); this.setVisible(true); @@ -88,6 +85,7 @@ public class ConnectDialog extends MageDialog { lblUserName = new javax.swing.JLabel(); btnConnect = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); + chkAutoConnect = new javax.swing.JCheckBox(); setTitle("Connect"); setNormalBounds(new java.awt.Rectangle(100, 100, 410, 307)); @@ -121,14 +119,25 @@ public class ConnectDialog extends MageDialog { } }); + chkAutoConnect.setText("Automatically connect to this server next time"); + chkAutoConnect.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + chkAutoConnectActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() + .addComponent(btnConnect) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(btnCancel)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblPort) .addComponent(lblServer) @@ -138,12 +147,9 @@ public class ConnectDialog extends MageDialog { .addGroup(layout.createSequentialGroup() .addComponent(txtPort, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(131, 131, 131)) - .addComponent(txtServer, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE) - .addComponent(txtUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(btnConnect) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(btnCancel))) + .addComponent(txtServer, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE) + .addComponent(txtUserName, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE) + .addComponent(chkAutoConnect, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( @@ -161,7 +167,9 @@ public class ConnectDialog extends MageDialog { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblUserName)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(chkAutoConnect) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnCancel) .addComponent(btnConnect)) @@ -172,48 +180,46 @@ public class ConnectDialog extends MageDialog { }// //GEN-END:initComponents private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelActionPerformed + MageFrame.getPreferences().put("autoConnect", Boolean.toString(chkAutoConnect.isSelected())); this.setVisible(false); }//GEN-LAST:event_btnCancelActionPerformed private void btnConnectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConnectActionPerformed + if (txtUserName.getText().isEmpty()) { + JOptionPane.showMessageDialog(rootPane, "Please provide a user name"); + return; + } + if (txtServer.getText().isEmpty()) { + JOptionPane.showMessageDialog(rootPane, "Please provide a server address"); + return; + } + if (txtPort.getText().isEmpty()) { + JOptionPane.showMessageDialog(rootPane, "Please provide a port number"); + return; + } + if (Integer.valueOf(txtPort.getText()) < 1 || Integer.valueOf(txtPort.getText()) > 65535 ) { + JOptionPane.showMessageDialog(rootPane, "Invalid port number"); + txtPort.setText(MageFrame.getPreferences().get("serverPort", Integer.toString(Config.port))); + return; + } try { - if (txtUserName.getText().isEmpty()) { - JOptionPane.showMessageDialog(rootPane, "Please provide a user name"); - return; - } - if (txtServer.getText().isEmpty()) { - JOptionPane.showMessageDialog(rootPane, "Please provide a server address"); - return; - } - if (txtPort.getText().isEmpty()) { - JOptionPane.showMessageDialog(rootPane, "Please provide a port number"); - return; - } - if (Integer.valueOf(txtPort.getText()) < 1 || Integer.valueOf(txtPort.getText()) > 65535 ) { - JOptionPane.showMessageDialog(rootPane, "Invalid port number"); - txtPort.setText(prefs.get("serverPort", Integer.toString(Config.port))); - return; - } setCursor(new Cursor(Cursor.WAIT_CURSOR)); - session.connect(txtUserName.getText(), txtServer.getText(), Integer.valueOf(txtPort.getText())); - - prefs.put("serverAddress", txtServer.getText()); - prefs.put("serverPort", txtPort.getText()); - prefs.put("userName", txtUserName.getText()); - this.setVisible(false); - } catch (RemoteException ex) { - setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); - logger.log(Level.SEVERE, "Unable to connect to server", ex); - JOptionPane.showMessageDialog(rootPane, "Unable to connect to server"); - } catch (NotBoundException ex) { - setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); - logger.log(Level.SEVERE, "Unable to connect to server", ex); - JOptionPane.showMessageDialog(rootPane, "Unable to connect to server"); + if (MageFrame.connect(txtUserName.getText(), txtServer.getText(), Integer.valueOf(txtPort.getText()))) { + MageFrame.getPreferences().put("serverAddress", txtServer.getText()); + MageFrame.getPreferences().put("serverPort", txtPort.getText()); + MageFrame.getPreferences().put("userName", txtUserName.getText()); + MageFrame.getPreferences().put("autoConnect", Boolean.toString(chkAutoConnect.isSelected())); + this.setVisible(false); + } + else { + JOptionPane.showMessageDialog(rootPane, "Unable to connect to server"); + } } finally { setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } + }//GEN-LAST:event_btnConnectActionPerformed private void keyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_keyTyped @@ -222,10 +228,16 @@ public class ConnectDialog extends MageDialog { evt.consume(); }//GEN-LAST:event_keyTyped + private void chkAutoConnectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkAutoConnectActionPerformed + + // TODO add your handling code here: + }//GEN-LAST:event_chkAutoConnectActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnCancel; private javax.swing.JButton btnConnect; + private javax.swing.JCheckBox chkAutoConnect; private javax.swing.JLabel lblPort; private javax.swing.JLabel lblServer; private javax.swing.JLabel lblUserName; diff --git a/Mage.Client/src/mage/client/dialog/MageDialog.java b/Mage.Client/src/mage/client/dialog/MageDialog.java index 66882175f4..6b08750eec 100644 --- a/Mage.Client/src/mage/client/dialog/MageDialog.java +++ b/Mage.Client/src/mage/client/dialog/MageDialog.java @@ -65,6 +65,7 @@ public class MageDialog extends javax.swing.JInternalFrame { public void show() { super.show(); this.toFront(); + this.setClosable(!modal); if (this.modal) { startModal(); } @@ -74,6 +75,7 @@ public class MageDialog extends javax.swing.JInternalFrame { public void setVisible(boolean value) { super.setVisible(value); this.toFront(); + this.setClosable(!modal); if (modal) { if (value) { startModal(); @@ -100,7 +102,7 @@ public class MageDialog extends javax.swing.JInternalFrame { private synchronized void startModal() { - try { + try { if (SwingUtilities.isEventDispatchThread()) { EventQueue theQueue = getToolkit().getSystemEventQueue(); while (isVisible()) { diff --git a/Mage.Client/src/mage/client/dialog/ShowCardsDialog.java b/Mage.Client/src/mage/client/dialog/ShowCardsDialog.java index b6102a5f04..9d6434d337 100644 --- a/Mage.Client/src/mage/client/dialog/ShowCardsDialog.java +++ b/Mage.Client/src/mage/client/dialog/ShowCardsDialog.java @@ -60,7 +60,7 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { this.setModal(false); } - public void loadCards(String name, CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId) { + public void loadCards(String name, CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, boolean modal) { this.title = name; cardArea.removeAll(); if (showCards != null && showCards.size() < 10) @@ -73,6 +73,7 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { pack(); this.revalidate(); this.repaint(); + this.setModal(modal); this.setVisible(true); } diff --git a/Mage.Client/src/mage/client/game/BattlefieldPanel.form b/Mage.Client/src/mage/client/game/BattlefieldPanel.form index af4ec8bf37..e1abe98ba1 100644 --- a/Mage.Client/src/mage/client/game/BattlefieldPanel.form +++ b/Mage.Client/src/mage/client/game/BattlefieldPanel.form @@ -1,6 +1,15 @@
+ + + + + + + + + diff --git a/Mage.Client/src/mage/client/game/BattlefieldPanel.java b/Mage.Client/src/mage/client/game/BattlefieldPanel.java index a5fa3c222c..b041dd9cfc 100644 --- a/Mage.Client/src/mage/client/game/BattlefieldPanel.java +++ b/Mage.Client/src/mage/client/game/BattlefieldPanel.java @@ -162,6 +162,10 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane implements Compon @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + + setBackground(java.awt.Color.gray); + setForeground(java.awt.Color.gray); + setOpaque(true); }// //GEN-END:initComponents @Override diff --git a/Mage.Client/src/mage/client/game/GamePanel.java b/Mage.Client/src/mage/client/game/GamePanel.java index 629bbd54c9..1ab1d19d16 100644 --- a/Mage.Client/src/mage/client/game/GamePanel.java +++ b/Mage.Client/src/mage/client/game/GamePanel.java @@ -137,15 +137,12 @@ public class GamePanel extends javax.swing.JPanel { this.players.clear(); this.pnlBattlefield.removeAll(); MageFrame.getCombatDialog().hideDialog(); -// MageFrame.getDesktop().remove(combat); this.setVisible(false); } public synchronized void init(GameView game) { MageFrame.getCombatDialog().init(gameId, bigCard); -// MageFrame.getDesktop().add(combat, JLayeredPane.POPUP_LAYER); MageFrame.getCombatDialog().setLocation(500, 300); -// MageFrame.getDesktop().add(pickNumber, JLayeredPane.POPUP_LAYER); addPlayers(game); updateGame(game); } @@ -257,20 +254,17 @@ public class GamePanel extends javax.swing.JPanel { this.feedbackPanel.getFeedback(FeedbackMode.QUESTION, question, true, false); } - public void inform(String information, CardsView cardView, GameView gameView) { + public void pickTarget(String message, CardsView cardView, GameView gameView, boolean required) { updateGame(gameView); + this.feedbackPanel.getFeedback(required?FeedbackMode.INFORM:FeedbackMode.CANCEL, message, false, gameView.getSpecial()); if (cardView != null && cardView.size() > 0) { - showCards(information, cardView); + showCards(message, cardView, required); } - this.feedbackPanel.getFeedback(FeedbackMode.INFORM, information, false, gameView.getSpecial()); } - public void cancel(String message, CardsView cardView, GameView gameView) { + public void inform(String information, GameView gameView) { updateGame(gameView); - if (cardView != null && cardView.size() > 0) { - showCards(message, cardView); - } - this.feedbackPanel.getFeedback(FeedbackMode.CANCEL, message, false, gameView.getSpecial()); + this.feedbackPanel.getFeedback(FeedbackMode.INFORM, information, false, gameView.getSpecial()); } public void modalMessage(String message) { @@ -310,13 +304,12 @@ public class GamePanel extends javax.swing.JPanel { public void revealCards(String name, CardsView cards) { ShowCardsDialog showCards = new ShowCardsDialog(); - MageFrame.getDesktop().add(showCards); - showCards.loadCards(name, cards, bigCard, Config.dimensions, gameId); + showCards.loadCards(name, cards, bigCard, Config.dimensions, gameId, false); } - private void showCards(String title, CardsView cards) { + private void showCards(String title, CardsView cards, boolean required) { ShowCardsDialog showCards = new ShowCardsDialog(); - showCards.loadCards(title, cards, bigCard, Config.dimensions, gameId); + showCards.loadCards(title, cards, bigCard, Config.dimensions, gameId, required); } public void getAmount(int min, int max, String message) { diff --git a/Mage.Client/src/mage/client/game/PlayerPanel.java b/Mage.Client/src/mage/client/game/PlayerPanel.java index 5cccc37324..eef67591d1 100644 --- a/Mage.Client/src/mage/client/game/PlayerPanel.java +++ b/Mage.Client/src/mage/client/game/PlayerPanel.java @@ -200,7 +200,7 @@ public class PlayerPanel extends javax.swing.JPanel { if (graveyard == null) { graveyard = new ShowCardsDialog(); } - graveyard.loadCards(player.getName() + " graveyard", player.getGraveyard(), bigCard, Config.dimensions, gameId); + graveyard.loadCards(player.getName() + " graveyard", player.getGraveyard(), bigCard, Config.dimensions, gameId, false); }//GEN-LAST:event_btnGraveActionPerformed diff --git a/Mage.Client/src/mage/client/remote/Client.java b/Mage.Client/src/mage/client/remote/Client.java index ae3a8406a0..116d3cd737 100644 --- a/Mage.Client/src/mage/client/remote/Client.java +++ b/Mage.Client/src/mage/client/remote/Client.java @@ -103,11 +103,7 @@ public class Client implements CallbackClient { } else if (callback.getMethod().equals("gameTarget")) { GameClientMessage message = (GameClientMessage) callback.getData(); - if (message.isFlag()) { - session.getGame().inform(message.getMessage(), message.getCardsView(), message.getGameView()); - } else { - session.getGame().cancel(message.getMessage(), message.getCardsView(), message.getGameView()); - } + session.getGame().pickTarget(message.getMessage(), message.getCardsView(), message.getGameView(), message.isFlag()); } else if (callback.getMethod().equals("gameSelect")) { GameClientMessage message = (GameClientMessage) callback.getData(); @@ -142,7 +138,7 @@ public class Client implements CallbackClient { else if (callback.getMethod().equals("gameInform")) { if (callback.getMessageId() > messageId) { GameClientMessage message = (GameClientMessage) callback.getData(); - session.getGame().inform(message.getMessage(), null, message.getGameView()); + session.getGame().inform(message.getMessage(), message.getGameView()); } else { logger.warning("message out of sequence - ignoring"); diff --git a/Mage.Client/src/mage/client/remote/Session.java b/Mage.Client/src/mage/client/remote/Session.java index f25cc024d4..9b0f31ed07 100644 --- a/Mage.Client/src/mage/client/remote/Session.java +++ b/Mage.Client/src/mage/client/remote/Session.java @@ -28,6 +28,7 @@ package mage.client.remote; +import java.awt.Cursor; import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; @@ -70,9 +71,6 @@ public class Session { private String userName; private MageFrame frame; private ServerState serverState; -// private String[] playerTypes; -// private List gameTypes; -// private String[] deckTypes; private Map chats = new HashMap(); private GamePanel game; private CallbackClientDaemon callbackDaemon; @@ -81,15 +79,15 @@ public class Session { this.frame = frame; } - public void connect(String userName, String serverName, int port) throws RemoteException, NotBoundException { + public boolean connect(String userName, String serverName, int port) { if (isConnected()) { disconnect(); } - System.setSecurityManager(null); - Registry reg = LocateRegistry.getRegistry(serverName, port); - this.server = (Server) reg.lookup(Config.remoteServer); - this.userName = userName; try { + System.setSecurityManager(null); + Registry reg = LocateRegistry.getRegistry(serverName, port); + this.server = (Server) reg.lookup(Config.remoteServer); + this.userName = userName; this.client = new Client(this, frame, userName); sessionId = server.registerClient(userName, client.getId()); callbackDaemon = new CallbackClientDaemon(sessionId, client, server); @@ -97,9 +95,15 @@ public class Session { logger.info("Connected to RMI server at " + serverName + ":" + port); frame.setStatusText("Connected to " + serverName + ":" + port + " "); frame.enableButtons(); + return true; } catch (MageException ex) { - Logger.getLogger(Session.class.getName()).log(Level.SEVERE, null, ex); + logger.log(Level.SEVERE, null, ex); + } catch (RemoteException ex) { + logger.log(Level.SEVERE, "Unable to connect to server - ", ex); + } catch (NotBoundException ex) { + logger.log(Level.SEVERE, "Unable to connect to server - ", ex); } + return false; } public void disconnect() { @@ -119,6 +123,7 @@ public class Session { logger.log(Level.SEVERE, "Error disconnecting ...", ex); } frame.setStatusText("Not connected "); + frame.disableButtons(); } } diff --git a/Mage.Client/src/mage/client/table/NewPlayerPanel.java b/Mage.Client/src/mage/client/table/NewPlayerPanel.java index 119ff6f704..75c64da58d 100644 --- a/Mage.Client/src/mage/client/table/NewPlayerPanel.java +++ b/Mage.Client/src/mage/client/table/NewPlayerPanel.java @@ -36,9 +36,9 @@ package mage.client.table; import java.io.File; import java.io.IOException; -import java.util.prefs.Preferences; import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter; +import mage.client.MageFrame; /** * @@ -47,12 +47,10 @@ import javax.swing.filechooser.FileFilter; public class NewPlayerPanel extends javax.swing.JPanel { private JFileChooser fcSelectDeck; - private Preferences prefs; /** Creates new form NewPlayerPanel */ public NewPlayerPanel() { initComponents(); - prefs = Preferences.userNodeForPackage(this.getClass()); fcSelectDeck = new JFileChooser(); fcSelectDeck.setAcceptAllFileFilterUsed(false); fcSelectDeck.addChoosableFileFilter(new DeckFilter()); @@ -65,7 +63,7 @@ public class NewPlayerPanel extends javax.swing.JPanel { } protected void playerLoadDeck() { - String lastFolder = prefs.get("lastDeckFolder", ""); + String lastFolder = MageFrame.getPreferences().get("lastDeckFolder", ""); if (!lastFolder.isEmpty()) fcSelectDeck.setCurrentDirectory(new File(lastFolder)); int ret = fcSelectDeck.showDialog(this, "Select Deck"); @@ -73,7 +71,7 @@ public class NewPlayerPanel extends javax.swing.JPanel { File file = fcSelectDeck.getSelectedFile(); this.txtPlayerDeck.setText(file.getPath()); try { - prefs.put("lastDeckFolder", file.getCanonicalPath()); + MageFrame.getPreferences().put("lastDeckFolder", file.getCanonicalPath()); } catch (IOException ex) { } } fcSelectDeck.setSelectedFile(null); diff --git a/Mage.Client/src/mage/client/util/Config.java b/Mage.Client/src/mage/client/util/Config.java index c5b48cc73c..cad9046190 100644 --- a/Mage.Client/src/mage/client/util/Config.java +++ b/Mage.Client/src/mage/client/util/Config.java @@ -53,6 +53,7 @@ public class Config { public static final String powerboxResourcePath; public static final String cardArtResourcePath; public static final String symbolsResourcePath; + public static final String setIconsResourcePath; public static final String resourcePath; public static final double cardScalingFactor; public static final boolean useResource; @@ -78,6 +79,7 @@ public class Config { frameResourcePath = cardsResourcePath + "Frame\\"; powerboxResourcePath = cardsResourcePath + "PowerBox\\"; cardArtResourcePath = cardsResourcePath + "Pics\\"; + setIconsResourcePath = cardsResourcePath + "Icon\\"; symbolsResourcePath = p.getProperty("symbols-resource-path"); } else { @@ -85,6 +87,7 @@ public class Config { frameResourcePath = resourcePath + "cards/frame/"; powerboxResourcePath = resourcePath + "cards/powerbox/"; cardArtResourcePath = resourcePath + "cards/art/"; + setIconsResourcePath = resourcePath + "cards/icon/"; symbolsResourcePath = resourcePath + "symbols/"; } } diff --git a/Mage.Client/src/mage/client/util/Constants.java b/Mage.Client/src/mage/client/util/Constants.java index 23802fe72f..c55c965f15 100644 --- a/Mage.Client/src/mage/client/util/Constants.java +++ b/Mage.Client/src/mage/client/util/Constants.java @@ -50,12 +50,15 @@ public final class Constants { public static final int ART_MAX_YOFFSET = 37; public static final int NAME_MAX_YOFFSET = 28; public static final int TYPE_MAX_YOFFSET = 223; + public static final int ICON_MAX_HEIGHT = 16; + public static final int ICON_MAX_WIDTH = 16; + public static final int ICON_MAX_XOFFSET = 238; + public static final int ICON_MAX_YOFFSET = 210; public static final int TEXT_MAX_YOFFSET = 232; public static final int TEXT_MAX_WIDTH = 227; public static final int TEXT_MAX_HEIGHT = 105; public static final int NAME_FONT_MAX_SIZE = 13; public static final int TEXT_FONT_MAX_SIZE = 11; -// public static final int PARAGRAPH_MAX_SPACING = 4; public static final int POWBOX_MAX_TOP = 336; public static final int POWBOX_MAX_LEFT = 202; public static final int POWBOX_TEXT_MAX_TOP = 352; @@ -63,28 +66,5 @@ public final class Constants { public static final int DAMAGE_MAX_LEFT = 180; public static final double SCALE_FACTOR = 0.5; - -// public static final int FRAME_HEIGHT = (int)(FRAME_MAX_HEIGHT * SCALE_FACTOR); -// public static final int FRAME_WIDTH = (int)(FRAME_MAX_WIDTH * SCALE_FACTOR); -//// public static final int ART_HEIGHT = (int)(ART_MAX_HEIGHT * SCALE_FACTOR); -//// public static final int ART_WIDTH = (int)(ART_MAX_WIDTH * SCALE_FACTOR); -// public static final int SYMBOL_HEIGHT = (int)(SYMBOL_MAX_HEIGHT * SCALE_FACTOR); -// public static final int SYMBOL_WIDTH = (int)(SYMBOL_MAX_WIDTH * SCALE_FACTOR); -//// public static final int SYMBOL_XOFFSET = (int)(SYMBOL_MAX_XOFFSET * SCALE_FACTOR); -//// public static final int SYMBOL_YOFFSET = (int)(SYMBOL_MAX_YOFFSET * SCALE_FACTOR); -//// public static final int SYMBOL_SPACE = (int)(SYMBOL_MAX_SPACE * SCALE_FACTOR); -// public static final int CONTENT_XOFFSET = (int)(CONTENT_MAX_XOFFSET * SCALE_FACTOR); -//// public static final int ART_YOFFSET = (int)(ART_MAX_YOFFSET * SCALE_FACTOR); -// public static final int NAME_YOFFSET = (int)(NAME_MAX_YOFFSET * SCALE_FACTOR); -// public static final int TYPE_YOFFSET = (int)(TYPE_MAX_YOFFSET * SCALE_FACTOR); -// public static final int TEXT_YOFFSET = (int)(TEXT_MAX_YOFFSET * SCALE_FACTOR); -// public static final int TEXT_WIDTH = (int)(TEXT_MAX_WIDTH * SCALE_FACTOR); -// public static final int TEXT_HEIGHT = (int)(TEXT_MAX_HEIGHT * SCALE_FACTOR); -// public static final int POWBOX_TEXT_TOP = (int)(POWBOX_TEXT_MAX_TOP * SCALE_FACTOR); -// public static final int POWBOX_TEXT_LEFT = (int)(POWBOX_TEXT_MAX_LEFT * SCALE_FACTOR); -//// public static final int DAMAGE_LEFT = (int)(DAMAGE_MAX_LEFT * SCALE_FACTOR); -// public static final int NAME_FONT_SIZE = Math.max(9, (int)(NAME_FONT_MAX_SIZE * SCALE_FACTOR)); -//// public static final int TEXT_FONT_SIZE = Math.max(9, (int)(TEXT_FONT_MAX_SIZE * SCALE_FACTOR)); -//// public static final int PARAGRAPH_SPACING = (int)(PARAGRAPH_MAX_SPACING * SCALE_FACTOR); } diff --git a/Mage.Client/src/mage/client/util/Frames.java b/Mage.Client/src/mage/client/util/Frames.java index 30a32bd642..8629e1a741 100644 --- a/Mage.Client/src/mage/client/util/Frames.java +++ b/Mage.Client/src/mage/client/util/Frames.java @@ -29,6 +29,7 @@ package mage.client.util; import java.awt.Image; +import java.awt.image.BufferedImage; import static mage.client.util.Constants.*; /** @@ -37,35 +38,35 @@ import static mage.client.util.Constants.*; */ public class Frames { - public static Image Black = ImageHelper.loadImage(Config.frameResourcePath + "8 black.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Blue = ImageHelper.loadImage(Config.frameResourcePath + "8 blue.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Gold = ImageHelper.loadImage(Config.frameResourcePath + "8 gold.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Green = ImageHelper.loadImage(Config.frameResourcePath + "8 green.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Grey = ImageHelper.loadImage(Config.frameResourcePath + "8 grey.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Red = ImageHelper.loadImage(Config.frameResourcePath + "8 red.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image White = ImageHelper.loadImage(Config.frameResourcePath + "8 white.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image BlackRed = ImageHelper.loadImage(Config.frameResourcePath + "black to red hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image BlackGreen = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid black to green.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image BlueBlack = ImageHelper.loadImage(Config.frameResourcePath + "blue_to_black_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image BlueRed = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid blue to red.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image GreenBlue = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid green to blue.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image GreenWhite = ImageHelper.loadImage(Config.frameResourcePath + "green_to_white_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image RedGreen = ImageHelper.loadImage(Config.frameResourcePath + "red_to_green_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image RedWhite = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid red to white.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image WhiteBlack = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid white to black.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image WhiteBlue = ImageHelper.loadImage(Config.frameResourcePath + "white_to_blue_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Black = ImageHelper.loadImage(Config.frameResourcePath + "8 black.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Blue = ImageHelper.loadImage(Config.frameResourcePath + "8 blue.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Gold = ImageHelper.loadImage(Config.frameResourcePath + "8 gold.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Green = ImageHelper.loadImage(Config.frameResourcePath + "8 green.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Grey = ImageHelper.loadImage(Config.frameResourcePath + "8 grey.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Red = ImageHelper.loadImage(Config.frameResourcePath + "8 red.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage White = ImageHelper.loadImage(Config.frameResourcePath + "8 white.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage BlackRed = ImageHelper.loadImage(Config.frameResourcePath + "black to red hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage BlackGreen = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid black to green.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage BlueBlack = ImageHelper.loadImage(Config.frameResourcePath + "blue_to_black_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage BlueRed = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid blue to red.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage GreenBlue = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid green to blue.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage GreenWhite = ImageHelper.loadImage(Config.frameResourcePath + "green_to_white_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage RedGreen = ImageHelper.loadImage(Config.frameResourcePath + "red_to_green_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage RedWhite = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid red to white.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage WhiteBlack = ImageHelper.loadImage(Config.frameResourcePath + "eve hybrid white to black.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage WhiteBlue = ImageHelper.loadImage(Config.frameResourcePath + "white_to_blue_hybrid.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Forest = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana green.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Island = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana blue.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Mountain = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana red.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Plains = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana white.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Swamp = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana black.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Land = ImageHelper.loadImage(Config.frameResourcePath + "8 multiland nomana colorless.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Forest = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana green.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Island = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana blue.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Mountain = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana red.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Plains = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana white.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Swamp = ImageHelper.loadImage(Config.frameResourcePath + "8 land mana black.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Land = ImageHelper.loadImage(Config.frameResourcePath + "8 multiland nomana colorless.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image Effect = ImageHelper.loadImage(Config.frameResourcePath + "Effects\\effect0.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); + public static BufferedImage Effect = ImageHelper.loadImage(Config.frameResourcePath + "Effects\\effect0.png", FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - public static Image PowBoxLeft = ImageHelper.loadImage(Config.powerboxResourcePath + "graphic_card_powerbox_a_left.png"); - public static Image PowBoxMid = ImageHelper.loadImage(Config.powerboxResourcePath + "graphic_card_powerbox_a_middle.png"); - public static Image PowBoxRight = ImageHelper.loadImage(Config.powerboxResourcePath + "graphic_card_powerbox_a_right.png"); + public static BufferedImage PowBoxLeft = ImageHelper.loadImage(Config.powerboxResourcePath + "graphic_card_powerbox_a_left.png"); + public static BufferedImage PowBoxMid = ImageHelper.loadImage(Config.powerboxResourcePath + "graphic_card_powerbox_a_middle.png"); + public static BufferedImage PowBoxRight = ImageHelper.loadImage(Config.powerboxResourcePath + "graphic_card_powerbox_a_right.png"); } diff --git a/Mage.Client/src/mage/client/util/ImageHelper.java b/Mage.Client/src/mage/client/util/ImageHelper.java index 806e570182..cbd36009c0 100644 --- a/Mage.Client/src/mage/client/util/ImageHelper.java +++ b/Mage.Client/src/mage/client/util/ImageHelper.java @@ -42,6 +42,7 @@ import java.util.List; import javax.imageio.ImageIO; import mage.Constants.CardType; import mage.client.cards.CardDimensions; +import mage.sets.Sets; import mage.view.AbilityView; import mage.view.CardView; import mage.view.StackAbilityView; @@ -52,17 +53,30 @@ import static mage.client.util.Constants.*; * @author BetaSteward_at_googlemail.com */ public class ImageHelper { - protected static HashMap images = new HashMap(); + protected static HashMap images = new HashMap(); protected static HashMap backgrounds = new HashMap(); - public static Image loadImage(String ref, int width, int height) { - Image image = loadImage(ref); + public static BufferedImage loadImage(String ref, int width, int height) { + BufferedImage image = loadImage(ref); if (image != null) - return ScaleImage(image, width, height); + return scaleImage(image, width, height); return null; } - public static Image loadImage(String ref) { + /** + * + * @param ref - image name + * @param height - height after scaling + * @return a scaled image that preserves the original aspect ratio, with a specified height + */ + public static BufferedImage loadImage(String ref, int height) { + BufferedImage image = loadImage(ref); + if (image != null) + return scaleImage(image, height); + return null; + } + + public static BufferedImage loadImage(String ref) { if (!images.containsKey(ref)) { try { if (Config.useResource) @@ -76,11 +90,9 @@ public class ImageHelper { return images.get(ref); } - public static BufferedImage getBackground(CardView card) { - // card background should be the same for all cards with the same name/art - String cardName = card.getName()+card.getArt(); - if (backgrounds.containsKey(cardName)) { - return backgrounds.get(cardName); + public static BufferedImage getBackground(CardView card, String backgroundName) { + if (backgrounds.containsKey(backgroundName)) { + return backgrounds.get(backgroundName); } BufferedImage background = new BufferedImage(FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT, BufferedImage.TYPE_INT_RGB); @@ -88,28 +100,40 @@ public class ImageHelper { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.setColor(Color.WHITE); g.fillRect(0, 0, FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT); - g.drawImage(getFrame(card), 0, 0, Color.WHITE, null); - if (card.getArt() != null && !card.getArt().equals("")) { - Image art = loadImage(Config.cardArtResourcePath + card.getArt(), ART_MAX_WIDTH, ART_MAX_HEIGHT); - g.drawImage(art, CONTENT_MAX_XOFFSET, ART_MAX_YOFFSET, null); + if (card instanceof StackAbilityView || card instanceof AbilityView) { + g.drawImage(Frames.Effect, 0, 0, Color.WHITE, null); } + else { + g.drawImage(getFrame(card), 0, 0, Color.WHITE, null); + if (card.getArt() != null && !card.getArt().equals("")) { + BufferedImage art = loadImage(Config.cardArtResourcePath + card.getArt(), ART_MAX_WIDTH, ART_MAX_HEIGHT); + g.drawImage(art, CONTENT_MAX_XOFFSET, ART_MAX_YOFFSET, null); + } - if (card.getCardTypes() != null && (card.getCardTypes().contains(CardType.CREATURE) || card.getCardTypes().contains(CardType.PLANESWALKER))) { - g.drawImage(Frames.PowBoxLeft, POWBOX_MAX_LEFT, POWBOX_MAX_TOP, null); - g.drawImage(Frames.PowBoxMid, POWBOX_MAX_LEFT + 7, POWBOX_MAX_TOP, null); - g.drawImage(Frames.PowBoxRight, POWBOX_MAX_LEFT + 38, POWBOX_MAX_TOP, null); + if (card.getExpansionSetCode() != null && card.getRarity() != null) { + String symbolCode = Sets.getInstance().get(card.getExpansionSetCode()).getSymbolCode(); + if (symbolCode != null && symbolCode.length() > 0) { + StringBuilder sb = new StringBuilder(); + sb.append(Config.setIconsResourcePath).append("graphic_").append(symbolCode).append("_").append(card.getRarity().getSymbolCode()).append(".png"); + BufferedImage icon = loadImage(sb.toString(), ICON_MAX_HEIGHT); + g.drawImage(icon, ICON_MAX_XOFFSET - icon.getWidth(), ICON_MAX_YOFFSET, null); + } + } + + if (card.getCardTypes() != null && (card.getCardTypes().contains(CardType.CREATURE) || card.getCardTypes().contains(CardType.PLANESWALKER))) { + g.drawImage(Frames.PowBoxLeft, POWBOX_MAX_LEFT, POWBOX_MAX_TOP, null); + g.drawImage(Frames.PowBoxMid, POWBOX_MAX_LEFT + 7, POWBOX_MAX_TOP, null); + g.drawImage(Frames.PowBoxRight, POWBOX_MAX_LEFT + 38, POWBOX_MAX_TOP, null); + } } g.dispose(); - backgrounds.put(cardName, background); + backgrounds.put(backgroundName, background); return background; } - protected static Image getFrame(CardView card) { - if (card instanceof StackAbilityView || card instanceof AbilityView) { - return Frames.Effect; - } + protected static BufferedImage getFrame(CardView card) { if (card.getCardTypes().contains(CardType.LAND)) { return getLandFrame(card); @@ -178,7 +202,7 @@ public class ImageHelper { return Frames.Grey; } - protected static Image getLandFrame(CardView card) { + protected static BufferedImage getLandFrame(CardView card) { if (card.getSuperTypes().contains("Basic")) { if (card.getSubTypes().contains("Forest")) { return Frames.Forest; @@ -199,8 +223,31 @@ public class ImageHelper { return Frames.Land; } - public static Image ScaleImage(Image image, int width, int height) { - return image.getScaledInstance(width, height, Image.SCALE_SMOOTH); + public static BufferedImage scaleImage(BufferedImage image, int width, int height) { + BufferedImage scaledImage = image; + int w = image.getWidth(); + int h = image.getHeight(); + do { + w /= 2; + h /= 2; + if (w < width || h < height) { + w = width; + h = height; + } + BufferedImage newImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + Graphics2D graphics2D = newImage.createGraphics(); + graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); + graphics2D.drawImage(scaledImage, 0, 0, w, h, null); + graphics2D.dispose(); + scaledImage = newImage; + } while (w != width || h != height); + return scaledImage; + } + + public static BufferedImage scaleImage(BufferedImage image, int height) { + double ratio = height / (double)image.getHeight(); + int width = (int) (image.getWidth() * ratio); + return scaleImage(image, width, height); } public static MemoryImageSource rotate(Image image, CardDimensions dimensions) { @@ -223,7 +270,7 @@ public class ImageHelper { } - public static void DrawCosts(List costs, Graphics2D g, int xOffset, int yOffset, ImageObserver o) { + public static void drawCosts(List costs, Graphics2D g, int xOffset, int yOffset, ImageObserver o) { if (costs.size() > 0) { int costLeft = xOffset; for (int i = costs.size() - 1; i >= 0; i--) { diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index de12cf57b8..9d8f1a4828 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.ObjectColor; import mage.cards.Card; import mage.game.permanent.Permanent; @@ -55,6 +56,8 @@ public class CardView implements Serializable { protected ObjectColor color; protected List manaCost; protected String art; + protected Rarity rarity; + protected String expansionSetCode; public CardView(Card card) { this.id = card.getId(); @@ -75,6 +78,8 @@ public class CardView implements Serializable { this.color = card.getColor(); this.manaCost = card.getManaCost().getSymbols(); this.art = card.getArt(); + this.rarity = card.getRarity(); + this.expansionSetCode = card.getExpansionSetCode(); } protected CardView() { @@ -139,6 +144,14 @@ public class CardView implements Serializable { return art; } + public Rarity getRarity() { + return rarity; + } + + public String getExpansionSetCode() { + return expansionSetCode; + } + public UUID getId() { return id; } diff --git a/Mage.Common/src/mage/view/CombatGroupView.java b/Mage.Common/src/mage/view/CombatGroupView.java index a757267e9d..6f3f929f9f 100644 --- a/Mage.Common/src/mage/view/CombatGroupView.java +++ b/Mage.Common/src/mage/view/CombatGroupView.java @@ -46,24 +46,24 @@ public class CombatGroupView implements Serializable { private CardsView blockers = new CardsView(); private String defenderName; - public CombatGroupView(CombatGroup combatGroup, GameState state) { - Player player = state.getPlayer(combatGroup.getDefenderId()); + public CombatGroupView(CombatGroup combatGroup, Game game) { + Player player = game.getPlayer(combatGroup.getDefenderId()); if (player != null) { this.defenderName = player.getName(); } else { - Permanent perm = state.getPermanent(combatGroup.getDefenderId()); + Permanent perm = game.getPermanent(combatGroup.getDefenderId()); this.defenderName = perm.getName(); } for (UUID id: combatGroup.getAttackers()) { - Permanent attacker = state.getPermanent(id); + Permanent attacker = game.getPermanent(id); if (attacker != null) - attackers.put(id, new PermanentView(attacker)); + attackers.put(id, new PermanentView(attacker, game.getCard(attacker.getId()))); } for (UUID id: combatGroup.getBlockers()) { - Permanent blocker = state.getPermanent(id); + Permanent blocker = game.getPermanent(id); if (blocker != null) - blockers.put(id, new PermanentView(blocker)); + blockers.put(id, new PermanentView(blocker, game.getCard(blocker.getId()))); } } diff --git a/Mage.Common/src/mage/view/GameView.java b/Mage.Common/src/mage/view/GameView.java index 730939317b..680f8f1b07 100644 --- a/Mage.Common/src/mage/view/GameView.java +++ b/Mage.Common/src/mage/view/GameView.java @@ -63,7 +63,7 @@ public class GameView implements Serializable { public GameView(GameState state, Game game) { for (Player player: state.getPlayers().values()) { - players.add(new PlayerView(player, state, game)); + players.add(new PlayerView(player, game)); } for (StackObject stackObject: state.getStack()) { if (stackObject instanceof StackAbility) { @@ -92,7 +92,7 @@ public class GameView implements Serializable { else this.priorityPlayerName = ""; for (CombatGroup combatGroup: state.getCombat().getGroups()) { - combat.add(new CombatGroupView(combatGroup, state)); + combat.add(new CombatGroupView(combatGroup, game)); } this.special = state.getSpecialActions().getControlledBy(state.getPriorityPlayerId()).size() > 0; } diff --git a/Mage.Common/src/mage/view/PermanentView.java b/Mage.Common/src/mage/view/PermanentView.java index 17ba9ca950..56dc0b9382 100644 --- a/Mage.Common/src/mage/view/PermanentView.java +++ b/Mage.Common/src/mage/view/PermanentView.java @@ -31,6 +31,7 @@ package mage.view; import java.util.ArrayList; import java.util.List; import java.util.UUID; +import mage.cards.Card; import mage.counters.Counter; import mage.game.permanent.Permanent; @@ -47,8 +48,9 @@ public class PermanentView extends CardView { private int damage; private List attachments; private List counters; + private CardView original; - public PermanentView(Permanent permanent) { + public PermanentView(Permanent permanent, Card card) { super(permanent); this.tapped = permanent.isTapped(); this.flipped = permanent.isFlipped(); @@ -65,6 +67,7 @@ public class PermanentView extends CardView { counters.add(new CounterView(counter)); } } + original = new CardView(card); } public boolean isTapped() { @@ -94,4 +97,8 @@ public class PermanentView extends CardView { public List getCounters() { return counters; } + + public CardView getOriginal() { + return original; + } } diff --git a/Mage.Common/src/mage/view/PlayerView.java b/Mage.Common/src/mage/view/PlayerView.java index 933d0ae9c1..eb2123fd87 100644 --- a/Mage.Common/src/mage/view/PlayerView.java +++ b/Mage.Common/src/mage/view/PlayerView.java @@ -55,33 +55,33 @@ public class PlayerView implements Serializable { private CardsView graveyard = new CardsView(); private Map battlefield = new HashMap(); - public PlayerView(Player player, GameState state, Game game) { + public PlayerView(Player player, Game game) { this.playerId = player.getId(); this.name = player.getName(); this.life = player.getLife(); this.libraryCount = player.getLibrary().size(); this.handCount = player.getHand().size(); this.manaPool = new ManaPoolView(player.getManaPool()); - this.isActive = (player.getId().equals(state.getActivePlayerId())); + this.isActive = (player.getId().equals(game.getActivePlayerId())); this.hasLeft = player.hasLeft(); for (Card card: player.getGraveyard().getCards(game)) { graveyard.put(card.getId(), new CardView(card)); } - for (Permanent permanent: state.getBattlefield().getAllPermanents()) { - if (showInBattlefield(permanent, state)) { - PermanentView view = new PermanentView(permanent); + for (Permanent permanent: game.getBattlefield().getAllPermanents()) { + if (showInBattlefield(permanent, game)) { + PermanentView view = new PermanentView(permanent, game.getCard(permanent.getId())); battlefield.put(view.getId(), view); } } } - private boolean showInBattlefield(Permanent permanent, GameState state) { + private boolean showInBattlefield(Permanent permanent, Game game) { //show permanents controlled by player or attachments to permanents controlled by player if (permanent.getAttachedTo() == null) return permanent.getControllerId().equals(playerId); else - return state.getPermanent(permanent.getAttachedTo()).getControllerId().equals(playerId); + return game.getPermanent(permanent.getAttachedTo()).getControllerId().equals(playerId); } public int getLife() { diff --git a/Mage.Player.AI/src/mage/player/ai/ComputerPlayer.java b/Mage.Player.AI/src/mage/player/ai/ComputerPlayer.java index a941360531..a06cff4a7d 100644 --- a/Mage.Player.AI/src/mage/player/ai/ComputerPlayer.java +++ b/Mage.Player.AI/src/mage/player/ai/ComputerPlayer.java @@ -141,6 +141,72 @@ public class ComputerPlayer> extends PlayerImpl i return false; } + @Override + public boolean choose(Outcome outcome, Target target, Game game) { + if (logger.isLoggable(Level.FINE)) + logger.fine("chooseTarget: " + outcome.toString() + ":" + target.toString()); + UUID opponentId = game.getOpponents(playerId).iterator().next(); + if (target instanceof TargetPlayer) { + if (outcome.isGood()) { + if (target.canTarget(playerId, game)) { + target.add(playerId, game); + return true; + } + } + else { + if (target.canTarget(playerId, game)) { + target.add(opponentId, game); + return true; + } + } + } + if (target instanceof TargetDiscard) { + findPlayables(game); + if (unplayable.size() > 0) { + for (int i = unplayable.size() - 1; i >= 0; i--) { + if (target.canTarget(unplayable.values().toArray(new Card[0])[i].getId(), game)) { + target.add(unplayable.values().toArray(new Card[0])[i].getId(), game); + return true; + } + } + } + if (hand.size() > 0) { + if (target.canTarget(hand.toArray(new UUID[0])[0], game)) { + target.add(hand.toArray(new UUID[0])[0], game); + return true; + } + } + } + if (target instanceof TargetControlledPermanent) { + List targets; + targets = threats(playerId, ((TargetPermanent)target).getFilter(), game); + if (!outcome.isGood()) + Collections.reverse(targets); + for (Permanent permanent: targets) { + if (target.canTarget(permanent.getId(), game)) { + target.add(permanent.getId(), game); + return true; + } + } + } + if (target instanceof TargetPermanent) { + List targets; + if (outcome.isGood()) { + targets = threats(playerId, ((TargetPermanent)target).getFilter(), game); + } + else { + targets = threats(opponentId, ((TargetPermanent)target).getFilter(), game); + } + for (Permanent permanent: targets) { + if (target.canTarget(permanent.getId(), game)) { + target.add(permanent.getId(), game); + return true; + } + } + } + return false; + } + @Override public boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game) { if (logger.isLoggable(Level.FINE)) @@ -219,10 +285,10 @@ public class ComputerPlayer> extends PlayerImpl i } List targets; if (outcome.isGood()) { - targets = threats(playerId, new FilterCreaturePermanent(), game); + targets = threats(playerId, FilterCreaturePermanent.getDefault(), game); } else { - targets = threats(opponentId, new FilterCreaturePermanent(), game); + targets = threats(opponentId, FilterCreaturePermanent.getDefault(), game); } for (Permanent permanent: targets) { if (target.canTarget(permanent.getId(), source, game)) { @@ -555,7 +621,7 @@ public class ComputerPlayer> extends PlayerImpl i public boolean choose(Outcome outcome, Choice choice, Game game) { logger.fine("choose"); //TODO: improve this - choice.setChoice(choice.getChoices().get(0)); + choice.setChoice(choice.getChoices().iterator().next()); return true; } @@ -638,7 +704,7 @@ public class ComputerPlayer> extends PlayerImpl i public void assignDamage(int damage, List targets, UUID sourceId, Game game) { logger.fine("assignDamage"); //TODO: improve this - game.getPermanent(targets.get(0)).damage(damage, sourceId, game); + game.getPermanent(targets.get(0)).damage(damage, sourceId, game, true); } @Override diff --git a/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java b/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java index c9e1fd897c..afa0f883dc 100644 --- a/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java +++ b/Mage.Player.AIMinimax/src/mage/player/ai/ComputerPlayer3.java @@ -407,15 +407,11 @@ public class ComputerPlayer3 extends ComputerPlayer2 implements Player { sim.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_BLOCKERS_STEP_POST, sim.getActivePlayerId(), sim.getActivePlayerId())); Combat simCombat = sim.getCombat().copy(); finishCombat(sim); - if (!counter) { - int testScore = GameStateEvaluator.evaluate(playerId, sim); - if (testScore < currentScore) { - // if score at end of combat is worse than original score don't check counterattack - logger.fine("simulating -- abandoning counterattack check, no immediate benefit"); - val = testScore; - } - else - val = simulatePostCombatMain(sim, newNode, depth-1, alpha, beta); + if (sim.isGameOver()) { + val = GameStateEvaluator.evaluate(playerId, sim); + } + else if (!counter) { + val = simulatePostCombatMain(sim, newNode, depth-1, alpha, beta); } else val = GameStateEvaluator.evaluate(playerId, sim); diff --git a/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index cad9a6a55e..dc10625e8e 100644 --- a/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -154,6 +154,23 @@ public class HumanPlayer extends PlayerImpl { return false; } + @Override + public boolean choose(Outcome outcome, Target target, Game game) { + while (!abort) { + game.fireSelectTargetEvent(playerId, target.getMessage(), target.isRequired()); + waitForResponse(); + if (response.getUUID() != null) { + if (target.canTarget(response.getUUID(), game)) { + target.add(response.getUUID(), game); + return true; + } + } else if (!target.isRequired()) { + return false; + } + } + return false; + } + @Override public boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game) { while (!abort) { @@ -277,7 +294,7 @@ public class HumanPlayer extends PlayerImpl { @Override public boolean playXMana(VariableManaCost cost, Game game) { - game.firePlayXManaEvent(playerId, "Pay {X}: {X}=" + cost.getValue()); + game.firePlayXManaEvent(playerId, "Pay {X}: {X}=" + cost.getAmount()); waitForResponse(); if (response.getBoolean() != null) { if (!response.getBoolean()) @@ -382,12 +399,12 @@ public class HumanPlayer extends PlayerImpl { int damageAmount = getAmount(0, remainingDamage, "Select amount", game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { - permanent.damage(damageAmount, sourceId, game); + permanent.damage(damageAmount, sourceId, game, true); } else { Player player = game.getPlayer(target.getFirstTarget()); if (player != null) { - player.damage(damageAmount, sourceId, game); + player.damage(damageAmount, sourceId, game, false, true); } } } diff --git a/Mage.Server/plugins/Mage.Deck.Constructed.jar b/Mage.Server/plugins/Mage.Deck.Constructed.jar index daf82be21ec4dd264df934222565cff9cff970b4..0bea6094ffe7d8bad783d028f471fef79c384148 100644 GIT binary patch delta 113 zcmX>ma!iCbz?+$civa{q*jY~G)!;a8XK8!*>Gf9=ZIju}^$c{A49zDlcVGs|zES{D plX)3cLG)%*#%t_g0X|L(xVFiDoK|4LZcYO*y^qrrOn>7H000J7CQ1MR delta 113 zcmX>ma!iCbz?+$civa|__pwam)!_Kn$6~uDMMQq0Z8E!=o`G(Xq4C7!4$L6gR|+6% oGB2Ylh~8|tn>2I6?0Hw|({Qv*} diff --git a/Mage.Server/plugins/Mage.Game.FreeForAll.jar b/Mage.Server/plugins/Mage.Game.FreeForAll.jar index 9cdf0b24080185cac336e23902e858f87bb478fb..7636603995470b7b952374887c7d81c03a9de1fe 100644 GIT binary patch delta 130 zcmcbvab1Hqz?+$civa|V*jY~G)!;a6XK8!*>Gf9=ZIju}^$c{A49zDlcVGs|zES{D zlX)3cLG)%*Mqhp~qgB9%2`qC($O5i^vWT!1STIo708F*!mePNMI;yiy9z4* delta 130 zcmcbvab1Hqz?+$civa}w^s!9j)!_Ku$6~uDMMQq0Z8E!=o`G(Xq4C7!4$L6gR|+6% zGB2Ylh~8|<=*tggv diff --git a/Mage.Server/plugins/Mage.Game.TwoPlayerDuel.jar b/Mage.Server/plugins/Mage.Game.TwoPlayerDuel.jar index 19a38f27f10e6f9f544fdd4ae42b0f433a27075b..d5467172b8dc36f86db2d88384e792ade8e0be35 100644 GIT binary patch delta 130 zcmdn3v|EWcz?+$civa}o+F4HI)!^7;XK8!*>Gf9=ZIju}^$c{A49zDlcVGs|zES{D zlX)3cLG)%*Mp+&(Ba}Ca2`saT-vX|G@+W>Pu%Nzx0hmq_Fa^`I1U$g>Q-Lr5f>J9u delta 130 zcmdn3v|EWcz?+$civa{!`&lOPYH+ahv)JxQ5s{y0o6K&eXP}#8XgqPb12ahWl>&&G z%*&_>qBol|%JP62p}bK{V3|$)7I6KOKk-|E1@#3Cz;u#;DVUxm-~pze3WNawx*Z?4 diff --git a/Mage.Server/plugins/Mage.Player.AI.jar b/Mage.Server/plugins/Mage.Player.AI.jar index d72e2390a115257bc075b76f5a7c830342482d27..da62e4e14d6ace96dbccb5d8c3737a26176e5e18 100644 GIT binary patch delta 17724 zcmb_^2Vhjyw)R?kpUIiboP-bvFbR-Q5+Dh^hZY2+_a=%$C;|#WLa_jj1?>G`2`H!_ zLB#^$4g}N-Vgc-30kQXrT?piTYoD1((0Bj)-v6%ma?Y;ntiAePdrv-nQeXGHP8u~- zTLF^)cJ%IkYf?+S9j|WRXw=*s&NA=8+`_yUa;|yb%bn$2{w|O4nL=xOtv?kly{y~r zf9mW6BKen1Zo9)-5rKq8*3HJy>11O{A(rvGu?uWTH!MT+)j50KBROpum| z@;E~tlVr4+a+Xvl%j0Z6PYS4W)D)>q4XPqF%~sO`R7Z`K%8a0zsiq~WbJZ*vHQQEm z0u)kX{pvit!|MD1PgisOYFU1qDxgVaV{AsC=?rL9)jYGr^rtE*(j)d6*lx;99k zggx-r+3NZr^}u+5y+Ix~+Uh1j;pQN>SGNSzt?D*;xB<0F-7cjYWc(cgb*H+^&&y?K zX@IiTYALOe$K3&Sk6J5VTbIZk)V#{+7M+A7s@d2Ew4{v)6wYLm>^ZmS(KphEg~`gw&Aa+f@w zkd`Oq@syue3Z?#ONNb1HZh^5UQ9Z5p2Guj_S$UM$>bU?dQqKoyzS<`v_e<#j2&P_; z*)Q1Y#Q-f;V+G_(@`aZJ>J{~BK)t437l3aB=??X#Jl>MF5}E$CJl>JscN5in>YzXi zACl)`>3LrOACXml5KtegkA%K^1e=eAE}saPX@2#oUwtM*_>!$Y7w}l~7lOo>^7zVD zUkB+f^^L8*wbggF`rcMQ1n6E!B8Ebco>9{R>PK}{2LEKMpMzn1^Opc^RKMElw*Wn; zeizC3Ly!Uy{tVJ1>X@Im2h?#@>E~U3hM1jDCv8=Qw2 z>4pNX5k`b{V>IeaTW3k<5kLPT^O}HEx~V*x1$1+rjfd#cGdd@rTj-W}s4D`xmCnUO zUE$~7Y@HXNqX4cx)cJlsZtK=STa8U9G!~I4pxfxSpuKJvpl!OnUw4pq$8bP*(wzfX zQWsffSHH4t-7UaMcNY{3q_KyTdP-X_TlWsI--w;=BeM!o)qMjX+-WkPpBRzVQtB_0 z2H5)a0H^AKemw}5Ko1tX_N(*^@#~?s9u^F9NDuex5w;!~r$a5j`%T#|xDw*m`0B#{3MS)}(+wQ=et)$$$(20{F87`W!txpr`1mwl1>u zG+R$+A|_{Waq-NOeshZ!E}XfLDWQCORv+e><-a!>tsd_p$i<7M z&!0DwsgIl0I@7(nd0lr>B-!25{66=p?7pGJV4AIG1E@D?Tv5ranTwbvMn@O8)3Tep zuVzk~H`B_NZejQKZdUh%@?PCO z(LATTNzWJAnrrKMm^K0+#5TF z8VxHdp3$$UWQL-6=GzCqvU_9@Knb0c4B>+>9alfId$*1V!w zGuuwb2N$-L&)WJHN8hS%V@f@1*kAg3INH^#-1UXi({9&yI4VcAu=SmezDt)ndbPgR zeeJERfP8F?qwm)DxIOxII&ZCB=jeO&5?kNr===2&=~-{<4UT?5Z*+8--el_s9sQ8> zJgiqadb57S(T@t!kLky4y~WX6QQ;MQsiVvFHb?(MM{K>_(L3}`Tkmr86PT*<`BL{} z-{wP~l!ZQ}|LN%6Tx{z-j(%G2b@Vg(Sw}y|#SZ_*zdQPQz0cPB9eqH*;Hd7Zz)^kh z&@bwjZ2hvMU(v5J^>jZRRo`84T8qZp(`@iUb4=e(1tx$r$a zVt(=580+~?zRS^H=r3*km7~Ab-`IMNqrcVPIr@A3gQI`cM;-l>p!Ku{;U=syKGzHoy)j_Ko$uGA+SeNtE17C9DM%CWTm(6KE20|emQImI(Z&2{(on;g84 z?|1lH{*I}Y8*Y{E_V1r!TR#0MQ%h4{-2YO?N^mUO@;m%6Z+5Hthy0299muy8aI*$9 z_xIz8juo^VH*0_WF;>tWKQuc$4b>DwpGWm z>I&O$x6&M|o&f!Ue{}dbS2|XGq4_)9+pV>)gUv56bT-d@tvs)#!{d2^V>OUR$Vzvt z4F1ls8d{AUWh=j9H3pIRB~0vldXvOVE8VuTm@?h@?HUI!cC02=Q-?pbnz^e^?>r_Q zGx-<()v=oEO%MVrn<=?k<%i8#xX7_`_)N!Yq2F_?mSD5h%CT~-JjcqnTH96|skF7N zcJgk|lncJ*0tdD_2tki_ZgrMzb#$ywR%gfRVs&+_Zld;#@!hQg+v?$1J*{3s%ifOF zN4iptSj8>Qi1{;SN_U~7k`&0=7c!}us!Yc^4a)x7z_jKe1rqeL`a5c%l`TUDIM(Ub zK*t&cI;h4flc}lu{X-4h?+*uj=!e#{AC%GjLTj+2TB|lpssQxyY{GCDhLO|Gn>iiJ z9-=RIFBp`WFjTBgBWOmWRL2@-4R@>&P%3MrHOjU|yUz?7lJX_A(HaANx5hfwINs?t z9^5o}pc-Ub<82E}nrNNjju<@7nj~yE)-<#H*};dDYwgT|lbJDtshNAOvB%sg&K%R z91c}VBX}e!QyRsiN%I(#ooL?>9*deKj>JH{a!NlyeSS)2SAkm3%i&AQwpSz8kw636*no6lvtkz1CwK-NXUCH?&3&XsQ zJ(OEYPvo|aP#&gR6_n4kmS)Gx){HK`G~XJUARy4)nn^!NZ7Qg(axa_aOYwE6AgFl! zvu^RU`c0}E%|}-Fs>-S!#{Ak9lq%p0+}Ebn^+z#nER}FIKAlQwMlJ?7$=^+#Bh&?` zbuIA88dsA)19KUNa|n3O!gC`AE7 zuZ%Wzqm)jS)Ys;PP^#v9oJJob-*Gw(6`L1TlHcaVUH&B1G`*5)ozeoeTf!F_6<=3W z(x#UMZnX8(Cvo+IS6FkoE>>@K2vm z*NjNZ4?z<|T)n9!(`SeOyAJtaS=FbLk*mOowPG zeL&YkOzxnMAX1+}j6R3>d_i02OWI3c(YN$9r_wiEm%ik5`hj!kNA4e{qdbLv;v)JD z)c%8)(w}?<9pkI%IB%p%uAmdVpHA}2toSXq_%QqUCv4?32UJrIs?O}F0i2|UaBU+% zH&HS@MU#yHB>+OU5g`=z)Do>EVzihNVzJq5CrB zN9eTmlnPOj5@aGm{jANNok}xiaR>F6)~*E!Wt5UD2C=_;*0~+S14^llh!Qqv5gO>h zX%rK#>W&!5vZ_aG$kJ()0+p#p4%eqnFe4*4MB^b5=WzyI$PMXY&ZNsYi*Dm)w2rgs zDM-pI+=4#jmJpCu5QuOa!|QY5!ETNkfdp{9r^jpB1aM+3Y>41FF&0u)%m|?)$SEcNq-l4c`!ZmWmR{T(Py~;dbS{NPTqE!a!PHgSIdfaq6)-ntl=Tx z1fMz1Z8xVyO9UPU#RyF+HBPXC&=kX}tm;5)Md3MF{r_?7=dmo& zV=o{2tHXuX!f+Oy}|+knQ8V0Q>NT zsy#1OeRzo)&KIe(c&VDg%Z!dph6Q*6d<^qtFiV^0d=86hXc&p6d^t?51y9@EsEg(U zl;;g(*aNQ(hG}X{aZvI?%q&%CRKp7~O~`CU#mrZCs#i%vpah+5tCG^;_$sNF%~u|y zR>$ZZr81H#DF>~ckCCdRG?aRyq}o{-Nx%nL2Tw=fQ#AfZG)Z)1Rs<#paosMeGikd~ zi!`|G{0gckVO}?MNhCSP{qp?G@Ocx*(3FQ+yjKsUY; zA;n4r9oHC&d2#im*rI7tbkXV5=WlVfjFPz8>x;+Lok*Ky7j^PuJ;+!f;6`Arp2TWk zkohcG&s=XkP|A4>dtB^}npfAJUtmF3irw?)HBP=jbag=mm58}s=<>Y!-4+%2Lw=as z#bTA0lu}x5C;`>;Cgw>{dZD6;Tc9*$Rcp$smVp@m8`zlw+w!1C=%T;Dc3+w&bQM)@ zCio%(j(#z&Bts|_i@P4wy%BCJo%jJB#2X>~Wrh=XQ7u{wbqgaJ@Y59P9*&yz!C;ukZUS|r*{01$d2|67 zcrApyK3yG^=U{yDuTdGd5u?QB?vKyi6QBD?Y_4!ACITqQhKeaHjiLfI_Eu(?$bj^n zjaY__BRHLsE2%yt`vhg!e4Q!e*?hf7JzN3)Z)89D-;9Xvh;M)xA%lqTiyZkY4+w`&vw>;m1- zFKC#I{H;;TTRgQ)Sx_Io7E9kli&oSAkPVP=pSx3*cdMZtNav5&YLd=>>Z&tNS#_WW z=`irN)n>7Y0?1qJ86kgU@F`>)SQCIDX)qLwlC-6iq9k=ffskXYNG+i3fpmXZkP~(z z)DSKBTqa7XtGudxYBkZTMkotrtlGe?rW`23LzKu5WBa|CGWZdE?@{W)k0CsJ91-Xn$0LdkQ^T~sN%lK-Ke%H>r+)yr&|OpqBb z*2)_d^H|HN!ATm4M3Bw5hhdUVQg36cZb$hTHL0Y8ns%y^3SrWck5L<#u|J}gtd1E0 z6L*K1KOXKLz`Xg022KHx=gsqs;BguR>xSfe)ai$Z0d;K4DIph8+3k;`q)iqhLALGu zm0_co)=G#i9=j^D_!63*rm%`n6iLDM%|GO%058Y8pnR&bE4qZWaDkO968j&m2 z{O!q9T40rtlQ$w4u64EBXmNI2=cBIpzQy$m;4WM5p*6^bwf3B51>G&is8+72BCPhw zCVHPZ=9tO&+w^<>Z`0TQe@+j3$glgi)5}h7tg&$`rVP;YDAF-MQ5ye@IN&#IPJc%l z?@#Pij$`vyNtf~oSk04kCs%i0x-QXUAGXxC1A^I0Wzr4Vph1HK!2i{W0ckb1rfnjM%WbAK0k_9 zJ~Y#yWdu+nNDt8x(NP0KM9~|CwmBw5D5R8TCnPO&Z+xG4f}#r4H69uNw||;qmWt3optUbHDLD2o#K4ohbWr;{)!3v;CWNVr(E3i2Dna z%-BT*!BAo-D6uC5-Q96f!|*9my`E`m7aIX&LYlpUHpE=%IBYVv(*vT!-bShb`59!~ zko;&zwP5^Os}9sob)*rh6J4S@!>e_n8&y|ayXZk{R8QKbdeL6ho1Vk&MiPXVV3C)= zpoTeoH3ex#)S?EEks4r_kx1RJ=@<6-aV+5SdhBm(YE5?-(Qt5Q1dUcB4F`}eqe3WT_!0PYAC44S@Z+8{LSijO&#`dS zIM4yJ2k=%aaRAiJ%rrqXN?UkSeC9vmGeKBG&f26-QZC3j z)sPhKDJM#_2(0{e-r?DL=)IQB9-S|Ht;b}qCDz=8aU*boU{qlk3P!qncmz8|q8GZ4 zEv*krnc(fQVg~(4S=AQA&yQQx>22k@)LCmCWusu=iOKuy#Fu5l>XERIyO zI8M#@pS;`P)a-9K$#@T^CA`Pb^SkA(xY(_KX)i-nPl1-;Qy0UuT|(W|QaW8Nqv2{f zjZtA5r!J3+LN}@(-N80RE-C74XhIyL3H&tgHC&$nC-aQKXhJ+iIljoOEZlW3LW}2sNql=VFm#bB@UfoW6R4IL^R@0B_ZbO?3VAI!Q*YF%a4|8-Q^20(K zn=V2!VIK|x66ixn%K@GfM&kjfzI2OiJQ^q6Q9~S@bkplzk_tClU&OBAMMy$xdPXiL zK!Cf@E}SXIF_N5;ipTa~2!p**;=8?3a_Tb`?KruvqQMf%zG8>@Rphs9e$7~+MYtP# zf--G>9aR65I(nx)$M9w5H)6!c`Kmcrr4>T_17eau%@?p8-$5@*!u6#Q!VO8QzFc5w zISUor4VK(bV_R>dr_*4(4L9~~BYwp#zC1nr9Cn^oy#3XX4L+F-XoOxXt9osPkISmc zs@aqy%vbk;O~~r12XJY&jGC)W)KNW1Md~41j`Ef25yOfxU_cRt_)UHbv>r+wqO@)i zJzWvA9bOS9`-&*plWB<|v7!)c*W2KkrsgzNE|Nq&s7Gv>Da7{1mq5b3QSV0GW;R(> z)WRdS&>HR agzT}jPA-2pT|WPYC|88u zT#KCq64Y<)rneu*1~?W6rHT<%JAlqk7>ixhKs`|dt@Jor>HHyoWY9{lftF{m(>ZML zGQz0|M=6XG%uk}kSOZlT9%TzQ?*JPdF=Ml11Sq?L-c^)=^BD-(dp@KMG0>xvXE65w zvAqzDXADx}tpO;GR5mu#vjnLy8sz{@jCeMGhO<*4f40HYGf&<|O{NO7rEe~O4h%g4 zegTZX>HSVJK z5x55o_Ytt-MiFFy+rC#7XYLnv06y`nW!He+2@k<^Xbj7tR5|UH$oACUIh{>c*wq`y6HbQL0?7a z>k9ft_VzaN0+x=C-$CC-=(|{-?=OAdN9c!GUu>Spv$qe*MG!{nQ!wN+N>!gzUG)Vu zR$o$k75<9)tFLLQ`i7RNZ*eRAJHrSskXjul@M=STu~(}-!vIDsGt8+ON6C1Q)mVrz zWY?{dWQ+JONz>rMC1aZolxnmfYlZ~;-&+4gBUXdUol*5!4F-t*W(fm+G_rjZvi*~6 zN{~ry4RiRj1lrY#$0QMI7Qdv`r5~h zbh;5tNzhz?ZTJb;1&5x;tu48-lT2H1J3#D067|Fp=t+e7_y|43Rj>g;oJ7ty0iDB& z(r_}qALH8KQixpq2_s11IPXys0|MToBz%TtM@cT~U|A^1e%-=eGF35peTb|Rl`^qn zI^&K70NOYm`c=tEr{Bnk=#qy@2~hFAW!w{>y~HKr$31Yd$Zr4zs(@a==!qBdA@++# zCCtFBl9FuYYjJ{t5~Q@mb&V5L+lvQ}(SScF6D^($A{mA}F;ZdXOpqQ0E}}F!P?|c7 zlz7UnFsn&<+gTS_xpI9j!Z@dAA2KNsHq7-Lbv>D;8&jfgN_BKI%FxXzQ|B0-c!?H(fMUcVVUR+m8j6?+;+VZ*!I&oDo{S|IV!c&B4{^&G z;CJUo*xpUQB3d;%)5Y4w{z=<8(Y@t{oN%DPuZ{Lt_tT>4k!d*R@#5N$jnxKAX|!BP zVLQSOV2OrF^cx?wjb7PB&rJ&1+d0Y8j$NQwC?F&Y=7)k2#@z;gC@7SJa5kQ1pde(aP2sq`Z&wIYmECoZ!g6>?8}-?BT- zququx!lT_P6<{QQ*&XFkZF&r+9J4^=bo}P1u1bsUTO=3beKv^CdLJvn$7E)VfdaQg z)Q1KM;2;2dKp;TIFJzMMB=VuQlH3XqvFC6U50mgp(05{=t3~xf8et*0l^vDb zx_~YL$QbCD4QU$=!INvQoZ>!lOL|xpK=FJLt}Qn}(bH%H)s}ko(6Xu*Y6MzlhouK% z>4PXq52iMH2zAjzsgE8;gYI!gn7|sJg|75=K%e zmQx#J)KnHZ#Mn0llR3cHw`!_*K!V1i$V`tsGBXHYKNagtA$^h>z%oe+vQsrxnt&>} z*8Uf&r2ZSSB*e&a|Nn$6NRjFBAj<@hWg^IO2FNlAWH}RLnGCX2r^(ake&+pAs4UY@}MLT;PweC93yHh>CI`_BHoXGBYfE^*ZCRjmiTD@sk`c8m48? zGXW*rzpYe1LJdkOBexFMmDmC)g4%f%49B~j>qWSJb%wyh7@l0ursmqq;Z^V9ygT&S zoGY%Q=4JKh2G2+scB0LJ3VzyPY(?d58Qj3lT9sKlu`oUYL%CeOb4>0 z=R!Q@QC(e39rSz}s29*^T@p7M9S|qCRqY_!4Qm*U8tP#-dyFNIiKd)IQQE5xQ91Bd zQ9~(stLjJ~?^H~IA3H$}ZPm$S7ILE|uQQg>IvA(%dj4SQYhUgtbB%;cy=9N_q z4OdH>XDu&9>=H&WdKrz-m(xOh1zoAHq>Xw7{X?&Wv%SF(Pj0d;q<*T0>IoBgHnLD& zYOp6QkET*{aL6NVKFXl`R4-_i1q-{wv`G>m>TAQMC|gkx7SF}j%=XlDoj)U4;n~d` zvMb4kc$|>^D55_Ux_B3Qj?)=PwR_q2sN^6@m7ljot?5A^g6$rCfUReDcHg=qgWq+J z-qGq*PFyJjujYi%+&iW?FLq)FPT+dX9&S-eW8;HsaKM`%<3PJm;%;sc;g;2j1eCZH zQoI}FvZY;t1fRJDe5QNfopnqO+vExK&0xqal&x>2)Aen1hIVPWUPUYQ?TCc#pl9`+ z^rpUx4(WAtMBi(eBUf>k(;0?2i8PBA7^3^>blirNI}$d|;vP0_2}p`YqN#%nggP-c zz2jZ(5TRb@V~*&69hjlznXI{tObd8JmDkjFc{fp2e&P!WU)J3eU${e zRvo3)2ql?3rAFa;FVSh(CU)RF#7chduV?UpK7}FtntKM%C=B6;{mb}K{2Kp348(tG zgPx%)3Pb8?ybt019^StfhEDmb9_8)V?6b_@>8MKyi2MC}eN4UG!FJ|7{a{z~zUN?pc^^DDz`UCt8f@OhherBie+$HY z_RvsMkw5j}HaI*qS$eAfsE51YaK9{R`o8Oz4OSw3CjVM`YctOcmmgT?7Ou&4Paek4 ze}PTX`x)x?4QNVt3)d&QZSGBQHyw5ijEW}be)9`9@A9whDKMsOcEj)YGV}lWeulL^ zLWJLDX1OEVB)iU$RMXMqNQUKm-gLBbA9~+wycCTS-$5gOcAeK(Iw06rRGtb!1qCz~ zED#)spn_PiVHYdKva4&wvMK`ke&@cKNlqphc@N@d=3UBp=6yGJkaxv+jZzesRxEf7EpAw)^RWpM{C!uW1~xTa-~dJTl0w)Nosk2$E7G6F5(eveoDy`Mi%Y zQZrT_XUSun^d2vd3G#WiJkAO5_@FvhO_Y!G64fL%*;XY%N>L-_as+2xw^tu;Y4bwmI(&_RP;F3mOT#^wTFA5!SdLMfCY8OpxZQebVz;DLp6X zJ};x6x77l-9Qr)Z6ME zf%dLE4hF+$c~1bppQz@m4}$7L^^wqbw_x+J(B+VTnH*4u1L}wf-hNvh74TT|CxXPM z^7zbFpC{59^>PuVwGe{dCg6IkfdRk2ms;|`7()k-(eJfLb7o>Z`>U&!q z3)21S2N8)M1uGEYr$pMKeh%>Vp!%2kCBQoayem=ts(zDp%zRuveh+X-P@PaG<#9?L z7Y2Br@SzIRXp+8VLHY=6!DF)2aRU9Ml{~bqtpwT^);?SN6X-c@<4XsmQ$m2>kasYM zeu+|Y094nK4oSAI9i-QEa)1v8_@kh%1HgD}vvu779{~|{3h1Zn1^Dkmtj$4LHb@a<3rsnz`xnLInY)k{XLCYBns*lIuEqh`9a#Q3j(@O-YtW=m2MrR z@IKu}mf1F-K!|ohX5C&;>>!mLrF5p$b+UEmAlpXlbWsq5=z>q(H3-6WlMda*dfXt$PKzj_w`MeP9A~UomLkOH03i?r-Y>iQGUB4Cp~qY&|%UGxQMArOl#C3vE3# zku&u$D4;GDgL50&^zfh_Aygh|>rp|@)uV-4V}g3DKFiiHi+K!6ZF8KK3kt- z>vL^A(bnfxJdibpd2+?6#v@hZ5+-NL%moWdr;RCDJY(7tTc6Kl4_~@u%7S^*n8r1C z>*O?WpUUa!KA3%vdnzZ}9g@?_E(M!xJ;lw+J;fW{%w`u_yI|?ubrbtZMGQ-eO2aMc(5o(eF*h)H4RzUvX{W0~{P@>*& zEnPBeZmThir%fAHve4n)yu;y6+}S-v;uAb-U`MlTG3mm;rFLIyik(;tuWA!DrUgGGb`T|E^s4sGV=~39?Vtt9DFV&YZ zagnVrcT_Hq#hM&_g$_GU9*d5lhW%3HW($QDxs~vrfzLqJ=y`@)ZVBcA# zQ%V+3b@+O|)Yj7+eVx9ZsrI~*8Pi%xLuso%c-r~~NB>RV$W-^7p?_%W;^T+~YQ;|``gcW;l7 z`(3-hgb~vg&nuZfZ9bNHr@qV9>m9v8y4|gBa`ZiVqoX&;5;p65ZGE4k%kja>`BF#U zuOD#qgZd#`Z*la)`cYdy=IE^$s`B_!rcC!}ZsssYZ_^cy-mV{abcE;GdWWNT>PkmH zp?5iYH_vnUC;r*dPwJ;^{j{U^=)I0QQ+0AwH$3z+dY`SIb@X%kd8V#zqt?&vr5Teg1N(eLPY z-8O?Wn)W(>*4$Z3E_U=m{hp)W*B>}4O&0tiO8O(-!IUjz3KuV!KeuH5RN;xkxAJX{ z{#YNf^@;OHOqPmcas|I60DIQm!po1>5GcOCt^{u}}^eb)S`Bj&ot`kWhB&l?>6Cx7K0 z>Dwr+&w{xN7EhZhtLw9%6r4MuKVWL^zR@Dx-PHFAN1t@`DP868{rrGi*e?_y{VL?% zVz;e#c4$#rS3Pz2%jxpjF?hV_Rt=LtnSf#C#2`ki(x?>FzWA zJB&)jNdAF;bgT@07evEq$dpuV4TjDFL99kR!LiQJuQ^sGm~Uk{R%5G)V>Pw1Z7WAU za&4=byqj0+LY)9OV6|Xs;oj4+MWJowIaa<^;8=xLOUG)Z7eV7&J63C}jcv7ctaes= zp=k%l>IjSR#(=c6-qx9pN>m_AC&;GCQjHv|GweXsfYioms)1t_SzR2}&uS>+x;j=j ztGi?M5Q%T78o7^b%mKZ6^QG>jff?D0t)7m`R|QO}C@W?ghQUA#KY#YLDOh1IeVMy{ zV5aVk_nv`GlKWVF9jhM{%Ia?ou&sga4+96M{2l6O4TAPtgB@##NOU82WWPo!z(V!6 zt)aFx%(05C;Y?}nE!|Vx)q}e8h>AA`omB3O;x6v^;$d#qu#>L!dQbQB;sq5?58uS9 zX><43ge*6!rB!kM$O|n?mrR{nad2#!#o6w66Pi@iJv+rWEst9fb8GU`Iw<3>>iBnee8Xm+_6_qL|L#Qs7ajo5{_gdY2J-;-ok>lH3J#eX*iD{%_C8EqHTkC6uvBR4hCwU$$bFzn#q}G3e@^$T-!L* zwj#;sR}Deh1cKmomVxl`HWp?o%<1MKst37^XoL0iGb!&G_+EU)c6v`xZSkaU9+)XL_`5MnOjsb-de z(-*gFZc!PvD#+VTjSE9oCAF}~+EV>#nv)AcKCjXJV)`gT?OD>l zj((DIDyglaJ=9LOjrQL<Gj>jd|n`uiPAz|B=UihNQFhk ze2N!CMtw#qpcT<+OQX}yVU%Qssh9%A=oAndBPyLJx%~<1Z}XCdCxF@SH1;_8ey9HU zuzBeT3fO!>(Ql-ho}lE@Dj-r9@mA6}yO6DekgfMOk7*elf?OSi6n#q1(`V@MIekHY2OIvuJ_>(rct0H~=7Oh&rRdhx<2^k_V?Ewu z_<1pwvK>=pl%gy}X+B>pEJZ2GQk0@Bg+x}fRLp@l7q~Yv3fM3b1B~_?Mm8iHjO^<% zvYJ)D(@1a+Y`O$;VVI>40-z5}o4k#Z>JD(Pn0rRYfv_%MK!gUB@qzqG8qCnLdMFGL zG7l}IKpq%1Y#SA$4*nxTBO)}?eRFQR@F;1?$LNGgh&!$4iC!5YesN(X6$zwiC}cA% z#h4;1WXVhbGghNzpctXEn6}Zl2#qhJq`Z&?coWLV+8S><+cY)GD?rORW)^ExtmiP( zwY+L=Ienf7sOJiD6Z3b_d8d6%`r{XHuCcrafs+l$?i=%(HHXnOC`PEHj8cG5C7~*Y zRe9A*-U3IvS@W~{{Aop*QM7f0&fiN@*2NHw;<>k+ru>nNE9U2i4c=2v!&|18z9gR@r|6$cX9^b z&6&J~v-l-$%MG5gso>-QXU& zQ#$vcmfVv%aWCjn9~#g74OKk9KOwd-nh;%BI;`g({l4@Pzwfoh{eFAWW@(e#2Y@s7 zM+gYSK0gVJ#Xg@SIM0btG7yGX&t;hAdG4`A_3ZgY7W84B>nuKF;sVjfg_X2OEcarj zB0B`-Fq+&}N=B7Sivpnl?C%mW*GtPNH814H=d5x0A%7)ZplIAys7iU&9pzP*{ioUb z{*Py~y!j$@;h$!6=Pwr8i%K_@H37pY4xo{zEQ6^o2rvj77y^MBN`rV9Ek&HTf``)$ zh!Ssw|6I@GXfKba!#sf#LH!V)1L-~&5U@+>3;8O(8p57N*LX6_iSfZdM`hin!||~%#>eiBk9{~cRyY|G z6O=?an8H#is!$_7G~Gl_r0rZj4P4j5;6$K;mIKTq-12UWsy%JjAg>@<^9pgAOE~k>ck&WLC7DW z6*XiyBQC@9MTY%5X=Q}2Dz7?fI=ZhdNe!c+PzEK0fTj`rOQmEconI6T1wuh1^zCH6 zt3_R|sibQa99msjwbWh*4JfBx__V7(+s0bacO7NN8qHUId_lwoa`E*tEcmjRaAp-G8*h|U78jiBNW(6rR(U$kd3M0F8B!{ z$IXU>02+vY)udqHbYf(jMvPz$3ZmmJ>kJVR1dvCB@u5Iu&}q~hP!oWmbYdtmO6lfO zic;DM1w)RZbZwyQfpl-aAUC`^LJd)a=`vBO>w2H|>7NPSXN0m~@v3d{I?9DU%%lXK zMRnnJGI$Q=n@b%LZFlAQh{YGuG(_2@yci0%gf{b1Y#T13SNUT4k}shjA?t9LmvKGl zc~f|X90p4g#%Ma858=3@+z8a=w6?~%EPtcb%i~oi?B(&ec&RHrG=vBJb zn3e$TpnIYnOX1pY;ts<%lun_AOfjF#6c=G-o)2B&B^_Ov#y4#P5?qVC3Itw#AcH9kT9 zn&#>R^@L?hI!-NN&3=sXr`{GA5E$RQaRjRC?# zfx2WE{CNn{ZhZ_TZFaAI7-Hgb!$xn1?vE`V0tq4B4 za4)SZqcaLU-&sj_h>@zDXFd^<`eggPUp)4|9e(Hk-|)NsABTrMgV> z7yLYZgWO~&%&%}3zsjxn0C(osxI4eivytsw1hrnq2ch2Y@oN6qaC!^Xp;SuZwOj`7 zA&%p9i1jS&DVs#&gA(du)WN3x@w#oXIu6C^5R^yzad>vTa!jleE9lF2z;yYcniCB` zY~&!9(Igm3cLD_w!CSph0Bc_mMXP{kdT1E|lwi|Cv{ZD|zz|XNdZBKXi4=NLa?_KN z1h^}{`9Dcf1v)bxDF0>2(;P%2NM?IsD6$J0dvBswjno$Jq788Tce_U~%N=!(@jZwa zjJF*pJ9*;+*1!kvy!SqXot zy^}V@JnR^3@pjN=QDQGtEJ9|7_!}tfw^SRsn?nAcTEkctBOi1L|47&KPmrIV>305& z?%?CJ9ShsXC+K-TX~f|YEbJ;K)BTA`;2MKf{jFa0RbYI4c=cM<`DdD^efeghJEE= zDoz}ttZfJ>@&nT7U3BjR1S|J3{84#$Sivs3e?s04dSE9#xQl$?x4#$>-9t6w7s`sq zFI$R`dPMB=u*4%KdZ_xSu$nVX;14k&B`HPeDnLze%H3WCsi#V$VkFc?s#=Bv-GNI_ zC}j9S-U8p3N6q+Q&lw>mjL~y6KLUyY7`XB%sHmt3wc*Evo`#C;F;aj$2r~jTGb2qb zjnX50Z+zso_(%}ekh2b{Q zX|$?O6IB{bQ|UAdk%?q92LhSVg z_3f4PIB=`RB?$vaK_yj7YNT4#z$Y_~Pi7pSOwNCjpE3w#MiHvUM+SKKlB-=fGYLBVTq}r+z(jc9wzbc|(stb)$-Ec9cM_e*GQCf6g+XU9olMF)c zE~ZXr@gCl57vQ<*>Sjyw7c?=R<+*^a6VB zcW10@8Qx!B^|45mrx+$Dtonik{U}rQ#~rHyRHz0b_#6bYGMEObp)?gy@jNwxE>a_D zxf(^A)M(nP#?cWq9=B4?HY8dIOTP(wiDwZ+1dwuTZ%Aa*MKp+?=NDj*jzD7e^UN@` z>?Ifk6EOpgV{r-|Gc>|MD81=rvT)n(6`ZNQ1c4}|XXV5clGG9B6tAGN|iWn9Z*l+q4vS^-fZz&98&_zfn6c<9{48Grtkb zdGRzrgyp4`BEv6=p#n8u0uy%9%ff4qEo zwo~|kw|(`CUpL;~WQ>dle-4{eE8h9FkPYUUy=sJBFRyxIrH{+2%By*oD@iRi3A`(T zOPGRNebXpgO{aEh29>CpbUDf^)EvW~QCL6;h4{@dzXc8qp|(*DGy~#th9f3^Wt3k=;Ag<#y?1|v0PBOi=o@2E6;9FUR10k3~4q~GiHE_w+Ea>%NJAq5A*uiC-^ zxLS~WDGc2SY6{vPr#3iw0o4!kd!A3FnSdhP4GPuY0M$*LThm}Iz|t3)<#|{HXI60rN_}q=R;vWZ1762ftP1JrCZD(XyOLI;|L#( z5@Q`^5Ef+%HtzzPkW~;fp*fXwP*H|CYkbc_<`MloGI_QX+f}uknyM=Wr!bCw44^nt z+58FkFSN=wXEtKov-wjTstNV84W6Fm^0su@aq>z3&w!vuzR!X1-}xU=@+}7WWFEu4 z_knPRXX1_F^?Vt&_v%_hCl95X?E4~$QjotyNl*$J&tn9l21*|3VjQ*P)<~3Mr|nTc zi0@G)Gl{jTRc7M<@g_C8#;+mIxB=p=5s4GeE?gx{`4DT|MIRx=`xusC2OW|a=Cni= zorgfrO}xH#_;5#ms((H8l34GE9NF|=Pwfj*kxAMVp`&}~6UkP+Kxtl8G;o|ygaps0 z<3iO5wW{?6)iT&t_7-Y2XzEh3x|Qmy+YlVyPTkZR8m`tN+$p2;)jH&+?+DW}br(#- zdP4&-4HL0b{0lmKrCg5&;6l;8^i zQi6$fLh#Q-C*krwmt>+(Z-EW=XxY6HiU<@d<=nE8WZzR=^$%2qPpjKWUqtB3O8Ted z25hUGEFJH^lfH`3*ReL=AKJc&(6_O+*f^1L&$Z?uQ$=bc7=m+OwVCRvd+7{yAGJ~8 za_Xz@r^)I8x=cMtYt=)B5nj}_E>7TehWw(K>pWutMqFl?Q}a%T^pBa1QDoPvLLh62 zr;{|#0SP9m1f?1^$hraEpKAY2C02u5YjHDV4o@jd81S8u`0pX{$7EB31Z^Rl;SUn1 z$JGtT4q_T3pu!G_uMJK=s-nN5g!@?@!Z`W~V0TDt5dKjlCPGgQEW*M1Pr&=g4Q!;ZQWJL4Z?fBt(D7)Wjnr@#g)lh1?(go0H#TW){CsXGn2J>G ziR3nSQ@v1P$d~FEpYLtsRyy$9Z%5~J3s-dspNuNC?7dIL_Igj|g`5I8PJ3)vO?K2CoUqOLemJ%Noukmk{Y$OCjkICwv-frNez&RbJ) zP2&Zei?pQgOtcY}_zKx6jYFoNl|m_CWJGkyL!}g`cyo!gNaq6Bqd7V(j4K+Nvh*Tj>oCruat=zPX-n4^~hDfsM0(FT*MXTLTOUO+9&UV z22RM|!K%p01H%g=tn+d07nzs{`>J)Pz6?_zQGz;xUwRy+4D|_u^v?`WJoU+qt52?> zwWv>SjD#o&;WYNGDauxICMtU)vCE^STPzBa0TQx#-4bG&gv5d+H~hR+@NZZJJPhqA zh_HVT{e-yI=uAgz7uyqdaKP<&OKv!!D4>n@SQ}|cbKo|8w=`3I2T%Ate$H@=HmV<>20zkP^%F(VzFYl5 zPpe-InI)NZ0rfP*4I-Yer)q(aiPRUzcM>)yP%pYvB|$0!$ZD+&tJ=^E8#~Lp;yau@ zaUSh4oDm-FQON)!Va=W>kLu8)sty2Jluq}lx+*2Q!;xH$H*Er@^(HIDWHK_wK!IB- z>O%tsZ~_2(K=YQwkRz$YxKIsf`{6qPnw%qSXZ;^g=AnMxMmua+<$M3~8pS?)a$v#{jJj0yL9M#g@RA7Y_L%oDAcO6V$3ko2ia`R|6=odbvjU zWj15lM*;1pTH2;Qb6ws<3Xq5_D)d#K8K&u9zRXS*u5k8Gr zjsG*T{(@FbFv6o%Qz+K|J*{xe_E*Hh&ksCe;a-|&*c&0zNAx4902BS};yM!wcW_-K zeQSn7W;doYvE(dD*IpLSGvkfodeKOJVPRCckqS3c&9MN4I8hr>3lUT{RHWu^Ooobv zcx~}8NVNc4@!JG1aHh+kk^(6QE@&I2MW{g;W#pxBii9CZG1SSg8>Vo&`|X-EvpY-&vZV7M9{E&H7f@SWNCR{$8mU_wi4gnJ79n*ZGK4;ASi`=E z=wl&j*4ctMSEJQ)=@d|7Ewb}_)*n{Kzvb^B!We2Xsfm+F_9Owj_t6F_J3MN zMsyhs|IISmVHxeQj1E{vM=YZgmeIN9GLUax^uM}{4*z)>9dWA*KRPko*j6?)JlVTf z0h?G-M)M^rg_;OAitrgVZjFqM-5TLcxiwOWFbY}R#u08(MjhjWn&Nja*?Txg4w(!b zYzxf2XWS!IHLtvCNH`{Kh)5)#rMpsw?nYg8cPiFBs8si)6}lJQr+d@m zx(_|A2OHwa9lBELqdFs9E8Ev|jp4Krh+ZB|)8^tl$xG8_&^@XPw910n-D&D1ix73o za55;$u2qD^^TyTLBCnh0fuz@GQDd4*_6f2f9w%k%ia-&Cj@}ib-)TIu`d(r`Dmh(2 za{R<6YGOYCBG?(yVeC>nvwP_s8GO)Pb4QEQIk7?rUd;)ixtA`S9XlKZCvZV$FXxug z=y>NE9Pq}+IM6zju!nOa+^jn1fD+>;AyYTYHBTG6VoV1yh+frPU0yZ5ysDs@Jto1R zhk-rCl%t1Je?5Z6>ydQ19z|E_(R9BagI@}crMLB2^r4t#uns0?P4_y1z9Q4&-TzAzYYVL19;4DV84ZL9s_uI(@?y|}L8WyVr znS=AGww?m(J{2UIMy>U9Ljup*w29;1M)g#^AW9P@oASenC zxqU!|$4p@?xNs-8te_+jbFRL_g6*!3(rPG9KfoAO%gz?aga#^Dh`I*wQ^{3Xer5C7VLs7lwO zP$&7<5!_o3^)TP>9%^mg35U-#?>>i%%zN44e&)UZ@F4T9cVu`V_KzdDbB+x0KJf1z zxKAA!k|ZtF|GI&jcC?QfH1TML%D%(hx;cII-O286N1d!ct-_;&d2U|*-3Ih+5${;p zc=}gA!QjhZtJ6B}E_WNh(9m7CB{kmp<>GU_{#2+7! ufBx6oedsKIr$e9g3w7nVehWxcT4f57E-Cm#e@o#=#YX1*cD?t1J diff --git a/Mage.Server/plugins/Mage.Player.AIMinimax.jar b/Mage.Server/plugins/Mage.Player.AIMinimax.jar index 7031677ed67c07b67bc655ce2b7424b11329e692..f970da1a94b8d3884f704ab8d22998ceb1064b96 100644 GIT binary patch delta 5332 zcma)A2Y6J~5}uje?A^UN$tHmi(qL0)Ng!0|%?5}{K&l0d5Sl>(2_m7asMx7jT?0r9 z0f8uxg(VQASm;eeL6jycqM#_)LEp^X!o%;WFMK=aKWECBavFEra_iA$)`*<$7OM{O zx2{9$*%9?EUT#|LuyD^nbeU~B)-&6?F+*DKL`(`Z!CYHEKe!S;!4C?eH}^7G*+Xs% zi)7*ULynAi`%*`MOC61^hhvRd(UC^kh$#1F9S&dv2WDWV12iU#vIJ!bqoIb4bnave zX)MD{!m%kfbHE{NE~tf$H(^U1TVZPvX(MB8b?AoeM7X^U4X}eSItu9|q_dElb-V>{ zWf3>tCjHxWNX9N2c9pi9sNNx@yB+V;@h-eu!yY=MVUEc5bg)dXaJ&aQ2re$ET#7X2+++rDq(>c~-;cbhwY><}5!iwqDTjMVzkT3>_Zy zr(>puvve3NGB4t6k(r~TfiG$JvIAd1j}F7}RT(ak?p*24lkR+(?KQWK3vi*pMM4&f z%n~7`BC}M7$FVFNm*Mhod>vPa$Vxk|5~Xqt-_T(az9~g8*{d~NW5>0kSRuqK+Uqo2 zufsI-NlrG1}4Y%tsTS836w`GcVguH9V_k_Je zX5MMXU1EB-nBF6*d+oSS+WmGsV8?@E@{o@2<6)`J2ZD}h_@NGEn4{rGIxI&wgQGgE zkbz@5tn#PvV>=#~Bz_{~Qw>k(uoh2hcuEJaERxe2p3%W4N}uUai8(UUSsg#eFC;}@ zO1WOp@SF}?MCL0Uwn=+lhqwJj`&!3uc!l7FMtD(H>$gI_lO=x1f#2f~4!n$4r2C_g zpEUeg!(TM~)fhBt3jXdrIjW~E_85Gk;Z=p#;75gjFo9$Er{PR@xtlSBbBX{iC_=Pp zM2akARTM@xMH<;PawyVCX%wL-lAMa7u&$zLicwUJsw;}68j9kW0pE#{noQt(LGhHJ zQKF(GN>)^hXQkTYQj~&q5t2vc4$I3fFos==W5r{XswfS9QSbpAF&yJ2+0qr&p}NMH zvq^E{EKgXE>MLqM85(6O%A$tGmT~bBjVMF3vlTVQNaOQylNvUmrW!ROIukSTw$CHTaW_VjR{~ z)Q9>itd3UW_wgB)e$?N%*r29^21w%XrM||#%w$IQ(fx`Zpn)05$CC?qNnK@MbC2P@r)~yo};#ko~IWSy+{umiNz@q z(`CWUFcZXfyA`KK%#_72OT0f%#YW?-IxH}o<|s0R@e)-x%8MJ=U#3?SdFUzQL~&Zg zt75i9%+6)A5ffdOdEAbh*d=y8y{6FusoO$Di`acyOjhIliG`LWRBCjYR6l$vl`1Nu zQiR&Z!OU1=<|Jh~M$3$;S!u@hNh70{)9V_oP_&X~hacdw(ROmLmgnJXjaF$?uILSV zQ^AMuk%FU4Xf?IfXpN!@@@lkBk&iYgs-%sIHnCA>dW!MImk<#;?Lf_?88&a-4{QaeUS*EI(#;%WRQ% zvC9cC5-zcngfT6oIW45g$4@}Bvr%(SAJ%?k&i}8?RTORSkvaQ_RTsZp<(7$k5Cgq< z@+Lt~A|l z!rxfgVxr#}aeYR( z^Z4Q5yo~&*mof2x)5|C@Eu+A+jQrCw7g44K3m$|kNSqg|oE_$5XG)%u^bMW=j+wqA zyj*ufH4H-=C(;X9sG%LAVL3mI9H>JSr?jUz=7fBF!K`ltU)f_ZoHZg@;vy<`%E`QZ zjKE0N=!IqIWTc=SZZUPkIV*+1fEbwpxy`{qL{x}TY)}$eXvQXqEHq;aGm*q*6J*Aw zfs5`jW3xjVX;cLZWeG zVLoOXofqAL3ysYAZ8X_tA3+Oa$D+yZc{mTt@ikn_kF4Fe7?0u-{0vL+0xsoOK^gvx z%Ls5K>9~rbv7BP@4NAl{R0}I84ZVD6uA>&Xo;sk9?!ZdwiyLV+ZZfy8)awA(E7q)6 zWvE`|TrWvr6wG%+SF?0Zcp7re^hZK5F7}rWb&NI(7Rd#hWfsiI57DYX!S28#fr7Qi zGg!mSC1);FI!|yd@>sBP9&;&38x_OO2Lem zmb7lZ$OowznLZekxe*p4glIJKeqZ8)(rwVq2TOT80-*}Z25f+329_o?Ue4%sA3T(i zSp_Q?uMFT-jLR9b#z3~mjcMu)qkCzF?M)xFjkg(xUd=GdN|W4D%D$Xtz%5|It$goq zgX*}QpRwFLQoTm{}`Y zdMB zzY7@4IpLLNgfB~rUe9YNxIlb7>jqvRvF>*M6;K70JhagVdE6h$D?+xp4_0$;ldQ3- zjI1h1W0CaaSZi#U4>p%)WM&2MJ>{VcH|0YP@E3OeS9bn4cK&x>C)c13{=w(RpU{;L z>;8l=ly98TWPzSjDa?$fgZK&4L(xnRrFMF7V=*^y$TJEY@{Ih4yj9+RX64hDH+8>t zeMJXD-onmr^}z%Fz7MX83@U*{*&o|jVtb%QZ!>=9hO#sQIkX*odFh}i9IBIoSc-&N z`?5cpBKG4+z;GJD?f2YY%k5=u z*LRA);WL;wX5~u`^DEX0@2Xf6^xN&SnxJ@pOaGUyb%#s*U&C^)KC z)DE6gG1$yye*SaCW!2-;Mt*5G2pzvF_G%hy{?Lpm*K7^{>UvXJls}3uW%<>)LGxw@ Ydd|dPoadASot~A|Fv|7=->3lp0i;62IRF3v delta 5463 zcma)A33yXg7Cz@R$xB{u+q5)=LJNVGrJF5?fMt=Y>?#yQC<;+mk7J1_$?9iVZ; zC`(Y5EL@{uw$6hbX*$bvmq@%8yE@&X{JasRWwd>;C(n<44Gla`|UW>j!>rJbj|iM6&7%$vNA59!kK1v+^iSCFPh!%a9lY`v4gadco$NP9 z`ALzrK*xpnl!l9R7#|47Vhxw*FhOV*;?qK7==cmitKm`ydht0Orr6Bz_frj7c@QTo!*5Os@&*-o>khgDjJd0(Wb^H$hAq9I* zn(w8`e{kTBc;10O;mNFq*1b>*3?FkTlBW2c8XH4BSP|w!h0uW&zfFXX5?Ouj}dE9 z6}5+76&!{S4O?l2t%IVD)X9i$pPT?kL}ePKE6Siujj|M7L)k`SX<}3kWeRg=MO`q) z_@cBT>sson(RB*PQ#VE3sfVKLMPuaD`%5Mj6_w5^nKV&Ru9(x4x*0JYk|N#3C50uE z6!oIs#fCd`<)4J#Pp+N}BJ$Yu4TfCT5 zl&fek4bkWpwhdDdqNf!;SeRW}GIe_P$dQAX{Z_h7(NGaMjFJ@P({PPOD7szD97%T= z&(9v%3;|JL3rtiribgARq1CuBJ3XR+#u#VQS~%!V3Hx0%+Blez9H(e3jZ<_tjn}A9 z(LFT5_$H&RRbfkPWvqCplXD`mSCi>pjixA?%FBzgT92n`il);HiQ4^&X3{K05AcwR zs8~@6l`6ELRig(L&8CMGx;d5DMl325syWh>Q-z|r^sq)AMUT)tjUH9>7^Wy}4QGw~ zGPmtVlEd76Q6qp@{%OEt4p zDy6Wbq;SH0#=hA}MppR%*GgKY(F>B})rzXvRa!$fV{lea9kaizSIeLbyH zRLz6ziqwcBw85B{nPQYxOml9eO&V=hRKu3Rk8s{NlbPQGPQw|EUexF%MO$dAg1^B> z3O?qBwoz}5Y87p#mo@S$s;34;JE&37PL`Ti;x;Ph_QGAprE5}sm*&>RWV{Oq??D7C zm;J*J1YLxgJ{gV7KT1xzyrj`2*oIiCQZ!xuaP zNPy#Tf;k0!310!9AB?_+ldMmqo)W1%*N0bR&6b`~2exgD2tP#yihzE4t4;1KctsYAoMaP7I0`8 z1=TVNs$~>V%d1GD79#Ln_z5F8E*3eXOl8ZKJucyEUAfl`-(fD|{m=|;sBs{DkcoD5 zKrB@A15C$AaB@iV&AAwuj!&AojpBzv5g)r6M57L8F^Y|f;kD@)jWNtI9M_?fk%C^h z+vJVps1%1BVq`kxF(-o_Q8C7{KnY~A>6-+y*!0b6BJs^8$n;GEH;piTvqK6E!#Fm< z0oimjHp6({KNh(O#9si*9Oi4roK^LZvkY3+LuWs9sRg%j?D@8Q=i|zDZ9YznY=DOl z_P`^#%4K!gRzoyX#4YnfyK3CwyK!Y3%y4PTAuoM9=!sGFkl4-Xa`K>M6}W_Q6;ryL z^)M^fUJWgbd8?*lssg8`a5YxqCR~ZN{My@zRd@*3 z;9(Biaa_+&mumb4H{fO5NQ9dx5?>-0ZlNUHN^aan9dJ9Pp`UNfI_in_)E680Zrwp6 zaVHhxE~>=c=1xD#oA@10ZGxHF`cP^;P{X;EU^}4_2AWxpfhVBQ%v3b4h8%N4IAIRf z1oF)^NoJO#Im;`|EXVL0`ORRK2jj6|mV4v3*xXD2hdZ3_s!##*+yxk6Rxn=)Qb3aL zs&Kxm!uhT;YgzJL70&mg;e307`L@W-FIhG+s;=+4np2RT;fDt@8lVax-15chhc$j! zy9WmOVI9v$AvD7Jf;y-++Ir)=LHG2GM%cjPjefXC@FvEagSdwAi;S6X982ZS6!?;H zyeb{H7*T76n0Lb+ypaH30~_uIg|9&<<3X5+O)wkZ zfya1%F2eUXq=#TLegM1iFdV=Sd9Qwi4*Zxicf`!(K;FTCNuhu;3Y`c^aw2p!kA$S~ zk&qNV5|V;Pf}3aLAh7Yq;J1z$vdFc!;8tVw+8ocet2a+B-)n%Mu@^_#i(~A?=itKQ z&>BxbC;XB<_zLpyYc89U?8zyP$Tx5=o`E9#&a_mn0D$mTXB4y)in)Z6*-(o-c>+5V z7VsfSU})=-JhcUuI`9QUURw}xb+Db||1vLJHL{&~Kz`3g{=i25$VQ%LBY%c=_zPs? z1?Y*tn#Kg~uwJ3CL9d`O7I~fpOh6aMgv-pRT9*>*=K=~U^vp&`VUpBjm&IlE!>*e2jLaY&QNsZVTT&tAr_|0W~X zfSmAAeA7jPq8Nzh%hW}2(3+Y-XNreBa=|D{fCvU*mv4srq1lE$s8dfm(RG0iGoo z#lu=S=!d3S*#FykrVP$o{P2!!M1-S8&c>`;Ix!|pgAcgx!m&9dCzaC|rYa^lTynH$q&SjRa4R-n#MoGD zMU_5ds4p#Z*bt=ni17cBy%Sy@Sn(O3m-3ZBhCXZO4c>3Kn-aaJVlmm&)&Ag=w=eLE zNWQ5dGVa&To6*FS9lS&0(2Rz6OdRX0exD~>8jH$oUT+-6nTFKJ!cCWWp@ng-MDv~s qEnMP-h|LZ(+BP*et{iZ9Jr1-b3>#vVGl$=VaWIr$V0T8#p7}S2mgCI; diff --git a/Mage.Server/plugins/Mage.Player.Human.jar b/Mage.Server/plugins/Mage.Player.Human.jar index 729cca5dc0c451d865b9285a0f4e967fc850fa70..111965f5b8bad4ccd17450cdbf9a610c974c9708 100644 GIT binary patch delta 7509 zcmb7J30zfG8vnlY9^A*{iVA{00cBJ0vAHXVqT&ijZm6KCsJKN^?o0K|mTAwtwqToP zMVYyTVT{dW*3dSSmNjNgWm=imv~QNh{J(P_k7wD;Z(Pnj+jq|Y+rN9?ks3aB54Rdy zsrR-CGz{W#Nw@xav&^QpQj{#EfA>muip2$?%L z|JBN-!9-1itGTrGo3WN@i8 zi)C0L%{&(`5g1El;9Dl}mP@lj?p^8TRlHi3*U0cP7hmq?E7&J9Yh~ujFxtrL!ucw` z+RfMSwbJ`j7<$)*^Ywg#?7LBhH%W7IIN!pz%G`Pv-zMZ6+-&j2aK4@IkmgRG!FPqz zIIeNiJodSGQ#jwv_sGtBh3q~T-|yzlyhUanklt3g=0Q=(L*e`|m$tx2a$Hh-dr{3VbZmQ-27e6J>3Yly$ z_|I-y$^~*2PMXF0r1!Mk^Otb`D?cN>{o(v9ACTU2LiD_w|Hh3ne8J5x@=I=hnO_kB z|6Qc<4_SCsdIzP+J!J4}LiKt$ALfl>FmH%Oy(ztaN^?Y-w+uciyWW=O9fSX6@VnMa z#&!ID-FVklb{{qP7;Mns53HuJoqW7*r~51Bd~284%Uao{wdHQr+1hL_tn;=?P|gzu ze`uAo{*phc%Ww0j;=R_X$giCr8+@|v{V0dxPplKsIlR+~kD0=!tmSA=TL)u~I_{;- z*0hnyZjACvK^$^YihG09(;bT{2&@|UzphF_UfgC2iPI|0w+Z)m4A zu0wL%4p8&A{GG|)^A9Hf$Y)IciGMcvEFH7fcSxD=i^;!olSzAp@RX?_08=UDFqG3& zA)IEaP{js+Y$^k^%B8|gt5wNuenXHN%T zjA}1~4yN+(8KzbfDyu4IFHNYpxO&;5r6$L5yqwX|RI%Vd#Yq#dIvJ|7sS*TDB6v_q zoWW!)xukOTf{H4GKQUFZN-;TsJ~CAo)zws~D$U>%rs}5B4V7W4Ou02nWt(ZLyXs-6 zo~G)hdYh_`>T9Zgs)woiW12rSRStG?GN)MYd15=bRIZ^0m?}>VG#FjwZFVR_5)w3_ET)f2OFm^L}t$mSRD?c{gF&T6-VzVlzzy?$q zEmGB{x(t)5G%kf#*WD5KutO!MS%V@|oQ{e)bLw&v7KhaB?UJM%UD8Hl zI)Tfrv#DbpUG0&xyu91!y27+sDt$d!$XO0rFCK%Q60gAXYH=1kyAZ>nHly8Q9q|q- zeE@SY6oR&x3>r?6G@4Rr3}sLWZN;pYoM49%hOYaeS6z5BC8$E_Q<>c-9 zA`&Y(TS20cl`466SLr#Z!k^?CPXq~-``5kN&W6Dt)IO|vvdCUyuWnmnuD?+4h(ScGof;1365GM2; zR{-Us=Rvs(D0fpQs56P`5EJ%LKK$(hs;6=AmU3#KX|Oy&*;~hu=>e3}17ei*>IURk-_+E2 z9^B8upAS$hFm#5Ac7u85!VX8l5({Bb<6uS;U@|SZO9Qw|>1}!k7zjEzO#jltEu|xq z{J2YlaKlpC^>JbEyY!x*CgMa$!2s<#j}yibvyZ%GdrA1fzs$%iH0Wg4Q}=r6fnHB* zO3zeZFRw;tf9cKJYg(8g)=_9{1zJaRYHyq=2JW2hu^RS6W{~BtS-at7FJIbx` zk;_|819qp2#2P415r%DTfkZZvTNZ2SO?x7`ky^`y*ZCy%ucc?~*>;W8(cg<4SWkm$ zDBPP~Px-ZUpFJJbNE_vRan}YKtY}O|Bdz0-Cum59tAU0Jk^;-wJHaCw)%7Jo<<9M_(NHa5^zxcHPPlAAN2^z00P;Of)S z)h0L%0!a$d6qeE{I^h=@ZqTO&eHIfFbp~|;1M=s#reRwl_)9buGDd_f6;F+cEKWy^ z850tuMD(kDhQSEiCiJT%h>Z!~QG7VI2#r8|`O|7L!zg!#PZ-_C$xVlmpaCM^u z_EHL`Qx<2?0M4X=oCV9zrV{Q>6S!v(zTkj)mVVLr?AU1ILu?!v8UaD!y#R|o3629G zHA$lnp6iL?gUv3OwGHdn;lC(EWGrQ1KK@q*ybZoN&F`Ddo>ppmS}hd^cEMGHclpF2 zvzxbd4Qzw!25&pB+v*6*eJO(bQ*X|tQD9^o=TSKirbRr2R`5_-%OmiiVkBNeN6}U; z4tO4z)r$0i1$1mTi+}^$PB;qb({{|}y2hSq_PlU%o~7RKx-MO$ENg0xtSEXy#D{5t z?Qe7NaM#m?4K$re$I-|c4K&jc@H{IgC&gD$)3nD66P+a{I@@mzFqJuzYn$$tFlBp} zu1|O@ylWgq@pzOl6X0DFDU(ZK7?Y?!PloSKq4_*b^J&+U3jzkaz|W?*krY#zIpmZV zIv)_j3=pyGSWyTlm3Rr*Odf9r`g0lOgpLLC;6L-7+xO9evh<9-v@qA{eS$9XI2rR* zH8A8rA)xo^+R6^Gc4U}AZk|b<}htjzcsb((uM({i+Z=nV);Ojl%-y(nvAHjTyjiQh9|TE zZVK~SDX+ujUPp9DbA@GioPpIrDB(_`H(f(7Ul^< zs`rHHZ4T_aEEM~imbGO2T;veq8_2;oLNGT`TfP}4c?v)xw8HPx@pj#t85`F?m+QoTg>BN&_2iR0sB|TyU(0zjLh2TZ zj1ORb6o)ilMCFJkYbD5CiOXZ^ zY26qd6EV07HgUBW!Zp^WK^=Y9ia8+q_}#97{-jWfT!)x={p1!++FAQyXt0*L@FUcX zAEjQrjSBcNXz+23-p<C30)%Hw5D3b#TM$VVy}-5*}NRP`Q_;@KeZf`+``k4zO5_%IPE|PgL#q-sU7GGv9ER1T2ahhmz|0 zGmZ2cPFEOCDyLy>i*<5vBHv^c4NaKw0QTw6Q2Y#n+^Q~q34N3ORi~3*!y@fy(d#*%`us}8_fkKPy%5L50>k#v z`ZDicx=mgZ>=>gzEb+ z|39%$e{R%Q5B&eB?QfM1zY7gwDTx*8&pYt+BKB^?_g-q_qWkzgx__{T_T%~NU=Myz ze2+iF^BRtPPk9G>&iPfd?yg}`q52oh9fken_f6|mVZI)x7j@Uq=|%nY^RA+SfnPYS ncZ-UC`_pFM;sU+zvf^0PZiMxvvz@iSeT22II3_f$7!c_{Lif~x delta 7371 zcma)B30zfG{{Q{XdvG6*3o6LNCxW1$_}JWVK@<(#P~1_`LebDrTtck0?3wM^q;}iT zN=l2#Y*7p&8!c^UnVI&*rc9@7YMQCZ_EO{j{hj-GfMfp|{CMuU=lp)>w=eg+6Zi6a zH5@Tzg2U-1`TJpC*DVpLj_>gp@`OX)zDSgZ6~Vprb1-MP@IE}LDZ9D8l7ChFxwX`} zDoWNqIQ{C7%kqfie^0XBC`$3a^6N7PacqCJ%1v8%gu!`kQamz@ZsSn~Utn;)n?mu< z1w7hKAv{KQ#>y~G5XQ@_P*5hgc_J4XJjsof$+9v^BL4PNY~R37Q(O8|gb zg^QQS%Tjr%lwp~?mddce#mj~G3VB)S7p5+ip-QN&a&tAWmhH>r^>P-id)Z3x5c+Hk&(uNSx*n! zX5J#h?S`MNaGK0_xT&1iy7#>HFRyp8XbmHT9NzmVB3hNuna2Y7;u zAC$cvva(ZV54rhat`p?nhw~$Riwv6#-X$xK8ob+0i}|rII>?X9$`gJUKPi(v2Jdy# zG9KyTdU=-0;y#0)a#IzL6jC^89yiErztDL)oE!NWnH>n{XYJV^1nHog5Ak!d@w}T4 z^AR_{z<(44H;Fc0l#Q2U_OcAG3^n*qg7xQc{tIssH+fb3=rx(WF2fr#ylL=T0`;~G z?-=~9!S7jb88`9!^%uH!u=_28{|e7D_ya4<{RDql-{?NYmKm|c`qJ!Pzd9mGIgc6q zk+rqM*L=KwW5-7n@3pd{zj2;0_;2-TogIolwz51!d6!k;na!VAhcTYC;$q)-Y@_?F zA7fKo+vqWq?xee{>*d(qq0`gC;#GpFx~oKkkC`e-^)ytn zsZxY&FV)*rsj82me5OiM>88q1nWoB8eN5FC%lwh4`T>v=If=gtNhtm5MF1*V#)imZgVUJ={W zBvVbM!zR5>Z&*{~I){d`!Q``&;=ER3bSLZ1xcJa1s)(tNEcx@R%FC)(SCvn$no?P| zro75jQ{hNz8q}?(s~K=(lRK$mQ_WPf3^m(SC2EdIPm4F5G}T;@>Oysqp-N3PPt7+} znW+}2g(mH!hfH;`DmT?4wb)db$axiNiKwt_ae0=l>xy#gWnWY>?4gz#s?t=;#37f9 zf>tnWwvsbUbt(5}inmUvcsC+}c9}eg2U~l)jo_;KQ{5hR)E`M)84~7NTwXo1ta5dE zeZOAG%8{Hp-YV>%U2zuhMR#EvQHi+AQ&gnUa{o^EwGNJd=q*;C_tT zt#xT5xYl|$EpF%o*zu7QV+K7)JMfeln;K z5*t)c1qSW=1*bVB*7bQ8Wb__d3+PC2MKm8fWfVgTNKQ8aAw1a<$(c@2>5Q=_ymF4D3t(3-`V8gF8=L_0lR{?t!u&e)HY^FwfMq?k&%r30e z(uH8W0Wzj z9q3vp?>b7N>-BNAgY*m<&WSYL6m zoBO5}h!fac=LXNr4RW1JuhMIp>)bY6hk%DnHx5E>(Z?O_H@b6@lWLk@NcZg{X9GoN zc%6;Z!|K=HqjlyZ=`OdE0f7=ANDt6Thuh~NfF?sPQxQCK5I7ei7=)vNBql2ja#R}R zsFdEMw=_qk^ftYtwNa{hb83wmSUF8-4TZaRF{X-I-^F=yVzJi=20iHw)H4l3awDaL z5LP0#(l9HjpU0o(1^2ybnvb;+q=9-ncMJ5^<|fDPHiogKdJ^HXhvE=_-4T9$XdmSu z^u{583XveE!X2l>rCOyb4oX!_@6l1P2)-cI`;cm`Ok2b%ZX*^{-Z|R^*uT;T7$FlU zK_UaV8*G^lP-@A3>H|J~4U`szr%0I5K$#7cg;`(gqXE7B{UBPvL^&Zor$9vY7nuhP z3QhNh#Dv0d4Kz^8+jnd8o_6x~hhGu=IUT+{08Tp?ZaWG-HVqy)7k;+{-nJUvb~*g) zYIxdum_Xzn2R`RgH~NtL$H4RwilC3^IQ$yS2bHlQXyOe}#tCiW4MAOOXrl|5IQ=vg ziZ=d69|yGYE$oiu%pRZPDazI+WfPAw#%`><*}{H8BG+G(MaPM zbt%l3ffL5>f%=>}K`e*&5n>?(es032y2Gn_!k?1iE1A%Ge>z6~TS}%fbr$TWh zP+b*$f_!)q3G7q4o&Jt$_!%nU=SX;8K=c2^QD0*G3je-lMc;A<`i^7hXKhqT8u!pT zoNyAVza5G2Q=EVV$1T-FW_C73N*bVZl8x{g5G29IP*`$8OyXG@ZP4ci{lnvl{+Xg+ z&@Vt$($oioy#B&8WReMp(x9QDo0?BR0TU-dA!uM~C>4`Q46Y~VI3@2)L8D`*p$3{- zL!n;hlXcDS)HUy7JFVA(b`Nr4JPXhK6?`<47h%|wnQ|fM6n0PvimCXnUs6#nYR12y z3n!&Qpx^fjFV$Fe38D=l6mFwanLgTC?oLP}x(Tl!Aq0^AOqC1>PI zp78`?H)v$awrNJ3zfdT<2w;z;TX zi}mM@5ULZ6;%F_9T|n}Kyyw&R^n>O-zYXu`0{TZ{^~b*SQ-I}z0hWu~u{={)ZlGCq zo@u1n)&oO&_)F?2>bKeKMPXpG3nj9blDR8oavTlgZZsU7eE}!HmffL)q&Dof&6z*b zFPdFDJ=&^9dK?}a2?o)3W3#v9$6-*gv}-#h*pbwt8%e^mU0_xWO$Y|&oIqfndFqWgF-?SMSuk9Muz88qL{K!`;mc((4^$GMGkA(PIIQ5Q8*skJ6I(?74Kd7lq%IbYneETBx-e8H@`=53ON>^4PL zL(U_EM^ZG8qV9YFA}XIUxBwO&O+$DLZX(9gB|Je(Vz*uuK}jkCl1Pk7hmkQ9=EIkc zAK@e+^EOtch8KdBh3J=S$?HqU{9@_&boiH}+AVVKK0u30($e?SB{@#tUaIgq8S6`G z;F03F;t4jKuH<$G)!Be2k((z|0#AWwPNy`UK|{Hi{9||~%u}M7mTZtl@u*PE+PMmY z>=!a2eMk-{L<%{k>sO%`$Pts{2Y6Wz=(#jj|^IzJ^i>=;egsU;?!Yim7uS9;j zlzMX&_2X4Ef>*b3?z|umdF+BFMW=b18-=7jnBL?txQA#kjFco;c6*?{a3ntMDSR2! z=k{ZNQ{14Cn2`JF<^xm(9#`drYKI7AX>yj#Liw$h`VpP(4Q-^=;zyS$ywCDEVnSNl zBE#zp?q04a$K`c3QMA_;W9T0D3Mb8~qm(v4YXB7H4f8iqM{igFYOO#uU(s5!bMQ4r zyoMaS7FxNII`LI-ymjbPu0{&<(+pmZ5_An!@O89?ucxc|2HMEC;Cf2F1Be!(pX}Xm=11_YE>jECd-_EzO6mkZN;d(Og!2FLzHNh;vYU0@CaS3Ke?){4AX z|CPFaUuFAhOarZxnx%B}qQ6Rc6EfjuisCI=I=lUk4>BE(0%0>9k1}ywGaau#sD$bG z0Mkyn7z()O>skn+IYw#{taUDYn^RMY;+TP=s-+0(skkv zNHf8O>lNCJ8<6~NoYiVfyX@WxBi=Mki-%X3pOA>M%g z;6}Koe}WE95xNEFKZI_rk^!Mx7i^*RS*=3bF})orvlg+ugK~H$;`kwO^DxckIux;8 z+Lj`B5z≧49E9orIZW&2E-j1ecYsS&EVbcPOb|r}4?Fzh1c~Tq>DUu(#dnl;72L zvu%=FtW%>B=hXt-17{_E9Qp1E>VQVi!+Vg%_i7&OQj-*9A&Gn8qthmX>yu{m&kngm zVKi&{8b#lrFsGt0w-DTTeu51kxE}I&u}I9Z5g52Vf>z^e$R;ar$XD z9Ja+@#V-@Dk;$*4%DqAH{HA8lz5q!GSX|VO)OF5XS-{A+MidnQWB~XPzYIG-{@Y4? z`)QLP+G$E(!tlFo4iB>r?>LGF@sPj?qH;MQ1Yawg&q2o5*8|wHISXlnJoG%s{{I;} z=RDZ|3o>N2BWoDvij+K@?!eQBFuI*?>qpelMfdVix^JWxzvdjJLnFQTjqWJ_9nbZA zRP`9?ZTG8TebSidQ2Q6ci9_V~L#t|Ho_^mqv9Er9HgT|iCKU}2{(@*NDw+`4{-;Ch sP*HxOESYzOWWSD}mjAuLTFc+gYc>|(x5dtu*(K5{nB)oFUMO4t2f9(l3jhEB diff --git a/Mage.Server/release/startServer.bat b/Mage.Server/release/startServer.bat index 7335784b70..233c3933e8 100644 --- a/Mage.Server/release/startServer.bat +++ b/Mage.Server/release/startServer.bat @@ -1 +1,7 @@ -start java -server -Djava.security.policy=./config/security.policy -Djava.util.logging.config.file=./config/logging.config -jar ./MageServer.jar \ No newline at end of file +@ECHO OFF +IF NOT EXIST "C:\Program Files\Java\jre6" GOTO NOJAVADIR +set JAVA_HOME="C:\Program Files\Java\jre6" +set CLASSPATH=%JAVA_HOME%/bin;%CLASSPATH% +set PATH=%JAVA_HOME%/bin;%PATH% +:NOJAVADIR +start java -Djava.security.policy=./config/security.policy -Djava.util.logging.config.file=./config/logging.config -jar ./MageServer.jar \ No newline at end of file diff --git a/Mage.Server/src/mage/server/game/TableController.java b/Mage.Server/src/mage/server/game/TableController.java index ba5e30da5b..31ef031c3b 100644 --- a/Mage.Server/src/mage/server/game/TableController.java +++ b/Mage.Server/src/mage/server/game/TableController.java @@ -198,7 +198,7 @@ public class TableController { finally { output.close(); } - logger.log(Level.SEVERE, "Saved game:" + game.getId()); + logger.log(Level.INFO, "Saved game:" + game.getId()); } catch(IOException ex) { logger.log(Level.SEVERE, "Cannot save game.", ex); diff --git a/Mage.Sets/src/mage/sets/AlaraReborn.java b/Mage.Sets/src/mage/sets/AlaraReborn.java index 1d84673d78..31ccaf12d3 100644 --- a/Mage.Sets/src/mage/sets/AlaraReborn.java +++ b/Mage.Sets/src/mage/sets/AlaraReborn.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.alarareborn.*; import mage.cards.ExpansionSet; /** @@ -44,16 +43,7 @@ public class AlaraReborn extends ExpansionSet { } private AlaraReborn() { - this.name = "Alara Reborn"; - this.cards.add(BehemothSledge.class); - this.cards.add(BituminousBlast.class); - this.cards.add(BloodbraidElf.class); - this.cards.add(FinestHour.class); - this.cards.add(MaelstromPulse.class); - this.cards.add(PutridLeech.class); - this.cards.add(SpellbreakerBehemoth.class); - this.cards.add(Terminate.class); - this.cards.add(VengefulRebirth.class); + super("Alara Reborn", "ARB", "seticon_mtgarb", "mage.sets.alarareborn"); } } diff --git a/Mage.Sets/src/mage/sets/Conflux.java b/Mage.Sets/src/mage/sets/Conflux.java index b528b92e0a..676a7dd860 100644 --- a/Mage.Sets/src/mage/sets/Conflux.java +++ b/Mage.Sets/src/mage/sets/Conflux.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.conflux.*; import mage.cards.ExpansionSet; /** @@ -44,15 +43,7 @@ public class Conflux extends ExpansionSet { } private Conflux() { - this.name = "Conflux"; - this.cards.add(FontOfMythos.class); - this.cards.add(HellsparkElemental.class); - this.cards.add(KnightOfTheReliquary.class); - this.cards.add(MartialCoup.class); - this.cards.add(NobleHierarch.class); - this.cards.add(PathToExile.class); - this.cards.add(QuenchableFire.class); - this.cards.add(Thornling.class); + super("Conflux", "CON", "seticon_conflux", "mage.sets.conflux"); } } diff --git a/Mage.Sets/src/mage/sets/Magic2010.java b/Mage.Sets/src/mage/sets/Magic2010.java index bc14b0c873..fd53a55687 100644 --- a/Mage.Sets/src/mage/sets/Magic2010.java +++ b/Mage.Sets/src/mage/sets/Magic2010.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.magic2010.*; import mage.cards.ExpansionSet; /** @@ -44,59 +43,6 @@ public class Magic2010 extends ExpansionSet { } private Magic2010() { - this.name = "Magic 2010"; - this.cards.add(AcidicSlime.class); - this.cards.add(AcolyteOfXathrid.class); - this.cards.add(ActOfTreason.class); - this.cards.add(AirElemental.class); - this.cards.add(AjaniGoldmane.class); - this.cards.add(AlluringSiren.class); - this.cards.add(AngelsFeather.class); - this.cards.add(AngelsMercy.class); - this.cards.add(AntQueen.class); - this.cards.add(ArmoredAscension.class); - this.cards.add(Assassinate.class); - this.cards.add(AwakenerDruid.class); - this.cards.add(BallLightning.class); - this.cards.add(BaneslayerAngel.class); - this.cards.add(BirdsOfParadise.class); - this.cards.add(BerserkersOfBloodRidge.class); - this.cards.add(BlackKnight.class); - this.cards.add(BlindingMage.class); - this.cards.add(BogWraith.class); - this.cards.add(BogardanHellkite.class); - this.cards.add(Cancel.class); - this.cards.add(CelestialPurge.class); - this.cards.add(DiabolicTutor.class); - this.cards.add(DoomBlade.class); - this.cards.add(DragonskullSummit.class); - this.cards.add(Earthquake.class); - this.cards.add(EliteVanguard.class); - this.cards.add(Flashfreeze.class); - this.cards.add(GargoyleCastle.class); - this.cards.add(GarrukWildspeaker.class); - this.cards.add(GiantGrowth.class); - this.cards.add(GlacialFortress.class); - this.cards.add(GreatSableStag.class); - this.cards.add(HonorOfThePure.class); - this.cards.add(HowlingMine.class); - this.cards.add(JaceBeleren.class); - this.cards.add(LlanowarElves.class); - this.cards.add(LightningBolt.class); - this.cards.add(MasterOfTheWildHunt.class); - this.cards.add(MightOfOaks.class); - this.cards.add(MindRot.class); - this.cards.add(Naturalize.class); - this.cards.add(Overrun.class); - this.cards.add(RampantGrowth.class); - this.cards.add(MindSpring.class); - this.cards.add(Negate.class); - this.cards.add(RootboundCrag.class); - this.cards.add(RoyalAssassin.class); - this.cards.add(SafePassage.class); - this.cards.add(SunpetalGrove.class); - this.cards.add(TerramorphicExpanse.class); - this.cards.add(TimeWarp.class); - this.cards.add(WhiteKnight.class); + super("Magic 2010", "M10", "seticon_M10", "mage.sets.magic2010"); } } diff --git a/Mage.Sets/src/mage/sets/Magic2011.java b/Mage.Sets/src/mage/sets/Magic2011.java index e665b7d575..9e2908d8b5 100644 --- a/Mage.Sets/src/mage/sets/Magic2011.java +++ b/Mage.Sets/src/mage/sets/Magic2011.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.magic2011.*; import mage.cards.ExpansionSet; /** @@ -44,59 +43,6 @@ public class Magic2011 extends ExpansionSet { } private Magic2011() { - this.name = "Magic 2011"; - this.cards.add(AcidicSlime.class); - this.cards.add(ActOfTreason.class); - this.cards.add(AetherAdept.class); - this.cards.add(AirServant.class); - this.cards.add(AjaniGoldmane.class); -// this.cards.add(AlluringSiren.class); -// this.cards.add(AngelsFeather.class); -// this.cards.add(AngelsMercy.class); -// this.cards.add(AntQueen.class); -// this.cards.add(ArmoredAscension.class); -// this.cards.add(Assassinate.class); -// this.cards.add(AwakenerDruid.class); -// this.cards.add(BallLightning.class); -// this.cards.add(BaneslayerAngel.class); -// this.cards.add(BirdsOfParadise.class); -// this.cards.add(BerserkersOfBloodRidge.class); -// this.cards.add(BlackKnight.class); -// this.cards.add(BlindingMage.class); -// this.cards.add(BogWraith.class); -// this.cards.add(BogardanHellkite.class); -// this.cards.add(Cancel.class); -// this.cards.add(CelestialPurge.class); -// this.cards.add(DiabolicTutor.class); -// this.cards.add(DoomBlade.class); -// this.cards.add(DragonskullSummit.class); -// this.cards.add(Earthquake.class); -// this.cards.add(EliteVanguard.class); -// this.cards.add(Flashfreeze.class); -// this.cards.add(GargoyleCastle.class); -// this.cards.add(GarrukWildspeaker.class); -// this.cards.add(GiantGrowth.class); -// this.cards.add(GlacialFortress.class); -// this.cards.add(GreatSableStag.class); -// this.cards.add(HonorOfThePure.class); -// this.cards.add(HowlingMine.class); -// this.cards.add(JaceBeleren.class); -// this.cards.add(LlanowarElves.class); -// this.cards.add(LightningBolt.class); -// this.cards.add(MasterOfTheWildHunt.class); -// this.cards.add(MightOfOaks.class); -// this.cards.add(MindRot.class); -// this.cards.add(Naturalize.class); -// this.cards.add(Overrun.class); -// this.cards.add(RampantGrowth.class); -// this.cards.add(MindSpring.class); -// this.cards.add(Negate.class); -// this.cards.add(RootboundCrag.class); -// this.cards.add(RoyalAssassin.class); -// this.cards.add(SafePassage.class); -// this.cards.add(SunpetalGrove.class); -// this.cards.add(TerramorphicExpanse.class); -// this.cards.add(TimeWarp.class); -// this.cards.add(WhiteKnight.class); + super("Magic 2011", "M11", "seticon_M11", "mage.sets.magic2011"); } } diff --git a/Mage.Sets/src/mage/sets/Planechase.java b/Mage.Sets/src/mage/sets/Planechase.java index 571241a5d9..9f9fdfec72 100644 --- a/Mage.Sets/src/mage/sets/Planechase.java +++ b/Mage.Sets/src/mage/sets/Planechase.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.planechase.*; import mage.cards.ExpansionSet; /** @@ -44,9 +43,7 @@ public class Planechase extends ExpansionSet { } private Planechase() { - this.name = "Planechase"; - this.cards.add(SoulWarden.class); - this.cards.add(OblivionRing.class); + super("Planechase", "HOP", "", "mage.sets.planechase"); } } diff --git a/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java b/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java index 02586d9a01..c5e83c86b9 100644 --- a/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java +++ b/Mage.Sets/src/mage/sets/RiseOfTheEldrazi.java @@ -29,7 +29,6 @@ package mage.sets; import mage.cards.ExpansionSet; -import mage.sets.riseoftheeldrazi.*; /** * @@ -44,15 +43,7 @@ public class RiseOfTheEldrazi extends ExpansionSet { } private RiseOfTheEldrazi() { - this.name = "Rise Of The Eldrazi"; - this.cards.add(Deprive.class); - this.cards.add(GideonJura.class); - this.cards.add(JoragaTreespeaker.class); - this.cards.add(KarganDragonlord.class); - this.cards.add(KozileksPredator.class); - this.cards.add(NestInvader.class); - this.cards.add(Vengevine.class); - this.cards.add(WallOfOmens.class); + super("Rise Of The Eldrazi", "ROE", "seticon_ROE", "mage.sets.riseoftheeldrazi"); } } diff --git a/Mage.Sets/src/mage/sets/Sets.java b/Mage.Sets/src/mage/sets/Sets.java index e10c016bbd..171f150f29 100644 --- a/Mage.Sets/src/mage/sets/Sets.java +++ b/Mage.Sets/src/mage/sets/Sets.java @@ -28,32 +28,48 @@ package mage.sets; -import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; +import mage.cards.Card; import mage.cards.ExpansionSet; /** * * @author BetaSteward_at_googlemail.com */ -public class Sets extends ArrayList { +public class Sets extends HashMap { private static final Sets fINSTANCE = new Sets(); + private static Set names; public static Sets getInstance() { return fINSTANCE; } private Sets() { - this.add(AlaraReborn.getInstance()); - this.add(Conflux.getInstance()); - this.add(Magic2010.getInstance()); - this.add(Magic2011.getInstance()); - this.add(Planechase.getInstance()); - this.add(RiseOfTheEldrazi.getInstance()); - this.add(ShardsOfAlara.getInstance()); - this.add(Tenth.getInstance()); - this.add(Worldwake.getInstance()); - this.add(Zendikar.getInstance()); + names = new HashSet(); + this.addSet(AlaraReborn.getInstance()); + this.addSet(Conflux.getInstance()); + this.addSet(Magic2010.getInstance()); + this.addSet(Magic2011.getInstance()); + this.addSet(Planechase.getInstance()); + this.addSet(RiseOfTheEldrazi.getInstance()); + this.addSet(ShardsOfAlara.getInstance()); + this.addSet(Tenth.getInstance()); + this.addSet(Worldwake.getInstance()); + this.addSet(Zendikar.getInstance()); + } + + private void addSet(ExpansionSet set) { + this.put(set.getCode(), set); + for (Card card: set.createCards()) { + names.add(card.getName()); + } + } + + public static Set getCardNames() { + return names; } } diff --git a/Mage.Sets/src/mage/sets/ShardsOfAlara.java b/Mage.Sets/src/mage/sets/ShardsOfAlara.java index da29316ef2..3c242eaea2 100644 --- a/Mage.Sets/src/mage/sets/ShardsOfAlara.java +++ b/Mage.Sets/src/mage/sets/ShardsOfAlara.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.shardsofalara.*; import mage.cards.ExpansionSet; /** @@ -44,24 +43,7 @@ public class ShardsOfAlara extends ExpansionSet { } private ShardsOfAlara() { - this.name = "Shards Of Alara"; - this.cards.add(AjaniVengeant.class); - this.cards.add(Angelsong.class); - this.cards.add(Blightning.class); - this.cards.add(BroodmateDragon.class); - this.cards.add(CrumblingNecropolis.class); - this.cards.add(ElspethKnightErrant.class); - this.cards.add(HellsThunder.class); - this.cards.add(JundPanorama.class); - this.cards.add(KnightOfTheWhiteOrchid.class); - this.cards.add(RafiqOfTheMany.class); - this.cards.add(RangerOfEos.class); - this.cards.add(RhoxWarMonk.class); - this.cards.add(SarkhanVol.class); - this.cards.add(SavageLands.class); - this.cards.add(SproutingThrinax.class); - this.cards.add(WildNacatl.class); - this.cards.add(WoollyThoctar.class); + super("Shards Of Alara", "ALA", "seticon_mtgala", "mage.sets.shardsofalara"); } } diff --git a/Mage.Sets/src/mage/sets/Tenth.java b/Mage.Sets/src/mage/sets/Tenth.java index 0e307c7ef7..7f4d301bca 100644 --- a/Mage.Sets/src/mage/sets/Tenth.java +++ b/Mage.Sets/src/mage/sets/Tenth.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.tenth.*; import mage.cards.ExpansionSet; /** @@ -44,12 +43,7 @@ public class Tenth extends ExpansionSet { } private Tenth() { - this.name = "Tenth Edition"; - this.cards.add(Forest1.class); - this.cards.add(Island1.class); - this.cards.add(Mountain1.class); - this.cards.add(Plains1.class); - this.cards.add(Swamp1.class); + super("Tenth Edition", "10E", "exp_symbol_mtg10e", "mage.sets.tenth"); } } diff --git a/Mage.Sets/src/mage/sets/Worldwake.java b/Mage.Sets/src/mage/sets/Worldwake.java index 2df474c09b..3458f4c3ad 100644 --- a/Mage.Sets/src/mage/sets/Worldwake.java +++ b/Mage.Sets/src/mage/sets/Worldwake.java @@ -29,7 +29,6 @@ package mage.sets; import mage.cards.ExpansionSet; -import mage.sets.worldwake.*; /** * @@ -44,22 +43,7 @@ public class Worldwake extends ExpansionSet { } private Worldwake() { - this.name = "Worldwake"; - this.cards.add(ArborElf.class); - this.cards.add(BasiliskCollar.class); - this.cards.add(CelestialColonnade.class); - this.cards.add(DreadStatuary.class); - this.cards.add(EverflowingChalice.class); - this.cards.add(JaceTheMindSculptor.class); - this.cards.add(KhalniGarden.class); - this.cards.add(LavaclawReaches.class); - this.cards.add(RagingRavine.class); - this.cards.add(SearingBlaze.class); - this.cards.add(SejiriSteppe.class); - this.cards.add(StirringWildwood.class); - this.cards.add(StoneforgeMystic.class); - this.cards.add(TectonicEdge.class); - this.cards.add(WolfbriarElemental.class); + super("Worldwake", "WWK", "seticon_WWK", "mage.sets.worldwake"); } } diff --git a/Mage.Sets/src/mage/sets/Zendikar.java b/Mage.Sets/src/mage/sets/Zendikar.java index 81c69fe9fd..d9b21093f8 100644 --- a/Mage.Sets/src/mage/sets/Zendikar.java +++ b/Mage.Sets/src/mage/sets/Zendikar.java @@ -28,7 +28,6 @@ package mage.sets; -import mage.sets.zendikar.*; import mage.cards.ExpansionSet; /** @@ -44,34 +43,7 @@ public class Zendikar extends ExpansionSet { } private Zendikar() { - this.name = "Zendikar"; - this.cards.add(AdventuringGear.class); - this.cards.add(AetherFigment.class); - this.cards.add(ArchiveTrap.class); - this.cards.add(AridMesa.class); - this.cards.add(BeastmasterAscension.class); - this.cards.add(BraveTheElements.class); - this.cards.add(BurstLightning.class); - this.cards.add(ConquerorsPledge.class); - this.cards.add(DayOfJudgment.class); - this.cards.add(EldraziMonument.class); - this.cards.add(EmeriaAngel.class); - this.cards.add(GoblinGuide.class); - this.cards.add(GoblinRuinblaster.class); - this.cards.add(KabiraCrossroads.class); - this.cards.add(LotusCobra.class); - this.cards.add(MarshFlats.class); - this.cards.add(MistyRainforest.class); - this.cards.add(OranRiefTheVastwood.class); - this.cards.add(RampagingBaloths.class); - this.cards.add(RiverBoa.class); - this.cards.add(ScaldingTarn.class); - this.cards.add(ScuteMob.class); - this.cards.add(SpreadingSeas.class); - this.cards.add(SteppeLynx.class); - this.cards.add(SunspringExpedition.class); - this.cards.add(TeeteringPeaks.class); - this.cards.add(VerdantCatacombs.class); + super("Zendikar", "ZEN", "seticon_ZEN", "mage.sets.zendikar"); } } diff --git a/Mage.Sets/src/mage/sets/alarareborn/BehemothSledge.java b/Mage.Sets/src/mage/sets/alarareborn/BehemothSledge.java index f899d2b0a2..b129f07d81 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/BehemothSledge.java +++ b/Mage.Sets/src/mage/sets/alarareborn/BehemothSledge.java @@ -31,8 +31,8 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; -import mage.MageObjectImpl; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.BoostEquippedEffect; @@ -41,7 +41,7 @@ import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; -import mage.sets.AlaraReborn; + /** * @@ -50,8 +50,8 @@ import mage.sets.AlaraReborn; public class BehemothSledge extends CardImpl { public BehemothSledge(UUID ownerId) { - super(ownerId, "Behemoth Sledge", new CardType[]{CardType.ARTIFACT}, "{1}{G}{W}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Behemoth Sledge", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}{G}{W}"); + this.expansionSetCode = "ARB"; this.subtype.add("Equipment"); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(LifelinkAbility.getInstance()))); diff --git a/Mage.Sets/src/mage/sets/alarareborn/BituminousBlast.java b/Mage.Sets/src/mage/sets/alarareborn/BituminousBlast.java index 234e5764aa..425668c131 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/BituminousBlast.java +++ b/Mage.Sets/src/mage/sets/alarareborn/BituminousBlast.java @@ -30,10 +30,11 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.CascadeAbility; import mage.cards.CardImpl; -import mage.sets.AlaraReborn; + import mage.target.common.TargetCreaturePermanent; /** @@ -43,8 +44,8 @@ import mage.target.common.TargetCreaturePermanent; public class BituminousBlast extends CardImpl { public BituminousBlast(UUID ownerId) { - super(ownerId, "Bituminous Blast", new CardType[]{CardType.INSTANT}, "{3}{B}{R}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Bituminous Blast", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{B}{R}"); + this.expansionSetCode = "ARB"; this.color.setBlack(true); this.color.setRed(true); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/alarareborn/BloodbraidElf.java b/Mage.Sets/src/mage/sets/alarareborn/BloodbraidElf.java index 48324dba48..9fa2dd8227 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/BloodbraidElf.java +++ b/Mage.Sets/src/mage/sets/alarareborn/BloodbraidElf.java @@ -30,11 +30,12 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.CascadeAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; -import mage.sets.AlaraReborn; + /** * @@ -43,8 +44,8 @@ import mage.sets.AlaraReborn; public class BloodbraidElf extends CardImpl { public BloodbraidElf(UUID ownerId) { - super(ownerId, "Bloodbraid Elf", new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Bloodbraid Elf", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); + this.expansionSetCode = "ARB"; this.color.setRed(true); this.color.setGreen(true); this.subtype.add("Elf"); diff --git a/Mage.Sets/src/mage/sets/alarareborn/FinestHour.java b/Mage.Sets/src/mage/sets/alarareborn/FinestHour.java index 1af61244cb..45dc603837 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/FinestHour.java +++ b/Mage.Sets/src/mage/sets/alarareborn/FinestHour.java @@ -31,6 +31,7 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.TurnPhase; import mage.Constants.Zone; import mage.abilities.Ability; @@ -43,7 +44,7 @@ import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.turn.TurnMod; -import mage.sets.AlaraReborn; + import mage.target.common.TargetCreaturePermanent; /** @@ -53,8 +54,8 @@ import mage.target.common.TargetCreaturePermanent; public class FinestHour extends CardImpl { public FinestHour(UUID ownerId) { - super(ownerId, "Finest Hour", new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{W}{U}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Finest Hour", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{W}{U}"); + this.expansionSetCode = "ARB"; this.color.setWhite(true); this.color.setGreen(true); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/sets/alarareborn/MaelstromPulse.java b/Mage.Sets/src/mage/sets/alarareborn/MaelstromPulse.java index 23bfe9b3e9..38ecbb7880 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/MaelstromPulse.java +++ b/Mage.Sets/src/mage/sets/alarareborn/MaelstromPulse.java @@ -30,9 +30,10 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DestroyAllNamedPermanentsEffect; import mage.cards.CardImpl; -import mage.sets.AlaraReborn; + import mage.target.common.TargetNonlandPermanent; /** @@ -42,8 +43,8 @@ import mage.target.common.TargetNonlandPermanent; public class MaelstromPulse extends CardImpl { public MaelstromPulse(UUID ownerId) { - super(ownerId, "Maelstrom Pulse", new CardType[]{CardType.SORCERY}, "{1}{B}{G}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Maelstrom Pulse", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{B}{G}"); + this.expansionSetCode = "ARB"; this.color.setBlack(true); this.color.setGreen(true); this.getSpellAbility().addTarget(new TargetNonlandPermanent()); diff --git a/Mage.Sets/src/mage/sets/alarareborn/PutridLeech.java b/Mage.Sets/src/mage/sets/alarareborn/PutridLeech.java index 3eb7b44fe4..b50d5ad19d 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/PutridLeech.java +++ b/Mage.Sets/src/mage/sets/alarareborn/PutridLeech.java @@ -31,13 +31,14 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.ActivateOncePerTurnActivatedAbility; import mage.abilities.costs.common.PayLifeCost; import mage.abilities.effects.common.BoostSourceEffect; import mage.cards.CardImpl; -import mage.sets.AlaraReborn; + /** * @@ -46,8 +47,8 @@ import mage.sets.AlaraReborn; public class PutridLeech extends CardImpl { public PutridLeech(UUID ownerId) { - super(ownerId, "Putrid Leech", new CardType[]{CardType.CREATURE}, "{B}{G}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Putrid Leech", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}{G}"); + this.expansionSetCode = "ARB"; this.color.setBlack(true); this.color.setGreen(true); this.subtype.add("Zombie"); diff --git a/Mage.Sets/src/mage/sets/alarareborn/SpellbreakerBehemoth.java b/Mage.Sets/src/mage/sets/alarareborn/SpellbreakerBehemoth.java index 6d60a1046d..05ea48f8f2 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/SpellbreakerBehemoth.java +++ b/Mage.Sets/src/mage/sets/alarareborn/SpellbreakerBehemoth.java @@ -30,6 +30,8 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; @@ -37,7 +39,7 @@ import mage.abilities.effects.common.CantCounterControlledEffect; import mage.abilities.effects.common.CantCounterSourceEffect; import mage.cards.CardImpl; import mage.filter.FilterSpell; -import mage.sets.AlaraReborn; + /** * @@ -45,20 +47,24 @@ import mage.sets.AlaraReborn; */ public class SpellbreakerBehemoth extends CardImpl { + private static FilterSpell filter = new FilterSpell("Creature spells you control with power 5 or greater"); + + static { + filter.getCardType().add(CardType.CREATURE); + filter.setPower(5); + } + public SpellbreakerBehemoth(UUID ownerId) { - super(ownerId, "Spellbreaker Behemoth", new CardType[]{CardType.CREATURE}, "{1}{R}{G}{G}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Spellbreaker Behemoth", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}{G}{G}"); + this.expansionSetCode = "ARB"; this.color.setRed(true); this.color.setGreen(true); this.subtype.add("Beast"); this.power = new MageInt(5); this.toughness = new MageInt(5); - this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantCounterSourceEffect())); - FilterSpell filter = new FilterSpell("Creature spells you control with power 5 or greater"); - filter.getCardType().add(CardType.CREATURE); - filter.setPower(5); - this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantCounterControlledEffect(filter))); + this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantCounterSourceEffect())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantCounterControlledEffect(filter, Duration.WhileOnBattlefield))); } public SpellbreakerBehemoth(final SpellbreakerBehemoth card) { diff --git a/Mage.Sets/src/mage/sets/alarareborn/Terminate.java b/Mage.Sets/src/mage/sets/alarareborn/Terminate.java index f3442f61c9..3b7165f6fb 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/Terminate.java +++ b/Mage.Sets/src/mage/sets/alarareborn/Terminate.java @@ -30,9 +30,10 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DestroyNoRegenTargetEffect; import mage.cards.CardImpl; -import mage.sets.AlaraReborn; + import mage.target.common.TargetCreaturePermanent; /** @@ -42,8 +43,8 @@ import mage.target.common.TargetCreaturePermanent; public class Terminate extends CardImpl { public Terminate(UUID ownerId) { - super(ownerId, "Terminate", new CardType[]{CardType.INSTANT}, "{B}{R}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Terminate", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{B}{R}"); + this.expansionSetCode = "ARB"; this.color.setBlack(true); this.color.setRed(true); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java b/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java index 991950d223..b800574ac3 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java +++ b/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java @@ -31,6 +31,7 @@ package mage.sets.alarareborn; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileSpellEffect; @@ -39,7 +40,7 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.sets.AlaraReborn; + import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCreatureOrPlayer; @@ -50,8 +51,8 @@ import mage.target.common.TargetCreatureOrPlayer; public class VengefulRebirth extends CardImpl { public VengefulRebirth(UUID ownerId) { - super(ownerId, "Vengeful Rebirth", new CardType[]{CardType.SORCERY}, "{4}{R}{G}"); - this.expansionSetId = AlaraReborn.getInstance().getId(); + super(ownerId, "Vengeful Rebirth", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{R}{G}"); + this.expansionSetCode = "ARB"; this.color.setRed(true); this.color.setGreen(true); this.getSpellAbility().addTarget(new TargetCardInGraveyard()); @@ -100,12 +101,12 @@ class VengefulRebirthEffect extends OneShotEffect { if (!card.getCardType().contains(CardType.LAND)) { Permanent permanent = game.getPermanent(source.getTargets().get(1).getTargets().get(0)); if (permanent != null) { - permanent.damage(damage, source.getSourceId(), game); + permanent.damage(damage, source.getSourceId(), game, true); return true; } Player targetPlayer = game.getPlayer(source.getTargets().get(1).getTargets().get(0)); if (targetPlayer != null) { - targetPlayer.damage(damage, source.getSourceId(), game); + targetPlayer.damage(damage, source.getSourceId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/conflux/CanyonMinotaur.java b/Mage.Sets/src/mage/sets/conflux/CanyonMinotaur.java new file mode 100644 index 0000000000..b088d91b17 --- /dev/null +++ b/Mage.Sets/src/mage/sets/conflux/CanyonMinotaur.java @@ -0,0 +1,68 @@ +/* + * 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.conflux; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.cards.CardImpl; + + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CanyonMinotaur extends CardImpl { + + public CanyonMinotaur(UUID ownerId) { + super(ownerId, "Canyon Minotaur", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "CON"; + this.color.setRed(true); + this.subtype.add("Minotaur"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + } + + public CanyonMinotaur(final CanyonMinotaur card) { + super(card); + } + + @Override + public CanyonMinotaur copy() { + return new CanyonMinotaur(this); + } + + @Override + public String getArt() { + return "118765_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/conflux/CelestialPurge.java b/Mage.Sets/src/mage/sets/conflux/CelestialPurge.java new file mode 100644 index 0000000000..22f1536f6d --- /dev/null +++ b/Mage.Sets/src/mage/sets/conflux/CelestialPurge.java @@ -0,0 +1,79 @@ +/* + * 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.conflux; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.FilterPermanent; + +import mage.target.TargetPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CelestialPurge extends CardImpl { + + private static FilterPermanent filter = new FilterPermanent("black or red permanent"); + + static { + filter.setUseColor(true); + filter.setScopeColor(ComparisonScope.Any); + filter.getColor().setBlack(true); + filter.getColor().setRed(true); + } + + public CelestialPurge(UUID ownerId) { + super(ownerId, "Celestial Purge", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "CON"; + this.color.setWhite(true); + this.getSpellAbility().addTarget(new TargetPermanent(filter, TargetController.ANY)); + this.getSpellAbility().addEffect(new ExileTargetEffect()); + } + + public CelestialPurge(final CelestialPurge card) { + super(card); + } + + @Override + public CelestialPurge copy() { + return new CelestialPurge(this); + } + + @Override + public String getArt() { + return "118751_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/conflux/FontOfMythos.java b/Mage.Sets/src/mage/sets/conflux/FontOfMythos.java index cbab6d63a4..b0b60065c4 100644 --- a/Mage.Sets/src/mage/sets/conflux/FontOfMythos.java +++ b/Mage.Sets/src/mage/sets/conflux/FontOfMythos.java @@ -30,6 +30,7 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.DrawCardTargetEffect; @@ -37,7 +38,7 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.sets.Conflux; + import mage.target.TargetPlayer; /** @@ -47,8 +48,8 @@ import mage.target.TargetPlayer; public class FontOfMythos extends CardImpl { public FontOfMythos(UUID ownerId) { - super(ownerId, "Font of Mythos", new CardType[]{CardType.ARTIFACT}, "{4}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Font of Mythos", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "CON"; this.addAbility(new FontOfMythosAbility()); } diff --git a/Mage.Sets/src/mage/sets/conflux/HellsparkElemental.java b/Mage.Sets/src/mage/sets/conflux/HellsparkElemental.java index f8ad0229a1..19145f1e86 100644 --- a/Mage.Sets/src/mage/sets/conflux/HellsparkElemental.java +++ b/Mage.Sets/src/mage/sets/conflux/HellsparkElemental.java @@ -30,6 +30,7 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,7 +39,7 @@ import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.game.events.GameEvent.EventType; -import mage.sets.Conflux; + /** * @@ -47,8 +48,8 @@ import mage.sets.Conflux; public class HellsparkElemental extends CardImpl { public HellsparkElemental(UUID ownerId) { - super(ownerId, "Hellspark Elemental", new CardType[]{CardType.CREATURE}, "{1}{R}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Hellspark Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "CON"; this.subtype.add("Elemental"); this.color.setRed(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/conflux/KnightOfTheReliquary.java b/Mage.Sets/src/mage/sets/conflux/KnightOfTheReliquary.java index 09fbd19404..96d1249676 100644 --- a/Mage.Sets/src/mage/sets/conflux/KnightOfTheReliquary.java +++ b/Mage.Sets/src/mage/sets/conflux/KnightOfTheReliquary.java @@ -33,6 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Layer; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.SubLayer; import mage.Constants.Zone; import mage.MageInt; @@ -51,7 +52,7 @@ import mage.filter.common.FilterLandCard; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.sets.Conflux; + import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetControlledPermanent; @@ -70,8 +71,8 @@ public class KnightOfTheReliquary extends CardImpl { } public KnightOfTheReliquary(UUID ownerId) { - super(ownerId, "Knight of the Reliquary", new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Knight of the Reliquary", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); + this.expansionSetCode = "CON"; this.color.setWhite(true); this.color.setGreen(true); this.subtype.add("Human"); @@ -81,7 +82,7 @@ public class KnightOfTheReliquary extends CardImpl { TargetCardInLibrary target = new TargetCardInLibrary(new FilterLandCard()); Costs costs = new CostsImpl(); costs.add(new TapSourceCost()); - costs.add(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter))); + costs.add(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, false))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KnightOfTheReliquaryEffect())); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, false, Outcome.PutLandInPlay), costs)); } diff --git a/Mage.Sets/src/mage/sets/conflux/MartialCoup.java b/Mage.Sets/src/mage/sets/conflux/MartialCoup.java index 18ea5dd540..6c05eb2e25 100644 --- a/Mage.Sets/src/mage/sets/conflux/MartialCoup.java +++ b/Mage.Sets/src/mage/sets/conflux/MartialCoup.java @@ -31,6 +31,7 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; @@ -39,7 +40,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.SoldierToken; import mage.players.Player; -import mage.sets.Conflux; + /** * @@ -48,8 +49,8 @@ import mage.sets.Conflux; public class MartialCoup extends CardImpl { public MartialCoup(UUID ownerId) { - super(ownerId, "Martial Coup", new CardType[]{CardType.SORCERY}, "{X}{W}{W}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Martial Coup", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{W}{W}"); + this.expansionSetCode = "CON"; this.color.setWhite(true); this.getSpellAbility().addEffect(new MartialCoupEffect()); } @@ -87,11 +88,10 @@ class MartialCoupEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - int amount = source.getManaCosts().getVariableCosts().get(0).getValue(); + int amount = source.getCosts().getVariableCosts().get(0).getAmount(); - FilterCreaturePermanent filter = new FilterCreaturePermanent(); if (amount > 4) { - for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { + for (Permanent permanent: game.getBattlefield().getActivePermanents(FilterCreaturePermanent.getDefault(), source.getControllerId(), game)) { permanent.destroy(source.getSourceId(), game, false); } } diff --git a/Mage.Sets/src/mage/sets/conflux/NobleHierarch.java b/Mage.Sets/src/mage/sets/conflux/NobleHierarch.java index 2c5eb5dd60..652ab9b83f 100644 --- a/Mage.Sets/src/mage/sets/conflux/NobleHierarch.java +++ b/Mage.Sets/src/mage/sets/conflux/NobleHierarch.java @@ -30,13 +30,14 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.ExaltedAbility; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; -import mage.sets.Conflux; + /** * @@ -45,8 +46,8 @@ import mage.sets.Conflux; public class NobleHierarch extends CardImpl { public NobleHierarch(UUID ownerId) { - super(ownerId, "Noble Hierarch", new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Noble Hierarch", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "CON"; this.color.setGreen(true); this.subtype.add("Human"); this.subtype.add("Druid"); diff --git a/Mage.Sets/src/mage/sets/conflux/PathToExile.java b/Mage.Sets/src/mage/sets/conflux/PathToExile.java index a92b793730..8925f16408 100644 --- a/Mage.Sets/src/mage/sets/conflux/PathToExile.java +++ b/Mage.Sets/src/mage/sets/conflux/PathToExile.java @@ -31,6 +31,7 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -40,7 +41,7 @@ import mage.filter.common.FilterBasicLandCard; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.sets.Conflux; + import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCreaturePermanent; @@ -51,8 +52,8 @@ import mage.target.common.TargetCreaturePermanent; public class PathToExile extends CardImpl { public PathToExile(UUID ownerId) { - super(ownerId, "Path To Exile", new CardType[]{CardType.INSTANT}, "{W}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Path To Exile", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "CON"; this.color.setWhite(true); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new PathToExileEffect()); diff --git a/Mage.Sets/src/mage/sets/conflux/QuenchableFire.java b/Mage.Sets/src/mage/sets/conflux/QuenchableFire.java index 34a9b531c4..c793d56190 100644 --- a/Mage.Sets/src/mage/sets/conflux/QuenchableFire.java +++ b/Mage.Sets/src/mage/sets/conflux/QuenchableFire.java @@ -31,6 +31,7 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.DelayedTriggeredAbility; import mage.abilities.SpecialAction; @@ -43,7 +44,7 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.sets.Conflux; + import mage.target.TargetPlayer; /** @@ -53,8 +54,8 @@ import mage.target.TargetPlayer; public class QuenchableFire extends CardImpl { public QuenchableFire(UUID ownerId) { - super(ownerId, "Quenchable Fire", new CardType[]{CardType.SORCERY}, "{3}{R}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Quenchable Fire", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "CON"; this.color.setRed(true); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); diff --git a/Mage.Sets/src/mage/sets/conflux/Thornling.java b/Mage.Sets/src/mage/sets/conflux/Thornling.java index 640e6626d8..05b1f7209a 100644 --- a/Mage.Sets/src/mage/sets/conflux/Thornling.java +++ b/Mage.Sets/src/mage/sets/conflux/Thornling.java @@ -31,6 +31,7 @@ package mage.sets.conflux; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; @@ -41,7 +42,7 @@ import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; -import mage.sets.Conflux; + /** * @@ -50,8 +51,8 @@ import mage.sets.Conflux; public class Thornling extends CardImpl { public Thornling(UUID ownerId) { - super(ownerId, "Thornling", new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.expansionSetId = Conflux.getInstance().getId(); + super(ownerId, "Thornling", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "CON"; this.color.setGreen(true); this.subtype.add("Elemental"); this.subtype.add("Shapeshifter"); diff --git a/Mage.Sets/src/mage/sets/magic2010/AcidicSlime.java b/Mage.Sets/src/mage/sets/magic2010/AcidicSlime.java index ce09cbe9bd..21e85093e0 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AcidicSlime.java +++ b/Mage.Sets/src/mage/sets/magic2010/AcidicSlime.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.MageInt; import mage.abilities.Ability; @@ -39,7 +40,6 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.FilterPermanent; -import mage.sets.Magic2010; import mage.target.Target; import mage.target.TargetPermanent; @@ -59,8 +59,8 @@ public class AcidicSlime extends CardImpl { } public AcidicSlime(UUID ownerId) { - super(ownerId, "Acidic Slime", new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Acidic Slime", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "M10"; this.subtype.add("Ooze"); this.color.setGreen(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/sets/magic2010/AcolyteOfXathrid.java b/Mage.Sets/src/mage/sets/magic2010/AcolyteOfXathrid.java index 35a1dc365e..765ce34d0c 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AcolyteOfXathrid.java +++ b/Mage.Sets/src/mage/sets/magic2010/AcolyteOfXathrid.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; @@ -38,7 +39,6 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.TargetPlayer; /** @@ -48,8 +48,8 @@ import mage.target.TargetPlayer; public class AcolyteOfXathrid extends CardImpl { public AcolyteOfXathrid(UUID ownerId) { - super(ownerId, "Acolyte Of Xathrid", new CardType[]{CardType.CREATURE}, "{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Acolyte Of Xathrid", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "M10"; this.subtype.add("Human"); this.subtype.add("Cleric"); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/sets/magic2010/ActOfTreason.java b/Mage.Sets/src/mage/sets/magic2010/ActOfTreason.java index 6d96699a36..1d6d8dbe56 100644 --- a/Mage.Sets/src/mage/sets/magic2010/ActOfTreason.java +++ b/Mage.Sets/src/mage/sets/magic2010/ActOfTreason.java @@ -31,12 +31,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.abilities.effects.common.GainAbilityTargetEffect; -import mage.abilities.effects.common.GainControlTargetEOTEffect; +import mage.abilities.effects.common.GainControlTargetEffect; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.common.TargetCreaturePermanent; /** @@ -46,11 +46,11 @@ import mage.target.common.TargetCreaturePermanent; public class ActOfTreason extends CardImpl { public ActOfTreason(UUID ownerId) { - super(ownerId, "Act Of Treason", new CardType[]{CardType.SORCERY}, "{2}{R}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Act Of Treason", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); + this.expansionSetCode = "M10"; this.color.setRed(true); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new GainControlTargetEOTEffect()); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addEffect(new UntapTargetEffect()); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/sets/magic2010/AirElemental.java b/Mage.Sets/src/mage/sets/magic2010/AirElemental.java index 90637be7bd..169357947d 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AirElemental.java +++ b/Mage.Sets/src/mage/sets/magic2010/AirElemental.java @@ -30,10 +30,10 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.sets.Magic2010; /** * @@ -42,8 +42,8 @@ import mage.sets.Magic2010; public class AirElemental extends CardImpl { public AirElemental(UUID ownerId) { - super(ownerId, "Air Elemental", new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Air Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "M10"; this.color.setBlue(true); this.subtype.add("Elemental"); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java b/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java index 5e3f322b29..f885b0cb46 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java +++ b/Mage.Sets/src/mage/sets/magic2010/AjaniGoldmane.java @@ -33,6 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Layer; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.SubLayer; import mage.Constants.Zone; import mage.MageInt; @@ -52,7 +53,6 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.players.Player; -import mage.sets.Magic2010; /** * @@ -61,8 +61,8 @@ import mage.sets.Magic2010; public class AjaniGoldmane extends CardImpl { public AjaniGoldmane(UUID ownerId) { - super(ownerId, "Ajani Goldmane", new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Ajani Goldmane", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}"); + this.expansionSetCode = "M10"; this.subtype.add("Ajani"); this.color.setWhite(true); this.loyalty = new MageInt(4); @@ -71,7 +71,7 @@ public class AjaniGoldmane extends CardImpl { Effects effects1 = new Effects(); effects1.add(new AddPlusOneCountersControlledEffect(1)); - effects1.add(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent())); + effects1.add(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, FilterCreaturePermanent.getDefault())); this.addAbility(new LoyaltyAbility(effects1, -1)); this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new AvatarToken()), -6)); diff --git a/Mage.Sets/src/mage/sets/magic2010/AlluringSiren.java b/Mage.Sets/src/mage/sets/magic2010/AlluringSiren.java index 33cddbc217..4fef1182ca 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AlluringSiren.java +++ b/Mage.Sets/src/mage/sets/magic2010/AlluringSiren.java @@ -31,6 +31,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.Constants.Zone; import mage.MageInt; @@ -43,7 +44,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.sets.Magic2010; import mage.target.common.TargetCreaturePermanent; /** @@ -53,8 +53,8 @@ import mage.target.common.TargetCreaturePermanent; public class AlluringSiren extends CardImpl { public AlluringSiren(UUID ownerId) { - super(ownerId, "Alluring Siren", new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Alluring Siren", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "M10"; this.color.setBlue(true); this.subtype.add("Siren"); this.power = new MageInt(1); @@ -85,7 +85,7 @@ public class AlluringSiren extends CardImpl { class AlluringSirenEffect extends RequirementAttackEffect { public AlluringSirenEffect() { - super(Duration.OneUse); + super(Duration.EndOfTurn); } public AlluringSirenEffect(final AlluringSirenEffect effect) { @@ -97,15 +97,6 @@ class AlluringSirenEffect extends RequirementAttackEffect { return new AlluringSirenEffect(this); } - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType().equals(EventType.DECLARE_ATTACKERS_STEP_PRE) && event.getPlayerId().equals(source.getFirstTarget())) - return true; - if (event.getType().equals(EventType.END_PHASE_POST) && event.getPlayerId().equals(source.getFirstTarget())) - used = true; - return false; - } - @Override public boolean apply(Game game, Ability source) { Permanent creature = game.getPermanent(source.getFirstTarget()); @@ -119,6 +110,6 @@ class AlluringSirenEffect extends RequirementAttackEffect { @Override public String getText(Ability source) { - return "Target creature an opponent controls attacks you this turn if able."; + return "Target creature an opponent controls attacks you this turn if able"; } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/AngelsFeather.java b/Mage.Sets/src/mage/sets/magic2010/AngelsFeather.java index 665a8165a9..c1b35cc6b3 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AngelsFeather.java +++ b/Mage.Sets/src/mage/sets/magic2010/AngelsFeather.java @@ -29,75 +29,16 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.Constants.CardType; -import mage.Constants.Zone; -import mage.MageObject; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.sets.Magic2010; /** * * @author BetaSteward_at_googlemail.com */ -public class AngelsFeather extends CardImpl { +public class AngelsFeather extends mage.sets.tenth.AngelsFeather { public AngelsFeather(UUID ownerId) { - super(ownerId, "Angel's Feather", new CardType[]{CardType.ARTIFACT}, "{2}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.addAbility(new AngelsFeatherAbility()); - } - - public AngelsFeather(final AngelsFeather card) { - super(card); - } - - @Override - public AngelsFeather copy() { - return new AngelsFeather(this); - } - - @Override - public String getArt() { - return "75223_typ_reg_sty_010.jpg"; - } - -} - -class AngelsFeatherAbility extends TriggeredAbilityImpl { - - public AngelsFeatherAbility() { - super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); - } - - public AngelsFeatherAbility(final AngelsFeatherAbility ability) { - super(ability); - } - - @Override - public AngelsFeatherAbility copy() { - return new AngelsFeatherAbility(this); - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == EventType.SPELL_CAST) { - MageObject spell = game.getObject(event.getTargetId()); - if (spell != null && spell.getColor().isWhite()) { - trigger(game, event.getPlayerId()); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever a player casts a white spell, you may gain 1 life."; + super(ownerId); + this.expansionSetCode = "M10"; } } diff --git a/Mage.Sets/src/mage/sets/magic2010/AngelsMercy.java b/Mage.Sets/src/mage/sets/magic2010/AngelsMercy.java index e740e0c008..a106c2d204 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AngelsMercy.java +++ b/Mage.Sets/src/mage/sets/magic2010/AngelsMercy.java @@ -30,9 +30,9 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; -import mage.sets.Magic2010; /** * @@ -41,8 +41,8 @@ import mage.sets.Magic2010; public class AngelsMercy extends CardImpl { public AngelsMercy(UUID ownerId) { - super(ownerId, "Angel's Mercy", new CardType[]{CardType.INSTANT}, "{2}{W}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Angel's Mercy", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}{W}"); + this.expansionSetCode = "M10"; this.color.setWhite(true); this.getSpellAbility().addEffect(new GainLifeEffect(7)); } diff --git a/Mage.Sets/src/mage/sets/magic2010/AntQueen.java b/Mage.Sets/src/mage/sets/magic2010/AntQueen.java index 2f5f8bb67c..25212936f6 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AntQueen.java +++ b/Mage.Sets/src/mage/sets/magic2010/AntQueen.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; @@ -37,7 +38,6 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.game.permanent.token.InsectToken; -import mage.sets.Magic2010; /** * @@ -48,8 +48,8 @@ public class AntQueen extends CardImpl { private static InsectToken insectToken = new InsectToken(); public AntQueen(UUID ownerId) { - super(ownerId, "Ant Queen", new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Ant Queen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "M10"; this.subtype.add("Insect"); this.color.setGreen(true); // this.art = "122179_typ_reg_sty_010.jpg"; diff --git a/Mage.Sets/src/mage/sets/magic2010/ArmoredAscension.java b/Mage.Sets/src/mage/sets/magic2010/ArmoredAscension.java index f3bc83c672..2763540faf 100644 --- a/Mage.Sets/src/mage/sets/magic2010/ArmoredAscension.java +++ b/Mage.Sets/src/mage/sets/magic2010/ArmoredAscension.java @@ -33,6 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Layer; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.SubLayer; import mage.Constants.Zone; import mage.abilities.Ability; @@ -45,7 +46,6 @@ import mage.cards.CardImpl; import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.sets.Magic2010; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; @@ -56,8 +56,8 @@ import mage.target.common.TargetCreaturePermanent; public class ArmoredAscension extends CardImpl { public ArmoredAscension(UUID ownerId) { - super(ownerId, "Armored Ascension", new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Armored Ascension", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + this.expansionSetCode = "M10"; this.color.setWhite(true); this.subtype.add("Aura"); @@ -109,9 +109,9 @@ class ArmoredAscensionEffect extends ContinuousEffectImpl { - - private static FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); - - static { - filter.setTapped(true); - filter.setUseTapped(true); - } +public class Assassinate extends mage.sets.tenth.Assassinate { public Assassinate(UUID ownerId) { - super(ownerId, "Assassinate", new CardType[]{CardType.SORCERY}, "{2}{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.color.setBlack(true); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(1, 1, filter, TargetController.ANY)); - this.getSpellAbility().addEffect(new DestroyTargetEffect()); - - } - - public Assassinate(final Assassinate card) { - super(card); - } - - @Override - public Assassinate copy() { - return new Assassinate(this); - } - - @Override - public String getArt() { - return "97461_typ_reg_sty_010.jpg"; + super(ownerId); + this.expansionSetCode = "M10"; } } diff --git a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java index b8370f0e4f..f8bb9b7371 100644 --- a/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java +++ b/Mage.Sets/src/mage/sets/magic2010/AwakenerDruid.java @@ -33,6 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Layer; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.SubLayer; import mage.MageInt; import mage.abilities.Ability; @@ -43,7 +44,6 @@ import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; -import mage.sets.Magic2010; import mage.target.common.TargetLandPermanent; /** @@ -59,8 +59,8 @@ public class AwakenerDruid extends CardImpl { } public AwakenerDruid(UUID ownerId) { - super(ownerId, "Awakener Druid", new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Awakener Druid", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "M10"; this.color.setGreen(true); this.subtype.add("Human"); this.subtype.add("Druid"); diff --git a/Mage.Sets/src/mage/sets/magic2010/BallLightning.java b/Mage.Sets/src/mage/sets/magic2010/BallLightning.java index 5ab07d27ed..4a255aae15 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BallLightning.java +++ b/Mage.Sets/src/mage/sets/magic2010/BallLightning.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.effects.common.SacrificeSourceEffect; @@ -37,7 +38,6 @@ import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.game.events.GameEvent.EventType; -import mage.sets.Magic2010; /** * @@ -46,8 +46,8 @@ import mage.sets.Magic2010; public class BallLightning extends CardImpl { public BallLightning(UUID ownerId) { - super(ownerId, "Ball Lightning", new CardType[]{CardType.CREATURE}, "{R}{R}{R}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Ball Lightning", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{R}{R}{R}"); + this.expansionSetCode = "M10"; this.subtype.add("Elemental"); this.color.setRed(true); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/sets/magic2010/BaneslayerAngel.java b/Mage.Sets/src/mage/sets/magic2010/BaneslayerAngel.java index b4826b84be..0432cb4de0 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BaneslayerAngel.java +++ b/Mage.Sets/src/mage/sets/magic2010/BaneslayerAngel.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FlyingAbility; @@ -38,7 +39,6 @@ import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.Magic2010; /** * @@ -47,8 +47,8 @@ import mage.sets.Magic2010; public class BaneslayerAngel extends CardImpl { public BaneslayerAngel(UUID ownerId) { - super(ownerId, "Baneslayer Angel", new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Baneslayer Angel", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "M10"; this.subtype.add("Angel"); this.color.setWhite(true); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/sets/magic2010/BerserkersOfBloodRidge.java b/Mage.Sets/src/mage/sets/magic2010/BerserkersOfBloodRidge.java index 8738289372..7b61e35550 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BerserkersOfBloodRidge.java +++ b/Mage.Sets/src/mage/sets/magic2010/BerserkersOfBloodRidge.java @@ -30,10 +30,10 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.AttacksEachTurnStaticAbility; import mage.cards.CardImpl; -import mage.sets.Magic2010; /** * @@ -42,8 +42,8 @@ import mage.sets.Magic2010; public class BerserkersOfBloodRidge extends CardImpl { public BerserkersOfBloodRidge(UUID ownerId) { - super(ownerId, "Berserkers of Blood Ridge", new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Berserkers of Blood Ridge", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "M10"; this.color.setRed(true); this.subtype.add("Human"); this.subtype.add("Berserker"); diff --git a/Mage.Sets/src/mage/sets/magic2010/BirdsOfParadise.java b/Mage.Sets/src/mage/sets/magic2010/BirdsOfParadise.java index a4330294f2..303c406791 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BirdsOfParadise.java +++ b/Mage.Sets/src/mage/sets/magic2010/BirdsOfParadise.java @@ -29,50 +29,16 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.Constants.CardType; -import mage.MageInt; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.mana.BlackManaAbility; -import mage.abilities.mana.BlueManaAbility; -import mage.abilities.mana.GreenManaAbility; -import mage.abilities.mana.RedManaAbility; -import mage.abilities.mana.WhiteManaAbility; -import mage.cards.CardImpl; -import mage.sets.Magic2010; /** * * @author BetaSteward_at_googlemail.com */ -public class BirdsOfParadise extends CardImpl { +public class BirdsOfParadise extends mage.sets.tenth.BirdsOfParadise { public BirdsOfParadise(UUID ownerId) { - super(ownerId, "Birds of Paradise", new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.subtype.add("Bird"); - this.color.setGreen(true); - this.power = new MageInt(0); - this.toughness = new MageInt(1); - this.addAbility(FlyingAbility.getInstance()); - this.addAbility(new BlackManaAbility()); - this.addAbility(new BlueManaAbility()); - this.addAbility(new GreenManaAbility()); - this.addAbility(new RedManaAbility()); - this.addAbility(new WhiteManaAbility()); - } - - public BirdsOfParadise(final BirdsOfParadise card) { - super(card); - } - - @Override - public BirdsOfParadise copy() { - return new BirdsOfParadise(this); - } - - @Override - public String getArt() { - return "88690_typ_reg_sty_010.jpg"; + super(ownerId); + this.expansionSetCode = "M10"; } } diff --git a/Mage.Sets/src/mage/sets/magic2010/BlackKnight.java b/Mage.Sets/src/mage/sets/magic2010/BlackKnight.java index 90d2f32cdd..bcdea932db 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BlackKnight.java +++ b/Mage.Sets/src/mage/sets/magic2010/BlackKnight.java @@ -30,12 +30,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.filter.FilterCard; -import mage.sets.Magic2010; /** * @@ -51,8 +51,8 @@ public class BlackKnight extends CardImpl { } public BlackKnight(UUID ownerId) { - super(ownerId, "Black Knight", new CardType[]{CardType.CREATURE}, "{B}{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Black Knight", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}{B}"); + this.expansionSetCode = "M10"; this.subtype.add("Human"); this.subtype.add("Knight"); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/sets/magic2010/BlindingMage.java b/Mage.Sets/src/mage/sets/magic2010/BlindingMage.java index ebaa3227b4..7a14566204 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BlindingMage.java +++ b/Mage.Sets/src/mage/sets/magic2010/BlindingMage.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; @@ -38,7 +39,6 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.TapTargetEffect; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.common.TargetCreaturePermanent; /** @@ -48,8 +48,8 @@ import mage.target.common.TargetCreaturePermanent; public class BlindingMage extends CardImpl { public BlindingMage(UUID ownerId) { - super(ownerId, "Blinding Mage", new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Blinding Mage", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "M10"; this.subtype.add("Human"); this.subtype.add("Wizard"); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/sets/magic2010/BogWraith.java b/Mage.Sets/src/mage/sets/magic2010/BogWraith.java index d6c3e3f5db..78de7c6245 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BogWraith.java +++ b/Mage.Sets/src/mage/sets/magic2010/BogWraith.java @@ -30,12 +30,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.LandwalkAbility; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.common.FilterLandPermanent; -import mage.sets.Magic2010; /** * @@ -51,8 +51,8 @@ public class BogWraith extends CardImpl { } public BogWraith(UUID ownerId) { - super(ownerId, "Bog Wraith", new CardType[]{CardType.CREATURE}, "{3}{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Bog Wraith", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "M10"; this.color.setBlack(true); this.subtype.add("Wraith"); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/magic2010/BogardanHellkite.java b/Mage.Sets/src/mage/sets/magic2010/BogardanHellkite.java index 1391523308..8c03890a63 100644 --- a/Mage.Sets/src/mage/sets/magic2010/BogardanHellkite.java +++ b/Mage.Sets/src/mage/sets/magic2010/BogardanHellkite.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -37,7 +38,6 @@ import mage.abilities.effects.common.DamageMultiEffect; import mage.abilities.keyword.FlashAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.common.TargetCreatureOrPlayerAmount; /** @@ -47,8 +47,8 @@ import mage.target.common.TargetCreatureOrPlayerAmount; public class BogardanHellkite extends CardImpl { public BogardanHellkite(UUID ownerId) { - super(ownerId, "Bogardan Hellkite", new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Bogardan Hellkite", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); + this.expansionSetCode = "M10"; this.subtype.add("Dragon"); this.color.setRed(true); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/sets/magic2010/Cancel.java b/Mage.Sets/src/mage/sets/magic2010/Cancel.java index 36af1b92be..0b9fabb10f 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Cancel.java +++ b/Mage.Sets/src/mage/sets/magic2010/Cancel.java @@ -29,38 +29,16 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.Constants.CardType; -import mage.abilities.effects.common.CounterTargetEffect; -import mage.cards.CardImpl; -import mage.sets.Magic2010; -import mage.target.TargetSpell; /** * * @author BetaSteward_at_googlemail.com */ -public class Cancel extends CardImpl { +public class Cancel extends mage.sets.shardsofalara.Cancel { public Cancel(UUID ownerId) { - super(ownerId, "Cancel", new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.color.setBlue(true); - this.getSpellAbility().addTarget(new TargetSpell()); - this.getSpellAbility().addEffect(new CounterTargetEffect()); + super(ownerId); + this.expansionSetCode = "M10"; } - public Cancel(final Cancel card) { - super(card); - } - - @Override - public Cancel copy() { - return new Cancel(this); - } - - @Override - public String getArt() { - return "116179_typ_reg_sty_010.jpg"; - } - -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/CanyonMinotaur.java b/Mage.Sets/src/mage/sets/magic2010/CanyonMinotaur.java new file mode 100644 index 0000000000..d7cc4dc94a --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/CanyonMinotaur.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CanyonMinotaur extends mage.sets.conflux.CanyonMinotaur { + + public CanyonMinotaur(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/CelestialPurge.java b/Mage.Sets/src/mage/sets/magic2010/CelestialPurge.java index f5ee989518..084214e184 100644 --- a/Mage.Sets/src/mage/sets/magic2010/CelestialPurge.java +++ b/Mage.Sets/src/mage/sets/magic2010/CelestialPurge.java @@ -29,50 +29,16 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.Constants.CardType; -import mage.Constants.TargetController; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.cards.CardImpl; -import mage.filter.Filter.ComparisonScope; -import mage.filter.FilterPermanent; -import mage.sets.Magic2010; -import mage.target.TargetPermanent; /** * * @author BetaSteward_at_googlemail.com */ -public class CelestialPurge extends CardImpl { - - private static FilterPermanent filter = new FilterPermanent("black or red permanent"); - - static { - filter.setUseColor(true); - filter.setScopeColor(ComparisonScope.Any); - filter.getColor().setBlack(true); - filter.getColor().setRed(true); - } +public class CelestialPurge extends mage.sets.conflux.CelestialPurge { public CelestialPurge(UUID ownerId) { - super(ownerId, "Celestial Purge", new CardType[]{CardType.INSTANT}, "{1}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.color.setWhite(true); - this.getSpellAbility().addTarget(new TargetPermanent(filter, TargetController.ANY)); - this.getSpellAbility().addEffect(new ExileTargetEffect()); + super(ownerId); + this.expansionSetCode = "M10"; } - public CelestialPurge(final CelestialPurge card) { - super(card); - } - - @Override - public CelestialPurge copy() { - return new CelestialPurge(this); - } - - @Override - public String getArt() { - return "118751_typ_reg_sty_010.jpg"; - } - -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/ChandraNalaar.java b/Mage.Sets/src/mage/sets/magic2010/ChandraNalaar.java new file mode 100644 index 0000000000..5289d61ed1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/ChandraNalaar.java @@ -0,0 +1,88 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.LoyaltyAbility; +import mage.abilities.effects.Effects; +import mage.abilities.effects.common.DamageAllControlledTargetEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DamageXTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ChandraNalaar extends CardImpl { + + public ChandraNalaar(UUID ownerId) { + super(ownerId, "Chandra Nalaar", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{3}{R}{R}"); + this.expansionSetCode = "M10"; + this.subtype.add("Chandra "); + this.color.setRed(true); + this.loyalty = new MageInt(6); + + LoyaltyAbility ability1 = new LoyaltyAbility(new DamageTargetEffect(1), 1); + ability1.addTarget(new TargetPlayer()); + this.addAbility(ability1); + + LoyaltyAbility ability2 = new LoyaltyAbility(new DamageXTargetEffect()); + ability2.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability2); + + Effects effects1 = new Effects(); + effects1.add(new DamageTargetEffect(10)); + effects1.add(new DamageAllControlledTargetEffect(10, FilterCreaturePermanent.getDefault())); + LoyaltyAbility ability3 = new LoyaltyAbility(effects1, -8); + ability3.addTarget(new TargetPlayer()); + this.addAbility(ability3); + } + + public ChandraNalaar(final ChandraNalaar card) { + super(card); + } + + @Override + public ChandraNalaar copy() { + return new ChandraNalaar(this); + } + + @Override + public String getArt() { + return "105500_typ_reg_sty_010.jpg"; + } +} + diff --git a/Mage.Sets/src/mage/sets/magic2010/ChildOfNight.java b/Mage.Sets/src/mage/sets/magic2010/ChildOfNight.java new file mode 100644 index 0000000000..6836b0e179 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/ChildOfNight.java @@ -0,0 +1,69 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ChildOfNight extends CardImpl { + + public ChildOfNight(UUID ownerId) { + super(ownerId, "Child Of Night", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "M10"; + this.color.setBlack(true); + this.subtype.add("Vampire"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + this.abilities.add(LifelinkAbility.getInstance()); + } + + public ChildOfNight(final ChildOfNight card) { + super(card); + } + + @Override + public ChildOfNight copy() { + return new ChildOfNight(this); + } + + @Override + public String getArt() { + return "98590_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Clone.java b/Mage.Sets/src/mage/sets/magic2010/Clone.java new file mode 100644 index 0000000000..8129fe1384 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Clone.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Clone extends mage.sets.tenth.Clone { + + public Clone(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/CudgelTroll.java b/Mage.Sets/src/mage/sets/magic2010/CudgelTroll.java new file mode 100644 index 0000000000..26663fa446 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/CudgelTroll.java @@ -0,0 +1,73 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.RegenerateSourceEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CudgelTroll extends CardImpl { + + public CudgelTroll(UUID ownerId) { + super(ownerId, "Cudgel Troll", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "M10"; + this.color.setGreen(true); + this.subtype.add("Troll"); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{G}"))); + } + + public CudgelTroll(final CudgelTroll card) { + super(card); + } + + @Override + public CudgelTroll copy() { + return new CudgelTroll(this); + } + + @Override + public String getArt() { + return "121570_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Deathmark.java b/Mage.Sets/src/mage/sets/magic2010/Deathmark.java new file mode 100644 index 0000000000..169fb6be44 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Deathmark.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Deathmark extends mage.sets.tenth.Deathmark { + + public Deathmark(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "122155_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/DemonsHorn.java b/Mage.Sets/src/mage/sets/magic2010/DemonsHorn.java new file mode 100644 index 0000000000..4fb9fc4c14 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/DemonsHorn.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DemonsHorn extends mage.sets.tenth.DemonsHorn { + + public DemonsHorn(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/DiabolicTutor.java b/Mage.Sets/src/mage/sets/magic2010/DiabolicTutor.java index f7747e39d8..d70f702afa 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DiabolicTutor.java +++ b/Mage.Sets/src/mage/sets/magic2010/DiabolicTutor.java @@ -29,37 +29,16 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.Constants.CardType; -import mage.abilities.effects.common.SearchLibraryPutInHandEffect; -import mage.cards.CardImpl; -import mage.sets.Magic2010; -import mage.target.common.TargetCardInLibrary; /** * - * @author LokiX + * @author BetaSteward_at_googlemail.com */ -public class DiabolicTutor extends CardImpl { +public class DiabolicTutor extends mage.sets.tenth.DiabolicTutor { - public DiabolicTutor(UUID onwerId){ - super(onwerId, "Diabolic Tutor", new CardType[]{CardType.INSTANT},"{2}{B}{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.color.setBlack(true); - TargetCardInLibrary target = new TargetCardInLibrary(); - this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(target)); - } - - public DiabolicTutor(final DiabolicTutor card) { - super(card); + public DiabolicTutor(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; } - @Override - public DiabolicTutor copy() { - return new DiabolicTutor(this); - } - - @Override - public String getArt() { - return "101052_typ_reg_sty_010.jpg"; - } } diff --git a/Mage.Sets/src/mage/sets/magic2010/Disentomb.java b/Mage.Sets/src/mage/sets/magic2010/Disentomb.java new file mode 100644 index 0000000000..ed2e696c3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Disentomb.java @@ -0,0 +1,70 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Disentomb extends CardImpl { + + private static FilterCreatureCard filter = new FilterCreatureCard(); + + public Disentomb(UUID ownerId) { + super(ownerId, "Disentomb", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "M10"; + this.color.setBlack(true); + this.getSpellAbility().addTarget(new TargetCardInGraveyard(filter)); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + } + + public Disentomb(final Disentomb card) { + super(card); + } + + @Override + public Disentomb copy() { + return new Disentomb(this); + } + + @Override + public String getArt() { + return "121633_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/DoomBlade.java b/Mage.Sets/src/mage/sets/magic2010/DoomBlade.java index a8ca1fa6e0..361d50ebb0 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DoomBlade.java +++ b/Mage.Sets/src/mage/sets/magic2010/DoomBlade.java @@ -30,11 +30,11 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.Magic2010; import mage.target.common.TargetCreaturePermanent; /** @@ -52,10 +52,10 @@ public class DoomBlade extends CardImpl { } public DoomBlade(UUID onwerId){ - super(onwerId, "Doom Blade", new CardType[]{CardType.INSTANT},"{1}{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(onwerId, "Doom Blade", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{B}"); + this.expansionSetCode = "M10"; this.color.setBlack(true); - this.getSpellAbility().addTarget(new TargetCreaturePermanent(1,1,filter, TargetController.ANY)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(1, 1, filter, TargetController.ANY, false)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/DragonsClaw.java b/Mage.Sets/src/mage/sets/magic2010/DragonsClaw.java new file mode 100644 index 0000000000..3ff022e754 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/DragonsClaw.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DragonsClaw extends mage.sets.tenth.DragonsClaw { + + public DragonsClaw(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java b/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java index 5b4dd2c39a..07b174bfc0 100644 --- a/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java +++ b/Mage.Sets/src/mage/sets/magic2010/DragonskullSummit.java @@ -30,14 +30,14 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldStaticAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedUnlessControlsEffect; +import mage.abilities.effects.common.TapSourceUnlessControlsEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.common.FilterLandPermanent; -import mage.sets.Magic2010; /** * @@ -55,9 +55,9 @@ public class DragonskullSummit extends CardImpl { } public DragonskullSummit(UUID ownerId) { - super(ownerId, "Dragonskull Summit", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Magic2010.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedUnlessControlsEffect(filter))); + super(ownerId, "Dragonskull Summit", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "M10"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceUnlessControlsEffect(filter), "tapped unless you control a " + filter.getMessage())); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java b/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java new file mode 100644 index 0000000000..9108860562 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/DrownedCatacomb.java @@ -0,0 +1,78 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.common.EntersBattlefieldStaticAbility; +import mage.abilities.effects.common.TapSourceUnlessControlsEffect; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.BlueManaAbility; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.common.FilterLandPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DrownedCatacomb extends CardImpl { + + private static FilterLandPermanent filter = new FilterLandPermanent(); + + static { + filter.getSubtype().add("Swamp"); + filter.getSubtype().add("Island"); + filter.setScopeSubtype(ComparisonScope.Any); + filter.setMessage("Island or a Swamp"); + } + + public DrownedCatacomb(UUID ownerId) { + super(ownerId, "Drowned Catacomb", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "M10"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceUnlessControlsEffect(filter), "tapped unless you control a " + filter.getMessage())); + this.addAbility(new BlackManaAbility()); + this.addAbility(new BlueManaAbility()); + } + + public DrownedCatacomb(final DrownedCatacomb card) { + super(card); + } + + @Override + public DrownedCatacomb copy() { + return new DrownedCatacomb(this); + } + + @Override + public String getArt() { + return "121655_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Duress.java b/Mage.Sets/src/mage/sets/magic2010/Duress.java new file mode 100644 index 0000000000..a2e92f049a --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Duress.java @@ -0,0 +1,124 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetOpponent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Duress extends CardImpl { + + public Duress(UUID onwerId){ + super(onwerId, "Duress", Rarity.COMMON, new CardType[]{CardType.SORCERY},"{B}"); + this.expansionSetCode = "M10"; + this.color.setBlack(true); + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new DuressEffect()); + } + + public Duress(final Duress card) { + super(card); + } + + @Override + public Duress copy() { + return new Duress(this); + } + + @Override + public String getArt() { + return "122154_typ_reg_sty_010.jpg"; + } +} + +class DuressEffect extends OneShotEffect { + + private static FilterCard filter = new FilterCard("noncreature, nonland card"); + + static { + filter.getCardType().add(CardType.CREATURE); + filter.getCardType().add(CardType.LAND); + filter.setScopeCardType(ComparisonScope.Any); + filter.setNotCardType(true); + } + + public DuressEffect() { + super(Outcome.Discard); + } + + public DuressEffect(final DuressEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + player.revealCards(player.getHand(), game); + Player you = game.getPlayer(source.getControllerId()); + if (you != null) { + TargetCard target = new TargetCard(Zone.PICK, filter); + if (you.chooseTarget(player.getHand(), target, source, game)) { + Card card = player.getHand().get(target.getFirstTarget(), game); + if (card != null) { + return player.discard(card, game); + } + } + } + } + return false; + } + + @Override + public DuressEffect copy() { + return new DuressEffect(this); + } + + @Override + public String getText(Ability source) { + return "Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java index 86574995a5..14a4955a41 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java +++ b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java @@ -31,6 +31,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; @@ -39,7 +40,6 @@ import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.sets.Magic2010; /** * @@ -48,8 +48,8 @@ import mage.sets.Magic2010; public class Earthquake extends CardImpl { public Earthquake(UUID ownerId) { - super(ownerId, "Earthquake", new CardType[]{CardType.SORCERY}, "{X}{R}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Earthquake", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{R}"); + this.expansionSetCode = "M10"; this.color.setRed(true); this.getSpellAbility().addEffect(new EarthquakeEffect()); } @@ -71,6 +71,13 @@ public class Earthquake extends CardImpl { class EarthquakeEffect extends OneShotEffect { + private static FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.getAbilities().add(FlyingAbility.getInstance()); + filter.setNotAbilities(true); + } + public EarthquakeEffect() { super(Outcome.Damage); } @@ -86,18 +93,15 @@ class EarthquakeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - int amount = source.getManaCosts().getVariableCosts().get(0).getValue(); + int amount = source.getCosts().getVariableCosts().get(0).getAmount(); - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.getAbilities().add(FlyingAbility.getInstance()); - filter.setNotAbilities(true); for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { - permanent.damage(amount, source.getId(), game); + permanent.damage(amount, source.getId(), game, true); } for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) { Player player = game.getPlayer(playerId); if (player != null) - player.damage(amount, source.getId(), game); + player.damage(amount, source.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/magic2010/EliteVanguard.java b/Mage.Sets/src/mage/sets/magic2010/EliteVanguard.java index ad31e28332..6c2a2fc2d6 100644 --- a/Mage.Sets/src/mage/sets/magic2010/EliteVanguard.java +++ b/Mage.Sets/src/mage/sets/magic2010/EliteVanguard.java @@ -30,9 +30,9 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.cards.CardImpl; -import mage.sets.Magic2010; /** * @@ -41,8 +41,8 @@ import mage.sets.Magic2010; public class EliteVanguard extends CardImpl { public EliteVanguard(UUID ownerId) { - super(ownerId, "Elite Vanguard", new CardType[]{CardType.CREATURE}, "{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Elite Vanguard", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "M10"; this.color.setWhite(true); this.subtype.add("Human"); this.subtype.add("Soldier"); diff --git a/Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java b/Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java new file mode 100644 index 0000000000..943bfbf17e --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/ElvishArchdruid.java @@ -0,0 +1,124 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.BoostControlledEffect; +import mage.abilities.effects.common.ManaEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ElvishArchdruid extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf creatures"); + + static { + filter.getSubtype().add("Elf"); + } + + public ElvishArchdruid(UUID ownerId) { + super(ownerId, "Elvish Archdruid", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "M10"; + this.subtype.add("Elf"); + this.subtype.add("Druid"); + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ElvishArchdruidEffect(), new TapSourceCost()); + this.addAbility(ability); + } + + public ElvishArchdruid(final ElvishArchdruid card) { + super(card); + } + + @Override + public ElvishArchdruid copy() { + return new ElvishArchdruid(this); + } + + @Override + public String getArt() { + return "121692_typ_reg_sty_010.jpg"; + } + +} + +class ElvishArchdruidEffect extends ManaEffect { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("Elf creatures"); + + static { + filter.getSubtype().add("Elf"); + } + + public ElvishArchdruidEffect() { + super(new Mana()); + } + + public ElvishArchdruidEffect(final ElvishArchdruidEffect effect) { + super(effect); + } + + @Override + public ElvishArchdruidEffect copy() { + return new ElvishArchdruidEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + this.mana.clear(); + int amount = game.getBattlefield().countAll(filter, source.getControllerId()); + this.mana.setGreen(amount); + return super.apply(game, source); + } + + @Override + public String getText(Ability source) { + return "Add {G} to your mana pool for each Elf you control"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/Excommunicate.java b/Mage.Sets/src/mage/sets/magic2010/Excommunicate.java new file mode 100644 index 0000000000..ecb98909d3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Excommunicate.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Excommunicate extends mage.sets.shardsofalara.Excommunicate { + + public Excommunicate(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/FieryHellhound.java b/Mage.Sets/src/mage/sets/magic2010/FieryHellhound.java new file mode 100644 index 0000000000..7a1513ba00 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/FieryHellhound.java @@ -0,0 +1,74 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.BoostSourceEffect; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class FieryHellhound extends CardImpl { + + public FieryHellhound(UUID ownerId) { + super(ownerId, "Fiery Hellhound", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "M10"; + this.subtype.add("Elemental"); + this.subtype.add("Hound"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public FieryHellhound(final FieryHellhound card) { + super(card); + } + + @Override + public FieryHellhound copy() { + return new FieryHellhound(this); + } + + @Override + public String getArt() { + return "121662_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Fireball.java b/Mage.Sets/src/mage/sets/magic2010/Fireball.java new file mode 100644 index 0000000000..44cbe0fbe8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Fireball.java @@ -0,0 +1,123 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Fireball extends CardImpl { + + public Fireball(UUID ownerId) { + super(ownerId, "Fireball", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{R}"); + this.expansionSetCode = "M10"; + this.color.setRed(true); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(0, 0)); + this.getSpellAbility().addEffect(new FireballEffect()); + } + + @Override + public void adjustCosts(Ability ability, Game game) { + int numTargets = ability.getTargets().get(0).getNumberOfTargets(); + if (numTargets > 1) { + ability.getManaCosts().add(new GenericManaCost(numTargets - 1)); + } + } + + public Fireball(final Fireball card) { + super(card); + } + + @Override + public Fireball copy() { + return new Fireball(this); + } + + @Override + public String getArt() { + return "52012_typ_reg_sty_010.jpg"; + } +} + +class FireballEffect extends OneShotEffect { + + public FireballEffect() { + super(Outcome.Damage); + } + + public FireballEffect(final FireballEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + int numTargets = source.getTargets().get(0).getNumberOfTargets(); + int damage = source.getManaCosts().getVariableCosts().get(0).getAmount(); + int damagePer = damage/numTargets; + if (damagePer > 0) { + for (UUID targetId: source.getTargets().get(0).getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + permanent.damage(damagePer, source.getSourceId(), game, true); + } + else { + Player player = game.getPlayer(targetId); + if (player != null) { + player.damage(damagePer, source.getSourceId(), game, false, true); + } + } + } + return true; + } + return false; + } + + @Override + public FireballEffect copy() { + return new FireballEffect(this); + } + + @Override + public String getText(Ability source) { + return "Fireball deals X damage divided evenly, rounded down, among any number of target creatures and/or players.\n Fireball costs {1} more to cast for each target beyond the first."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/Flashfreeze.java b/Mage.Sets/src/mage/sets/magic2010/Flashfreeze.java index cd652f1e9c..3968a1a76f 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Flashfreeze.java +++ b/Mage.Sets/src/mage/sets/magic2010/Flashfreeze.java @@ -29,49 +29,16 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.Constants.CardType; -import mage.abilities.effects.common.CounterTargetEffect; -import mage.cards.CardImpl; -import mage.filter.Filter.ComparisonScope; -import mage.filter.FilterSpell; -import mage.sets.Magic2010; -import mage.target.TargetSpell; /** * * @author BetaSteward_at_googlemail.com */ -public class Flashfreeze extends CardImpl { - - private static FilterSpell filter = new FilterSpell("red or green spell"); - - static { - filter.getColor().setRed(true); - filter.getColor().setGreen(true); - filter.setScopeColor(ComparisonScope.Any); - filter.setUseColor(true); - } +public class Flashfreeze extends mage.sets.tenth.Flashfreeze { public Flashfreeze(UUID ownerId) { - super(ownerId, "Flashfreeze", new CardType[]{CardType.INSTANT}, "{1}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.color.setBlue(true); - this.getSpellAbility().addTarget(new TargetSpell(filter)); - this.getSpellAbility().addEffect(new CounterTargetEffect()); + super(ownerId); + this.expansionSetCode = "M10"; } - public Flashfreeze(final Flashfreeze card) { - super(card); - } - - @Override - public Flashfreeze copy() { - return new Flashfreeze(this); - } - - @Override - public String getArt() { - return "96954_typ_reg_sty_010.jpg"; - } - -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/Fog.java b/Mage.Sets/src/mage/sets/magic2010/Fog.java new file mode 100644 index 0000000000..775113f49b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Fog.java @@ -0,0 +1,65 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.PreventAllCombatDamageEffect; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Fog extends CardImpl { + + public Fog(UUID ownerId) { + super(ownerId, "Fog", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "M10"; + this.color.setGreen(true); + this.getSpellAbility().addEffect(new PreventAllCombatDamageEffect(Duration.EndOfTurn)); + } + + public Fog(final Fog card) { + super(card); + } + + @Override + public Fog copy() { + return new Fog(this); + } + + @Override + public String getArt() { + return "02368_typ_reg_sty_001.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Forest1.java b/Mage.Sets/src/mage/sets/magic2010/Forest1.java new file mode 100644 index 0000000000..b392967629 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Forest1.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "06769_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Forest2.java b/Mage.Sets/src/mage/sets/magic2010/Forest2.java new file mode 100644 index 0000000000..db237353b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Forest2.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "121707_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Forest3.java b/Mage.Sets/src/mage/sets/magic2010/Forest3.java new file mode 100644 index 0000000000..b6666b1334 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Forest3.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "25501_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Forest4.java b/Mage.Sets/src/mage/sets/magic2010/Forest4.java new file mode 100644 index 0000000000..3ff274185b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Forest4.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "121708_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/GargoyleCastle.java b/Mage.Sets/src/mage/sets/magic2010/GargoyleCastle.java index 00d4955be6..8bb790d5e1 100644 --- a/Mage.Sets/src/mage/sets/magic2010/GargoyleCastle.java +++ b/Mage.Sets/src/mage/sets/magic2010/GargoyleCastle.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.ActivatedAbilityImpl; @@ -41,7 +42,6 @@ import mage.abilities.keyword.FlyingAbility; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Magic2010; /** * @@ -50,8 +50,8 @@ import mage.sets.Magic2010; public class GargoyleCastle extends CardImpl { public GargoyleCastle(UUID ownerId) { - super(ownerId, "Gargoyle Castle", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Gargoyle Castle", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "M10"; this.addAbility(new ColorlessManaAbility()); this.addAbility(new GargoyleCastleAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/GarrukWildspeaker.java b/Mage.Sets/src/mage/sets/magic2010/GarrukWildspeaker.java index 7443f5e286..9451cc7059 100644 --- a/Mage.Sets/src/mage/sets/magic2010/GarrukWildspeaker.java +++ b/Mage.Sets/src/mage/sets/magic2010/GarrukWildspeaker.java @@ -31,6 +31,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.MageInt; import mage.abilities.LoyaltyAbility; @@ -43,7 +44,6 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; import mage.game.permanent.token.BeastToken; -import mage.sets.Magic2010; import mage.target.common.TargetLandPermanent; /** @@ -55,8 +55,8 @@ public class GarrukWildspeaker extends CardImpl { private static BeastToken beastToken = new BeastToken(); public GarrukWildspeaker(UUID ownerId) { - super(ownerId, "Garruk Wildspeaker", new CardType[]{CardType.PLANESWALKER}, "{2}{G}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Garruk Wildspeaker", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{G}{G}"); + this.expansionSetCode = "M10"; this.subtype.add("Garruk"); this.color.setGreen(true); this.loyalty = new MageInt(3); @@ -69,7 +69,7 @@ public class GarrukWildspeaker extends CardImpl { Effects effects1 = new Effects(); effects1.add(new BoostControlledEffect(3, 3, Duration.EndOfTurn)); - effects1.add(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent())); + effects1.add(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, FilterCreaturePermanent.getDefault())); this.addAbility(new LoyaltyAbility(effects1, -4)); } diff --git a/Mage.Sets/src/mage/sets/magic2010/GiantGrowth.java b/Mage.Sets/src/mage/sets/magic2010/GiantGrowth.java index 6aa16ebe34..b575d7907f 100644 --- a/Mage.Sets/src/mage/sets/magic2010/GiantGrowth.java +++ b/Mage.Sets/src/mage/sets/magic2010/GiantGrowth.java @@ -29,39 +29,16 @@ package mage.sets.magic2010; import java.util.UUID; -import mage.Constants.CardType; -import mage.Constants.Duration; -import mage.abilities.effects.common.BoostTargetEffect; -import mage.cards.CardImpl; -import mage.sets.Magic2010; -import mage.target.common.TargetCreaturePermanent; /** * * @author BetaSteward_at_googlemail.com */ -public class GiantGrowth extends CardImpl { +public class GiantGrowth extends mage.sets.tenth.GiantGrowth { public GiantGrowth(UUID ownerId) { - super(ownerId, "Giant Growth", new CardType[]{CardType.INSTANT}, "{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); - this.color.setGreen(true); - this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn)); + super(ownerId); + this.expansionSetCode = "M10"; } - public GiantGrowth(final GiantGrowth card) { - super(card); - } - - @Override - public GiantGrowth copy() { - return new GiantGrowth(this); - } - - @Override - public String getArt() { - return "101059_typ_reg_sty_010.jpg"; - } - -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/GiantSpider.java b/Mage.Sets/src/mage/sets/magic2010/GiantSpider.java new file mode 100644 index 0000000000..13cb84bbb3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/GiantSpider.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GiantSpider extends mage.sets.tenth.GiantSpider { + + public GiantSpider(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java b/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java index 3dbe50bcf2..a28bd186e4 100644 --- a/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java +++ b/Mage.Sets/src/mage/sets/magic2010/GlacialFortress.java @@ -30,14 +30,14 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldStaticAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedUnlessControlsEffect; +import mage.abilities.effects.common.TapSourceUnlessControlsEffect; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.common.FilterLandPermanent; -import mage.sets.Magic2010; /** * @@ -55,9 +55,9 @@ public class GlacialFortress extends CardImpl { } public GlacialFortress(UUID ownerId) { - super(ownerId, "Glacial Fortress", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Magic2010.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedUnlessControlsEffect(filter))); + super(ownerId, "Glacial Fortress", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "M10"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceUnlessControlsEffect(filter), "tapped unless you control a " + filter.getMessage())); this.addAbility(new BlueManaAbility()); this.addAbility(new WhiteManaAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/GoblinChieftain.java b/Mage.Sets/src/mage/sets/magic2010/GoblinChieftain.java new file mode 100644 index 0000000000..aefcc18bd3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/GoblinChieftain.java @@ -0,0 +1,83 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.BoostControlledEffect; +import mage.abilities.effects.common.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinChieftain extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creatures"); + + static { + filter.getSubtype().add("Goblin"); + } + + public GoblinChieftain(UUID ownerId) { + super(ownerId, "Goblin Chieftain", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Goblin"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(HasteAbility.getInstance()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + } + + public GoblinChieftain(final GoblinChieftain card) { + super(card); + } + + @Override + public GoblinChieftain copy() { + return new GoblinChieftain(this); + } + + @Override + public String getArt() { + return "121632_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/GoblinPiker.java b/Mage.Sets/src/mage/sets/magic2010/GoblinPiker.java new file mode 100644 index 0000000000..383d27b9cf --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/GoblinPiker.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinPiker extends mage.sets.tenth.GoblinPiker { + + public GoblinPiker(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/Gravedigger.java b/Mage.Sets/src/mage/sets/magic2010/Gravedigger.java new file mode 100644 index 0000000000..6cd5450b00 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Gravedigger.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Gravedigger extends mage.sets.tenth.Gravedigger { + + public Gravedigger(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/GreatSableStag.java b/Mage.Sets/src/mage/sets/magic2010/GreatSableStag.java index 9d656ab802..d759f7335d 100644 --- a/Mage.Sets/src/mage/sets/magic2010/GreatSableStag.java +++ b/Mage.Sets/src/mage/sets/magic2010/GreatSableStag.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; @@ -37,7 +38,6 @@ import mage.abilities.effects.common.CantCounterSourceEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.filter.FilterCard; -import mage.sets.Magic2010; /** * @@ -46,8 +46,8 @@ import mage.sets.Magic2010; public class GreatSableStag extends CardImpl { public GreatSableStag(UUID ownerId) { - super(ownerId, "Great Sable Stag", new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Great Sable Stag", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); + this.expansionSetCode = "M10"; this.subtype.add("Elk"); this.color.setGreen(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/magic2010/HauntingEchoes.java b/Mage.Sets/src/mage/sets/magic2010/HauntingEchoes.java new file mode 100644 index 0000000000..ca8ddb1d5e --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/HauntingEchoes.java @@ -0,0 +1,123 @@ +/* + * 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.magic2010; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardsImpl; +import mage.filter.common.FilterBasicLandCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HauntingEchoes extends CardImpl { + + public HauntingEchoes(UUID ownerId) { + super(ownerId, "Haunting Echoes", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "M10"; + this.color.setBlack(true); + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new HauntingEchoesEffect()); + } + + public HauntingEchoes(final HauntingEchoes card) { + super(card); + } + + @Override + public HauntingEchoes copy() { + return new HauntingEchoes(this); + } + + @Override + public String getArt() { + return "122152_typ_reg_sty_010.jpg"; + } +} + +class HauntingEchoesEffect extends OneShotEffect { + + private static FilterBasicLandCard filter = new FilterBasicLandCard(); + + public HauntingEchoesEffect() { + super(Outcome.Detriment); + } + + public HauntingEchoesEffect(final HauntingEchoesEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getFirstTarget()); + Set remove = new HashSet(); + for (Iterator i = player.getGraveyard().iterator(); i.hasNext();) { + Card card = game.getCard(i.next()); + if (!filter.match(card)) { + i.remove(); + game.getExile().add(card); + for (UUID cardId: player.getLibrary().getCardList()) { + if (game.getCard(cardId).getName().equals(card.getName())) { + remove.add(cardId); + } + } + } + } + for (UUID cardId: remove) { + game.getExile().add(player.getLibrary().remove(cardId, game)); + } + game.getPlayer(source.getControllerId()).lookAtCards(new CardsImpl(Zone.PICK, player.getLibrary().getCards(game)), game); + player.shuffleLibrary(game); + return true; + } + + @Override + public HauntingEchoesEffect copy() { + return new HauntingEchoesEffect(this); + } + + @Override + public String getText(Ability source) { + return "Exile all cards from target player's graveyard other than basic land cards. For each card exiled this way, search that player's library for all cards with the same name as that card and exile them. Then that player shuffles his or her library"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/HolyStrength.java b/Mage.Sets/src/mage/sets/magic2010/HolyStrength.java new file mode 100644 index 0000000000..c9fd85f0f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/HolyStrength.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HolyStrength extends mage.sets.tenth.HolyStrength { + + public HolyStrength(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/HonorOfThePure.java b/Mage.Sets/src/mage/sets/magic2010/HonorOfThePure.java index b113b1eb6a..a69ee772c9 100644 --- a/Mage.Sets/src/mage/sets/magic2010/HonorOfThePure.java +++ b/Mage.Sets/src/mage/sets/magic2010/HonorOfThePure.java @@ -31,12 +31,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.BoostControlledEffect; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.Magic2010; /** * @@ -52,10 +52,10 @@ public class HonorOfThePure extends CardImpl { } public HonorOfThePure(UUID ownerId) { - super(ownerId, "Honor of the Pure", new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Honor of the Pure", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "M10"; this.color.setWhite(true); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); } public HonorOfThePure(final HonorOfThePure card) { diff --git a/Mage.Sets/src/mage/sets/magic2010/HowlingBanshee.java b/Mage.Sets/src/mage/sets/magic2010/HowlingBanshee.java new file mode 100644 index 0000000000..66c6aacaa7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/HowlingBanshee.java @@ -0,0 +1,107 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HowlingBanshee extends CardImpl { + + public HowlingBanshee(UUID ownerId) { + super(ownerId, "Howling Banshee", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "M10"; + this.subtype.add("Spirit"); + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new EntersBattlefieldTriggeredAbility(new HowlingBansheeEffect(), false)); + } + + public HowlingBanshee(final HowlingBanshee card) { + super(card); + } + + @Override + public HowlingBanshee copy() { + return new HowlingBanshee(this); + } + + @Override + public String getArt() { + return "121627_typ_reg_sty_010.jpg"; + } + +} + +class HowlingBansheeEffect extends OneShotEffect { + + public HowlingBansheeEffect() { + super(Outcome.Damage); + } + + public HowlingBansheeEffect(final HowlingBansheeEffect effect) { + super(effect); + } + + @Override + public HowlingBansheeEffect copy() { + return new HowlingBansheeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Player player: game.getPlayers().values()) { + player.loseLife(3, game); + } + return true; + } + + @Override + public String getText(Ability source) { + return "When Howling Banshee enters the battlefield, each player loses 3 life"; + } + + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/HowlingMine.java b/Mage.Sets/src/mage/sets/magic2010/HowlingMine.java index caf2f243d7..379c352ab4 100644 --- a/Mage.Sets/src/mage/sets/magic2010/HowlingMine.java +++ b/Mage.Sets/src/mage/sets/magic2010/HowlingMine.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.DrawCardTargetEffect; @@ -37,7 +38,6 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.sets.Magic2010; import mage.target.TargetPlayer; /** @@ -47,8 +47,8 @@ import mage.target.TargetPlayer; public class HowlingMine extends CardImpl { public HowlingMine(UUID ownerId) { - super(ownerId, "Howling Mine", new CardType[]{CardType.ARTIFACT}, "{2}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Howling Mine", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "M10"; this.addAbility(new HowlingMineAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/IceCage.java b/Mage.Sets/src/mage/sets/magic2010/IceCage.java new file mode 100644 index 0000000000..e092ca7720 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/IceCage.java @@ -0,0 +1,165 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DestroySourceEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class IceCage extends CardImpl { + + public IceCage(UUID ownerId) { + super(ownerId, "Ice Cage", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "M10"; + this.color.setBlue(true); + this.subtype.add("Aura"); + + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + Ability ability = new EnchantAbility(Outcome.Detriment, auraTarget); + this.addAbility(ability); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new IceCageEffect())); + this.addAbility(new IceCageAbility()); + } + + public IceCage(final IceCage card) { + super(card); + } + + @Override + public IceCage copy() { + return new IceCage(this); + } + + @Override + public String getArt() { + return "121586_typ_reg_sty_010.jpg"; + } +} + +class IceCageEffect extends ReplacementEffectImpl { + + public IceCageEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + } + + public IceCageEffect(final IceCageEffect effect) { + super(effect); + } + + @Override + public IceCageEffect copy() { + return new IceCageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + if (source.getSourceId().equals(enchantment.getAttachedTo())) { + if (event.getType() == EventType.DECLARE_ATTACKER || event.getType() == EventType.DECLARE_BLOCKER || event.getType() == EventType.ACTIVATE_ABILITY) { + return true; + } + } + } + return false; + } + + @Override + public String getText(Ability source) { + return "Enchanted creature can't attack or block, and its activated abilities can't be activated"; + } + +} + +class IceCageAbility extends TriggeredAbilityImpl { + + public IceCageAbility() { + super(Zone.BATTLEFIELD, new DestroySourceEffect()); + } + + public IceCageAbility(final IceCageAbility ability) { + super(ability); + } + + @Override + public IceCageAbility copy() { + return new IceCageAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent enchantment = game.getPermanent(sourceId); + if (enchantment != null && enchantment.getAttachedTo() != null) { + if (event.getTargetId().equals(enchantment.getAttachedTo()) && event.getType() == EventType.TARGETED) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "When enchanted creature becomes the target of a spell or ability, destroy Ice Cage"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Island1.java b/Mage.Sets/src/mage/sets/magic2010/Island1.java new file mode 100644 index 0000000000..e09dbdffae --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Island1.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "121700_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Island2.java b/Mage.Sets/src/mage/sets/magic2010/Island2.java new file mode 100644 index 0000000000..2d77847f63 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Island2.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "121687_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Island3.java b/Mage.Sets/src/mage/sets/magic2010/Island3.java new file mode 100644 index 0000000000..ee2a34bda6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Island3.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "25162_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Island4.java b/Mage.Sets/src/mage/sets/magic2010/Island4.java new file mode 100644 index 0000000000..0eba977e59 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/Island4.java @@ -0,0 +1,49 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + + @Override + public String getArt() { + return "19006_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/JaceBeleren.java b/Mage.Sets/src/mage/sets/magic2010/JaceBeleren.java index f0222422f6..88ee8aa665 100644 --- a/Mage.Sets/src/mage/sets/magic2010/JaceBeleren.java +++ b/Mage.Sets/src/mage/sets/magic2010/JaceBeleren.java @@ -30,13 +30,13 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.LoyaltyAbility; import mage.abilities.effects.common.DrawCardAllEffect; import mage.abilities.effects.common.DrawCardTargetEffect; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.TargetPlayer; /** @@ -46,8 +46,8 @@ import mage.target.TargetPlayer; public class JaceBeleren extends CardImpl { public JaceBeleren(UUID ownerId) { - super(ownerId, "Jace Beleren", new CardType[]{CardType.PLANESWALKER}, "{1}{U}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Jace Beleren", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{1}{U}{U}"); + this.expansionSetCode = "M10"; this.subtype.add("Jace"); this.color.setBlue(true); this.loyalty = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/magic2010/KrakensEye.java b/Mage.Sets/src/mage/sets/magic2010/KrakensEye.java new file mode 100644 index 0000000000..0914c20a10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/KrakensEye.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class KrakensEye extends mage.sets.tenth.KrakensEye { + + public KrakensEye(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/LavaAxe.java b/Mage.Sets/src/mage/sets/magic2010/LavaAxe.java new file mode 100644 index 0000000000..3a9804c295 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/LavaAxe.java @@ -0,0 +1,44 @@ +/* + * 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.magic2010; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class LavaAxe extends mage.sets.tenth.LavaAxe { + + public LavaAxe(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M10"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2010/LightningBolt.java b/Mage.Sets/src/mage/sets/magic2010/LightningBolt.java index 4cc5a2177b..7c703c3e95 100644 --- a/Mage.Sets/src/mage/sets/magic2010/LightningBolt.java +++ b/Mage.Sets/src/mage/sets/magic2010/LightningBolt.java @@ -30,9 +30,9 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.common.TargetCreatureOrPlayer; /** @@ -42,8 +42,8 @@ import mage.target.common.TargetCreatureOrPlayer; public class LightningBolt extends CardImpl { public LightningBolt(UUID ownerId) { - super(ownerId, "Lightning Bolt", new CardType[]{CardType.INSTANT}, "{R}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Lightning Bolt", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "M10"; this.color.setRed(true); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); diff --git a/Mage.Sets/src/mage/sets/magic2010/LlanowarElves.java b/Mage.Sets/src/mage/sets/magic2010/LlanowarElves.java index 49a1d65999..96cc1fb079 100644 --- a/Mage.Sets/src/mage/sets/magic2010/LlanowarElves.java +++ b/Mage.Sets/src/mage/sets/magic2010/LlanowarElves.java @@ -30,10 +30,10 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; -import mage.sets.Magic2010; /** * @@ -42,8 +42,8 @@ import mage.sets.Magic2010; public class LlanowarElves extends CardImpl { public LlanowarElves(UUID ownerId) { - super(ownerId, "Llanowar Elves", new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Llanowar Elves", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "M10"; this.subtype.add("Elf"); this.subtype.add("Druid"); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java b/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java index c63147d2a9..35f6cd4a45 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java +++ b/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; @@ -48,7 +49,6 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.permanent.token.WolfToken; import mage.players.Player; -import mage.sets.Magic2010; import mage.target.common.TargetCreaturePermanent; /** @@ -60,8 +60,8 @@ public class MasterOfTheWildHunt extends CardImpl { private static WolfToken wolfToken = new WolfToken(); public MasterOfTheWildHunt(UUID ownerId) { - super(ownerId, "Master of the Wild Hunt", new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Master of the Wild Hunt", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "M10"; this.subtype.add("Human"); this.subtype.add("Shaman"); this.color.setGreen(true); @@ -119,7 +119,7 @@ class MasterOfTheWildHuntEffect extends OneShotEffect if (target != null) { for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId())) { permanent.tap(game); - target.damage(permanent.getToughness().getValue(), permanent.getId(), game); + target.damage(permanent.getToughness().getValue(), permanent.getId(), game, true); } Player player = game.getPlayer(target.getControllerId()); player.assignDamage(target.getPower().getValue(), wolves, target.getId(), game); diff --git a/Mage.Sets/src/mage/sets/magic2010/MightOfOaks.java b/Mage.Sets/src/mage/sets/magic2010/MightOfOaks.java index 597a5f9a32..0c7f680161 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MightOfOaks.java +++ b/Mage.Sets/src/mage/sets/magic2010/MightOfOaks.java @@ -31,9 +31,9 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.abilities.effects.common.BoostTargetEffect; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.common.TargetCreaturePermanent; /** @@ -43,8 +43,8 @@ import mage.target.common.TargetCreaturePermanent; public class MightOfOaks extends CardImpl { public MightOfOaks(UUID onwerId){ - super(onwerId, "Might of Oaks", new CardType[]{CardType.INSTANT},"{3}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(onwerId, "Might of Oaks", Rarity.RARE, new CardType[]{CardType.INSTANT},"{3}{G}"); + this.expansionSetCode = "M10"; this.color.setGreen(true); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new BoostTargetEffect(7, 7, Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/sets/magic2010/MindRot.java b/Mage.Sets/src/mage/sets/magic2010/MindRot.java index 3ec9a218a0..22a115313b 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MindRot.java +++ b/Mage.Sets/src/mage/sets/magic2010/MindRot.java @@ -30,9 +30,9 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DiscardTargetEffect; import mage.cards.CardImpl; -import mage.sets.Magic2010; import mage.target.TargetPlayer; /** @@ -42,8 +42,8 @@ import mage.target.TargetPlayer; public class MindRot extends CardImpl { public MindRot(UUID onwerId){ - super(onwerId, "Mind Rot", new CardType[]{CardType.SORCERY},"{2}{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(onwerId, "Mind Rot", Rarity.COMMON, new CardType[]{CardType.SORCERY},"{2}{B}"); + this.expansionSetCode = "M10"; this.color.setBlack(true); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); diff --git a/Mage.Sets/src/mage/sets/magic2010/MindSpring.java b/Mage.Sets/src/mage/sets/magic2010/MindSpring.java index d3a060f875..7679af4262 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MindSpring.java +++ b/Mage.Sets/src/mage/sets/magic2010/MindSpring.java @@ -31,12 +31,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.game.Game; import mage.players.Player; -import mage.sets.Magic2010; /** * @@ -45,8 +45,8 @@ import mage.sets.Magic2010; public class MindSpring extends CardImpl { public MindSpring(UUID ownerId) { - super(ownerId, "Mind Spring", new CardType[]{CardType.SORCERY}, "{X}{U}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Mind Spring", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{U}{U}"); + this.expansionSetCode = "M10"; this.color.setBlue(true); this.getSpellAbility().addEffect(new MindSpringEffect()); } @@ -84,7 +84,7 @@ class MindSpringEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - int amount = source.getManaCosts().getVariableCosts().get(0).getValue(); + int amount = source.getCosts().getVariableCosts().get(0).getAmount(); Player player = game.getPlayer(source.getControllerId()); if (player != null) { player.drawCards(amount, game); diff --git a/Mage.Sets/src/mage/sets/magic2010/Naturalize.java b/Mage.Sets/src/mage/sets/magic2010/Naturalize.java index 4bbfdd39d7..8252c0f4b9 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Naturalize.java +++ b/Mage.Sets/src/mage/sets/magic2010/Naturalize.java @@ -30,12 +30,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.FilterPermanent; -import mage.sets.Magic2010; import mage.target.TargetPermanent; /** @@ -53,8 +53,8 @@ public class Naturalize extends CardImpl { } public Naturalize(UUID onwerId){ - super(onwerId, "Naturalize", new CardType[]{CardType.INSTANT},"{1}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(onwerId, "Naturalize", Rarity.COMMON, new CardType[]{CardType.INSTANT},"{1}{G}"); + this.expansionSetCode = "M10"; this.color.setGreen(true); this.getSpellAbility().addTarget(new TargetPermanent(filter, TargetController.ANY)); this.getSpellAbility().addEffect(new DestroyTargetEffect()); diff --git a/Mage.Sets/src/mage/sets/magic2010/Negate.java b/Mage.Sets/src/mage/sets/magic2010/Negate.java index 9695821bfb..fa6e4ad60c 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Negate.java +++ b/Mage.Sets/src/mage/sets/magic2010/Negate.java @@ -30,10 +30,10 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.filter.FilterSpell; -import mage.sets.Magic2010; import mage.target.TargetSpell; /** @@ -50,8 +50,8 @@ public class Negate extends CardImpl { } public Negate(UUID ownerId) { - super(ownerId, "Negate", new CardType[]{CardType.INSTANT}, "{1}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Negate", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "M10"; this.color.setBlue(true); this.getSpellAbility().addTarget(new TargetSpell(filter)); this.getSpellAbility().addEffect(new CounterTargetEffect()); diff --git a/Mage.Sets/src/mage/sets/magic2010/Overrun.java b/Mage.Sets/src/mage/sets/magic2010/Overrun.java index d869c5b871..fa49f714fb 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Overrun.java +++ b/Mage.Sets/src/mage/sets/magic2010/Overrun.java @@ -31,12 +31,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.abilities.effects.common.BoostControlledEffect; import mage.abilities.effects.common.GainAbilityControlledEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.Magic2010; /** * @@ -45,12 +45,12 @@ import mage.sets.Magic2010; public class Overrun extends CardImpl { public Overrun(UUID onwerId) { - super(onwerId, "Overrun", new CardType[]{CardType.SORCERY},"{2}{G}{G}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(onwerId, "Overrun", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY},"{2}{G}{G}{G}"); + this.expansionSetCode = "M10"; this.color.setGreen(true); this.getSpellAbility().addEffect(new BoostControlledEffect(3, 3, Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent())); + this.getSpellAbility().addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, FilterCreaturePermanent.getDefault())); } public Overrun(final Overrun card) { diff --git a/Mage.Sets/src/mage/sets/magic2010/RampantGrowth.java b/Mage.Sets/src/mage/sets/magic2010/RampantGrowth.java index 7eb8ef542f..2aa51b9ce2 100644 --- a/Mage.Sets/src/mage/sets/magic2010/RampantGrowth.java +++ b/Mage.Sets/src/mage/sets/magic2010/RampantGrowth.java @@ -30,10 +30,10 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.filter.common.FilterBasicLandCard; -import mage.sets.Magic2010; import mage.target.common.TargetCardInLibrary; /** @@ -43,8 +43,8 @@ import mage.target.common.TargetCardInLibrary; public class RampantGrowth extends CardImpl { public RampantGrowth(UUID ownerId){ - super(ownerId, "Rampant Growth", new CardType[]{CardType.SORCERY}, "{1}{G}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Rampant Growth", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}"); + this.expansionSetCode = "M10"; this.color.setGreen(true); TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); this.getSpellAbility().addTarget(target); diff --git a/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java b/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java index d9dbdd67b7..bfd0f0d5bc 100644 --- a/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java +++ b/Mage.Sets/src/mage/sets/magic2010/RootboundCrag.java @@ -30,14 +30,14 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldStaticAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedUnlessControlsEffect; +import mage.abilities.effects.common.TapSourceUnlessControlsEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.common.FilterLandPermanent; -import mage.sets.Magic2010; /** * @@ -55,9 +55,9 @@ public class RootboundCrag extends CardImpl { } public RootboundCrag(UUID ownerId) { - super(ownerId, "Rootbound Crag", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Magic2010.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedUnlessControlsEffect(filter))); + super(ownerId, "Rootbound Crag", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "M10"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceUnlessControlsEffect(filter), "tapped unless you control a " + filter.getMessage())); this.addAbility(new RedManaAbility()); this.addAbility(new GreenManaAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/RoyalAssassin.java b/Mage.Sets/src/mage/sets/magic2010/RoyalAssassin.java index c4da00da4e..2e799f7601 100644 --- a/Mage.Sets/src/mage/sets/magic2010/RoyalAssassin.java +++ b/Mage.Sets/src/mage/sets/magic2010/RoyalAssassin.java @@ -30,6 +30,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.Constants.Zone; import mage.MageInt; @@ -39,7 +40,6 @@ import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.Magic2010; import mage.target.common.TargetCreaturePermanent; /** @@ -49,8 +49,8 @@ import mage.target.common.TargetCreaturePermanent; public class RoyalAssassin extends CardImpl { public RoyalAssassin(UUID onwerId){ - super(onwerId,"Royal Assassin", new CardType[]{CardType.CREATURE},"{1}{B}{B}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(onwerId,"Royal Assassin", Rarity.RARE, new CardType[]{CardType.CREATURE},"{1}{B}{B}"); + this.expansionSetCode = "M10"; this.color.setBlack(true); this.subtype.add("Human"); this.subtype.add("Assassin"); @@ -87,7 +87,7 @@ class RoyalAssassinAbility extends ActivatedAbilityImpl { public RoyalAssassinAbility(){ super(Zone.BATTLEFIELD, null); - addTarget(new TargetCreaturePermanent(1,1,filter, TargetController.ANY)); + addTarget(new TargetCreaturePermanent(1, 1, filter, TargetController.ANY, false)); addCost(new TapSourceCost()); addEffect(new DestroyTargetEffect()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/SafePassage.java b/Mage.Sets/src/mage/sets/magic2010/SafePassage.java index 90d1cb025d..611aa71df8 100644 --- a/Mage.Sets/src/mage/sets/magic2010/SafePassage.java +++ b/Mage.Sets/src/mage/sets/magic2010/SafePassage.java @@ -31,10 +31,10 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.abilities.effects.common.PreventAllDamageToEffect; import mage.cards.CardImpl; import mage.filter.common.FilterCreatureOrPlayer; -import mage.sets.Magic2010; /** * @@ -43,8 +43,8 @@ import mage.sets.Magic2010; public class SafePassage extends CardImpl { public SafePassage(UUID ownerId) { - super(ownerId, "Safe Passage", new CardType[]{CardType.INSTANT}, "{2}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Safe Passage", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{W}"); + this.expansionSetCode = "M10"; this.color.setWhite(true); this.getSpellAbility().addEffect(new PreventAllDamageToEffect(Duration.EndOfTurn, new FilterCreatureOrPlayer("you and creatures you control", ownerId))); } diff --git a/Mage.Sets/src/mage/sets/magic2010/SoulWarden.java b/Mage.Sets/src/mage/sets/magic2010/SoulWarden.java new file mode 100644 index 0000000000..9497e989b9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2010/SoulWarden.java @@ -0,0 +1,110 @@ +/* + * 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.magic2010; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class SoulWarden extends CardImpl { + + public SoulWarden(UUID ownerId) { + super(ownerId, "Soul Warden", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "M10"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(new SoulWardenAbility()); + } + + public SoulWarden(final SoulWarden card) { + super(card); + } + + @Override + public SoulWarden copy() { + return new SoulWarden(this); + } + + @Override + public String getArt() { + return "05621_typ_reg_sty_010.jpg"; + } + +} + +class SoulWardenAbility extends TriggeredAbilityImpl { + + public SoulWardenAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(1)); + } + + public SoulWardenAbility(final SoulWardenAbility ability) { + super(ability); + } + + @Override + public SoulWardenAbility copy() { + return new SoulWardenAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).getToZone() == Zone.BATTLEFIELD) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent.getCardType().contains(CardType.CREATURE) && !permanent.getId().equals(this.getSourceId())) { + trigger(game, this.controllerId); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever another creature enters the battlefield, " + super.getRule(); + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java b/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java index b3c6b3181e..36e37b9915 100644 --- a/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java +++ b/Mage.Sets/src/mage/sets/magic2010/SunpetalGrove.java @@ -30,14 +30,14 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldStaticAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedUnlessControlsEffect; +import mage.abilities.effects.common.TapSourceUnlessControlsEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.common.FilterLandPermanent; -import mage.sets.Magic2010; /** * @@ -55,9 +55,9 @@ public class SunpetalGrove extends CardImpl { } public SunpetalGrove(UUID ownerId) { - super(ownerId, "Sunpetal Grove", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Magic2010.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedUnlessControlsEffect(filter))); + super(ownerId, "Sunpetal Grove", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "M10"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceUnlessControlsEffect(filter), "tapped unless you control a " + filter.getMessage())); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/TerramorphicExpanse.java b/Mage.Sets/src/mage/sets/magic2010/TerramorphicExpanse.java index 58e15b7d9d..d5d8ac3828 100644 --- a/Mage.Sets/src/mage/sets/magic2010/TerramorphicExpanse.java +++ b/Mage.Sets/src/mage/sets/magic2010/TerramorphicExpanse.java @@ -31,6 +31,7 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,7 +39,6 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.filter.common.FilterBasicLandCard; -import mage.sets.Magic2010; import mage.target.common.TargetCardInLibrary; /** @@ -48,9 +48,8 @@ import mage.target.common.TargetCardInLibrary; public class TerramorphicExpanse extends CardImpl { public TerramorphicExpanse(UUID ownerId) { - super(ownerId, "Terramorphic Expanse", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Magic2010.getInstance().getId(); -// this.art = "97502_typ_reg_sty_010.jpg"; + super(ownerId, "Terramorphic Expanse", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "M10"; this.addAbility(new TerramorphicExpanseAbility()); } diff --git a/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java b/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java index 982f9a35ec..534c6c88a3 100644 --- a/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java +++ b/Mage.Sets/src/mage/sets/magic2010/TimeWarp.java @@ -31,12 +31,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.game.Game; import mage.game.turn.TurnMod; -import mage.sets.Magic2010; import mage.target.TargetPlayer; /** @@ -46,8 +46,8 @@ import mage.target.TargetPlayer; public class TimeWarp extends CardImpl { public TimeWarp(UUID ownerId) { - super(ownerId, "Time Warp", new CardType[]{CardType.SORCERY}, "{3}{U}{U}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "Time Warp", Rarity.MYTHIC, new CardType[]{CardType.SORCERY}, "{3}{U}{U}"); + this.expansionSetCode = "M10"; this.color.setBlue(true); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new TimeWarpEffect()); diff --git a/Mage.Sets/src/mage/sets/magic2010/WhiteKnight.java b/Mage.Sets/src/mage/sets/magic2010/WhiteKnight.java index 9626bbca12..e2556395cf 100644 --- a/Mage.Sets/src/mage/sets/magic2010/WhiteKnight.java +++ b/Mage.Sets/src/mage/sets/magic2010/WhiteKnight.java @@ -30,12 +30,12 @@ package mage.sets.magic2010; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.filter.FilterCard; -import mage.sets.Magic2010; /** * @@ -44,8 +44,8 @@ import mage.sets.Magic2010; public class WhiteKnight extends CardImpl { public WhiteKnight(UUID ownerId) { - super(ownerId, "White Knight", new CardType[]{CardType.CREATURE}, "{W}{W}"); - this.expansionSetId = Magic2010.getInstance().getId(); + super(ownerId, "White Knight", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}{W}"); + this.expansionSetCode = "M10"; this.subtype.add("Human"); this.subtype.add("Knight"); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/sets/magic2011/AcidicSlime.java b/Mage.Sets/src/mage/sets/magic2011/AcidicSlime.java index 26000c0197..003fd09f3d 100644 --- a/Mage.Sets/src/mage/sets/magic2011/AcidicSlime.java +++ b/Mage.Sets/src/mage/sets/magic2011/AcidicSlime.java @@ -29,7 +29,6 @@ package mage.sets.magic2011; import java.util.UUID; -import mage.sets.Magic2011; /** * @@ -39,7 +38,7 @@ public class AcidicSlime extends mage.sets.magic2010.AcidicSlime { public AcidicSlime(UUID ownerId) { super(ownerId); - this.expansionSetId = Magic2011.getInstance().getId(); + this.expansionSetCode = "M11"; } } diff --git a/Mage.Sets/src/mage/sets/magic2011/ActOfTreason.java b/Mage.Sets/src/mage/sets/magic2011/ActOfTreason.java index b8491b2450..ebb1589fdb 100644 --- a/Mage.Sets/src/mage/sets/magic2011/ActOfTreason.java +++ b/Mage.Sets/src/mage/sets/magic2011/ActOfTreason.java @@ -29,7 +29,6 @@ package mage.sets.magic2011; import java.util.UUID; -import mage.sets.Magic2011; /** * @@ -39,7 +38,7 @@ public class ActOfTreason extends mage.sets.magic2010.ActOfTreason { public ActOfTreason(UUID ownerId) { super(ownerId); - this.expansionSetId = Magic2011.getInstance().getId(); + this.expansionSetCode = "M11"; } } diff --git a/Mage.Sets/src/mage/sets/magic2011/AetherAdept.java b/Mage.Sets/src/mage/sets/magic2011/AetherAdept.java index ec559626ae..721e40b48a 100644 --- a/Mage.Sets/src/mage/sets/magic2011/AetherAdept.java +++ b/Mage.Sets/src/mage/sets/magic2011/AetherAdept.java @@ -30,12 +30,12 @@ package mage.sets.magic2011; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; -import mage.sets.Magic2011; import mage.target.common.TargetCreaturePermanent; /** @@ -45,8 +45,8 @@ import mage.target.common.TargetCreaturePermanent; public class AetherAdept extends CardImpl { public AetherAdept(UUID ownerId) { - super(ownerId, "Æther Adept", new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.expansionSetId = Magic2011.getInstance().getId(); + super(ownerId, "Æther Adept", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "M11"; this.subtype.add("Human"); this.subtype.add("Wizard"); this.color.setBlue(true); @@ -69,7 +69,7 @@ public class AetherAdept extends CardImpl { @Override public String getArt() { - return ""; + return "129110_typ_reg_sty_010.jpg"; } } diff --git a/Mage.Sets/src/mage/sets/magic2011/AirServant.java b/Mage.Sets/src/mage/sets/magic2011/AirServant.java index daadb8ac62..8ecceb096e 100644 --- a/Mage.Sets/src/mage/sets/magic2011/AirServant.java +++ b/Mage.Sets/src/mage/sets/magic2011/AirServant.java @@ -30,6 +30,7 @@ package mage.sets.magic2011; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; @@ -39,7 +40,6 @@ import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.Magic2011; import mage.target.common.TargetCreaturePermanent; /** @@ -55,8 +55,8 @@ public class AirServant extends CardImpl { } public AirServant(UUID ownerId) { - super(ownerId, "Air Servant", new CardType[]{CardType.CREATURE}, "{4}{U}"); - this.expansionSetId = Magic2011.getInstance().getId(); + super(ownerId, "Air Servant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "M11"; this.color.setBlue(true); this.subtype.add("Elemental"); this.power = new MageInt(4); @@ -78,7 +78,7 @@ public class AirServant extends CardImpl { @Override public String getArt() { - return ""; + return "129155_typ_reg_sty_010.jpg"; } } diff --git a/Mage.Sets/src/mage/sets/magic2011/AjaniGoldmane.java b/Mage.Sets/src/mage/sets/magic2011/AjaniGoldmane.java index d06a9c82e6..a215830f63 100644 --- a/Mage.Sets/src/mage/sets/magic2011/AjaniGoldmane.java +++ b/Mage.Sets/src/mage/sets/magic2011/AjaniGoldmane.java @@ -29,7 +29,6 @@ package mage.sets.magic2011; import java.util.UUID; -import mage.sets.Magic2011; /** * @@ -39,7 +38,7 @@ public class AjaniGoldmane extends mage.sets.magic2010.AjaniGoldmane { public AjaniGoldmane(UUID ownerId) { super(ownerId); - this.expansionSetId = Magic2011.getInstance().getId(); + this.expansionSetCode = "M11"; } } diff --git a/Mage.Sets/src/mage/sets/magic2011/AjanisMantra.java b/Mage.Sets/src/mage/sets/magic2011/AjanisMantra.java new file mode 100644 index 0000000000..2c5e627569 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AjanisMantra.java @@ -0,0 +1,66 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AjanisMantra extends CardImpl { + + public AjanisMantra(UUID ownerId) { + super(ownerId, "Ajani's Mantra", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "M11"; + this.getColor().setWhite(true); + this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new GainLifeEffect(1), true)); + } + + public AjanisMantra(final AjanisMantra card) { + super(card); + } + + @Override + public AjanisMantra copy() { + return new AjanisMantra(this); + } + + @Override + public String getArt() { + return "129081_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java b/Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java new file mode 100644 index 0000000000..b051f94cad --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AjanisPridemate.java @@ -0,0 +1,106 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AjanisPridemate extends CardImpl { + + public AjanisPridemate(UUID ownerId) { + super(ownerId, "Ajani's Pridemate", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "1}{W}"); + this.expansionSetCode = "M11"; + this.subtype.add("Cat"); + this.subtype.add("Soldier"); + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(new AjanisPridemateAbility()); + } + + public AjanisPridemate(final AjanisPridemate card) { + super(card); + } + + @Override + public AjanisPridemate copy() { + return new AjanisPridemate(this); + } + + @Override + public String getArt() { + return "129151_typ_reg_sty_010.jpg"; + } + +} + +class AjanisPridemateAbility extends TriggeredAbilityImpl { + + public AjanisPridemateAbility() { + super(Zone.BATTLEFIELD, new AddPlusOneCountersSourceEffect(1), true); + } + + public AjanisPridemateAbility(final AjanisPridemateAbility ability) { + super(ability); + } + + @Override + public AjanisPridemateAbility copy() { + return new AjanisPridemateAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.GAINED_LIFE && event.getPlayerId().equals(controllerId)) { + trigger(game, event.getPlayerId()); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever you gain life, you may put a +1/+1 counter on Ajani's Pridemate."; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/AlluringSiren.java b/Mage.Sets/src/mage/sets/magic2011/AlluringSiren.java new file mode 100644 index 0000000000..3fabfb338d --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AlluringSiren.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AlluringSiren extends mage.sets.magic2010.AlluringSiren { + + public AlluringSiren(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/AncientHellkite.java b/Mage.Sets/src/mage/sets/magic2011/AncientHellkite.java new file mode 100644 index 0000000000..ef33c01d91 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AncientHellkite.java @@ -0,0 +1,153 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.ColoredManaSymbol; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.ActivatedAbilityImpl; +import mage.abilities.costs.CostImpl; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AncientHellkite extends CardImpl { + + public AncientHellkite(UUID ownerId) { + super(ownerId, "Ancient Hellkite", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{R}{R}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Dragon"); + this.color.setRed(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new AncientHellkiteAbility()); + } + + public AncientHellkite(final AncientHellkite card) { + super(card); + } + + @Override + public AncientHellkite copy() { + return new AncientHellkite(this); + } + + @Override + public String getArt() { + return "129075_typ_reg_sty_010.jpg"; + } + +} + +class AncientHellkiteAbility extends ActivatedAbilityImpl { + + private FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defender player controls"); + + public AncientHellkiteAbility() { + super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); + addCost(new AncientHellkiteCost()); + addTarget(new TargetCreaturePermanent(filter)); + addManaCost(new ColoredManaCost(ColoredManaSymbol.R)); + } + + public AncientHellkiteAbility(final AncientHellkiteAbility ability) { + super(ability); + this.filter = ability.filter; + } + + @Override + public AncientHellkiteAbility copy() { + return new AncientHellkiteAbility(this); + } + + @Override + public boolean activate(Game game, boolean noMana) { + UUID defenderId = null; + for (CombatGroup group: game.getCombat().getGroups()) { + if (group.getAttackers().contains(this.sourceId)) { + defenderId = group.getDefenderId(); + break; + } + } + if (defenderId != null) { + filter.getControllerId().clear(); + filter.getControllerId().add(defenderId); + return super.activate(game, noMana); + } + return false; + } +} + +class AncientHellkiteCost extends CostImpl { + + public AncientHellkiteCost() { + this.text = "Activate this ability only if Ancient Hellkite is attacking"; + } + + public AncientHellkiteCost(final AncientHellkiteCost cost) { + super(cost); + } + + @Override + public AncientHellkiteCost copy() { + return new AncientHellkiteCost(this); + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Permanent permanent = game.getPermanent(sourceId); + if (permanent != null && permanent.isAttacking()) { + return true; + } + return false; + } + + @Override + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + this.paid = true; + return paid; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java b/Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java new file mode 100644 index 0000000000..afbc6a7eda --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AngelicArbiter.java @@ -0,0 +1,214 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.watchers.Watcher; +import mage.watchers.WatcherImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AngelicArbiter extends CardImpl { + + public AngelicArbiter(UUID ownerId) { + super(ownerId, "Angelic Arbiter", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + this.expansionSetCode = "M11"; + this.subtype.add("Angel"); + this.color.setWhite(true); + this.power = new MageInt(5); + this.toughness = new MageInt(6); + + this.addAbility(FlyingAbility.getInstance()); + this.watchers.add(new AngelicArbiterWatcher1(ownerId)); + this.watchers.add(new AngelicArbiterWatcher2(ownerId)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AngelicArbiterEffect1())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AngelicArbiterEffect2())); + } + + public AngelicArbiter(final AngelicArbiter card) { + super(card); + } + + @Override + public AngelicArbiter copy() { + return new AngelicArbiter(this); + } + + @Override + public String getArt() { + return "129070_typ_reg_sty_010.jpg"; + } + +} + +class AngelicArbiterWatcher1 extends WatcherImpl { + + public AngelicArbiterWatcher1(UUID controllerId) { + super("CastSpell", controllerId); + } + + public AngelicArbiterWatcher1(final AngelicArbiterWatcher1 watcher) { + super(watcher); + } + + @Override + public AngelicArbiterWatcher1 copy() { + return new AngelicArbiterWatcher1(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == EventType.SPELL_CAST && game.getActivePlayerId().equals(event.getPlayerId()) && game.getOpponents(controllerId).contains(event.getPlayerId())) + condition = true; + } + +} + +class AngelicArbiterWatcher2 extends WatcherImpl { + + public AngelicArbiterWatcher2(UUID controllerId) { + super("Attacked", controllerId); + } + + public AngelicArbiterWatcher2(final AngelicArbiterWatcher2 watcher) { + super(watcher); + } + + @Override + public AngelicArbiterWatcher2 copy() { + return new AngelicArbiterWatcher2(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == EventType.DECLARED_ATTACKERS && game.getActivePlayerId().equals(event.getPlayerId()) && game.getOpponents(controllerId).contains(event.getPlayerId())) + condition = true; + } + +} + +class AngelicArbiterEffect1 extends ReplacementEffectImpl { + + public AngelicArbiterEffect1() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + } + + public AngelicArbiterEffect1(final AngelicArbiterEffect1 effect) { + super(effect); + } + + @Override + public AngelicArbiterEffect1 copy() { + return new AngelicArbiterEffect1(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.DECLARE_ATTACKER && game.getActivePlayerId().equals(event.getPlayerId()) && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { + Watcher watcher = game.getState().getWatchers().get(source.getControllerId(), "CastSpell"); + if (watcher != null && watcher.conditionMet()) + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "Each opponent who cast a spell this turn can't attack with creatures."; + } + +} + +class AngelicArbiterEffect2 extends ReplacementEffectImpl { + + public AngelicArbiterEffect2() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + } + + public AngelicArbiterEffect2(final AngelicArbiterEffect2 effect) { + super(effect); + } + + @Override + public AngelicArbiterEffect2 copy() { + return new AngelicArbiterEffect2(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.CAST_SPELL && game.getActivePlayerId().equals(event.getPlayerId()) && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { + Watcher watcher = game.getState().getWatchers().get(source.getControllerId(), "Attacked"); + if (watcher != null && watcher.conditionMet()) + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "Each opponent who attacked with a creature this turn can't cast spells."; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/AngelsFeather.java b/Mage.Sets/src/mage/sets/magic2011/AngelsFeather.java new file mode 100644 index 0000000000..83fe025112 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AngelsFeather.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AngelsFeather extends mage.sets.tenth.AngelsFeather { + + public AngelsFeather(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ArcRunner.java b/Mage.Sets/src/mage/sets/magic2011/ArcRunner.java new file mode 100644 index 0000000000..f1133be61b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ArcRunner.java @@ -0,0 +1,74 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ArcRunner extends CardImpl { + + public ArcRunner(UUID ownerId) { + super(ownerId, "Arc Runner", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Elemental"); + this.subtype.add("Ox"); + this.color.setRed(true); + this.power = new MageInt(5); + this.toughness = new MageInt(1); + + this.addAbility(HasteAbility.getInstance()); + this.addAbility(new OnEventTriggeredAbility(EventType.END_TURN_STEP_PRE, "beginning of the end step", new SacrificeSourceEffect())); + } + + public ArcRunner(final ArcRunner card) { + super(card); + } + + @Override + public ArcRunner copy() { + return new ArcRunner(this); + } + + @Override + public String getArt() { + return "129084_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ArmoredAscension.java b/Mage.Sets/src/mage/sets/magic2011/ArmoredAscension.java new file mode 100644 index 0000000000..b07c18dc10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ArmoredAscension.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ArmoredAscension extends mage.sets.magic2010.ArmoredAscension { + + public ArmoredAscension(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ArmoredCancrix.java b/Mage.Sets/src/mage/sets/magic2011/ArmoredCancrix.java new file mode 100644 index 0000000000..363f2990ac --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ArmoredCancrix.java @@ -0,0 +1,66 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ArmoredCancrix extends CardImpl { + + public ArmoredCancrix(UUID ownerId) { + super(ownerId, "Armored Cancrix", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "M11"; + this.color.setBlue(true); + this.subtype.add("Crab"); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + } + + public ArmoredCancrix(final ArmoredCancrix card) { + super(card); + } + + @Override + public ArmoredCancrix copy() { + return new ArmoredCancrix(this); + } + + @Override + public String getArt() { + return "129159_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Assassinate.java b/Mage.Sets/src/mage/sets/magic2011/Assassinate.java new file mode 100644 index 0000000000..04be3d60b1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Assassinate.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Assassinate extends mage.sets.tenth.Assassinate { + + public Assassinate(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/AssaultGriffin.java b/Mage.Sets/src/mage/sets/magic2011/AssaultGriffin.java new file mode 100644 index 0000000000..ba777227a6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AssaultGriffin.java @@ -0,0 +1,70 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AssaultGriffin extends CardImpl { + + public AssaultGriffin(UUID ownerId) { + super(ownerId, "Assault Griffin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "M11"; + this.color.setWhite(true); + this.subtype.add("Griffin"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + this.addAbility(FlyingAbility.getInstance()); + } + + public AssaultGriffin(final AssaultGriffin card) { + super(card); + } + + @Override + public AssaultGriffin copy() { + return new AssaultGriffin(this); + } + + @Override + public String getArt() { + return "129194_typ_reg_sty_010.jpg"; + } + +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/AuguryOwl.java b/Mage.Sets/src/mage/sets/magic2011/AuguryOwl.java new file mode 100644 index 0000000000..8b5bf878d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AuguryOwl.java @@ -0,0 +1,72 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AuguryOwl extends CardImpl { + + public AuguryOwl(UUID ownerId) { + super(ownerId, "Augury Owl", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "M11"; + this.subtype.add("Bird"); + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(3))); + } + + public AuguryOwl(final AuguryOwl card) { + super(card); + } + + @Override + public AuguryOwl copy() { + return new AuguryOwl(this); + } + + @Override + public String getArt() { + return "129176_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/AutumnsVeil.java b/Mage.Sets/src/mage/sets/magic2011/AutumnsVeil.java new file mode 100644 index 0000000000..367adca630 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AutumnsVeil.java @@ -0,0 +1,76 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.CantCounterControlledEffect; +import mage.abilities.effects.common.CantTargetControlledEffect; +import mage.cards.CardImpl; +import mage.filter.FilterObject; +import mage.filter.FilterPermanent; +import mage.filter.FilterSpell; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AutumnsVeil extends CardImpl { + + private static FilterSpell filterTarget1 = new FilterSpell("spells you control"); + private static FilterCreaturePermanent filterTarget2 = FilterCreaturePermanent.getDefault(); + private static FilterObject filterSource = new FilterObject("blue or black spells"); + + public AutumnsVeil(UUID ownerId) { + super(ownerId, "Autumn's Veil", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "M11"; + this.color.setGreen(true); + this.getSpellAbility().addEffect(new CantCounterControlledEffect(filterTarget1, filterSource, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new CantTargetControlledEffect(filterTarget2, filterSource, Duration.EndOfTurn)); + } + + public AutumnsVeil(final AutumnsVeil card) { + super(card); + } + + @Override + public AutumnsVeil copy() { + return new AutumnsVeil(this); + } + + @Override + public String getArt() { + return "129140_typ_reg_sty_010.jpg"; + } + +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/AwakenerDruid.java b/Mage.Sets/src/mage/sets/magic2011/AwakenerDruid.java new file mode 100644 index 0000000000..acf20102cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AwakenerDruid.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AwakenerDruid extends mage.sets.magic2010.AwakenerDruid { + + public AwakenerDruid(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/AzureDrake.java b/Mage.Sets/src/mage/sets/magic2011/AzureDrake.java new file mode 100644 index 0000000000..91981f72ba --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/AzureDrake.java @@ -0,0 +1,70 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AzureDrake extends CardImpl { + + public AzureDrake(UUID ownerId) { + super(ownerId, "Azure Drake", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "M11"; + this.color.setBlue(true); + this.subtype.add("Drake"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + this.addAbility(FlyingAbility.getInstance()); + } + + public AzureDrake(final AzureDrake card) { + super(card); + } + + @Override + public AzureDrake copy() { + return new AzureDrake(this); + } + + @Override + public String getArt() { + return "02311_typ_reg_sty_010.jpg"; + } + +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/BackToNature.java b/Mage.Sets/src/mage/sets/magic2011/BackToNature.java new file mode 100644 index 0000000000..7d737ddc21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BackToNature.java @@ -0,0 +1,71 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BackToNature extends CardImpl { + + private static FilterPermanent filter = new FilterPermanent(); + + static { + filter.getCardType().add(CardType.ENCHANTMENT); + } + + public BackToNature(UUID ownerId) { + super(ownerId, "Back to Nature", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "M11"; + this.color.setGreen(true); + this.getSpellAbility().addEffect(new DestroyAllEffect(filter)); + } + + public BackToNature(final BackToNature card) { + super(card); + } + + @Override + public BackToNature copy() { + return new BackToNature(this); + } + + @Override + public String getArt() { + return "129188_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BaneslayerAngel.java b/Mage.Sets/src/mage/sets/magic2011/BaneslayerAngel.java new file mode 100644 index 0000000000..4ffe7d8503 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BaneslayerAngel.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BaneslayerAngel extends mage.sets.magic2010.BaneslayerAngel { + + public BaneslayerAngel(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/BaronyVampire.java b/Mage.Sets/src/mage/sets/magic2011/BaronyVampire.java new file mode 100644 index 0000000000..ec9162cb2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BaronyVampire.java @@ -0,0 +1,66 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BaronyVampire extends CardImpl { + + public BaronyVampire(UUID ownerId) { + super(ownerId, "Barony Vampire", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "M11"; + this.color.setBlack(true); + this.subtype.add("Vampire"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + } + + public BaronyVampire(final BaronyVampire card) { + super(card); + } + + @Override + public BaronyVampire copy() { + return new BaronyVampire(this); + } + + @Override + public String getArt() { + return "129093_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BerserkersOfBloodRidge.java b/Mage.Sets/src/mage/sets/magic2011/BerserkersOfBloodRidge.java new file mode 100644 index 0000000000..34f8ee08fe --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BerserkersOfBloodRidge.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BerserkersOfBloodRidge extends mage.sets.magic2010.BerserkersOfBloodRidge { + + public BerserkersOfBloodRidge(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/BirdsOfParadise.java b/Mage.Sets/src/mage/sets/magic2011/BirdsOfParadise.java new file mode 100644 index 0000000000..6da5d44199 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BirdsOfParadise.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BirdsOfParadise extends mage.sets.tenth.BirdsOfParadise { + + public BirdsOfParadise(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BlackKnight.java b/Mage.Sets/src/mage/sets/magic2011/BlackKnight.java new file mode 100644 index 0000000000..af9e7c816d --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BlackKnight.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BlackKnight extends mage.sets.magic2010.BlackKnight { + + public BlackKnight(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BlindingMage.java b/Mage.Sets/src/mage/sets/magic2011/BlindingMage.java new file mode 100644 index 0000000000..d12bc58e99 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BlindingMage.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BlindingMage extends mage.sets.magic2010.BlindingMage { + + public BlindingMage(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BloodTithe.java b/Mage.Sets/src/mage/sets/magic2011/BloodTithe.java new file mode 100644 index 0000000000..b17c19b6d5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BloodTithe.java @@ -0,0 +1,95 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BloodTithe extends CardImpl { + + public BloodTithe(UUID ownerId) { + super(ownerId, "Blood Tithe", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "M11"; + this.getColor().setBlack(true); + + this.getSpellAbility().addEffect(new BloodTitheEffect()); + } + + public BloodTithe(final BloodTithe card) { + super(card); + } + + @Override + public BloodTithe copy() { + return new BloodTithe(this); + } + + @Override + public String getArt() { + return "129141_typ_reg_sty_010.jpg"; + } + +} + +class BloodTitheEffect extends OneShotEffect { + + public BloodTitheEffect() { + super(Outcome.Damage); + } + + public BloodTitheEffect(final BloodTitheEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + int damage = 0; + for (UUID opponentId: game.getOpponents(source.getControllerId())) { + damage += game.getPlayer(opponentId).damage(3, source.getSourceId(), game, false, true); + } + game.getPlayer(source.getControllerId()).gainLife(damage, game); + return true; + } + + @Override + public BloodTitheEffect copy() { + return new BloodTitheEffect(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java b/Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java new file mode 100644 index 0000000000..1561dbc01e --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BloodcrazedGoblin.java @@ -0,0 +1,146 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.watchers.Watcher; +import mage.watchers.WatcherImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BloodcrazedGoblin extends CardImpl { + + public BloodcrazedGoblin(UUID ownerId) { + super(ownerId, "Bloodcrazed Goblin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Goblin"); + this.subtype.add("Berserker"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.watchers.add(new BloodcrazedGoblinWatcher(ownerId)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BloodcrazedGoblinEffect())); + } + + public BloodcrazedGoblin(final BloodcrazedGoblin card) { + super(card); + } + + @Override + public BloodcrazedGoblin copy() { + return new BloodcrazedGoblin(this); + } + + @Override + public String getArt() { + return "129098_typ_reg_sty_010.jpg"; + } + +} + +class BloodcrazedGoblinWatcher extends WatcherImpl { + + public BloodcrazedGoblinWatcher(UUID controllerId) { + super("OpponentDamaged", controllerId); + } + + public BloodcrazedGoblinWatcher(final BloodcrazedGoblinWatcher watcher) { + super(watcher); + } + + @Override + public BloodcrazedGoblinWatcher copy() { + return new BloodcrazedGoblinWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == EventType.DAMAGED_PLAYER && game.getOpponents(controllerId).contains(event.getPlayerId())) + condition = true; + } + +} + +class BloodcrazedGoblinEffect extends ReplacementEffectImpl { + + public BloodcrazedGoblinEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + } + + public BloodcrazedGoblinEffect(final BloodcrazedGoblinEffect effect) { + super(effect); + } + + @Override + public BloodcrazedGoblinEffect copy() { + return new BloodcrazedGoblinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.DECLARE_ATTACKER && source.getSourceId().equals(event.getSourceId())) { + Watcher watcher = game.getState().getWatchers().get(source.getControllerId(), "OpponentDamaged"); + if (watcher != null && watcher.conditionMet()) + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "Bloodcrazed Goblin can't attack unless an opponent has been dealt damage this turn"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BloodthroneVampire.java b/Mage.Sets/src/mage/sets/magic2011/BloodthroneVampire.java new file mode 100644 index 0000000000..4032279fd6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BloodthroneVampire.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BloodthroneVampire extends mage.sets.riseoftheeldrazi.BloodthroneVampire { + + public BloodthroneVampire(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/BogRaiders.java b/Mage.Sets/src/mage/sets/magic2011/BogRaiders.java new file mode 100644 index 0000000000..5a15fc65ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BogRaiders.java @@ -0,0 +1,77 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.LandwalkAbility; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.common.FilterLandPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BogRaiders extends CardImpl { + + private static FilterLandPermanent filter = new FilterLandPermanent("Swamp"); + + static { + filter.getSubtype().add("Swamp"); + filter.setScopeSubtype(ComparisonScope.Any); + } + + public BogRaiders(UUID ownerId) { + super(ownerId, "Bog Raiders", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "M11"; + this.color.setBlack(true); + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + this.addAbility(new LandwalkAbility(filter)); + } + + public BogRaiders(final BogRaiders card) { + super(card); + } + + @Override + public BogRaiders copy() { + return new BogRaiders(this); + } + + @Override + public String getArt() { + return "08678_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BrindleBoar.java b/Mage.Sets/src/mage/sets/magic2011/BrindleBoar.java new file mode 100644 index 0000000000..02c0f246f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BrindleBoar.java @@ -0,0 +1,72 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BrindleBoar extends CardImpl { + + public BrindleBoar(UUID ownerId) { + super(ownerId, "Brindle Boar", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "M11"; + this.color.setGreen(true); + this.subtype.add("Boar"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(4), new SacrificeSourceCost())); + } + + public BrindleBoar(final BrindleBoar card) { + super(card); + } + + @Override + public BrindleBoar copy() { + return new BrindleBoar(this); + } + + @Override + public String getArt() { + return "129128_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/BrittleEffigy.java b/Mage.Sets/src/mage/sets/magic2011/BrittleEffigy.java new file mode 100644 index 0000000000..eeda468751 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/BrittleEffigy.java @@ -0,0 +1,78 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.ExileSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BrittleEffigy extends CardImpl { + + public BrittleEffigy(UUID ownerId) { + super(ownerId, "Brittle Effigy", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "M11"; + Costs costs = new CostsImpl(); + costs.add(new GenericManaCost(4)); + costs.add(new TapSourceCost()); + costs.add(new ExileSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), costs); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public BrittleEffigy(final BrittleEffigy card) { + super(card); + } + + @Override + public BrittleEffigy copy() { + return new BrittleEffigy(this); + } + + @Override + public String getArt() { + return "129094_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/CallToMind.java b/Mage.Sets/src/mage/sets/magic2011/CallToMind.java new file mode 100644 index 0000000000..eefe66218b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CallToMind.java @@ -0,0 +1,79 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.FilterCard; +import mage.target.TargetCard; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CallToMind extends CardImpl { + + private static FilterCard filter = new FilterCard("instant or sorcery card from your graveyard"); + + static { + filter.setZone(Zone.GRAVEYARD); + filter.getCardType().add(CardType.INSTANT); + filter.getCardType().add(CardType.SORCERY); + filter.setScopeCardType(ComparisonScope.Any); + } + + public CallToMind(UUID ownerId) { + super(ownerId, "CallToMind", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{U}"); + this.expansionSetCode = "M11"; + this.color.setBlue(true); + + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCard(Zone.GRAVEYARD, filter)); + } + + public CallToMind(final CallToMind card) { + super(card); + } + + @Override + public CallToMind copy() { + return new CallToMind(this); + } + + @Override + public String getArt() { + return "129174_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Cancel.java b/Mage.Sets/src/mage/sets/magic2011/Cancel.java new file mode 100644 index 0000000000..c300d11d96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Cancel.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Cancel extends mage.sets.shardsofalara.Cancel { + + public Cancel(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/CanyonMinotaur.java b/Mage.Sets/src/mage/sets/magic2011/CanyonMinotaur.java new file mode 100644 index 0000000000..e14e90a5af --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CanyonMinotaur.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CanyonMinotaur extends mage.sets.conflux.CanyonMinotaur { + + public CanyonMinotaur(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java b/Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java new file mode 100644 index 0000000000..3b64f6f832 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CaptivatingVampire.java @@ -0,0 +1,149 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CaptivatingVampire extends CardImpl { + + private static FilterCreaturePermanent filter1 = new FilterCreaturePermanent("Vampire creatures"); + private static FilterCreaturePermanent filter2 = new FilterCreaturePermanent("five untapped Vampires"); + + static { + filter1.getSubtype().add("Vampire"); + filter2.getSubtype().add("Vampire"); + filter2.setTapped(false); + filter2.setUseTapped(true); + } + + public CaptivatingVampire(UUID ownerId) { + super(ownerId, "Captivating Vampire", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "M11"; + this.color.setBlack(true); + this.subtype.add("Vampire"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter1, true))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CaptivatingVampireEffect(), new TapTargetCost(new TargetControlledPermanent(5, 5, filter2, true))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CaptivatingVampire(final CaptivatingVampire card) { + super(card); + } + + @Override + public CaptivatingVampire copy() { + return new CaptivatingVampire(this); + } + + @Override + public String getArt() { + return "131382_typ_reg_sty_010.jpg"; + } + +} + +class CaptivatingVampireEffect extends ContinuousEffectImpl { + + public CaptivatingVampireEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + } + + public CaptivatingVampireEffect(final CaptivatingVampireEffect effect) { + super(effect); + } + + @Override + public CaptivatingVampireEffect copy() { + return new CaptivatingVampireEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + switch (layer) { + case ControlChangingEffects_2: + if (sublayer == SubLayer.NA) { + permanent.changeControllerId(source.getControllerId(), game); + } + break; + case TypeChangingEffects_4: + if (sublayer == SubLayer.NA) { + permanent.getSubtype().add("Vampire"); + } + break; + } + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.ControlChangingEffects_2 || layer == layer.TypeChangingEffects_4; + } + + @Override + public String getText(Ability source) { + return "Gain control of target creature. It becomes a Vampire in addition to its other types"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/CelestialPurge.java b/Mage.Sets/src/mage/sets/magic2011/CelestialPurge.java new file mode 100644 index 0000000000..ba7d87274f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CelestialPurge.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CelestialPurge extends mage.sets.conflux.CelestialPurge { + + public CelestialPurge(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ChandraNalaar.java b/Mage.Sets/src/mage/sets/magic2011/ChandraNalaar.java new file mode 100644 index 0000000000..a8f7099428 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ChandraNalaar.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ChandraNalaar extends mage.sets.magic2010.ChandraNalaar { + + public ChandraNalaar(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java b/Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java new file mode 100644 index 0000000000..4dfbf7df50 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java @@ -0,0 +1,102 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ChandrasOutrage extends CardImpl { + + public ChandrasOutrage(UUID ownerId) { + super(ownerId, "Chandra's Outrage", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}{R}"); + this.expansionSetCode = "M11"; + this.color.setRed(true); + this.getSpellAbility().addEffect(new ChandrasOutrageEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public ChandrasOutrage(final ChandrasOutrage card) { + super(card); + } + + @Override + public ChandrasOutrage copy() { + return new ChandrasOutrage(this); + } + + @Override + public String getArt() { + return "129156_typ_reg_sty_010.jpg"; + } + +} + +class ChandrasOutrageEffect extends OneShotEffect { + + public ChandrasOutrageEffect() { + super(Outcome.Damage); + } + + public ChandrasOutrageEffect(final ChandrasOutrageEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + Player player = game.getPlayer(permanent.getControllerId()); + if (player != null) { + permanent.damage(4, source.getSourceId(), game, true); + player.damage(2, source.getSourceId(), game, false, true); + return true; + } + } + return false; + } + + @Override + public ChandrasOutrageEffect copy() { + return new ChandrasOutrageEffect(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/ChandrasSpitfire.java b/Mage.Sets/src/mage/sets/magic2011/ChandrasSpitfire.java new file mode 100644 index 0000000000..333a1a8feb --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ChandrasSpitfire.java @@ -0,0 +1,110 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.PhaseStep; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.BoostSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ChandrasSpitfire extends CardImpl { + + public ChandrasSpitfire(UUID ownerId) { + super(ownerId, "Chandra's Spitfire", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Elemental"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new ChandrasSpitfireAbility()); + } + + public ChandrasSpitfire(final ChandrasSpitfire card) { + super(card); + } + + @Override + public ChandrasSpitfire copy() { + return new ChandrasSpitfire(this); + } + + @Override + public String getArt() { + return "129115_typ_reg_sty_010.jpg"; + } + +} + +class ChandrasSpitfireAbility extends TriggeredAbilityImpl { + + public ChandrasSpitfireAbility() { + super(Zone.BATTLEFIELD, new BoostSourceEffect(3, 0, Duration.EndOfTurn), false); + } + + public ChandrasSpitfireAbility(final ChandrasSpitfireAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.NONCOMBAT_DAMAGED_PLAYER && game.getOpponents(controllerId).contains(event.getTargetId()) && game.getTurn().getStepType() != PhaseStep.COMBAT_DAMAGE) { + trigger(game, this.controllerId); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever an opponent is dealt noncombat damage, Chandra's Spitfire gets +3/+0 until end of turn."; + } + + @Override + public ChandrasSpitfireAbility copy() { + return new ChandrasSpitfireAbility(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ChildOfNight.java b/Mage.Sets/src/mage/sets/magic2011/ChildOfNight.java new file mode 100644 index 0000000000..b6f9b4d07b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ChildOfNight.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ChildOfNight extends mage.sets.magic2010.ChildOfNight { + + public ChildOfNight(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Clone.java b/Mage.Sets/src/mage/sets/magic2011/Clone.java new file mode 100644 index 0000000000..a56154b2b5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Clone.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Clone extends mage.sets.tenth.Clone { + + public Clone(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/CloudCrusader.java b/Mage.Sets/src/mage/sets/magic2011/CloudCrusader.java new file mode 100644 index 0000000000..d2a4eb0e95 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CloudCrusader.java @@ -0,0 +1,72 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CloudCrusader extends CardImpl { + + public CloudCrusader(UUID ownerId) { + super(ownerId, "Cloud Crusader", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "M11"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(FirstStrikeAbility.getInstance()); + } + + public CloudCrusader(final CloudCrusader card) { + super(card); + } + + @Override + public CloudCrusader copy() { + return new CloudCrusader(this); + } + + @Override + public String getArt() { + return "129191_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/CloudElemental.java b/Mage.Sets/src/mage/sets/magic2011/CloudElemental.java new file mode 100644 index 0000000000..2656b94206 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CloudElemental.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CloudElemental extends mage.sets.tenth.CloudElemental { + + public CloudElemental(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Combust.java b/Mage.Sets/src/mage/sets/magic2011/Combust.java new file mode 100644 index 0000000000..8de0326b3b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Combust.java @@ -0,0 +1,79 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CantCounterSourceEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Combust extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("white or blue creature"); + + static { + filter.getColor().setWhite(true); + filter.getColor().setBlue(true); + filter.setUseColor(true); + } + + public Combust(UUID ownerId) { + super(ownerId, "Combust", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "M11"; + this.color.setRed(true); + this.getSpellAbility().addEffect(new DamageTargetEffect(5, false)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantCounterSourceEffect())); + } + + public Combust(final Combust card) { + super(card); + } + + @Override + public Combust copy() { + return new Combust(this); + } + + @Override + public String getArt() { + return "129101_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Condemn.java b/Mage.Sets/src/mage/sets/magic2011/Condemn.java new file mode 100644 index 0000000000..22ab4027ba --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Condemn.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Condemn extends mage.sets.tenth.Condemn { + + public Condemn(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java b/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java new file mode 100644 index 0000000000..65d1daff90 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java @@ -0,0 +1,129 @@ +/* + * 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.magic2011; + +import java.util.List; +import java.util.Set; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.game.Game; +import mage.players.Player; +import mage.sets.Sets; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ConundrumSphinx extends CardImpl { + + public ConundrumSphinx(UUID ownerId) { + super(ownerId, "Conundrum Sphinx", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "M11"; + this.subtype.add("Sphinx"); + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new AttacksTriggeredAbility(new ConundrumSphinxEffect(), false)); + } + + public ConundrumSphinx(final ConundrumSphinx card) { + super(card); + } + + @Override + public ConundrumSphinx copy() { + return new ConundrumSphinx(this); + } + + @Override + public String getArt() { + return "129077_typ_reg_sty_010.jpg"; + } + +} + +class ConundrumSphinxEffect extends OneShotEffect { + + public ConundrumSphinxEffect() { + super(Outcome.DrawCard); + } + + public ConundrumSphinxEffect(final ConundrumSphinxEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Set cardNames = Sets.getCardNames(); + Choice cardChoice = new ChoiceImpl(); + cardChoice.setChoices(Sets.getCardNames()); + for (Player player: game.getPlayers().values()) { + cardChoice.clearChoice(); + player.choose(Outcome.DrawCard, cardChoice, game); + Card card = player.getLibrary().removeFromTop(game); + Cards cards = new CardsImpl(); + cards.add(card); + player.revealCards(cards, game); + if (card.getName().equals(cardChoice.getChoice())) { + player.putInHand(card, game); + } + else { + player.getLibrary().putOnBottom(card, game); + } + + } + return true; + } + + @Override + public ConundrumSphinxEffect copy() { + return new ConundrumSphinxEffect(this); + } + + @Override + public String getText(Ability source) { + return "each player names a card. Then each player reveals the top card of his or her library. If the card a player revealed is the card he or she named, that player puts it into his or her hand. If it's not, that player puts it on the bottom of his or her library"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Corrupt.java b/Mage.Sets/src/mage/sets/magic2011/Corrupt.java new file mode 100644 index 0000000000..1fb66d5133 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Corrupt.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.sets.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Corrupt extends CardImpl { + + public Corrupt(UUID ownerId) { + super(ownerId, "Corrupt", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{5}{B}"); + this.expansionSetCode = "M11"; + this.color.setBlack(true); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new CorruptEffect()); + } + + public Corrupt(final Corrupt card) { + super(card); + } + + @Override + public Corrupt copy() { + return new Corrupt(this); + } + + @Override + public String getArt() { + return "111602_typ_reg_sty_010.jpg"; + } + +} + +class CorruptEffect extends OneShotEffect { + + public CorruptEffect() { + super(Outcome.Damage); + } + + public CorruptEffect(final CorruptEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + FilterLandPermanent filter = new FilterLandPermanent("Swamps"); + filter.getSubtype().add("Swamp"); + filter.setScopeSubtype(ComparisonScope.Any); + filter.getControllerId().add(source.getControllerId()); + int amount = game.getBattlefield().count(filter, source.getControllerId(), game); + if (amount > 0) { + int damageDealt = amount; + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + damageDealt = permanent.damage(amount, source.getSourceId(), game, true); + } + else { + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + damageDealt = player.damage(amount, source.getSourceId(), game, false, true); + } + else + return false; + } + Player you = game.getPlayer(source.getControllerId()); + if (you != null) { + you.gainLife(damageDealt, game); + return true; + } + } + return false; + } + + @Override + public CorruptEffect copy() { + return new CorruptEffect(this); + } + + @Override + public String getText(Ability source) { + return "Corrupt deals damage equal to the number of Swamps you control to target creature or player. You gain life equal to the damage dealt this way"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/CrystalBall.java b/Mage.Sets/src/mage/sets/magic2011/CrystalBall.java new file mode 100644 index 0000000000..1aa2db1665 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CrystalBall.java @@ -0,0 +1,73 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.ScryEffect; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CrystalBall extends CardImpl { + + public CrystalBall(UUID ownerId) { + super(ownerId, "Crystal Ball", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "M11"; + Costs costs = new CostsImpl(); + costs.add(new GenericManaCost(1)); + costs.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(2), costs)); + } + + public CrystalBall(final CrystalBall card) { + super(card); + } + + @Override + public CrystalBall copy() { + return new CrystalBall(this); + } + + @Override + public String getArt() { + return "129138_typ_reg_sty_010.jpg"; + } + +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/CudgelTroll.java b/Mage.Sets/src/mage/sets/magic2011/CudgelTroll.java new file mode 100644 index 0000000000..b1804b632d --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CudgelTroll.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CudgelTroll extends mage.sets.magic2010.CudgelTroll { + + public CudgelTroll(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Cultivate.java b/Mage.Sets/src/mage/sets/magic2011/Cultivate.java new file mode 100644 index 0000000000..419b8818a9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Cultivate.java @@ -0,0 +1,142 @@ +/* + * 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.magic2011; + +import java.util.List; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterBasicLandCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Cultivate extends CardImpl { + + public Cultivate(UUID ownerId) { + super(ownerId, "Cultivate", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "M11"; + this.color.setGreen(true); + this.getSpellAbility().addEffect(new CultivateEffect()); + + } + + public Cultivate(final Cultivate card) { + super(card); + } + + @Override + public Cultivate copy() { + return new Cultivate(this); + } + + @Override + public String getArt() { + return "129089_typ_reg_sty_010.jpg"; + } + +} + +class CultivateEffect extends OneShotEffect { + + protected static FilterCard filter = new FilterCard("card to put on the battlefield tapped"); + + public CultivateEffect() { + super(Outcome.PutLandInPlay); + } + + public CultivateEffect(final CultivateEffect effect) { + super(effect); + } + + @Override + public CultivateEffect copy() { + return new CultivateEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + TargetCardInLibrary target = new TargetCardInLibrary(0, 2, new FilterBasicLandCard()); + Player player = game.getPlayer(source.getControllerId()); + player.searchLibrary(target, game); + if (target.getTargets().size() > 0) { + Cards revealed = new CardsImpl(); + for (UUID cardId: (List)target.getTargets()) { + Card card = player.getLibrary().remove(cardId, game); + revealed.add(card); + } + player.revealCards(revealed, game); + if (target.getTargets().size() == 2) { + TargetCard target2 = new TargetCard(Zone.PICK, filter); + target2.setRequired(true); + player.chooseTarget(revealed, target2, source, game); + Card card = revealed.get(target2.getFirstTarget(), game); + player.putOntoBattlefield(card, game); + revealed.remove(card); + Permanent permanent = game.getPermanent(card.getId()); + if (permanent != null) + permanent.setTapped(true); + card = revealed.getCards(game).iterator().next(); + player.putInHand(card, game); + } + else if (target.getTargets().size() == 1) { + Card card = revealed.getCards(game).iterator().next(); + player.putOntoBattlefield(card, game); + Permanent permanent = game.getPermanent(card.getId()); + if (permanent != null) + permanent.setTapped(true); + } + + player.shuffleLibrary(game); + } + return true; + + } + + @Override + public String getText(Ability source) { + return "Search your library for up to two basic land cards, reveal those cards, and put one onto the battlefield tapped and the other into your hand. Then shuffle your library"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java b/Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java new file mode 100644 index 0000000000..6ff3e95df7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java @@ -0,0 +1,129 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CyclopsGladiator extends CardImpl { + + public CyclopsGladiator(UUID ownerId) { + super(ownerId, "Cyclops Gladiator", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}{R}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Cyclops"); + this.subtype.add("Warrior"); + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + Ability ability = new AttacksTriggeredAbility(new CyclopsGladiatorEffect(), true); + this.addAbility(ability); + } + + public CyclopsGladiator(final CyclopsGladiator card) { + super(card); + } + + @Override + public CyclopsGladiator copy() { + return new CyclopsGladiator(this); + } + + @Override + public String getArt() { + return "129160_typ_reg_sty_010.jpg"; + } + +} + +class CyclopsGladiatorEffect extends OneShotEffect { + + public CyclopsGladiatorEffect() { + super(Outcome.Damage); + } + + public CyclopsGladiatorEffect(final CyclopsGladiatorEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player defender = null; + for (CombatGroup group: game.getCombat().getGroups()) { + if (group.getAttackers().contains(source.getSourceId())) { + defender = game.getPlayer(group.getDefenderId()); + break; + } + } + if (defender != null) { + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player owns"); + filter.getControllerId().add(defender.getId()); + TargetCreaturePermanent target = new TargetCreaturePermanent(filter); + Player player = game.getPlayer(source.getControllerId()); + player.choose(Outcome.Damage, target, game); + Permanent permanent = game.getPermanent(target.getFirstTarget()); + Permanent cyclops = game.getPermanent(source.getSourceId()); + if (permanent != null && cyclops != null) { + permanent.damage(cyclops.getPower().getValue(), cyclops.getId(), game, true); + cyclops.damage(permanent.getPower().getValue(), permanent.getId(), game, true); + return true; + } + } + return false; + } + + @Override + public CyclopsGladiatorEffect copy() { + return new CyclopsGladiatorEffect(this); + } + + @Override + public String getText(Ability source) { + return "you may have it deal damage equal to its power to target creature defending player controls. If you do, that creature deals damage equal to its power to Cyclops Gladiator"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java b/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java new file mode 100644 index 0000000000..742fcf7a4c --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java @@ -0,0 +1,110 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DarkTutelage extends CardImpl { + + public DarkTutelage(UUID ownerId) { + super(ownerId, "DarkTutelage", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "M11"; + this.getColor().setBlack(true); + this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new DarkTutelageEffect(), false)); + } + + public DarkTutelage(final DarkTutelage card) { + super(card); + } + + @Override + public DarkTutelage copy() { + return new DarkTutelage(this); + } + + @Override + public String getArt() { + return "129074_typ_reg_sty_010.jpg"; + } + +} + +class DarkTutelageEffect extends OneShotEffect { + + public DarkTutelageEffect() { + super(Outcome.DrawCard); + } + + public DarkTutelageEffect(final DarkTutelageEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Card card = player.getLibrary().removeFromTop(game); + if (card != null) { + player.putInHand(card, game); + player.loseLife(card.getManaCost().convertedManaCost(), game); + Cards cards = new CardsImpl(); + cards.add(card); + player.revealCards(cards, game); + return true; + } + return false; + } + + @Override + public DarkTutelageEffect copy() { + return new DarkTutelageEffect(this); + } + + @Override + public String getText(Ability source) { + return "reveal the top card of your library and put that card into your hand. You lose life equal to its converted mana cost"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DayOfJudgment.java b/Mage.Sets/src/mage/sets/magic2011/DayOfJudgment.java new file mode 100644 index 0000000000..488a31c01f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DayOfJudgment.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DayOfJudgment extends mage.sets.zendikar.DayOfJudgment { + + public DayOfJudgment(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Deathmark.java b/Mage.Sets/src/mage/sets/magic2011/Deathmark.java new file mode 100644 index 0000000000..ac48456ddf --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Deathmark.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Deathmark extends mage.sets.magic2010.Deathmark { + + public Deathmark(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Demolish.java b/Mage.Sets/src/mage/sets/magic2011/Demolish.java new file mode 100644 index 0000000000..6cc0c8a91b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Demolish.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Demolish extends mage.sets.zendikar.Demolish { + + public Demolish(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/DemonOfDeathsGate.java b/Mage.Sets/src/mage/sets/magic2011/DemonOfDeathsGate.java new file mode 100644 index 0000000000..5d3204f9e9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DemonOfDeathsGate.java @@ -0,0 +1,109 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.AlternativeCost; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DemonOfDeathsGate extends CardImpl { + + public DemonOfDeathsGate(UUID ownerId) { + super(ownerId, "Demon Of Death's Gate", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{6}{B}{B}{B}"); + this.expansionSetCode = "M11"; + this.subtype.add("Demon"); + this.color.setBlack(true); + this.power = new MageInt(9); + this.toughness = new MageInt(9); + this.getSpellAbility().addAlternativeCost(new DemonOfDeathsGateAlternativeCost()); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(TrampleAbility.getInstance()); + } + + public DemonOfDeathsGate(final DemonOfDeathsGate card) { + super(card); + } + + @Override + public DemonOfDeathsGate copy() { + return new DemonOfDeathsGate(this); + } + + @Override + public String getArt() { + return "129162_typ_reg_sty_010.jpg"; + } + +} + +class DemonOfDeathsGateAlternativeCost extends AlternativeCost { + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("black creature"); + + static { + filter.getColor().setBlack(true); + filter.setUseColor(true); + } + + public DemonOfDeathsGateAlternativeCost() { + super("pay 6 life and sacrifice three black creatures"); + this.add(new PayLifeCost(6)); + this.add(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, filter, false))); + } + + public DemonOfDeathsGateAlternativeCost(final DemonOfDeathsGateAlternativeCost cost) { + super(cost); + } + + @Override + public DemonOfDeathsGateAlternativeCost copy() { + return new DemonOfDeathsGateAlternativeCost(this); + } + + @Override + public String getText() { + return "You may pay 6 life and sacrifice three black creatures rather than pay Demon of Death's Gate's mana cost"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/DemonsHorn.java b/Mage.Sets/src/mage/sets/magic2011/DemonsHorn.java new file mode 100644 index 0000000000..4494f8daeb --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DemonsHorn.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DemonsHorn extends mage.sets.tenth.DemonsHorn { + + public DemonsHorn(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DestructiveForce.java b/Mage.Sets/src/mage/sets/magic2011/DestructiveForce.java new file mode 100644 index 0000000000..10b9700ec1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DestructiveForce.java @@ -0,0 +1,69 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.effects.common.SacrificeAllEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterLandPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DestructiveForce extends CardImpl { + + public DestructiveForce(UUID ownerId) { + super(ownerId, "Destructive Force", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{R}{R}"); + this.expansionSetCode = "M11"; + this.color.setRed(true); + this.getSpellAbility().addEffect(new SacrificeAllEffect(5, new FilterLandPermanent())); + this.getSpellAbility().addEffect(new DamageAllEffect(5, FilterCreaturePermanent.getDefault())); + } + + public DestructiveForce(final DestructiveForce card) { + super(card); + } + + @Override + public DestructiveForce copy() { + return new DestructiveForce(this); + } + + @Override + public String getArt() { + return "129135_typ_reg_sty_010.jpg"; + } + +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/DiabolicTutor.java b/Mage.Sets/src/mage/sets/magic2011/DiabolicTutor.java new file mode 100644 index 0000000000..a3dbd3da94 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DiabolicTutor.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DiabolicTutor extends mage.sets.tenth.DiabolicTutor { + + public DiabolicTutor(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Diminish.java b/Mage.Sets/src/mage/sets/magic2011/Diminish.java new file mode 100644 index 0000000000..44af8008d7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Diminish.java @@ -0,0 +1,67 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.SetPowerToughnessTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Diminish extends CardImpl { + + public Diminish(UUID ownerId) { + super(ownerId, "Diminish", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "M11"; + this.color.setBlue(true); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new SetPowerToughnessTargetEffect(1, 1, Duration.EndOfTurn)); + } + + public Diminish(final Diminish card) { + super(card); + } + + @Override + public Diminish copy() { + return new Diminish(this); + } + + @Override + public String getArt() { + return "129177_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Disentomb.java b/Mage.Sets/src/mage/sets/magic2011/Disentomb.java new file mode 100644 index 0000000000..5440a2367f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Disentomb.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Disentomb extends mage.sets.magic2010.Disentomb { + + public Disentomb(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DoomBlade.java b/Mage.Sets/src/mage/sets/magic2011/DoomBlade.java new file mode 100644 index 0000000000..ef92259c9e --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DoomBlade.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DoomBlade extends mage.sets.magic2010.DoomBlade { + + public DoomBlade(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DragonsClaw.java b/Mage.Sets/src/mage/sets/magic2011/DragonsClaw.java new file mode 100644 index 0000000000..f79a8ae409 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DragonsClaw.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DragonsClaw extends mage.sets.tenth.DragonsClaw { + + public DragonsClaw(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DragonskullSummit.java b/Mage.Sets/src/mage/sets/magic2011/DragonskullSummit.java new file mode 100644 index 0000000000..483909cf4b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DragonskullSummit.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DragonskullSummit extends mage.sets.magic2010.DragonskullSummit { + + public DragonskullSummit(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DryadsFavor.java b/Mage.Sets/src/mage/sets/magic2011/DryadsFavor.java new file mode 100644 index 0000000000..51a9d48fd1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DryadsFavor.java @@ -0,0 +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.sets.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.LandwalkAbility; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DryadsFavor extends CardImpl { + + public DryadsFavor(UUID ownerId) { + super(ownerId, "Dryad's Favor", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "M11"; + this.color.setGreen(true); + this.subtype.add("Aura"); + + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + Ability ability = new EnchantAbility(Outcome.Benefit, auraTarget); + this.addAbility(ability); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DryadsFavorEffect())); + + } + + public DryadsFavor(final DryadsFavor card) { + super(card); + } + + @Override + public DryadsFavor copy() { + return new DryadsFavor(this); + } + + @Override + public String getArt() { + return "129161_typ_reg_sty_010.jpg"; + } +} + +class DryadsFavorEffect extends ContinuousEffectImpl { + + private static FilterLandPermanent filter = new FilterLandPermanent("Forest"); + + static { + filter.getSubtype().add("Forest"); + filter.setScopeSubtype(ComparisonScope.Any); + } + + public DryadsFavorEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + } + + public DryadsFavorEffect(final DryadsFavorEffect effect) { + super(effect); + } + + @Override + public DryadsFavorEffect copy() { + return new DryadsFavorEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent creature = game.getPermanent(enchantment.getAttachedTo()); + if (creature != null) { + switch (layer) { + case AbilityAddingRemovingEffects_6: + if (sublayer == SubLayer.NA) { + creature.addAbility(new LandwalkAbility(filter)); + } + break; + } + return true; + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.AbilityAddingRemovingEffects_6; + } + + @Override + public String getText(Ability source) { + return "Enchanted creature has forestwalk"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Duress.java b/Mage.Sets/src/mage/sets/magic2011/Duress.java new file mode 100644 index 0000000000..4e333609f4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Duress.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Duress extends mage.sets.magic2010.Duress { + + public Duress(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/DuskdaleWurm.java b/Mage.Sets/src/mage/sets/magic2011/DuskdaleWurm.java new file mode 100644 index 0000000000..c109105389 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/DuskdaleWurm.java @@ -0,0 +1,70 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DuskdaleWurm extends CardImpl { + + public DuskdaleWurm(UUID ownerId) { + super(ownerId, "Duskdale Wurm", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + this.expansionSetCode = "M11"; + this.subtype.add("Wurm"); + this.color.setGreen(true); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + this.addAbility(TrampleAbility.getInstance()); + } + + public DuskdaleWurm(final DuskdaleWurm card) { + super(card); + } + + @Override + public DuskdaleWurm copy() { + return new DuskdaleWurm(this); + } + + @Override + public String getArt() { + return "113643_typ_reg_sty_010.jpg"; + } + +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/EarthServant.java b/Mage.Sets/src/mage/sets/magic2011/EarthServant.java new file mode 100644 index 0000000000..ebf58fc854 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/EarthServant.java @@ -0,0 +1,134 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.CardImpl; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class EarthServant extends CardImpl { + + public EarthServant(UUID ownerId) { + super(ownerId, "Earth Servant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Elemental"); + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EarthServantEffect())); + } + + public EarthServant(final EarthServant card) { + super(card); + } + + @Override + public EarthServant copy() { + return new EarthServant(this); + } + + @Override + public String getArt() { + return "129080_typ_reg_sty_010.jpg"; + } + +} + +class EarthServantEffect extends ContinuousEffectImpl { + + private static FilterLandPermanent filter = new FilterLandPermanent("Mountain"); + + static { + filter.getSubtype().add("Mountain"); + } + + public EarthServantEffect() { + super(Duration.WhileOnBattlefield, Outcome.BoostCreature); + } + + public EarthServantEffect(final EarthServantEffect effect) { + super(effect); + } + + @Override + public EarthServantEffect copy() { + return new EarthServantEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent creature = game.getPermanent(source.getSourceId()); + if (creature != null) { + switch (layer) { + case PTChangingEffects_7: + if (sublayer == SubLayer.ModifyPT_7c) { + int amount = game.getBattlefield().countAll(filter, source.getControllerId()); + creature.addToughness(amount); + } + break; + } + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == layer.PTChangingEffects_7; + } + + @Override + public String getText(Ability source) { + return "Earth Servant gets +0/+1 for each Mountain you control"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/EliteVanguard.java b/Mage.Sets/src/mage/sets/magic2011/EliteVanguard.java new file mode 100644 index 0000000000..f514ab7e4c --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/EliteVanguard.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class EliteVanguard extends mage.sets.magic2010.EliteVanguard { + + public EliteVanguard(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/ElixirOfImmortality.java b/Mage.Sets/src/mage/sets/magic2011/ElixirOfImmortality.java new file mode 100644 index 0000000000..7f66db51e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ElixirOfImmortality.java @@ -0,0 +1,111 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ScryEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ElixirOfImmortality extends CardImpl { + + public ElixirOfImmortality(UUID ownerId) { + super(ownerId, "Elixir Of Immortality", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "M11"; + Costs costs = new CostsImpl(); + costs.add(new GenericManaCost(2)); + costs.add(new TapSourceCost()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(2), costs)); + } + + public ElixirOfImmortality(final ElixirOfImmortality card) { + super(card); + } + + @Override + public ElixirOfImmortality copy() { + return new ElixirOfImmortality(this); + } + + @Override + public String getArt() { + return "129148_typ_reg_sty_010.jpg"; + } + +} + +class ElixerOfImmortalityEffect extends OneShotEffect { + + public ElixerOfImmortalityEffect() { + super(Outcome.GainLife); + } + + public ElixerOfImmortalityEffect(final ElixerOfImmortalityEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + player.gainLife(5, game); + player.removeFromBattlefield(game.getPermanent(source.getSourceId()), game); + player.getLibrary().putOnBottom(game.getCard(source.getSourceId()), game); + player.getLibrary().addAll(player.getGraveyard().getCards(game)); + player.getGraveyard().clear(); + player.getLibrary().shuffle(); + return true; + } + + @Override + public ElixerOfImmortalityEffect copy() { + return new ElixerOfImmortalityEffect(this); + } + + @Override + public String getText(Ability source) { + return "Shuffle Elixir of Immortality and your graveyard into your library"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/ElvishArchdruid.java b/Mage.Sets/src/mage/sets/magic2011/ElvishArchdruid.java new file mode 100644 index 0000000000..0ddf761cdd --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/ElvishArchdruid.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ElvishArchdruid extends mage.sets.magic2010.ElvishArchdruid { + + public ElvishArchdruid(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/EmberHauler.java b/Mage.Sets/src/mage/sets/magic2011/EmberHauler.java new file mode 100644 index 0000000000..a4acc67261 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/EmberHauler.java @@ -0,0 +1,84 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class EmberHauler extends CardImpl { + + public EmberHauler(UUID ownerId) { + super(ownerId, "Ember Hauler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Goblin"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + Costs costs = new CostsImpl(); + costs.add(new GenericManaCost(1)); + costs.add(new SacrificeSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), costs); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public EmberHauler(final EmberHauler card) { + super(card); + } + + @Override + public EmberHauler copy() { + return new EmberHauler(this); + } + + @Override + public String getArt() { + return "129173_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Excommunicate.java b/Mage.Sets/src/mage/sets/magic2011/Excommunicate.java new file mode 100644 index 0000000000..bc689721cc --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Excommunicate.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Excommunicate extends mage.sets.shardsofalara.Excommunicate { + + public Excommunicate(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/FaunaShaman.java b/Mage.Sets/src/mage/sets/magic2011/FaunaShaman.java new file mode 100644 index 0000000000..07c49f5899 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/FaunaShaman.java @@ -0,0 +1,88 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.ColoredManaSymbol; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.Costs; +import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.SearchLibraryRevealPutInHandEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class FaunaShaman extends CardImpl { + + public FaunaShaman(UUID ownerId) { + super(ownerId, "Fauna Shaman", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "M11"; + this.subtype.add("Elf"); + this.subtype.add("Shaman"); + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + Costs costs = new CostsImpl(); + costs.add(new ColoredManaCost(ColoredManaSymbol.G)); + costs.add(new TapSourceCost()); + costs.add(new DiscardTargetCost(new TargetCardInHand(new FilterCreatureCard()))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryRevealPutInHandEffect(new TargetCardInLibrary(new FilterCreatureCard())), costs); + this.addAbility(ability); + } + + public FaunaShaman(final FaunaShaman card) { + super(card); + } + + @Override + public FaunaShaman copy() { + return new FaunaShaman(this); + } + + @Override + public String getArt() { + return "129146_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/FieryHellhound.java b/Mage.Sets/src/mage/sets/magic2011/FieryHellhound.java new file mode 100644 index 0000000000..0d6436f424 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/FieryHellhound.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class FieryHellhound extends mage.sets.magic2010.FieryHellhound { + + public FieryHellhound(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/FireServant.java b/Mage.Sets/src/mage/sets/magic2011/FireServant.java new file mode 100644 index 0000000000..f3cd9cff2f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/FireServant.java @@ -0,0 +1,123 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.StackObject; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class FireServant extends CardImpl { + + public FireServant(UUID ownerId) { + super(ownerId, "Fire Servant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Elemental"); + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FireServantEffect())); + } + + public FireServant(final FireServant card) { + super(card); + } + + @Override + public FireServant copy() { + return new FireServant(this); + } + + @Override + public String getArt() { + return "129085_typ_reg_sty_010.jpg"; + } + +} + +class FireServantEffect extends ReplacementEffectImpl { + + public FireServantEffect() { + super(Duration.WhileOnBattlefield, Outcome.Damage); + } + + public FireServantEffect(final FireServantEffect effect) { + super(effect); + } + + @Override + public FireServantEffect copy() { + return new FireServantEffect(this); + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + switch (event.getType()) { + case DAMAGE_CREATURE: + case DAMAGE_PLAYER: + case DAMAGE_PLANESWALKER: + StackObject spell = game.getStack().getStackObject(event.getSourceId()); + if (spell != null && spell.getControllerId().equals(source.getControllerId()) && spell.getColor().isRed() && + (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { + event.setAmount(event.getAmount() * 2); + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return apply(game, source); + } + + @Override + public String getText(Ability source) { + return "If a red instant or sorcery spell you control would deal damage, it deals double that damage instead"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Fireball.java b/Mage.Sets/src/mage/sets/magic2011/Fireball.java new file mode 100644 index 0000000000..bf151eefae --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Fireball.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Fireball extends mage.sets.magic2010.Fireball { + + public Fireball(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Flashfreeze.java b/Mage.Sets/src/mage/sets/magic2011/Flashfreeze.java new file mode 100644 index 0000000000..625ce9b633 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Flashfreeze.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Flashfreeze extends mage.sets.tenth.Flashfreeze { + + public Flashfreeze(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Fling.java b/Mage.Sets/src/mage/sets/magic2011/Fling.java new file mode 100644 index 0000000000..aa1dfec112 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Fling.java @@ -0,0 +1,114 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Fling extends CardImpl { + + public Fling(UUID ownerId) { + super(ownerId, "Fling", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "M11"; + this.color.setRed(true); + this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, FilterCreaturePermanent.getDefault(), true))); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new FlingEffect()); + } + + public Fling(final Fling card) { + super(card); + } + + @Override + public Fling copy() { + return new Fling(this); + } + + @Override + public String getArt() { + return "03685_typ_reg_sty_010.jpg"; + } +} + +class FlingEffect extends OneShotEffect { + + public FlingEffect() { + super(Outcome.Damage); + } + + public FlingEffect(final FlingEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + int amount = 0; + for (Cost cost: source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + amount = ((SacrificeTargetCost)cost).getPermanents().get(0).getPower().getValue(); + break; + } + } + if (amount > 0) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.damage(amount, source.getSourceId(), game, true); + return true; + } + } + return false; + } + + @Override + public FlingEffect copy() { + return new FlingEffect(this); + } + + @Override + public String getText(Ability source) { + return "Fling deals damage equal to the sacrificed creature's power to target creature or player"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/Fog.java b/Mage.Sets/src/mage/sets/magic2011/Fog.java new file mode 100644 index 0000000000..433530d9f5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Fog.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Fog extends mage.sets.magic2010.Fog { + + public Fog(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Foresee.java b/Mage.Sets/src/mage/sets/magic2011/Foresee.java new file mode 100644 index 0000000000..a9008a6f5e --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Foresee.java @@ -0,0 +1,65 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.effects.common.ScryEffect; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Foresee extends CardImpl { + + public Foresee(UUID ownerId) { + super(ownerId, "Foresee", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{U}"); + this.expansionSetCode = "M11"; + this.color.setBlue(true); + this.getSpellAbility().addEffect(new ScryEffect(4)); + this.getSpellAbility().addEffect(new DrawCardControllerEffect(2)); + } + + public Foresee(final Foresee card) { + super(card); + } + + @Override + public Foresee copy() { + return new Foresee(this); + } + + @Override + public String getArt() { + return "102404_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Forest1.java b/Mage.Sets/src/mage/sets/magic2011/Forest1.java new file mode 100644 index 0000000000..a9c5337e1b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Forest1.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "121707_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Forest2.java b/Mage.Sets/src/mage/sets/magic2011/Forest2.java new file mode 100644 index 0000000000..47534264f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Forest2.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "121708_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Forest3.java b/Mage.Sets/src/mage/sets/magic2011/Forest3.java new file mode 100644 index 0000000000..c50f6d9a79 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Forest3.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "27625_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Forest4.java b/Mage.Sets/src/mage/sets/magic2011/Forest4.java new file mode 100644 index 0000000000..5ccc4f2956 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Forest4.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "106210_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/FrostTitan.java b/Mage.Sets/src/mage/sets/magic2011/FrostTitan.java new file mode 100644 index 0000000000..d52e122e99 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/FrostTitan.java @@ -0,0 +1,156 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.effects.common.SkipNextUntapTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.target.TargetPermanent; +import mage.target.TargetStackObject; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class FrostTitan extends CardImpl { + + public FrostTitan(UUID ownerId) { + super(ownerId, "FrostTitan", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + this.expansionSetCode = "M11"; + this.subtype.add("Giant"); + this.color.setBlue(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + this.addAbility(new FrostTitanAbility1()); + this.addAbility(new FrostTitanAbility2()); + } + + public FrostTitan(final FrostTitan card) { + super(card); + } + + @Override + public FrostTitan copy() { + return new FrostTitan(this); + } + + @Override + public String getArt() { + return "129092_typ_reg_sty_010.jpg"; + } + +} + +class FrostTitanAbility1 extends TriggeredAbilityImpl { + + public FrostTitanAbility1() { + super(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(2)), false); + } + + public FrostTitanAbility1(final FrostTitanAbility1 ability) { + super(ability); + } + + @Override + public FrostTitanAbility1 copy() { + return new FrostTitanAbility1(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.TARGET && event.getTargetId().equals(this.getSourceId()) && game.getOpponents(this.controllerId).contains(event.getPlayerId())) { + this.getTargets().clear(); + TargetStackObject target = new TargetStackObject(); + target.add(event.getSourceId(), game); + this.addTarget(target); + trigger(game, event.getPlayerId()); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever Frost Titan becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {2}"; + } + +} + +class FrostTitanAbility2 extends TriggeredAbilityImpl { + + public FrostTitanAbility2() { + super(Zone.BATTLEFIELD, new TapTargetEffect(), false); + this.addEffect(new SkipNextUntapTargetEffect()); + this.addTarget(new TargetPermanent()); + } + + public FrostTitanAbility2(final FrostTitanAbility2 ability) { + super(ability); + } + + @Override + public FrostTitanAbility2 copy() { + return new FrostTitanAbility2(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) { + trigger(game, event.getPlayerId()); + return true; + } + if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(this.getSourceId()) ) { + ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (zEvent.getToZone() == Zone.BATTLEFIELD) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever Frost Titan enters the battlefield or attacks, tap target permanent. It doesn't untap during its controller's next untap step"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GaeasRevenge.java b/Mage.Sets/src/mage/sets/magic2011/GaeasRevenge.java new file mode 100644 index 0000000000..90072dcb53 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GaeasRevenge.java @@ -0,0 +1,86 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CantCounterSourceEffect; +import mage.abilities.effects.common.CantTargetSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.filter.FilterStackObject; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GaeasRevenge extends CardImpl { + + private static FilterStackObject filter = new FilterStackObject("nongreen spells or abilities from nongreen sources"); + + static { + filter.getColor().setGreen(true); + filter.setNotColor(true); + filter.setUseColor(true); + } + + public GaeasRevenge(UUID ownerId) { + super(ownerId, "GaeasRevenge", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + this.expansionSetCode = "M11"; + this.subtype.add("Elemental"); + this.color.setGreen(true); + this.power = new MageInt(8); + this.toughness = new MageInt(5); + + this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantCounterSourceEffect())); + this.addAbility(HasteAbility.getInstance()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantTargetSourceEffect(filter, Duration.WhileOnBattlefield))); + + } + + public GaeasRevenge(final GaeasRevenge card) { + super(card); + } + + @Override + public GaeasRevenge copy() { + return new GaeasRevenge(this); + } + + @Override + public String getArt() { + return "129122_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GargoyleSentinel.java b/Mage.Sets/src/mage/sets/magic2011/GargoyleSentinel.java new file mode 100644 index 0000000000..153cfbfd4c --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GargoyleSentinel.java @@ -0,0 +1,133 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GargoyleSentinel extends CardImpl { + + public GargoyleSentinel(UUID ownerId) { + super(ownerId, "Gargoyle Sentinel", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + this.expansionSetCode = "M11"; + this.subtype.add("Gargoyle"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + this.addAbility(DefenderAbility.getInstance()); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GargoyleSentinelEffect(), new ManaCostsImpl("{3}"))); + } + + public GargoyleSentinel(final GargoyleSentinel card) { + super(card); + } + + @Override + public GargoyleSentinel copy() { + return new GargoyleSentinel(this); + } + + @Override + public String getArt() { + return "129079_typ_reg_sty_010.jpg"; + } + +} + +class GargoyleSentinelEffect extends ContinuousEffectImpl { + + public GargoyleSentinelEffect() { + super(Duration.EndOfTurn, Outcome.AddAbility); + } + + public GargoyleSentinelEffect(final GargoyleSentinelEffect effect) { + super(effect); + } + + @Override + public GargoyleSentinelEffect copy() { + return new GargoyleSentinelEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + switch (layer) { + case AbilityAddingRemovingEffects_6: + if (sublayer == SubLayer.NA) { + for (Ability ability: permanent.getAbilities()) { + if (ability.getId().equals(DefenderAbility.getInstance().getId())) + permanent.getAbilities().remove(ability); + } + permanent.getAbilities().add(FlyingAbility.getInstance()); + } + break; + } + return true; + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public String getText(Ability source) { + return "Until end of turn, Gargoyle Sentinel loses defender and gains flying"; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.AbilityAddingRemovingEffects_6; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GarrukWildspeaker.java b/Mage.Sets/src/mage/sets/magic2011/GarrukWildspeaker.java new file mode 100644 index 0000000000..bdde36a440 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GarrukWildspeaker.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GarrukWildspeaker extends mage.sets.magic2010.GarrukWildspeaker { + + public GarrukWildspeaker(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GarruksCompanion.java b/Mage.Sets/src/mage/sets/magic2011/GarruksCompanion.java new file mode 100644 index 0000000000..af20fd4944 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GarruksCompanion.java @@ -0,0 +1,69 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GarruksCompanion extends CardImpl { + + public GarruksCompanion(UUID ownerId) { + super(ownerId, "Garruk's Companion", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}{G}"); + this.expansionSetCode = "M11"; + this.subtype.add("Beast"); + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + this.addAbility(TrampleAbility.getInstance()); + } + + public GarruksCompanion(final GarruksCompanion card) { + super(card); + } + + @Override + public GarruksCompanion copy() { + return new GarruksCompanion(this); + } + + @Override + public String getArt() { + return "129114_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GarruksPackleader.java b/Mage.Sets/src/mage/sets/magic2011/GarruksPackleader.java new file mode 100644 index 0000000000..4228bd5de2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GarruksPackleader.java @@ -0,0 +1,113 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GarruksPackleader extends CardImpl { + + public GarruksPackleader(UUID ownerId) { + super(ownerId, "GarruksPackleader", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "M11"; + this.subtype.add("Beast"); + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + this.addAbility(new GarruksPackleaderAbility()); + } + + public GarruksPackleader(final GarruksPackleader card) { + super(card); + } + + @Override + public GarruksPackleader copy() { + return new GarruksPackleader(this); + } + + @Override + public String getArt() { + return "129147_typ_reg_sty_010.jpg"; + } + +} + +class GarruksPackleaderAbility extends TriggeredAbilityImpl { + + public GarruksPackleaderAbility() { + super(Zone.BATTLEFIELD, new DrawCardControllerEffect(1), true); + } + + public GarruksPackleaderAbility(final GarruksPackleaderAbility ability) { + super(ability); + } + + @Override + public GarruksPackleaderAbility copy() { + return new GarruksPackleaderAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.ZONE_CHANGE && !event.getTargetId().equals(this.getSourceId())) { + ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (zEvent.getToZone() == Zone.BATTLEFIELD) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && permanent.getCardType().contains(CardType.CREATURE) && permanent.getPower().getValue() > 2) { + trigger(game, this.controllerId); + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever another creature with power 3 or greater enters the battlefield under your control, you may draw a card"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GiantGrowth.java b/Mage.Sets/src/mage/sets/magic2011/GiantGrowth.java new file mode 100644 index 0000000000..137164d153 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GiantGrowth.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GiantGrowth extends mage.sets.tenth.GiantGrowth { + + public GiantGrowth(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GiantSpider.java b/Mage.Sets/src/mage/sets/magic2011/GiantSpider.java new file mode 100644 index 0000000000..ac9aa29fd1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GiantSpider.java @@ -0,0 +1,45 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GiantSpider extends mage.sets.tenth.GiantSpider { + + public GiantSpider(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/GlacialFortress.java b/Mage.Sets/src/mage/sets/magic2011/GlacialFortress.java new file mode 100644 index 0000000000..144f2becf3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GlacialFortress.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GlacialFortress extends mage.sets.magic2010.GlacialFortress { + + public GlacialFortress(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GoblinBalloonBrigade.java b/Mage.Sets/src/mage/sets/magic2011/GoblinBalloonBrigade.java new file mode 100644 index 0000000000..4210152a88 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GoblinBalloonBrigade.java @@ -0,0 +1,75 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinBalloonBrigade extends CardImpl { + + public GoblinBalloonBrigade(UUID ownerId) { + super(ownerId, "Goblin Balloon Brigade", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public GoblinBalloonBrigade(final GoblinBalloonBrigade card) { + super(card); + } + + @Override + public GoblinBalloonBrigade copy() { + return new GoblinBalloonBrigade(this); + } + + @Override + public String getArt() { + return "86949_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GoblinChieftain.java b/Mage.Sets/src/mage/sets/magic2011/GoblinChieftain.java new file mode 100644 index 0000000000..8008331891 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GoblinChieftain.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinChieftain extends mage.sets.magic2010.GoblinChieftain { + + public GoblinChieftain(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GoblinPiker.java b/Mage.Sets/src/mage/sets/magic2011/GoblinPiker.java new file mode 100644 index 0000000000..30edb3c259 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GoblinPiker.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinPiker extends mage.sets.tenth.GoblinPiker { + + public GoblinPiker(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GoblinTunneler.java b/Mage.Sets/src/mage/sets/magic2011/GoblinTunneler.java new file mode 100644 index 0000000000..fea8003edd --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GoblinTunneler.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinTunneler extends mage.sets.riseoftheeldrazi.GoblinTunneler { + + public GoblinTunneler(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GoldenglowMoth.java b/Mage.Sets/src/mage/sets/magic2011/GoldenglowMoth.java new file mode 100644 index 0000000000..95837f326f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GoldenglowMoth.java @@ -0,0 +1,73 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.BlocksTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoldenglowMoth extends CardImpl { + + public GoldenglowMoth(UUID ownerId) { + super(ownerId, "Goldenglow Moth", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "M11"; + this.subtype.add("Insect"); + this.color.setWhite(true); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new BlocksTriggeredAbility(new GainLifeEffect(4), true)); + + } + + public GoldenglowMoth(final GoldenglowMoth card) { + super(card); + } + + @Override + public GoldenglowMoth copy() { + return new GoldenglowMoth(this); + } + + @Override + public String getArt() { + return "111904_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GraveTitan.java b/Mage.Sets/src/mage/sets/magic2011/GraveTitan.java new file mode 100644 index 0000000000..8f106f6d14 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GraveTitan.java @@ -0,0 +1,116 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.token.ZombieToken; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GraveTitan extends CardImpl { + + public GraveTitan(UUID ownerId) { + super(ownerId, "Grave Titan", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "M11"; + this.subtype.add("Giant"); + this.color.setBlack(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + this.addAbility(DeathtouchAbility.getInstance()); + this.addAbility(new GraveTitanAbility()); + } + + public GraveTitan(final GraveTitan card) { + super(card); + } + + @Override + public GraveTitan copy() { + return new GraveTitan(this); + } + + @Override + public String getArt() { + return "129102_typ_reg_sty_010.jpg"; + } + +} + +class GraveTitanAbility extends TriggeredAbilityImpl { + + public GraveTitanAbility() { + super(Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieToken(), 2), false); + } + + public GraveTitanAbility(final GraveTitanAbility ability) { + super(ability); + } + + @Override + public GraveTitanAbility copy() { + return new GraveTitanAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) { + trigger(game, event.getPlayerId()); + return true; + } + if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(this.getSourceId()) ) { + ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (zEvent.getToZone() == Zone.BATTLEFIELD) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever Grave Titan enters the battlefield or attacks, put two 2/2 black Zombie creature tokens onto the battlefield"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Gravedigger.java b/Mage.Sets/src/mage/sets/magic2011/Gravedigger.java new file mode 100644 index 0000000000..cd1f285c20 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Gravedigger.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Gravedigger extends mage.sets.tenth.Gravedigger { + + public Gravedigger(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/GreaterBasilisk.java b/Mage.Sets/src/mage/sets/magic2011/GreaterBasilisk.java new file mode 100644 index 0000000000..1533e95f81 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/GreaterBasilisk.java @@ -0,0 +1,69 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GreaterBasilisk extends CardImpl { + + public GreaterBasilisk(UUID ownerId) { + super(ownerId, "Greater Basilisk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "M11"; + this.subtype.add("Basilisk"); + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + this.addAbility(DeathtouchAbility.getInstance()); + } + + public GreaterBasilisk(final GreaterBasilisk card) { + super(card); + } + + @Override + public GreaterBasilisk copy() { + return new GreaterBasilisk(this); + } + + @Override + public String getArt() { + return "129106_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HarborSerpent.java b/Mage.Sets/src/mage/sets/magic2011/HarborSerpent.java new file mode 100644 index 0000000000..75fe6d101b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HarborSerpent.java @@ -0,0 +1,133 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.LandwalkAbility; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.common.FilterLandPermanent; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HarborSerpent extends CardImpl { + + private static FilterLandPermanent filter = new FilterLandPermanent("Island"); + + static { + filter.getSubtype().add("Island"); + filter.setScopeSubtype(ComparisonScope.Any); + } + + public HarborSerpent(UUID ownerId) { + super(ownerId, "Harbor Serpent", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + this.expansionSetCode = "M11"; + this.subtype.add("Serpent"); + this.color.setBlue(true); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + this.addAbility(new LandwalkAbility(filter)); + } + + public HarborSerpent(final HarborSerpent card) { + super(card); + } + + @Override + public HarborSerpent copy() { + return new HarborSerpent(this); + } + + @Override + public String getArt() { + return "129069_typ_reg_sty_010.jpg"; + } + +} + +class HarborSerpentEffect extends ReplacementEffectImpl { + + private static FilterLandPermanent filter = new FilterLandPermanent("Island"); + + static { + filter.getSubtype().add("Island"); + filter.setScopeSubtype(ComparisonScope.Any); + } + + public HarborSerpentEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + } + + public HarborSerpentEffect(final HarborSerpentEffect effect) { + super(effect); + } + + @Override + public HarborSerpentEffect copy() { + return new HarborSerpentEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.DECLARE_ATTACKER && source.getSourceId().equals(event.getSourceId())) { + game.getBattlefield().countAll(filter); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "Harbor Serpent can't attack unless there are five or more Islands on the battlefield"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HauntingEchoes.java b/Mage.Sets/src/mage/sets/magic2011/HauntingEchoes.java new file mode 100644 index 0000000000..b62b2b08f4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HauntingEchoes.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HauntingEchoes extends mage.sets.magic2010.HauntingEchoes { + + public HauntingEchoes(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HoardingDragon.java b/Mage.Sets/src/mage/sets/magic2011/HoardingDragon.java new file mode 100644 index 0000000000..48a515328f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HoardingDragon.java @@ -0,0 +1,133 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HoardingDragon extends CardImpl { + + private static FilterCard filter = new FilterCard(); + + static { + filter.getCardType().add(CardType.ARTIFACT); + } + + public HoardingDragon(UUID ownerId) { + super(ownerId, "Hoarding Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Dragon"); + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + this.addAbility(FlyingAbility.getInstance()); + Ability ability1 = new EntersBattlefieldTriggeredAbility(new HoardingDragonEffect(this.getId()), true); + this.addAbility(ability1); + Ability ability2 = new PutIntoGraveFromBattlefieldTriggeredAbility(new ReturnFromExileEffect(this.getId(), Zone.BATTLEFIELD), true); + this.addAbility(ability2); + } + + public HoardingDragon(final HoardingDragon card) { + super(card); + } + + @Override + public HoardingDragon copy() { + return new HoardingDragon(this); + } + + @Override + public String getArt() { + return "129166_typ_reg_sty_010.jpg"; + } + +} + +class HoardingDragonEffect extends OneShotEffect { + + protected UUID exileId; + protected TargetCardInLibrary target; + + public HoardingDragonEffect(UUID exileId) { + super(Outcome.Exile); + this.exileId = exileId; + target = new TargetCardInLibrary(); + } + + public HoardingDragonEffect(final HoardingDragonEffect effect) { + super(effect); + this.exileId = effect.exileId; + this.target = effect.target.copy(); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + player.searchLibrary(target, game); + if (target.getTargets().size() > 0) { + Card card = player.getLibrary().remove(target.getFirstTarget(), game); + if (card != null){ + game.getExile().add(exileId, "Hoarding Dragon exile", card); + } + player.shuffleLibrary(game); + } + return true; + } + + @Override + public HoardingDragonEffect copy() { + return new HoardingDragonEffect(this); + } + + @Override + public String getText(Ability source) { + return "When Hoarding Dragon enters the battlefield, you may search your library for an artifact card, exile it, then shuffle your library"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HolyStrength.java b/Mage.Sets/src/mage/sets/magic2011/HolyStrength.java new file mode 100644 index 0000000000..a86c6ac834 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HolyStrength.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HolyStrength extends mage.sets.tenth.HolyStrength { + + public HolyStrength(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HonorOfThePure.java b/Mage.Sets/src/mage/sets/magic2011/HonorOfThePure.java new file mode 100644 index 0000000000..6a3ca3a296 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HonorOfThePure.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HonorOfThePure extends mage.sets.magic2010.HonorOfThePure { + + public HonorOfThePure(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HornetSting.java b/Mage.Sets/src/mage/sets/magic2011/HornetSting.java new file mode 100644 index 0000000000..4f0c5a7b1f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HornetSting.java @@ -0,0 +1,65 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HornetSting extends CardImpl { + + public HornetSting(UUID ownerId) { + super(ownerId, "Hornet Sting", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "M11"; + this.color.setGreen(true); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().addEffect(new DamageTargetEffect(1)); + } + + public HornetSting(final HornetSting card) { + super(card); + } + + @Override + public HornetSting copy() { + return new HornetSting(this); + } + + @Override + public String getArt() { + return "129139_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HowlingBanshee.java b/Mage.Sets/src/mage/sets/magic2011/HowlingBanshee.java new file mode 100644 index 0000000000..207efebf71 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HowlingBanshee.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HowlingBanshee extends mage.sets.magic2010.HowlingBanshee { + + public HowlingBanshee(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/HuntersFeast.java b/Mage.Sets/src/mage/sets/magic2011/HuntersFeast.java new file mode 100644 index 0000000000..6a6d205e1c --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/HuntersFeast.java @@ -0,0 +1,65 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HuntersFeast extends CardImpl { + + public HuntersFeast(UUID ownerId) { + super(ownerId, "Hunters' Feast", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{G}"); + this.expansionSetCode = "M11"; + this.color.setGreen(true); + this.getSpellAbility().addTarget(new TargetPlayer(0)); + this.getSpellAbility().addEffect(new GainLifeTargetEffect(6)); + } + + public HuntersFeast(final HuntersFeast card) { + super(card); + } + + @Override + public HuntersFeast copy() { + return new HuntersFeast(this); + } + + @Override + public String getArt() { + return "129126_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/IceCage.java b/Mage.Sets/src/mage/sets/magic2011/IceCage.java new file mode 100644 index 0000000000..8921db39f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/IceCage.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class IceCage extends mage.sets.magic2010.IceCage { + + public IceCage(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Incite.java b/Mage.Sets/src/mage/sets/magic2011/Incite.java new file mode 100644 index 0000000000..1316866393 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Incite.java @@ -0,0 +1,105 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.AttacksIfAbleTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Incite extends CardImpl { + + public Incite(UUID ownerId) { + super(ownerId, "Incite", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "M11"; + this.color.setRed(true); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new InciteEffect()); + this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect()); + } + + public Incite(final Incite card) { + super(card); + } + + @Override + public Incite copy() { + return new Incite(this); + } + + @Override + public String getArt() { + return "129134_typ_reg_sty_010.jpg"; + } +} + +class InciteEffect extends ContinuousEffectImpl { + + public InciteEffect() { + super(Duration.EndOfTurn, Layer.ColorChangingEffects_5, SubLayer.NA, Outcome.Detriment); + } + + public InciteEffect(final InciteEffect effect) { + super(effect); + } + + @Override + public InciteEffect copy() { + return new InciteEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.getColor().setRed(true); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "Target creature becomes red until end of turn"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/InfantryVeteran.java b/Mage.Sets/src/mage/sets/magic2011/InfantryVeteran.java new file mode 100644 index 0000000000..badaefd3df --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/InfantryVeteran.java @@ -0,0 +1,78 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class InfantryVeteran extends CardImpl { + + public InfantryVeteran(UUID ownerId) { + super(ownerId, "Infantry Veteran", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "M11"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetAttackingCreature()); + this.addAbility(ability); + } + + public InfantryVeteran(final InfantryVeteran card) { + super(card); + } + + @Override + public InfantryVeteran copy() { + return new InfantryVeteran(this); + } + + @Override + public String getArt() { + return "2191_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/InfernoTitan.java b/Mage.Sets/src/mage/sets/magic2011/InfernoTitan.java new file mode 100644 index 0000000000..99c113ac40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/InfernoTitan.java @@ -0,0 +1,118 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.BoostSourceEffect; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class InfernoTitan extends CardImpl { + + public InfernoTitan(UUID ownerId) { + super(ownerId, "Inferno Titan", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.expansionSetCode = "M11"; + this.subtype.add("Giant"); + this.color.setRed(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + this.addAbility(new InfernoTitanAbility()); + } + + public InfernoTitan(final InfernoTitan card) { + super(card); + } + + @Override + public InfernoTitan copy() { + return new InfernoTitan(this); + } + + @Override + public String getArt() { + return "129131_typ_reg_sty_010.jpg"; + } + +} + +class InfernoTitanAbility extends TriggeredAbilityImpl { + + public InfernoTitanAbility() { + super(Zone.BATTLEFIELD, new DamageMultiEffect(3), false); + } + + public InfernoTitanAbility(final InfernoTitanAbility ability) { + super(ability); + } + + @Override + public InfernoTitanAbility copy() { + return new InfernoTitanAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.ATTACKER_DECLARED && event.getSourceId().equals(this.getSourceId())) { + trigger(game, event.getPlayerId()); + return true; + } + if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(this.getSourceId()) ) { + ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (zEvent.getToZone() == Zone.BATTLEFIELD) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever Inferno Titan enters the battlefield or attacks, it deals 3 damage divided as you choose among one, two, or three target creatures and/or players."; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/InspiredCharge.java b/Mage.Sets/src/mage/sets/magic2011/InspiredCharge.java new file mode 100644 index 0000000000..c33fff5fe4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/InspiredCharge.java @@ -0,0 +1,64 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.BoostControlledEffect; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class InspiredCharge extends CardImpl { + + public InspiredCharge(UUID ownerId) { + super(ownerId, "Inspired Charge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); + this.expansionSetCode = "M11"; + this.color.setWhite(true); + this.getSpellAbility().addEffect(new BoostControlledEffect(2, 1, Duration.EndOfTurn)); + } + + public InspiredCharge(final InspiredCharge card) { + super(card); + } + + @Override + public InspiredCharge copy() { + return new InspiredCharge(this); + } + + @Override + public String getArt() { + return "129157_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Island1.java b/Mage.Sets/src/mage/sets/magic2011/Island1.java new file mode 100644 index 0000000000..2e3168b841 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Island1.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "121687_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Island2.java b/Mage.Sets/src/mage/sets/magic2011/Island2.java new file mode 100644 index 0000000000..90d806969e --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Island2.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "121700_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Island3.java b/Mage.Sets/src/mage/sets/magic2011/Island3.java new file mode 100644 index 0000000000..7ee280d3df --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Island3.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "6779_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Island4.java b/Mage.Sets/src/mage/sets/magic2011/Island4.java new file mode 100644 index 0000000000..778e024f91 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Island4.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "106211_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/JaceBeleren.java b/Mage.Sets/src/mage/sets/magic2011/JaceBeleren.java new file mode 100644 index 0000000000..5ec96184c5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/JaceBeleren.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class JaceBeleren extends mage.sets.magic2010.JaceBeleren { + + public JaceBeleren(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magic2011/JacesErasure.java b/Mage.Sets/src/mage/sets/magic2011/JacesErasure.java new file mode 100644 index 0000000000..59a3390444 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/JacesErasure.java @@ -0,0 +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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.target.TargetPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class JacesErasure extends CardImpl { + + public JacesErasure(UUID ownerId) { + super(ownerId, "Jace's Erasure", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "M11"; + this.color.setBlue(true); + Ability ability = new JacesErasureAbility(); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public JacesErasure(final JacesErasure card) { + super(card); + } + + @Override + public JacesErasure copy() { + return new JacesErasure(this); + } + + @Override + public String getArt() { + return "125788_typ_reg_sty_010.jpg"; + } + +} + +class JacesErasureAbility extends TriggeredAbilityImpl { + + public JacesErasureAbility() { + super(Zone.GRAVEYARD, new PutLibraryIntoGraveTargetEffect(1), true); + } + + public JacesErasureAbility(final JacesErasureAbility ability) { + super(ability); + } + + @Override + public JacesErasureAbility copy() { + return new JacesErasureAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.DREW_CARD && event.getPlayerId().equals(controllerId)) { + trigger(game, event.getPlayerId()); + return true; + } + return false; + } + + @Override + public String getRule() { + return "Whenever you draw a card, you may have target player put the top card of his or her library into his or her graveyard."; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/JacesIngenuity.java b/Mage.Sets/src/mage/sets/magic2011/JacesIngenuity.java new file mode 100644 index 0000000000..903626983f --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/JacesIngenuity.java @@ -0,0 +1,64 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class JacesIngenuity extends CardImpl { + + public JacesIngenuity(UUID ownerId) { + super(ownerId, "Jace's Ingenuity", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); + this.expansionSetCode = "M11"; + this.color.setBlue(true); + this.getSpellAbility().addEffect(new DrawCardControllerEffect(3)); + } + + public JacesIngenuity(final JacesIngenuity card) { + super(card); + } + + @Override + public JacesIngenuity copy() { + return new JacesIngenuity(this); + } + + @Override + public String getArt() { + return "129105_typ_reg_sty_010.jpg"; + } +} + diff --git a/Mage.Sets/src/mage/sets/magic2011/JinxedIdol.java b/Mage.Sets/src/mage/sets/magic2011/JinxedIdol.java new file mode 100644 index 0000000000..f818337e03 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/JinxedIdol.java @@ -0,0 +1,112 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.DamageControllerEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class JinxedIdol extends CardImpl { + + public JinxedIdol(UUID ownerId) { + super(ownerId, "Jinxed Idol", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "M11"; + this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new DamageControllerEffect(2))); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new JinxedIdolEffect(), new SacrificeTargetCost(new TargetControlledPermanent(1, 1, FilterCreaturePermanent.getDefault(), true))); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public JinxedIdol(final JinxedIdol card) { + super(card); + } + + @Override + public JinxedIdol copy() { + return new JinxedIdol(this); + } + + @Override + public String getArt() { + return "129171_typ_reg_sty_010.jpg"; + } + +} + +class JinxedIdolEffect extends ContinuousEffectImpl { + + public JinxedIdolEffect() { + super(Duration.WhileOnBattlefield, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + } + + public JinxedIdolEffect(final JinxedIdolEffect effect) { + super(effect); + } + + @Override + public JinxedIdolEffect copy() { + return new JinxedIdolEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + return permanent.changeControllerId(source.getFirstTarget(), game); + } + return false; + } + + @Override + public String getText(Ability source) { + return "Target opponent gains control of Jinxed Idol"; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/Juggernaut.java b/Mage.Sets/src/mage/sets/magic2011/Juggernaut.java new file mode 100644 index 0000000000..63d4b5b52b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/Juggernaut.java @@ -0,0 +1,49 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Juggernaut extends mage.sets.tenth.Juggernaut { + + public Juggernaut(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + + @Override + public String getArt() { + return "129164_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/KnightExemplar.java b/Mage.Sets/src/mage/sets/magic2011/KnightExemplar.java new file mode 100644 index 0000000000..2e7c81d846 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/KnightExemplar.java @@ -0,0 +1,85 @@ +/* + * 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.magic2011; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.BoostControlledEffect; +import mage.abilities.effects.common.GainAbilityControlledEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class KnightExemplar extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("Knight creatures"); + + static { + filter.getSubtype().add("Knight"); + } + + public KnightExemplar(UUID ownerId) { + super(ownerId, "Knight Exemplar", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "M11"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(FirstStrikeAbility.getInstance()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + } + + public KnightExemplar(final KnightExemplar card) { + super(card); + } + + @Override + public KnightExemplar copy() { + return new KnightExemplar(this); + } + + @Override + public String getArt() { + return "129082_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/KrakensEye.java b/Mage.Sets/src/mage/sets/magic2011/KrakensEye.java new file mode 100644 index 0000000000..96fdf52edc --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/KrakensEye.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class KrakensEye extends mage.sets.tenth.KrakensEye { + + public KrakensEye(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/magic2011/LavaAxe.java b/Mage.Sets/src/mage/sets/magic2011/LavaAxe.java new file mode 100644 index 0000000000..6bc5ef523a --- /dev/null +++ b/Mage.Sets/src/mage/sets/magic2011/LavaAxe.java @@ -0,0 +1,44 @@ +/* + * 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.magic2011; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class LavaAxe extends mage.sets.tenth.LavaAxe { + + public LavaAxe(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "M11"; + } + +} diff --git a/Mage.Sets/src/mage/sets/planechase/OblivionRing.java b/Mage.Sets/src/mage/sets/planechase/OblivionRing.java index 801b007313..dc3fc19f13 100644 --- a/Mage.Sets/src/mage/sets/planechase/OblivionRing.java +++ b/Mage.Sets/src/mage/sets/planechase/OblivionRing.java @@ -28,52 +28,17 @@ package mage.sets.planechase; -import mage.abilities.effects.common.ReturnFromExileEffect; import java.util.UUID; -import mage.Constants.CardType; -import mage.Constants.TargetController; -import mage.Constants.Zone; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.LeavesBattlefieldTriggeredAbility; -import mage.abilities.effects.common.ExileTargetEffect; -import mage.cards.CardImpl; -import mage.filter.common.FilterNonlandPermanent; -import mage.sets.Planechase; -import mage.target.TargetPermanent; /** * * @author BetaSteward_at_googlemail.com */ -public class OblivionRing extends CardImpl { +public class OblivionRing extends mage.sets.shardsofalara.OblivionRing { public OblivionRing(UUID ownerId) { - super(ownerId, "Oblivion Ring", new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); - this.expansionSetId = Planechase.getInstance().getId(); - this.color.setWhite(true); - FilterNonlandPermanent filter = new FilterNonlandPermanent(); - filter.setId(this.getId()); - filter.setNotId(true); - Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(this.getId(), "Oblivion Ring exile"), false); - ability1.addTarget(new TargetPermanent(filter, TargetController.ANY)); - this.addAbility(ability1); - Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileEffect(this.getId(), Zone.BATTLEFIELD), false); - this.addAbility(ability2); - } - - public OblivionRing(final OblivionRing card) { - super(card); - } - - @Override - public OblivionRing copy() { - return new OblivionRing(this); - } - - @Override - public String getArt() { - return "115005_typ_reg_sty_010.jpg"; + super(ownerId); + this.expansionSetCode = "HOP"; } } diff --git a/Mage.Sets/src/mage/sets/planechase/SoulWarden.java b/Mage.Sets/src/mage/sets/planechase/SoulWarden.java index 24449440c5..8ed5f5e827 100644 --- a/Mage.Sets/src/mage/sets/planechase/SoulWarden.java +++ b/Mage.Sets/src/mage/sets/planechase/SoulWarden.java @@ -29,82 +29,16 @@ package mage.sets.planechase; import java.util.UUID; -import mage.Constants.CardType; -import mage.Constants.Zone; -import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.effects.common.GainLifeEffect; -import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.ZoneChangeEvent; -import mage.game.permanent.Permanent; -import mage.sets.Planechase; /** * * @author BetaSteward_at_googlemail.com */ -public class SoulWarden extends CardImpl { +public class SoulWarden extends mage.sets.magic2010.SoulWarden { public SoulWarden(UUID ownerId) { - super(ownerId, "Soul Warden", new CardType[]{CardType.CREATURE}, "{W}"); - this.expansionSetId = Planechase.getInstance().getId(); - this.subtype.add("Human"); - this.subtype.add("Cleric"); - this.color.setWhite(true); - this.power = new MageInt(1); - this.toughness = new MageInt(1); - this.addAbility(new SoulWardenAbility()); - } - - public SoulWarden(final SoulWarden card) { - super(card); - } - - @Override - public SoulWarden copy() { - return new SoulWarden(this); - } - - @Override - public String getArt() { - return "05621_typ_reg_sty_010.jpg"; - } - -} - -class SoulWardenAbility extends TriggeredAbilityImpl { - - public SoulWardenAbility() { - super(Zone.BATTLEFIELD, new GainLifeEffect(1)); - } - - public SoulWardenAbility(final SoulWardenAbility ability) { - super(ability); - } - - @Override - public SoulWardenAbility copy() { - return new SoulWardenAbility(this); - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).getToZone() == Zone.BATTLEFIELD) { - Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.getCardType().contains(CardType.CREATURE) && !permanent.getId().equals(this.getSourceId())) { - trigger(game, this.controllerId); - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "Whenever another creature enters the battlefield, " + super.getRule(); + super(ownerId); + this.expansionSetCode = "HOP"; } } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java new file mode 100644 index 0000000000..5431e96f18 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/AwakeningZone.java @@ -0,0 +1,67 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.common.OnEventTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.token.EldraziSpawnToken; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AwakeningZone extends CardImpl { + + public AwakeningZone(UUID ownerId) { + super(ownerId, "Awakening Zone", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "ROE"; + this.getColor().setGreen(true); + this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new CreateTokenEffect(new EldraziSpawnToken()), true)); + } + + public AwakeningZone(final AwakeningZone card) { + super(card); + } + + @Override + public AwakeningZone copy() { + return new AwakeningZone(this); + } + + @Override + public String getArt() { + return "127314_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/BloodthroneVampire.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BloodthroneVampire.java new file mode 100644 index 0000000000..dcb1141f6b --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BloodthroneVampire.java @@ -0,0 +1,73 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BloodthroneVampire extends CardImpl { + + public BloodthroneVampire(UUID ownerId) { + super(ownerId, "Bloodthrone Vampire", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ROE"; + this.color.setBlack(true); + this.subtype.add("Vampire"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2, 2, Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(1, 1, FilterCreaturePermanent.getDefault(), true)))); + } + + public BloodthroneVampire(final BloodthroneVampire card) { + super(card); + } + + @Override + public BloodthroneVampire copy() { + return new BloodthroneVampire(this); + } + + @Override + public String getArt() { + return "127479_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java index cf27aa2031..8c156429d6 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Deprive.java @@ -30,11 +30,11 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.costs.common.ReturnToHandTargetCost; import mage.abilities.effects.common.CounterTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterLandPermanent; -import mage.sets.RiseOfTheEldrazi; import mage.target.TargetSpell; import mage.target.common.TargetControlledPermanent; @@ -45,10 +45,10 @@ import mage.target.common.TargetControlledPermanent; public class Deprive extends CardImpl { public Deprive(UUID ownerId) { - super(ownerId, "Deprive", new CardType[]{CardType.INSTANT}, "{U}{U}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Deprive", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}{U}"); + this.expansionSetCode = "ROE"; this.color.setBlue(true); - this.getSpellAbility().addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(1, 1, new FilterLandPermanent()))); + this.getSpellAbility().addCost(new ReturnToHandTargetCost(new TargetControlledPermanent(1, 1, new FilterLandPermanent(), true))); this.getSpellAbility().addTarget(new TargetSpell()); this.getSpellAbility().addEffect(new CounterTargetEffect()); } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulsHatcher.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulsHatcher.java index 041a870e50..788df0ebb9 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulsHatcher.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EmrakulsHatcher.java @@ -30,12 +30,12 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.game.permanent.token.EldraziSpawnToken; -import mage.sets.RiseOfTheEldrazi; /** * @@ -44,8 +44,8 @@ import mage.sets.RiseOfTheEldrazi; public class EmrakulsHatcher extends CardImpl { public EmrakulsHatcher(UUID ownerId) { - super(ownerId, "Emrakul's Hatcher", new CardType[]{CardType.CREATURE}, "{4}{R}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Emrakul's Hatcher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ROE"; this.subtype.add("Eldrazi"); this.subtype.add("Drone"); this.color.setRed(true); @@ -66,7 +66,7 @@ public class EmrakulsHatcher extends CardImpl { @Override public String getArt() { - return ""; + return "127298_typ_reg_sty_010.jpg"; } } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EvolvingWilds.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EvolvingWilds.java index 938ae13771..15ff8d76c6 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/EvolvingWilds.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/EvolvingWilds.java @@ -31,6 +31,7 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.common.SacrificeSourceCost; @@ -38,7 +39,6 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.SearchLibraryPutInPlayEffect; import mage.cards.CardImpl; import mage.filter.common.FilterBasicLandCard; -import mage.sets.RiseOfTheEldrazi; import mage.target.common.TargetCardInLibrary; /** @@ -48,8 +48,8 @@ import mage.target.common.TargetCardInLibrary; public class EvolvingWilds extends CardImpl { public EvolvingWilds(UUID ownerId) { - super(ownerId, "Evolving Wilds", new CardType[]{CardType.LAND}, null); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Evolving Wilds", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ROE"; this.addAbility(new EvolvingWildsAbility()); } @@ -64,7 +64,7 @@ public class EvolvingWilds extends CardImpl { @Override public String getArt() { - return ""; + return "127296_typ_reg_sty_010.jpg"; } } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/FlameSlash.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/FlameSlash.java index 95b8a9a60e..e75e2c6df2 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/FlameSlash.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/FlameSlash.java @@ -30,9 +30,9 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; -import mage.sets.RiseOfTheEldrazi; import mage.target.common.TargetCreaturePermanent; /** @@ -42,8 +42,8 @@ import mage.target.common.TargetCreaturePermanent; public class FlameSlash extends CardImpl { public FlameSlash(UUID ownerId) { - super(ownerId, "Flame Slash", new CardType[]{CardType.SORCERY}, "{R}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Flame Slash", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{R}"); + this.expansionSetCode = "ROE"; this.color.setRed(true); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new DamageTargetEffect(4)); @@ -60,7 +60,7 @@ public class FlameSlash extends CardImpl { @Override public String getArt() { - return ""; + return "127404_typ_reg_sty_010.jpg"; } } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest1.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest1.java new file mode 100644 index 0000000000..9545fe7f91 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest1.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127495_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest2.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest2.java new file mode 100644 index 0000000000..ba3c6173f2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest2.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127489_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest3.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest3.java new file mode 100644 index 0000000000..c41589922f --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest3.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127497_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest4.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest4.java new file mode 100644 index 0000000000..0ec8a7f121 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Forest4.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127511_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java index dc1cb7f3fe..09079efb13 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GideonJura.java @@ -31,6 +31,7 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.MageInt; import mage.abilities.Ability; @@ -48,7 +49,6 @@ import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.players.Player; -import mage.sets.RiseOfTheEldrazi; import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetOpponent; @@ -65,8 +65,8 @@ public class GideonJura extends CardImpl { } public GideonJura(UUID ownerId) { - super(ownerId, "Gideon Jura", new CardType[]{CardType.PLANESWALKER}, "{3}{W}{W}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Gideon Jura", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{3}{W}{W}"); + this.expansionSetCode = "ROE"; this.subtype.add("Gideon"); this.color.setWhite(true); this.loyalty = new MageInt(6); @@ -76,7 +76,7 @@ public class GideonJura extends CardImpl { this.addAbility(ability1); LoyaltyAbility ability2 = new LoyaltyAbility(new DestroyTargetEffect(), -2); - ability2.addTarget(new TargetCreaturePermanent(1, 1, filter, TargetController.ANY)); + ability2.addTarget(new TargetCreaturePermanent(1, 1, filter, TargetController.ANY, false)); this.addAbility(ability2); LoyaltyAbility ability3 = new LoyaltyAbility(new BecomesCreatureSourceEOTEffect(new GideonJuraToken(), "planeswalker"), 0); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinTunneler.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinTunneler.java new file mode 100644 index 0000000000..1fa90a29ab --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/GoblinTunneler.java @@ -0,0 +1,88 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.GainAbilityTargetEffect; +import mage.abilities.keyword.UnblockableAbility; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonType; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinTunneler extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); + + static { + filter.setPower(3); + filter.setPowerComparison(ComparisonType.LessThan); + } + + public GoblinTunneler(UUID ownerId) { + super(ownerId, "Goblin Tunneler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "ROE"; + this.subtype.add("Goblin"); + this.subtype.add("Rogue"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(UnblockableAbility.getInstance(), Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public GoblinTunneler(final GoblinTunneler card) { + super(card); + } + + @Override + public GoblinTunneler copy() { + return new GoblinTunneler(this); + } + + @Override + public String getArt() { + return "127259_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island1.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island1.java new file mode 100644 index 0000000000..c7326ad07e --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island1.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127494_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island2.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island2.java new file mode 100644 index 0000000000..c9a27c48b7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island2.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127501_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island3.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island3.java new file mode 100644 index 0000000000..2d683f916c --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island3.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127506_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island4.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island4.java new file mode 100644 index 0000000000..b48d5a828c --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Island4.java @@ -0,0 +1,49 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ROE"; + } + + @Override + public String getArt() { + return "127507_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java index 37cd1b6c7a..82dfa378b2 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/JoragaTreespeaker.java @@ -31,6 +31,7 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.Mana; @@ -41,13 +42,11 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.GainAbilityControlledEffect; import mage.abilities.effects.common.ManaEffect; -import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.LevelAbility; import mage.abilities.keyword.LevelUpAbility; import mage.abilities.mana.BasicManaAbility; import mage.cards.LevelerCard; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.RiseOfTheEldrazi; /** * @@ -62,8 +61,8 @@ public class JoragaTreespeaker extends LevelerCard { } public JoragaTreespeaker(UUID ownerId) { - super(ownerId, "Joraga Treespeaker", new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Joraga Treespeaker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "ROE"; this.subtype.add("Elf"); this.subtype.add("Druid"); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KarganDragonlord.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KarganDragonlord.java index d11f028b4d..6ace278d3d 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KarganDragonlord.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KarganDragonlord.java @@ -31,6 +31,7 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Abilities; @@ -44,7 +45,6 @@ import mage.abilities.keyword.LevelAbility; import mage.abilities.keyword.LevelUpAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.LevelerCard; -import mage.sets.RiseOfTheEldrazi; /** * @@ -53,8 +53,8 @@ import mage.sets.RiseOfTheEldrazi; public class KarganDragonlord extends LevelerCard { public KarganDragonlord(UUID ownerId) { - super(ownerId, "Kargan Dragonlord", new CardType[]{CardType.CREATURE}, "{R}{R}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Kargan Dragonlord", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{R}{R}"); + this.expansionSetCode = "ROE"; this.subtype.add("Human"); this.subtype.add("Warrior"); this.color.setRed(true); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozileksPredator.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozileksPredator.java index 07b7d9e185..4bed3ce2cf 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozileksPredator.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/KozileksPredator.java @@ -30,12 +30,12 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.game.permanent.token.EldraziSpawnToken; -import mage.sets.RiseOfTheEldrazi; /** * @@ -44,8 +44,8 @@ import mage.sets.RiseOfTheEldrazi; public class KozileksPredator extends CardImpl { public KozileksPredator(UUID ownerId) { - super(ownerId, "Kozilek's Predator", new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Kozilek's Predator", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "ROE"; this.subtype.add("Eldrazi"); this.subtype.add("Drone"); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NestInvader.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NestInvader.java index d008d4dcec..091ad1928a 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NestInvader.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NestInvader.java @@ -30,12 +30,12 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.game.permanent.token.EldraziSpawnToken; -import mage.sets.RiseOfTheEldrazi; /** * @@ -44,8 +44,8 @@ import mage.sets.RiseOfTheEldrazi; public class NestInvader extends CardImpl { public NestInvader(UUID ownerId) { - super(ownerId, "Nest Invader", new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Nest Invader", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ROE"; this.subtype.add("Eldrazi"); this.subtype.add("Drone"); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SeaGateOracle.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SeaGateOracle.java new file mode 100644 index 0000000000..94ff6d1018 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SeaGateOracle.java @@ -0,0 +1,128 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class SeaGateOracle extends CardImpl { + + public SeaGateOracle(UUID ownerId) { + super(ownerId, "Sea Gate Oracle", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ROE"; + this.color.setBlue(true); + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SeaGateOracleEffect(), false)); + } + + + public SeaGateOracle(final SeaGateOracle card) { + super(card); + } + + @Override + public SeaGateOracle copy() { + return new SeaGateOracle(this); + } + + @Override + public String getArt() { + return "127435_typ_reg_sty_010.jpg"; + } +} + +class SeaGateOracleEffect extends OneShotEffect { + + private static FilterCard filter = new FilterCard("card to put in hand"); + + public SeaGateOracleEffect() { + super(Outcome.DrawCard); + } + + public SeaGateOracleEffect(SeaGateOracleEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player.getLibrary().size() > 0) { + if (player.getLibrary().size() == 1) { + player.putInHand(player.getLibrary().removeFromTop(game), game); + } + else { + Cards cards = new CardsImpl(Zone.PICK); + cards.add(player.getLibrary().removeFromTop(game)); + cards.add(player.getLibrary().removeFromTop(game)); + TargetCard target = new TargetCard(Zone.PICK, filter); + target.setRequired(true); + player.lookAtCards(cards, game); + player.chooseTarget(cards, target, source, game); + player.putInHand(cards.get(target.getFirstTarget(), game), game); + for (UUID cardId: cards) { + player.getLibrary().putOnBottom(cards.get(cardId, game), game); + } + } + return true; + } + return false; + } + + @Override + public SeaGateOracleEffect copy() { + return new SeaGateOracleEffect(this); + } + + @Override + public String getText(Ability source) { + return "look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SeeBeyond.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SeeBeyond.java new file mode 100644 index 0000000000..e101b43d31 --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SeeBeyond.java @@ -0,0 +1,115 @@ +/* + * 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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class SeeBeyond extends CardImpl { + + public SeeBeyond(UUID ownerId) { + super(ownerId, "See Beyond", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{U}"); + this.expansionSetCode = "ROE"; + this.color.setBlue(true); + this.getSpellAbility().addEffect(new SeeBeyondEffect()); + } + + public SeeBeyond(final SeeBeyond card) { + super(card); + } + + @Override + public SeeBeyond copy() { + return new SeeBeyond(this); + } + + @Override + public String getArt() { + return "127361_typ_reg_sty_010.jpg"; + } + +} + +class SeeBeyondEffect extends OneShotEffect { + + private static FilterCard filter = new FilterCard("card to shuffle into your library"); + + public SeeBeyondEffect() { + super(Outcome.DrawCard); + } + + public SeeBeyondEffect(SeeBeyondEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + player.drawCards(2, game); + if (player.getHand().size() > 0) { + TargetCard target = new TargetCard(Zone.HAND, filter); + target.setRequired(true); + player.chooseTarget(player.getHand(), target, source, game); + Card card = player.getHand().get(target.getFirstTarget(), game); + if (card != null) { + player.removeFromHand(card, game); + player.getLibrary().putOnTop(card, game); + player.getLibrary().shuffle(); + return true; + } + } + return true; + } + + @Override + public SeeBeyondEffect copy() { + return new SeeBeyondEffect(this); + } + + @Override + public String getText(Ability source) { + return "Draw two cards, then shuffle a card from your hand into your library"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/UnifiedWill.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UnifiedWill.java new file mode 100644 index 0000000000..8a334a383f --- /dev/null +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/UnifiedWill.java @@ -0,0 +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.riseoftheeldrazi; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.stack.StackObject; +import mage.target.TargetSpell; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class UnifiedWill extends CardImpl { + + public UnifiedWill(UUID ownerId) { + super(ownerId, "Unified Will", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "ROE"; + this.color.setBlue(true); + this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addEffect(new UnifiedWillEffect()); + } + + public UnifiedWill(final UnifiedWill card) { + super(card); + } + + @Override + public UnifiedWill copy() { + return new UnifiedWill(this); + } + + @Override + public String getArt() { + return "127278_typ_reg_sty_010.jpg"; + } + +} + +class UnifiedWillEffect extends CounterTargetEffect { + + private static FilterCreaturePermanent filter = FilterCreaturePermanent.getDefault(); + + public UnifiedWillEffect() {} + + public UnifiedWillEffect(final UnifiedWillEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + StackObject stackObject = game.getStack().getStackObject(source.getFirstTarget()); + if (stackObject != null) { + if (game.getBattlefield().countAll(filter, source.getControllerId()) > game.getBattlefield().countAll(filter, stackObject.getControllerId())) { + return game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); + } + return true; + } + return false; + } + + @Override + public UnifiedWillEffect copy() { + return new UnifiedWillEffect(this); + } + + @Override + public String getText(Ability source) { + return "Counter target spell if you control more creatures than that spell's controller"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java index cab0808016..5515f39846 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vengevine.java @@ -30,6 +30,7 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; @@ -40,7 +41,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.stack.Spell; -import mage.sets.RiseOfTheEldrazi; import mage.watchers.Watcher; import mage.watchers.WatcherImpl; @@ -51,8 +51,8 @@ import mage.watchers.WatcherImpl; public class Vengevine extends CardImpl { public Vengevine(UUID ownerId) { - super(ownerId, "Vengevine", new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Vengevine", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "ROE"; this.subtype.add("Elemental"); this.color.setGreen(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/WallOfOmens.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/WallOfOmens.java index e6d3bfc645..31c07b758d 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/WallOfOmens.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/WallOfOmens.java @@ -30,12 +30,12 @@ package mage.sets.riseoftheeldrazi; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.DrawCardControllerEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; -import mage.sets.RiseOfTheEldrazi; /** * @@ -44,8 +44,8 @@ import mage.sets.RiseOfTheEldrazi; public class WallOfOmens extends CardImpl { public WallOfOmens(UUID ownerId) { - super(ownerId, "Wall Of Omens", new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.expansionSetId = RiseOfTheEldrazi.getInstance().getId(); + super(ownerId, "Wall Of Omens", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "ROE"; this.subtype.add("Wall"); this.color.setWhite(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/AjaniVengeant.java b/Mage.Sets/src/mage/sets/shardsofalara/AjaniVengeant.java index 80988f90e5..fc9b4d8883 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/AjaniVengeant.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/AjaniVengeant.java @@ -30,6 +30,7 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.LoyaltyAbility; import mage.abilities.effects.Effects; @@ -39,7 +40,6 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.SkipNextUntapTargetEffect; import mage.cards.CardImpl; import mage.filter.FilterPermanent; -import mage.sets.ShardsOfAlara; import mage.target.TargetPermanent; import mage.target.TargetPlayer; import mage.target.common.TargetCreatureOrPlayer; @@ -51,8 +51,8 @@ import mage.target.common.TargetCreatureOrPlayer; public class AjaniVengeant extends CardImpl { public AjaniVengeant(UUID ownerId) { - super(ownerId, "Ajani Vengeant", new CardType[]{CardType.PLANESWALKER}, "{2}{R}{W}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Ajani Vengeant", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{W}"); + this.expansionSetCode = "ALA"; this.subtype.add("Ajani"); this.color.setRed(true); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java b/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java index 5a109ee592..d84bab7a52 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/Angelsong.java @@ -31,11 +31,11 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.PreventAllCombatDamageEffect; import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; -import mage.sets.ShardsOfAlara; /** * @@ -44,8 +44,8 @@ import mage.sets.ShardsOfAlara; public class Angelsong extends CardImpl { public Angelsong(UUID ownerId) { - super(ownerId, "Angelsong", new CardType[]{CardType.INSTANT}, "{1}{W}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Angelsong", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "ALA"; this.color.setWhite(true); this.getSpellAbility().addEffect(new PreventAllCombatDamageEffect(Duration.EndOfTurn)); this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Blightning.java b/Mage.Sets/src/mage/sets/shardsofalara/Blightning.java index d6067ee382..9f2bb86f5b 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/Blightning.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/Blightning.java @@ -30,10 +30,10 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DiscardTargetEffect; import mage.cards.CardImpl; -import mage.sets.ShardsOfAlara; import mage.target.TargetPlayer; /** @@ -43,8 +43,8 @@ import mage.target.TargetPlayer; public class Blightning extends CardImpl { public Blightning(UUID ownerId) { - super(ownerId, "Blightning", new CardType[]{CardType.SORCERY}, "{1}{B}{R}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Blightning", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{R}"); + this.expansionSetCode = "ALA"; this.color.setBlack(true); this.color.setRed(true); this.getSpellAbility().addTarget(new TargetPlayer()); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BroodmateDragon.java b/Mage.Sets/src/mage/sets/shardsofalara/BroodmateDragon.java index 03be8858fc..04bba6d2cd 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/BroodmateDragon.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/BroodmateDragon.java @@ -30,13 +30,13 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.game.permanent.token.DragonToken; -import mage.sets.ShardsOfAlara; /** * @@ -47,8 +47,8 @@ public class BroodmateDragon extends CardImpl { private static DragonToken dragonToken = new DragonToken(); public BroodmateDragon(UUID ownerId) { - super(ownerId, "Broodmate Dragon", new CardType[]{CardType.CREATURE}, "{3}{B}{R}{G}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Broodmate Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{R}{G}"); + this.expansionSetCode = "ALA"; this.subtype.add("Dragon"); this.color.setRed(true); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Cancel.java b/Mage.Sets/src/mage/sets/shardsofalara/Cancel.java new file mode 100644 index 0000000000..c256f2ff3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Cancel.java @@ -0,0 +1,48 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Cancel extends mage.sets.tenth.Cancel { + + public Cancel(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "116179_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/CrumblingNecropolis.java b/Mage.Sets/src/mage/sets/shardsofalara/CrumblingNecropolis.java index 3683024c74..ca03e64259 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/CrumblingNecropolis.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/CrumblingNecropolis.java @@ -30,13 +30,13 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldStaticAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; -import mage.sets.ShardsOfAlara; /** * @@ -45,9 +45,9 @@ import mage.sets.ShardsOfAlara; public class CrumblingNecropolis extends CardImpl { public CrumblingNecropolis(UUID ownerId) { - super(ownerId, "Crumbling Necropolis", new CardType[]{CardType.LAND}, null); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Crumbling Necropolis", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ALA"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new RedManaAbility()); this.addAbility(new BlueManaAbility()); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/ElspethKnightErrant.java b/Mage.Sets/src/mage/sets/shardsofalara/ElspethKnightErrant.java index 436855b59f..81441ecd4e 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/ElspethKnightErrant.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/ElspethKnightErrant.java @@ -31,6 +31,7 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.LoyaltyAbility; import mage.abilities.effects.Effects; @@ -43,7 +44,6 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.filter.FilterPermanent; import mage.game.permanent.token.SoldierToken; -import mage.sets.ShardsOfAlara; import mage.target.common.TargetCreaturePermanent; /** @@ -55,8 +55,8 @@ public class ElspethKnightErrant extends CardImpl { private static SoldierToken soldierToken = new SoldierToken(); public ElspethKnightErrant(UUID ownerId) { - super(ownerId, "Elspeth, Knight-Errant", new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Elspeth, Knight-Errant", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}"); + this.expansionSetCode = "ALA"; this.subtype.add("Elspeth"); this.color.setWhite(true); this.loyalty = new MageInt(4); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Excommunicate.java b/Mage.Sets/src/mage/sets/shardsofalara/Excommunicate.java new file mode 100644 index 0000000000..e863c1f56f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Excommunicate.java @@ -0,0 +1,65 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Excommunicate extends CardImpl { + + public Excommunicate(UUID ownerId) { + super(ownerId, "Excommunicate", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "ALA"; + this.color.setWhite(true); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); + } + + public Excommunicate(final Excommunicate card) { + super(card); + } + + @Override + public Excommunicate copy() { + return new Excommunicate(this); + } + + @Override + public String getArt() { + return "117023_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Forest1.java b/Mage.Sets/src/mage/sets/shardsofalara/Forest1.java new file mode 100644 index 0000000000..46ad3cd1f3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Forest1.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115018_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Forest2.java b/Mage.Sets/src/mage/sets/shardsofalara/Forest2.java new file mode 100644 index 0000000000..03b422ff7d --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Forest2.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115015_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Forest3.java b/Mage.Sets/src/mage/sets/shardsofalara/Forest3.java new file mode 100644 index 0000000000..274d1013a1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Forest3.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115016_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Forest4.java b/Mage.Sets/src/mage/sets/shardsofalara/Forest4.java new file mode 100644 index 0000000000..42221559ef --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Forest4.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115017_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/HellsThunder.java b/Mage.Sets/src/mage/sets/shardsofalara/HellsThunder.java index a95f205f54..eaa772970e 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/HellsThunder.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/HellsThunder.java @@ -30,6 +30,7 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -39,7 +40,6 @@ import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.UnearthAbility; import mage.cards.CardImpl; import mage.game.events.GameEvent.EventType; -import mage.sets.ShardsOfAlara; /** * @@ -48,11 +48,10 @@ import mage.sets.ShardsOfAlara; public class HellsThunder extends CardImpl { public HellsThunder(UUID ownerId) { - super(ownerId, "Hell's Thunder", new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Hell's Thunder", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "ALA"; this.subtype.add("Elemental"); this.color.setRed(true); -// this.art = "115234_typ_reg_sty_010.jpg"; this.power = new MageInt(4); this.toughness = new MageInt(4); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Island1.java b/Mage.Sets/src/mage/sets/shardsofalara/Island1.java new file mode 100644 index 0000000000..addbfd558a --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Island1.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115051_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Island2.java b/Mage.Sets/src/mage/sets/shardsofalara/Island2.java new file mode 100644 index 0000000000..7fdb562d5d --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Island2.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115052_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Island3.java b/Mage.Sets/src/mage/sets/shardsofalara/Island3.java new file mode 100644 index 0000000000..80e66e6dbc --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Island3.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115054_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Island4.java b/Mage.Sets/src/mage/sets/shardsofalara/Island4.java new file mode 100644 index 0000000000..70ff3643e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Island4.java @@ -0,0 +1,49 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ALA"; + } + + @Override + public String getArt() { + return "115053_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/JundPanorama.java b/Mage.Sets/src/mage/sets/shardsofalara/JundPanorama.java index cd84c664f9..95843cf67f 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/JundPanorama.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/JundPanorama.java @@ -31,6 +31,7 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.ActivatedAbilityImpl; import mage.abilities.costs.common.SacrificeSourceCost; @@ -40,7 +41,6 @@ import mage.abilities.effects.common.SearchLibraryPutInPlayEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.filter.FilterCard; -import mage.sets.ShardsOfAlara; import mage.target.common.TargetCardInLibrary; /** @@ -50,8 +50,8 @@ import mage.target.common.TargetCardInLibrary; public class JundPanorama extends CardImpl { public JundPanorama(UUID ownerId) { - super(ownerId, "Jund Panorama", new CardType[]{CardType.LAND}, null); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Jund Panorama", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ALA"; this.addAbility(new ColorlessManaAbility()); this.addAbility(new JundPanoramaAbility()); } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/KnightOfTheWhiteOrchid.java b/Mage.Sets/src/mage/sets/shardsofalara/KnightOfTheWhiteOrchid.java index 35b6ad4b89..95d7071803 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/KnightOfTheWhiteOrchid.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/KnightOfTheWhiteOrchid.java @@ -31,6 +31,7 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -43,7 +44,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; -import mage.sets.ShardsOfAlara; import mage.target.common.TargetCardInLibrary; /** @@ -53,8 +53,8 @@ import mage.target.common.TargetCardInLibrary; public class KnightOfTheWhiteOrchid extends CardImpl { public KnightOfTheWhiteOrchid(UUID ownerId) { - super(ownerId, "Knight of the White Orchid", new CardType[]{CardType.CREATURE}, "{W}{W}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Knight of the White Orchid", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{W}"); + this.expansionSetCode = "ALA"; this.subtype.add("Human"); this.subtype.add("Knight"); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/OblivionRing.java b/Mage.Sets/src/mage/sets/shardsofalara/OblivionRing.java new file mode 100644 index 0000000000..4092e34569 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/OblivionRing.java @@ -0,0 +1,79 @@ +/* + * 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.shardsofalara; + +import mage.abilities.effects.common.ReturnFromExileEffect; +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterNonlandPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class OblivionRing extends CardImpl { + + public OblivionRing(UUID ownerId) { + super(ownerId, "Oblivion Ring", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "ALA"; + this.color.setWhite(true); + FilterNonlandPermanent filter = new FilterNonlandPermanent(); + filter.setId(this.getId()); + filter.setNotId(true); + Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(this.getId(), "Oblivion Ring exile"), false); + ability1.addTarget(new TargetPermanent(filter, TargetController.ANY)); + this.addAbility(ability1); + Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileEffect(this.getId(), Zone.BATTLEFIELD), false); + this.addAbility(ability2); + } + + public OblivionRing(final OblivionRing card) { + super(card); + } + + @Override + public OblivionRing copy() { + return new OblivionRing(this); + } + + @Override + public String getArt() { + return "115005_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/RafiqOfTheMany.java b/Mage.Sets/src/mage/sets/shardsofalara/RafiqOfTheMany.java index d95f3608b8..535216e5cc 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/RafiqOfTheMany.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/RafiqOfTheMany.java @@ -31,6 +31,7 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; @@ -41,7 +42,6 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.sets.ShardsOfAlara; import mage.target.common.TargetCreaturePermanent; /** @@ -51,8 +51,8 @@ import mage.target.common.TargetCreaturePermanent; public class RafiqOfTheMany extends CardImpl { public RafiqOfTheMany(UUID ownerId) { - super(ownerId, "Rafiq of the Many", new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Rafiq of the Many", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); + this.expansionSetCode = "ALA"; this.color.setGreen(true); this.color.setWhite(true); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/RangerOfEos.java b/Mage.Sets/src/mage/sets/shardsofalara/RangerOfEos.java index 25f1615785..446417baac 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/RangerOfEos.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/RangerOfEos.java @@ -30,13 +30,13 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.SearchLibraryRevealPutInHandEffect; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonType; import mage.filter.FilterCard; -import mage.sets.ShardsOfAlara; import mage.target.common.TargetCardInLibrary; /** @@ -54,8 +54,8 @@ public class RangerOfEos extends CardImpl { } public RangerOfEos(UUID ownerId) { - super(ownerId, "Ranger Of Eos", new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Ranger Of Eos", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ALA"; this.color.setWhite(true); this.subtype.add("Human"); this.subtype.add("Soldier"); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/RhoxWarMonk.java b/Mage.Sets/src/mage/sets/shardsofalara/RhoxWarMonk.java index 8150355262..19531ffdb6 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/RhoxWarMonk.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/RhoxWarMonk.java @@ -30,10 +30,10 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; -import mage.sets.ShardsOfAlara; /** * @@ -42,8 +42,8 @@ import mage.sets.ShardsOfAlara; public class RhoxWarMonk extends CardImpl { public RhoxWarMonk(UUID ownerId) { - super(ownerId, "Rhox War Monk", new CardType[]{CardType.CREATURE}, "{G}{W}{U}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Rhox War Monk", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}{W}{U}"); + this.expansionSetCode = "ALA"; this.subtype.add("Rhino"); this.subtype.add("Monk"); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SarkhanVol.java b/Mage.Sets/src/mage/sets/shardsofalara/SarkhanVol.java index e34121d363..a38f538f67 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/SarkhanVol.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/SarkhanVol.java @@ -31,6 +31,7 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.LoyaltyAbility; import mage.abilities.effects.Effects; @@ -38,13 +39,12 @@ import mage.abilities.effects.common.BoostControlledEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.GainAbilityControlledEffect; import mage.abilities.effects.common.GainAbilityTargetEffect; -import mage.abilities.effects.common.GainControlTargetEOTEffect; +import mage.abilities.effects.common.GainControlTargetEffect; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; import mage.game.permanent.token.DragonToken; -import mage.sets.ShardsOfAlara; import mage.target.common.TargetCreaturePermanent; /** @@ -56,8 +56,8 @@ public class SarkhanVol extends CardImpl { private static DragonToken dragonToken = new DragonToken(); public SarkhanVol(UUID ownerId) { - super(ownerId, "Sarkhan Vol", new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Sarkhan Vol", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}"); + this.expansionSetCode = "ALA"; this.subtype.add("Sarkhan"); this.color.setRed(true); this.color.setGreen(true); @@ -65,11 +65,11 @@ public class SarkhanVol extends CardImpl { Effects effects1 = new Effects(); effects1.add(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); - effects1.add(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, new FilterCreaturePermanent())); + effects1.add(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, FilterCreaturePermanent.getDefault())); this.addAbility(new LoyaltyAbility(effects1, 1)); Effects effects2 = new Effects(); - effects2.add(new GainControlTargetEOTEffect()); + effects2.add(new GainControlTargetEffect(Duration.EndOfTurn)); effects2.add(new UntapTargetEffect()); effects2.add(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SavageLands.java b/Mage.Sets/src/mage/sets/shardsofalara/SavageLands.java index 0fd6defdb2..d83cb93cc4 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/SavageLands.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/SavageLands.java @@ -30,13 +30,13 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldStaticAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; -import mage.sets.ShardsOfAlara; /** * @@ -45,9 +45,9 @@ import mage.sets.ShardsOfAlara; public class SavageLands extends CardImpl { public SavageLands(UUID ownerId) { - super(ownerId, "Savage Lands", new CardType[]{CardType.LAND}, null); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Savage Lands", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ALA"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new RedManaAbility()); this.addAbility(new GreenManaAbility()); this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SproutingThrinax.java b/Mage.Sets/src/mage/sets/shardsofalara/SproutingThrinax.java index 5ca8e2c2a0..247ef1918f 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/SproutingThrinax.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/SproutingThrinax.java @@ -30,12 +30,12 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.game.permanent.token.SaprolingToken; -import mage.sets.ShardsOfAlara; /** * @@ -46,8 +46,8 @@ public class SproutingThrinax extends CardImpl { private static SaprolingToken saprolingToken = new SaprolingToken(); public SproutingThrinax(UUID ownerId) { - super(ownerId, "Sprouting Thrinax", new CardType[]{CardType.CREATURE}, "{B}{R}{G}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Sprouting Thrinax", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}{R}{G}"); + this.expansionSetCode = "ALA"; this.color.setBlack(true); this.color.setRed(true); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/WildNacatl.java b/Mage.Sets/src/mage/sets/shardsofalara/WildNacatl.java index da2d7f5888..5ec0d409a0 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/WildNacatl.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/WildNacatl.java @@ -30,13 +30,13 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.BoostSourceWhileControlsEffect; import mage.cards.CardImpl; import mage.filter.FilterPermanent; -import mage.sets.ShardsOfAlara; /** * @@ -48,8 +48,8 @@ public class WildNacatl extends CardImpl { private FilterPermanent filter2 = new FilterPermanent("Plains"); public WildNacatl(UUID ownerId) { - super(ownerId, "Wild Nacatl", new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Wild Nacatl", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "ALA"; this.color.setGreen(true); this.subtype.add("Cat"); this.subtype.add("Warrior"); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/WoollyThoctar.java b/Mage.Sets/src/mage/sets/shardsofalara/WoollyThoctar.java index 683ec96eb9..3605eb2fd7 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/WoollyThoctar.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/WoollyThoctar.java @@ -30,9 +30,9 @@ package mage.sets.shardsofalara; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.cards.CardImpl; -import mage.sets.ShardsOfAlara; /** * @@ -41,8 +41,8 @@ import mage.sets.ShardsOfAlara; public class WoollyThoctar extends CardImpl { public WoollyThoctar(UUID ownerId) { - super(ownerId, "Woolly Thoctar", new CardType[]{CardType.CREATURE}, "{R}{G}{W}"); - this.expansionSetId = ShardsOfAlara.getInstance().getId(); + super(ownerId, "Woolly Thoctar", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}{G}{W}"); + this.expansionSetCode = "ALA"; this.color.setRed(true); this.color.setGreen(true); this.color.setWhite(true); diff --git a/Mage.Sets/src/mage/sets/tenth/AngelsFeather.java b/Mage.Sets/src/mage/sets/tenth/AngelsFeather.java new file mode 100644 index 0000000000..90d094d014 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/AngelsFeather.java @@ -0,0 +1,103 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageObject; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class AngelsFeather extends CardImpl { + + public AngelsFeather(UUID ownerId) { + super(ownerId, "Angel's Feather", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "10E"; + this.addAbility(new AngelsFeatherAbility()); + } + + public AngelsFeather(final AngelsFeather card) { + super(card); + } + + @Override + public AngelsFeather copy() { + return new AngelsFeather(this); + } + + @Override + public String getArt() { + return "75223_typ_reg_sty_010.jpg"; + } + +} + +class AngelsFeatherAbility extends TriggeredAbilityImpl { + + public AngelsFeatherAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); + } + + public AngelsFeatherAbility(final AngelsFeatherAbility ability) { + super(ability); + } + + @Override + public AngelsFeatherAbility copy() { + return new AngelsFeatherAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.SPELL_CAST) { + MageObject spell = game.getObject(event.getTargetId()); + if (spell != null && spell.getColor().isWhite()) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player casts a white spell, you may gain 1 life."; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Assassinate.java b/Mage.Sets/src/mage/sets/tenth/Assassinate.java new file mode 100644 index 0000000000..0379d14b3e --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Assassinate.java @@ -0,0 +1,76 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Assassinate extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creature"); + + static { + filter.setTapped(true); + filter.setUseTapped(true); + } + + public Assassinate(UUID ownerId) { + super(ownerId, "Assassinate", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "M10"; + this.color.setBlack(true); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(1, 1, filter, TargetController.ANY, false)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + + } + + public Assassinate(final Assassinate card) { + super(card); + } + + @Override + public Assassinate copy() { + return new Assassinate(this); + } + + @Override + public String getArt() { + return "97461_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java b/Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java new file mode 100644 index 0000000000..cdd0a9f252 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/BirdsOfParadise.java @@ -0,0 +1,78 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BirdsOfParadise extends CardImpl { + + public BirdsOfParadise(UUID ownerId) { + super(ownerId, "Birds of Paradise", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "M10"; + this.subtype.add("Bird"); + this.color.setGreen(true); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new BlackManaAbility()); + this.addAbility(new BlueManaAbility()); + this.addAbility(new GreenManaAbility()); + this.addAbility(new RedManaAbility()); + this.addAbility(new WhiteManaAbility()); + } + + public BirdsOfParadise(final BirdsOfParadise card) { + super(card); + } + + @Override + public BirdsOfParadise copy() { + return new BirdsOfParadise(this); + } + + @Override + public String getArt() { + return "88690_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Cancel.java b/Mage.Sets/src/mage/sets/tenth/Cancel.java new file mode 100644 index 0000000000..4faeadbad6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Cancel.java @@ -0,0 +1,66 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetSpell; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Cancel extends CardImpl { + + public Cancel(UUID ownerId) { + super(ownerId, "Cancel", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + this.expansionSetCode = "10E"; + this.color.setBlue(true); + this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + } + + public Cancel(final Cancel card) { + super(card); + } + + @Override + public Cancel copy() { + return new Cancel(this); + } + + @Override + public String getArt() { + return "97414_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Clone.java b/Mage.Sets/src/mage/sets/tenth/Clone.java new file mode 100644 index 0000000000..a1b3cc844c --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Clone.java @@ -0,0 +1,77 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.CopyEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Clone extends CardImpl { + + public Clone(UUID ownerId) { + super(ownerId, "Clone", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "10E"; + this.color.setBlue(true); + this.subtype.add("Shapeshifter"); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CopyEffect()); + ability.addTarget(new TargetCreaturePermanent(1, 1, FilterCreaturePermanent.getDefault(), TargetController.ANY, true)); + this.addAbility(ability); + } + + public Clone(final Clone card) { + super(card); + } + + @Override + public Clone copy() { + return new Clone(this); + } + + @Override + public String getArt() { + return "86939_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/tenth/CloudElemental.java b/Mage.Sets/src/mage/sets/tenth/CloudElemental.java new file mode 100644 index 0000000000..676edb2cb1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/CloudElemental.java @@ -0,0 +1,122 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CloudElemental extends CardImpl { + + public CloudElemental(UUID ownerId) { + super(ownerId, "Cloud Elemental", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "10E"; + this.subtype.add("Elemental"); + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CloudElementalEffect())); + } + + public CloudElemental(final CloudElemental card) { + super(card); + } + + @Override + public CloudElemental copy() { + return new CloudElemental(this); + } + + @Override + public String getArt() { + return "104536_typ_reg_sty_010.jpg"; + } + +} + +class CloudElementalEffect extends ReplacementEffectImpl { + + public CloudElementalEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + } + + public CloudElementalEffect(final CloudElementalEffect effect) { + super(effect); + } + + @Override + public CloudElementalEffect copy() { + return new CloudElementalEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.DECLARE_BLOCKER && source.getSourceId().equals(event.getSourceId())) { + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && !permanent.getAbilities().containsKey(FlyingAbility.getInstance().getId())) + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "Cloud Elemental can block only creatures with flying"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/tenth/Condemn.java b/Mage.Sets/src/mage/sets/tenth/Condemn.java new file mode 100644 index 0000000000..97aabb9d6f --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Condemn.java @@ -0,0 +1,108 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Condemn extends CardImpl { + + public Condemn(UUID ownerId) { + super(ownerId, "Condemn", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "10E"; + this.color.setWhite(true); + this.getSpellAbility().addTarget(new TargetAttackingCreature()); + this.getSpellAbility().addEffect(new CondemnEffect()); + this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(false)); + + } + + public Condemn(final Condemn card) { + super(card); + } + + @Override + public Condemn copy() { + return new Condemn(this); + } + + @Override + public String getArt() { + return "94551_typ_reg_sty_010.jpg"; + } + +} + +class CondemnEffect extends OneShotEffect { + + public CondemnEffect() { + super(Outcome.GainLife); + } + + public CondemnEffect(final CondemnEffect effect) { + super(effect); + } + + @Override + public CondemnEffect copy() { + return new CondemnEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + Player player = game.getPlayer(permanent.getControllerId()); + if (player != null) { + player.gainLife(permanent.getToughness().getValue(), game); + } + } + return false; + } + + @Override + public String getText(Ability source) { + return "Its controller gains life equal to its toughness"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Deathmark.java b/Mage.Sets/src/mage/sets/tenth/Deathmark.java new file mode 100644 index 0000000000..e5d42bc4aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Deathmark.java @@ -0,0 +1,75 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Deathmark extends CardImpl { + + private static FilterCreaturePermanent filter = new FilterCreaturePermanent("green or white creature"); + + static { + filter.getColor().setGreen(true); + filter.getColor().setWhite(true); + filter.setUseColor(true); + } + + public Deathmark(UUID ownerId) { + super(ownerId, "Deathmark", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "10E"; + this.color.setBlack(true); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public Deathmark(final Deathmark card) { + super(card); + } + + @Override + public Deathmark copy() { + return new Deathmark(this); + } + + @Override + public String getArt() { + return "96855_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Demolish.java b/Mage.Sets/src/mage/sets/tenth/Demolish.java new file mode 100644 index 0000000000..357e2eef84 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Demolish.java @@ -0,0 +1,76 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Demolish extends CardImpl { + + private static FilterPermanent filter = new FilterPermanent("artifact or land"); + + static { + filter.getCardType().add(CardType.ARTIFACT); + filter.getCardType().add(CardType.LAND); + filter.setScopeCardType(ComparisonScope.Any); + } + + public Demolish(UUID ownerId) { + super(ownerId, "Demolish", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "10E"; + this.color.setBlack(true); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public Demolish(final Demolish card) { + super(card); + } + + @Override + public Demolish copy() { + return new Demolish(this); + } + + @Override + public String getArt() { + return "33696_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/DemonsHorn.java b/Mage.Sets/src/mage/sets/tenth/DemonsHorn.java new file mode 100644 index 0000000000..61a54512df --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/DemonsHorn.java @@ -0,0 +1,103 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageObject; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DemonsHorn extends CardImpl { + + public DemonsHorn(UUID ownerId) { + super(ownerId, "Demon's Horn", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "10E"; + this.addAbility(new DemonsHornAbility()); + } + + public DemonsHorn(final DemonsHorn card) { + super(card); + } + + @Override + public DemonsHorn copy() { + return new DemonsHorn(this); + } + + @Override + public String getArt() { + return "75220_typ_reg_sty_010.jpg"; + } + +} + +class DemonsHornAbility extends TriggeredAbilityImpl { + + public DemonsHornAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); + } + + public DemonsHornAbility(final DemonsHornAbility ability) { + super(ability); + } + + @Override + public DemonsHornAbility copy() { + return new DemonsHornAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.SPELL_CAST) { + MageObject spell = game.getObject(event.getTargetId()); + if (spell != null && spell.getColor().isBlack()) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player casts a black spell, you may gain 1 life."; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/DiabolicTutor.java b/Mage.Sets/src/mage/sets/tenth/DiabolicTutor.java new file mode 100644 index 0000000000..24f391fbed --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/DiabolicTutor.java @@ -0,0 +1,65 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LokiX + */ +public class DiabolicTutor extends CardImpl { + + public DiabolicTutor(UUID onwerId){ + super(onwerId, "Diabolic Tutor", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT},"{2}{B}{B}"); + this.expansionSetCode = "10E"; + this.color.setBlack(true); + TargetCardInLibrary target = new TargetCardInLibrary(); + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(target)); + } + + public DiabolicTutor(final DiabolicTutor card) { + super(card); + } + + @Override + public DiabolicTutor copy() { + return new DiabolicTutor(this); + } + + @Override + public String getArt() { + return "101052_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/DragonsClaw.java b/Mage.Sets/src/mage/sets/tenth/DragonsClaw.java new file mode 100644 index 0000000000..4c5c8578b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/DragonsClaw.java @@ -0,0 +1,103 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageObject; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DragonsClaw extends CardImpl { + + public DragonsClaw(UUID ownerId) { + super(ownerId, "Dragon's Claw", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "10E"; + this.addAbility(new DragonsClawAbility()); + } + + public DragonsClaw(final DragonsClaw card) { + super(card); + } + + @Override + public DragonsClaw copy() { + return new DragonsClaw(this); + } + + @Override + public String getArt() { + return "75221_typ_reg_sty_010.jpg"; + } + +} + +class DragonsClawAbility extends TriggeredAbilityImpl { + + public DragonsClawAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); + } + + public DragonsClawAbility(final DragonsClawAbility ability) { + super(ability); + } + + @Override + public DragonsClawAbility copy() { + return new DragonsClawAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.SPELL_CAST) { + MageObject spell = game.getObject(event.getTargetId()); + if (spell != null && spell.getColor().isRed()) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player casts a red spell, you may gain 1 life."; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Flashfreeze.java b/Mage.Sets/src/mage/sets/tenth/Flashfreeze.java new file mode 100644 index 0000000000..92d009ef7b --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Flashfreeze.java @@ -0,0 +1,77 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter.ComparisonScope; +import mage.filter.FilterSpell; +import mage.target.TargetSpell; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Flashfreeze extends CardImpl { + + private static FilterSpell filter = new FilterSpell("red or green spell"); + + static { + filter.getColor().setRed(true); + filter.getColor().setGreen(true); + filter.setScopeColor(ComparisonScope.Any); + filter.setUseColor(true); + } + + public Flashfreeze(UUID ownerId) { + super(ownerId, "Flashfreeze", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "10E"; + this.color.setBlue(true); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + } + + public Flashfreeze(final Flashfreeze card) { + super(card); + } + + @Override + public Flashfreeze copy() { + return new Flashfreeze(this); + } + + @Override + public String getArt() { + return "96954_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Forest1.java b/Mage.Sets/src/mage/sets/tenth/Forest1.java index 35b3cc340e..b4413b491e 100644 --- a/Mage.Sets/src/mage/sets/tenth/Forest1.java +++ b/Mage.Sets/src/mage/sets/tenth/Forest1.java @@ -29,32 +29,21 @@ package mage.sets.tenth; import java.util.UUID; -import mage.cards.basiclands.Forest; -import mage.sets.Tenth; /** * * @author BetaSteward_at_googlemail.com */ -public class Forest1 extends Forest { +public class Forest1 extends mage.cards.basiclands.Forest { public Forest1(UUID ownerId) { super(ownerId); - this.expansionSetId = Tenth.getInstance().getId(); - } - - public Forest1(final Forest1 card) { - super(card); - } - - @Override - public Forest1 copy() { - return new Forest1(this); + this.expansionSetCode = "10E"; } @Override public String getArt() { - return "89160_typ_reg_sty_010.jpg"; + return "08946_typ_reg_sty_010.jpg"; } } diff --git a/Mage.Sets/src/mage/sets/tenth/Forest2.java b/Mage.Sets/src/mage/sets/tenth/Forest2.java new file mode 100644 index 0000000000..2135550697 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Forest2.java @@ -0,0 +1,49 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "10E"; + } + + @Override + public String getArt() { + return "89160_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Forest3.java b/Mage.Sets/src/mage/sets/tenth/Forest3.java new file mode 100644 index 0000000000..56bcdaa1a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Forest3.java @@ -0,0 +1,49 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "10E"; + } + + @Override + public String getArt() { + return "80954_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Forest4.java b/Mage.Sets/src/mage/sets/tenth/Forest4.java new file mode 100644 index 0000000000..38410a879f --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Forest4.java @@ -0,0 +1,49 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "10E"; + } + + @Override + public String getArt() { + return "25153_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/GiantGrowth.java b/Mage.Sets/src/mage/sets/tenth/GiantGrowth.java new file mode 100644 index 0000000000..0f23603983 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/GiantGrowth.java @@ -0,0 +1,66 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.abilities.effects.common.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GiantGrowth extends CardImpl { + + public GiantGrowth(UUID ownerId) { + super(ownerId, "Giant Growth", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}"); + this.expansionSetCode = "10E"; + this.color.setGreen(true); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn)); + } + + public GiantGrowth(final GiantGrowth card) { + super(card); + } + + @Override + public GiantGrowth copy() { + return new GiantGrowth(this); + } + + @Override + public String getArt() { + return "101059_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/GiantSpider.java b/Mage.Sets/src/mage/sets/tenth/GiantSpider.java new file mode 100644 index 0000000000..e0b618519f --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/GiantSpider.java @@ -0,0 +1,69 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GiantSpider extends CardImpl { + + public GiantSpider(UUID ownerId) { + super(ownerId, "Giant Spider", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "10E"; + this.subtype.add("Spider"); + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + this.addAbility(ReachAbility.getInstance()); + } + + public GiantSpider(final GiantSpider card) { + super(card); + } + + @Override + public GiantSpider copy() { + return new GiantSpider(this); + } + + @Override + public String getArt() { + return "6654_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/GoblinPiker.java b/Mage.Sets/src/mage/sets/tenth/GoblinPiker.java new file mode 100644 index 0000000000..ca40cf30e0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/GoblinPiker.java @@ -0,0 +1,68 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.cards.CardImpl; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GoblinPiker extends CardImpl { + + public GoblinPiker(UUID ownerId) { + super(ownerId, "GoblinPiker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "10E"; + this.subtype.add("Goblin"); + this.subtype.add("Warrier"); + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + } + + public GoblinPiker(final GoblinPiker card) { + super(card); + } + + @Override + public GoblinPiker copy() { + return new GoblinPiker(this); + } + + @Override + public String getArt() { + return "4588_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Gravedigger.java b/Mage.Sets/src/mage/sets/tenth/Gravedigger.java new file mode 100644 index 0000000000..970a834d97 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Gravedigger.java @@ -0,0 +1,74 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Gravedigger extends CardImpl { + + public Gravedigger(UUID ownerId) { + super(ownerId, "Gravedigger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "10E"; + this.subtype.add("Zombie"); + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInGraveyard()); + this.addAbility(ability); + } + + public Gravedigger(final Gravedigger card) { + super(card); + } + + @Override + public Gravedigger copy() { + return new Gravedigger(this); + } + + @Override + public String getArt() { + return "2972_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/HolyStrength.java b/Mage.Sets/src/mage/sets/tenth/HolyStrength.java new file mode 100644 index 0000000000..58c2397e42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/HolyStrength.java @@ -0,0 +1,135 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.SubLayer; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class HolyStrength extends CardImpl { + + public HolyStrength(UUID ownerId) { + super(ownerId, "Holy Strength", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + this.expansionSetCode = "10E"; + this.color.setWhite(true); + this.subtype.add("Aura"); + + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(Outcome.BoostCreature, auraTarget); + this.addAbility(ability); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HolyStrengthEffect())); + + } + + public HolyStrength(final HolyStrength card) { + super(card); + } + + @Override + public HolyStrength copy() { + return new HolyStrength(this); + } + + @Override + public String getArt() { + return "104527_typ_reg_sty_010.jpg"; + } +} + +class HolyStrengthEffect extends ContinuousEffectImpl { + + public HolyStrengthEffect() { + super(Duration.WhileOnBattlefield, Outcome.BoostCreature); + } + + public HolyStrengthEffect(final HolyStrengthEffect effect) { + super(effect); + } + + @Override + public HolyStrengthEffect copy() { + return new HolyStrengthEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent creature = game.getPermanent(enchantment.getAttachedTo()); + if (creature != null) { + switch (layer) { + case PTChangingEffects_7: + if (sublayer == SubLayer.ModifyPT_7c) { + creature.addPower(1); + creature.addToughness(2); + } + break; + } + return true; + } + } + return false; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.PTChangingEffects_7; + } + + @Override + public String getText(Ability source) { + return "Enchanted creature gets +1/+2"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/tenth/Island1.java b/Mage.Sets/src/mage/sets/tenth/Island1.java index 0c4f25591a..c4000895a0 100644 --- a/Mage.Sets/src/mage/sets/tenth/Island1.java +++ b/Mage.Sets/src/mage/sets/tenth/Island1.java @@ -29,32 +29,21 @@ package mage.sets.tenth; import java.util.UUID; -import mage.cards.basiclands.Island; -import mage.sets.Tenth; /** * * @author BetaSteward_at_googlemail.com */ -public class Island1 extends Island { +public class Island1 extends mage.cards.basiclands.Island { public Island1(UUID ownerId) { super(ownerId); - this.expansionSetId = Tenth.getInstance().getId(); - } - - public Island1(final Island1 card) { - super(card); - } - - @Override - public Island1 copy() { - return new Island1(this); + this.expansionSetCode = "10E"; } @Override public String getArt() { - return "80957_typ_reg_sty_010.jpg"; + return "08754_typ_reg_sty_010.jpg"; } } diff --git a/Mage.Sets/src/mage/sets/tenth/Island2.java b/Mage.Sets/src/mage/sets/tenth/Island2.java new file mode 100644 index 0000000000..2414c6417b --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Island2.java @@ -0,0 +1,49 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "10E"; + } + + @Override + public String getArt() { + return "25162_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Island3.java b/Mage.Sets/src/mage/sets/tenth/Island3.java new file mode 100644 index 0000000000..aa9289ea44 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Island3.java @@ -0,0 +1,49 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "10E"; + } + + @Override + public String getArt() { + return "80957_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Island4.java b/Mage.Sets/src/mage/sets/tenth/Island4.java new file mode 100644 index 0000000000..a112d07d33 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Island4.java @@ -0,0 +1,49 @@ +/* + * 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.tenth; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "10E"; + } + + @Override + public String getArt() { + return "89166_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/Juggernaut.java b/Mage.Sets/src/mage/sets/tenth/Juggernaut.java new file mode 100644 index 0000000000..e319a732d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/Juggernaut.java @@ -0,0 +1,98 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.EvasionAbilityImpl; +import mage.abilities.common.AttacksEachTurnStaticAbility; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Juggernaut extends CardImpl { + + public Juggernaut(UUID ownerId) { + super(ownerId, "Juggernaut", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "10E"; + this.subtype.add("Juggernaut"); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + this.addAbility(new AttacksEachTurnStaticAbility()); + this.addAbility(new JuggernautAbility()); + } + + public Juggernaut(final Juggernaut card) { + super(card); + } + + @Override + public Juggernaut copy() { + return new Juggernaut(this); + } + + @Override + public String getArt() { + return "50815_typ_reg_sty_010.jpg"; + } + +} + +class JuggernautAbility extends EvasionAbilityImpl { + + public JuggernautAbility() {} + + public JuggernautAbility(final JuggernautAbility ability) { + super(ability); + } + + @Override + public boolean canBlock(Permanent blocker, Game game) { + return !blocker.getAbilities().containsKey(DefenderAbility.getInstance().getId()); + } + + @Override + public String getRule() { + return "Juggernaut can't be blocked by Walls."; + } + + @Override + public JuggernautAbility copy() { + return new JuggernautAbility(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/KrakensEye.java b/Mage.Sets/src/mage/sets/tenth/KrakensEye.java new file mode 100644 index 0000000000..dba55438c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/KrakensEye.java @@ -0,0 +1,103 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageObject; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class KrakensEye extends CardImpl { + + public KrakensEye(UUID ownerId) { + super(ownerId, "Kraken's Eye", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); + this.expansionSetCode = "10E"; + this.addAbility(new KrakensEyeAbility()); + } + + public KrakensEye(final KrakensEye card) { + super(card); + } + + @Override + public KrakensEye copy() { + return new KrakensEye(this); + } + + @Override + public String getArt() { + return "75197_typ_reg_sty_010.jpg"; + } + +} + +class KrakensEyeAbility extends TriggeredAbilityImpl { + + public KrakensEyeAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); + } + + public KrakensEyeAbility(final KrakensEyeAbility ability) { + super(ability); + } + + @Override + public KrakensEyeAbility copy() { + return new KrakensEyeAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.SPELL_CAST) { + MageObject spell = game.getObject(event.getTargetId()); + if (spell != null && spell.getColor().isBlue()) { + trigger(game, event.getPlayerId()); + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a player casts a blue spell, you may gain 1 life."; + } + +} diff --git a/Mage.Sets/src/mage/sets/tenth/LavaAxe.java b/Mage.Sets/src/mage/sets/tenth/LavaAxe.java new file mode 100644 index 0000000000..038ff5bf06 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/LavaAxe.java @@ -0,0 +1,65 @@ +/* + * 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.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.TargetPlayer; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class LavaAxe extends CardImpl { + + public LavaAxe(UUID ownerId) { + super(ownerId, "Lava Axe", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}"); + this.expansionSetCode = "10E"; + this.color.setRed(true); + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + } + + public LavaAxe(final LavaAxe card) { + super(card); + } + + @Override + public LavaAxe copy() { + return new LavaAxe(this); + } + + @Override + public String getArt() { + return "10394_typ_reg_sty_010.jpg"; + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/Mountain1.java b/Mage.Sets/src/mage/sets/tenth/Mountain1.java index eced6bf3b3..41b290cd66 100644 --- a/Mage.Sets/src/mage/sets/tenth/Mountain1.java +++ b/Mage.Sets/src/mage/sets/tenth/Mountain1.java @@ -29,27 +29,16 @@ package mage.sets.tenth; import java.util.UUID; -import mage.cards.basiclands.Mountain; -import mage.sets.Tenth; /** * * @author BetaSteward_at_googlemail.com */ -public class Mountain1 extends Mountain { +public class Mountain1 extends mage.cards.basiclands.Mountain { public Mountain1(UUID ownerId) { super(ownerId); - this.expansionSetId = Tenth.getInstance().getId(); - } - - public Mountain1(final Mountain1 card) { - super(card); - } - - @Override - public Mountain1 copy() { - return new Mountain1(this); + this.expansionSetCode = "10E"; } @Override diff --git a/Mage.Sets/src/mage/sets/tenth/Plains1.java b/Mage.Sets/src/mage/sets/tenth/Plains1.java index fb4720676e..e2d0c8230d 100644 --- a/Mage.Sets/src/mage/sets/tenth/Plains1.java +++ b/Mage.Sets/src/mage/sets/tenth/Plains1.java @@ -29,27 +29,16 @@ package mage.sets.tenth; import java.util.UUID; -import mage.cards.basiclands.Plains; -import mage.sets.Tenth; /** * * @author BetaSteward_at_googlemail.com */ -public class Plains1 extends Plains { +public class Plains1 extends mage.cards.basiclands.Plains { public Plains1(UUID ownerId) { super(ownerId); - this.expansionSetId = Tenth.getInstance().getId(); - } - - public Plains1(final Plains1 card) { - super(card); - } - - @Override - public Plains1 copy() { - return new Plains1(this); + this.expansionSetCode = "10E"; } @Override diff --git a/Mage.Sets/src/mage/sets/tenth/Swamp1.java b/Mage.Sets/src/mage/sets/tenth/Swamp1.java index fa292bd972..01c000efce 100644 --- a/Mage.Sets/src/mage/sets/tenth/Swamp1.java +++ b/Mage.Sets/src/mage/sets/tenth/Swamp1.java @@ -29,27 +29,16 @@ package mage.sets.tenth; import java.util.UUID; -import mage.cards.basiclands.Swamp; -import mage.sets.Tenth; /** * * @author BetaSteward_at_googlemail.com */ -public class Swamp1 extends Swamp { +public class Swamp1 extends mage.cards.basiclands.Swamp { public Swamp1(UUID ownerId) { super(ownerId); - this.expansionSetId = Tenth.getInstance().getId(); - } - - public Swamp1(final Swamp1 card) { - super(card); - } - - @Override - public Swamp1 copy() { - return new Swamp1(this); + this.expansionSetCode = "10E"; } @Override diff --git a/Mage.Sets/src/mage/sets/worldwake/ArborElf.java b/Mage.Sets/src/mage/sets/worldwake/ArborElf.java index 7b302d67a8..862e05fdb9 100644 --- a/Mage.Sets/src/mage/sets/worldwake/ArborElf.java +++ b/Mage.Sets/src/mage/sets/worldwake/ArborElf.java @@ -30,6 +30,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; @@ -38,7 +39,6 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.UntapTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterLandPermanent; -import mage.sets.Worldwake; import mage.target.common.TargetLandPermanent; /** @@ -54,8 +54,8 @@ public class ArborElf extends CardImpl { } public ArborElf(UUID ownerId) { - super(ownerId, "Arbor Elf", new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Arbor Elf", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "WWK"; this.subtype.add("Elf"); this.subtype.add("Druid"); this.color.setGreen(true); diff --git a/Mage.Sets/src/mage/sets/worldwake/BasiliskCollar.java b/Mage.Sets/src/mage/sets/worldwake/BasiliskCollar.java index 1332e269ef..3f3987f558 100644 --- a/Mage.Sets/src/mage/sets/worldwake/BasiliskCollar.java +++ b/Mage.Sets/src/mage/sets/worldwake/BasiliskCollar.java @@ -31,6 +31,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -39,7 +40,6 @@ import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; -import mage.sets.Worldwake; /** * @@ -48,8 +48,8 @@ import mage.sets.Worldwake; public class BasiliskCollar extends CardImpl { public BasiliskCollar(UUID ownerId) { - super(ownerId, "Basilisk Collar", new CardType[]{CardType.ARTIFACT}, "{1}"); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Basilisk Collar", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "WWK"; this.subtype.add("Equipment"); this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(LifelinkAbility.getInstance()))); diff --git a/Mage.Sets/src/mage/sets/worldwake/BestialMenace.java b/Mage.Sets/src/mage/sets/worldwake/BestialMenace.java new file mode 100644 index 0000000000..e57b682c40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/BestialMenace.java @@ -0,0 +1,69 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.game.permanent.token.ElephantToken; +import mage.game.permanent.token.SnakeToken; +import mage.game.permanent.token.WolfToken; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class BestialMenace extends CardImpl { + + public BestialMenace(UUID ownerId) { + super(ownerId, "Bestial Menace", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}"); + this.expansionSetCode = "WWK"; + this.color.setGreen(true); + this.getSpellAbility().addEffect(new CreateTokenEffect(new SnakeToken())); + this.getSpellAbility().addEffect(new CreateTokenEffect(new WolfToken())); + this.getSpellAbility().addEffect(new CreateTokenEffect(new ElephantToken())); + } + + public BestialMenace(final BestialMenace card) { + super(card); + } + + @Override + public BestialMenace copy() { + return new BestialMenace(this); + } + + @Override + public String getArt() { + return "126463_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java b/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java index 5698245470..433b7c483c 100644 --- a/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java +++ b/Mage.Sets/src/mage/sets/worldwake/CelestialColonnade.java @@ -30,20 +30,20 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.BecomesCreatureSourceEOTEffect; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; import mage.abilities.mana.BlueManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Worldwake; /** * @@ -52,9 +52,9 @@ import mage.sets.Worldwake; public class CelestialColonnade extends CardImpl { public CelestialColonnade(UUID ownerId) { - super(ownerId, "Celestial Colonnade", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Celestial Colonnade", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new BlueManaAbility()); this.addAbility(new WhiteManaAbility()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new CelestialColonnadeToken(), "land"), new ManaCostsImpl("{3}{W}{U}"))); diff --git a/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java b/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java index 117790b4b9..0db68895cd 100644 --- a/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java +++ b/Mage.Sets/src/mage/sets/worldwake/DreadStatuary.java @@ -30,6 +30,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; @@ -38,7 +39,6 @@ import mage.abilities.effects.common.BecomesCreatureSourceEOTEffect; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Worldwake; /** * @@ -47,8 +47,8 @@ import mage.sets.Worldwake; public class DreadStatuary extends CardImpl { public DreadStatuary(UUID ownerId) { - super(ownerId, "Dread Statuary", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Dread Statuary", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; this.addAbility(new ColorlessManaAbility()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new DreadStatuaryToken(), "land"), new ManaCostsImpl("{4}"))); } diff --git a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java index 3f9697b316..a1705c532c 100644 --- a/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java +++ b/Mage.Sets/src/mage/sets/worldwake/EverflowingChalice.java @@ -30,6 +30,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.Mana; import mage.abilities.Ability; @@ -41,7 +42,6 @@ import mage.abilities.keyword.MultikickerAbility; import mage.abilities.mana.ManaAbility; import mage.cards.CardImpl; import mage.game.Game; -import mage.sets.Worldwake; /** * @@ -50,8 +50,8 @@ import mage.sets.Worldwake; public class EverflowingChalice extends CardImpl { public EverflowingChalice(UUID ownerId) { - super(ownerId, "Everflowing Chalice", new CardType[]{CardType.ARTIFACT}, "{0}"); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Everflowing Chalice", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{0}"); + this.expansionSetCode = "WWK"; MultikickerAbility ability = new MultikickerAbility(new AddCountersSourceEffect("charge", 1), false); ability.addManaCost(new GenericManaCost(2)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java b/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java index 99a39f09b8..7a1e4d73d2 100644 --- a/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java +++ b/Mage.Sets/src/mage/sets/worldwake/JaceTheMindSculptor.java @@ -31,6 +31,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; @@ -44,7 +45,6 @@ import mage.cards.CardsImpl; import mage.game.ExileZone; import mage.game.Game; import mage.players.Player; -import mage.sets.Worldwake; import mage.target.TargetPlayer; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCreaturePermanent; @@ -57,8 +57,8 @@ public class JaceTheMindSculptor extends CardImpl { public JaceTheMindSculptor(UUID ownerId) { - super(ownerId, "Jace, the Mind Sculptor", new CardType[]{CardType.PLANESWALKER}, "{2}{U}{U}"); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Jace, the Mind Sculptor", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{U}{U}"); + this.expansionSetCode = "WWK"; this.subtype.add("Jace"); this.color.setBlue(true); this.loyalty = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/worldwake/KhalniGarden.java b/Mage.Sets/src/mage/sets/worldwake/KhalniGarden.java index f9cd98d1f8..efe07b6a03 100644 --- a/Mage.Sets/src/mage/sets/worldwake/KhalniGarden.java +++ b/Mage.Sets/src/mage/sets/worldwake/KhalniGarden.java @@ -30,15 +30,15 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Worldwake; /** * @@ -47,9 +47,9 @@ import mage.sets.Worldwake; public class KhalniGarden extends CardImpl { public KhalniGarden(UUID ownerId) { - super(ownerId, "Khalni Garden", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Khalni Garden", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PlantToken()), false)); this.addAbility(new GreenManaAbility()); } diff --git a/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java b/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java index 43fd946182..dff5440f95 100644 --- a/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java +++ b/Mage.Sets/src/mage/sets/worldwake/LavaclawReaches.java @@ -31,19 +31,19 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.BecomesCreatureSourceEOTEffect; -import mage.abilities.effects.common.BoostPowerSourceVariableEffect; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.BoostPowerXSourceEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.BlackManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Worldwake; /** * @@ -52,10 +52,9 @@ import mage.sets.Worldwake; public class LavaclawReaches extends CardImpl { public LavaclawReaches(UUID ownerId) { - super(ownerId, "Lavaclaw Reaches", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); -// this.art = "126532_typ_reg_sty_010.jpg"; - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Lavaclaw Reaches", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new BlackManaAbility()); this.addAbility(new RedManaAbility()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new LavaclawReachesToken(), "land"), new ManaCostsImpl("{1}{B}{R}"))); @@ -87,7 +86,7 @@ class LavaclawReachesToken extends Token { color.setBlack(true); power = new MageInt(2); toughness = new MageInt(2); - addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostPowerSourceVariableEffect(Duration.EndOfTurn), new ManaCostsImpl("{X}"))); + addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostPowerXSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{X}"))); } } diff --git a/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java b/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java index a15dff430f..656933fb32 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java +++ b/Mage.Sets/src/mage/sets/worldwake/RagingRavine.java @@ -30,6 +30,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.AttacksTriggeredAbility; @@ -38,12 +39,11 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; import mage.abilities.effects.common.BecomesCreatureSourceEOTEffect; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Worldwake; /** * @@ -52,9 +52,9 @@ import mage.sets.Worldwake; public class RagingRavine extends CardImpl { public RagingRavine(UUID ownerId) { - super(ownerId, "Raging Ravine", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Raging Ravine", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new GreenManaAbility()); this.addAbility(new RedManaAbility()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new RagingRavineToken(), "land"), new ManaCostsImpl("{2}{R}{G}"))); diff --git a/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java b/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java index e896b4b111..2d303de5de 100644 --- a/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java +++ b/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java @@ -31,6 +31,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -41,7 +42,6 @@ import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.sets.Worldwake; import mage.target.TargetPlayer; import mage.target.common.TargetCreaturePermanent; import mage.watchers.Watcher; @@ -54,8 +54,8 @@ import mage.watchers.WatcherImpl; public class SearingBlaze extends CardImpl { public SearingBlaze(UUID ownerId) { - super(ownerId, "Searing Blaze", new CardType[]{CardType.INSTANT}, "{R}{R}"); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Searing Blaze", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}{R}"); + this.expansionSetCode = "WWK"; this.color.setRed(true); this.getSpellAbility().addTarget(new TargetPlayer()); //TODO: change this to only allow creatures controlled by first target @@ -129,18 +129,18 @@ class SearingBlazeEffect extends OneShotEffect { Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (watcher != null && watcher.conditionMet()) { if (player != null) { - player.damage(3, source.getId(), game); + player.damage(3, source.getId(), game, false, true); } if (creature != null) { - creature.damage(3, source.getId(), game); + creature.damage(3, source.getId(), game, true); } } else { if (player != null) { - player.damage(1, source.getId(), game); + player.damage(1, source.getId(), game, false, true); } if (creature != null) { - creature.damage(1, source.getId(), game); + creature.damage(1, source.getId(), game, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java b/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java index 9f27eae3d1..b03c43223b 100644 --- a/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java +++ b/Mage.Sets/src/mage/sets/worldwake/SejiriSteppe.java @@ -30,15 +30,16 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.TargetController; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; -import mage.abilities.effects.common.GainProtectionFromColorTargetEOTEffect; +import mage.abilities.effects.common.GainProtectionFromColorTargetEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.choices.ChoiceColor; -import mage.sets.Worldwake; import mage.target.common.TargetCreaturePermanent; /** @@ -48,10 +49,10 @@ import mage.target.common.TargetCreaturePermanent; public class SejiriSteppe extends CardImpl { public SejiriSteppe(UUID ownerId) { - super(ownerId, "Sejiri Steppe", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); - EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainProtectionFromColorTargetEOTEffect(), false); + super(ownerId, "Sejiri Steppe", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), false); ability.addTarget(new TargetCreaturePermanent(1, TargetController.YOU)); ability.addChoice(new ChoiceColor()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java b/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java index b4aa5baf94..f75bd33b61 100644 --- a/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java +++ b/Mage.Sets/src/mage/sets/worldwake/StirringWildwood.java @@ -30,19 +30,19 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.BecomesCreatureSourceEOTEffect; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.keyword.ReachAbility; import mage.abilities.mana.GreenManaAbility; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Worldwake; /** * @@ -51,9 +51,9 @@ import mage.sets.Worldwake; public class StirringWildwood extends CardImpl { public StirringWildwood(UUID ownerId) { - super(ownerId, "Stirring Wildwood", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Stirring Wildwood", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new GreenManaAbility()); this.addAbility(new WhiteManaAbility()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new StirringWildwoodToken(), "land"), new ManaCostsImpl("{1}{G}{W}"))); diff --git a/Mage.Sets/src/mage/sets/worldwake/StoneforgeMystic.java b/Mage.Sets/src/mage/sets/worldwake/StoneforgeMystic.java index 3b4de9d448..e485f96c39 100644 --- a/Mage.Sets/src/mage/sets/worldwake/StoneforgeMystic.java +++ b/Mage.Sets/src/mage/sets/worldwake/StoneforgeMystic.java @@ -30,6 +30,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; @@ -40,7 +41,6 @@ import mage.abilities.effects.common.PlayTargetWithoutPayingManaEffect; import mage.abilities.effects.common.SearchLibraryRevealPutInHandEffect; import mage.cards.CardImpl; import mage.filter.FilterCard; -import mage.sets.Worldwake; import mage.target.common.TargetCardInHand; import mage.target.common.TargetCardInLibrary; @@ -58,8 +58,8 @@ public class StoneforgeMystic extends CardImpl { } public StoneforgeMystic(UUID ownerId) { - super(ownerId, "Stoneforge Mystic", new CardType[]{CardType.CREATURE}, "{1}{W}"); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Stoneforge Mystic", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "WWK"; this.color.setWhite(true); this.subtype.add("Kor"); this.subtype.add("Artificer"); diff --git a/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java b/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java index 9dfeabeaf9..c59557b6b6 100644 --- a/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java +++ b/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java @@ -30,6 +30,7 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -44,7 +45,6 @@ import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; import mage.filter.common.FilterLandPermanent; import mage.game.Game; -import mage.sets.Worldwake; import mage.target.common.TargetNonBasicLandPermanent; /** @@ -54,8 +54,8 @@ import mage.target.common.TargetNonBasicLandPermanent; public class TectonicEdge extends CardImpl { public TectonicEdge(UUID ownerId) { - super(ownerId, "Tectonic Edge", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Tectonic Edge", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "WWK"; this.addAbility(new ColorlessManaAbility()); Costs costs = new CostsImpl(); costs.add(new TapSourceCost()); @@ -101,8 +101,8 @@ class TectonicEdgeCost extends CostImpl { } @Override - public boolean canPay(Ability source, Game game) { - for (UUID opponentId: game.getOpponents(source.getControllerId())) { + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + for (UUID opponentId: game.getOpponents(controllerId)) { if (game.getBattlefield().countAll(filter, opponentId) > 3) { return true; } @@ -111,7 +111,7 @@ class TectonicEdgeCost extends CostImpl { } @Override - public boolean pay(Game game, Ability source, boolean noMana) { + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { this.paid = true; return paid; } diff --git a/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java b/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java index a5a904abff..53db89717b 100644 --- a/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java +++ b/Mage.Sets/src/mage/sets/worldwake/WolfbriarElemental.java @@ -31,13 +31,13 @@ package mage.sets.worldwake; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.ColoredManaSymbol; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.costs.mana.ColoredManaCost; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.MultikickerAbility; import mage.cards.CardImpl; import mage.game.permanent.token.WolfToken; -import mage.sets.Worldwake; /** * @@ -46,8 +46,8 @@ import mage.sets.Worldwake; public class WolfbriarElemental extends CardImpl { public WolfbriarElemental(UUID ownerId) { - super(ownerId, "Wolfbriar Elemental", new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); - this.expansionSetId = Worldwake.getInstance().getId(); + super(ownerId, "Wolfbriar Elemental", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "WWK"; this.subtype.add("Elemental"); this.color.setGreen(true); this.power = new MageInt(4); diff --git a/Mage.Sets/src/mage/sets/zendikar/AdventuringGear.java b/Mage.Sets/src/mage/sets/zendikar/AdventuringGear.java index 46ccd6d9d3..d2468a74c0 100644 --- a/Mage.Sets/src/mage/sets/zendikar/AdventuringGear.java +++ b/Mage.Sets/src/mage/sets/zendikar/AdventuringGear.java @@ -32,12 +32,12 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.abilities.common.LandfallAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -46,8 +46,8 @@ import mage.sets.Zendikar; public class AdventuringGear extends CardImpl { public AdventuringGear(UUID ownerId) { - super(ownerId, "Adventuring Gear", new CardType[]{CardType.ARTIFACT}, "{1}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Adventuring Gear", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "ZEN"; this.subtype.add("Equipment"); this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(1))); this.addAbility(new LandfallAbility(new BoostEquippedEffect(2, 2, Duration.EndOfTurn), false)); diff --git a/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java b/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java index 60bd3d30c2..f1b5f1279d 100644 --- a/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java +++ b/Mage.Sets/src/mage/sets/zendikar/AetherFigment.java @@ -30,12 +30,12 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.AddPlusOneCountersSourceEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -44,8 +44,8 @@ import mage.sets.Zendikar; public class AetherFigment extends CardImpl { public AetherFigment(UUID ownerId) { - super(ownerId, "Æther Figment", new CardType[]{CardType.CREATURE}, "{1}{U}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Æther Figment", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ZEN"; this.subtype.add("Illusion"); this.color.setBlue(true); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java b/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java index 5a60a5e7aa..bc8adca9a8 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java +++ b/Mage.Sets/src/mage/sets/zendikar/ArchiveTrap.java @@ -30,6 +30,7 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.costs.AlternativeCost; import mage.abilities.costs.mana.GenericManaCost; @@ -38,7 +39,6 @@ import mage.cards.CardImpl; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.sets.Zendikar; import mage.target.common.TargetOpponent; import mage.watchers.Watcher; import mage.watchers.WatcherImpl; @@ -50,8 +50,8 @@ import mage.watchers.WatcherImpl; public class ArchiveTrap extends CardImpl { public ArchiveTrap(UUID ownerId) { - super(ownerId, "Archive Trap", new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Archive Trap", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); + this.expansionSetCode = "ZEN"; this.color.setBlue(true); this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(13)); diff --git a/Mage.Sets/src/mage/sets/zendikar/AridMesa.java b/Mage.Sets/src/mage/sets/zendikar/AridMesa.java index 16c779409a..825cea823e 100644 --- a/Mage.Sets/src/mage/sets/zendikar/AridMesa.java +++ b/Mage.Sets/src/mage/sets/zendikar/AridMesa.java @@ -30,9 +30,9 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.FetchLandActivatedAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -41,8 +41,8 @@ import mage.sets.Zendikar; public class AridMesa extends CardImpl { public AridMesa(UUID ownerId) { - super(ownerId, "Arid Mesa", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Arid Mesa", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; this.addAbility(new FetchLandActivatedAbility(new String[] {"Mountain", "Plains"})); } diff --git a/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java b/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java index 25805f8a06..370f7d69a7 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java +++ b/Mage.Sets/src/mage/sets/zendikar/BeastmasterAscension.java @@ -31,6 +31,7 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; @@ -42,7 +43,6 @@ import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; -import mage.sets.Zendikar; /** * @@ -51,8 +51,8 @@ import mage.sets.Zendikar; public class BeastmasterAscension extends CardImpl { public BeastmasterAscension(UUID ownerId) { - super(ownerId, "Beastmaster Ascension", new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Beastmaster Ascension", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "ZEN"; this.color.setGreen(true); this.addAbility(new BeastmasterAscensionAbility()); diff --git a/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java b/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java index cbb3c17c6e..45d7a18a0d 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java +++ b/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java @@ -31,6 +31,7 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.common.GainAbilityControlledEffect; import mage.abilities.keyword.ProtectionAbility; @@ -40,7 +41,6 @@ import mage.filter.FilterCard; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.sets.Zendikar; /** * @@ -49,8 +49,8 @@ import mage.sets.Zendikar; public class BraveTheElements extends CardImpl { public BraveTheElements(UUID ownerId) { - super(ownerId, "Brave the Elements", new CardType[]{CardType.INSTANT}, "{W}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Brave the Elements", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "ZEN"; this.color.setWhite(true); this.getSpellAbility().addChoice(new ChoiceColor()); this.getSpellAbility().addEffect(new BraveTheElementsEffect()); diff --git a/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java b/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java index 0eb50d0ad0..d6cb700ab3 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java +++ b/Mage.Sets/src/mage/sets/zendikar/BurstLightning.java @@ -30,11 +30,11 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; import mage.target.common.TargetCreatureOrPlayer; /** @@ -44,8 +44,8 @@ import mage.target.common.TargetCreatureOrPlayer; public class BurstLightning extends CardImpl { public BurstLightning(UUID ownerId) { - super(ownerId, "Burst Lightning", new CardType[]{CardType.INSTANT}, "{R}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Burst Lightning", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "ZEN"; this.color.setRed(true); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); this.getSpellAbility().addEffect(new DamageTargetEffect(2)); diff --git a/Mage.Sets/src/mage/sets/zendikar/Cancel.java b/Mage.Sets/src/mage/sets/zendikar/Cancel.java new file mode 100644 index 0000000000..7f4a9287b4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Cancel.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Cancel extends mage.sets.shardsofalara.Cancel { + + public Cancel(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123652_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java index 90893ed8a4..7bc87daff8 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java +++ b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java @@ -30,13 +30,13 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Zendikar; /** * @@ -45,8 +45,8 @@ import mage.sets.Zendikar; public class ConquerorsPledge extends CardImpl { public ConquerorsPledge(UUID ownerId) { - super(ownerId, "Conquerors Pledge", new CardType[]{CardType.SORCERY}, "{2}{W}{W}{W}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Conquerors Pledge", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}{W}"); + this.expansionSetCode = "ZEN"; this.color.setWhite(true); this.getSpellAbility().addEffect(new CreateTokenEffect(new KorSoldierToken(), 6)); KickerAbility ability = new KickerAbility(new CreateTokenEffect(new KorSoldierToken(), 12), true); diff --git a/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java b/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java index 6e2f6f959c..359f9a1715 100644 --- a/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java +++ b/Mage.Sets/src/mage/sets/zendikar/DayOfJudgment.java @@ -30,10 +30,10 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.filter.common.FilterCreaturePermanent; -import mage.sets.Zendikar; /** * @@ -42,8 +42,8 @@ import mage.sets.Zendikar; public class DayOfJudgment extends CardImpl { public DayOfJudgment(UUID ownerId) { - super(ownerId, "Day of Judgment", new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Day of Judgment", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); + this.expansionSetCode = "ZEN"; this.color.setWhite(true); this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"))); } diff --git a/Mage.Sets/src/mage/sets/zendikar/Demolish.java b/Mage.Sets/src/mage/sets/zendikar/Demolish.java new file mode 100644 index 0000000000..2e161b4602 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Demolish.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Demolish extends mage.sets.tenth.Demolish { + + public Demolish(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123684_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/EldraziMonument.java b/Mage.Sets/src/mage/sets/zendikar/EldraziMonument.java index 640b58bca7..41bde8eecc 100644 --- a/Mage.Sets/src/mage/sets/zendikar/EldraziMonument.java +++ b/Mage.Sets/src/mage/sets/zendikar/EldraziMonument.java @@ -32,6 +32,7 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.OnEventTriggeredAbility; @@ -47,7 +48,6 @@ import mage.game.Game; import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.sets.Zendikar; import mage.target.common.TargetControlledPermanent; /** @@ -56,14 +56,12 @@ import mage.target.common.TargetControlledPermanent; */ public class EldraziMonument extends CardImpl { - private static FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures"); - public EldraziMonument(UUID ownerId) { - super(ownerId, "Eldrazi Monument", new CardType[]{CardType.ARTIFACT}, "{5}"); - this.expansionSetId = Zendikar.getInstance().getId(); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, filter))); + super(ownerId, "Eldrazi Monument", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT}, "{5}"); + this.expansionSetCode = "ZEN"; + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault(), false))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault()))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, FilterCreaturePermanent.getDefault()))); this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new EldraziMonumentEffect())); } @@ -85,8 +83,6 @@ public class EldraziMonument extends CardImpl { class EldraziMonumentEffect extends OneShotEffect { - private static FilterCreaturePermanent filter = new FilterCreaturePermanent(); - public EldraziMonumentEffect() { super(Outcome.Sacrifice); } @@ -102,21 +98,19 @@ class EldraziMonumentEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter); + TargetControlledPermanent target = new TargetControlledPermanent(1, 1, FilterCreaturePermanent.getDefault(), true); target.setRequired(true); Player player = game.getPlayer(source.getControllerId()); if (target.canChoose(source.getId(), source.getControllerId(), game)) { - player.chooseTarget(this.outcome, target, source, game); + player.choose(this.outcome, target, game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { return permanent.sacrifice(source.getSourceId(), game); } } - else { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent != null) { - return permanent.sacrifice(source.getSourceId(), game); - } + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + return permanent.sacrifice(source.getSourceId(), game); } return false; diff --git a/Mage.Sets/src/mage/sets/zendikar/EmeriaAngel.java b/Mage.Sets/src/mage/sets/zendikar/EmeriaAngel.java index ca3c95ac36..afa064fd08 100644 --- a/Mage.Sets/src/mage/sets/zendikar/EmeriaAngel.java +++ b/Mage.Sets/src/mage/sets/zendikar/EmeriaAngel.java @@ -30,13 +30,13 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.LandfallAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Zendikar; /** * @@ -45,8 +45,8 @@ import mage.sets.Zendikar; public class EmeriaAngel extends CardImpl { public EmeriaAngel(UUID ownerId) { - super(ownerId, "Emeria Angel", new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Emeria Angel", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "ZEN"; this.subtype.add("Angel"); this.color.setWhite(true); this.power = new MageInt(3); diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest1.java b/Mage.Sets/src/mage/sets/zendikar/Forest1.java new file mode 100644 index 0000000000..14702c7b09 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Forest1.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest1 extends mage.cards.basiclands.Forest { + + public Forest1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123765_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest2.java b/Mage.Sets/src/mage/sets/zendikar/Forest2.java new file mode 100644 index 0000000000..e365a8bde5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Forest2.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest2 extends mage.cards.basiclands.Forest { + + public Forest2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123761_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest3.java b/Mage.Sets/src/mage/sets/zendikar/Forest3.java new file mode 100644 index 0000000000..1fa9fec31b --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Forest3.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest3 extends mage.cards.basiclands.Forest { + + public Forest3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123752_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/Forest4.java b/Mage.Sets/src/mage/sets/zendikar/Forest4.java new file mode 100644 index 0000000000..8ec9e595a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Forest4.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Forest4 extends mage.cards.basiclands.Forest { + + public Forest4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123768_typ_reg_sty_010.jpg"; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java b/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java index 41ef93a620..94acebb1d0 100644 --- a/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java +++ b/Mage.Sets/src/mage/sets/zendikar/GoblinGuide.java @@ -31,6 +31,7 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.Ability; @@ -44,7 +45,6 @@ import mage.cards.CardsImpl; import mage.game.Game; import mage.game.combat.CombatGroup; import mage.players.Player; -import mage.sets.Zendikar; /** * @@ -53,8 +53,8 @@ import mage.sets.Zendikar; public class GoblinGuide extends CardImpl { public GoblinGuide(UUID ownerId) { - super(ownerId, "Goblin Guide", new CardType[]{CardType.CREATURE}, "{R}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Goblin Guide", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "ZEN"; this.color.setRed(true); this.subtype.add("Goblin"); this.subtype.add("Scout"); diff --git a/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java b/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java index fb09f0de31..e3eb159516 100644 --- a/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java +++ b/Mage.Sets/src/mage/sets/zendikar/GoblinRuinblaster.java @@ -32,14 +32,17 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.ColoredManaSymbol; +import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.ColoredManaCost; -import mage.abilities.effects.EntersBattlefieldEffect; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainAbilitySourceEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; import mage.target.common.TargetNonBasicLandPermanent; /** @@ -49,18 +52,19 @@ import mage.target.common.TargetNonBasicLandPermanent; public class GoblinRuinblaster extends CardImpl { public GoblinRuinblaster(UUID ownerId) { - super(ownerId, "Goblin Ruinblaster", new CardType[]{CardType.CREATURE}, "{2}{R}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Goblin Ruinblaster", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ZEN"; this.color.setRed(true); this.subtype.add("Goblin"); this.subtype.add("Shaman"); this.power = new MageInt(2); this.toughness = new MageInt(1); this.addAbility(HasteAbility.getInstance()); - KickerAbility ability = new KickerAbility(new EntersBattlefieldEffect(new DestroyTargetEffect()), false); - ability.addTarget(new TargetNonBasicLandPermanent()); - ability.addManaCost(new ColoredManaCost(ColoredManaSymbol.R)); - this.addAbility(ability); + Ability ability1 = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect()); + ability1.addTarget(new TargetNonBasicLandPermanent()); + KickerAbility ability2 = new KickerAbility(new GainAbilitySourceEffect(ability1, Duration.WhileOnBattlefield), false); + ability2.addManaCost(new ColoredManaCost(ColoredManaSymbol.R)); + this.addAbility(ability1); } diff --git a/Mage.Sets/src/mage/sets/zendikar/Island1.java b/Mage.Sets/src/mage/sets/zendikar/Island1.java new file mode 100644 index 0000000000..853dbaa161 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Island1.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island1 extends mage.cards.basiclands.Island { + + public Island1(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123767_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/zendikar/Island2.java b/Mage.Sets/src/mage/sets/zendikar/Island2.java new file mode 100644 index 0000000000..33653b34eb --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Island2.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island2 extends mage.cards.basiclands.Island { + + public Island2(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123756_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/zendikar/Island3.java b/Mage.Sets/src/mage/sets/zendikar/Island3.java new file mode 100644 index 0000000000..851b6c35df --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Island3.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island3 extends mage.cards.basiclands.Island { + + public Island3(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123754_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/zendikar/Island4.java b/Mage.Sets/src/mage/sets/zendikar/Island4.java new file mode 100644 index 0000000000..cc0fb05ec2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/Island4.java @@ -0,0 +1,49 @@ +/* + * 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.zendikar; + +import java.util.UUID; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Island4 extends mage.cards.basiclands.Island { + + public Island4(UUID ownerId) { + super(ownerId); + this.expansionSetCode = "ZEN"; + } + + @Override + public String getArt() { + return "123757_typ_reg_sty_010.jpg"; + } + +} diff --git a/Mage.Sets/src/mage/sets/zendikar/KabiraCrossroads.java b/Mage.Sets/src/mage/sets/zendikar/KabiraCrossroads.java index dfd5671689..900683b260 100644 --- a/Mage.Sets/src/mage/sets/zendikar/KabiraCrossroads.java +++ b/Mage.Sets/src/mage/sets/zendikar/KabiraCrossroads.java @@ -30,13 +30,13 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.WhiteManaAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -45,9 +45,9 @@ import mage.sets.Zendikar; public class KabiraCrossroads extends CardImpl { public KabiraCrossroads(UUID ownerId) { - super(ownerId, "Kabira Crossroads", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Kabira Crossroads", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2), false)); this.addAbility(new WhiteManaAbility()); } diff --git a/Mage.Sets/src/mage/sets/zendikar/LotusCobra.java b/Mage.Sets/src/mage/sets/zendikar/LotusCobra.java index c49cb1c178..f97950091f 100644 --- a/Mage.Sets/src/mage/sets/zendikar/LotusCobra.java +++ b/Mage.Sets/src/mage/sets/zendikar/LotusCobra.java @@ -30,12 +30,12 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.LandfallAbility; import mage.abilities.effects.common.AddManaOfAnyColorEffect; import mage.cards.CardImpl; import mage.choices.ChoiceColor; -import mage.sets.Zendikar; /** * @@ -44,8 +44,8 @@ import mage.sets.Zendikar; public class LotusCobra extends CardImpl { public LotusCobra(UUID ownerId) { - super(ownerId, "Lotus Cobra", new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Lotus Cobra", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ZEN"; this.subtype.add("Snake"); this.color.setGreen(true); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/sets/zendikar/MarshFlats.java b/Mage.Sets/src/mage/sets/zendikar/MarshFlats.java index a96699a56b..735890adf9 100644 --- a/Mage.Sets/src/mage/sets/zendikar/MarshFlats.java +++ b/Mage.Sets/src/mage/sets/zendikar/MarshFlats.java @@ -30,9 +30,9 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.FetchLandActivatedAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -41,8 +41,8 @@ import mage.sets.Zendikar; public class MarshFlats extends CardImpl { public MarshFlats(UUID ownerId) { - super(ownerId, "Marsh Flats", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Marsh Flats", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; this.addAbility(new FetchLandActivatedAbility(new String[] {"Swamp", "Plains"})); } diff --git a/Mage.Sets/src/mage/sets/zendikar/MistyRainforest.java b/Mage.Sets/src/mage/sets/zendikar/MistyRainforest.java index f9b0ca97e6..caf9cf7134 100644 --- a/Mage.Sets/src/mage/sets/zendikar/MistyRainforest.java +++ b/Mage.Sets/src/mage/sets/zendikar/MistyRainforest.java @@ -30,9 +30,9 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.FetchLandActivatedAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -41,8 +41,8 @@ import mage.sets.Zendikar; public class MistyRainforest extends CardImpl { public MistyRainforest(UUID ownerId) { - super(ownerId, "Misty Rainforest", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Misty Rainforest", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; this.addAbility(new FetchLandActivatedAbility(new String[] {"Forest", "Island"})); } diff --git a/Mage.Sets/src/mage/sets/zendikar/OranRiefTheVastwood.java b/Mage.Sets/src/mage/sets/zendikar/OranRiefTheVastwood.java index 0d3952ac17..e33e293291 100644 --- a/Mage.Sets/src/mage/sets/zendikar/OranRiefTheVastwood.java +++ b/Mage.Sets/src/mage/sets/zendikar/OranRiefTheVastwood.java @@ -31,20 +31,20 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.GreenManaAbility; import mage.cards.CardImpl; import mage.counters.PlusOneCounter; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.sets.Zendikar; /** * @@ -53,10 +53,9 @@ import mage.sets.Zendikar; public class OranRiefTheVastwood extends CardImpl { public OranRiefTheVastwood(UUID ownerId) { - super(ownerId, "Oran-Rief, the Vastwood", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); -// this.art = "123692_typ_reg_sty_010.jpg"; - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Oran-Rief, the Vastwood", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); this.addAbility(new GreenManaAbility()); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new OranRiefTheVastwoodEffect(), new TapSourceCost())); } diff --git a/Mage.Sets/src/mage/sets/zendikar/RampagingBaloths.java b/Mage.Sets/src/mage/sets/zendikar/RampagingBaloths.java index d7fa3bf150..00a58c098f 100644 --- a/Mage.Sets/src/mage/sets/zendikar/RampagingBaloths.java +++ b/Mage.Sets/src/mage/sets/zendikar/RampagingBaloths.java @@ -30,13 +30,13 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.LandfallAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.game.permanent.token.Token; -import mage.sets.Zendikar; /** * @@ -45,8 +45,8 @@ import mage.sets.Zendikar; public class RampagingBaloths extends CardImpl { public RampagingBaloths(UUID ownerId) { - super(ownerId, "Rampaging Baloths", new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Rampaging Baloths", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "ZEN"; this.subtype.add("Beast"); this.color.setGreen(true); this.power = new MageInt(6); diff --git a/Mage.Sets/src/mage/sets/zendikar/RiverBoa.java b/Mage.Sets/src/mage/sets/zendikar/RiverBoa.java index 340d5ffb76..752adce748 100644 --- a/Mage.Sets/src/mage/sets/zendikar/RiverBoa.java +++ b/Mage.Sets/src/mage/sets/zendikar/RiverBoa.java @@ -30,6 +30,7 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; @@ -39,7 +40,6 @@ import mage.abilities.keyword.LandwalkAbility; import mage.cards.CardImpl; import mage.filter.Filter.ComparisonScope; import mage.filter.common.FilterLandPermanent; -import mage.sets.Zendikar; /** * @@ -55,8 +55,8 @@ public class RiverBoa extends CardImpl { } public RiverBoa(UUID ownerId) { - super(ownerId, "River Boa", new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "River Boa", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ZEN"; this.color.setGreen(true); this.subtype.add("Snake"); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/sets/zendikar/ScaldingTarn.java b/Mage.Sets/src/mage/sets/zendikar/ScaldingTarn.java index 141b6aace2..0b71672544 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ScaldingTarn.java +++ b/Mage.Sets/src/mage/sets/zendikar/ScaldingTarn.java @@ -30,9 +30,9 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.FetchLandActivatedAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -41,8 +41,8 @@ import mage.sets.Zendikar; public class ScaldingTarn extends CardImpl { public ScaldingTarn(UUID ownerId) { - super(ownerId, "Scalding Tarn", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Scalding Tarn", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; this.addAbility(new FetchLandActivatedAbility(new String[] {"Island", "Mountain"})); } diff --git a/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java b/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java index 7737244d63..a16fbcec38 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java +++ b/Mage.Sets/src/mage/sets/zendikar/ScuteMob.java @@ -30,6 +30,7 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; @@ -39,7 +40,6 @@ import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; -import mage.sets.Zendikar; /** * @@ -48,8 +48,8 @@ import mage.sets.Zendikar; public class ScuteMob extends CardImpl { public ScuteMob(UUID ownerId) { - super(ownerId, "Scute Mob", new CardType[]{CardType.CREATURE}, "{G}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Scute Mob", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "ZEN"; this.color.setGreen(true); this.subtype.add("Insect"); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java b/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java index 49f183f613..07733673e7 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java +++ b/Mage.Sets/src/mage/sets/zendikar/SpreadingSeas.java @@ -33,6 +33,7 @@ import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Layer; import mage.Constants.Outcome; +import mage.Constants.Rarity; import mage.Constants.SubLayer; import mage.Constants.Zone; import mage.abilities.Ability; @@ -46,7 +47,6 @@ import mage.abilities.mana.BlueManaAbility; import mage.cards.CardImpl; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.sets.Zendikar; import mage.target.TargetPermanent; import mage.target.common.TargetLandPermanent; @@ -57,8 +57,8 @@ import mage.target.common.TargetLandPermanent; public class SpreadingSeas extends CardImpl { public SpreadingSeas(UUID ownerId) { - super(ownerId, "Spreading Seas", new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Spreading Seas", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "ZEN"; this.color.setBlue(true); this.subtype.add("Aura"); @@ -105,7 +105,7 @@ class SpreadingSeasEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent enchantment = game.getPermanent(source.getSourceId()); - if (enchantment.getAttachedTo() != null) { + if (enchantment != null && enchantment.getAttachedTo() != null) { Permanent land = game.getPermanent(enchantment.getAttachedTo()); if (land != null) { switch (layer) { @@ -140,6 +140,6 @@ class SpreadingSeasEffect extends ContinuousEffectImpl { @Override public String getText(Ability source) { - return "Enchanted land is an Island."; + return "Enchanted land is an Island"; } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/SteppeLynx.java b/Mage.Sets/src/mage/sets/zendikar/SteppeLynx.java index c58caedcfc..29d3bec782 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SteppeLynx.java +++ b/Mage.Sets/src/mage/sets/zendikar/SteppeLynx.java @@ -31,11 +31,11 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.MageInt; import mage.abilities.common.LandfallAbility; import mage.abilities.effects.common.BoostSourceEffect; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -44,8 +44,8 @@ import mage.sets.Zendikar; public class SteppeLynx extends CardImpl { public SteppeLynx(UUID ownerId) { - super(ownerId, "Steppe Lynx", new CardType[]{CardType.CREATURE}, "{W}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Steppe Lynx", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "ZEN"; this.subtype.add("Cat"); this.color.setWhite(true); this.power = new MageInt(0); diff --git a/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java b/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java index e6f9b13518..8042e90246 100644 --- a/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java +++ b/Mage.Sets/src/mage/sets/zendikar/SunspringExpedition.java @@ -30,9 +30,9 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.ActivatedAbility; -import mage.abilities.ActivatedAbilityImpl; import mage.abilities.common.LandfallAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.Costs; @@ -42,7 +42,6 @@ import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.effects.common.AddCountersSourceEffect; import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -51,8 +50,8 @@ import mage.sets.Zendikar; public class SunspringExpedition extends CardImpl { public SunspringExpedition(UUID ownerId) { - super(ownerId, "Sunspring Expedition", new CardType[]{CardType.ENCHANTMENT}, "{W}"); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Sunspring Expedition", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{W}"); + this.expansionSetCode = "ZEN"; this.color.setWhite(true); this.addAbility(new LandfallAbility(new AddCountersSourceEffect("quest", 1), true)); diff --git a/Mage.Sets/src/mage/sets/zendikar/TeeteringPeaks.java b/Mage.Sets/src/mage/sets/zendikar/TeeteringPeaks.java index cb10a66489..29bf3bcb07 100644 --- a/Mage.Sets/src/mage/sets/zendikar/TeeteringPeaks.java +++ b/Mage.Sets/src/mage/sets/zendikar/TeeteringPeaks.java @@ -31,14 +31,14 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; +import mage.Constants.Rarity; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.BoostTargetEffect; -import mage.abilities.effects.common.EntersBattlefieldTappedEffect; +import mage.abilities.effects.common.TapSourceEffect; import mage.abilities.mana.RedManaAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; import mage.target.common.TargetCreaturePermanent; /** @@ -48,9 +48,9 @@ import mage.target.common.TargetCreaturePermanent; public class TeeteringPeaks extends CardImpl { public TeeteringPeaks(UUID ownerId) { - super(ownerId, "Teetering Peaks", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); - this.addAbility(new EntersBattlefieldStaticAbility(new EntersBattlefieldTappedEffect())); + super(ownerId, "Teetering Peaks", Rarity.COMMON, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; + this.addAbility(new EntersBattlefieldStaticAbility(new TapSourceEffect(), "tapped")); Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 0, Duration.EndOfTurn), false); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/zendikar/VerdantCatacombs.java b/Mage.Sets/src/mage/sets/zendikar/VerdantCatacombs.java index 73e3d24513..a0fc570097 100644 --- a/Mage.Sets/src/mage/sets/zendikar/VerdantCatacombs.java +++ b/Mage.Sets/src/mage/sets/zendikar/VerdantCatacombs.java @@ -30,9 +30,9 @@ package mage.sets.zendikar; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.common.FetchLandActivatedAbility; import mage.cards.CardImpl; -import mage.sets.Zendikar; /** * @@ -41,8 +41,8 @@ import mage.sets.Zendikar; public class VerdantCatacombs extends CardImpl { public VerdantCatacombs(UUID ownerId) { - super(ownerId, "Verdant Catacombs", new CardType[]{CardType.LAND}, null); - this.expansionSetId = Zendikar.getInstance().getId(); + super(ownerId, "Verdant Catacombs", Rarity.RARE, new CardType[]{CardType.LAND}, null); + this.expansionSetCode = "ZEN"; this.addAbility(new FetchLandActivatedAbility(new String[] {"Forest", "Swamp"})); } diff --git a/Mage/src/mage/Constants.java b/Mage/src/mage/Constants.java index 0dbeed3abe..83027c4475 100644 --- a/Mage/src/mage/Constants.java +++ b/Mage/src/mage/Constants.java @@ -88,6 +88,56 @@ public final class Constants { } + public enum Rarity { + + LAND ("Land", "common"), + COMMON ("Common", "common"), + UNCOMMON ("Uncommon", "uncommon"), + RARE ("Rare", "rare"), + MYTHIC ("Mythic", "mythic"); + + private String text; + private String symbolCode; + + Rarity(String text, String symbolCode) { + this.text = text; + this.symbolCode = symbolCode; + } + + @Override + public String toString() { + return text; + } + + public String getSymbolCode() { + return symbolCode; + } + + } + + public enum AbilityType { + PLAY_LAND("Play land"), + MANA("Mana"), + SPELL("Spell"), + ACTIVATED("Activated"), + STATIC("Static"), + TRIGGERED("Triggered"), + EVASION("Evasion"), + LOYALTY("Loyalty"), + SPECIAL_ACTION("Special Action"); + + private String text; + + AbilityType(String text) { + this.text = text; + } + + @Override + public String toString() { + return text; + } + } + public enum Duration { OneUse(""), EndOfGame("for the rest of the game"), @@ -240,7 +290,7 @@ public final class Constants { } public enum Zone { - HAND, GRAVEYARD, LIBRARY, BATTLEFIELD, STACK, EXILED, ALL, OUTSIDE, CARD_PICKER, REVEALED, PLAYER, ATTACKERS, BLOCKERS; + HAND, GRAVEYARD, LIBRARY, BATTLEFIELD, STACK, EXILED, ALL, OUTSIDE, PICK; public boolean match(Zone zone) { if (this == zone || this == ALL || zone == ALL) @@ -290,7 +340,7 @@ public final class Constants { } } - public static List PlaneswalkerTypes = new ArrayList() + public static final List PlaneswalkerTypes = new ArrayList() {{add("Ajani"); add("Bolas"); add("Chandra"); add("Elspeth");add("Garruk"); add("Jace"); add("Liliana"); add("Nissa"); add("Sarkhan"); add("Sorin"); add("Tezzeret");}}; private Constants() { diff --git a/Mage/src/mage/MageInt.java b/Mage/src/mage/MageInt.java index 99ab7c3728..81c0ff2bf0 100644 --- a/Mage/src/mage/MageInt.java +++ b/Mage/src/mage/MageInt.java @@ -29,8 +29,9 @@ package mage; import java.io.Serializable; +import mage.util.Copyable; -public class MageInt implements Serializable { +public class MageInt implements Serializable, Copyable { public static MageInt EmptyMageInt = new MageInt(0, ""); @@ -46,6 +47,11 @@ public class MageInt implements Serializable { this.baseValue = baseValue; this.cardValue = cardValue; } + + @Override + public MageInt copy() { + return new MageInt(baseValue, cardValue); + } public int getValue() { return baseValue; @@ -65,4 +71,5 @@ public class MageInt implements Serializable { public String toString() { return cardValue; } + } diff --git a/Mage/src/mage/MageObject.java b/Mage/src/mage/MageObject.java index b3e8d9af6d..c9f0323ea2 100644 --- a/Mage/src/mage/MageObject.java +++ b/Mage/src/mage/MageObject.java @@ -5,19 +5,23 @@ import java.util.List; import mage.Constants.CardType; import mage.Constants.Zone; import mage.abilities.Abilities; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; +import mage.game.Game; public interface MageObject extends MageItem, Serializable { public String getName(); + public void setName(String name); public List getCardType(); public List getSubtype(); public List getSupertype(); - public Abilities getAbilities(); + public Abilities getAbilities(); public ObjectColor getColor(); - public ManaCosts getManaCost(); + public ManaCosts getManaCost(); public MageInt getPower(); public MageInt getToughness(); @@ -25,5 +29,8 @@ public interface MageObject extends MageItem, Serializable { public Zone getZone(); public void setZone(Zone zone); - + + public void adjustCosts(Ability ability, Game game); + + public MageObject copy(); } diff --git a/Mage/src/mage/MageObjectImpl.java b/Mage/src/mage/MageObjectImpl.java index cc1f7a9410..30133e742d 100644 --- a/Mage/src/mage/MageObjectImpl.java +++ b/Mage/src/mage/MageObjectImpl.java @@ -31,33 +31,73 @@ package mage; import java.util.ArrayList; import java.util.List; import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Zone; -import mage.Constants.*; import mage.abilities.Abilities; import mage.abilities.AbilitiesImpl; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.game.Game; -public abstract class MageObjectImpl implements MageObject { +public abstract class MageObjectImpl> implements MageObject { - protected UUID objectId; + protected final UUID objectId; protected String name; - protected ManaCosts manaCost = new ManaCosts(""); - protected ObjectColor color = new ObjectColor(); + protected ManaCosts manaCost; + protected ObjectColor color; protected List cardType = new ArrayList(); protected List subtype = new ArrayList(); protected List supertype = new ArrayList(); - protected Abilities abilities = new AbilitiesImpl(); + protected Abilities abilities; protected String text; - protected MageInt power = new MageInt(0); - protected MageInt toughness = new MageInt(0); - protected MageInt loyalty = new MageInt(0); + protected MageInt power; + protected MageInt toughness; + protected MageInt loyalty; protected Zone zone; + + @Override + public abstract T copy(); public MageObjectImpl() { - objectId = UUID.randomUUID(); + this(UUID.randomUUID()); } - + + public MageObjectImpl(UUID id) { + objectId = id; + power = new MageInt(0); + toughness = new MageInt(0); + loyalty = new MageInt(0); + color = new ObjectColor(); + manaCost = new ManaCostsImpl(""); + abilities = new AbilitiesImpl(); + } + + public MageObjectImpl(final MageObjectImpl object) { + objectId = object.objectId; + name = object.name; + manaCost = object.manaCost.copy(); + text = object.text; + zone = object.zone; + color = object.color.copy(); + power = object.power.copy(); + toughness = object.toughness.copy(); + loyalty = object.loyalty.copy(); + abilities = object.abilities.copy(); + for (CardType cType: object.cardType) { + cardType.add(cType); + } + for (String subType: object.subtype) { + this.subtype.add(subType); + } + for (String superType: object.supertype) { + this.supertype.add(superType); + } + } + @Override public UUID getId() { return objectId; @@ -68,6 +108,11 @@ public abstract class MageObjectImpl implements MageObject { return name; } + @Override + public void setName(String name) { + this.name = name; + } + @Override public List getCardType() { return cardType; @@ -84,29 +129,23 @@ public abstract class MageObjectImpl implements MageObject { } @Override - public Abilities getAbilities(){ + public Abilities getAbilities(){ return abilities; } @Override public MageInt getPower() { -// if (power != null) - return power; -// return MageInt.EmptyMageInt; + return power; } @Override public MageInt getToughness() { -// if (toughness != null) - return toughness; -// return MageInt.EmptyMageInt; + return toughness; } @Override public MageInt getLoyalty() { -// if (loyalty != null) - return loyalty; -// return MageInt.EmptyMageInt; + return loyalty; } @Override @@ -115,7 +154,7 @@ public abstract class MageObjectImpl implements MageObject { } @Override - public ManaCosts getManaCost() { + public ManaCosts getManaCost() { return manaCost; } @@ -128,4 +167,8 @@ public abstract class MageObjectImpl implements MageObject { public void setZone(Zone zone) { this.zone = zone; } + + @Override + public void adjustCosts(Ability ability, Game game) {} + } diff --git a/Mage/src/mage/MageObjects.java b/Mage/src/mage/MageObjects.java index 3c19ac72b7..47329a74bd 100644 --- a/Mage/src/mage/MageObjects.java +++ b/Mage/src/mage/MageObjects.java @@ -30,11 +30,12 @@ package mage; import java.util.Map; import java.util.UUID; +import mage.util.Copyable; /** * * @author BetaSteward_at_googlemail.com */ -public interface MageObjects extends Map { +public interface MageObjects extends Map, Copyable { } diff --git a/Mage/src/mage/MageObjectsImpl.java b/Mage/src/mage/MageObjectsImpl.java index bae0fedc49..0baa5487bd 100644 --- a/Mage/src/mage/MageObjectsImpl.java +++ b/Mage/src/mage/MageObjectsImpl.java @@ -35,6 +35,12 @@ import java.util.UUID; * * @author BetaSteward_at_googlemail.com */ -public class MageObjectsImpl extends LinkedHashMap implements MageObjects { +public class MageObjectsImpl extends LinkedHashMap implements MageObjects { + + @Override + public MageObjects copy() { + throw new UnsupportedOperationException("Not supported yet."); + } + } diff --git a/Mage/src/mage/Mana.java b/Mage/src/mage/Mana.java index cff7381fbd..9d76e62557 100644 --- a/Mage/src/mage/Mana.java +++ b/Mage/src/mage/Mana.java @@ -29,30 +29,41 @@ package mage; import java.io.Serializable; +import mage.util.Copyable; /** * * @author BetaSteward_at_googlemail.com */ -public class Mana implements Comparable, Serializable { +public class Mana implements Comparable, Serializable, Copyable { - private int red = 0; - private int green = 0; - private int blue = 0; - private int white = 0; - private int black = 0; - private int colorless = 0; - private int any = 0; + private int red; + private int green; + private int blue; + private int white; + private int black; + private int colorless; + private int any; - public static Mana RedMana = RedMana(1); - public static Mana GreenMana = GreenMana(1); - public static Mana BlueMana = BlueMana(1); - public static Mana WhiteMana = WhiteMana(1); - public static Mana BlackMana = BlackMana(1); - public static Mana ColorlessMana = ColorlessMana(1); + public static final Mana RedMana = RedMana(1); + public static final Mana GreenMana = GreenMana(1); + public static final Mana BlueMana = BlueMana(1); + public static final Mana WhiteMana = WhiteMana(1); + public static final Mana BlackMana = BlackMana(1); + public static final Mana ColorlessMana = ColorlessMana(1); public Mana() {} + public Mana(final Mana mana) { + red = mana.red; + green = mana.green; + blue = mana.blue; + white = mana.white; + black = mana.black; + colorless = mana.colorless; + any = mana.any; + } + public static Mana RedMana(int num) { return new Mana(num, 0, 0, 0, 0, 0, 0); } @@ -132,7 +143,7 @@ public class Mana implements Comparable, Serializable { } public int count() { - return red +green + blue + white + black + colorless + any; + return red + green + blue + white + black + colorless + any; } public void clear() { @@ -165,10 +176,9 @@ public class Mana implements Comparable, Serializable { return sbMana.toString(); } + @Override public Mana copy() { - Mana copy = new Mana(); - copy.add(this); - return copy; + return new Mana(this); } public boolean enough(Mana avail) { @@ -325,6 +335,7 @@ public class Mana implements Comparable, Serializable { this.any = any; } + @Override public int compareTo(Mana o) { return this.count() - o.count(); } diff --git a/Mage/src/mage/ObjectColor.java b/Mage/src/mage/ObjectColor.java index b83f7c0405..00cbb2e4eb 100644 --- a/Mage/src/mage/ObjectColor.java +++ b/Mage/src/mage/ObjectColor.java @@ -29,8 +29,9 @@ package mage; import java.io.Serializable; +import mage.util.Copyable; -public class ObjectColor implements Serializable { +public class ObjectColor implements Serializable, Copyable { public static final ObjectColor WHITE = new ObjectColor("W"); public static final ObjectColor BLUE = new ObjectColor("U"); @@ -63,6 +64,14 @@ public class ObjectColor implements Serializable { } } + public ObjectColor(ObjectColor color) { + white = color.white; + blue = color.blue; + black = color.black; + red = color.red; + green = color.green; + } + public int getColorCount() { int count = 0; if (white) count++; @@ -196,5 +205,10 @@ public class ObjectColor implements Serializable { return true; return false; } + + @Override + public ObjectColor copy() { + return new ObjectColor(this); + } } diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/mage/abilities/AbilityImpl.java index 1abc3cc256..f7dff588a2 100644 --- a/Mage/src/mage/abilities/AbilityImpl.java +++ b/Mage/src/mage/abilities/AbilityImpl.java @@ -137,17 +137,18 @@ public abstract class AbilityImpl> implements Ability { logger.fine("activate failed - choice"); return false; } - if (targets.size() > 0 && targets.choose(effects.get(0).getOutcome(), this.controllerId, this, game) == false) { + if (targets.size() > 0 && targets.chooseTargets(effects.get(0).getOutcome(), this.controllerId, this, game) == false) { logger.fine("activate failed - target"); return false; } if (!useAlternativeCost(game)) { - if (!manaCosts.pay(game, this, noMana)) { + if (!manaCosts.pay(game, sourceId, controllerId, noMana)) { logger.fine("activate failed - mana"); return false; } } - if (!costs.pay(game, this, noMana)) { + game.getObject(sourceId).adjustCosts(this, game); + if (!costs.pay(game, sourceId, controllerId, noMana)) { logger.fine("activate failed - non mana costs"); return false; } @@ -161,7 +162,7 @@ public abstract class AbilityImpl> implements Ability { for (AlternativeCost cost: alternativeCosts) { if (cost.isAvailable(game, this)) { if (game.getPlayer(this.controllerId).chooseUse(Outcome.Neutral, "Use alternative cost " + cost.getName(), game)) - return cost.pay(game, this, false); + return cost.pay(game, sourceId, controllerId, false); } } return false; diff --git a/Mage/src/mage/abilities/ActivatedAbilityImpl.java b/Mage/src/mage/abilities/ActivatedAbilityImpl.java index f610be1a41..7cdbd27cda 100644 --- a/Mage/src/mage/abilities/ActivatedAbilityImpl.java +++ b/Mage/src/mage/abilities/ActivatedAbilityImpl.java @@ -141,7 +141,7 @@ public abstract class ActivatedAbilityImpl> ex if (!controlsAbility(playerId, game)) return false; //20091005 - 602.5d/602.5e - if ((timing == TimingRule.INSTANT || game.canPlaySorcery(playerId)) && costs.canPay(this, game) && targets.canChoose(sourceId, playerId, game)) { + if ((timing == TimingRule.INSTANT || game.canPlaySorcery(playerId)) && costs.canPay(sourceId, controllerId, game) && targets.canChoose(sourceId, playerId, game)) { return true; } return false; diff --git a/Mage/src/mage/abilities/EvasionAbility.java b/Mage/src/mage/abilities/EvasionAbility.java index c0cc7f6f20..a8a2c0b19b 100644 --- a/Mage/src/mage/abilities/EvasionAbility.java +++ b/Mage/src/mage/abilities/EvasionAbility.java @@ -38,6 +38,6 @@ import mage.game.permanent.Permanent; */ public interface EvasionAbility extends Ability { - public boolean canBlock(Permanent permanent, Game game); + public boolean canBlock(Permanent blocker, Game game); } diff --git a/Mage/src/mage/abilities/LoyaltyAbility.java b/Mage/src/mage/abilities/LoyaltyAbility.java index b3a35c31f3..f7fe07ea03 100644 --- a/Mage/src/mage/abilities/LoyaltyAbility.java +++ b/Mage/src/mage/abilities/LoyaltyAbility.java @@ -31,6 +31,7 @@ package mage.abilities; import mage.Constants.TimingRule; import mage.Constants.Zone; import mage.abilities.costs.common.PayLoyaltyCost; +import mage.abilities.costs.common.PayVariableLoyaltyCost; import mage.abilities.effects.Effect; import mage.abilities.effects.Effects; @@ -50,6 +51,15 @@ public class LoyaltyAbility extends ActivatedAbilityImpl { this.timing = TimingRule.SORCERY; } + public LoyaltyAbility(Effect effect) { + super(Zone.BATTLEFIELD, effect, new PayVariableLoyaltyCost()); + this.timing = TimingRule.SORCERY; + } + + public LoyaltyAbility(Effects effects) { + super(Zone.BATTLEFIELD, effects, new PayVariableLoyaltyCost()); + this.timing = TimingRule.SORCERY; + } public LoyaltyAbility(LoyaltyAbility ability) { super(ability); } diff --git a/Mage/src/mage/abilities/SpellAbility.java b/Mage/src/mage/abilities/SpellAbility.java index ef1b48c81e..e6827e8a3b 100644 --- a/Mage/src/mage/abilities/SpellAbility.java +++ b/Mage/src/mage/abilities/SpellAbility.java @@ -54,11 +54,12 @@ public class SpellAbility extends ActivatedAbilityImpl { @Override public boolean canActivate(UUID playerId, Game game) { - if ((game.getObject(sourceId).getCardType().contains(CardType.INSTANT) || - game.getObject(sourceId).getAbilities().containsKey(FlashAbility.getInstance().getId()) || - game.canPlaySorcery(playerId)) && - costs.canPay(this, game) && targets.canChoose(sourceId, playerId, game)) { - return true; + if ((game.getObject(sourceId).getCardType().contains(CardType.INSTANT) || + game.getObject(sourceId).getAbilities().containsKey(FlashAbility.getInstance().getId()) || + game.canPlaySorcery(playerId))) { + if (costs.canPay(sourceId, controllerId, game) && targets.canChoose(sourceId, playerId, game)) { + return true; + } } return false; } diff --git a/Mage/src/mage/abilities/TriggeredAbilityImpl.java b/Mage/src/mage/abilities/TriggeredAbilityImpl.java index b4b83c4a2c..0b7504d605 100644 --- a/Mage/src/mage/abilities/TriggeredAbilityImpl.java +++ b/Mage/src/mage/abilities/TriggeredAbilityImpl.java @@ -88,4 +88,5 @@ public abstract class TriggeredAbilityImpl> ex return super.resolve(game); return false; } + } diff --git a/Mage/src/mage/abilities/common/AttacksEachTurnStaticAbility.java b/Mage/src/mage/abilities/common/AttacksEachTurnStaticAbility.java index 9ccdbf25a6..2a8febd54b 100644 --- a/Mage/src/mage/abilities/common/AttacksEachTurnStaticAbility.java +++ b/Mage/src/mage/abilities/common/AttacksEachTurnStaticAbility.java @@ -33,7 +33,6 @@ import mage.Constants.Outcome; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.StaticAbility; -import mage.abilities.effects.Effect; import mage.abilities.effects.RequirementAttackEffect; import mage.game.Game; import mage.game.permanent.Permanent; @@ -77,6 +76,7 @@ class AttacksEachTurnEffect extends RequirementAttackEffect { + + public BlocksTriggeredAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public BlocksTriggeredAbility(final BlocksTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.BLOCKER_DECLARED && event.getSourceId().equals(this.getSourceId()) ) { + trigger(game, this.controllerId); + return true; + } + return false; + } + + @Override + public String getRule() { + return "When {this} blocks, " + super.getRule(); + } + + @Override + public BlocksTriggeredAbility copy() { + return new BlocksTriggeredAbility(this); + } + + +} diff --git a/Mage/src/mage/abilities/common/EntersBattlefieldStaticAbility.java b/Mage/src/mage/abilities/common/EntersBattlefieldStaticAbility.java index 338bab35e8..04e2ab65ec 100644 --- a/Mage/src/mage/abilities/common/EntersBattlefieldStaticAbility.java +++ b/Mage/src/mage/abilities/common/EntersBattlefieldStaticAbility.java @@ -30,7 +30,7 @@ package mage.abilities.common; import mage.Constants.Zone; import mage.abilities.StaticAbility; -import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.Effect; /** * @@ -38,12 +38,16 @@ import mage.abilities.effects.EntersBattlefieldEffect; */ public class EntersBattlefieldStaticAbility extends StaticAbility { - public EntersBattlefieldStaticAbility(EntersBattlefieldEffect effect) { + protected String rule; + + public EntersBattlefieldStaticAbility(Effect effect, String rule) { super(Zone.BATTLEFIELD, effect); + this.rule = rule; } public EntersBattlefieldStaticAbility(EntersBattlefieldStaticAbility ability) { super(ability); + this.rule = ability.rule; } @Override @@ -51,4 +55,9 @@ public class EntersBattlefieldStaticAbility extends StaticAbility { super(Zone.BATTLEFIELD, effect, optional); } - public LandfallAbility(LandfallAbility ability) { + public LandfallAbility(final LandfallAbility ability) { super(ability); } diff --git a/Mage/src/mage/abilities/common/OnEventTriggeredAbility.java b/Mage/src/mage/abilities/common/OnEventTriggeredAbility.java index 816c64e398..2428855d1f 100644 --- a/Mage/src/mage/abilities/common/OnEventTriggeredAbility.java +++ b/Mage/src/mage/abilities/common/OnEventTriggeredAbility.java @@ -51,6 +51,12 @@ public class OnEventTriggeredAbility extends TriggeredAbilityImpl extends List, Cost { public List getUnpaid(); + public List getVariableCosts(); @Override public Costs copy(); } diff --git a/Mage/src/mage/abilities/costs/CostsImpl.java b/Mage/src/mage/abilities/costs/CostsImpl.java index c076e667b1..cde020b540 100644 --- a/Mage/src/mage/abilities/costs/CostsImpl.java +++ b/Mage/src/mage/abilities/costs/CostsImpl.java @@ -29,7 +29,10 @@ package mage.abilities.costs; import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.VariableManaCost; import mage.game.Game; import mage.target.Targets; @@ -62,20 +65,20 @@ public class CostsImpl extends ArrayList implements Costs } @Override - public boolean canPay(Ability source, Game game) { + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { for (T cost: this) { - if (!cost.canPay(source, game)) + if (!cost.canPay(sourceId, controllerId, game)) return false; } return true; } @Override - public boolean pay(Game game, Ability source, boolean noMana) { + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { if (this.size() > 0) { while (!isPaid()) { T cost = getFirstUnpaid(); - if (!cost.pay(game, source, noMana)) + if (!cost.pay(game, sourceId, controllerId, noMana)) return false; } } @@ -123,6 +126,19 @@ public class CostsImpl extends ArrayList implements Costs return null; } + @Override + public List getVariableCosts() { + List variableCosts = new ArrayList(); + for (T cost: this) { + if (cost instanceof VariableCost) + variableCosts.add((VariableCost) cost); + if (cost instanceof ManaCosts) { + variableCosts.addAll(((ManaCosts)cost).getVariableCosts()); + } + } + return variableCosts; + } + @Override public Targets getTargets() { Targets targets = new Targets(); diff --git a/Mage/src/mage/abilities/costs/VariableCost.java b/Mage/src/mage/abilities/costs/VariableCost.java new file mode 100644 index 0000000000..9ce15abf9d --- /dev/null +++ b/Mage/src/mage/abilities/costs/VariableCost.java @@ -0,0 +1,39 @@ +/* + * 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.abilities.costs; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public interface VariableCost { + + public int getAmount(); + +} diff --git a/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java b/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java index 6ca9888777..cc99148d23 100644 --- a/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/DiscardSourceCost.java @@ -28,6 +28,7 @@ package mage.abilities.costs.common; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.CostImpl; import mage.cards.Card; @@ -47,14 +48,14 @@ public class DiscardSourceCost extends CostImpl { } @Override - public boolean canPay(Ability source, Game game) { - return game.getPlayer(source.getControllerId()).getHand().contains(source.getSourceId()); + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return game.getPlayer(controllerId).getHand().contains(sourceId); } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - Player player = game.getPlayer(source.getControllerId()); - Card card = player.getHand().get(source.getSourceId(), game); + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player player = game.getPlayer(controllerId); + Card card = player.getHand().get(sourceId, game); return player.discard(card, game); } diff --git a/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java b/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java new file mode 100644 index 0000000000..e0cbd151af --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java @@ -0,0 +1,79 @@ +/* + * 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.abilities.costs.common; + +import java.util.UUID; +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.costs.CostImpl; +import mage.cards.Card; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DiscardTargetCost extends CostImpl { + + public DiscardTargetCost(TargetCardInHand target) { + this.addTarget(target); + this.text = "Discard " + target.getTargetName(); + } + + public DiscardTargetCost(DiscardTargetCost cost) { + super(cost); + } + + @Override + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + if (targets.choose(Outcome.Discard, controllerId, game)) { + Player player = game.getPlayer(controllerId); + for (UUID targetId: targets.get(0).getTargets()) { + Card card = player.getHand().get(targetId, game); + if (card == null) + return false; + paid |= player.discard(card, game); + } + } + return paid; + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return targets.canChoose(controllerId, controllerId, game); + } + + @Override + public DiscardTargetCost copy() { + return new DiscardTargetCost(this); + } + +} diff --git a/Mage/src/mage/abilities/costs/common/ExileSourceCost.java b/Mage/src/mage/abilities/costs/common/ExileSourceCost.java new file mode 100644 index 0000000000..26e19163b4 --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/ExileSourceCost.java @@ -0,0 +1,74 @@ +/* + * 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.abilities.costs.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.CostImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ExileSourceCost extends CostImpl { + + public ExileSourceCost() { + this.text = "Exile {this}"; + } + + public ExileSourceCost(ExileSourceCost cost) { + super(cost); + } + + @Override + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent permanent = game.getPermanent(sourceId); + if (permanent != null) { + paid = permanent.moveToExile(null, "", game); + } + return paid; + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Permanent permanent = game.getPermanent(sourceId); + if (permanent != null) { + return true; + } + return false; + } + + @Override + public ExileSourceCost copy() { + return new ExileSourceCost(this); + } + +} diff --git a/Mage/src/mage/abilities/costs/common/PayLifeCost.java b/Mage/src/mage/abilities/costs/common/PayLifeCost.java index b6e27be6fe..4029811618 100644 --- a/Mage/src/mage/abilities/costs/common/PayLifeCost.java +++ b/Mage/src/mage/abilities/costs/common/PayLifeCost.java @@ -52,13 +52,13 @@ public class PayLifeCost extends CostImpl { } @Override - public boolean canPay(Ability source, Game game) { - return game.getPlayer(source.getControllerId()).getLife() >= amount; + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return game.getPlayer(controllerId).getLife() >= amount; } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - this.paid = game.getPlayer(source.getControllerId()).loseLife(amount, game) == amount; + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + this.paid = game.getPlayer(controllerId).loseLife(amount, game) == amount; return paid; } diff --git a/Mage/src/mage/abilities/costs/common/PayLoyaltyCost.java b/Mage/src/mage/abilities/costs/common/PayLoyaltyCost.java index d4f3056176..ce8cef14c3 100644 --- a/Mage/src/mage/abilities/costs/common/PayLoyaltyCost.java +++ b/Mage/src/mage/abilities/costs/common/PayLoyaltyCost.java @@ -28,6 +28,7 @@ package mage.abilities.costs.common; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.CostImpl; import mage.game.Game; @@ -52,16 +53,16 @@ public class PayLoyaltyCost extends CostImpl { } @Override - public boolean canPay(Ability source, Game game) { - Permanent planeswalker = game.getPermanent(source.getSourceId()); + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Permanent planeswalker = game.getPermanent(sourceId); if (planeswalker.getLoyalty().getValue() + amount >= 0 && !planeswalker.isLoyaltyUsed()) return true; return false; } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - Permanent planeswalker = game.getPermanent(source.getSourceId()); + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent planeswalker = game.getPermanent(sourceId); if (planeswalker.getLoyalty().getValue() + amount > 0 && !planeswalker.isLoyaltyUsed()) { planeswalker.getLoyalty().boostValue(amount); planeswalker.setLoyaltyUsed(true); diff --git a/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java b/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java new file mode 100644 index 0000000000..c320ffa40a --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/PayVariableLoyaltyCost.java @@ -0,0 +1,89 @@ +/* + * 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.abilities.costs.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.CostImpl; +import mage.abilities.costs.VariableCost; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class PayVariableLoyaltyCost extends CostImpl implements VariableCost { + + protected int amountPaid = 0; + + public PayVariableLoyaltyCost() { + this.text = "X loyalty"; + } + + public PayVariableLoyaltyCost(final PayVariableLoyaltyCost cost) { + super(cost); + this.amountPaid = cost.amountPaid; + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Permanent planeswalker = game.getPermanent(sourceId); + return !planeswalker.isLoyaltyUsed(); + } + + @Override + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent planeswalker = game.getPermanent(sourceId); + Player player = game.getPlayer(planeswalker.getControllerId()); + this.amountPaid = player.getAmount(0, planeswalker.getLoyalty().getValue(), "", game); + planeswalker.getLoyalty().boostValue(-amountPaid); + planeswalker.setLoyaltyUsed(true); + this.paid = true; + return paid; + } + + @Override + public void clearPaid() { + paid = false; + amountPaid = 0; + } + + @Override + public int getAmount() { + return amountPaid; + } + + @Override + public PayVariableLoyaltyCost copy() { + return new PayVariableLoyaltyCost(this); + } + +} diff --git a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java index 0e5fdeb5c6..8b335c4cfc 100644 --- a/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/RemoveCountersSourceCost.java @@ -56,17 +56,17 @@ public class RemoveCountersSourceCost extends CostImpl } @Override - public boolean canPay(Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getSourceId()); + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Permanent permanent = game.getPermanent(sourceId); if (permanent.getCounters().getCount(name) >= amount) return true; return false; } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - Permanent permanent = game.getPermanent(source.getSourceId()); - if (permanent.getCounters().getCount(name) >= amount) { + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent permanent = game.getPermanent(sourceId); + if (permanent != null && permanent.getCounters().getCount(name) >= amount) { permanent.getCounters().removeCounter(name, amount); this.paid = true; } diff --git a/Mage/src/mage/abilities/costs/common/ReturnToHandTargetCost.java b/Mage/src/mage/abilities/costs/common/ReturnToHandTargetCost.java index cc41c9a5da..9eed9a4f1a 100644 --- a/Mage/src/mage/abilities/costs/common/ReturnToHandTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/ReturnToHandTargetCost.java @@ -53,19 +53,21 @@ public class ReturnToHandTargetCost extends CostImpl { } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - if (targets.choose(Outcome.ReturnToHand, source.getControllerId(), source, game)) { - Permanent permanent = game.getPermanent(targets.getFirstTarget()); - if (permanent != null) { - paid = permanent.moveToZone(Zone.HAND, game, false); + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + if (targets.choose(Outcome.ReturnToHand, controllerId, game)) { + for (UUID targetId: targets.get(0).getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent == null) + return false; + paid |= permanent.moveToZone(Zone.HAND, game, false); } } return paid; } @Override - public boolean canPay(Ability source, Game game) { - return targets.canChoose(source.getControllerId(), source.getControllerId(), game); + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return targets.canChoose(controllerId, controllerId, game); } @Override diff --git a/Mage/src/mage/abilities/costs/common/SacrificeSourceCost.java b/Mage/src/mage/abilities/costs/common/SacrificeSourceCost.java index de507ac9fe..4f74f622df 100644 --- a/Mage/src/mage/abilities/costs/common/SacrificeSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/SacrificeSourceCost.java @@ -49,17 +49,17 @@ public class SacrificeSourceCost extends CostImpl { } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - Permanent permanent = game.getPermanent(source.getSourceId()); + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent permanent = game.getPermanent(sourceId); if (permanent != null) { - paid = permanent.sacrifice(source.getSourceId(), game); + paid = permanent.sacrifice(sourceId, game); } return paid; } @Override - public boolean canPay(Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getSourceId()); + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Permanent permanent = game.getPermanent(sourceId); if (permanent != null) { return true; } diff --git a/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java b/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java index d4861ed547..b61da7a322 100644 --- a/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/SacrificeTargetCost.java @@ -28,6 +28,9 @@ package mage.abilities.costs.common; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import mage.Constants.Outcome; import mage.abilities.Ability; import mage.abilities.costs.CostImpl; @@ -41,6 +44,8 @@ import mage.target.common.TargetControlledPermanent; */ public class SacrificeTargetCost extends CostImpl { + List permanents = new ArrayList(); + public SacrificeTargetCost(TargetControlledPermanent target) { this.addTarget(target); this.text = "Sacrifice " + target.getTargetName(); @@ -48,27 +53,37 @@ public class SacrificeTargetCost extends CostImpl { public SacrificeTargetCost(SacrificeTargetCost cost) { super(cost); + for (Permanent permanent: cost.permanents) { + this.permanents.add(permanent.copy()); + } } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - if (targets.choose(Outcome.Sacrifice, source.getControllerId(), source, game)) { - Permanent permanent = game.getPermanent(targets.getFirstTarget()); - if (permanent != null) { - paid = permanent.sacrifice(source.getSourceId(), game); + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + if (targets.choose(Outcome.Sacrifice, controllerId, game)) { + for (UUID targetId: targets.get(0).getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent == null) + return false; + permanents.add(permanent.copy()); + paid |= permanent.sacrifice(sourceId, game); } } return paid; } @Override - public boolean canPay(Ability source, Game game) { - return targets.canChoose(source.getControllerId(), source.getControllerId(), game); + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return targets.canChoose(controllerId, controllerId, game); } @Override public SacrificeTargetCost copy() { return new SacrificeTargetCost(this); } + + public List getPermanents() { + return permanents; + } } diff --git a/Mage/src/mage/abilities/costs/common/TapSourceCost.java b/Mage/src/mage/abilities/costs/common/TapSourceCost.java index e31ce2c8c2..b868ccec49 100644 --- a/Mage/src/mage/abilities/costs/common/TapSourceCost.java +++ b/Mage/src/mage/abilities/costs/common/TapSourceCost.java @@ -49,8 +49,8 @@ public class TapSourceCost extends CostImpl { } @Override - public boolean pay(Game game, Ability source, boolean noMana) { - Permanent permanent = game.getPermanent(source.getSourceId()); + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent permanent = game.getPermanent(sourceId); if (permanent != null) { paid = permanent.tap(game); } @@ -58,8 +58,8 @@ public class TapSourceCost extends CostImpl { } @Override - public boolean canPay(Ability source, Game game) { - Permanent permanent = game.getPermanent(source.getSourceId()); + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + Permanent permanent = game.getPermanent(sourceId); if (permanent != null) { return !permanent.isTapped() && permanent.canTap(); } diff --git a/Mage/src/mage/abilities/costs/common/TapTargetCost.java b/Mage/src/mage/abilities/costs/common/TapTargetCost.java new file mode 100644 index 0000000000..a2e0d8d116 --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/TapTargetCost.java @@ -0,0 +1,78 @@ +/* + * 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.abilities.costs.common; + +import java.util.UUID; +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.costs.CostImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class TapTargetCost extends CostImpl { + + public TapTargetCost(TargetControlledPermanent target) { + this.addTarget(target); + this.text = "tap " + target.getTargetName() + " you control"; + } + + public TapTargetCost(final TapTargetCost cost) { + super(cost); + } + + @Override + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { + if (targets.choose(Outcome.Tap, controllerId, game)) { + for (UUID targetId: targets.get(0).getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent == null) + return false; + paid |= permanent.tap(game); + } + } + return paid; + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return targets.canChoose(controllerId, controllerId, game); + } + + @Override + public TapTargetCost copy() { + return new TapTargetCost(this); + } + + +} diff --git a/Mage/src/mage/abilities/costs/mana/GenericManaCost.java b/Mage/src/mage/abilities/costs/mana/GenericManaCost.java index 04074d2398..f4f95d3976 100644 --- a/Mage/src/mage/abilities/costs/mana/GenericManaCost.java +++ b/Mage/src/mage/abilities/costs/mana/GenericManaCost.java @@ -49,6 +49,10 @@ public class GenericManaCost extends ManaCostImpl { return mana; } + public void setMana(int mana) { + this.mana = mana; + } + @Override public int convertedManaCost() { return mana; diff --git a/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java b/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java index 60f801fd94..671092ac60 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java +++ b/Mage/src/mage/abilities/costs/mana/ManaCostImpl.java @@ -28,6 +28,7 @@ package mage.abilities.costs.mana; +import java.util.UUID; import mage.Constants.ColoredManaSymbol; import mage.Mana; import mage.abilities.Ability; @@ -177,17 +178,17 @@ public abstract class ManaCostImpl> extends CostImpl extends List, ManaCost { public ManaCosts getUnpaidVariableCosts(); - public List getVariableCosts(); + public List getVariableCosts(); public void load(String mana); public List getSymbols(); diff --git a/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java index 860e4702cb..fc2cb82fb7 100644 --- a/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/mage/abilities/costs/mana/ManaCostsImpl.java @@ -30,9 +30,11 @@ package mage.abilities.costs.mana; import java.util.ArrayList; import java.util.List; +import java.util.UUID; import mage.Constants.ColoredManaSymbol; import mage.Mana; import mage.abilities.Ability; +import mage.abilities.costs.VariableCost; import mage.abilities.mana.ManaOptions; import mage.game.Game; import mage.players.ManaPool; @@ -89,12 +91,12 @@ public class ManaCostsImpl extends ArrayList implements M } @Override - public boolean pay(Game game, Ability source, boolean noMana) { + public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) { if (this.size() == 0 || noMana) { setPaid(); return true; } - Player player = game.getPlayer(source.getControllerId()); + Player player = game.getPlayer(controllerId); assignPayment(player.getManaPool()); while (!isPaid()) { if (player.playMana(this.getUnpaid(), game)) @@ -135,11 +137,11 @@ public class ManaCostsImpl extends ArrayList implements M } @Override - public List getVariableCosts() { - List variableCosts = new ArrayList(); + public List getVariableCosts() { + List variableCosts = new ArrayList(); for (ManaCost cost: this) { - if (cost instanceof VariableManaCost) - variableCosts.add((VariableManaCost) cost); + if (cost instanceof VariableCost) + variableCosts.add((VariableCost) cost); } return variableCosts; } @@ -251,9 +253,9 @@ public class ManaCostsImpl extends ArrayList implements M } @Override - public boolean canPay(Ability source, Game game) { + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { for (T cost: this) { - if (!cost.canPay(source, game)) + if (!cost.canPay(sourceId, controllerId, game)) return false; } return true; diff --git a/Mage/src/mage/abilities/costs/mana/VariableManaCost.java b/Mage/src/mage/abilities/costs/mana/VariableManaCost.java index 56cc20093f..80e9fb6438 100644 --- a/Mage/src/mage/abilities/costs/mana/VariableManaCost.java +++ b/Mage/src/mage/abilities/costs/mana/VariableManaCost.java @@ -29,13 +29,14 @@ package mage.abilities.costs.mana; import mage.Mana; +import mage.abilities.costs.VariableCost; import mage.players.ManaPool; /** * * @author BetaSteward_at_googlemail.com */ -public class VariableManaCost extends ManaCostImpl { +public class VariableManaCost extends ManaCostImpl implements VariableCost { protected Mana manaPaid = new Mana(); protected int multiplier; @@ -95,7 +96,8 @@ public class VariableManaCost extends ManaCostImpl { return manaPaid; } - public int getValue() { + @Override + public int getAmount() { return manaPaid.count() / multiplier; } diff --git a/Mage/src/mage/abilities/effects/EntersBattlefieldEffect.java b/Mage/src/mage/abilities/effects/EntersBattlefieldEffect.java index 3e917bd9a5..0303cff9e8 100644 --- a/Mage/src/mage/abilities/effects/EntersBattlefieldEffect.java +++ b/Mage/src/mage/abilities/effects/EntersBattlefieldEffect.java @@ -1,96 +1,96 @@ -/* -* 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.abilities.effects; - -import mage.Constants.Duration; -import mage.Constants.Layer; -import mage.Constants.SubLayer; -import mage.Constants.Zone; -import mage.abilities.Ability; -import mage.game.Game; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.game.events.ZoneChangeEvent; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class EntersBattlefieldEffect extends ReplacementEffectImpl { - - protected Effects baseEffects = new Effects(); - - public EntersBattlefieldEffect(Effect baseEffect) { - super(Duration.WhileOnBattlefield, baseEffect.getOutcome()); - this.baseEffects.add(baseEffect); - } - - public EntersBattlefieldEffect(EntersBattlefieldEffect effect) { - super(effect); - this.baseEffects = effect.baseEffects.copy(); - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId())) { - ZoneChangeEvent zEvent = (ZoneChangeEvent)event; - if (zEvent.getToZone() == Zone.BATTLEFIELD) - return true; - } - return false; - } - - @Override - public boolean apply(Game game, Ability source) { - for (Effect effect: baseEffects) { - if (effect instanceof ContinuousEffect) { - game.addEffect((ContinuousEffect) effect, source); - } - else - effect.apply(game, source); - } - return true; - } - - @Override - public boolean replaceEvent(GameEvent event, Ability source, Game game) { - return apply(game, source); - } - - @Override - public String getText(Ability source) { - return "When {this} enters the battlefield, " + baseEffects.getText(source); - } - - @Override - public EntersBattlefieldEffect copy() { - return new EntersBattlefieldEffect(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.abilities.effects; +// +//import mage.Constants.Duration; +//import mage.Constants.Layer; +//import mage.Constants.SubLayer; +//import mage.Constants.Zone; +//import mage.abilities.Ability; +//import mage.game.Game; +//import mage.game.events.GameEvent; +//import mage.game.events.GameEvent.EventType; +//import mage.game.events.ZoneChangeEvent; +// +///** +// * +// * @author BetaSteward_at_googlemail.com +// */ +//public class EntersBattlefieldEffect extends ReplacementEffectImpl { +// +// protected Effects baseEffects = new Effects(); +// +// public EntersBattlefieldEffect(Effect baseEffect) { +// super(Duration.WhileOnBattlefield, baseEffect.getOutcome()); +// this.baseEffects.add(baseEffect); +// } +// +// public EntersBattlefieldEffect(EntersBattlefieldEffect effect) { +// super(effect); +// this.baseEffects = effect.baseEffects.copy(); +// } +// +// @Override +// public boolean applies(GameEvent event, Ability source, Game game) { +// if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId())) { +// ZoneChangeEvent zEvent = (ZoneChangeEvent)event; +// if (zEvent.getToZone() == Zone.BATTLEFIELD) +// return true; +// } +// return false; +// } +// +// @Override +// public boolean apply(Game game, Ability source) { +// for (Effect effect: baseEffects) { +// if (effect instanceof ContinuousEffect) { +// game.addEffect((ContinuousEffect) effect, source); +// } +// else +// effect.apply(game, source); +// } +// return true; +// } +// +// @Override +// public boolean replaceEvent(GameEvent event, Ability source, Game game) { +// return apply(game, source); +// } +// +// @Override +// public String getText(Ability source) { +// return "When {this} enters the battlefield, " + baseEffects.getText(source); +// } +// +// @Override +// public EntersBattlefieldEffect copy() { +// return new EntersBattlefieldEffect(this); +// } +// +//} diff --git a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersControlledEffect.java b/Mage/src/mage/abilities/effects/common/AddPlusOneCountersControlledEffect.java index a0bdb460a0..ff4d590161 100644 --- a/Mage/src/mage/abilities/effects/common/AddPlusOneCountersControlledEffect.java +++ b/Mage/src/mage/abilities/effects/common/AddPlusOneCountersControlledEffect.java @@ -52,7 +52,7 @@ public class AddPlusOneCountersControlledEffect extends OneShotEffect { + + public AttacksIfAbleTargetEffect() { + super(Duration.EndOfTurn); + } + + public AttacksIfAbleTargetEffect(final AttacksIfAbleTargetEffect effect) { + super(effect); + } + + @Override + public AttacksIfAbleTargetEffect copy() { + return new AttacksIfAbleTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent creature = game.getPermanent(source.getFirstTarget()); + if (creature != null) { + if (creature.canAttack(game)) { + TargetDefender target = new TargetDefender(game.getCombat().getDefenders(), creature.getControllerId()); + target.setRequired(true); + Player controller = game.getPlayer(creature.getControllerId()); + while (!target.isChosen()) + controller.chooseTarget(Outcome.Damage, target, source, game); + game.getCombat().declareAttacker(creature.getId(), target.getFirstTarget(), game); + return true; + } + } + return false; + } + + @Override + public String getText(Ability source) { + return "Target " + source.getTargets().get(0).getTargetName() + " attacks this turn if able"; + } +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/effects/common/BoostControlledEffect.java b/Mage/src/mage/abilities/effects/common/BoostControlledEffect.java index 1f0eac64f2..cdd49eaeda 100644 --- a/Mage/src/mage/abilities/effects/common/BoostControlledEffect.java +++ b/Mage/src/mage/abilities/effects/common/BoostControlledEffect.java @@ -44,19 +44,25 @@ import mage.game.permanent.Permanent; */ public class BoostControlledEffect extends ContinuousEffectImpl { - private int power; - private int toughness; + protected int power; + protected int toughness; + protected boolean excludeSource; protected FilterCreaturePermanent filter; public BoostControlledEffect(int power, int toughness, Duration duration) { - this(power, toughness, duration, new FilterCreaturePermanent()); + this(power, toughness, duration, FilterCreaturePermanent.getDefault(), false); } - public BoostControlledEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter) { + public BoostControlledEffect(int power, int toughness, Duration duration, boolean excludeSource) { + this(power, toughness, duration, FilterCreaturePermanent.getDefault(), excludeSource); + } + + public BoostControlledEffect(int power, int toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource) { super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); this.power = power; this.toughness = toughness; this.filter = filter; + this.excludeSource = excludeSource; } public BoostControlledEffect(final BoostControlledEffect effect) { @@ -64,6 +70,7 @@ public class BoostControlledEffect extends ContinuousEffectImpl { + + public BoostPowerXSourceEffect(Duration duration) { + super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + } + + public BoostPowerXSourceEffect(final BoostPowerXSourceEffect effect) { + super(effect); + } + + @Override + public BoostPowerXSourceEffect copy() { + return new BoostPowerXSourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int amount = source.getCosts().getVariableCosts().get(0).getAmount(); + Permanent target = (Permanent) game.getPermanent(source.getSourceId()); + if (target != null) { + target.addPower(amount); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "{this} gets " + String.format("+X/+0") + " " + duration.toString(); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/CantCounterControlledEffect.java b/Mage/src/mage/abilities/effects/common/CantCounterControlledEffect.java index 7ff84035c4..9262fc60e6 100644 --- a/Mage/src/mage/abilities/effects/common/CantCounterControlledEffect.java +++ b/Mage/src/mage/abilities/effects/common/CantCounterControlledEffect.java @@ -30,8 +30,10 @@ package mage.abilities.effects.common; import mage.Constants.Duration; import mage.Constants.Outcome; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.ReplacementEffectImpl; +import mage.filter.FilterObject; import mage.filter.FilterSpell; import mage.game.Game; import mage.game.events.GameEvent; @@ -45,16 +47,23 @@ import mage.game.stack.StackObject; */ public class CantCounterControlledEffect extends ReplacementEffectImpl { - private FilterSpell filter; + private FilterSpell filterTarget; + private FilterObject filterSource; - public CantCounterControlledEffect(FilterSpell filter) { - super(Duration.WhileOnStack, Outcome.Benefit); - this.filter = filter; + public CantCounterControlledEffect(FilterSpell filterTarget, FilterObject filterSource, Duration duration) { + super(duration, Outcome.Benefit); + this.filterTarget = filterTarget; + this.filterSource = filterSource; + } + + public CantCounterControlledEffect(FilterSpell filterTarget, Duration duration) { + this(filterTarget, null, duration); } public CantCounterControlledEffect(final CantCounterControlledEffect effect) { super(effect); - this.filter = effect.filter.copy(); + this.filterTarget = effect.filterTarget.copy(); + this.filterSource = effect.filterSource.copy(); } @Override @@ -75,12 +84,20 @@ public class CantCounterControlledEffect extends ReplacementEffectImpl { + + private FilterPermanent filterTarget; + private FilterObject filterSource; + + public CantTargetControlledEffect(FilterPermanent filterTarget, FilterObject filterSource, Duration duration) { + super(duration, Outcome.Benefit); + this.filterTarget = filterTarget; + this.filterSource = filterSource; + } + + public CantTargetControlledEffect(FilterPermanent filterTarget, Duration duration) { + this(filterTarget, null, duration); + } + + public CantTargetControlledEffect(final CantTargetControlledEffect effect) { + super(effect); + this.filterTarget = effect.filterTarget.copy(); + this.filterSource = effect.filterSource.copy(); + } + + @Override + public CantTargetControlledEffect copy() { + return new CantTargetControlledEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.TARGET) { + filterTarget.getControllerId().clear(); + filterTarget.getControllerId().add(source.getControllerId()); + Permanent permanent = game.getPermanent(event.getTargetId()); + if (permanent != null && filterTarget.match(permanent)) { + if (filterSource == null) + return true; + else { + MageObject sourceObject = game.getObject(source.getSourceId()); + if (sourceObject != null && filterSource.match(sourceObject)) { + return true; + } + } + } + } + return false; + } + + @Override + public String getText(Ability source) { + StringBuilder sb = new StringBuilder(); + sb.append(filterTarget.getMessage()).append(" can't be the targets of "); + if (filterSource != null) { + sb.append(filterSource.getMessage()); + } + else { + sb.append("spells"); + } + sb.append(" ").append(duration.toString()); + return sb.toString(); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/CantTargetSourceEffect.java b/Mage/src/mage/abilities/effects/common/CantTargetSourceEffect.java new file mode 100644 index 0000000000..4f2a497f4e --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/CantTargetSourceEffect.java @@ -0,0 +1,94 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.filter.FilterObject; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CantTargetSourceEffect extends ReplacementEffectImpl { + + private FilterObject filterSource; + + public CantTargetSourceEffect(FilterObject filterSource, Duration duration) { + super(duration, Outcome.Benefit); + this.filterSource = filterSource; + } + + public CantTargetSourceEffect(final CantTargetSourceEffect effect) { + super(effect); + this.filterSource = effect.filterSource.copy(); + } + + @Override + public CantTargetSourceEffect copy() { + return new CantTargetSourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == EventType.TARGET && event.getTargetId().equals(source.getSourceId())) { + MageObject sourceObject = game.getObject(source.getSourceId()); + if (sourceObject != null && filterSource.match(sourceObject)) { + return true; + } + } + return false; + } + + @Override + public String getText(Ability source) { + StringBuilder sb = new StringBuilder(); + sb.append("{this} can't be the targets of "); + sb.append(filterSource.getMessage()); + sb.append(" ").append(duration.toString()); + return sb.toString(); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/CopyEffect.java b/Mage/src/mage/abilities/effects/common/CopyEffect.java new file mode 100644 index 0000000000..e9aaeae8b5 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/CopyEffect.java @@ -0,0 +1,101 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.SubLayer; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.Card; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CopyEffect extends ContinuousEffectImpl { + + public CopyEffect() { + super(Duration.WhileOnBattlefield, Layer.CopyEffects_1, SubLayer.NA, Outcome.BecomeCreature); + } + + public CopyEffect(final CopyEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(source.getFirstTarget()); + Permanent permanent = game.getPermanent(source.getSourceId()); + permanent.setName(card.getName()); + permanent.getColor().setColor(card.getColor()); + permanent.getManaCost().clear(); + permanent.getManaCost().add(card.getManaCost()); + permanent.getCardType().clear(); + for (CardType type: card.getCardType()) { + permanent.getCardType().add(type); + } + permanent.getSubtype().clear(); + for (String type: card.getSubtype()) { + permanent.getSubtype().add(type); + } + permanent.getSupertype().clear(); + for (String type: card.getSupertype()) { + permanent.getSupertype().add(type); + } + permanent.setExpansionSetCode(card.getExpansionSetCode()); + permanent.getAbilities().clear(); + for (Ability ability: card.getAbilities()) { + permanent.addAbility(ability); + } + permanent.getPower().setValue(card.getPower().getValue()); + permanent.getToughness().setValue(card.getToughness().getValue()); + permanent.getLoyalty().setValue(card.getLoyalty().getValue()); + permanent.setArt(card.getArt()); + + return true; + + } + + @Override + public CopyEffect copy() { + return new CopyEffect(this); + } + + @Override + public String getText(Ability source) { + return "You may have {this} enter the battlefield as a copy of any " + source.getTargets().get(0).getTargetName() + " on the battlefield"; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/CounterUnlessPaysEffect.java b/Mage/src/mage/abilities/effects/common/CounterUnlessPaysEffect.java new file mode 100644 index 0000000000..59ba2799b4 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/CounterUnlessPaysEffect.java @@ -0,0 +1,82 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.effects.OneShotEffect; +import mage.game.Game; +import mage.game.stack.StackObject; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class CounterUnlessPaysEffect extends OneShotEffect { + + protected Cost cost; + + public CounterUnlessPaysEffect(Cost cost) { + super(Outcome.Detriment); + this.cost = cost; + } + + public CounterUnlessPaysEffect(final CounterUnlessPaysEffect effect) { + super(effect); + this.cost = effect.cost; + } + + @Override + public CounterUnlessPaysEffect copy() { + return new CounterUnlessPaysEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + StackObject spell = game.getStack().getStackObject(source.getFirstTarget()); + if (spell != null) { + Player player = game.getPlayer(spell.getControllerId()); + if (player != null) { + cost.clearPaid(); + if (!cost.pay(game, spell.getControllerId(), spell.getControllerId(), false)) { + return game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); + } + } + } + return false; + } + + @Override + public String getText(Ability source) { + return "Counter target " + source.getTargets().get(0).getTargetName() + " unless its controller pays "; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java b/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java new file mode 100644 index 0000000000..028bdd771d --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java @@ -0,0 +1,77 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DamageAllControlledTargetEffect extends OneShotEffect { + + private FilterCreaturePermanent filter; + private int amount; + + public DamageAllControlledTargetEffect(int amount, FilterCreaturePermanent filter) { + super(Outcome.Damage); + this.amount = amount; + this.filter = filter; + } + + public DamageAllControlledTargetEffect(final DamageAllControlledTargetEffect effect) { + super(effect); + this.amount = effect.amount; + this.filter = effect.filter.copy(); + } + + @Override + public DamageAllControlledTargetEffect copy() { + return new DamageAllControlledTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget())) { + permanent.damage(amount, source.getSourceId(), game, true); + } + return true; + } + + @Override + public String getText(Ability source) { + return "{source} deals " + Integer.toString(amount) + " damage to each " + filter.getMessage() + " controlled by target player"; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/DamageAllEffect.java b/Mage/src/mage/abilities/effects/common/DamageAllEffect.java new file mode 100644 index 0000000000..b1e9d4bf58 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/DamageAllEffect.java @@ -0,0 +1,77 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DamageAllEffect extends OneShotEffect { + + private FilterCreaturePermanent filter; + private int amount; + + public DamageAllEffect(int amount, FilterCreaturePermanent filter) { + super(Outcome.Damage); + this.amount = amount; + this.filter = filter; + } + + public DamageAllEffect(final DamageAllEffect effect) { + super(effect); + this.amount = effect.amount; + this.filter = effect.filter.copy(); + } + + @Override + public DamageAllEffect copy() { + return new DamageAllEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter)) { + permanent.damage(amount, source.getSourceId(), game, true); + } + return true; + } + + @Override + public String getText(Ability source) { + return "{source} deals " + Integer.toString(amount) + " damage to each " + filter.getMessage(); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/DamageControllerEffect.java b/Mage/src/mage/abilities/effects/common/DamageControllerEffect.java new file mode 100644 index 0000000000..10901bca92 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/DamageControllerEffect.java @@ -0,0 +1,91 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DamageControllerEffect extends OneShotEffect { + + protected int amount; + protected boolean preventable; + + public DamageControllerEffect(int amount) { + this(amount, true); + } + + public DamageControllerEffect(int amount, boolean preventable) { + super(Outcome.Damage); + this.amount = amount; + this.preventable = preventable; + } + + public int getAmount() { + return amount; + } + + public DamageControllerEffect(final DamageControllerEffect effect) { + super(effect); + this.amount = effect.amount; + this.preventable = effect.preventable; + } + + @Override + public DamageControllerEffect copy() { + return new DamageControllerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.damage(amount, source.getSourceId(), game, false, preventable); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + StringBuilder sb = new StringBuilder(); + sb.append("{source} deals ").append(Integer.toString(amount)).append(" damage to you"); + sb.append(source.getTargets().get(0).getTargetName()); + if (!preventable) + sb.append(". The damage can't be prevented"); + return sb.toString(); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java b/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java index 082da434ca..2d44ba6261 100644 --- a/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java @@ -70,12 +70,12 @@ public class DamageMultiEffect extends OneShotEffect { for (UUID target: multiTarget.getTargets()) { Permanent permanent = game.getPermanent(target); if (permanent != null) { - permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game); + permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, true); } else { Player player = game.getPlayer(target); if (player != null) { - player.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game); + player.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, false, true); } } } diff --git a/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java b/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java index 33d2b4c74a..6b062903d9 100644 --- a/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java @@ -42,10 +42,16 @@ import mage.players.Player; public class DamageTargetEffect extends OneShotEffect { protected int amount; + protected boolean preventable; public DamageTargetEffect(int amount) { + this(amount, true); + } + + public DamageTargetEffect(int amount, boolean preventable) { super(Outcome.Damage); this.amount = amount; + this.preventable = preventable; } public int getAmount() { @@ -55,6 +61,7 @@ public class DamageTargetEffect extends OneShotEffect { public DamageTargetEffect(final DamageTargetEffect effect) { super(effect); this.amount = effect.amount; + this.preventable = effect.preventable; } @Override @@ -66,12 +73,12 @@ public class DamageTargetEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game); + permanent.damage(amount, source.getSourceId(), game, preventable); return true; } Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { - player.damage(amount, source.getSourceId(), game); + player.damage(amount, source.getSourceId(), game, false, preventable); return true; } return false; @@ -79,7 +86,12 @@ public class DamageTargetEffect extends OneShotEffect { @Override public String getText(Ability source) { - return "{source} deals " + Integer.toString(amount) + " damage to target " + source.getTargets().get(0).getTargetName(); + StringBuilder sb = new StringBuilder(); + sb.append("{source} deals ").append(Integer.toString(amount)).append(" damage to target "); + sb.append(source.getTargets().get(0).getTargetName()); + if (!preventable) + sb.append(". The damage can't be prevented"); + return sb.toString(); } } diff --git a/Mage/src/mage/abilities/effects/common/DamageXTargetEffect.java b/Mage/src/mage/abilities/effects/common/DamageXTargetEffect.java new file mode 100644 index 0000000000..d228416b60 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/DamageXTargetEffect.java @@ -0,0 +1,78 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DamageXTargetEffect extends OneShotEffect { + + public DamageXTargetEffect() { + super(Outcome.Damage); + } + + public DamageXTargetEffect(final DamageXTargetEffect effect) { + super(effect); + } + + @Override + public DamageXTargetEffect copy() { + return new DamageXTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int amount = source.getCosts().getVariableCosts().get(0).getAmount(); + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.damage(amount, source.getSourceId(), game, true); + return true; + } + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + player.damage(amount, source.getSourceId(), game, false, true); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "{source} deals X damage to target " + source.getTargets().get(0).getTargetName(); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/DestroySourceEffect.java b/Mage/src/mage/abilities/effects/common/DestroySourceEffect.java new file mode 100644 index 0000000000..e373029e6d --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/DestroySourceEffect.java @@ -0,0 +1,79 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class DestroySourceEffect extends OneShotEffect { + + protected boolean noRegen; + + public DestroySourceEffect() { + this(false); + } + + public DestroySourceEffect(boolean noRegen) { + super(Outcome.DestroyPermanent); + this.noRegen = noRegen; + } + + public DestroySourceEffect(final DestroySourceEffect effect) { + super(effect); + this.noRegen = effect.noRegen; + } + + @Override + public DestroySourceEffect copy() { + return new DestroySourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + permanent.destroy(source.getSourceId(), game, noRegen); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "Destroy {this}"; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/EntersBattlefieldTappedEffect.java b/Mage/src/mage/abilities/effects/common/EntersBattlefieldTappedEffect.java index a360f5a4e4..9725464aa1 100644 --- a/Mage/src/mage/abilities/effects/common/EntersBattlefieldTappedEffect.java +++ b/Mage/src/mage/abilities/effects/common/EntersBattlefieldTappedEffect.java @@ -1,57 +1,57 @@ -/* -* 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.abilities.effects.common; - -import mage.abilities.Ability; -import mage.abilities.effects.EntersBattlefieldEffect; - -/** - * - * @author BetaSteward_at_googlemail.com - */ -public class EntersBattlefieldTappedEffect extends EntersBattlefieldEffect { - - public EntersBattlefieldTappedEffect() { - super(new TapSourceEffect()); - } - - public EntersBattlefieldTappedEffect(final EntersBattlefieldTappedEffect effect) { - super(effect); - } - - @Override - public EntersBattlefieldTappedEffect copy() { - return new EntersBattlefieldTappedEffect(this); - } - - @Override - public String getText(Ability source) { - return "{this} enters the battlefield tapped"; - } -} +///* +//* 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.abilities.effects.common; +// +//import mage.abilities.Ability; +//import mage.abilities.effects.EntersBattlefieldEffect; +// +///** +// * +// * @author BetaSteward_at_googlemail.com +// */ +//public class EntersBattlefieldTappedEffect extends EntersBattlefieldEffect { +// +// public EntersBattlefieldTappedEffect() { +// super(new TapSourceEffect()); +// } +// +// public EntersBattlefieldTappedEffect(final EntersBattlefieldTappedEffect effect) { +// super(effect); +// } +// +// @Override +// public EntersBattlefieldTappedEffect copy() { +// return new EntersBattlefieldTappedEffect(this); +// } +// +// @Override +// public String getText(Ability source) { +// return "{this} enters the battlefield tapped"; +// } +//} diff --git a/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java b/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java index 8f06a569f6..06cd20a3a1 100644 --- a/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java @@ -30,7 +30,6 @@ package mage.abilities.effects.common; import java.util.UUID; import mage.Constants.Outcome; -import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.game.Game; diff --git a/Mage/src/mage/abilities/effects/common/GainAbilityAttachedEffect.java b/Mage/src/mage/abilities/effects/common/GainAbilityAttachedEffect.java index 8c37b149b6..2b3bdd467d 100644 --- a/Mage/src/mage/abilities/effects/common/GainAbilityAttachedEffect.java +++ b/Mage/src/mage/abilities/effects/common/GainAbilityAttachedEffect.java @@ -63,7 +63,7 @@ public class GainAbilityAttachedEffect extends ContinuousEffectImpl { + + public GainControlTargetEffect(Duration duration) { + super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + } + + public GainControlTargetEffect(final GainControlTargetEffect effect) { + super(effect); + } + + @Override + public GainControlTargetEffect copy() { + return new GainControlTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + return permanent.changeControllerId(source.getControllerId(), game); + } + return false; + } + + @Override + public String getText(Ability source) { + return "Gain control of target " + source.getTargets().get(0).getTargetName() + " " + duration.toString(); + } +} diff --git a/Mage/src/mage/abilities/effects/common/GainLifeEffect.java b/Mage/src/mage/abilities/effects/common/GainLifeEffect.java index f5058f4c6b..2aec9839a8 100644 --- a/Mage/src/mage/abilities/effects/common/GainLifeEffect.java +++ b/Mage/src/mage/abilities/effects/common/GainLifeEffect.java @@ -63,7 +63,7 @@ public class GainLifeEffect extends OneShotEffect { if (player != null) { player.gainLife(life, game); } - return false; + return true; } @Override diff --git a/Mage/src/mage/abilities/effects/common/GainLifeTargetEffect.java b/Mage/src/mage/abilities/effects/common/GainLifeTargetEffect.java new file mode 100644 index 0000000000..e965e81703 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/GainLifeTargetEffect.java @@ -0,0 +1,77 @@ +/* + * 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.abilities.effects.common; + +import java.util.UUID; +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GainLifeTargetEffect extends OneShotEffect { + + private int life; + + public GainLifeTargetEffect(int life) { + super(Outcome.GainLife); + this.life = life; + } + + public GainLifeTargetEffect(final GainLifeTargetEffect effect) { + super(effect); + this.life = effect.life; + } + + @Override + public GainLifeTargetEffect copy() { + return new GainLifeTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (UUID playerId: source.getTargets().get(0).getTargets()) { + Player player = game.getPlayer(playerId); + if (player != null) { + player.gainLife(life, game); + } + } + return true; + } + + @Override + public String getText(Ability source) { + return "target players each gain " + Integer.toString(life) + " life"; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/GainProtectionFromColorTargetEffect.java b/Mage/src/mage/abilities/effects/common/GainProtectionFromColorTargetEffect.java new file mode 100644 index 0000000000..23712e7145 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/GainProtectionFromColorTargetEffect.java @@ -0,0 +1,81 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Duration; +import mage.abilities.Ability; +import mage.abilities.keyword.ProtectionAbility; +import mage.choices.ChoiceColor; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class GainProtectionFromColorTargetEffect extends GainAbilityTargetEffect { + + FilterCard protectionFilter; + + public GainProtectionFromColorTargetEffect(Duration duration) { + super(new ProtectionAbility(new FilterCard()), duration); + protectionFilter = (FilterCard)((ProtectionAbility)ability).getFilter(); + protectionFilter.setUseColor(true); + } + + public GainProtectionFromColorTargetEffect(final GainProtectionFromColorTargetEffect effect) { + super(effect); + this.protectionFilter = effect.protectionFilter.copy(); + } + + @Override + public GainProtectionFromColorTargetEffect copy() { + return new GainProtectionFromColorTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + ChoiceColor choice = (ChoiceColor) source.getChoices().get(0); + protectionFilter.setColor(choice.getColor()); + protectionFilter.setMessage(choice.getChoice()); + Permanent creature = game.getPermanent(source.getFirstTarget()); + if (creature != null) { + creature.addAbility(ability); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + return "target creature you control gains protection from the color of your choice " + duration.toString(); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java b/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java index 2f495b55ac..ee996153fb 100644 --- a/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java @@ -76,7 +76,12 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect { + + boolean onTop; + + public PutOnLibraryTargetEffect(boolean onTop) { + super(Outcome.ReturnToHand); + this.onTop = onTop; + } + + public PutOnLibraryTargetEffect(final PutOnLibraryTargetEffect effect) { + super(effect); + this.onTop = effect.onTop; + } + + @Override + public PutOnLibraryTargetEffect copy() { + return new PutOnLibraryTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + switch (source.getTargets().get(0).getZone()) { + case BATTLEFIELD: + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + return permanent.moveToZone(Zone.LIBRARY, game, onTop); + } + case GRAVEYARD: + Card card = game.getCard(source.getFirstTarget()); + for (Player player: game.getPlayers().values()) { + if (player.getGraveyard().contains(card.getId())) { + player.getGraveyard().remove(card); + if (onTop) + player.getLibrary().putOnTop(card, game); + else + player.getLibrary().putOnBottom(card, game); + return true; + } + } + } + return false; + } + + @Override + public String getText(Ability source) { + StringBuilder sb = new StringBuilder(); + sb.append("Put target ").append(source.getTargets().get(0).getTargetName()).append(" on "); + sb.append(onTop?"top":"the bottom").append(" of it's owner's library"); + return sb.toString(); + + } +} diff --git a/Mage/src/mage/abilities/effects/common/RegenerateSourceEffect.java b/Mage/src/mage/abilities/effects/common/RegenerateSourceEffect.java index ddc38f068a..2a0ed1bf27 100644 --- a/Mage/src/mage/abilities/effects/common/RegenerateSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/RegenerateSourceEffect.java @@ -31,7 +31,6 @@ package mage.abilities.effects.common; import mage.Constants.Duration; import mage.Constants.Outcome; import mage.abilities.Ability; -import mage.abilities.effects.ReplacementEffect; import mage.abilities.effects.ReplacementEffectImpl; import mage.game.Game; import mage.game.events.GameEvent; diff --git a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java index bfcf1320bd..67fc67d860 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnToHandTargetEffect.java @@ -32,8 +32,10 @@ import mage.Constants.Outcome; import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.players.Player; /** * @@ -56,9 +58,21 @@ public class ReturnToHandTargetEffect extends OneShotEffect { + + protected int amount; + protected FilterPermanent filter; + + public SacrificeAllEffect(FilterPermanent filter) { + this(1, filter); + } + + public SacrificeAllEffect(int amount, FilterPermanent filter) { + super(Outcome.Sacrifice); + this.amount = amount; + this.filter = filter; + } + + public SacrificeAllEffect(final SacrificeAllEffect effect) { + super(effect); + this.amount = effect.amount; + this.filter = effect.filter.copy(); + } + + @Override + public SacrificeAllEffect copy() { + return new SacrificeAllEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + List perms = new ArrayList(); + for (Player player: game.getPlayers().values()) { + int numTargets = Math.min(amount, game.getBattlefield().countAll(filter, player.getId())); + TargetPermanent target = new TargetPermanent(numTargets, filter, TargetController.YOU); + while (!target.isChosen()) { + player.choose(Outcome.Sacrifice, target, game); + } + perms.addAll(target.getTargets()); + } + for (UUID permID: perms) { + Permanent permanent = game.getPermanent(permID); + permanent.sacrifice(source.getSourceId(), game); + } + return true; + } + + @Override + public String getText(Ability source) { + StringBuilder sb = new StringBuilder(); + sb.append("Each players sacrifices "); + if (amount > 1) + sb.append(amount).append(" "); + else + sb.append("a "); + sb.append(filter.getMessage()); + return sb.toString(); + } + + +} diff --git a/Mage/src/mage/abilities/effects/common/ScryEffect.java b/Mage/src/mage/abilities/effects/common/ScryEffect.java new file mode 100644 index 0000000000..4d88282b04 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/ScryEffect.java @@ -0,0 +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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ScryEffect extends OneShotEffect { + + protected static FilterCard filter1 = new FilterCard("card to put on the bottom of your library"); + protected static FilterCard filter2 = new FilterCard("card to put on the top of your library"); + + protected int scryNumber; + + public ScryEffect(int scryNumber) { + super(Outcome.Benefit); + this.scryNumber = scryNumber; + } + + public ScryEffect(final ScryEffect effect) { + super(effect); + this.scryNumber = effect.scryNumber; + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Cards cards = new CardsImpl(Zone.PICK); + for (int i = 0; i < scryNumber; i++) { + cards.add(player.getLibrary().removeFromTop(game)); + } + TargetCard target1 = new TargetCard(Zone.PICK, filter1); + while (cards.size() > 0 && player.chooseTarget(cards, target1, source, game)) { + Card card = cards.get(target1.getFirstTarget(), game); + cards.remove(card); + player.getLibrary().putOnBottom(card, game); + target1.clearChosen(); + } + if (cards.size() > 1) { + TargetCard target2 = new TargetCard(Zone.PICK, filter2); + target2.setRequired(true); + while (cards.size() > 1) { + player.chooseTarget(cards, target2, source, game); + Card card = cards.get(target2.getFirstTarget(), game); + cards.remove(card); + player.getLibrary().putOnTop(card, game); + target2.clearChosen(); + } + } + if (cards.size() == 1) + player.getLibrary().putOnTop(cards.get(cards.iterator().next(), game), game); + return true; + } + + @Override + public ScryEffect copy() { + return new ScryEffect(this); + } + + @Override + public String getText(Ability source) { + return "Scry " + scryNumber; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/SetPowerToughnessTargetEffect.java b/Mage/src/mage/abilities/effects/common/SetPowerToughnessTargetEffect.java new file mode 100644 index 0000000000..eac2119938 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/SetPowerToughnessTargetEffect.java @@ -0,0 +1,86 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.SubLayer; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class SetPowerToughnessTargetEffect extends ContinuousEffectImpl { + + private int power; + private int toughness; + + public SetPowerToughnessTargetEffect(int power, int toughness, Duration duration) { + super(duration, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + this.power = power; + this.toughness = toughness; + } + + public SetPowerToughnessTargetEffect(final SetPowerToughnessTargetEffect effect) { + super(effect); + this.power = effect.power; + this.toughness = effect.toughness; + } + + @Override + public SetPowerToughnessTargetEffect copy() { + return new SetPowerToughnessTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent target = (Permanent) game.getPermanent(source.getFirstTarget()); + if (target != null) { + target.getPower().setValue(power); + target.getToughness().setValue(toughness); + return true; + } + return false; + } + + @Override + public String getText(Ability source) { + StringBuilder sb = new StringBuilder(); + sb.append("target ").append(source.getTargets().get(0).getTargetName()).append(" becomes "); + sb.append(power).append("/").append(toughness).append(" ").append(duration.toString()); + return sb.toString(); + } + + +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/effects/common/TapSourceUnlessControlsEffect.java b/Mage/src/mage/abilities/effects/common/TapSourceUnlessControlsEffect.java new file mode 100644 index 0000000000..88c53a4556 --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/TapSourceUnlessControlsEffect.java @@ -0,0 +1,79 @@ +/* + * 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.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class TapSourceUnlessControlsEffect extends OneShotEffect { + + FilterPermanent filter; + + public TapSourceUnlessControlsEffect(FilterPermanent filter) { + super(Outcome.Tap); + this.filter = filter; + } + + public TapSourceUnlessControlsEffect(final TapSourceUnlessControlsEffect effect) { + super(effect); + this.filter = effect.filter; + } + + @Override + public TapSourceUnlessControlsEffect copy() { + return new TapSourceUnlessControlsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (game.getBattlefield().countAll(filter, source.getControllerId()) == 0) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + permanent.setTapped(true); + return true; + } + return false; + } + return true; + } + + @Override + public String getText(Ability source) { + return "tap {this} unless you control a " + filter.getMessage(); + } + +} diff --git a/Mage/src/mage/abilities/keyword/FlyingAbility.java b/Mage/src/mage/abilities/keyword/FlyingAbility.java index 70889d3422..0d2df53ea0 100644 --- a/Mage/src/mage/abilities/keyword/FlyingAbility.java +++ b/Mage/src/mage/abilities/keyword/FlyingAbility.java @@ -52,8 +52,8 @@ public class FlyingAbility extends EvasionAbilityImpl { private FlyingAbility() {} @Override - public boolean canBlock(Permanent permanent, Game game) { - if (permanent.getAbilities().containsKey(id) || permanent.getAbilities().containsKey(ReachAbility.getInstance().getId())) + public boolean canBlock(Permanent blocker, Game game) { + if (blocker.getAbilities().containsKey(id) || blocker.getAbilities().containsKey(ReachAbility.getInstance().getId())) return true; return false; } diff --git a/Mage/src/mage/abilities/keyword/LandwalkAbility.java b/Mage/src/mage/abilities/keyword/LandwalkAbility.java index febbfa27ee..b0ec67d2d9 100644 --- a/Mage/src/mage/abilities/keyword/LandwalkAbility.java +++ b/Mage/src/mage/abilities/keyword/LandwalkAbility.java @@ -56,8 +56,8 @@ public class LandwalkAbility extends EvasionAbilityImpl { } @Override - public boolean canBlock(Permanent permanent, Game game) { - return game.getBattlefield().countAll(filter, permanent.getControllerId()) == 0; + public boolean canBlock(Permanent blocker, Game game) { + return game.getBattlefield().countAll(filter, blocker.getControllerId()) == 0; } @Override diff --git a/Mage/src/mage/abilities/keyword/UnblockableAbility.java b/Mage/src/mage/abilities/keyword/UnblockableAbility.java index bacc74ad27..03ad632321 100644 --- a/Mage/src/mage/abilities/keyword/UnblockableAbility.java +++ b/Mage/src/mage/abilities/keyword/UnblockableAbility.java @@ -52,7 +52,7 @@ public class UnblockableAbility extends EvasionAbilityImpl { private UnblockableAbility() {} @Override - public boolean canBlock(Permanent permanent, Game game) { + public boolean canBlock(Permanent blocker, Game game) { return false; } diff --git a/Mage/src/mage/abilities/keyword/UnearthAbility.java b/Mage/src/mage/abilities/keyword/UnearthAbility.java index 193fda37f1..8675b6f8fd 100644 --- a/Mage/src/mage/abilities/keyword/UnearthAbility.java +++ b/Mage/src/mage/abilities/keyword/UnearthAbility.java @@ -176,7 +176,6 @@ class UnearthLeavesBattlefieldEffect extends ReplacementEffectImpl> extends ActivatedAbi if (!controlsAbility(playerId, game)) return false; //20091005 - 605.3a - return costs.canPay(this, game); + return costs.canPay(sourceId, controllerId, game); } public Mana getNetMana(Game game) { diff --git a/Mage/src/mage/cards/Card.java b/Mage/src/mage/cards/Card.java index 6e2d6b8dc8..4accf4187e 100644 --- a/Mage/src/mage/cards/Card.java +++ b/Mage/src/mage/cards/Card.java @@ -30,6 +30,7 @@ package mage.cards; import java.util.List; import java.util.UUID; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageObject; import mage.abilities.Ability; @@ -42,15 +43,19 @@ public interface Card extends MageObject { public UUID getOwnerId(); public String getArt(); + public Rarity getRarity(); + public void setRarity(Rarity rarity); public void setControllerId(UUID controllerId); public void setOwnerId(UUID ownerId); public void addAbility(Ability ability); public SpellAbility getSpellAbility(); public List getRules(); public Watchers getWatchers(); - public UUID getExpansionSetId(); + public String getExpansionSetCode(); + public void setExpansionSetCode(String expansionSetCode); public void checkTriggers(Zone zone, GameEvent event, Game game); + @Override public Card copy(); } diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/mage/cards/CardImpl.java index 6960d8a8a2..f03acc362a 100644 --- a/Mage/src/mage/cards/CardImpl.java +++ b/Mage/src/mage/cards/CardImpl.java @@ -32,6 +32,7 @@ import java.lang.reflect.Constructor; import java.util.List; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageObjectImpl; import mage.abilities.Ability; @@ -46,11 +47,12 @@ public abstract class CardImpl> extends MageObjectImpl protected UUID ownerId; protected Watchers watchers = new Watchers(); - protected UUID expansionSetId; + protected String expansionSetCode; + protected Rarity rarity; - public CardImpl(UUID ownerId, String name, CardType[] cardTypes, String costs) { - this.ownerId = ownerId; - this.name = name; + public CardImpl(UUID ownerId, String name, Rarity rarity, CardType[] cardTypes, String costs) { + this(ownerId, name); + this.rarity = rarity; for (CardType newCardType: cardTypes) this.cardType.add(newCardType); this.manaCost.load(costs); @@ -74,7 +76,8 @@ public abstract class CardImpl> extends MageObjectImpl public CardImpl(final CardImpl card) { super(card); ownerId = card.ownerId; - expansionSetId = card.expansionSetId; + expansionSetCode = card.expansionSetCode; + rarity = card.rarity; watchers = card.watchers.copy(); } @@ -97,10 +100,15 @@ public abstract class CardImpl> extends MageObjectImpl return ownerId; } -// @Override -// public String getArt() { -// return art; -// } + @Override + public Rarity getRarity() { + return rarity; + } + + @Override + public void setRarity(Rarity rarity) { + this.rarity = rarity; + } @Override public List getRules() { @@ -137,11 +145,6 @@ public abstract class CardImpl> extends MageObjectImpl abilities.setControllerId(ownerId); } -// @Override -// public Card copy() { -// return new Copier().copy(this); -// } - @Override public Watchers getWatchers() { return watchers; @@ -155,7 +158,12 @@ public abstract class CardImpl> extends MageObjectImpl } @Override - public UUID getExpansionSetId() { - return expansionSetId; + public String getExpansionSetCode() { + return expansionSetCode; + } + + @Override + public void setExpansionSetCode(String expansionSetCode) { + this.expansionSetCode = expansionSetCode; } } diff --git a/Mage/src/mage/cards/ExpansionSet.java b/Mage/src/mage/cards/ExpansionSet.java index c7e925e3fc..cd38965198 100644 --- a/Mage/src/mage/cards/ExpansionSet.java +++ b/Mage/src/mage/cards/ExpansionSet.java @@ -28,13 +28,19 @@ package mage.cards; +import java.io.File; +import java.io.IOException; import java.io.Serializable; import java.lang.reflect.Constructor; +import java.net.URL; import java.util.ArrayList; +import java.util.Enumeration; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.UUID; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; import java.util.logging.Level; import java.util.logging.Logger; @@ -45,27 +51,39 @@ import java.util.logging.Logger; public abstract class ExpansionSet implements Serializable { protected String name; - protected final List cards = new ArrayList(); - protected final UUID id = UUID.randomUUID(); + protected String code; + protected String symbolCode; + protected List cards; + + public ExpansionSet(String name, String code, String symbolCode, String packageName) { + this.name = name; + this.code = code; + this.symbolCode = symbolCode; + this.cards = getCardClassesForPackage(packageName); + } public List getCards() { return cards; } - public UUID getId() { - return id; - } - public String getName() { return name; } - public static Card createCard(Class clazz) { + public String getCode() { + return code; + } + + public String getSymbolCode() { + return symbolCode; + } + + public Card createCard(Class clazz) { try { Constructor con = clazz.getConstructor(new Class[]{UUID.class}); return (Card) con.newInstance(new Object[] {null}); } catch (Exception ex) { - Logger.getLogger(ExpansionSet.class.getName()).log(Level.SEVERE, null, ex); + Logger.getLogger(ExpansionSet.class.getName()).log(Level.SEVERE, "Error creating card:" + clazz.getName(), ex); return null; } } @@ -82,4 +100,44 @@ public abstract class ExpansionSet implements Serializable { public String toString() { return name; } + + protected ArrayList getCardClassesForPackage(String packageName) { + ArrayList classes = new ArrayList(); + // Get a File object for the package + File directory = null; + String fullPath; + String relPath = packageName.replace('.', '/'); + URL resource = ClassLoader.getSystemClassLoader().getResource(relPath); + if (resource == null) { + throw new RuntimeException("No resource for " + relPath); + } + fullPath = resource.getFile(); + directory = new File(fullPath); + + try { + String jarPath = fullPath.replaceFirst("[.]jar[!].*", ".jar").replaceFirst("file:", ""); + JarFile jarFile = new JarFile(jarPath); + Enumeration entries = jarFile.entries(); + while(entries.hasMoreElements()) { + JarEntry entry = entries.nextElement(); + String entryName = entry.getName(); + if(entryName.startsWith(relPath) && entryName.length() > (relPath.length() + "/".length())) { + String className = entryName.replace('/', '.').replace('\\', '.').replace(".class", ""); + try { + Class clazz = Class.forName(className); + if (CardImpl.class.isAssignableFrom(clazz)) { + classes.add(clazz); + } + } + catch (ClassNotFoundException e) { + throw new RuntimeException("ClassNotFoundException loading " + className); + } + } + } + } catch (IOException e) { + throw new RuntimeException(packageName + " (" + directory + ") does not appear to be a valid package", e); + } + return classes; + } + } diff --git a/Mage/src/mage/cards/LevelerCard.java b/Mage/src/mage/cards/LevelerCard.java index b5e5c9f25b..be24715103 100644 --- a/Mage/src/mage/cards/LevelerCard.java +++ b/Mage/src/mage/cards/LevelerCard.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.keyword.LevelAbility; /** @@ -42,8 +43,8 @@ public abstract class LevelerCard> extends CardImpl protected List levels = new ArrayList(); - public LevelerCard(UUID ownerId, String name, CardType[] cardTypes, String costs) { - super(ownerId, name, cardTypes, costs); + public LevelerCard(UUID ownerId, String name, Rarity rarity, CardType[] cardTypes, String costs) { + super(ownerId, name, rarity, cardTypes, costs); } public LevelerCard(LevelerCard card) { diff --git a/Mage/src/mage/cards/basiclands/BasicLand.java b/Mage/src/mage/cards/basiclands/BasicLand.java index 38ff3d8a06..92c718c93e 100644 --- a/Mage/src/mage/cards/basiclands/BasicLand.java +++ b/Mage/src/mage/cards/basiclands/BasicLand.java @@ -30,6 +30,7 @@ package mage.cards.basiclands; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.abilities.mana.ManaAbility; import mage.cards.CardImpl; @@ -40,7 +41,7 @@ import mage.cards.CardImpl; public abstract class BasicLand> extends CardImpl { public BasicLand(UUID ownerId, String name, ManaAbility mana) { - super(ownerId, name, new CardType[]{CardType.LAND}, null); + super(ownerId, name, Rarity.LAND, new CardType[]{CardType.LAND}, null); this.supertype.add("Basic"); this.subtype.add(name); this.addAbility(mana); diff --git a/Mage/src/mage/cards/basiclands/Forest.java b/Mage/src/mage/cards/basiclands/Forest.java index 6bbeb9c5a3..fab53d0d66 100644 --- a/Mage/src/mage/cards/basiclands/Forest.java +++ b/Mage/src/mage/cards/basiclands/Forest.java @@ -35,14 +35,24 @@ import mage.abilities.mana.GreenManaAbility; * * @author BetaSteward_at_googlemail.com */ -public abstract class Forest> extends BasicLand { +public class Forest extends BasicLand { public Forest(UUID ownerId) { super(ownerId, "Forest", new GreenManaAbility()); } - public Forest(Forest land) { + public Forest(final Forest land) { super(land); } + @Override + public Forest copy() { + return new Forest(this); + } + + @Override + public String getArt() { + return ""; + } + } diff --git a/Mage/src/mage/cards/basiclands/Island.java b/Mage/src/mage/cards/basiclands/Island.java index 1c5d1ea986..40d8f98d2d 100644 --- a/Mage/src/mage/cards/basiclands/Island.java +++ b/Mage/src/mage/cards/basiclands/Island.java @@ -35,7 +35,7 @@ import mage.abilities.mana.BlueManaAbility; * * @author BetaSteward_at_googlemail.com */ -public abstract class Island> extends BasicLand { +public class Island extends BasicLand { public Island(UUID ownerId) { super(ownerId, "Island", new BlueManaAbility()); @@ -45,4 +45,14 @@ public abstract class Island> extends BasicLand { super(land); } + @Override + public Island copy() { + return new Island(this); + } + + @Override + public String getArt() { + return ""; + } + } diff --git a/Mage/src/mage/cards/basiclands/Mountain.java b/Mage/src/mage/cards/basiclands/Mountain.java index cbd421b01a..a886089486 100644 --- a/Mage/src/mage/cards/basiclands/Mountain.java +++ b/Mage/src/mage/cards/basiclands/Mountain.java @@ -35,7 +35,7 @@ import mage.abilities.mana.RedManaAbility; * * @author BetaSteward_at_googlemail.com */ -public abstract class Mountain> extends BasicLand { +public class Mountain extends BasicLand { public Mountain(UUID ownerId) { super(ownerId, "Mountain", new RedManaAbility()); @@ -44,4 +44,14 @@ public abstract class Mountain> extends BasicLand { public Mountain(Mountain land) { super(land); } + + @Override + public Mountain copy() { + return new Mountain(this); + } + + @Override + public String getArt() { + return ""; + } } diff --git a/Mage/src/mage/cards/basiclands/Plains.java b/Mage/src/mage/cards/basiclands/Plains.java index 8de31be582..1c1e0c3e21 100644 --- a/Mage/src/mage/cards/basiclands/Plains.java +++ b/Mage/src/mage/cards/basiclands/Plains.java @@ -35,7 +35,7 @@ import mage.abilities.mana.WhiteManaAbility; * * @author BetaSteward_at_googlemail.com */ -public abstract class Plains> extends BasicLand { +public class Plains extends BasicLand { public Plains(UUID ownerId) { super(ownerId, "Plains", new WhiteManaAbility()); @@ -44,4 +44,14 @@ public abstract class Plains> extends BasicLand { public Plains(Plains land) { super(land); } + + @Override + public Plains copy() { + return new Plains(this); + } + + @Override + public String getArt() { + return ""; + } } diff --git a/Mage/src/mage/cards/basiclands/Swamp.java b/Mage/src/mage/cards/basiclands/Swamp.java index a56751a8dd..e877d55cf3 100644 --- a/Mage/src/mage/cards/basiclands/Swamp.java +++ b/Mage/src/mage/cards/basiclands/Swamp.java @@ -35,7 +35,7 @@ import mage.abilities.mana.BlackManaAbility; * * @author BetaSteward_at_googlemail.com */ -public abstract class Swamp> extends BasicLand { +public class Swamp extends BasicLand { public Swamp(UUID ownerId) { super(ownerId, "Swamp", new BlackManaAbility()); @@ -44,4 +44,14 @@ public abstract class Swamp> extends BasicLand { public Swamp(Swamp land) { super(land); } + + @Override + public Swamp copy() { + return new Swamp(this); + } + + @Override + public String getArt() { + return ""; + } } diff --git a/Mage/src/mage/choices/Choice.java b/Mage/src/mage/choices/Choice.java index 7fa1f23faf..3d8c5381a8 100644 --- a/Mage/src/mage/choices/Choice.java +++ b/Mage/src/mage/choices/Choice.java @@ -28,7 +28,7 @@ package mage.choices; -import java.util.List; +import java.util.Set; /** * @@ -41,7 +41,8 @@ public interface Choice { public void clearChoice(); public String getMessage(); public void setChoice(String choice); - public List getChoices(); + public Set getChoices(); + public void setChoices(Set choices); public String getChoice(); public Choice copy(); diff --git a/Mage/src/mage/choices/ChoiceImpl.java b/Mage/src/mage/choices/ChoiceImpl.java index 68e69fa5e0..d11891526c 100644 --- a/Mage/src/mage/choices/ChoiceImpl.java +++ b/Mage/src/mage/choices/ChoiceImpl.java @@ -30,7 +30,9 @@ package mage.choices; import java.io.Serializable; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** * @@ -41,7 +43,7 @@ public class ChoiceImpl> implements Choice, Serializable protected boolean chosen; protected boolean required; protected String choice; - protected List choices = new ArrayList(); + protected Set choices = new HashSet(); protected String message; public ChoiceImpl() { @@ -79,10 +81,15 @@ public class ChoiceImpl> implements Choice, Serializable } @Override - public List getChoices() { + public Set getChoices() { return choices; } + @Override + public void setChoices(Set choices) { + this.choices = choices; + } + @Override public String getChoice() { return choice; diff --git a/Mage/src/mage/filter/FilterCard.java b/Mage/src/mage/filter/FilterCard.java index 7240941164..5a14a501ec 100644 --- a/Mage/src/mage/filter/FilterCard.java +++ b/Mage/src/mage/filter/FilterCard.java @@ -43,8 +43,8 @@ public class FilterCard> extends FilterObject ownerId = new ArrayList(); protected boolean notOwner; - protected List expansionSetId = new ArrayList(); - protected boolean notExpansionSetId; + protected List expansionSetCode = new ArrayList(); + protected boolean notExpansionSetCode; public FilterCard() { super("card"); @@ -60,10 +60,10 @@ public class FilterCard> extends FilterObject> extends FilterObject 0 && ownerId.contains(card.getOwnerId()) == notOwner) return notFilter; - if (expansionSetId.size() > 0 && expansionSetId.contains(card.getExpansionSetId()) == notExpansionSetId) + if (expansionSetCode.size() > 0 && expansionSetCode.contains(card.getExpansionSetCode()) == notExpansionSetCode) return notFilter; return !notFilter; @@ -88,12 +88,12 @@ public class FilterCard> extends FilterObject getExpansionSetId() { - return expansionSetId; + public List getExpansionSetCode() { + return expansionSetCode; } - public void setNotExpansionSetId(boolean notExpansionSetId) { - this.notExpansionSetId = notExpansionSetId; + public void setNotExpansionSetCode(boolean notExpansionSetCode) { + this.notExpansionSetCode = notExpansionSetCode; } public boolean matchOwner(UUID testOwnerId) { diff --git a/Mage/src/mage/filter/FilterObject.java b/Mage/src/mage/filter/FilterObject.java index 51f6d6326f..30658051bc 100644 --- a/Mage/src/mage/filter/FilterObject.java +++ b/Mage/src/mage/filter/FilterObject.java @@ -43,7 +43,7 @@ import mage.abilities.Ability; * * @author BetaSteward_at_googlemail.com */ -public abstract class FilterObject> extends FilterImpl implements Filter { +public class FilterObject> extends FilterImpl implements Filter { protected Abilities abilities; protected boolean notAbilities; protected List cardType = new ArrayList(); @@ -75,7 +75,9 @@ public abstract class FilterObject copy(); + public FilterObject copy() { + return new FilterObject(this); + } public FilterObject(String name) { super(name); diff --git a/Mage/src/mage/filter/FilterSpell.java b/Mage/src/mage/filter/FilterSpell.java index a922870b2a..42e6cc01f1 100644 --- a/Mage/src/mage/filter/FilterSpell.java +++ b/Mage/src/mage/filter/FilterSpell.java @@ -50,7 +50,7 @@ public class FilterSpell extends FilterObject { super(name); } - public FilterSpell(FilterSpell filter) { + public FilterSpell(final FilterSpell filter) { super(filter); for (UUID cId: filter.controllerId) { this.controllerId.add(cId); diff --git a/Mage/src/mage/filter/FilterStackObject.java b/Mage/src/mage/filter/FilterStackObject.java new file mode 100644 index 0000000000..310f7199f3 --- /dev/null +++ b/Mage/src/mage/filter/FilterStackObject.java @@ -0,0 +1,86 @@ +/* + * 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.filter; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.game.stack.StackObject; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class FilterStackObject extends FilterObject { + + protected List controllerId = new ArrayList(); + protected boolean notController = false; + + public FilterStackObject() { + super("spell or ability"); + } + + public FilterStackObject(String name) { + super(name); + } + + public FilterStackObject(final FilterStackObject filter) { + super(filter); + for (UUID cId: filter.controllerId) { + this.controllerId.add(cId); + } + this.notController = filter.notController; + } + + @Override + public boolean match(StackObject spell) { + + if (!super.match(spell)) + return notFilter; + + if (controllerId.size() > 0 && controllerId.contains(spell.getControllerId()) == notController) + return notFilter; + + return !notFilter; + } + + public List getControllerId() { + return controllerId; + } + + public void setNotController(boolean notController) { + this.notController = notController; + } + + @Override + public FilterStackObject copy() { + return new FilterStackObject(this); + } + +} diff --git a/Mage/src/mage/filter/common/FilterCreatureCard.java b/Mage/src/mage/filter/common/FilterCreatureCard.java new file mode 100644 index 0000000000..f346463193 --- /dev/null +++ b/Mage/src/mage/filter/common/FilterCreatureCard.java @@ -0,0 +1,58 @@ +/* + * 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.filter.common; + +import mage.Constants.CardType; +import mage.filter.FilterCard; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class FilterCreatureCard extends FilterCard { + + public FilterCreatureCard() { + this("creature card"); + } + + public FilterCreatureCard(String name) { + super(name); + cardType.add(CardType.CREATURE); + } + + public FilterCreatureCard(final FilterCreatureCard filter) { + super(filter); + } + + @Override + public FilterCreatureCard copy() { + return new FilterCreatureCard(this); + } + +} diff --git a/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java b/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java index f82db852b6..bcde639ae6 100644 --- a/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java +++ b/Mage/src/mage/filter/common/FilterCreatureOrPlayer.java @@ -56,7 +56,7 @@ public class FilterCreatureOrPlayer extends FilterImpl> extends FilterPermanent> { + protected static FilterCreaturePermanent defaultFilter = new FilterCreaturePermanent(); + protected boolean useAttacking; protected boolean attacking; protected boolean useBlocking; @@ -60,6 +62,10 @@ public class FilterCreaturePermanent> exten this.blocking = filter.blocking; } + public static FilterCreaturePermanent getDefault() { + return defaultFilter; + } + @Override public boolean match(Permanent permanent) { if (!super.match(permanent)) @@ -76,6 +82,8 @@ public class FilterCreaturePermanent> exten @Override public FilterCreaturePermanent copy() { + if (this == defaultFilter) + return this; return new FilterCreaturePermanent(this); } } diff --git a/Mage/src/mage/game/Exile.java b/Mage/src/mage/game/Exile.java index 84baeaa6ba..422f85f25d 100644 --- a/Mage/src/mage/game/Exile.java +++ b/Mage/src/mage/game/Exile.java @@ -64,7 +64,15 @@ public class Exile implements Serializable, Copyable { public ExileZone getPermanentExile() { return exileZones.get(PERMANENT); } + + public void add(UUID id, String name, Card card) { + createZone(id, name).add(card); + } + public void add(Card card) { + exileZones.get(PERMANENT).add(card); + } + public ExileZone createZone(UUID id, String name) { return createZone(id, name + " - Exile", false); } diff --git a/Mage/src/mage/game/combat/CombatGroup.java b/Mage/src/mage/game/combat/CombatGroup.java index 9b0a7c5608..f2e66bc658 100644 --- a/Mage/src/mage/game/combat/CombatGroup.java +++ b/Mage/src/mage/game/combat/CombatGroup.java @@ -171,23 +171,23 @@ public class CombatGroup implements Serializable, Copyable { if (hasTrample(attacker)) { int lethalDamage = blocker.getToughness().getValue() - blocker.getDamage(); if (lethalDamage >= damage) { - blocker.damage(damage, attacker.getId(), game); + blocker.damage(damage, attacker.getId(), game, true); } else { Player player = game.getPlayer(attacker.getControllerId()); int damageAssigned = player.getAmount(lethalDamage, damage, "Assign damage to " + blocker.getName(), game); - blocker.damage(damageAssigned, attacker.getId(), game); + blocker.damage(damageAssigned, attacker.getId(), game, true); damage -= damageAssigned; if (damage > 0) defenderDamage(attacker, damage, game); } } else { - blocker.damage(damage, attacker.getId(), game); + blocker.damage(damage, attacker.getId(), game, true); } } if (canDamage(blocker, first)) { - attacker.damage(blocker.getPower().getValue(), blocker.getId(), game); + attacker.damage(blocker.getPower().getValue(), blocker.getId(), game, true); } } } @@ -202,12 +202,12 @@ public class CombatGroup implements Serializable, Copyable { Permanent blocker = game.getPermanent(blockerId); int lethalDamage = blocker.getToughness().getValue() - blocker.getDamage(); if (lethalDamage >= damage) { - blocker.damage(damage, attacker.getId(), game); + blocker.damage(damage, attacker.getId(), game, true); damage = 0; break; } int damageAssigned = player.getAmount(lethalDamage, damage, "Assign damage to " + blocker.getName(), game); - blocker.damage(damageAssigned, attacker.getId(), game); + blocker.damage(damageAssigned, attacker.getId(), game, true); damage -= damageAssigned; } if (damage > 0 && hasTrample(attacker)) { @@ -216,7 +216,7 @@ public class CombatGroup implements Serializable, Copyable { for (UUID blockerId: blockerOrder) { Permanent blocker = game.getPermanent(blockerId); if (canDamage(blocker, first)) { - attacker.damage(blocker.getPower().getValue(), blocker.getId(), game); + attacker.damage(blocker.getPower().getValue(), blocker.getId(), game, true); } } } @@ -226,12 +226,12 @@ public class CombatGroup implements Serializable, Copyable { if (this.defenderIsPlaneswalker) { Permanent defender = game.getPermanent(defenderId); if (defender != null) { - defender.damage(amount, attacker.getId(), game); + defender.damage(amount, attacker.getId(), game, true); } } else { Player defender = game.getPlayer(defenderId); - defender.damage(amount, attacker.getId(), game); + defender.damage(amount, attacker.getId(), game, true, true); } } @@ -245,7 +245,7 @@ public class CombatGroup implements Serializable, Copyable { public void addBlocker(UUID blockerId, UUID playerId, Game game) { for (UUID attackerId: attackers) { - if (game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_BLOCKER, blockerId, attackerId, playerId))) { + if (game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_BLOCKER, attackerId, blockerId, playerId))) { return; } } @@ -254,7 +254,7 @@ public class CombatGroup implements Serializable, Copyable { blockerOrder.add(blockerId); this.blocked = true; for (UUID attackerId: attackers) { - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BLOCKER_DECLARED, blockerId, attackerId, playerId)); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BLOCKER_DECLARED, attackerId, blockerId, playerId)); } } diff --git a/Mage/src/mage/game/events/GameEvent.java b/Mage/src/mage/game/events/GameEvent.java index 5e860df2a2..5c661740f1 100644 --- a/Mage/src/mage/game/events/GameEvent.java +++ b/Mage/src/mage/game/events/GameEvent.java @@ -74,7 +74,11 @@ public class GameEvent { DISCARD_CARD, DISCARDED_CARD, CYCLE_CARD, CYCLED_CARD, DAMAGE_PLAYER, DAMAGED_PLAYER, + COMBAT_DAMAGE_PLAYER, COMBAT_DAMAGED_PLAYER, + NONCOMBAT_DAMAGE_PLAYER, NONCOMBAT_DAMAGED_PLAYER, PLAYER_LIFE_CHANGE, + GAIN_LIFE, GAINED_LIFE, + LOSE_LIFE, LOST_LIFE, PLAY_LAND, LAND_PLAYED, CAST_SPELL, SPELL_CAST, ACTIVATE_ABILITY, ACTIVATED_ABILITY, diff --git a/Mage/src/mage/game/permanent/Permanent.java b/Mage/src/mage/game/permanent/Permanent.java index e8a279d4af..5b4297ee5c 100644 --- a/Mage/src/mage/game/permanent/Permanent.java +++ b/Mage/src/mage/game/permanent/Permanent.java @@ -68,16 +68,17 @@ public interface Permanent extends Card { public boolean changeControllerId(UUID controllerId, Game game); public boolean canBeTargetedBy(MageObject source); public int getDamage(); - public int damage(int damage, UUID sourceId, Game game); + public int damage(int damage, UUID sourceId, Game game, boolean preventable); public void removeAllDamage(Game game); public Counters getCounters(); public void reset(Game game); public boolean destroy(UUID sourceId, Game game, boolean noRegen); public boolean sacrifice(UUID sourceId, Game game); public void entersBattlefield(Game game); - public boolean moveToZone(Zone zone, Game game, boolean sacrificed); + public boolean moveToZone(Zone zone, Game game, boolean flag); public boolean moveToExile(UUID exileId, String name, Game game); public String getValue(); + public void setArt(String art); @Override public void addAbility(Ability ability); diff --git a/Mage/src/mage/game/permanent/PermanentCard.java b/Mage/src/mage/game/permanent/PermanentCard.java index 7035ee2267..5856936deb 100644 --- a/Mage/src/mage/game/permanent/PermanentCard.java +++ b/Mage/src/mage/game/permanent/PermanentCard.java @@ -52,6 +52,15 @@ public class PermanentCard extends PermanentImpl { public PermanentCard(Card card, UUID controllerId) { super(card.getId(), card.getOwnerId(), controllerId, card.getName()); + init(card); + } + + protected PermanentCard(UUID id, Card card, UUID controllerId) { + super(card.getId(), card.getOwnerId(), controllerId, card.getName()); + init(card); + } + + protected void init(Card card) { copyFromCard(card); if (card.getCardType().contains(CardType.PLANESWALKER)) { this.loyalty = new MageInt(card.getLoyalty().getValue()); @@ -97,15 +106,17 @@ public class PermanentCard extends PermanentImpl { this.subtype = card.getSubtype(); this.supertype = card.getSupertype(); this.art = card.getArt(); + this.expansionSetCode = card.getExpansionSetCode(); + this.rarity = card.getRarity(); } @Override - public boolean moveToZone(Zone zone, Game game, boolean sacrificed) { + public boolean moveToZone(Zone zone, Game game, boolean flag) { if (!game.replaceEvent(new ZoneChangeEvent(this.getId(), this.getControllerId(), Zone.BATTLEFIELD, zone))) { if (game.getPlayer(controllerId).removeFromBattlefield(this, game)) { switch (zone) { case GRAVEYARD: - game.getPlayer(ownerId).putInGraveyard(game.getCard(objectId), game, !sacrificed); + game.getPlayer(ownerId).putInGraveyard(game.getCard(objectId), game, !flag); break; case HAND: game.getPlayer(ownerId).getHand().add(game.getCard(objectId)); @@ -113,6 +124,12 @@ public class PermanentCard extends PermanentImpl { case EXILED: game.getExile().getPermanentExile().add(game.getCard(objectId)); break; + case LIBRARY: + if (flag) + game.getPlayer(ownerId).getLibrary().putOnTop(game.getCard(objectId), game); + else + game.getPlayer(ownerId).getLibrary().putOnBottom(game.getCard(objectId), game); + } game.fireEvent(new ZoneChangeEvent(this.getId(), this.getControllerId(), Zone.BATTLEFIELD, zone)); return true; @@ -143,6 +160,11 @@ public class PermanentCard extends PermanentImpl { return art; } + @Override + public void setArt(String art) { + this.art = art; + } + @Override public PermanentCard copy() { return new PermanentCard(this); diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/mage/game/permanent/PermanentImpl.java index a8f4b0de6e..46151d35bb 100644 --- a/Mage/src/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/mage/game/permanent/PermanentImpl.java @@ -38,8 +38,10 @@ import mage.abilities.Ability; import mage.abilities.EvasionAbility; import mage.abilities.StaticAbility; import mage.abilities.TriggeredAbility; +import mage.abilities.common.EntersBattlefieldStaticAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.HasteAbility; @@ -47,7 +49,6 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ShroudAbility; -import mage.cards.Card; import mage.cards.CardImpl; import mage.counters.Counters; import mage.game.Game; @@ -184,6 +185,7 @@ public abstract class PermanentImpl> extends CardImpl @Override public boolean canTap() { + //20100423 - 302.6 if (!cardType.contains(CardType.CREATURE) || this.controlledFromStartOfTurn || this.abilities.containsKey(HasteAbility.getInstance().getId())) { return true; } @@ -373,14 +375,14 @@ public abstract class PermanentImpl> extends CardImpl } @Override - public int damage(int damageAmount, UUID sourceId, Game game) { + public int damage(int damageAmount, UUID sourceId, Game game, boolean preventable) { int damageDone = 0; if (damageAmount > 0 && canDamage(game.getObject(sourceId))) { if (cardType.contains(CardType.PLANESWALKER)) { - damageDone = damagePlaneswalker(damageAmount, sourceId, game); + damageDone = damagePlaneswalker(damageAmount, sourceId, game, preventable); } else { - damageDone = damageCreature(damageAmount, sourceId, game); + damageDone = damageCreature(damageAmount, sourceId, game, preventable); } if (damageDone > 0) { Permanent source = game.getPermanent(sourceId); @@ -401,9 +403,9 @@ public abstract class PermanentImpl> extends CardImpl damage = 0; } - protected int damagePlaneswalker(int damage, UUID sourceId, Game game) { + protected int damagePlaneswalker(int damage, UUID sourceId, Game game, boolean preventable) { GameEvent event = new GameEvent(GameEvent.EventType.DAMAGE_PLANESWALKER, objectId, sourceId, controllerId, damage); - if (!game.replaceEvent(event)) { + if (!preventable || !game.replaceEvent(event)) { int actualDamage = event.getAmount(); if (actualDamage > 0) { if (event.getAmount() > this.loyalty.getValue()) { @@ -417,9 +419,9 @@ public abstract class PermanentImpl> extends CardImpl return 0; } - protected int damageCreature(int damage, UUID sourceId, Game game) { + protected int damageCreature(int damage, UUID sourceId, Game game, boolean preventable) { GameEvent event = new GameEvent(GameEvent.EventType.DAMAGE_CREATURE, objectId, sourceId, controllerId, damage); - if (!game.replaceEvent(event)) { + if (!preventable || !game.replaceEvent(event)) { int actualDamage = event.getAmount(); if (actualDamage > 0) { if (this.damage + event.getAmount() > this.toughness.getValue()) { @@ -464,9 +466,15 @@ public abstract class PermanentImpl> extends CardImpl protected void addEffects(Game game) { for (StaticAbility ability: abilities.getStaticAbilities(Zone.BATTLEFIELD)) { - for (Effect effect: ability.getEffects()) { - if (effect instanceof ContinuousEffect) - game.addEffect((ContinuousEffect)effect, ability); + if (ability.activate(game, false)) { + for (Effect effect: ability.getEffects()) { + if (effect instanceof ContinuousEffect) + game.addEffect((ContinuousEffect)effect, ability); + else if (ability instanceof EntersBattlefieldStaticAbility && effect instanceof OneShotEffect) { + //20100423 - 603.6e + effect.apply(game, ability); + } + } } } } diff --git a/Mage/src/mage/game/permanent/PermanentToken.java b/Mage/src/mage/game/permanent/PermanentToken.java index c64b90dd8f..4bfe4c4075 100644 --- a/Mage/src/mage/game/permanent/PermanentToken.java +++ b/Mage/src/mage/game/permanent/PermanentToken.java @@ -75,7 +75,7 @@ public class PermanentToken extends PermanentImpl { } @Override - public boolean moveToZone(Zone zone, Game game, boolean sacrificed) { + public boolean moveToZone(Zone zone, Game game, boolean flag) { if (!game.replaceEvent(new ZoneChangeEvent(this.getId(), this.getControllerId(), Zone.BATTLEFIELD, zone))) { if (game.getPlayer(controllerId).removeFromBattlefield(this, game)) { game.fireEvent(new ZoneChangeEvent(this.getId(), this.getControllerId(), Zone.BATTLEFIELD, zone)); @@ -101,6 +101,9 @@ public class PermanentToken extends PermanentImpl { return ""; } + @Override + public void setArt(String art) { } + @Override public PermanentToken copy() { return new PermanentToken(this); diff --git a/Mage/src/mage/game/permanent/token/ElephantToken.java b/Mage/src/mage/game/permanent/token/ElephantToken.java new file mode 100644 index 0000000000..21fd7661f2 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/ElephantToken.java @@ -0,0 +1,50 @@ +/* + * 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.game.permanent.token; + +import mage.Constants.CardType; +import mage.MageInt; +import mage.ObjectColor; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ElephantToken extends Token { + + public ElephantToken() { + super("Elephant", "3/3 green Elephant creature token"); + cardType.add(CardType.CREATURE); + color = ObjectColor.GREEN; + subtype.add("Elephant"); + power = new MageInt(3); + toughness = new MageInt(3); + } + +} \ No newline at end of file diff --git a/Mage/src/mage/game/permanent/token/SnakeToken.java b/Mage/src/mage/game/permanent/token/SnakeToken.java new file mode 100644 index 0000000000..ad700b34ff --- /dev/null +++ b/Mage/src/mage/game/permanent/token/SnakeToken.java @@ -0,0 +1,50 @@ +/* + * 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.game.permanent.token; + +import mage.Constants.CardType; +import mage.MageInt; +import mage.ObjectColor; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class SnakeToken extends Token { + + public SnakeToken() { + super("Snake", "1/1 green Snake creature token"); + cardType.add(CardType.CREATURE); + color = ObjectColor.GREEN; + subtype.add("Snake"); + power = new MageInt(1); + toughness = new MageInt(1); + } + +} diff --git a/Mage/src/mage/game/permanent/token/ZombieToken.java b/Mage/src/mage/game/permanent/token/ZombieToken.java new file mode 100644 index 0000000000..782320ac15 --- /dev/null +++ b/Mage/src/mage/game/permanent/token/ZombieToken.java @@ -0,0 +1,50 @@ +/* + * 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.game.permanent.token; + +import mage.Constants.CardType; +import mage.MageInt; +import mage.ObjectColor; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class ZombieToken extends Token { + + public ZombieToken() { + super("Zombie", "2/2 black Zombie creature token"); + cardType.add(CardType.CREATURE); + color = ObjectColor.BLACK; + subtype.add("Zombie"); + power = new MageInt(2); + toughness = new MageInt(2); + } + +} \ No newline at end of file diff --git a/Mage/src/mage/game/stack/Spell.java b/Mage/src/mage/game/stack/Spell.java index 8056577688..6897e6370a 100644 --- a/Mage/src/mage/game/stack/Spell.java +++ b/Mage/src/mage/game/stack/Spell.java @@ -33,6 +33,7 @@ import mage.game.*; import java.util.List; import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Rarity; import mage.Constants.Zone; import mage.MageInt; import mage.ObjectColor; @@ -142,6 +143,17 @@ public class Spell> implements StackObject, Card { return card.getName(); } + @Override + public void setName(String name) {} + + @Override + public Rarity getRarity() { + return card.getRarity(); + } + + @Override + public void setRarity(Rarity rarity) {} + @Override public List getCardType() { return card.getCardType(); @@ -193,9 +205,7 @@ public class Spell> implements StackObject, Card { } @Override - public void setZone(Zone zone) { - - } + public void setZone(Zone zone) {} @Override public UUID getId() { @@ -213,9 +223,7 @@ public class Spell> implements StackObject, Card { } @Override - public void addAbility(Ability ability) { - - } + public void addAbility(Ability ability) {} @Override public SpellAbility getSpellAbility() { @@ -228,9 +236,7 @@ public class Spell> implements StackObject, Card { } @Override - public void setOwnerId(UUID controllerId) { - - } + public void setOwnerId(UUID controllerId) {} @Override public void checkTriggers(GameEvent event, Game game) { @@ -253,12 +259,18 @@ public class Spell> implements StackObject, Card { } @Override - public UUID getExpansionSetId() { - return card.getExpansionSetId(); + public String getExpansionSetCode() { + return card.getExpansionSetCode(); } + @Override + public void setExpansionSetCode(String expansionSetCode) {} + @Override public Spell copy() { return new Spell(this); } + + @Override + public void adjustCosts(Ability ability, Game game) {} } diff --git a/Mage/src/mage/game/stack/StackAbility.java b/Mage/src/mage/game/stack/StackAbility.java index 520fddc0d6..14eb34f692 100644 --- a/Mage/src/mage/game/stack/StackAbility.java +++ b/Mage/src/mage/game/stack/StackAbility.java @@ -262,4 +262,10 @@ public class StackAbility implements StackObject, Ability { return new StackAbility(this); } + @Override + public void setName(String name) { } + + @Override + public void adjustCosts(Ability ability, Game game) {} + } diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index dd454f508d..2c357e41eb 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -75,7 +75,7 @@ public interface Player extends MageItem, Copyable { public void setLife(int life, Game game); public int loseLife(int amount, Game game); public void gainLife(int amount, Game game); - public int damage(int damage, UUID sourceId, Game game); + public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable); public Cards getHand(); public int getLandsPlayed(); public boolean isPassed(); @@ -96,6 +96,7 @@ public interface Player extends MageItem, Copyable { public boolean putInHand(Card card, Game game); public boolean removeFromHand(Card card, Game game); public boolean putOntoBattlefield(Card card, Game game); +// public boolean putOntoBattlefield(Card copy, Card card, Game game); public boolean putOntoBattlefield(Token token, Game game); public boolean removeFromBattlefield(Permanent permanent, Game game); public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield); @@ -129,6 +130,7 @@ public interface Player extends MageItem, Copyable { public void setResponseInteger(Integer data); public abstract void priority(Game game); + public abstract boolean choose(Outcome outcome, Target target, Game game); public abstract boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game); public abstract boolean chooseTarget(Cards cards, TargetCard target, Ability source, Game game); public abstract boolean chooseTargetAmount(Outcome outcome, TargetAmount target, Ability source, Game game); diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 42743bc37b..5fda7288e4 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -30,7 +30,6 @@ package mage.players; import java.io.Serializable; import java.util.ArrayList; -import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -320,7 +319,7 @@ public abstract class PlayerImpl> implements Player, Ser } for (int i = 0; i < amount; i++) { TargetDiscard target = new TargetDiscard(playerId); - chooseTarget(Outcome.Discard, target, null, game); + choose(Outcome.Discard, target, game); discard(hand.get(target.getFirstTarget(), game), game); } game.fireInformEvent(name + " discards " + Integer.toString(amount) + " card" + (amount > 1?"s":"")); @@ -355,6 +354,7 @@ public abstract class PlayerImpl> implements Player, Ser protected void putOntoBattlefield(Permanent permanent, Game game) { game.getBattlefield().addPermanent(permanent); permanent.entersBattlefield(game); + game.applyEffects(); game.fireEvent(new ZoneChangeEvent(permanent.getId(), playerId, Zone.ALL, Zone.BATTLEFIELD)); } @@ -623,27 +623,37 @@ public abstract class PlayerImpl> implements Player, Ser @Override public int loseLife(int amount, Game game) { - if (amount > life) { - int curLife = life; - setLife(0, game); - return curLife; - } - else { - setLife(this.life - amount, game); - return amount; + GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount); + if (!game.replaceEvent(event)) { + if (amount > life) { + int curLife = life; + setLife(0, game); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, curLife)); + return curLife; + } + else { + setLife(this.life - amount, game); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount)); + return amount; + } } + return 0; } @Override public void gainLife(int amount, Game game) { - setLife(this.life + amount, game); + GameEvent event = new GameEvent(GameEvent.EventType.GAIN_LIFE, playerId, playerId, playerId, amount); + if (!game.replaceEvent(event)) { + setLife(this.life + amount, game); + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.GAINED_LIFE, playerId, playerId, playerId, amount)); + } } @Override - public int damage(int damage, UUID sourceId, Game game) { + public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable) { if (damage > 0 && canDamage(game.getObject(sourceId))) { GameEvent event = new GameEvent(GameEvent.EventType.DAMAGE_PLAYER, playerId, sourceId, playerId, damage); - if (!game.replaceEvent(event)) { + if (!preventable || !game.replaceEvent(event)) { int actualDamage = event.getAmount(); if (actualDamage > 0) { actualDamage = this.loseLife(actualDamage, game); @@ -653,6 +663,10 @@ public abstract class PlayerImpl> implements Player, Ser player.gainLife(actualDamage, game); } game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DAMAGED_PLAYER, playerId, sourceId, playerId, actualDamage)); + if (combatDamage) + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COMBAT_DAMAGED_PLAYER, playerId, sourceId, playerId, actualDamage)); + else + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.NONCOMBAT_DAMAGED_PLAYER, playerId, sourceId, playerId, actualDamage)); return actualDamage; } } @@ -812,7 +826,7 @@ public abstract class PlayerImpl> implements Player, Ser @Override public void declareAttacker(UUID attackerId, UUID defenderId, Game game) { Permanent attacker = game.getPermanent(attackerId); - if (attacker.canAttack(game)) { + if (attacker != null && attacker.canAttack(game)) { if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKER, defenderId, attackerId, playerId))) { game.getCombat().declareAttacker(attackerId, defenderId, game); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ATTACKER_DECLARED, defenderId, attackerId, playerId)); @@ -824,7 +838,7 @@ public abstract class PlayerImpl> implements Player, Ser public void declareBlocker(UUID blockerId, UUID attackerId, Game game) { Permanent blocker = game.getPermanent(blockerId); CombatGroup group = game.getCombat().findGroup(attackerId); - if (group != null && group.canBlock(blocker, game)) { + if (blocker != null && group != null && group.canBlock(blocker, game)) { group.addBlocker(blockerId, playerId, game); } } @@ -838,7 +852,7 @@ public abstract class PlayerImpl> implements Player, Ser newTarget = new TargetCardInLibrary(library.count(target.getFilter(), game), target.getMaxNumberOfTargets(), target.getFilter()); else newTarget = target; - if (newTarget.choose(Outcome.Neutral, playerId, null, game)) { + if (newTarget.choose(Outcome.Neutral, playerId, game)) { game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LIBRARY_SEARCHED, playerId, playerId)); return true; } diff --git a/Mage/src/mage/target/Target.java b/Mage/src/mage/target/Target.java index dd9a7a42fc..3b73f18934 100644 --- a/Mage/src/mage/target/Target.java +++ b/Mage/src/mage/target/Target.java @@ -46,16 +46,20 @@ public interface Target extends Serializable { public boolean isChosen(); public boolean doneChosing(); public void clearChosen(); + public boolean isNotTarget(); public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game); public List possibleTargets(UUID sourceId, UUID sourceControllerId, Game game); - public boolean choose(Outcome outcome, UUID playerId, Ability source, Game game); + public boolean choose(Outcome outcome, UUID playerId, Game game); + public boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game); public String getMessage(); public String getTargetName(); public void setTargetName(String name); public String getTargetedName(Game game); public Zone getZone(); public boolean isLegal(Ability source, Game game); + public boolean canTarget(UUID id, Game game); public boolean canTarget(UUID id, Ability source, Game game); + public void add(UUID id, Game game); public void addTarget(UUID id, Ability source, Game game); public void addTarget(UUID id, int amount, Ability source, Game game); diff --git a/Mage/src/mage/target/TargetAmount.java b/Mage/src/mage/target/TargetAmount.java index 4454f11524..c915bbf746 100644 --- a/Mage/src/mage/target/TargetAmount.java +++ b/Mage/src/mage/target/TargetAmount.java @@ -84,7 +84,7 @@ public abstract class TargetAmount> extends TargetImpl } @Override - public boolean choose(Outcome outcome, UUID playerId, Ability source, Game game) { + public boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game) { Player player = game.getPlayer(playerId); chosen = remainingAmount == 0; while (remainingAmount > 0) { diff --git a/Mage/src/mage/target/TargetImpl.java b/Mage/src/mage/target/TargetImpl.java index 422b60ca21..c18fd6576f 100644 --- a/Mage/src/mage/target/TargetImpl.java +++ b/Mage/src/mage/target/TargetImpl.java @@ -55,11 +55,18 @@ public abstract class TargetImpl> implements Target { protected int minNumberOfTargets; protected boolean required = false; protected boolean chosen = false; + protected boolean notTarget = false; @Override public abstract T copy(); - public TargetImpl() {} + public TargetImpl() { + this(false); + } + + public TargetImpl(boolean notTarget) { + this.notTarget = notTarget; + } public TargetImpl(final TargetImpl target) { this.targetName = target.targetName; @@ -88,6 +95,11 @@ public abstract class TargetImpl> implements Target { return "Select a " + targetName; } + @Override + public boolean isNotTarget() { + return notTarget; + } + @Override public String getTargetName() { return targetName; @@ -122,6 +134,8 @@ public abstract class TargetImpl> implements Target { @Override public boolean doneChosing() { + if (maxNumberOfTargets == 0) + return false; return targets.size() == maxNumberOfTargets; } @@ -131,12 +145,15 @@ public abstract class TargetImpl> implements Target { chosen = false; } - /** - * - * @param id - * @param game - * @return true if able to add target - */ + @Override + public void add(UUID id, Game game) { + if (targets.size() < maxNumberOfTargets) { + if (!targets.containsKey(id)) { + targets.put(id, 0); + } + } + } + @Override public void addTarget(UUID id, Ability source, Game game) { //20100423 - 113.3 @@ -174,7 +191,25 @@ public abstract class TargetImpl> implements Target { } @Override - public boolean choose(Outcome outcome, UUID playerId, Ability source, Game game) { + public boolean choose(Outcome outcome, UUID playerId, Game game) { + Player player = game.getPlayer(playerId); + while (!isChosen() && !doneChosing()) { + chosen = targets.size() >= minNumberOfTargets; + if (!player.choose(outcome, this, game)) { + return chosen; + } + chosen = targets.size() >= minNumberOfTargets; + } + while (!doneChosing()) { + if (!player.choose(outcome, this, game)) { + break; + } + } + return chosen = true; + } + + @Override + public boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game) { Player player = game.getPlayer(playerId); while (!isChosen() && !doneChosing()) { chosen = targets.size() >= minNumberOfTargets; @@ -194,6 +229,8 @@ public abstract class TargetImpl> implements Target { @Override public boolean isLegal(Ability source, Game game) { for (UUID targetId: targets.keySet()) { + if (game.replaceEvent(GameEvent.getEvent(EventType.TARGET, targetId, source.getSourceId(), source.getControllerId()))) + return false; if (!canTarget(targetId, source, game)) return false; } @@ -202,7 +239,7 @@ public abstract class TargetImpl> implements Target { @Override public List getTargets() { - return new ArrayList(targets.keySet()); + return new ArrayList(targets.keySet()); } @Override diff --git a/Mage/src/mage/target/TargetObject.java b/Mage/src/mage/target/TargetObject.java index 20f0cb4ca9..fb01cb9bb8 100644 --- a/Mage/src/mage/target/TargetObject.java +++ b/Mage/src/mage/target/TargetObject.java @@ -43,22 +43,23 @@ public abstract class TargetObject> extends TargetImpl protected TargetObject() {} public TargetObject(Zone zone) { - this(1, 1, zone); + this(1, 1, zone, false); } public TargetObject(int numTargets, Zone zone) { - this(numTargets, numTargets, zone); + this(numTargets, numTargets, zone, false); } public TargetObject(final TargetObject target) { super(target); } - public TargetObject(int minNumTargets, int maxNumTargets, Zone zone) { + public TargetObject(int minNumTargets, int maxNumTargets, Zone zone, boolean notTarget) { this.minNumberOfTargets = minNumTargets; this.maxNumberOfTargets = maxNumTargets; this.zone = zone; this.targetName = "card"; + this.notTarget = notTarget; } @Override @@ -71,11 +72,16 @@ public abstract class TargetObject> extends TargetImpl } @Override - public boolean canTarget(UUID id, Ability source, Game game) { + public boolean canTarget(UUID id, Game game) { MageObject object = game.getObject(id); if (object != null && object.getZone().match(zone)) return getFilter().match(object); return false; } + @Override + public boolean canTarget(UUID id, Ability source, Game game) { + return canTarget(id, game); + } + } diff --git a/Mage/src/mage/target/TargetPermanent.java b/Mage/src/mage/target/TargetPermanent.java index 85ff91e2c6..2292411fc3 100644 --- a/Mage/src/mage/target/TargetPermanent.java +++ b/Mage/src/mage/target/TargetPermanent.java @@ -51,24 +51,29 @@ public class TargetPermanent> extends TargetObject< protected TargetController controller; public TargetPermanent() { - this(1, 1, new FilterPermanent(), TargetController.ANY); + this(1, 1, new FilterPermanent(), TargetController.ANY, false); + } + + public TargetPermanent(FilterPermanent filter) { + this(1, 1, filter, TargetController.ANY, false); } public TargetPermanent(FilterPermanent filter, TargetController controller) { - this(1, 1, filter, controller); + this(1, 1, filter, controller, false); } public TargetPermanent(int numTargets, FilterPermanent filter, TargetController controller) { - this(numTargets, numTargets, filter, controller); + this(numTargets, numTargets, filter, controller, false); } - public TargetPermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter, TargetController controller) { + public TargetPermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter, TargetController controller, boolean notTarget) { this.minNumberOfTargets = minNumTargets; this.maxNumberOfTargets = maxNumTargets; this.zone = Zone.BATTLEFIELD; this.filter = filter; this.targetName = filter.getMessage(); this.controller = controller; + this.notTarget = notTarget; } public TargetPermanent(final TargetPermanent target) { @@ -88,6 +93,7 @@ public class TargetPermanent> extends TargetObject< setController(controllerId, game); if (permanent != null) { if (source != null) + //TODO: check for replacement effects return permanent.canBeTargetedBy(game.getObject(source.getSourceId())) && filter.match(permanent); else return filter.match(permanent); diff --git a/Mage/src/mage/target/TargetPlayer.java b/Mage/src/mage/target/TargetPlayer.java index 52f5953f71..eb0c53047e 100644 --- a/Mage/src/mage/target/TargetPlayer.java +++ b/Mage/src/mage/target/TargetPlayer.java @@ -31,7 +31,6 @@ package mage.target; import java.util.ArrayList; import java.util.List; import java.util.UUID; -import mage.Constants.Zone; import mage.MageObject; import mage.abilities.Ability; import mage.filter.FilterPlayer; @@ -47,17 +46,18 @@ public class TargetPlayer> extends TargetImpl> extends TargetImpl { + + protected FilterStackObject filter; + + public TargetStackObject() { + this(1, 1, new FilterStackObject()); + } + + public TargetStackObject(FilterStackObject filter) { + this(1, 1, filter); + } + + public TargetStackObject(int numTargets, FilterStackObject filter) { + this(numTargets, numTargets, filter); + } + + public TargetStackObject(int minNumTargets, int maxNumTargets, FilterStackObject filter) { + this.minNumberOfTargets = minNumTargets; + this.maxNumberOfTargets = maxNumTargets; + this.zone = Zone.STACK; + this.filter = filter; + this.targetName = filter.getMessage(); + } + + public TargetStackObject(final TargetStackObject target) { + super(target); + this.filter = target.filter.copy(); + } + + @Override + public FilterStackObject getFilter() { + return filter; + } + + @Override + public boolean canTarget(UUID id, Ability source, Game game) { + StackObject stackObject = game.getStack().getStackObject(id); + if (stackObject != null) { + return filter.match(stackObject); + } + return false; + } + + @Override + public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) { + int count = 0; + for (StackObject stackObject: game.getStack()) { + if (game.getPlayer(sourceControllerId).getInRange().contains(stackObject.getControllerId()) && filter.match(stackObject)) { + count++; + if (count >= this.minNumberOfTargets) + return true; + } + } + return false; + } + + @Override + public List possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { + List possibleTargets = new ArrayList(); + for (StackObject stackObject: game.getStack()) { + if (game.getPlayer(sourceControllerId).getInRange().contains(stackObject.getControllerId()) && filter.match(stackObject)) { + possibleTargets.add(stackObject.getId()); + } + } + return possibleTargets; + } + + @Override + public TargetStackObject copy() { + return new TargetStackObject(this); + } + +} diff --git a/Mage/src/mage/target/Targets.java b/Mage/src/mage/target/Targets.java index f01949f3b3..0d60bf7f9b 100644 --- a/Mage/src/mage/target/Targets.java +++ b/Mage/src/mage/target/Targets.java @@ -72,11 +72,22 @@ public class Targets extends ArrayList { return true; } - public boolean choose(Outcome outcome, UUID playerId, Ability source, Game game) { + public boolean choose(Outcome outcome, UUID playerId, Game game) { if (this.size() > 0) { while (!isChosen()) { Target target = this.getUnchosen().get(0); - if (!target.choose(outcome, playerId, source, game)) + if (!target.choose(outcome, playerId, game)) + return false; + } + } + return true; + } + + public boolean chooseTargets(Outcome outcome, UUID playerId, Ability source, Game game) { + if (this.size() > 0) { + while (!isChosen()) { + Target target = this.getUnchosen().get(0); + if (!target.chooseTarget(outcome, playerId, source, game)) return false; } } diff --git a/Mage/src/mage/target/common/TargetAttackingCreature.java b/Mage/src/mage/target/common/TargetAttackingCreature.java index 1fa99c761f..c856cfd0bd 100644 --- a/Mage/src/mage/target/common/TargetAttackingCreature.java +++ b/Mage/src/mage/target/common/TargetAttackingCreature.java @@ -38,15 +38,15 @@ import mage.filter.common.FilterAttackingCreature; public class TargetAttackingCreature extends TargetCreaturePermanent { public TargetAttackingCreature() { - this(1, 1, new FilterAttackingCreature(), TargetController.ANY); + this(1, 1, new FilterAttackingCreature(), TargetController.ANY, false); } public TargetAttackingCreature(int numTargets, TargetController controller) { - this(numTargets, numTargets, new FilterAttackingCreature(), controller); + this(numTargets, numTargets, new FilterAttackingCreature(), controller, false); } - public TargetAttackingCreature(int minNumTargets, int maxNumTargets, FilterAttackingCreature filter, TargetController controller) { - super(1, 1, filter, controller); + public TargetAttackingCreature(int minNumTargets, int maxNumTargets, FilterAttackingCreature filter, TargetController controller, boolean notTarget) { + super(1, 1, filter, controller, notTarget); this.targetName = filter.getMessage(); } diff --git a/Mage/src/mage/target/common/TargetCardInLibrary.java b/Mage/src/mage/target/common/TargetCardInLibrary.java index 533875163f..3a8a410675 100644 --- a/Mage/src/mage/target/common/TargetCardInLibrary.java +++ b/Mage/src/mage/target/common/TargetCardInLibrary.java @@ -66,7 +66,7 @@ public class TargetCardInLibrary extends TargetCard { } @Override - public boolean choose(Outcome outcome, UUID playerId, Ability source, Game game) { + public boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game) { Player player = game.getPlayer(playerId); while (!isChosen() && !doneChosing()) { chosen = targets.size() >= minNumberOfTargets; diff --git a/Mage/src/mage/target/common/TargetControlledPermanent.java b/Mage/src/mage/target/common/TargetControlledPermanent.java index 271931013e..a92cf626c6 100644 --- a/Mage/src/mage/target/common/TargetControlledPermanent.java +++ b/Mage/src/mage/target/common/TargetControlledPermanent.java @@ -39,15 +39,15 @@ import mage.target.TargetPermanent; public class TargetControlledPermanent extends TargetPermanent { public TargetControlledPermanent() { - this(1, 1, new FilterPermanent()); + this(1, 1, new FilterPermanent(), false); } public TargetControlledPermanent(int numTargets) { - this(numTargets, numTargets, new FilterPermanent()); + this(numTargets, numTargets, new FilterPermanent(), false); } - public TargetControlledPermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter) { - super(1, 1, filter, TargetController.YOU); + public TargetControlledPermanent(int minNumTargets, int maxNumTargets, FilterPermanent filter, boolean notTarget) { + super(1, 1, filter, TargetController.YOU, notTarget); this.targetName = filter.getMessage(); } diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlayer.java b/Mage/src/mage/target/common/TargetCreatureOrPlayer.java index 73121303db..32c6330080 100644 --- a/Mage/src/mage/target/common/TargetCreatureOrPlayer.java +++ b/Mage/src/mage/target/common/TargetCreatureOrPlayer.java @@ -78,6 +78,18 @@ public class TargetCreatureOrPlayer extends TargetImpl { return this.filter; } + @Override + public boolean canTarget(UUID id, Game game) { + Permanent permanent = game.getPermanent(id); + if (permanent != null) { + return filter.match(permanent); + } + Player player = game.getPlayer(id); + if (player != null) + return filter.match(player); + return false; + } + @Override public boolean canTarget(UUID id, Ability source, Game game) { Permanent permanent = game.getPermanent(id); @@ -109,7 +121,7 @@ public class TargetCreatureOrPlayer extends TargetImpl { return true; } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), sourceControllerId, game)) { + for (Permanent permanent: game.getBattlefield().getActivePermanents(FilterCreaturePermanent.getDefault(), sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource) && filter.match(permanent)) { count++; if (count >= this.minNumberOfTargets) @@ -129,7 +141,7 @@ public class TargetCreatureOrPlayer extends TargetImpl { possibleTargets.put(player.hashCode(), playerId); } } - for (Permanent permanent: game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), sourceControllerId, game)) { + for (Permanent permanent: game.getBattlefield().getActivePermanents(FilterCreaturePermanent.getDefault(), sourceControllerId, game)) { if (permanent.canBeTargetedBy(targetSource) && filter.match(permanent)) { possibleTargets.put(permanent.getValue().hashCode(), permanent.getId()); } diff --git a/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java b/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java index f688bbf94b..2b5ca0f102 100644 --- a/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java +++ b/Mage/src/mage/target/common/TargetCreatureOrPlayerAmount.java @@ -69,6 +69,18 @@ public class TargetCreatureOrPlayerAmount extends TargetAmount= this.minNumberOfTargets) @@ -120,7 +132,7 @@ public class TargetCreatureOrPlayerAmount extends TargetAmount> extends TargetPermanent> { public TargetCreaturePermanent() { - this(1, 1, new FilterCreaturePermanent(), TargetController.ANY); + this(1, 1, FilterCreaturePermanent.getDefault(), TargetController.ANY, false); } public TargetCreaturePermanent(FilterCreaturePermanent filter) { - this(1, 1, filter, TargetController.ANY); + this(1, 1, filter, TargetController.ANY, false); } public TargetCreaturePermanent(int numTargets, TargetController controller) { - this(numTargets, numTargets, new FilterCreaturePermanent(), controller); + this(numTargets, numTargets, FilterCreaturePermanent.getDefault(), controller, false); } - public TargetCreaturePermanent(int minNumTargets, int maxNumTargets, FilterCreaturePermanent filter, TargetController controller) { - super(1, 1, filter, controller); + public TargetCreaturePermanent(int minNumTargets, int maxNumTargets, FilterCreaturePermanent filter, TargetController controller, boolean notTarget) { + super(1, 1, filter, controller, notTarget); this.targetName = filter.getMessage(); } diff --git a/Mage/src/mage/target/common/TargetDefender.java b/Mage/src/mage/target/common/TargetDefender.java index dcba0a7a6d..f14548ed0e 100644 --- a/Mage/src/mage/target/common/TargetDefender.java +++ b/Mage/src/mage/target/common/TargetDefender.java @@ -137,6 +137,19 @@ public class TargetDefender extends TargetImpl { return sb.toString(); } + @Override + public boolean canTarget(UUID id, Game game) { + Player player = game.getPlayer(id); + if (player != null) { + return filter.match(player); + } + Permanent permanent = game.getPermanent(id); + if (permanent != null) { + return filter.match(permanent); + } + return false; + } + @Override public boolean canTarget(UUID id, Ability source, Game game) { Player player = game.getPlayer(id); diff --git a/Mage/src/mage/target/common/TargetLandPermanent.java b/Mage/src/mage/target/common/TargetLandPermanent.java index 5c01d853d8..8d4a07c019 100644 --- a/Mage/src/mage/target/common/TargetLandPermanent.java +++ b/Mage/src/mage/target/common/TargetLandPermanent.java @@ -39,19 +39,19 @@ import mage.target.TargetPermanent; public class TargetLandPermanent> extends TargetPermanent> { public TargetLandPermanent() { - this(1, 1, new FilterLandPermanent(), TargetController.ANY); + this(1, 1, new FilterLandPermanent(), TargetController.ANY, false); } public TargetLandPermanent(FilterLandPermanent filter) { - this(1, 1, filter, TargetController.ANY); + this(1, 1, filter, TargetController.ANY, false); } public TargetLandPermanent(int numTargets, TargetController controller) { - this(numTargets, numTargets, new FilterLandPermanent(), controller); + this(numTargets, numTargets, new FilterLandPermanent(), controller, false); } - public TargetLandPermanent(int minNumTargets, int maxNumTargets, FilterLandPermanent filter, TargetController controller) { - super(1, 1, filter, controller); + public TargetLandPermanent(int minNumTargets, int maxNumTargets, FilterLandPermanent filter, TargetController controller, boolean notTarget) { + super(1, 1, filter, controller, notTarget); this.targetName = filter.getMessage(); } diff --git a/Mage/src/mage/target/common/TargetNonlandPermanent.java b/Mage/src/mage/target/common/TargetNonlandPermanent.java index 6d419afae4..47a8da6958 100644 --- a/Mage/src/mage/target/common/TargetNonlandPermanent.java +++ b/Mage/src/mage/target/common/TargetNonlandPermanent.java @@ -39,15 +39,15 @@ import mage.target.TargetPermanent; public class TargetNonlandPermanent extends TargetPermanent { public TargetNonlandPermanent() { - this(1, 1, TargetController.ANY); + this(1, 1, TargetController.ANY, false); } public TargetNonlandPermanent(int numTargets, TargetController controller) { - this(numTargets, numTargets, controller); + this(numTargets, numTargets, controller, false); } - public TargetNonlandPermanent(int minNumTargets, int maxNumTargets, TargetController controller) { - super(1, 1, new FilterNonlandPermanent(), controller); + public TargetNonlandPermanent(int minNumTargets, int maxNumTargets, TargetController controller, boolean notTarget) { + super(1, 1, new FilterNonlandPermanent(), controller, notTarget); this.targetName = filter.getMessage(); }