From b62dadf95d45444ffcefb067debd23e792c273cb Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 25 Aug 2015 22:38:45 +0200 Subject: [PATCH 01/17] * Fixed that conditional mana (e.g. River of Tears) did not trigger mana adding effects like Vorinclex, Voice of Hunger. --- .../src/mage/sets/judgment/MirarisWake.java | 4 +- .../newphyrexia/VorinclexVoiceOfHunger.java | 2 + .../mana/VorinclexVoiceOfHungerTest.java | 65 +++++++++++++++++++ .../decorator/ConditionalManaEffect.java | 57 +++++++++++++--- .../abilities/mana/TriggeredManaAbility.java | 13 ++-- 5 files changed, 124 insertions(+), 17 deletions(-) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.java diff --git a/Mage.Sets/src/mage/sets/judgment/MirarisWake.java b/Mage.Sets/src/mage/sets/judgment/MirarisWake.java index c59f9b7f1bf..f040d301d57 100644 --- a/Mage.Sets/src/mage/sets/judgment/MirarisWake.java +++ b/Mage.Sets/src/mage/sets/judgment/MirarisWake.java @@ -50,9 +50,9 @@ public class MirarisWake extends CardImpl { super(ownerId, 139, "Mirari's Wake", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{W}"); this.expansionSetCode = "JUD"; - // Creatures you control get +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1,1,Duration.WhileOnBattlefield))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield))); + // Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced. AddManaOfAnyTypeProducedEffect effect = new AddManaOfAnyTypeProducedEffect(); effect.setText("add one mana to your mana pool of any type that land produced"); diff --git a/Mage.Sets/src/mage/sets/newphyrexia/VorinclexVoiceOfHunger.java b/Mage.Sets/src/mage/sets/newphyrexia/VorinclexVoiceOfHunger.java index 00d838eea5e..90f4773e0d9 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/VorinclexVoiceOfHunger.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/VorinclexVoiceOfHunger.java @@ -62,7 +62,9 @@ public class VorinclexVoiceOfHunger extends CardImpl { this.power = new MageInt(7); this.toughness = new MageInt(6); + // Trample this.addAbility(TrampleAbility.getInstance()); + // Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced. ManaEffect effect = new AddManaOfAnyTypeProducedEffect(); effect.setText("add one mana to your mana pool of any type that land produced"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.java new file mode 100644 index 00000000000..abc87ae69d3 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.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 org.mage.test.cards.mana; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class VorinclexVoiceOfHungerTest extends CardTestPlayerBase { + + /** + * Vorinclex, Voice of Hunger is not mana doubling River of Tears. + */ + @Test + public void testRiverOfTears() { + // Trample + // Whenever you tap a land for mana, add one mana to your mana pool of any type that land produced. + // Whenever an opponent taps a land for mana, that land doesn't untap during its controller's next untap step. + addCard(Zone.BATTLEFIELD, playerA, "Vorinclex, Voice of Hunger", 1); + // {T}: Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead. + addCard(Zone.BATTLEFIELD, playerA, "River of Tears", 1); + addCard(Zone.HAND, playerA, "Vedalken Mastermind", 1); + + // because available mana calculation does not work correctly with Vorinclex, Voice of Hunger we have to tap the land manually + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {U} to your mana pool"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Vedalken Mastermind"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Vedalken Mastermind", 1); + + } + +} diff --git a/Mage/src/mage/abilities/decorator/ConditionalManaEffect.java b/Mage/src/mage/abilities/decorator/ConditionalManaEffect.java index 4ec4d37870e..77eaf343e2e 100644 --- a/Mage/src/mage/abilities/decorator/ConditionalManaEffect.java +++ b/Mage/src/mage/abilities/decorator/ConditionalManaEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.decorator; import mage.Mana; @@ -33,14 +32,14 @@ import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.abilities.effects.common.BasicManaEffect; import mage.abilities.effects.common.ManaEffect; +import mage.choices.ChoiceColor; import mage.game.Game; +import mage.players.Player; /** * * @author LevelX2 */ - - public class ConditionalManaEffect extends ManaEffect { private BasicManaEffect effect; @@ -70,14 +69,46 @@ public class ConditionalManaEffect extends ManaEffect { @Override public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } if (condition.apply(game, source)) { effect.setTargetPointer(this.targetPointer); - return effect.apply(game, source); } else if (otherwiseEffect != null) { otherwiseEffect.setTargetPointer(this.targetPointer); - return otherwiseEffect.apply(game, source); } - return false; + Mana mana = getMana(game, source); + + if (mana != null && mana.getAny() > 0) { + int amount = mana.getAny(); + + ChoiceColor choice = new ChoiceColor(true); + Mana createdMana = null; + if (controller.choose(outcome, choice, game)) { + if (choice.getColor() == null) { + return false; // it happens, don't know how + } + + if (choice.getColor().isBlack()) { + createdMana = Mana.BlackMana(amount); + } else if (choice.getColor().isBlue()) { + createdMana = Mana.BlueMana(amount); + } else if (choice.getColor().isRed()) { + createdMana = Mana.RedMana(amount); + } else if (choice.getColor().isGreen()) { + createdMana = Mana.GreenMana(amount); + } else if (choice.getColor().isWhite()) { + createdMana = Mana.WhiteMana(amount); + } + } + mana = createdMana; + } + + if (mana != null) { + controller.getManaPool().addMana(mana, game, source); + } + return true; } @Override @@ -85,12 +116,18 @@ public class ConditionalManaEffect extends ManaEffect { return new ConditionalManaEffect(this); } - public Mana getMana(Game game, Ability source) { + @Override + public Mana getMana(Game game, Ability source + ) { + Mana mana = null; if (condition.apply(game, source)) { - return effect.getMana(); + mana = effect.getMana(); } else if (otherwiseEffect != null) { - return otherwiseEffect.getMana(); + mana = otherwiseEffect.getMana(); } - return null; + if (mana != null) { + checkToFirePossibleEvents(mana, game, source); + } + return mana; } } diff --git a/Mage/src/mage/abilities/mana/TriggeredManaAbility.java b/Mage/src/mage/abilities/mana/TriggeredManaAbility.java index 4a2c997d83a..f6f319a5ab3 100644 --- a/Mage/src/mage/abilities/mana/TriggeredManaAbility.java +++ b/Mage/src/mage/abilities/mana/TriggeredManaAbility.java @@ -1,16 +1,16 @@ /* * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR @@ -20,7 +20,7 @@ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. @@ -29,10 +29,12 @@ package mage.abilities.mana; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.ManaEffect; +import mage.constants.AbilityType; import mage.constants.Zone; /** * see 20110715 - 605.1b + * * @author BetaSteward_at_googlemail.com */ public abstract class TriggeredManaAbility extends TriggeredAbilityImpl { @@ -44,6 +46,7 @@ public abstract class TriggeredManaAbility extends TriggeredAbilityImpl { public TriggeredManaAbility(Zone zone, ManaEffect effect, boolean optional) { super(zone, effect, optional); this.usesStack = false; + this.abilityType = AbilityType.MANA; } public TriggeredManaAbility(final TriggeredManaAbility ability) { From 78071ce0a3e4d58979e600109fbb18ed0763b297 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 25 Aug 2015 23:34:15 +0200 Subject: [PATCH 02/17] * Fixed a bug that order of triggered abilities of tokens were not shown to human player and the UI was locked (fixes #910). --- Mage.Common/src/mage/view/CardsView.java | 3 + .../java/mage/server/game/GameController.java | 3 +- .../mage/sets/tenthedition/VenerableMonk.java | 6 +- .../mage/sets/zendikar/RiteOfReplication.java | 9 ++- .../cards/replacement/DoublingSeasonTest.java | 61 ++++++++++++++++--- 5 files changed, 65 insertions(+), 17 deletions(-) diff --git a/Mage.Common/src/mage/view/CardsView.java b/Mage.Common/src/mage/view/CardsView.java index 4a7ee78da5b..606918a3eec 100644 --- a/Mage.Common/src/mage/view/CardsView.java +++ b/Mage.Common/src/mage/view/CardsView.java @@ -89,6 +89,9 @@ public class CardsView extends LinkedHashMap { case EXILED: case GRAVEYARD: sourceObject = game.getCard(ability.getSourceId()); + if (sourceObject == null) { + sourceObject = game.getPermanent(ability.getSourceId()); + } isCard = true; break; case BATTLEFIELD: diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index 07ed9e64e96..5242a019614 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -846,7 +846,8 @@ public class GameController implements GameCallback { perform(playerId, new Command() { @Override public void execute(UUID playerId) { - getGameSession(playerId).target(question, new CardsView(abilities, game), null, required, options); + CardsView cardsView = new CardsView(abilities, game); + getGameSession(playerId).target(question, cardsView, null, required, options); } }); } diff --git a/Mage.Sets/src/mage/sets/tenthedition/VenerableMonk.java b/Mage.Sets/src/mage/sets/tenthedition/VenerableMonk.java index 5b46688a5c9..34c88254698 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/VenerableMonk.java +++ b/Mage.Sets/src/mage/sets/tenthedition/VenerableMonk.java @@ -28,12 +28,12 @@ package mage.sets.tenthedition; 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.GainLifeEffect; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; /** * @@ -50,6 +50,8 @@ public class VenerableMonk extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); + + // When Venerable Monk enters the battlefield, you gain 2 life. this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2))); } diff --git a/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java b/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java index 328c65228a8..fd51ca2ee7a 100644 --- a/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java +++ b/Mage.Sets/src/mage/sets/zendikar/RiteOfReplication.java @@ -28,16 +28,16 @@ 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.condition.common.KickedCondition; import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.game.Game; import mage.game.permanent.Permanent; import mage.game.permanent.token.EmptyToken; @@ -54,7 +54,6 @@ public class RiteOfReplication extends CardImpl { super(ownerId, 61, "Rite of Replication", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); this.expansionSetCode = "ZEN"; - // Kicker {5} this.addAbility(new KickerAbility("{5}")); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java index e1cb48a3b5a..677561abbcb 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java @@ -7,17 +7,19 @@ import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; /** - * Doubling Season: - * If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead. - * If an effect would place one or more counters on a permanent you control, it places twice that many of those counters on that permanent instead. + * Doubling Season: If an effect would put one or more tokens onto the + * battlefield under your control, it puts twice that many of those tokens onto + * the battlefield instead. If an effect would place one or more counters on a + * permanent you control, it places twice that many of those counters on that + * permanent instead. * * @author LevelX2 */ public class DoublingSeasonTest extends CardTestPlayerBase { /** - * Tests that instead of one spore counter there were two spore counters added to Pallid Mycoderm - * if Doubling Season is on the battlefield. + * Tests that instead of one spore counter there were two spore counters + * added to Pallid Mycoderm if Doubling Season is on the battlefield. */ @Test public void testDoubleSporeCounter() { @@ -35,8 +37,9 @@ public class DoublingSeasonTest extends CardTestPlayerBase { } /** - * Tests if 3 damage are prevented with Test of Faith and Doubling Season is on - * the battlefield, that 6 +1/+1 counters are added to the target creature. + * Tests if 3 damage are prevented with Test of Faith and Doubling Season is + * on the battlefield, that 6 +1/+1 counters are added to the target + * creature. */ @Test public void testDoubleP1P1Counter() { @@ -63,9 +66,10 @@ public class DoublingSeasonTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Silvercoat Lion", 8, 8); } + /** - * Tests that 2 Saproling tokens are created instead of one if Doubling Season is on - * the battlefield. + * Tests that 2 Saproling tokens are created instead of one if Doubling + * Season is on the battlefield. */ @Test public void testDoubleTokens() { @@ -89,4 +93,43 @@ public class DoublingSeasonTest extends CardTestPlayerBase { } + /** + * Creatures with enter the battlefield triggers are causing a bug when + * multiple copies are made simultaneously (ie via Doubling Season + + * Kiki-Jiki, Mirror Breaker or Rite of Replication). After the tokens have + * entered the battlefield it asks their controller to choose the order that + * the triggered abilities on the stack but no window opens to select the + * triggers leaving no option to move the game forward (besides rollback and + * just not making the tokens). Several attempts with the different + * combinations make it *seem to be a general bug about duplicates entering + * at the same time and not related to the specific cards. + */ + @Test + public void testDoubleRiteOfReplication() { + /** + * If an effect would put one or more tokens onto the battlefield under + * your control, it puts twice that many of those tokens onto the + * battlefield instead. If an effect would place one or more counters on + * a permanent you control, it places twice that many of those counters + * on that permanent instead. + */ + + addCard(Zone.BATTLEFIELD, playerA, "Doubling Season"); + addCard(Zone.BATTLEFIELD, playerA, "Island", 9); + + // Put a token that's a copy of target creature onto the battlefield. If Rite of Replication was kicked, put five of those tokens onto the battlefield instead. + addCard(Zone.HAND, playerA, "Rite of Replication"); + // When Venerable Monk enters the battlefield, you gain 2 life. + addCard(Zone.BATTLEFIELD, playerB, "Venerable Monk", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rite of Replication", "Venerable Monk"); + setChoice(playerA, "Yes"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 40); + assertPermanentCount(playerA, "Venerable Monk", 10); + + } } From cc9384089784169305fc30c54b213bc1e71a5c79 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 26 Aug 2015 00:22:05 +0200 Subject: [PATCH 03/17] * Fixed some cards where effects for put into play tokens were not applied to all tokens if multiple tokens (e.g. caused by Doubling Season) were put into play. --- .../bornofthegods/FelhideSpiritbinder.java | 21 ++++----- .../TatsumasaTheDragonsFang.java | 34 +++++++++------ .../src/mage/sets/darkascension/Seance.java | 24 ++++++----- .../sets/dragonsoftarkir/MirrorMockery.java | 19 +++++--- .../sets/fatereforged/FlamerushRider.java | 11 +++-- .../src/mage/sets/fifthdawn/HelmOfKaldra.java | 43 +++++++++---------- .../magicorigins/FlameshadowConjuring.java | 29 +++++++------ .../saviorsofkamigawa/FeralLightning.java | 19 ++++---- .../mage/sets/scarsofmirrodin/MimicVat.java | 19 +++++--- ...tTokenOntoBattlefieldCopyTargetEffect.java | 43 +++++++++++-------- 10 files changed, 150 insertions(+), 112 deletions(-) diff --git a/Mage.Sets/src/mage/sets/bornofthegods/FelhideSpiritbinder.java b/Mage.Sets/src/mage/sets/bornofthegods/FelhideSpiritbinder.java index 31d52cf2d2f..7d31be41b06 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/FelhideSpiritbinder.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/FelhideSpiritbinder.java @@ -71,7 +71,7 @@ public class FelhideSpiritbinder extends CardImpl { this.toughness = new MageInt(4); // Inspired - Whenever Felhide Spiritbinder becomes untapped, you may pay {1}{R}. If you do, put a token onto the battlefield that's a copy of another target creature except it's an enchantment in addition to its other types. It gains haste. Exile it at the beginning of the next end step. - Ability ability = new InspiredAbility(new DoIfCostPaid(new FelhideSpiritbinderEffect(), new ManaCostsImpl("{1}{R}"),"Use effect of {source}?")); + Ability ability = new InspiredAbility(new DoIfCostPaid(new FelhideSpiritbinderEffect(), new ManaCostsImpl("{1}{R}"), "Use effect of {source}?")); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } @@ -108,15 +108,16 @@ class FelhideSpiritbinderEffect extends OneShotEffect { if (permanent != null) { PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, CardType.ENCHANTMENT, true); effect.setTargetPointer(getTargetPointer()); - if (effect.apply(game, source) && effect.getAddedPermanent() != null) { - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(effect.getAddedPermanent().getId())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - + if (effect.apply(game, source)) { + for (Permanent tokenPermanent : effect.getAddedPermanent()) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } return true; } } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/TatsumasaTheDragonsFang.java b/Mage.Sets/src/mage/sets/championsofkamigawa/TatsumasaTheDragonsFang.java index a9e7ff37dbf..1cd6c9b8a55 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/TatsumasaTheDragonsFang.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/TatsumasaTheDragonsFang.java @@ -35,9 +35,10 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.ExileSourceCost; import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlSourceEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect; import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.FlyingAbility; @@ -51,6 +52,7 @@ 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.game.permanent.token.Token; import mage.target.targetpointer.FixedTarget; @@ -73,7 +75,7 @@ public class TatsumasaTheDragonsFang extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TatsumaTheDragonsFangEffect(), new GenericManaCost(6)); ability.addCost(new ExileSourceCost(true)); this.addAbility(ability); - + // Equip {3} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); } @@ -106,14 +108,21 @@ class TatsumaTheDragonsFangEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - CreateTokenEffect effect = new CreateTokenEffect(new TatsumaDragonToken()); + CreateTokenEffect effect = new CreateTokenEffect(new TatsumaDragonToken()); effect.apply(game, source); - FixedTarget fixedTarget = new FixedTarget(effect.getLastAddedTokenId()); - DelayedTriggeredAbility delayedAbility = new TatsumaTheDragonsFangTriggeredAbility(fixedTarget); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : effect.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + FixedTarget fixedTarget = new FixedTarget(tokenPermanent, game); + Effect returnEffect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(); + returnEffect.setTargetPointer(new FixedTarget(source.getSourceId(), game.getState().getZoneChangeCounter(source.getSourceId()))); + DelayedTriggeredAbility delayedAbility = new TatsumaTheDragonsFangTriggeredAbility(fixedTarget, returnEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + } return true; } @@ -123,8 +132,8 @@ class TatsumaTheDragonsFangTriggeredAbility extends DelayedTriggeredAbility { protected FixedTarget fixedTarget; - public TatsumaTheDragonsFangTriggeredAbility(FixedTarget fixedTarget) { - super(new ReturnToBattlefieldUnderYourControlSourceEffect(), Duration.OneUse); + public TatsumaTheDragonsFangTriggeredAbility(FixedTarget fixedTarget, Effect effect) { + super(effect, Duration.OneUse); this.fixedTarget = fixedTarget; } @@ -155,11 +164,12 @@ class TatsumaTheDragonsFangTriggeredAbility extends DelayedTriggeredAbility { @Override public String getRule() { - return "Return {this} to the battlefield under its owner's control when that token dies." ; + return "Return {this} to the battlefield under its owner's control when that token dies."; } } class TatsumaDragonToken extends Token { + public TatsumaDragonToken() { super("Dragon Spirit", "5/5 blue Dragon Spirit creature token with flying"); cardType.add(CardType.CREATURE); diff --git a/Mage.Sets/src/mage/sets/darkascension/Seance.java b/Mage.Sets/src/mage/sets/darkascension/Seance.java index 944b43994f8..61a81d26e38 100644 --- a/Mage.Sets/src/mage/sets/darkascension/Seance.java +++ b/Mage.Sets/src/mage/sets/darkascension/Seance.java @@ -43,6 +43,7 @@ import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.EmptyToken; import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; @@ -59,7 +60,6 @@ public class Seance extends CardImpl { super(ownerId, 20, "Seance", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); this.expansionSetCode = "DKA"; - // At the beginning of each upkeep, you may exile target creature card from your graveyard. If you do, put a token onto the battlefield that's a copy of that card except it's a Spirit in addition to its other types. Exile it at the beginning of the next end step. Ability ability = new BeginningOfUpkeepTriggeredAbility(new SeanceEffect(), TargetController.ANY, true); ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard())); @@ -103,16 +103,20 @@ class SeanceEffect extends OneShotEffect { if (!token.hasSubtype("Spirit")) { token.getSubtype().add("Spirit"); - } + } token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + } } return true; diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/MirrorMockery.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/MirrorMockery.java index ef10e70c1de..5eb71f49bdf 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/MirrorMockery.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/MirrorMockery.java @@ -110,13 +110,18 @@ class MirrorMockeryEffect extends OneShotEffect { token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheEndOfCombatDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java b/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java index 6775848ca06..721d26b3dd4 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java +++ b/Mage.Sets/src/mage/sets/fatereforged/FlamerushRider.java @@ -116,9 +116,14 @@ class FlamerushRiderEffect extends OneShotEffect { EmptyToken token = new EmptyToken(); CardUtil.copyTo(token).from(permanent); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId(), true, true); - Effect effect = new ExileTargetEffect(); - effect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect), false).apply(game, source); + for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + Effect effect = new ExileTargetEffect(); + effect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(effect), false).apply(game, source); + } + } return true; } return false; diff --git a/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.java b/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.java index 754ae29be75..40ae18645a0 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/HelmOfKaldra.java @@ -117,10 +117,7 @@ class HelmOfKaldraCondition implements Condition { if (game.getBattlefield().count(HelmOfKaldra.filterShield, source.getSourceId(), source.getControllerId(), game) < 1) { return false; } - if (game.getBattlefield().count(HelmOfKaldra.filterShield, source.getSourceId(), source.getControllerId(), game) < 1) { - return false; - } - return true; + return game.getBattlefield().count(HelmOfKaldra.filterShield, source.getSourceId(), source.getControllerId(), game) >= 1; } } @@ -146,25 +143,27 @@ class HelmOfKaldraEffect extends OneShotEffect { if (new HelmOfKaldraCondition().apply(game, source)) { CreateTokenEffect effect = new CreateTokenEffect(new KaldraToken()); effect.apply(game, source); - UUID kaldraId = effect.getLastAddedTokenId(); - Permanent kaldra = game.getPermanent(kaldraId); - if (kaldra != null) { - // Attach helm to the token - for (Permanent kaldrasHelm : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterHelm, source.getControllerId(), game)) { - kaldra.addAttachment(kaldrasHelm.getId(), game); - break; - } - // Attach shield to the token - for (Permanent kaldrasShield : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterShield, source.getControllerId(), game)) { - kaldra.addAttachment(kaldrasShield.getId(), game); - break; - } - // Attach sword to the token - for (Permanent kaldrasSword : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterSword, source.getControllerId(), game)) { - kaldra.addAttachment(kaldrasSword.getId(), game); - break; - } + for (UUID tokenId : effect.getLastAddedTokenIds()) { + Permanent kaldra = game.getPermanent(tokenId); + if (kaldra != null) { + // Attach helm to the token + for (Permanent kaldrasHelm : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterHelm, source.getControllerId(), game)) { + kaldra.addAttachment(kaldrasHelm.getId(), game); + break; + } + // Attach shield to the token + for (Permanent kaldrasShield : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterShield, source.getControllerId(), game)) { + kaldra.addAttachment(kaldrasShield.getId(), game); + break; + } + // Attach sword to the token + for (Permanent kaldrasSword : game.getBattlefield().getAllActivePermanents(HelmOfKaldra.filterSword, source.getControllerId(), game)) { + kaldra.addAttachment(kaldrasSword.getId(), game); + break; + } + } + return true; } } return false; diff --git a/Mage.Sets/src/mage/sets/magicorigins/FlameshadowConjuring.java b/Mage.Sets/src/mage/sets/magicorigins/FlameshadowConjuring.java index 6e3492eb4ef..d8fa46e9902 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/FlameshadowConjuring.java +++ b/Mage.Sets/src/mage/sets/magicorigins/FlameshadowConjuring.java @@ -54,9 +54,9 @@ import mage.target.targetpointer.FixedTarget; * @author fireshoes */ public class FlameshadowConjuring extends CardImpl { - + private static final FilterControlledCreaturePermanent filterNontoken = new FilterControlledCreaturePermanent("nontoken creature"); - + static { filterNontoken.add(Predicates.not(new TokenPredicate())); } @@ -66,8 +66,8 @@ public class FlameshadowConjuring extends CardImpl { this.expansionSetCode = "ORI"; // Whenever a nontoken creature enters the battlefield under your control, you may pay {R}. If you do, put a token onto the battlefield that's a copy of that creature. That token gains haste. Exile it at the beginning of the next end step. - Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new FlameshadowConjuringEffect(), filterNontoken, false, SetTargetPointer.PERMANENT, - "Whenever a nontoken creature enters the battlefield under your control, you may pay {R}. If you do, put a token onto the battlefield that's a copy of that creature. That token gains haste. Exile it at the beginning of the next end step"); + Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new FlameshadowConjuringEffect(), filterNontoken, false, SetTargetPointer.PERMANENT, + "Whenever a nontoken creature enters the battlefield under your control, you may pay {R}. If you do, put a token onto the battlefield that's a copy of that creature. That token gains haste. Exile it at the beginning of the next end step"); ability.addCost(new ManaCostsImpl("{R}")); this.addAbility(ability); } @@ -104,19 +104,20 @@ class FlameshadowConjuringEffect extends OneShotEffect { if (permanent != null) { PutTokenOntoBattlefieldCopyTargetEffect effect = new PutTokenOntoBattlefieldCopyTargetEffect(null, null, true); effect.setTargetPointer(getTargetPointer()); - if (effect.apply(game, source) && effect.getAddedPermanent() != null) { - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(effect.getAddedPermanent().getId())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); - + if (effect.apply(game, source)) { + for (Permanent tokenPermanent : effect.getAddedPermanent()) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } return true; } } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/FeralLightning.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/FeralLightning.java index ea95bd89163..36af9e621c8 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/FeralLightning.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/FeralLightning.java @@ -42,6 +42,7 @@ import mage.constants.Outcome; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; +import mage.game.permanent.Permanent; import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.targetpointer.FixedTarget; @@ -56,7 +57,6 @@ public class FeralLightning extends CardImpl { super(ownerId, 97, "Feral Lightning", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}{R}{R}"); this.expansionSetCode = "SOK"; - // Put three 3/1 red Elemental creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step. this.getSpellAbility().addEffect(new FeralLightningEffect()); @@ -95,13 +95,16 @@ class FeralLightningEffect extends OneShotEffect { CreateTokenEffect effect = new CreateTokenEffect(new FeralLightningElementalToken(), 3); effect.apply(game, source); for (UUID tokenId : effect.getLastAddedTokenIds()) { - ExileTargetEffect exileEffect = new ExileTargetEffect(null,"",Zone.BATTLEFIELD); - exileEffect.setTargetPointer(new FixedTarget(tokenId)); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(null, "", Zone.BATTLEFIELD); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } } return true; } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/MimicVat.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/MimicVat.java index 2a24c0196ea..33664325db6 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/MimicVat.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/MimicVat.java @@ -210,13 +210,18 @@ class MimicVatCreateTokenEffect extends OneShotEffect { token.addAbility(HasteAbility.getInstance()); token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); - ExileTargetEffect exileEffect = new ExileTargetEffect(); - exileEffect.setTargetPointer(new FixedTarget(token.getLastAddedToken())); - DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); - delayedAbility.setSourceId(source.getSourceId()); - delayedAbility.setControllerId(source.getControllerId()); - delayedAbility.setSourceObject(source.getSourceObject(game), game); - game.addDelayedTriggeredAbility(delayedAbility); + for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + ExileTargetEffect exileEffect = new ExileTargetEffect(); + exileEffect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + DelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(exileEffect); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + } + } return true; } diff --git a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java index 43fd5f71205..7bb195b8266 100644 --- a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java @@ -27,6 +27,8 @@ */ package mage.abilities.effects.common; +import java.util.ArrayList; +import java.util.List; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; @@ -57,13 +59,13 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { private final UUID playerId; private final CardType additionalCardType; private boolean gainsHaste; - private Permanent addedTokenPermanent; + private List addedTokenPermanents; public PutTokenOntoBattlefieldCopyTargetEffect() { super(Outcome.PutCreatureInPlay); this.playerId = null; this.additionalCardType = null; - this.addedTokenPermanent = null; + this.addedTokenPermanents = new ArrayList<>(); } public PutTokenOntoBattlefieldCopyTargetEffect(UUID playerId) { @@ -75,7 +77,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.playerId = playerId; this.additionalCardType = additionalCardType; this.gainsHaste = gainsHaste; - this.addedTokenPermanent = null; + this.addedTokenPermanents = new ArrayList<>(); } public PutTokenOntoBattlefieldCopyTargetEffect(final PutTokenOntoBattlefieldCopyTargetEffect effect) { @@ -83,7 +85,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.playerId = effect.playerId; this.additionalCardType = effect.additionalCardType; this.gainsHaste = effect.gainsHaste; - this.addedTokenPermanent = effect.addedTokenPermanent; + this.addedTokenPermanents.addAll(effect.addedTokenPermanents); } @Override @@ -118,21 +120,24 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { token.addAbility(HasteAbility.getInstance()); } token.putOntoBattlefield(1, game, source.getSourceId(), playerId == null ? source.getControllerId() : playerId); - addedTokenPermanent = game.getPermanent(token.getLastAddedToken()); - if (addedTokenPermanent != null) { - game.copyPermanent(copyFromPermanent, addedTokenPermanent, source, applier); - if (additionalCardType != null) { - ContinuousEffect effect = new AddCardTypeTargetEffect(additionalCardType, Duration.Custom); - effect.setTargetPointer(new FixedTarget(addedTokenPermanent.getId())); - game.addEffect(effect, source); + for (UUID tokenId : token.getLastAddedTokenIds()) { // by cards like Doubling Season multiple tokens can be added to the battlefield + Permanent tokenPermanent = game.getPermanent(tokenId); + if (tokenPermanent != null) { + addedTokenPermanents.add(tokenPermanent); + game.copyPermanent(copyFromPermanent, tokenPermanent, source, applier); + if (additionalCardType != null) { + ContinuousEffect effect = new AddCardTypeTargetEffect(additionalCardType, Duration.Custom); + effect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addEffect(effect, source); + } + if (gainsHaste) { + ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); + effect.setTargetPointer(new FixedTarget(tokenPermanent, game)); + game.addEffect(effect, source); + } } - if (gainsHaste) { - ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); - effect.setTargetPointer(new FixedTarget(addedTokenPermanent.getId())); - game.addEffect(effect, source); - } - return true; } + return true; } return false; } @@ -153,7 +158,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { } - public Permanent getAddedPermanent() { - return addedTokenPermanent; + public List getAddedPermanent() { + return addedTokenPermanents; } } From 1f24f68a117f4a3ff5ba630f7f77c04b0e60ffca Mon Sep 17 00:00:00 2001 From: fireshoes Date: Tue, 25 Aug 2015 21:59:14 -0500 Subject: [PATCH 04/17] Fixed spelling of CanAttackAsThoughItDidntHaveDefender. Added M2M2 and P1P0 counter types. Added "HintText" to other landwalks in addtion to swampwalk. Added 40 cards. --- .../src/mage/sets/alliances/Burnout.java | 107 ++++++++ .../mage/sets/alliances/CarrierPigeons1.java | 71 +++++ .../mage/sets/alliances/CarrierPigeons2.java | 52 ++++ .../mage/sets/alliances/EnslavedScout1.java | 70 +++++ .../mage/sets/alliances/EnslavedScout2.java | 52 ++++ .../mage/sets/alliances/FeveredStrength1.java | 68 +++++ .../mage/sets/alliances/FeveredStrength2.java | 52 ++++ .../mage/sets/antiquities/GateToPhyrexia.java | 101 +++++++ .../mage/sets/bornofthegods/PillarOfWar.java | 156 +++++------ .../sets/conspiracy/WakestoneGargoyle.java | 160 +++++------ .../dragonsoftarkir/AssaultFormation.java | 254 +++++++++--------- .../sets/dragonsoftarkir/GladeWatcher.java | 157 ++++++----- .../mage/sets/fallenempires/EbonPraetor.java | 52 ++++ .../mage/sets/fallenempires/FungalBloom.java | 76 ++++++ .../mage/sets/fallenempires/RiverMerfolk.java | 54 ++++ .../mage/sets/fallenempires/SporeFlower.java | 75 ++++++ .../sets/fallenempires/TheloniteDruid.java | 54 ++++ .../sets/fallenempires/TheloniteMonk.java | 84 ++++++ .../src/mage/sets/fifthedition/DarkMaze.java | 79 ++++++ .../src/mage/sets/homelands/AysenHighway.java | 72 +++++ .../src/mage/sets/homelands/DarkMaze1.java | 52 ++++ .../src/mage/sets/homelands/DarkMaze2.java | 52 ++++ .../src/mage/sets/homelands/DwarvenPony.java | 82 ++++++ .../mage/sets/homelands/VeldraneOfSengir.java | 73 +++++ .../src/mage/sets/iceage/Clairvoyance.java | 102 +++++++ Mage.Sets/src/mage/sets/iceage/ForceVoid.java | 69 +++++ .../src/mage/sets/iceage/LightningBlow.java | 69 +++++ Mage.Sets/src/mage/sets/iceage/Pyknite.java | 67 +++++ .../src/mage/sets/iceage/RayOfErasure.java | 68 +++++ .../src/mage/sets/iceage/Thermokarst.java | 54 ++++ .../src/mage/sets/iceage/WalkingWall.java | 52 ++++ .../mage/sets/invasion/PrisonBarricade.java | 4 +- .../src/mage/sets/judgment/ErhnamDjinn.java | 172 ++++++------ .../src/mage/sets/judgment/MirrorWall.java | 72 +++++ .../src/mage/sets/legends/PartWater.java | 79 ++++++ .../mage/sets/limitedalpha/AnimateWall.java | 4 +- .../mage/sets/lorwyn/StreambedAquitects.java | 184 ++++++------- .../sets/mastersedition/RiverMerfolk.java | 69 +++++ .../mage/sets/mastersedition/WalkingWall.java | 74 +++++ .../mage/sets/masterseditionii/Burnout.java | 52 ++++ .../sets/masterseditionii/EbonPraetor.java | 156 +++++++++++ .../sets/masterseditionii/FungalBloom.java | 52 ++++ .../sets/masterseditionii/SporeFlower.java | 52 ++++ .../sets/masterseditionii/TheloniteDruid.java | 95 +++++++ .../sets/masterseditionii/Thermokarst.java | 99 +++++++ .../masterseditioniii/FeveredStrength.java | 52 ++++ .../sets/masterseditioniii/LightningBlow.java | 54 ++++ .../sets/masterseditioniv/GateToPhyrexia.java | 52 ++++ .../mage/sets/mercadianmasques/CaveSense.java | 78 ++++++ .../sets/mercadianmasques/CavernCrawler.java | 70 +++++ .../mercadianmasques/HauntedCrossroads.java | 66 +++++ .../sets/mercadianmasques/TigerClaws.java | 82 ++++++ .../mage/sets/mercadianmasques/VineDryad.java | 81 ++++++ .../src/mage/sets/mirage/BenthicDjinn.java | 68 +++++ .../src/mage/sets/mirage/DirtwaterWraith.java | 70 +++++ .../src/mage/sets/mirage/GoblinScouts.java | 76 ++++++ .../src/mage/sets/mirage/UnseenWalker.java | 4 +- .../sets/mirrodinbesieged/SpireSerpent.java | 4 +- .../sets/morningtide/MerrowWitsniper.java | 68 +++++ .../src/mage/sets/portal/IngeniousThief.java | 105 ++++++++ .../src/mage/sets/portal/NaturesCloak.java | 52 ++++ .../src/mage/sets/ravnica/IvyDancer.java | 149 +++++----- .../sets/seventhedition/WallOfWonder.java | 4 +- .../mage/sets/shadowmoor/TattermungeDuo.java | 165 ++++++------ .../mage/sets/starter1999/IngeniousThief.java | 54 ++++ .../mage/sets/starter1999/NaturesCloak.java | 70 +++++ .../mage/sets/stronghold/RollingStones.java | 4 +- .../src/mage/sets/thedark/HiddenPath.java | 72 +++++ .../src/mage/sets/thedark/ScarwoodHag.java | 83 ++++++ .../mage/sets/thedark/WormwoodTreefolk.java | 10 +- .../src/mage/sets/theros/ColossusOfAkros.java | 182 ++++++------- .../src/mage/sets/theros/ReturnedPhalanx.java | 142 +++++----- .../mage/sets/timespiral/WormwoodDryad.java | 10 +- .../mage/sets/torment/SlitheryStalker.java | 96 +++++++ .../mage/sets/urzaslegacy/WeatherseedElf.java | 10 +- .../src/mage/sets/visions/FeralInstinct.java | 68 +++++ .../src/mage/sets/visions/Solfatara.java | 113 ++++++++ ...AsThoughItDidntHaveDefenderAllEffect.java} | 12 +- ...houghItDidntHaveDefenderSourceEffect.java} | 138 +++++----- ...houghItDidntHaveDefenderTargetEffect.java} | 168 ++++++------ .../abilities/keyword/ForestwalkAbility.java | 6 +- .../abilities/keyword/IslandwalkAbility.java | 6 +- .../keyword/MountainwalkAbility.java | 6 +- .../abilities/keyword/PlainswalkAbility.java | 8 +- Mage/src/mage/counters/CounterType.java | 6 + 85 files changed, 5264 insertions(+), 1050 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/alliances/Burnout.java create mode 100644 Mage.Sets/src/mage/sets/alliances/CarrierPigeons1.java create mode 100644 Mage.Sets/src/mage/sets/alliances/CarrierPigeons2.java create mode 100644 Mage.Sets/src/mage/sets/alliances/EnslavedScout1.java create mode 100644 Mage.Sets/src/mage/sets/alliances/EnslavedScout2.java create mode 100644 Mage.Sets/src/mage/sets/alliances/FeveredStrength1.java create mode 100644 Mage.Sets/src/mage/sets/alliances/FeveredStrength2.java create mode 100644 Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/EbonPraetor.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/FungalBloom.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/RiverMerfolk.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/SporeFlower.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/TheloniteDruid.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/TheloniteMonk.java create mode 100644 Mage.Sets/src/mage/sets/fifthedition/DarkMaze.java create mode 100644 Mage.Sets/src/mage/sets/homelands/AysenHighway.java create mode 100644 Mage.Sets/src/mage/sets/homelands/DarkMaze1.java create mode 100644 Mage.Sets/src/mage/sets/homelands/DarkMaze2.java create mode 100644 Mage.Sets/src/mage/sets/homelands/DwarvenPony.java create mode 100644 Mage.Sets/src/mage/sets/homelands/VeldraneOfSengir.java create mode 100644 Mage.Sets/src/mage/sets/iceage/Clairvoyance.java create mode 100644 Mage.Sets/src/mage/sets/iceage/ForceVoid.java create mode 100644 Mage.Sets/src/mage/sets/iceage/LightningBlow.java create mode 100644 Mage.Sets/src/mage/sets/iceage/Pyknite.java create mode 100644 Mage.Sets/src/mage/sets/iceage/RayOfErasure.java create mode 100644 Mage.Sets/src/mage/sets/iceage/Thermokarst.java create mode 100644 Mage.Sets/src/mage/sets/iceage/WalkingWall.java create mode 100644 Mage.Sets/src/mage/sets/judgment/MirrorWall.java create mode 100644 Mage.Sets/src/mage/sets/legends/PartWater.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/RiverMerfolk.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/WalkingWall.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/Burnout.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/FungalBloom.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/SporeFlower.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/TheloniteDruid.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/FeveredStrength.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/LightningBlow.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/GateToPhyrexia.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/CavernCrawler.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/VineDryad.java create mode 100644 Mage.Sets/src/mage/sets/mirage/BenthicDjinn.java create mode 100644 Mage.Sets/src/mage/sets/mirage/DirtwaterWraith.java create mode 100644 Mage.Sets/src/mage/sets/mirage/GoblinScouts.java create mode 100644 Mage.Sets/src/mage/sets/morningtide/MerrowWitsniper.java create mode 100644 Mage.Sets/src/mage/sets/portal/IngeniousThief.java create mode 100644 Mage.Sets/src/mage/sets/portal/NaturesCloak.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/IngeniousThief.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/NaturesCloak.java create mode 100644 Mage.Sets/src/mage/sets/thedark/HiddenPath.java create mode 100644 Mage.Sets/src/mage/sets/thedark/ScarwoodHag.java create mode 100644 Mage.Sets/src/mage/sets/torment/SlitheryStalker.java create mode 100644 Mage.Sets/src/mage/sets/visions/FeralInstinct.java create mode 100644 Mage.Sets/src/mage/sets/visions/Solfatara.java rename Mage/src/mage/abilities/effects/common/combat/{CanAttackAsThoughtItDidntHaveDefenderAllEffect.java => CanAttackAsThoughItDidntHaveDefenderAllEffect.java} (86%) rename Mage/src/mage/abilities/effects/common/combat/{CanAttackAsThoughtItDidntHaveDefenderSourceEffect.java => CanAttackAsThoughItDidntHaveDefenderSourceEffect.java} (82%) rename Mage/src/mage/abilities/effects/common/combat/{CanAttackAsThoughtItDidntHaveDefenderTargetEffect.java => CanAttackAsThoughItDidntHaveDefenderTargetEffect.java} (85%) diff --git a/Mage.Sets/src/mage/sets/alliances/Burnout.java b/Mage.Sets/src/mage/sets/alliances/Burnout.java new file mode 100644 index 00000000000..746f36cd8de --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/Burnout.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.alliances; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class Burnout extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("instant spell"); + + static { + filter.add(new CardTypePredicate(CardType.INSTANT)); + } + + public Burnout(UUID ownerId) { + super(ownerId, 101, "Burnout", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{R}"); + this.expansionSetCode = "ALL"; + + // Counter target instant spell if it's blue. + this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addEffect(new BurnoutCounterTargetEffect()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public Burnout(final Burnout card) { + super(card); + } + + @Override + public Burnout copy() { + return new Burnout(this); + } +} + +class BurnoutCounterTargetEffect extends OneShotEffect { + + public BurnoutCounterTargetEffect() { + super(Outcome.Detriment); + } + + public BurnoutCounterTargetEffect(final BurnoutCounterTargetEffect effect) { + super(effect); + } + + @Override + public BurnoutCounterTargetEffect copy() { + return new BurnoutCounterTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if(game.getStack().getSpell(source.getFirstTarget()).getColor(game).isBlue()){ + game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); + } + return true; + } + + public String getText(Ability source) { + return "Counter target instant spell if it's blue"; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/alliances/CarrierPigeons1.java b/Mage.Sets/src/mage/sets/alliances/CarrierPigeons1.java new file mode 100644 index 00000000000..a4b0a0bc0ef --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/CarrierPigeons1.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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CarrierPigeons1 extends CardImpl { + + public CarrierPigeons1(UUID ownerId) { + super(ownerId, 125, "Carrier Pigeons", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Bird"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Carrier Pigeons enters the battlefield, draw a card at the beginning of the next turn's upkeep. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false))); + } + + public CarrierPigeons1(final CarrierPigeons1 card) { + super(card); + } + + @Override + public CarrierPigeons1 copy() { + return new CarrierPigeons1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/CarrierPigeons2.java b/Mage.Sets/src/mage/sets/alliances/CarrierPigeons2.java new file mode 100644 index 00000000000..974a74f0358 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/CarrierPigeons2.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.alliances; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CarrierPigeons2 extends mage.sets.alliances.CarrierPigeons1 { + + public CarrierPigeons2(UUID ownerId) { + super(ownerId); + this.cardNumber = 126; + this.expansionSetCode = "ALL"; + } + + public CarrierPigeons2(final CarrierPigeons1 card) { + super(card); + } + + @Override + public CarrierPigeons1 copy() { + return new CarrierPigeons1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/EnslavedScout1.java b/Mage.Sets/src/mage/sets/alliances/EnslavedScout1.java new file mode 100644 index 00000000000..0c8467c1de9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/EnslavedScout1.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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class EnslavedScout1 extends CardImpl { + + public EnslavedScout1(UUID ownerId) { + super(ownerId, 104, "Enslaved Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Goblin"); + this.subtype.add("Scout"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {2}: Enslaved Scout gains mountainwalk until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(new MountainwalkAbility(false), Duration.EndOfTurn), + new GenericManaCost(2))); + } + + public EnslavedScout1(final EnslavedScout1 card) { + super(card); + } + + @Override + public EnslavedScout1 copy() { + return new EnslavedScout1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/EnslavedScout2.java b/Mage.Sets/src/mage/sets/alliances/EnslavedScout2.java new file mode 100644 index 00000000000..51a1f2cffa8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/EnslavedScout2.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.alliances; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EnslavedScout2 extends mage.sets.alliances.EnslavedScout1 { + + public EnslavedScout2(UUID ownerId) { + super(ownerId); + this.cardNumber = 105; + this.expansionSetCode = "ALL"; + } + + public EnslavedScout2(final EnslavedScout1 card) { + super(card); + } + + @Override + public EnslavedScout1 copy() { + return new EnslavedScout1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/FeveredStrength1.java b/Mage.Sets/src/mage/sets/alliances/FeveredStrength1.java new file mode 100644 index 00000000000..8dbc22aa5dc --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/FeveredStrength1.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.alliances; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class FeveredStrength1 extends CardImpl { + + public FeveredStrength1(UUID ownerId) { + super(ownerId, 10, "Fevered Strength", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "ALL"; + + // Target creature gets +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public FeveredStrength1(final FeveredStrength1 card) { + super(card); + } + + @Override + public FeveredStrength1 copy() { + return new FeveredStrength1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/FeveredStrength2.java b/Mage.Sets/src/mage/sets/alliances/FeveredStrength2.java new file mode 100644 index 00000000000..9f87d7e30de --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/FeveredStrength2.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.alliances; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FeveredStrength2 extends mage.sets.alliances.FeveredStrength1 { + + public FeveredStrength2(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "ALL"; + } + + public FeveredStrength2(final FeveredStrength1 card) { + super(card); + } + + @Override + public FeveredStrength1 copy() { + return new FeveredStrength1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.java b/Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.java new file mode 100644 index 00000000000..ca2291a5eb5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.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.sets.antiquities; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.target.common.TargetArtifactPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class GateToPhyrexia extends CardImpl { + + public GateToPhyrexia(UUID ownerId) { + super(ownerId, 46, "Gate to Phyrexia", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}"); + this.expansionSetCode = "ATQ"; + + // Sacrifice a creature: Destroy target artifact. Activate this ability only during your upkeep and only once each turn. + Ability ability = new GateToPhyrexiaAbility(new DestroyTargetEffect(), new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + ability.addTarget(new TargetArtifactPermanent()); + this.addAbility(ability); + } + + public GateToPhyrexia(final GateToPhyrexia card) { + super(card); + } + + @Override + public GateToPhyrexia copy() { + return new GateToPhyrexia(this); + } +} + +class GateToPhyrexiaAbility extends LimitedTimesPerTurnActivatedAbility { + + public GateToPhyrexiaAbility(Effect effect, Cost cost) { + super(Zone.BATTLEFIELD, effect, cost); + } + + public GateToPhyrexiaAbility(final GateToPhyrexiaAbility ability) { + super(ability); + } + + @Override + public GateToPhyrexiaAbility copy() { + return new GateToPhyrexiaAbility(this); + } + + @Override + public boolean canActivate(UUID playerId, Game game) { + if (!game.getActivePlayerId().equals(controllerId) || !PhaseStep.UPKEEP.equals(game.getStep().getType())) { + return false; + } + return super.canActivate(playerId, game); + } + + @Override + public String getRule() { + StringBuilder sb = new StringBuilder(""); + sb.append(super.getRule()).append(" Activate this ability only during your upkeep."); + return sb.toString(); + } +} diff --git a/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java b/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java index 7cad13237fc..cc7caa3973d 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/PillarOfWar.java @@ -1,78 +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.bornofthegods; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.EnchantedCondition; -import mage.abilities.decorator.ConditionalAsThoughEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; - -/** - * - * @author LevelX2 - */ -public class PillarOfWar extends CardImpl { - - public PillarOfWar(UUID ownerId) { - super(ownerId, 160, "Pillar of War", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); - this.expansionSetCode = "BNG"; - this.subtype.add("Golem"); - - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - // As long as Pillar of War is enchanted, it can attack as though it didn't have defender. - Effect effect = new ConditionalAsThoughEffect( - new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), - new EnchantedCondition()); - effect.setText("As long as {this} is enchanted, it can attack as though it didn't have defender"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - - } - - public PillarOfWar(final PillarOfWar card) { - super(card); - } - - @Override - public PillarOfWar copy() { - return new PillarOfWar(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.sets.bornofthegods; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.EnchantedCondition; +import mage.abilities.decorator.ConditionalAsThoughEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class PillarOfWar extends CardImpl { + + public PillarOfWar(UUID ownerId) { + super(ownerId, 160, "Pillar of War", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + this.expansionSetCode = "BNG"; + this.subtype.add("Golem"); + + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // As long as Pillar of War is enchanted, it can attack as though it didn't have defender. + Effect effect = new ConditionalAsThoughEffect( + new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), + new EnchantedCondition()); + effect.setText("As long as {this} is enchanted, it can attack as though it didn't have defender"); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + } + + public PillarOfWar(final PillarOfWar card) { + super(card); + } + + @Override + public PillarOfWar copy() { + return new PillarOfWar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/WakestoneGargoyle.java b/Mage.Sets/src/mage/sets/conspiracy/WakestoneGargoyle.java index ef7df54b8ba..aefa67bd5d0 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/WakestoneGargoyle.java +++ b/Mage.Sets/src/mage/sets/conspiracy/WakestoneGargoyle.java @@ -1,80 +1,80 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are 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.conspiracy; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderAllEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.abilities.keyword.FlyingAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.mageobject.AbilityPredicate; - -/** - * - * @author LevelX2 - */ -public class WakestoneGargoyle extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Creatures you control with defender"); - - static { - filter.add(new AbilityPredicate(DefenderAbility.class)); - } - - public WakestoneGargoyle(UUID ownerId) { - super(ownerId, 88, "Wakestone Gargoyle", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); - this.expansionSetCode = "CNS"; - this.subtype.add("Gargoyle"); - this.power = new MageInt(3); - this.toughness = new MageInt(4); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - // Flying - this.addAbility(FlyingAbility.getInstance()); - // {1}{W}: Creatures you control with defender can attack this turn as though they didn't have defender. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderAllEffect(Duration.EndOfTurn, filter), new ManaCostsImpl("{1}{W}") )); - } - - public WakestoneGargoyle(final WakestoneGargoyle card) { - super(card); - } - - @Override - public WakestoneGargoyle copy() { - return new WakestoneGargoyle(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.sets.conspiracy; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderAllEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LevelX2 + */ +public class WakestoneGargoyle extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Creatures you control with defender"); + + static { + filter.add(new AbilityPredicate(DefenderAbility.class)); + } + + public WakestoneGargoyle(UUID ownerId) { + super(ownerId, 88, "Wakestone Gargoyle", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "CNS"; + this.subtype.add("Gargoyle"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Flying + this.addAbility(FlyingAbility.getInstance()); + // {1}{W}: Creatures you control with defender can attack this turn as though they didn't have defender. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration.EndOfTurn, filter), new ManaCostsImpl("{1}{W}") )); + } + + public WakestoneGargoyle(final WakestoneGargoyle card) { + super(card); + } + + @Override + public WakestoneGargoyle copy() { + return new WakestoneGargoyle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/AssaultFormation.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/AssaultFormation.java index 75a189ac7a7..cc4aa550478 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/AssaultFormation.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/AssaultFormation.java @@ -1,127 +1,127 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are 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.dragonsoftarkir; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderTargetEffect; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.cards.CardImpl; -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.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.game.Game; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class AssaultFormation extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with defender"); - - static { - filter.add(new AbilityPredicate(DefenderAbility.class)); - } - - public AssaultFormation(UUID ownerId) { - super(ownerId, 173, "Assault Formation", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); - this.expansionSetCode = "DTK"; - - // Each creature you control assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AssaultFormationCombatDamageRuleEffect())); - - // {G}: Target creature with defender can attack this turn as though it didn't have defender. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{G}")); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - - // {2}{G}: Creatures you control get +0/+1 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0,1,Duration.EndOfTurn), new ManaCostsImpl("{2}{G}"))); - - } - - public AssaultFormation(final AssaultFormation card) { - super(card); - } - - @Override - public AssaultFormation copy() { - return new AssaultFormation(this); - } -} - -class AssaultFormationCombatDamageRuleEffect extends ContinuousEffectImpl { - - public AssaultFormationCombatDamageRuleEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Each creature you control assigns combat damage equal to its toughness rather than its power"; - } - - public AssaultFormationCombatDamageRuleEffect(final AssaultFormationCombatDamageRuleEffect effect) { - super(effect); - } - - @Override - public AssaultFormationCombatDamageRuleEffect copy() { - return new AssaultFormationCombatDamageRuleEffect(this); - } - - @Override - public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - // Change the rule - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new ControllerIdPredicate(source.getControllerId())); - game.getCombat().setUseToughnessForDamage(true); - game.getCombat().addUseToughnessForDamageFilter(filter); - return true; - } - - @Override - public boolean apply(Game game, Ability source) { - return false; - } - - @Override - public boolean hasLayer(Layer layer) { - return layer == Layer.RulesEffects; - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.dragonsoftarkir; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderTargetEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +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.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class AssaultFormation extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with defender"); + + static { + filter.add(new AbilityPredicate(DefenderAbility.class)); + } + + public AssaultFormation(UUID ownerId) { + super(ownerId, 173, "Assault Formation", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "DTK"; + + // Each creature you control assigns combat damage equal to its toughness rather than its power. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AssaultFormationCombatDamageRuleEffect())); + + // {G}: Target creature with defender can attack this turn as though it didn't have defender. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{G}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // {2}{G}: Creatures you control get +0/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0,1,Duration.EndOfTurn), new ManaCostsImpl("{2}{G}"))); + + } + + public AssaultFormation(final AssaultFormation card) { + super(card); + } + + @Override + public AssaultFormation copy() { + return new AssaultFormation(this); + } +} + +class AssaultFormationCombatDamageRuleEffect extends ContinuousEffectImpl { + + public AssaultFormationCombatDamageRuleEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "Each creature you control assigns combat damage equal to its toughness rather than its power"; + } + + public AssaultFormationCombatDamageRuleEffect(final AssaultFormationCombatDamageRuleEffect effect) { + super(effect); + } + + @Override + public AssaultFormationCombatDamageRuleEffect copy() { + return new AssaultFormationCombatDamageRuleEffect(this); + } + + @Override + public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { + // Change the rule + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new ControllerIdPredicate(source.getControllerId())); + game.getCombat().setUseToughnessForDamage(true); + game.getCombat().addUseToughnessForDamageFilter(filter); + return true; + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean hasLayer(Layer layer) { + return layer == Layer.RulesEffects; + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/GladeWatcher.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/GladeWatcher.java index 964d318d109..25e776fc6af 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/GladeWatcher.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/GladeWatcher.java @@ -1,79 +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.dragonsoftarkir; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.ActivateIfConditionActivatedAbility; -import mage.abilities.condition.common.FormidableCondition; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.cards.CardImpl; -import mage.constants.AbilityWord; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; - -/** - * - * @author LevelX2 - */ -public class GladeWatcher extends CardImpl { - - public GladeWatcher(UUID ownerId) { - super(ownerId, 188, "Glade Watcher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); - this.expansionSetCode = "DTK"; - this.subtype.add("Elemental"); - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - // Formidable - {G}: Glade Watcher can attack this turn as though it didn't have defender. Activate this ability only if creatures you control have total power 8 or greater. - Ability ability = new ActivateIfConditionActivatedAbility( - Zone.BATTLEFIELD, - new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), - new ManaCostsImpl("{G}"), - FormidableCondition.getInstance()); - ability.setAbilityWord(AbilityWord.FORMIDABLE); - this.addAbility(ability); - } - - public GladeWatcher(final GladeWatcher card) { - super(card); - } - - @Override - public GladeWatcher copy() { - return new GladeWatcher(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.sets.dragonsoftarkir; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateIfConditionActivatedAbility; +import mage.abilities.condition.common.FormidableCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class GladeWatcher extends CardImpl { + + public GladeWatcher(UUID ownerId) { + super(ownerId, 188, "Glade Watcher", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Elemental"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // Formidable - {G}: Glade Watcher can attack this turn as though it didn't have defender. Activate this ability only if creatures you control have total power 8 or greater. + Ability ability = new ActivateIfConditionActivatedAbility( + Zone.BATTLEFIELD, + new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), + new ManaCostsImpl("{G}"), + FormidableCondition.getInstance()); + ability.setAbilityWord(AbilityWord.FORMIDABLE); + this.addAbility(ability); + } + + public GladeWatcher(final GladeWatcher card) { + super(card); + } + + @Override + public GladeWatcher copy() { + return new GladeWatcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/EbonPraetor.java b/Mage.Sets/src/mage/sets/fallenempires/EbonPraetor.java new file mode 100644 index 00000000000..2f78159108d --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/EbonPraetor.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.fallenempires; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EbonPraetor extends mage.sets.masterseditionii.EbonPraetor { + + public EbonPraetor(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "FEM"; + } + + public EbonPraetor(final EbonPraetor card) { + super(card); + } + + @Override + public EbonPraetor copy() { + return new EbonPraetor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/FungalBloom.java b/Mage.Sets/src/mage/sets/fallenempires/FungalBloom.java new file mode 100644 index 00000000000..5f7689c0988 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/FungalBloom.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.fallenempires; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class FungalBloom extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Fungus"); + + static { + filter.add(new SubtypePredicate("Fungus")); + } + + public FungalBloom(UUID ownerId) { + super(ownerId, 79, "Fungal Bloom", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}{G}"); + this.expansionSetCode = "FEM"; + + // {G}{G}: Put a spore counter on target Fungus. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new AddCountersTargetEffect(CounterType.SPORE.createInstance()), + new ManaCostsImpl("{G}{G}")); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + public FungalBloom(final FungalBloom card) { + super(card); + } + + @Override + public FungalBloom copy() { + return new FungalBloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/RiverMerfolk.java b/Mage.Sets/src/mage/sets/fallenempires/RiverMerfolk.java new file mode 100644 index 00000000000..8c42a0096a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/RiverMerfolk.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.fallenempires; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class RiverMerfolk extends mage.sets.mastersedition.RiverMerfolk { + + public RiverMerfolk(UUID ownerId) { + super(ownerId); + this.cardNumber = 51; + this.expansionSetCode = "FEM"; + this.rarity = Rarity.RARE; + } + + public RiverMerfolk(final RiverMerfolk card) { + super(card); + } + + @Override + public RiverMerfolk copy() { + return new RiverMerfolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/SporeFlower.java b/Mage.Sets/src/mage/sets/fallenempires/SporeFlower.java new file mode 100644 index 00000000000..adafcc64ef5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/SporeFlower.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.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.common.PreventAllDamageByAllEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author fireshoes + */ +public class SporeFlower extends CardImpl { + + public SporeFlower(UUID ownerId) { + super(ownerId, 86, "Spore Flower", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}{G}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Fungus"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // At the beginning of your upkeep, put a spore counter on Spore Flower. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.SPORE.createInstance()), TargetController.YOU, false)); + + // Remove three spore counters from Spore Flower: Prevent all combat damage that would be dealt this turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new PreventAllDamageByAllEffect(Duration.EndOfTurn, true), + new RemoveCountersSourceCost(CounterType.SPORE.createInstance(3)))); + } + + public SporeFlower(final SporeFlower card) { + super(card); + } + + @Override + public SporeFlower copy() { + return new SporeFlower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/TheloniteDruid.java b/Mage.Sets/src/mage/sets/fallenempires/TheloniteDruid.java new file mode 100644 index 00000000000..ded9f9f2cb8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/TheloniteDruid.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.fallenempires; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class TheloniteDruid extends mage.sets.masterseditionii.TheloniteDruid { + + public TheloniteDruid(UUID ownerId) { + super(ownerId); + this.cardNumber = 92; + this.expansionSetCode = "FEM"; + this.rarity = Rarity.UNCOMMON; + } + + public TheloniteDruid(final TheloniteDruid card) { + super(card); + } + + @Override + public TheloniteDruid copy() { + return new TheloniteDruid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/TheloniteMonk.java b/Mage.Sets/src/mage/sets/fallenempires/TheloniteMonk.java new file mode 100644 index 00000000000..6c750b00896 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/TheloniteMonk.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.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author fireshoes + */ +public class TheloniteMonk extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("green creature"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public TheloniteMonk(UUID ownerId) { + super(ownerId, 93, "Thelonite Monk", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Insect"); + this.subtype.add("Monk"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {tap}, Sacrifice a green creature: Target land becomes a Forest. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield, "Forest"), new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public TheloniteMonk(final TheloniteMonk card) { + super(card); + } + + @Override + public TheloniteMonk copy() { + return new TheloniteMonk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/DarkMaze.java b/Mage.Sets/src/mage/sets/fifthedition/DarkMaze.java new file mode 100644 index 00000000000..c4777eec232 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/DarkMaze.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.fifthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class DarkMaze extends CardImpl { + + public DarkMaze(UUID ownerId) { + super(ownerId, 80, "Dark Maze", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "5ED"; + this.subtype.add("Wall"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {0}: Dark Maze can attack this turn as though it didn't have defender. Exile it at the beginning of the next end step. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), + new GenericManaCost(0)); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ExileSourceEffect()))); + this.addAbility(ability); + } + + public DarkMaze(final DarkMaze card) { + super(card); + } + + @Override + public DarkMaze copy() { + return new DarkMaze(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/AysenHighway.java b/Mage.Sets/src/mage/sets/homelands/AysenHighway.java new file mode 100644 index 00000000000..6076d9727f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/AysenHighway.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.homelands; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.PlainswalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author fireshoes + */ +public class AysenHighway extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public AysenHighway(UUID ownerId) { + super(ownerId, 107, "Aysen Highway", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}{W}"); + this.expansionSetCode = "HML"; + + // White creatures have plainswalk. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(new PlainswalkAbility(false), Duration.WhileOnBattlefield, filter))); + } + + public AysenHighway(final AysenHighway card) { + super(card); + } + + @Override + public AysenHighway copy() { + return new AysenHighway(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/DarkMaze1.java b/Mage.Sets/src/mage/sets/homelands/DarkMaze1.java new file mode 100644 index 00000000000..82d0978872a --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/DarkMaze1.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.homelands; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DarkMaze1 extends mage.sets.fifthedition.DarkMaze { + + public DarkMaze1(UUID ownerId) { + super(ownerId); + this.cardNumber = 31; + this.expansionSetCode = "HML"; + } + + public DarkMaze1(final DarkMaze1 card) { + super(card); + } + + @Override + public DarkMaze1 copy() { + return new DarkMaze1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/DarkMaze2.java b/Mage.Sets/src/mage/sets/homelands/DarkMaze2.java new file mode 100644 index 00000000000..5d5cce4955d --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/DarkMaze2.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.homelands; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DarkMaze2 extends mage.sets.fifthedition.DarkMaze { + + public DarkMaze2(UUID ownerId) { + super(ownerId); + this.cardNumber = 31; + this.expansionSetCode = "HML"; + } + + public DarkMaze2(final DarkMaze2 card) { + super(card); + } + + @Override + public DarkMaze2 copy() { + return new DarkMaze2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/DwarvenPony.java b/Mage.Sets/src/mage/sets/homelands/DwarvenPony.java new file mode 100644 index 00000000000..9c93806273e --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/DwarvenPony.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.sets.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class DwarvenPony extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dwarf creature"); + + static { + filter.add(new SubtypePredicate("Dwarf")); + } + + public DwarvenPony(UUID ownerId) { + super(ownerId, 89, "Dwarven Pony", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "HML"; + this.subtype.add("Horse"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{R}, {tap}: Target Dwarf creature gains mountainwalk until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(new MountainwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public DwarvenPony(final DwarvenPony card) { + super(card); + } + + @Override + public DwarvenPony copy() { + return new DwarvenPony(this); + } +} diff --git a/Mage.Sets/src/mage/sets/homelands/VeldraneOfSengir.java b/Mage.Sets/src/mage/sets/homelands/VeldraneOfSengir.java new file mode 100644 index 00000000000..44cd78ecf5e --- /dev/null +++ b/Mage.Sets/src/mage/sets/homelands/VeldraneOfSengir.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.homelands; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class VeldraneOfSengir extends CardImpl { + + public VeldraneOfSengir(UUID ownerId) { + super(ownerId, 25, "Veldrane of Sengir", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); + this.expansionSetCode = "HML"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // {1}{B}{B}: Veldrane of Sengir gets -3/-0 and gains forestwalk until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-3, -0, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}{B}")); + ability.addEffect(new GainAbilitySourceEffect(new ForestwalkAbility(false), Duration.EndOfTurn)); + this.addAbility(ability); + } + + public VeldraneOfSengir(final VeldraneOfSengir card) { + super(card); + } + + @Override + public VeldraneOfSengir copy() { + return new VeldraneOfSengir(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Clairvoyance.java b/Mage.Sets/src/mage/sets/iceage/Clairvoyance.java new file mode 100644 index 00000000000..997effb3bd1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Clairvoyance.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.iceage; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class Clairvoyance extends CardImpl { + + public Clairvoyance(UUID ownerId) { + super(ownerId, 63, "Clairvoyance", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "ICE"; + + // Look at target player's hand. + this.getSpellAbility().addEffect(new ClairvoyanceEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public Clairvoyance(final Clairvoyance card) { + super(card); + } + + @Override + public Clairvoyance copy() { + return new Clairvoyance(this); + } +} + +class ClairvoyanceEffect extends OneShotEffect { + + ClairvoyanceEffect() { + super(Outcome.DrawCard); + staticText = "Look at target player's hand"; + } + + ClairvoyanceEffect(final ClairvoyanceEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + MageObject sourceObject = source.getSourceObject(game); + if (player != null && controller != null && sourceObject != null) { + controller.lookAtCards(sourceObject.getIdName() + " (" + player.getName() + ")", player.getHand(), game); + } + return true; + } + + @Override + public ClairvoyanceEffect copy() { + return new ClairvoyanceEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/iceage/ForceVoid.java b/Mage.Sets/src/mage/sets/iceage/ForceVoid.java new file mode 100644 index 00000000000..5ade9bb6d79 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/ForceVoid.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.iceage; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class ForceVoid extends CardImpl { + + public ForceVoid(UUID ownerId) { + super(ownerId, 70, "Force Void", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "ICE"; + + // Counter target spell unless its controller pays {1}. + this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1))); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public ForceVoid(final ForceVoid card) { + super(card); + } + + @Override + public ForceVoid copy() { + return new ForceVoid(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/LightningBlow.java b/Mage.Sets/src/mage/sets/iceage/LightningBlow.java new file mode 100644 index 00000000000..538d9b3a54b --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/LightningBlow.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.iceage; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class LightningBlow extends CardImpl { + + public LightningBlow(UUID ownerId) { + super(ownerId, 266, "Lightning Blow", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "ICE"; + + // Target creature gains first strike until end of turn. + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public LightningBlow(final LightningBlow card) { + super(card); + } + + @Override + public LightningBlow copy() { + return new LightningBlow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Pyknite.java b/Mage.Sets/src/mage/sets/iceage/Pyknite.java new file mode 100644 index 00000000000..bd47c40fb28 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Pyknite.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.iceage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Pyknite extends CardImpl { + + public Pyknite(UUID ownerId) { + super(ownerId, 146, "Pyknite", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ICE"; + this.subtype.add("Ouphe"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Pyknite enters the battlefield, draw a card at the beginning of the next turn's upkeep. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse)), false)); + } + + public Pyknite(final Pyknite card) { + super(card); + } + + @Override + public Pyknite copy() { + return new Pyknite(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/RayOfErasure.java b/Mage.Sets/src/mage/sets/iceage/RayOfErasure.java new file mode 100644 index 00000000000..aa530424858 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/RayOfErasure.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.iceage; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class RayOfErasure extends CardImpl { + + public RayOfErasure(UUID ownerId) { + super(ownerId, 93, "Ray of Erasure", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "ICE"; + + // Target player puts the top card of his or her library into his or her graveyard. + this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(1)); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public RayOfErasure(final RayOfErasure card) { + super(card); + } + + @Override + public RayOfErasure copy() { + return new RayOfErasure(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Thermokarst.java b/Mage.Sets/src/mage/sets/iceage/Thermokarst.java new file mode 100644 index 00000000000..bfb85909f03 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/Thermokarst.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.iceage; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Thermokarst extends mage.sets.masterseditionii.Thermokarst { + + public Thermokarst(UUID ownerId) { + super(ownerId); + this.cardNumber = 156; + this.expansionSetCode = "ICE"; + this.rarity = Rarity.UNCOMMON; + } + + public Thermokarst(final Thermokarst card) { + super(card); + } + + @Override + public Thermokarst copy() { + return new Thermokarst(this); + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/WalkingWall.java b/Mage.Sets/src/mage/sets/iceage/WalkingWall.java new file mode 100644 index 00000000000..9db4cff12f2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/iceage/WalkingWall.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.iceage; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class WalkingWall extends mage.sets.mastersedition.WalkingWall { + + public WalkingWall(UUID ownerId) { + super(ownerId); + this.cardNumber = 321; + this.expansionSetCode = "ICE"; + } + + public WalkingWall(final WalkingWall card) { + super(card); + } + + @Override + public WalkingWall copy() { + return new WalkingWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/PrisonBarricade.java b/Mage.Sets/src/mage/sets/invasion/PrisonBarricade.java index 308b7b9a5fa..e28139b407a 100644 --- a/Mage.Sets/src/mage/sets/invasion/PrisonBarricade.java +++ b/Mage.Sets/src/mage/sets/invasion/PrisonBarricade.java @@ -32,7 +32,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.condition.common.KickedCondition; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.DefenderAbility; @@ -65,7 +65,7 @@ public class PrisonBarricade extends CardImpl { // If Prison Barricade was kicked, it enters the battlefield with a +1/+1 counter on it and with "Prison Barricade can attack as though it didn't have defender." Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), KickedCondition.getInstance(), true, "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it and with \"{this} can attack as though it didn't have defender.\"", ""); - ability.addEffect(new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield)); + ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/judgment/ErhnamDjinn.java b/Mage.Sets/src/mage/sets/judgment/ErhnamDjinn.java index 29da0bee89b..722ad3248c0 100644 --- a/Mage.Sets/src/mage/sets/judgment/ErhnamDjinn.java +++ b/Mage.Sets/src/mage/sets/judgment/ErhnamDjinn.java @@ -1,86 +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.judgment; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.ForestwalkAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.PhaseStep; -import mage.constants.Rarity; -import mage.constants.TargetController; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.ControllerPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class ErhnamDjinn extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Wall creature an opponent controls"); - - static { - filter.add(Predicates.not(new SubtypePredicate("Wall"))); - filter.add(new ControllerPredicate(TargetController.OPPONENT)); - } - - public ErhnamDjinn(UUID ownerId) { - super(ownerId, 113, "Erhnam Djinn", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}"); - this.expansionSetCode = "JUD"; - this.subtype.add("Djinn"); - - this.power = new MageInt(4); - this.toughness = new MageInt(5); - - // At the beginning of your upkeep, target non-Wall creature an opponent controls gains forestwalk until your next upkeep. - GainAbilityTargetEffect effect = new GainAbilityTargetEffect(new ForestwalkAbility(), Duration.Custom, - "target non-Wall creature an opponent controls gains forestwalk until your next upkeep"); - effect.setDurationToPhase(PhaseStep.UPKEEP); - Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false); - ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability); - } - - public ErhnamDjinn(final ErhnamDjinn card) { - super(card); - } - - @Override - public ErhnamDjinn copy() { - return new ErhnamDjinn(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.sets.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ErhnamDjinn extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Wall creature an opponent controls"); + + static { + filter.add(Predicates.not(new SubtypePredicate("Wall"))); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public ErhnamDjinn(UUID ownerId) { + super(ownerId, 113, "Erhnam Djinn", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Djinn"); + + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // At the beginning of your upkeep, target non-Wall creature an opponent controls gains forestwalk until your next upkeep. + GainAbilityTargetEffect effect = new GainAbilityTargetEffect(new ForestwalkAbility(false), Duration.Custom, + "target non-Wall creature an opponent controls gains forestwalk until your next upkeep"); + effect.setDurationToPhase(PhaseStep.UPKEEP); + Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ErhnamDjinn(final ErhnamDjinn card) { + super(card); + } + + @Override + public ErhnamDjinn copy() { + return new ErhnamDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/MirrorWall.java b/Mage.Sets/src/mage/sets/judgment/MirrorWall.java new file mode 100644 index 00000000000..49e4b023fe5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/MirrorWall.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.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class MirrorWall extends CardImpl { + + public MirrorWall(UUID ownerId) { + super(ownerId, 47, "Mirror Wall", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Wall"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {W}: Mirror Wall can attack this turn as though it didn't have defender. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), + new ManaCostsImpl("{W}"))); + } + + public MirrorWall(final MirrorWall card) { + super(card); + } + + @Override + public MirrorWall copy() { + return new MirrorWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legends/PartWater.java b/Mage.Sets/src/mage/sets/legends/PartWater.java new file mode 100644 index 00000000000..6c9b191df2d --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/PartWater.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.legends; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.IslandwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class PartWater extends CardImpl { + + public PartWater(UUID ownerId) { + super(ownerId, 66, "Part Water", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{X}{U}"); + this.expansionSetCode = "LEG"; + + // X target creatures gain islandwalk until end of turn. + Effect effect = new GainAbilityTargetEffect(new IslandwalkAbility(false), Duration.EndOfTurn); + effect.setText("X target creatures gain islandwalk until end of turn"); + this.getSpellAbility().getEffects().add(effect); + this.getSpellAbility().getTargets().add(new TargetCreaturePermanent(1,1)); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + int xValue = ability.getManaCostsToPay().getX(); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures gain islandwalk until end of turn"); + ability.getTargets().add(new TargetCreaturePermanent(0, xValue, filter, false)); + } + } + + public PartWater(final PartWater card) { + super(card); + } + + @Override + public PartWater copy() { + return new PartWater(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java b/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java index 6e15de5467d..61e59beef98 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/AnimateWall.java @@ -32,7 +32,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; @@ -73,7 +73,7 @@ public class AnimateWall extends CardImpl { this.addAbility(ability); // Enchanted Wall can attack as though it didn't have defender. - Ability canAttackAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield)); + Ability canAttackAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield)); Effect enchantEffect = new GainAbilityAttachedEffect(canAttackAbility, AttachmentType.AURA, Duration.WhileOnBattlefield); enchantEffect.setText("Enchanted Wall can attack as though it didn't have defender"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, enchantEffect)); diff --git a/Mage.Sets/src/mage/sets/lorwyn/StreambedAquitects.java b/Mage.Sets/src/mage/sets/lorwyn/StreambedAquitects.java index 0f9fedacea2..c479997933f 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/StreambedAquitects.java +++ b/Mage.Sets/src/mage/sets/lorwyn/StreambedAquitects.java @@ -1,92 +1,92 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are 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.lorwyn; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; -import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.IslandwalkAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.target.Target; -import mage.target.common.TargetCreaturePermanent; -import mage.target.common.TargetLandPermanent; - -/** - * - * @author LevelX2 - */ -public class StreambedAquitects extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Merfolk creature"); - static { - filter.add(new SubtypePredicate("Merfolk")); - } - - public StreambedAquitects(UUID ownerId) { - super(ownerId, 91, "Streambed Aquitects", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); - this.expansionSetCode = "LRW"; - this.subtype.add("Merfolk"); - this.subtype.add("Scout"); - - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // {tap}: Target Merfolk creature gets +1/+1 and gains islandwalk until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1,1, Duration.EndOfTurn), new TapSourceCost()); - ability.addEffect(new GainAbilityTargetEffect(new IslandwalkAbility(), Duration.EndOfTurn)); - Target target = new TargetCreaturePermanent(filter); - ability.addTarget(target); - this.addAbility(ability); - - // {tap}: Target land becomes an Island until end of turn. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Island"), new TapSourceCost()); - target = new TargetLandPermanent(); - ability.addTarget(target); - this.addAbility(ability); - } - - public StreambedAquitects(final StreambedAquitects card) { - super(card); - } - - @Override - public StreambedAquitects copy() { - return new StreambedAquitects(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.sets.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.IslandwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LevelX2 + */ +public class StreambedAquitects extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Merfolk creature"); + static { + filter.add(new SubtypePredicate("Merfolk")); + } + + public StreambedAquitects(UUID ownerId) { + super(ownerId, 91, "Streambed Aquitects", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Merfolk"); + this.subtype.add("Scout"); + + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {tap}: Target Merfolk creature gets +1/+1 and gains islandwalk until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1,1, Duration.EndOfTurn), new TapSourceCost()); + ability.addEffect(new GainAbilityTargetEffect(new IslandwalkAbility(false), Duration.EndOfTurn)); + Target target = new TargetCreaturePermanent(filter); + ability.addTarget(target); + this.addAbility(ability); + + // {tap}: Target land becomes an Island until end of turn. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn, "Island"), new TapSourceCost()); + target = new TargetLandPermanent(); + ability.addTarget(target); + this.addAbility(ability); + } + + public StreambedAquitects(final StreambedAquitects card) { + super(card); + } + + @Override + public StreambedAquitects copy() { + return new StreambedAquitects(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/RiverMerfolk.java b/Mage.Sets/src/mage/sets/mastersedition/RiverMerfolk.java new file mode 100644 index 00000000000..4c82f59b695 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/RiverMerfolk.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.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class RiverMerfolk extends CardImpl { + + public RiverMerfolk(UUID ownerId) { + super(ownerId, 47, "River Merfolk", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}{U}"); + this.expansionSetCode = "MED"; + this.subtype.add("Merfolk"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {U}: River Merfolk gains mountainwalk until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(new MountainwalkAbility(false), Duration.EndOfTurn), + new ManaCostsImpl("{U}"))); + } + + public RiverMerfolk(final RiverMerfolk card) { + super(card); + } + + @Override + public RiverMerfolk copy() { + return new RiverMerfolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/WalkingWall.java b/Mage.Sets/src/mage/sets/mastersedition/WalkingWall.java new file mode 100644 index 00000000000..d920da69c38 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/WalkingWall.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.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class WalkingWall extends CardImpl { + + public WalkingWall(UUID ownerId) { + super(ownerId, 172, "Walking Wall", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "MED"; + this.subtype.add("Wall"); + this.power = new MageInt(0); + this.toughness = new MageInt(6); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + + // {3}: Walking Wall gets +3/-1 until end of turn and can attack this turn as though it didn't have defender. Activate this ability only once each turn. + Ability ability = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(3, -1, Duration.EndOfTurn), new GenericManaCost(3)); + ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn)); + this.addAbility(ability); + } + + public WalkingWall(final WalkingWall card) { + super(card); + } + + @Override + public WalkingWall copy() { + return new WalkingWall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Burnout.java b/Mage.Sets/src/mage/sets/masterseditionii/Burnout.java new file mode 100644 index 00000000000..523442c030b --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/Burnout.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditionii; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Burnout extends mage.sets.alliances.Burnout { + + public Burnout(UUID ownerId) { + super(ownerId); + this.cardNumber = 121; + this.expansionSetCode = "ME2"; + } + + public Burnout(final Burnout card) { + super(card); + } + + @Override + public Burnout copy() { + return new Burnout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.java b/Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.java new file mode 100644 index 00000000000..4aac7c7bd1e --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class EbonPraetor extends CardImpl { + + public EbonPraetor(UUID ownerId) { + super(ownerId, 89, "Ebon Praetor", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + this.expansionSetCode = "ME2"; + this.subtype.add("Avatar"); + this.subtype.add("Praetor"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // At the beginning of your upkeep, put a -2/-2 counter on Ebon Praetor. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.M2M2.createInstance()), TargetController.YOU, false)); + + // Sacrifice a creature: Remove a -2/-2 counter from Ebon Praetor. If the sacrificed creature was a Thrull, put a +1/+0 counter on Ebon Praetor. Activate this ability only during your upkeep and only once each turn. + Ability ability = new EbonPraetorAbility(new RemoveCounterSourceEffect(CounterType.M2M2.createInstance()), + new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + ability.addEffect(new EbonPraetorEffect()); + this.addAbility(ability); + } + + public EbonPraetor(final EbonPraetor card) { + super(card); + } + + @Override + public EbonPraetor copy() { + return new EbonPraetor(this); + } +} + +class EbonPraetorAbility extends LimitedTimesPerTurnActivatedAbility { + + public EbonPraetorAbility(Effect effect, Cost cost) { + super(Zone.BATTLEFIELD, effect, cost); + } + + public EbonPraetorAbility(final EbonPraetorAbility ability) { + super(ability); + } + + @Override + public EbonPraetorAbility copy() { + return new EbonPraetorAbility(this); + } + + @Override + public boolean canActivate(UUID playerId, Game game) { + if (!game.getActivePlayerId().equals(controllerId) || !PhaseStep.UPKEEP.equals(game.getStep().getType())) { + return false; + } + return super.canActivate(playerId, game); + } + + @Override + public String getRule() { + StringBuilder sb = new StringBuilder(""); + sb.append(super.getRule()).append(" Activate this ability only during your upkeep."); + return sb.toString(); + } +} + +class EbonPraetorEffect extends OneShotEffect { + + public EbonPraetorEffect() { + super(Outcome.BoostCreature); + this.staticText = "If the sacrificed creature was a Thrull, put a +1/+0 counter on {this}"; + } + + public EbonPraetorEffect(final EbonPraetorEffect effect) { + super(effect); + } + + @Override + public EbonPraetorEffect copy() { + return new EbonPraetorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Cost cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + Permanent sacrificedCreature = ((SacrificeTargetCost) cost).getPermanents().get(0); + Permanent sourceCreature = game.getPermanent(source.getSourceId()); + if (sacrificedCreature.hasSubtype("Thrull") && sourceCreature != null) { + sourceCreature.addCounters(CounterType.P1P0.createInstance(), game); + return true; + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/FungalBloom.java b/Mage.Sets/src/mage/sets/masterseditionii/FungalBloom.java new file mode 100644 index 00000000000..9bde0a88d34 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/FungalBloom.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditionii; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FungalBloom extends mage.sets.fallenempires.FungalBloom { + + public FungalBloom(UUID ownerId) { + super(ownerId); + this.cardNumber = 165; + this.expansionSetCode = "ME2"; + } + + public FungalBloom(final FungalBloom card) { + super(card); + } + + @Override + public FungalBloom copy() { + return new FungalBloom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/SporeFlower.java b/Mage.Sets/src/mage/sets/masterseditionii/SporeFlower.java new file mode 100644 index 00000000000..e31dcc7dec8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/SporeFlower.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditionii; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SporeFlower extends mage.sets.fallenempires.SporeFlower { + + public SporeFlower(UUID ownerId) { + super(ownerId); + this.cardNumber = 177; + this.expansionSetCode = "ME2"; + } + + public SporeFlower(final SporeFlower card) { + super(card); + } + + @Override + public SporeFlower copy() { + return new SporeFlower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/TheloniteDruid.java b/Mage.Sets/src/mage/sets/masterseditionii/TheloniteDruid.java new file mode 100644 index 00000000000..76a2c1bead1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/TheloniteDruid.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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BecomesCreatureAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.Token; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class TheloniteDruid extends CardImpl { + + private static final FilterControlledLandPermanent filter = new FilterControlledLandPermanent("Forests you control"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public TheloniteDruid(UUID ownerId) { + super(ownerId, 182, "Thelonite Druid", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ME2"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.subtype.add("Druid"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{G}, {tap}, Sacrifice a creature: Forests you control become 2/3 creatures until end of turn. They're still lands. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BecomesCreatureAllEffect(new TheloniteDruidLandToken(), "Forests", filter, Duration.EndOfTurn), + new ManaCostsImpl("{1}{G}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + this.addAbility(ability); + } + + public TheloniteDruid(final TheloniteDruid card) { + super(card); + } + + @Override + public TheloniteDruid copy() { + return new TheloniteDruid(this); + } +} + +class TheloniteDruidLandToken extends Token { + public TheloniteDruidLandToken() { + super("", "2/3 creatures"); + cardType.add(CardType.CREATURE); + power = new MageInt(2); + toughness = new MageInt(3); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java b/Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java new file mode 100644 index 00000000000..08305c042c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java @@ -0,0 +1,99 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditionii; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author fireshoes + */ +public class Thermokarst extends CardImpl { + + public Thermokarst(UUID ownerId) { + super(ownerId, 183, "Thermokarst", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); + this.expansionSetCode = "ME2"; + + // Destroy target land. If that land was a snow land, you gain 1 life. + this.getSpellAbility().addEffect(new ThermokarstEffect()); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + } + + public Thermokarst(final Thermokarst card) { + super(card); + } + + @Override + public Thermokarst copy() { + return new Thermokarst(this); + } +} + +class ThermokarstEffect extends OneShotEffect { + + public ThermokarstEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy target land. If that land was a snow land, you gain 1 life."; + } + + public ThermokarstEffect(final ThermokarstEffect effect) { + super(effect); + } + + @Override + public ThermokarstEffect copy() { + return new ThermokarstEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent != null && controller != null) { + permanent.destroy(source.getSourceId(), game, false); + if (permanent.getSupertype().contains("Snow")) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.gainLife(1, game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/FeveredStrength.java b/Mage.Sets/src/mage/sets/masterseditioniii/FeveredStrength.java new file mode 100644 index 00000000000..47fd69436c3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/FeveredStrength.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FeveredStrength extends mage.sets.alliances.FeveredStrength1 { + + public FeveredStrength(UUID ownerId) { + super(ownerId); + this.cardNumber = 66; + this.expansionSetCode = "ME3"; + } + + public FeveredStrength(final FeveredStrength card) { + super(card); + } + + @Override + public FeveredStrength copy() { + return new FeveredStrength(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/LightningBlow.java b/Mage.Sets/src/mage/sets/masterseditioniii/LightningBlow.java new file mode 100644 index 00000000000..b536eee6dda --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/LightningBlow.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class LightningBlow extends mage.sets.iceage.LightningBlow { + + public LightningBlow(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public LightningBlow(final LightningBlow card) { + super(card); + } + + @Override + public LightningBlow copy() { + return new LightningBlow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/GateToPhyrexia.java b/Mage.Sets/src/mage/sets/masterseditioniv/GateToPhyrexia.java new file mode 100644 index 00000000000..0dcdf6b7829 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/GateToPhyrexia.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniv; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class GateToPhyrexia extends mage.sets.antiquities.GateToPhyrexia { + + public GateToPhyrexia(UUID ownerId) { + super(ownerId); + this.cardNumber = 82; + this.expansionSetCode = "ME4"; + } + + public GateToPhyrexia(final GateToPhyrexia card) { + super(card); + } + + @Override + public GateToPhyrexia copy() { + return new GateToPhyrexia(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.java b/Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.java new file mode 100644 index 00000000000..e04760cb837 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.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.mercadianmasques; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class CaveSense extends CardImpl { + + public CaveSense(UUID ownerId) { + super(ownerId, 179, "Cave Sense", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+1 and has mountainwalk. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new MountainwalkAbility(), AttachmentType.AURA))); + } + + public CaveSense(final CaveSense card) { + super(card); + } + + @Override + public CaveSense copy() { + return new CaveSense(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/CavernCrawler.java b/Mage.Sets/src/mage/sets/mercadianmasques/CavernCrawler.java new file mode 100644 index 00000000000..f800a3e61cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/CavernCrawler.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.mercadianmasques; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class CavernCrawler extends CardImpl { + + public CavernCrawler(UUID ownerId) { + super(ownerId, 181, "Cavern Crawler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Insect"); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Mountainwalk + this.addAbility(new MountainwalkAbility()); + + // {R}: Cavern Crawler gets +1/-1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl("{R}"))); + } + + public CavernCrawler(final CavernCrawler card) { + super(card); + } + + @Override + public CavernCrawler copy() { + return new CavernCrawler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.java b/Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.java new file mode 100644 index 00000000000..47af6159d29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.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.mercadianmasques; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PutOnLibraryTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInGraveyard; + +/** + * + * @author fireshoes + */ +public class HauntedCrossroads extends CardImpl { + + public HauntedCrossroads(UUID ownerId) { + super(ownerId, 138, "Haunted Crossroads", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); + this.expansionSetCode = "MMQ"; + + // {B}: Put target creature card from your graveyard on top of your library. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new ManaCostsImpl("{B}")); + ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + this.addAbility(ability); + } + + public HauntedCrossroads(final HauntedCrossroads card) { + super(card); + } + + @Override + public HauntedCrossroads copy() { + return new HauntedCrossroads(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.java b/Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.java new file mode 100644 index 00000000000..f18c186b97c --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.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.sets.mercadianmasques; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class TigerClaws extends CardImpl { + + public TigerClaws(UUID ownerId) { + super(ownerId, 279, "Tiger Claws", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Aura"); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +1/+1 and has trample. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA))); + } + + public TigerClaws(final TigerClaws card) { + super(card); + } + + @Override + public TigerClaws copy() { + return new TigerClaws(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/VineDryad.java b/Mage.Sets/src/mage/sets/mercadianmasques/VineDryad.java new file mode 100644 index 00000000000..1ce491629c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/VineDryad.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.sets.mercadianmasques; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.costs.AlternativeCostSourceAbility; +import mage.abilities.costs.common.ExileFromHandCost; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterOwnedCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardIdPredicate; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCardInHand; + +/** + * + * @author fireshoes + */ +public class VineDryad extends CardImpl { + + public VineDryad(UUID ownerId) { + super(ownerId, 284, "Vine Dryad", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Dryad"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // Forestwalk + this.addAbility(new ForestwalkAbility()); + + // You may exile a green card from your hand rather than pay Vine Dryad's mana cost. + FilterOwnedCard filter = new FilterOwnedCard("a green card from your hand"); + filter.add(new ColorPredicate(ObjectColor.GREEN)); + filter.add(Predicates.not(new CardIdPredicate(this.getId()))); // the exile cost can never be paid with the card itself + + this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter)))); + } + + public VineDryad(final VineDryad card) { + super(card); + } + + @Override + public VineDryad copy() { + return new VineDryad(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/BenthicDjinn.java b/Mage.Sets/src/mage/sets/mirage/BenthicDjinn.java new file mode 100644 index 00000000000..e0602d4fee3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/BenthicDjinn.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.IslandwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author fireshoes + */ +public class BenthicDjinn extends CardImpl { + + public BenthicDjinn(UUID ownerId) { + super(ownerId, 317, "Benthic Djinn", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{B}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Djinn"); + this.power = new MageInt(5); + this.toughness = new MageInt(3); + + // Islandwalk + this.addAbility(new IslandwalkAbility()); + + // At the beginning of your upkeep, you lose 2 life. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(2), TargetController.YOU, false)); + } + + public BenthicDjinn(final BenthicDjinn card) { + super(card); + } + + @Override + public BenthicDjinn copy() { + return new BenthicDjinn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/DirtwaterWraith.java b/Mage.Sets/src/mage/sets/mirage/DirtwaterWraith.java new file mode 100644 index 00000000000..285ca37a10c --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/DirtwaterWraith.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.SwampwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class DirtwaterWraith extends CardImpl { + + public DirtwaterWraith(UUID ownerId) { + super(ownerId, 15, "Dirtwater Wraith", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Wraith"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Swampwalk + this.addAbility(new SwampwalkAbility()); + + // {B}: Dirtwater Wraith gets +1/+0 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{B}"))); + } + + public DirtwaterWraith(final DirtwaterWraith card) { + super(card); + } + + @Override + public DirtwaterWraith copy() { + return new DirtwaterWraith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/GoblinScouts.java b/Mage.Sets/src/mage/sets/mirage/GoblinScouts.java new file mode 100644 index 00000000000..87df71dda84 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/GoblinScouts.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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.MountainwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.Token; + +/** + * + * @author fireshoes + */ +public class GoblinScouts extends CardImpl { + + public GoblinScouts(UUID ownerId) { + super(ownerId, 178, "Goblin Scouts", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); + this.expansionSetCode = "MIR"; + + // Put three 1/1 red Goblin Scout creature tokens with mountainwalk onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new GoblinScoutsToken(), 3)); + } + + public GoblinScouts(final GoblinScouts card) { + super(card); + } + + @Override + public GoblinScouts copy() { + return new GoblinScouts(this); + } +} + +class GoblinScoutsToken extends Token { + + public GoblinScoutsToken() { + super("Goblin Scout", "1/1 red Goblin Scout creature tokens with mountainwalk"); + cardType.add(CardType.CREATURE); + color.setRed(true); + subtype.add("Goblin"); + subtype.add("Scout"); + power = new MageInt(1); + toughness = new MageInt(1); + + this.addAbility(new MountainwalkAbility()); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/mirage/UnseenWalker.java b/Mage.Sets/src/mage/sets/mirage/UnseenWalker.java index 79df8370f6a..bf705f63b24 100644 --- a/Mage.Sets/src/mage/sets/mirage/UnseenWalker.java +++ b/Mage.Sets/src/mage/sets/mirage/UnseenWalker.java @@ -59,7 +59,9 @@ public class UnseenWalker extends CardImpl { this.addAbility(new ForestwalkAbility()); // {1}{G}{G}: Target creature gains forestwalk until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new ForestwalkAbility(), Duration.EndOfTurn), new ManaCostsImpl("{1}{G}{G}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(new ForestwalkAbility(false), Duration.EndOfTurn), + new ManaCostsImpl("{1}{G}{G}")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java index f753cc56de5..778d8e7cd66 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/SpireSerpent.java @@ -41,7 +41,7 @@ import mage.abilities.decorator.ConditionalAsThoughEffect; import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; @@ -64,7 +64,7 @@ public class SpireSerpent extends CardImpl { this.addAbility(DefenderAbility.getInstance()); ConditionalContinuousEffect effect1 = new ConditionalContinuousEffect(new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), MetalcraftCondition.getInstance(), abilityText1); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect1); - Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), + Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), MetalcraftCondition.getInstance()); effect.setText("and can attack as though it didn't have defender"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/sets/morningtide/MerrowWitsniper.java b/Mage.Sets/src/mage/sets/morningtide/MerrowWitsniper.java new file mode 100644 index 00000000000..7d58ed18646 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/MerrowWitsniper.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.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class MerrowWitsniper extends CardImpl { + + public MerrowWitsniper(UUID ownerId) { + super(ownerId, 40, "Merrow Witsniper", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Merfolk"); + this.subtype.add("Rogue"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Merrow Witsniper enters the battlefield, target player puts the top card of his or her library into his or her graveyard. + Ability ability = new EntersBattlefieldTriggeredAbility(new PutLibraryIntoGraveTargetEffect(1)); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public MerrowWitsniper(final MerrowWitsniper card) { + super(card); + } + + @Override + public MerrowWitsniper copy() { + return new MerrowWitsniper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/IngeniousThief.java b/Mage.Sets/src/mage/sets/portal/IngeniousThief.java new file mode 100644 index 00000000000..d6e59b8c80d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/IngeniousThief.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.portal; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +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.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class IngeniousThief extends CardImpl { + + public IngeniousThief(UUID ownerId) { + super(ownerId, 59, "Ingenious Thief", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "POR"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Ingenious Thief enters the battlefield, look at target player's hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new IngeniousThiefEffect(), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public IngeniousThief(final IngeniousThief card) { + super(card); + } + + @Override + public IngeniousThief copy() { + return new IngeniousThief(this); + } +} + +class IngeniousThiefEffect extends OneShotEffect { + + IngeniousThiefEffect() { + super(Outcome.Benefit); + staticText = "Look at target player's hand"; + } + + IngeniousThiefEffect(final IngeniousThiefEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + MageObject sourceObject = source.getSourceObject(game); + if (player != null && controller != null && sourceObject != null) { + controller.lookAtCards(sourceObject.getIdName() + " (" + player.getName() + ")", player.getHand(), game); + } + return true; + } + + @Override + public IngeniousThiefEffect copy() { + return new IngeniousThiefEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/portal/NaturesCloak.java b/Mage.Sets/src/mage/sets/portal/NaturesCloak.java new file mode 100644 index 00000000000..747aacad573 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/NaturesCloak.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portal; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class NaturesCloak extends mage.sets.starter1999.NaturesCloak { + + public NaturesCloak(UUID ownerId) { + super(ownerId); + this.cardNumber = 103; + this.expansionSetCode = "POR"; + } + + public NaturesCloak(final NaturesCloak card) { + super(card); + } + + @Override + public NaturesCloak copy() { + return new NaturesCloak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnica/IvyDancer.java b/Mage.Sets/src/mage/sets/ravnica/IvyDancer.java index 189daa2b9f4..a8b1512d852 100644 --- a/Mage.Sets/src/mage/sets/ravnica/IvyDancer.java +++ b/Mage.Sets/src/mage/sets/ravnica/IvyDancer.java @@ -1,74 +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.ravnica; - -import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.keyword.ForestwalkAbility; -import mage.cards.CardImpl; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author Loki - */ -public class IvyDancer extends CardImpl { - - public IvyDancer(UUID ownerId) { - super(ownerId, 171, "Ivy Dancer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); - this.expansionSetCode = "RAV"; - this.subtype.add("Dryad"); - this.subtype.add("Shaman"); - - this.power = new MageInt(1); - this.toughness = new MageInt(2); - - // {tap}: Target creature gains forestwalk until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(new ForestwalkAbility(), Duration.EndOfTurn), new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability); - } - - public IvyDancer(final IvyDancer card) { - super(card); - } - - @Override - public IvyDancer copy() { - return new IvyDancer(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.sets.ravnica; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class IvyDancer extends CardImpl { + + public IvyDancer(UUID ownerId) { + super(ownerId, 171, "Ivy Dancer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "RAV"; + this.subtype.add("Dryad"); + this.subtype.add("Shaman"); + + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {tap}: Target creature gains forestwalk until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(new ForestwalkAbility(false), Duration.EndOfTurn), + new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public IvyDancer(final IvyDancer card) { + super(card); + } + + @Override + public IvyDancer copy() { + return new IvyDancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java b/Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java index 8626e9783a1..bf3c94bce28 100644 --- a/Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java +++ b/Mage.Sets/src/mage/sets/seventhedition/WallOfWonder.java @@ -32,7 +32,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; @@ -60,7 +60,7 @@ public class WallOfWonder extends CardImpl { // {2}{U}{U}: Wall of Wonder gets +4/-4 until end of turn and can attack this turn as though it didn't have defender. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(4, -4, Duration.EndOfTurn), new ManaCostsImpl("{2}{U}{U}")); - ability.addEffect(new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.EndOfTurn)); + ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/TattermungeDuo.java b/Mage.Sets/src/mage/sets/shadowmoor/TattermungeDuo.java index 834c2477a36..7e9554c4e27 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/TattermungeDuo.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/TattermungeDuo.java @@ -1,82 +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.shadowmoor; - -import java.util.UUID; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.MageInt; -import mage.ObjectColor; -import mage.abilities.common.SpellCastControllerTriggeredAbility; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.ForestwalkAbility; -import mage.cards.CardImpl; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.ColorPredicate; - -/** - * - * @author North - */ -public class TattermungeDuo extends CardImpl { - - private static final FilterSpell redFilter = new FilterSpell("a red spell"); - private static final FilterSpell greenFilter = new FilterSpell("a green spell"); - - static { - redFilter.add(new ColorPredicate(ObjectColor.RED)); - greenFilter.add(new ColorPredicate(ObjectColor.GREEN)); - } - - public TattermungeDuo(UUID ownerId) { - super(ownerId, 218, "Tattermunge Duo", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R/G}"); - this.expansionSetCode = "SHM"; - this.subtype.add("Goblin"); - this.subtype.add("Warrior"); - this.subtype.add("Shaman"); - - this.power = new MageInt(2); - this.toughness = new MageInt(3); - - // Whenever you cast a red spell, Tattermunge Duo gets +1/+1 until end of turn. - this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), redFilter, false)); - // Whenever you cast a green spell, Tattermunge Duo gains forestwalk until end of turn. - this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(new ForestwalkAbility(), Duration.EndOfTurn), greenFilter, false)); - } - - public TattermungeDuo(final TattermungeDuo card) { - super(card); - } - - @Override - public TattermungeDuo copy() { - return new TattermungeDuo(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.sets.shadowmoor; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author North + */ +public class TattermungeDuo extends CardImpl { + + private static final FilterSpell redFilter = new FilterSpell("a red spell"); + private static final FilterSpell greenFilter = new FilterSpell("a green spell"); + + static { + redFilter.add(new ColorPredicate(ObjectColor.RED)); + greenFilter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public TattermungeDuo(UUID ownerId) { + super(ownerId, 218, "Tattermunge Duo", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R/G}"); + this.expansionSetCode = "SHM"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + this.subtype.add("Shaman"); + + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever you cast a red spell, Tattermunge Duo gets +1/+1 until end of turn. + this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), redFilter, false)); + // Whenever you cast a green spell, Tattermunge Duo gains forestwalk until end of turn. + this.addAbility(new SpellCastControllerTriggeredAbility(new GainAbilitySourceEffect(new ForestwalkAbility(false), + Duration.EndOfTurn), greenFilter, false)); + } + + public TattermungeDuo(final TattermungeDuo card) { + super(card); + } + + @Override + public TattermungeDuo copy() { + return new TattermungeDuo(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/IngeniousThief.java b/Mage.Sets/src/mage/sets/starter1999/IngeniousThief.java new file mode 100644 index 00000000000..5adce61ef91 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/IngeniousThief.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.starter1999; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class IngeniousThief extends mage.sets.portal.IngeniousThief { + + public IngeniousThief(UUID ownerId) { + super(ownerId); + this.cardNumber = 40; + this.expansionSetCode = "S99"; + this.rarity = Rarity.COMMON; + } + + public IngeniousThief(final IngeniousThief card) { + super(card); + } + + @Override + public IngeniousThief copy() { + return new IngeniousThief(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/NaturesCloak.java b/Mage.Sets/src/mage/sets/starter1999/NaturesCloak.java new file mode 100644 index 00000000000..ef7f12e84db --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/NaturesCloak.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.starter1999; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author fireshoes + */ +public class NaturesCloak extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Green creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public NaturesCloak(UUID ownerId) { + super(ownerId, 135, "Nature's Cloak", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "S99"; + + // Green creatures you control gain forestwalk until end of turn. + this.getSpellAbility().addEffect(new GainAbilityControlledEffect( + new ForestwalkAbility(false), Duration.EndOfTurn, filter)); + } + + public NaturesCloak(final NaturesCloak card) { + super(card); + } + + @Override + public NaturesCloak copy() { + return new NaturesCloak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/RollingStones.java b/Mage.Sets/src/mage/sets/stronghold/RollingStones.java index a37bc80bbe7..f60560ec5c6 100644 --- a/Mage.Sets/src/mage/sets/stronghold/RollingStones.java +++ b/Mage.Sets/src/mage/sets/stronghold/RollingStones.java @@ -29,7 +29,7 @@ package mage.sets.stronghold; import java.util.UUID; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderAllEffect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderAllEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; @@ -56,7 +56,7 @@ public class RollingStones extends CardImpl { // Wall creatures can attack as though they didn't have defender. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderAllEffect(Duration.WhileOnBattlefield, filter))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration.WhileOnBattlefield, filter))); } public RollingStones(final RollingStones card) { diff --git a/Mage.Sets/src/mage/sets/thedark/HiddenPath.java b/Mage.Sets/src/mage/sets/thedark/HiddenPath.java new file mode 100644 index 00000000000..0ca5e8d49cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/HiddenPath.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.thedark; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author fireshoes + */ +public class HiddenPath extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Green creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public HiddenPath(UUID ownerId) { + super(ownerId, 41, "Hidden Path", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}{G}{G}"); + this.expansionSetCode = "DRK"; + + // Green creatures have forestwalk. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(new ForestwalkAbility(false), Duration.WhileOnBattlefield, filter))); + } + + public HiddenPath(final HiddenPath card) { + super(card); + } + + @Override + public HiddenPath copy() { + return new HiddenPath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/ScarwoodHag.java b/Mage.Sets/src/mage/sets/thedark/ScarwoodHag.java new file mode 100644 index 00000000000..28b56da4c86 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/ScarwoodHag.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.thedark; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect; +import mage.abilities.keyword.ForestwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ScarwoodHag extends CardImpl { + + public ScarwoodHag(UUID ownerId) { + super(ownerId, 49, "Scarwood Hag", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "DRK"; + this.subtype.add("Hag"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {G}{G}{G}{G}, {tap}: Target creature gains forestwalk until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilityTargetEffect(new ForestwalkAbility(false), Duration.EndOfTurn), + new ManaCostsImpl("{G}{G}{G}{G}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {tap}: Target creature loses forestwalk until end of turn. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new LoseAbilityTargetEffect(new ForestwalkAbility(false), Duration.EndOfTurn), + new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ScarwoodHag(final ScarwoodHag card) { + super(card); + } + + @Override + public ScarwoodHag copy() { + return new ScarwoodHag(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/WormwoodTreefolk.java b/Mage.Sets/src/mage/sets/thedark/WormwoodTreefolk.java index 57c626eef29..a19004a8f30 100644 --- a/Mage.Sets/src/mage/sets/thedark/WormwoodTreefolk.java +++ b/Mage.Sets/src/mage/sets/thedark/WormwoodTreefolk.java @@ -56,14 +56,14 @@ public class WormwoodTreefolk extends CardImpl { this.toughness = new MageInt(4); // {G}{G}: Wormwood Treefolk gains forestwalk until end of turn and deals 2 damage to you. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilitySourceEffect(new ForestwalkAbility(), Duration.EndOfTurn), new ManaCostsImpl("{G}{G}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(new ForestwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{G}{G}")); ability.addEffect(new DamageControllerEffect(2)); this.addAbility(ability); - + // {B}{B}: Wormwood Treefolk gains swampwalk until end of turn and deals 2 damage to you. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilitySourceEffect(new SwampwalkAbility(), Duration.EndOfTurn), new ManaCostsImpl("{B}{B}")); + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(new SwampwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{B}{B}")); ability.addEffect(new DamageControllerEffect(2)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java b/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java index 9515c4f37d3..02b540a053b 100644 --- a/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java +++ b/Mage.Sets/src/mage/sets/theros/ColossusOfAkros.java @@ -1,91 +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.sets.theros; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.condition.common.MonstrousCondition; -import mage.abilities.decorator.ConditionalAsThoughEffect; -import mage.abilities.decorator.ConditionalContinuousEffect; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.abilities.keyword.IndestructibleAbility; -import mage.abilities.keyword.MonstrosityAbility; -import mage.abilities.keyword.TrampleAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; - -/** - * - * @author LevelX2 - */ -public class ColossusOfAkros extends CardImpl { - - public ColossusOfAkros(UUID ownerId) { - super(ownerId, 214, "Colossus of Akros", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{8}"); - this.expansionSetCode = "THS"; - this.subtype.add("Golem"); - - this.power = new MageInt(10); - this.toughness = new MageInt(10); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - // indestructible. - this.addAbility(IndestructibleAbility.getInstance()); - // {10}: Monstrosity 10. - this.addAbility(new MonstrosityAbility("{10}", 10)); - // As long as Colossus of Akros is monstrous, it has trample and can attack as though it didn't have defender. - Ability ability = new SimpleStaticAbility( - Zone.BATTLEFIELD, - new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), - MonstrousCondition.getInstance(), - "As long as {this} is monstrous, it has trample")); - Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), - MonstrousCondition.getInstance()); - effect.setText("and can attack as though it didn't have defender"); - ability.addEffect(effect); - this.addAbility(ability); - } - - public ColossusOfAkros(final ColossusOfAkros card) { - super(card); - } - - @Override - public ColossusOfAkros copy() { - return new ColossusOfAkros(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.sets.theros; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.MonstrousCondition; +import mage.abilities.decorator.ConditionalAsThoughEffect; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.MonstrosityAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class ColossusOfAkros extends CardImpl { + + public ColossusOfAkros(UUID ownerId) { + super(ownerId, 214, "Colossus of Akros", Rarity.RARE, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{8}"); + this.expansionSetCode = "THS"; + this.subtype.add("Golem"); + + this.power = new MageInt(10); + this.toughness = new MageInt(10); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // indestructible. + this.addAbility(IndestructibleAbility.getInstance()); + // {10}: Monstrosity 10. + this.addAbility(new MonstrosityAbility("{10}", 10)); + // As long as Colossus of Akros is monstrous, it has trample and can attack as though it didn't have defender. + Ability ability = new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield), + MonstrousCondition.getInstance(), + "As long as {this} is monstrous, it has trample")); + Effect effect = new ConditionalAsThoughEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield), + MonstrousCondition.getInstance()); + effect.setText("and can attack as though it didn't have defender"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public ColossusOfAkros(final ColossusOfAkros card) { + super(card); + } + + @Override + public ColossusOfAkros copy() { + return new ColossusOfAkros(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java b/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java index 8bb0b4f6748..64e218429e7 100644 --- a/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java +++ b/Mage.Sets/src/mage/sets/theros/ReturnedPhalanx.java @@ -1,71 +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.theros; - -import java.util.UUID; -import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.common.combat.CanAttackAsThoughtItDidntHaveDefenderSourceEffect; -import mage.abilities.keyword.DefenderAbility; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Rarity; -import mage.constants.Zone; - -/** - * - * @author LevelX2 - */ -public class ReturnedPhalanx extends CardImpl { - - public ReturnedPhalanx(UUID ownerId) { - super(ownerId, 104, "Returned Phalanx", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); - this.expansionSetCode = "THS"; - this.subtype.add("Zombie"); - this.subtype.add("Soldier"); - - this.power = new MageInt(3); - this.toughness = new MageInt(3); - - // Defender - this.addAbility(DefenderAbility.getInstance()); - // {1}{U}: Returned Phalanx can attack this turn as though it didn't have defender. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"))); - } - - public ReturnedPhalanx(final ReturnedPhalanx card) { - super(card); - } - - @Override - public ReturnedPhalanx copy() { - return new ReturnedPhalanx(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.sets.theros; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderSourceEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class ReturnedPhalanx extends CardImpl { + + public ReturnedPhalanx(UUID ownerId) { + super(ownerId, 104, "Returned Phalanx", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "THS"; + this.subtype.add("Zombie"); + this.subtype.add("Soldier"); + + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // {1}{U}: Returned Phalanx can attack this turn as though it didn't have defender. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"))); + } + + public ReturnedPhalanx(final ReturnedPhalanx card) { + super(card); + } + + @Override + public ReturnedPhalanx copy() { + return new ReturnedPhalanx(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/WormwoodDryad.java b/Mage.Sets/src/mage/sets/timespiral/WormwoodDryad.java index 75a7d7c1e29..5bafb1249e2 100644 --- a/Mage.Sets/src/mage/sets/timespiral/WormwoodDryad.java +++ b/Mage.Sets/src/mage/sets/timespiral/WormwoodDryad.java @@ -56,14 +56,14 @@ public class WormwoodDryad extends CardImpl { this.toughness = new MageInt(1); // {G}: Wormwood Dryad gains forestwalk until end of turn and deals 1 damage to you. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilitySourceEffect(new ForestwalkAbility(), Duration.EndOfTurn), new ManaCostsImpl("{G}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(new ForestwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{G}")); ability.addEffect(new DamageControllerEffect(1)); this.addAbility(ability); - + // {B}: Wormwood Dryad gains swampwalk until end of turn and deals 1 damage to you. - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilitySourceEffect(new SwampwalkAbility(), Duration.EndOfTurn), new ManaCostsImpl("{B}")); + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(new SwampwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{B}")); ability.addEffect(new DamageControllerEffect(1)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/torment/SlitheryStalker.java b/Mage.Sets/src/mage/sets/torment/SlitheryStalker.java new file mode 100644 index 00000000000..f3f36f20074 --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/SlitheryStalker.java @@ -0,0 +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.sets.torment; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ExileTargetForSourceEffect; +import mage.abilities.effects.common.ReturnFromExileForSourceEffect; +import mage.abilities.keyword.SwampwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.Target; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class SlitheryStalker extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a green or white creature an opponent controls"); + + static { + filter.add(Predicates.or( + new ColorPredicate(ObjectColor.GREEN), + new ColorPredicate(ObjectColor.WHITE))); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public SlitheryStalker(UUID ownerId) { + super(ownerId, 84, "Slithery Stalker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "TOR"; + this.subtype.add("Nightmare"); + this.subtype.add("Horror"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Swampwalk + this.addAbility(new SwampwalkAbility()); + + // When Slithery Stalker enters the battlefield, exile target green or white creature an opponent controls. + Ability ability1 = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true); + Target target = new TargetPermanent(filter); + ability1.addTarget(target); + this.addAbility(ability1); + + // When Slithery Stalker leaves the battlefield, return the exiled card to the battlefield under its owner's control. + Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); + this.addAbility(ability2); + } + + public SlitheryStalker(final SlitheryStalker card) { + super(card); + } + + @Override + public SlitheryStalker copy() { + return new SlitheryStalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/urzaslegacy/WeatherseedElf.java b/Mage.Sets/src/mage/sets/urzaslegacy/WeatherseedElf.java index 25985872da0..99727c6a186 100644 --- a/Mage.Sets/src/mage/sets/urzaslegacy/WeatherseedElf.java +++ b/Mage.Sets/src/mage/sets/urzaslegacy/WeatherseedElf.java @@ -28,10 +28,6 @@ package mage.sets.urzaslegacy; 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; @@ -39,6 +35,10 @@ import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.keyword.ForestwalkAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.target.common.TargetCreaturePermanent; /** @@ -57,7 +57,7 @@ public class WeatherseedElf extends CardImpl { // {tap}: Target creature gains forestwalk until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilityTargetEffect(new ForestwalkAbility(), Duration.EndOfTurn), + new GainAbilityTargetEffect(new ForestwalkAbility(false), Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/visions/FeralInstinct.java b/Mage.Sets/src/mage/sets/visions/FeralInstinct.java new file mode 100644 index 00000000000..ce469c363f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/FeralInstinct.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.visions; + +import java.util.UUID; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class FeralInstinct extends CardImpl { + + public FeralInstinct(UUID ownerId) { + super(ownerId, 57, "Feral Instinct", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "VIS"; + + // Target creature gets +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(1, 1, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public FeralInstinct(final FeralInstinct card) { + super(card); + } + + @Override + public FeralInstinct copy() { + return new FeralInstinct(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/Solfatara.java b/Mage.Sets/src/mage/sets/visions/Solfatara.java new file mode 100644 index 00000000000..293563acd92 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/Solfatara.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.visions; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.TargetPlayer; + +/** + * + * @author fireshoes + */ +public class Solfatara extends CardImpl { + + public Solfatara(UUID ownerId) { + super(ownerId, 93, "Solfatara", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "VIS"; + + // Target player can't play land cards this turn. + this.getSpellAbility().addEffect(new SolfataraEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse), false)); + } + + public Solfatara(final Solfatara card) { + super(card); + } + + @Override + public Solfatara copy() { + return new Solfatara(this); + } +} + +class SolfataraEffect extends ContinuousRuleModifyingEffectImpl { + + public SolfataraEffect() { + super(Duration.EndOfTurn, Outcome.Detriment); + staticText = "Target player can't play land cards this turn."; + } + + public SolfataraEffect(final SolfataraEffect effect) { + super(effect); + } + + @Override + public SolfataraEffect copy() { + return new SolfataraEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public String getInfoMessage(Ability source, GameEvent event, Game game) { + MageObject mageObject = game.getObject(source.getSourceId()); + if (mageObject != null) { + return "You can't play lands this turn (" + mageObject.getLogName() + ")."; + } + return null; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.PLAY_LAND && event.getPlayerId().equals(source.getFirstTarget())) { + return true; + } + return false; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderAllEffect.java b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java similarity index 86% rename from Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderAllEffect.java rename to Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java index 11b4b3b945d..85a4e2eff67 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderAllEffect.java @@ -42,28 +42,28 @@ import mage.game.permanent.Permanent; * * @author Quercitron */ -public class CanAttackAsThoughtItDidntHaveDefenderAllEffect extends AsThoughEffectImpl { +public class CanAttackAsThoughItDidntHaveDefenderAllEffect extends AsThoughEffectImpl { private final FilterPermanent filter; - public CanAttackAsThoughtItDidntHaveDefenderAllEffect(Duration duration) { + public CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration duration) { this(duration, new FilterCreaturePermanent()); } - public CanAttackAsThoughtItDidntHaveDefenderAllEffect(Duration duration, FilterPermanent filter) { + public CanAttackAsThoughItDidntHaveDefenderAllEffect(Duration duration, FilterPermanent filter) { super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit); this.filter = filter; this.staticText = getText(); } - public CanAttackAsThoughtItDidntHaveDefenderAllEffect(final CanAttackAsThoughtItDidntHaveDefenderAllEffect effect) { + public CanAttackAsThoughItDidntHaveDefenderAllEffect(final CanAttackAsThoughItDidntHaveDefenderAllEffect effect) { super(effect); this.filter = effect.filter.copy(); } @Override - public CanAttackAsThoughtItDidntHaveDefenderAllEffect copy() { - return new CanAttackAsThoughtItDidntHaveDefenderAllEffect(this); + public CanAttackAsThoughItDidntHaveDefenderAllEffect copy() { + return new CanAttackAsThoughItDidntHaveDefenderAllEffect(this); } @Override diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderSourceEffect.java b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderSourceEffect.java similarity index 82% rename from Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderSourceEffect.java rename to Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderSourceEffect.java index eb7dcc3c538..955229cae23 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderSourceEffect.java @@ -1,69 +1,69 @@ -/* - * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are 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.combat; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.AsThoughEffectImpl; -import mage.constants.AsThoughEffectType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.game.Game; - -/** - * - * @author LevelX2 - */ - -public class CanAttackAsThoughtItDidntHaveDefenderSourceEffect extends AsThoughEffectImpl { - - public CanAttackAsThoughtItDidntHaveDefenderSourceEffect(Duration duration) { - super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit); - staticText = "{this} can attack as though it didn't have defender"; - } - - public CanAttackAsThoughtItDidntHaveDefenderSourceEffect(final CanAttackAsThoughtItDidntHaveDefenderSourceEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public CanAttackAsThoughtItDidntHaveDefenderSourceEffect copy() { - return new CanAttackAsThoughtItDidntHaveDefenderSourceEffect(this); - } - - @Override - public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - return objectId.equals(source.getSourceId()); - } - -} +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.combat; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; + +/** + * + * @author LevelX2 + */ + +public class CanAttackAsThoughItDidntHaveDefenderSourceEffect extends AsThoughEffectImpl { + + public CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration duration) { + super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit); + staticText = "{this} can attack as though it didn't have defender"; + } + + public CanAttackAsThoughItDidntHaveDefenderSourceEffect(final CanAttackAsThoughItDidntHaveDefenderSourceEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public CanAttackAsThoughItDidntHaveDefenderSourceEffect copy() { + return new CanAttackAsThoughItDidntHaveDefenderSourceEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + return objectId.equals(source.getSourceId()); + } + +} diff --git a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderTargetEffect.java b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderTargetEffect.java similarity index 85% rename from Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderTargetEffect.java rename to Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderTargetEffect.java index 604fa931fae..65b2e77b05c 100644 --- a/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughtItDidntHaveDefenderTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/combat/CanAttackAsThoughItDidntHaveDefenderTargetEffect.java @@ -1,84 +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.abilities.effects.common.combat; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.effects.AsThoughEffectImpl; -import mage.constants.AsThoughEffectType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.game.Game; - -/** - * - * @author LevelX2 - */ - -public class CanAttackAsThoughtItDidntHaveDefenderTargetEffect extends AsThoughEffectImpl { - - public CanAttackAsThoughtItDidntHaveDefenderTargetEffect(Duration duration) { - super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit); - } - - public CanAttackAsThoughtItDidntHaveDefenderTargetEffect(final CanAttackAsThoughtItDidntHaveDefenderTargetEffect effect) { - super(effect); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public CanAttackAsThoughtItDidntHaveDefenderTargetEffect copy() { - return new CanAttackAsThoughtItDidntHaveDefenderTargetEffect(this); - } - - @Override - public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - return this.getTargetPointer().getTargets(game, source).contains(objectId); - } - - @Override - public String getText(Mode mode) { - if (staticText != null && !staticText.isEmpty()) { - return staticText; - } - if (!mode.getTargets().isEmpty()) { - if (this.duration == Duration.EndOfTurn) { - return "Target " + mode.getTargets().get(0).getTargetName() + " can attack this turn as though it didn't have defender"; - } else { - return "Target " + mode.getTargets().get(0).getTargetName() + " can attack as though it didn't have defender"; - } - } else { - throw new UnsupportedOperationException("No target defined"); - } - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.combat; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.constants.AsThoughEffectType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; + +/** + * + * @author LevelX2 + */ + +public class CanAttackAsThoughItDidntHaveDefenderTargetEffect extends AsThoughEffectImpl { + + public CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration duration) { + super(AsThoughEffectType.ATTACK, duration, Outcome.Benefit); + } + + public CanAttackAsThoughItDidntHaveDefenderTargetEffect(final CanAttackAsThoughItDidntHaveDefenderTargetEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public CanAttackAsThoughItDidntHaveDefenderTargetEffect copy() { + return new CanAttackAsThoughItDidntHaveDefenderTargetEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + return this.getTargetPointer().getTargets(game, source).contains(objectId); + } + + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + if (!mode.getTargets().isEmpty()) { + if (this.duration == Duration.EndOfTurn) { + return "Target " + mode.getTargets().get(0).getTargetName() + " can attack this turn as though it didn't have defender"; + } else { + return "Target " + mode.getTargets().get(0).getTargetName() + " can attack as though it didn't have defender"; + } + } else { + throw new UnsupportedOperationException("No target defined"); + } + } +} diff --git a/Mage/src/mage/abilities/keyword/ForestwalkAbility.java b/Mage/src/mage/abilities/keyword/ForestwalkAbility.java index d9759823acd..7fd376b9188 100644 --- a/Mage/src/mage/abilities/keyword/ForestwalkAbility.java +++ b/Mage/src/mage/abilities/keyword/ForestwalkAbility.java @@ -43,7 +43,11 @@ public class ForestwalkAbility extends LandwalkAbility { } public ForestwalkAbility() { - super(filter); + this(true); + } + + public ForestwalkAbility(boolean withHintText) { + super(filter, withHintText); } public ForestwalkAbility(final ForestwalkAbility ability) { diff --git a/Mage/src/mage/abilities/keyword/IslandwalkAbility.java b/Mage/src/mage/abilities/keyword/IslandwalkAbility.java index af767fd91b1..b3d8e356a9d 100644 --- a/Mage/src/mage/abilities/keyword/IslandwalkAbility.java +++ b/Mage/src/mage/abilities/keyword/IslandwalkAbility.java @@ -43,7 +43,11 @@ public class IslandwalkAbility extends LandwalkAbility { } public IslandwalkAbility() { - super(filter); + this(true); + } + + public IslandwalkAbility(boolean withHintText) { + super(filter, withHintText); } public IslandwalkAbility(final IslandwalkAbility ability) { diff --git a/Mage/src/mage/abilities/keyword/MountainwalkAbility.java b/Mage/src/mage/abilities/keyword/MountainwalkAbility.java index 7624395b402..01a48345567 100644 --- a/Mage/src/mage/abilities/keyword/MountainwalkAbility.java +++ b/Mage/src/mage/abilities/keyword/MountainwalkAbility.java @@ -43,7 +43,11 @@ public class MountainwalkAbility extends LandwalkAbility { } public MountainwalkAbility() { - super(filter); + this(true); + } + + public MountainwalkAbility(boolean withHintText) { + super(filter, withHintText); } public MountainwalkAbility(final MountainwalkAbility ability) { diff --git a/Mage/src/mage/abilities/keyword/PlainswalkAbility.java b/Mage/src/mage/abilities/keyword/PlainswalkAbility.java index 553101661b9..f16dfa05ff2 100644 --- a/Mage/src/mage/abilities/keyword/PlainswalkAbility.java +++ b/Mage/src/mage/abilities/keyword/PlainswalkAbility.java @@ -32,7 +32,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; /** * - * @author nantuko + * @author BetaSteward_at_googlemail.com */ public class PlainswalkAbility extends LandwalkAbility { @@ -43,7 +43,11 @@ public class PlainswalkAbility extends LandwalkAbility { } public PlainswalkAbility() { - super(filter); + this(true); + } + + public PlainswalkAbility(boolean withHintText) { + super(filter, withHintText); } public PlainswalkAbility(final PlainswalkAbility ability) { diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 15958a9d832..15163732418 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -68,7 +68,9 @@ public enum CounterType { LOYALTY("loyalty"), MANNEQUIN("mannequin"), M1M1(new BoostCounter(-1, -1).name), + M2M2(new BoostCounter(-2, -2).name), MINING("mining"), + P1P0(new BoostCounter(1, 0).name), P1P1(new BoostCounter(1, 1).name), P2P2(new BoostCounter(2, 2).name), PAGE("page"), @@ -126,12 +128,16 @@ public enum CounterType { */ public Counter createInstance(int amount) { switch (this) { + case P1P0: + return new BoostCounter(1, 0, amount); case P1P1: return new BoostCounter(1, 1, amount); case P2P2: return new BoostCounter(2, 2, amount); case M1M1: return new BoostCounter(-1, -1, amount); + case M2M2: + return new BoostCounter(-2, -2, amount); default: return new Counter(name, amount); } From 5c3a3efb3434c788622fe5ae2cfacde09f85ddc0 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 10:12:57 +0300 Subject: [PATCH 05/17] Implement cards: Corrupt Court Official, Corrupt Eunuchs, Ghostly Visit, and Mystic Denial --- .../masterseditioniii/CorruptEunuchs.java | 68 ++++++++++++++++++ .../sets/masterseditioniii/GhostlyVisit.java | 52 ++++++++++++++ .../src/mage/sets/portal/MysticDenial.java | 69 ++++++++++++++++++ .../sets/portalsecondage/MysticDenial.java | 52 ++++++++++++++ .../CorruptCourtOfficial.java | 68 ++++++++++++++++++ .../portalthreekingdoms/CorruptEunuchs.java | 52 ++++++++++++++ .../portalthreekingdoms/GhostlyVisit.java | 70 +++++++++++++++++++ .../portalthreekingdoms/MysticDenial.java | 52 ++++++++++++++ 8 files changed, 483 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.java create mode 100644 Mage.Sets/src/mage/sets/portal/MysticDenial.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.java b/Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.java new file mode 100644 index 00000000000..266fba9eeba --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/CorruptEunuchs.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class CorruptEunuchs extends CardImpl { + + public CorruptEunuchs(UUID ownerId) { + super(ownerId, 92, "Corrupt Eunuchs", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Corrupt Eunuchs enters the battlefield, it deals 2 damage to target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(2), false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public CorruptEunuchs(final CorruptEunuchs card) { + super(card); + } + + @Override + public CorruptEunuchs copy() { + return new CorruptEunuchs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.java b/Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.java new file mode 100644 index 00000000000..a9f1ec18d0e --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/GhostlyVisit.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class GhostlyVisit extends mage.sets.portalthreekingdoms.GhostlyVisit { + + public GhostlyVisit(UUID ownerId) { + super(ownerId); + this.cardNumber = 67; + this.expansionSetCode = "ME3"; + } + + public GhostlyVisit(final GhostlyVisit card) { + super(card); + } + + @Override + public GhostlyVisit copy() { + return new GhostlyVisit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portal/MysticDenial.java b/Mage.Sets/src/mage/sets/portal/MysticDenial.java new file mode 100644 index 00000000000..94dc18ea422 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portal/MysticDenial.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.portal; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author LoneFox + */ +public class MysticDenial extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("creature or sorcery spell"); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.SORCERY))); + } + + public MysticDenial(UUID ownerId) { + super(ownerId, 62, "Mystic Denial", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + this.expansionSetCode = "POR"; + + // Counter target creature or sorcery spell. + this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + } + + public MysticDenial(final MysticDenial card) { + super(card); + } + + @Override + public MysticDenial copy() { + return new MysticDenial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.java b/Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.java new file mode 100644 index 00000000000..c814123cb55 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/MysticDenial.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalsecondage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MysticDenial extends mage.sets.portal.MysticDenial { + + public MysticDenial(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "PO2"; + } + + public MysticDenial(final MysticDenial card) { + super(card); + } + + @Override + public MysticDenial copy() { + return new MysticDenial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.java new file mode 100644 index 00000000000..9f2a8abf50d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptCourtOfficial.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class CorruptCourtOfficial extends CardImpl { + + public CorruptCourtOfficial(UUID ownerId) { + super(ownerId, 71, "Corrupt Court Official", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Corrupt Court Official enters the battlefield, target opponent discards a card. + Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(1)); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public CorruptCourtOfficial(final CorruptCourtOfficial card) { + super(card); + } + + @Override + public CorruptCourtOfficial copy() { + return new CorruptCourtOfficial(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.java new file mode 100644 index 00000000000..f3177279c15 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CorruptEunuchs.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class CorruptEunuchs extends mage.sets.masterseditioniii.CorruptEunuchs { + + public CorruptEunuchs(UUID ownerId) { + super(ownerId); + this.cardNumber = 106; + this.expansionSetCode = "PTK"; + } + + public CorruptEunuchs(final CorruptEunuchs card) { + super(card); + } + + @Override + public CorruptEunuchs copy() { + return new CorruptEunuchs(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.java new file mode 100644 index 00000000000..7f481d21d42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/GhostlyVisit.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.portalthreekingdoms; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class GhostlyVisit extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public GhostlyVisit(UUID ownerId) { + super(ownerId, 76, "Ghostly Visit", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "PTK"; + + // Destroy target nonblack creature. + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public GhostlyVisit(final GhostlyVisit card) { + super(card); + } + + @Override + public GhostlyVisit copy() { + return new GhostlyVisit(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.java new file mode 100644 index 00000000000..242b23636e8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/MysticDenial.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MysticDenial extends mage.sets.portal.MysticDenial { + + public MysticDenial(UUID ownerId) { + super(ownerId); + this.cardNumber = 49; + this.expansionSetCode = "PTK"; + } + + public MysticDenial(final MysticDenial card) { + super(card); + } + + @Override + public MysticDenial copy() { + return new MysticDenial(this); + } +} From 0e8c64c97f04e715b0c048a54c0cb5a678551c29 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 11:23:00 +0300 Subject: [PATCH 06/17] Implement cards: Liu Bei, Lord of Shu; Riding the Dilu Horse; Sun Ce, Young Conquerer; and Trip Wire --- .../masterseditioniii/LiuBeiLordOfShu.java | 52 ++++++++++++ .../masterseditioniii/RidingTheDiluHorse.java | 67 +++++++++++++++ .../SunCeYoungConquerer.java | 72 ++++++++++++++++ .../mage/sets/masterseditioniii/TripWire.java | 68 +++++++++++++++ .../portalthreekingdoms/LiuBeiLordOfShu.java | 85 +++++++++++++++++++ .../RidingTheDiluHorse.java | 54 ++++++++++++ .../SunCeYoungConquerer.java | 54 ++++++++++++ .../sets/portalthreekingdoms/TripWire.java | 54 ++++++++++++ 8 files changed, 506 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/TripWire.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.java b/Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.java new file mode 100644 index 00000000000..e98e81460f4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/LiuBeiLordOfShu.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class LiuBeiLordOfShu extends mage.sets.portalthreekingdoms.LiuBeiLordOfShu { + + public LiuBeiLordOfShu(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "ME3"; + } + + public LiuBeiLordOfShu(final LiuBeiLordOfShu card) { + super(card); + } + + @Override + public LiuBeiLordOfShu copy() { + return new LiuBeiLordOfShu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.java b/Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.java new file mode 100644 index 00000000000..20069b53790 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/RidingTheDiluHorse.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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RidingTheDiluHorse extends CardImpl { + + public RidingTheDiluHorse(UUID ownerId) { + super(ownerId, 131, "Riding the Dilu Horse", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "ME3"; + + // Target creature gets +2/+2 and gains horsemanship. + this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityTargetEffect(HorsemanshipAbility.getInstance(), Duration.WhileOnBattlefield); + effect.setText("and gains horsemanship"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public RidingTheDiluHorse(final RidingTheDiluHorse card) { + super(card); + } + + @Override + public RidingTheDiluHorse copy() { + return new RidingTheDiluHorse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.java b/Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.java new file mode 100644 index 00000000000..be6957bee40 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/SunCeYoungConquerer.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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class SunCeYoungConquerer extends CardImpl { + + public SunCeYoungConquerer(UUID ownerId) { + super(ownerId, 52, "Sun Ce, Young Conquerer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "ME3"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // When Sun Ce, Young Conquerer enters the battlefield, you may return target creature to its owner's hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SunCeYoungConquerer(final SunCeYoungConquerer card) { + super(card); + } + + @Override + public SunCeYoungConquerer copy() { + return new SunCeYoungConquerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/TripWire.java b/Mage.Sets/src/mage/sets/masterseditioniii/TripWire.java new file mode 100644 index 00000000000..f95dca4b43e --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/TripWire.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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class TripWire extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with horsemanship"); + + static { + filter.add(new AbilityPredicate(HorsemanshipAbility.class)); + } + + public TripWire(UUID ownerId) { + super(ownerId, 137, "Trip Wire", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{G}"); + this.expansionSetCode = "ME3"; + + // Destroy target creature with horsemanship. + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public TripWire(final TripWire card) { + super(card); + } + + @Override + public TripWire copy() { + return new TripWire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.java new file mode 100644 index 00000000000..104fa35252f --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/LiuBeiLordOfShu.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; + +/** + * + * @author LoneFox + */ +public class LiuBeiLordOfShu extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(Predicates.or(new NamePredicate("Guan Yu, Sainted Warrior"), + new NamePredicate("Zhang Fei, Fierce Warrior"))); + } + + public LiuBeiLordOfShu(UUID ownerId) { + super(ownerId, 11, "Liu Bei, Lord of Shu", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // Liu Bei, Lord of Shu gets +2/+2 as long as you control a permanent named Guan Yu, Sainted Warrior or a permanent named Zhang Fei, Fierce Warrior. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(2, 2, Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter), + "{this} gets +2/+2 as long as you control a permanent named Guan Yu, Sainted Warrior or a permanent named Zhang Fei, Fierce Warrior"))); + } + + public LiuBeiLordOfShu(final LiuBeiLordOfShu card) { + super(card); + } + + @Override + public LiuBeiLordOfShu copy() { + return new LiuBeiLordOfShu(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java new file mode 100644 index 00000000000..12887868cab --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingTheDiluHorse.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class RidingTheDiluHorse extends mage.sets.masterseditioniii.RidingTheDiluHorse { + + public RidingTheDiluHorse(UUID ownerId) { + super(ownerId); + this.cardNumber = 144; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.RARE; + } + + public RidingTheDiluHorse(final RidingTheDiluHorse card) { + super(card); + } + + @Override + public RidingTheDiluHorse copy() { + return new RidingTheDiluHorse(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java new file mode 100644 index 00000000000..da5fcfdebcf --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/SunCeYoungConquerer.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SunCeYoungConquerer extends mage.sets.masterseditioniii.SunCeYoungConquerer { + + public SunCeYoungConquerer(UUID ownerId) { + super(ownerId); + this.cardNumber = 55; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.RARE; + } + + public SunCeYoungConquerer(final SunCeYoungConquerer card) { + super(card); + } + + @Override + public SunCeYoungConquerer copy() { + return new SunCeYoungConquerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java new file mode 100644 index 00000000000..ee30216aae1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/TripWire.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class TripWire extends mage.sets.masterseditioniii.TripWire { + + public TripWire(UUID ownerId) { + super(ownerId); + this.cardNumber = 156; + this.expansionSetCode = "PTK"; + this.rarity = Rarity.UNCOMMON; + } + + public TripWire(final TripWire card) { + super(card); + } + + @Override + public TripWire copy() { + return new TripWire(this); + } +} From 07f4617713a3c48135ba87eb129d40ad991ce019 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 11:52:40 +0300 Subject: [PATCH 07/17] Implement cards: Burning Fields, Hunting Cheetah, Shu Grain Caravan, and Yellow Scarves Troops --- .../masterseditioniii/HuntingCheetah.java | 54 ++++++++++++++ .../portalthreekingdoms/BurningFields.java | 60 ++++++++++++++++ .../portalthreekingdoms/HuntingCheetah.java | 72 +++++++++++++++++++ .../portalthreekingdoms/ShuGrainCaravan.java | 64 +++++++++++++++++ .../YellowScarvesTroops.java | 63 ++++++++++++++++ 5 files changed, 313 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java b/Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java new file mode 100644 index 00000000000..3ae56e6bfd3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/HuntingCheetah.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class HuntingCheetah extends mage.sets.portalthreekingdoms.HuntingCheetah { + + public HuntingCheetah(UUID ownerId) { + super(ownerId); + this.cardNumber = 124; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public HuntingCheetah(final HuntingCheetah card) { + super(card); + } + + @Override + public HuntingCheetah copy() { + return new HuntingCheetah(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.java new file mode 100644 index 00000000000..402d09f0305 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/BurningFields.java @@ -0,0 +1,60 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class BurningFields extends CardImpl { + + public BurningFields(UUID ownerId) { + super(ownerId, 103, "Burning Fields", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{4}{R}"); + this.expansionSetCode = "PTK"; + + // Burning Fields deals 5 damage to target opponent. + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + } + + public BurningFields(final BurningFields card) { + super(card); + } + + @Override + public BurningFields copy() { + return new BurningFields(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.java new file mode 100644 index 00000000000..b7df3c83fbf --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/HuntingCheetah.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsDamageToOpponentTriggeredAbility; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LoneFox + */ +public class HuntingCheetah extends CardImpl { + + private static final FilterCard filter = new FilterCard("Forest card"); + + static { + filter.add(new SubtypePredicate("Forest")); + } + + public HuntingCheetah(UUID ownerId) { + super(ownerId, 138, "Hunting Cheetah", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Cat"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever Hunting Cheetah deals damage to an opponent, you may search your library for a Forest card, reveal that card, put it into your hand, then shuffle your library. + this.addAbility(new DealsDamageToOpponentTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), true)); + } + + public HuntingCheetah(final HuntingCheetah card) { + super(card); + } + + @Override + public HuntingCheetah copy() { + return new HuntingCheetah(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.java new file mode 100644 index 00000000000..965843b0092 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuGrainCaravan.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuGrainCaravan extends CardImpl { + + public ShuGrainCaravan(UUID ownerId) { + super(ownerId, 26, "Shu Grain Caravan", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Shu Grain Caravan enters the battlefield, you gain 2 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2))); + } + + public ShuGrainCaravan(final ShuGrainCaravan card) { + super(card); + } + + @Override + public ShuGrainCaravan copy() { + return new ShuGrainCaravan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java new file mode 100644 index 00000000000..123664560a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/YellowScarvesTroops.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class YellowScarvesTroops extends CardImpl { + + public YellowScarvesTroops(UUID ownerId) { + super(ownerId, 127, "Yellow Scarves Troops", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Yellow Scarves Troops can't block. + this.addAbility(new CantBlockAbility()); + } + + public YellowScarvesTroops(final YellowScarvesTroops card) { + super(card); + } + + @Override + public YellowScarvesTroops copy() { + return new YellowScarvesTroops(this); + } +} From 11cde1fcb9f7fad458b42cdbdec0714b9621d383 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 13:40:20 +0300 Subject: [PATCH 08/17] Implement cards: Borrowing the East Wind; Cao Ren, Wei Commander; Sima Yi, Wei Field Marshal; and Wu Admiral --- .../BorrowingTheEastWind.java | 67 +++++++++++++++ .../CaoRenWeiCommander.java | 69 +++++++++++++++ .../SimaYiWeiFieldMarshal.java | 75 +++++++++++++++++ .../sets/portalthreekingdoms/WuAdmiral.java | 83 +++++++++++++++++++ 4 files changed, 294 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.java diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.java new file mode 100644 index 00000000000..31ccf10a387 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/BorrowingTheEastWind.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageEverythingEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LoneFox + */ +public class BorrowingTheEastWind extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with horsemanship"); + + static { + filter.add(new AbilityPredicate(HorsemanshipAbility.class)); + } + + public BorrowingTheEastWind(UUID ownerId) { + super(ownerId, 133, "Borrowing the East Wind", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{G}{G}"); + this.expansionSetCode = "PTK"; + + // Borrowing the East Wind deals X damage to each creature with horsemanship and each player. + this.getSpellAbility().addEffect(new DamageEverythingEffect(new ManacostVariableValue(), filter)); } + + public BorrowingTheEastWind(final BorrowingTheEastWind card) { + super(card); + } + + @Override + public BorrowingTheEastWind copy() { + return new BorrowingTheEastWind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.java new file mode 100644 index 00000000000..8bf4749d878 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CaoRenWeiCommander.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CaoRenWeiCommander extends CardImpl { + + public CaoRenWeiCommander(UUID ownerId) { + super(ownerId, 69, "Cao Ren, Wei Commander", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Horsemanship + this.addAbility(HorsemanshipAbility.getInstance()); + // When Cao Ren, Wei Commander enters the battlefield, you lose 3 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(3))); + } + + public CaoRenWeiCommander(final CaoRenWeiCommander card) { + super(card); + } + + @Override + public CaoRenWeiCommander copy() { + return new CaoRenWeiCommander(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.java new file mode 100644 index 00000000000..1080daa8204 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/SimaYiWeiFieldMarshal.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + */ +public class SimaYiWeiFieldMarshal extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Swamps you control"); + + static{ + filter.add(new SubtypePredicate("Swamp")); + } + + public SimaYiWeiFieldMarshal(UUID ownerId) { + super(ownerId, 82, "Sima Yi, Wei Field Marshal", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}"); + this.expansionSetCode = "PTK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Sima Yi, Wei Field Marshal's power is equal to the number of Swamps you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(filter), Duration.EndOfGame))); } + + public SimaYiWeiFieldMarshal(final SimaYiWeiFieldMarshal card) { + super(card); + } + + @Override + public SimaYiWeiFieldMarshal copy() { + return new SimaYiWeiFieldMarshal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.java new file mode 100644 index 00000000000..9d732edec3a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WuAdmiral.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition.CountType; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerPredicate; + +/** + * + * @author LoneFox + */ +public class WuAdmiral extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new SubtypePredicate("Island")); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public WuAdmiral(UUID ownerId) { + super(ownerId, 57, "Wu Admiral", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Wu Admiral gets +1/+1 as long as an opponent controls an Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), + new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 0, false), + "{this} gets +1/+1 as long as an opponent controls an Island"))); + } + + public WuAdmiral(final WuAdmiral card) { + super(card); + } + + @Override + public WuAdmiral copy() { + return new WuAdmiral(this); + } +} From 70e7465a4e2f99b8780060bcdb70e2a2a00e5698 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 14:53:23 +0300 Subject: [PATCH 09/17] Implement cards: Council of Advisors, Return to Battle, Riding Red Hare, and Stolen Grain --- .../sets/masterseditioniii/StolenGrain.java | 62 +++++++++++++++++ .../CouncilOfAdvisors.java | 64 +++++++++++++++++ .../portalthreekingdoms/ReturnToBattle.java | 61 ++++++++++++++++ .../portalthreekingdoms/RidingRedHare.java | 69 +++++++++++++++++++ .../sets/portalthreekingdoms/StolenGrain.java | 52 ++++++++++++++ 5 files changed, 308 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.java b/Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.java new file mode 100644 index 00000000000..b8a7ad87418 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/StolenGrain.java @@ -0,0 +1,62 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + */ +public class StolenGrain extends CardImpl { + + public StolenGrain(UUID ownerId) { + super(ownerId, 75, "Stolen Grain", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "ME3"; + + // Stolen Grain deals 5 damage to target opponent. You gain 5 life. + this.getSpellAbility().addEffect(new DamageTargetEffect(5)); + this.getSpellAbility().addEffect(new GainLifeEffect(5)); + this.getSpellAbility().addTarget(new TargetOpponent()); + } + + public StolenGrain(final StolenGrain card) { + super(card); + } + + @Override + public StolenGrain copy() { + return new StolenGrain(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.java new file mode 100644 index 00000000000..3d2eeda876b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/CouncilOfAdvisors.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CouncilOfAdvisors extends CardImpl { + + public CouncilOfAdvisors(UUID ownerId) { + super(ownerId, 40, "Council of Advisors", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // When Council of Advisors enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1))); + } + + public CouncilOfAdvisors(final CouncilOfAdvisors card) { + super(card); + } + + @Override + public CouncilOfAdvisors copy() { + return new CouncilOfAdvisors(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java new file mode 100644 index 00000000000..b383044698b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ReturnToBattle.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LoneFox + */ +public class ReturnToBattle extends CardImpl { + + public ReturnToBattle(UUID ownerId) { + super(ownerId, 81, "Return to Battle", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "PTK"; + + // Return target creature card from your graveyard to your hand. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + } + + public ReturnToBattle(final ReturnToBattle card) { + super(card); + } + + @Override + public ReturnToBattle copy() { + return new ReturnToBattle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.java new file mode 100644 index 00000000000..3a946867abc --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/RidingRedHare.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RidingRedHare extends CardImpl { + + public RidingRedHare(UUID ownerId) { + super(ownerId, 18, "Riding Red Hare", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "PTK"; + + // Target creature gets +3/+3 and gains horsemanship until end of turn. + Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn); + effect.setText("Target creature gets +3/+3"); + this.getSpellAbility().addEffect(effect); + effect = new GainAbilityTargetEffect(HorsemanshipAbility.getInstance(), Duration.EndOfTurn); + effect.setText("and gains horsemanship until end of turn"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public RidingRedHare(final RidingRedHare card) { + super(card); + } + + @Override + public RidingRedHare copy() { + return new RidingRedHare(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.java new file mode 100644 index 00000000000..794a7c58930 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/StolenGrain.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class StolenGrain extends mage.sets.masterseditioniii.StolenGrain { + + public StolenGrain(UUID ownerId) { + super(ownerId); + this.cardNumber = 83; + this.expansionSetCode = "PTK"; + } + + public StolenGrain(final StolenGrain card) { + super(card); + } + + @Override + public StolenGrain copy() { + return new StolenGrain(this); + } +} From d3ce238b53d4d133c73438a9329f8bc6b183a813 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 26 Aug 2015 15:48:47 +0200 Subject: [PATCH 10/17] Fixed a NPE of PutTokenOntoBattlefieldCopyTargetEffect. --- .../effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java index 7bb195b8266..1d740f6f94c 100644 --- a/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PutTokenOntoBattlefieldCopyTargetEffect.java @@ -85,7 +85,7 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect { this.playerId = effect.playerId; this.additionalCardType = effect.additionalCardType; this.gainsHaste = effect.gainsHaste; - this.addedTokenPermanents.addAll(effect.addedTokenPermanents); + this.addedTokenPermanents = new ArrayList<>(effect.addedTokenPermanents); } @Override From 0ee22d90ca2331c2ff087d23c3e767e2c925f60e Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 26 Aug 2015 16:29:57 +0200 Subject: [PATCH 11/17] Allow hand card ordering by drag'n'drop only with left mouse button. --- .../java/mage/client/plugins/adapters/MageActionCallback.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java index 2d7f70b7a2b..83ba8b763d2 100644 --- a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java +++ b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java @@ -292,6 +292,10 @@ public class MageActionCallback implements ActionCallback { // drag'n'drop is allowed for HAND zone only return; } + if (!SwingUtilities.isLeftMouseButton(e)) { + // only allow draging with the left mouse button + return; + } isDragging = true; prevCard = card; Point p = card.getCardLocation(); From 97a8b351b45872b43083a558c19f5f543e3a7cfa Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 26 Aug 2015 16:30:32 +0200 Subject: [PATCH 12/17] Fixed a problem that show cards window was not closed (e.g. for libraray card selection). --- .../main/java/mage/client/game/GamePanel.java | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index aab803819d8..7ba3fae85f0 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -199,14 +199,14 @@ public final class GamePanel extends javax.swing.JPanel { // CardView popupMenu was invoked last private CardView cardViewPopupMenu; - // popup menu for a card - private JPopupMenu popupMenuCardPanel; + // popup menu for triggered abilities order + private JPopupMenu popupMenuTriggerOrder; public GamePanel() { initComponents(); - createTriggerOrderPupupMenu(); - this.add(popupMenuCardPanel); + initPopupMenuTriggerOrder(); + //this.add(popupMenuTriggerOrder); pickNumber = new PickNumberDialog(); MageFrame.getDesktop().add(pickNumber, JLayeredPane.MODAL_LAYER); @@ -1107,12 +1107,10 @@ public final class GamePanel extends javax.swing.JPanel { hideAll(); ShowCardsDialog showCards = new ShowCardsDialog(); JPopupMenu popupMenu = null; - Listener eventListener = null; if (PopUpMenuType.TRIGGER_ORDER.equals(popupMenuType)) { - popupMenu = getTriggerOrderPopupMenu(); - eventListener = getTriggerOrderEventListener(showCards); + popupMenu = popupMenuTriggerOrder; } - showCards.loadCards(title, cards, bigCard, Config.dimensionsEnlarged, gameId, required, options, popupMenu, eventListener); + showCards.loadCards(title, cards, bigCard, Config.dimensionsEnlarged, gameId, required, options, popupMenu, getShowCardsEventListener(showCards)); return showCards; } @@ -1985,8 +1983,8 @@ public final class GamePanel extends javax.swing.JPanel { hoverButtons.put(name, button); } - // TriggerOrderPopupMenu - private Listener getTriggerOrderEventListener(final ShowCardsDialog dialog) { + // Event listener for the ShowCardsDialog + private Listener getShowCardsEventListener(final ShowCardsDialog dialog) { return new Listener() { @Override public void event(Event event) { @@ -2011,7 +2009,8 @@ public final class GamePanel extends javax.swing.JPanel { String abilityRuleText = null; if (cardViewPopupMenu instanceof CardView && cardViewPopupMenu.getAbility() != null) { abilityId = cardViewPopupMenu.getAbility().getId(); - if (!cardViewPopupMenu.getAbility().getRules().isEmpty() && !cardViewPopupMenu.getAbility().getRules().equals("")) { + if (!cardViewPopupMenu.getAbility().getRules().isEmpty() + && !cardViewPopupMenu.getAbility().getRules().get(0).isEmpty()) { abilityRuleText = cardViewPopupMenu.getAbility().getRules().get(0); } } @@ -2038,11 +2037,7 @@ public final class GamePanel extends javax.swing.JPanel { } } - public JPopupMenu getTriggerOrderPopupMenu() { - return popupMenuCardPanel; - } - - private void createTriggerOrderPupupMenu() { + private void initPopupMenuTriggerOrder() { ActionListener actionListener = new ActionListener() { @Override @@ -2051,34 +2046,34 @@ public final class GamePanel extends javax.swing.JPanel { } }; - popupMenuCardPanel = new JPopupMenu(); + popupMenuTriggerOrder = new JPopupMenu(); // String tooltipText = ""; JMenuItem menuItem; menuItem = new JMenuItem("Put this ability always first on the stack"); menuItem.setActionCommand(CMD_AUTO_ORDER_FIRST); menuItem.addActionListener(actionListener); - popupMenuCardPanel.add(menuItem); + popupMenuTriggerOrder.add(menuItem); menuItem = new JMenuItem("Put this ability always last on the stack"); menuItem.setActionCommand(CMD_AUTO_ORDER_LAST); menuItem.addActionListener(actionListener); - popupMenuCardPanel.add(menuItem); + popupMenuTriggerOrder.add(menuItem); menuItem = new JMenuItem("Put all abilities with that rule text always first on the stack"); menuItem.setActionCommand(CMD_AUTO_ORDER_NAME_FIRST); menuItem.addActionListener(actionListener); - popupMenuCardPanel.add(menuItem); + popupMenuTriggerOrder.add(menuItem); menuItem = new JMenuItem("Put all abilities with that rule text always last on the stack"); menuItem.setActionCommand(CMD_AUTO_ORDER_NAME_LAST); menuItem.addActionListener(actionListener); - popupMenuCardPanel.add(menuItem); + popupMenuTriggerOrder.add(menuItem); menuItem = new JMenuItem("Reset all order settings for triggered abilities"); menuItem.setActionCommand(CMD_AUTO_ORDER_RESET_ALL); menuItem.addActionListener(actionListener); - popupMenuCardPanel.add(menuItem); + popupMenuTriggerOrder.add(menuItem); } public String getGameLog() { From ba7b3d656485d92a313c95e41a8fa5173cfc98cd Mon Sep 17 00:00:00 2001 From: LoneFox Date: Wed, 26 Aug 2015 18:19:38 +0300 Subject: [PATCH 13/17] Implement cards: Poison Arrow, Shu Soldier-Farmers, Spring of Eternal Peace, and Young Wei Recruits --- .../masterseditioniii/ShuSoldierFarmers.java | 54 ++++++++++++++ .../masterseditioniii/YoungWeiRecruits.java | 63 ++++++++++++++++ .../sets/portalthreekingdoms/PoisonArrow.java | 72 +++++++++++++++++++ .../ShuSoldierFarmers.java | 64 +++++++++++++++++ .../SpringOfEternalPeace.java | 58 +++++++++++++++ .../portalthreekingdoms/YoungWeiRecruits.java | 52 ++++++++++++++ 6 files changed, 363 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java b/Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java new file mode 100644 index 00000000000..c045ae172cc --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ShuSoldierFarmers.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuSoldierFarmers extends mage.sets.portalthreekingdoms.ShuSoldierFarmers { + + public ShuSoldierFarmers(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public ShuSoldierFarmers(final ShuSoldierFarmers card) { + super(card); + } + + @Override + public ShuSoldierFarmers copy() { + return new ShuSoldierFarmers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java b/Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java new file mode 100644 index 00000000000..843d6ddacfa --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/YoungWeiRecruits.java @@ -0,0 +1,63 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.CantBlockAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class YoungWeiRecruits extends CardImpl { + + public YoungWeiRecruits(UUID ownerId) { + super(ownerId, 84, "Young Wei Recruits", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ME3"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Young Wei Recruits can't block. + this.addAbility(new CantBlockAbility()); + } + + public YoungWeiRecruits(final YoungWeiRecruits card) { + super(card); + } + + @Override + public YoungWeiRecruits copy() { + return new YoungWeiRecruits(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.java new file mode 100644 index 00000000000..a2c2617a16f --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/PoisonArrow.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.portalthreekingdoms; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class PoisonArrow extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public PoisonArrow(UUID ownerId) { + super(ownerId, 80, "Poison Arrow", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "PTK"; + + // Destroy target nonblack creature. You gain 3 life. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new GainLifeEffect(3)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); + } + + public PoisonArrow(final PoisonArrow card) { + super(card); + } + + @Override + public PoisonArrow copy() { + return new PoisonArrow(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.java new file mode 100644 index 00000000000..d039e4d206a --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/ShuSoldierFarmers.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.portalthreekingdoms; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class ShuSoldierFarmers extends CardImpl { + + public ShuSoldierFarmers(UUID ownerId) { + super(ownerId, 27, "Shu Soldier-Farmers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "PTK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // When Shu Soldier-Farmers enters the battlefield, you gain 4 life. + this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(4))); + } + + public ShuSoldierFarmers(final ShuSoldierFarmers card) { + super(card); + } + + @Override + public ShuSoldierFarmers copy() { + return new ShuSoldierFarmers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.java new file mode 100644 index 00000000000..c088936511b --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/SpringOfEternalPeace.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.sets.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SpringOfEternalPeace extends CardImpl { + + public SpringOfEternalPeace(UUID ownerId) { + super(ownerId, 148, "Spring of Eternal Peace", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}"); + this.expansionSetCode = "PTK"; + + // You gain 8 life. + this.getSpellAbility().addEffect(new GainLifeEffect(8)); + } + + public SpringOfEternalPeace(final SpringOfEternalPeace card) { + super(card); + } + + @Override + public SpringOfEternalPeace copy() { + return new SpringOfEternalPeace(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.java new file mode 100644 index 00000000000..83bf0b49464 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/YoungWeiRecruits.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class YoungWeiRecruits extends mage.sets.masterseditioniii.YoungWeiRecruits { + + public YoungWeiRecruits(UUID ownerId) { + super(ownerId); + this.cardNumber = 94; + this.expansionSetCode = "PTK"; + } + + public YoungWeiRecruits(final YoungWeiRecruits card) { + super(card); + } + + @Override + public YoungWeiRecruits copy() { + return new YoungWeiRecruits(this); + } +} From 3c8c439d19b27c41b35f7b367fce0c5c627c926e Mon Sep 17 00:00:00 2001 From: fireshoes Date: Wed, 26 Aug 2015 12:58:26 -0500 Subject: [PATCH 14/17] Cleaned up some of the cards from earlier and related cards. --- .../src/mage/sets/alliances/Burnout.java | 13 +- .../mage/sets/antiquities/GateToPhyrexia.java | 7 - .../darkascension/FalkenrathAristocrat.java | 234 +++++++-------- Mage.Sets/src/mage/sets/iceage/Icequake.java | 203 +++++++------ Mage.Sets/src/mage/sets/iceage/Pyroblast.java | 274 +++++++++--------- .../sets/masterseditionii/EbonPraetor.java | 2 +- .../sets/masterseditionii/Thermokarst.java | 5 +- .../mage/sets/mercadianmasques/CaveSense.java | 8 +- .../mercadianmasques/HauntedCrossroads.java | 4 +- .../sets/mercadianmasques/TigerClaws.java | 8 +- .../src/mage/sets/thedark/ScarwoodHag.java | 5 +- 11 files changed, 382 insertions(+), 381 deletions(-) diff --git a/Mage.Sets/src/mage/sets/alliances/Burnout.java b/Mage.Sets/src/mage/sets/alliances/Burnout.java index 746f36cd8de..e0c33b0a1c1 100644 --- a/Mage.Sets/src/mage/sets/alliances/Burnout.java +++ b/Mage.Sets/src/mage/sets/alliances/Burnout.java @@ -30,6 +30,7 @@ package mage.sets.alliances; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -41,6 +42,7 @@ import mage.constants.Rarity; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.CardTypePredicate; import mage.game.Game; +import mage.game.stack.Spell; import mage.target.TargetSpell; /** @@ -60,8 +62,10 @@ public class Burnout extends CardImpl { this.expansionSetCode = "ALL"; // Counter target instant spell if it's blue. + Effect effect = new BurnoutCounterTargetEffect(); + effect.setText("Counter target instant spell if it's blue"); this.getSpellAbility().addTarget(new TargetSpell(filter)); - this.getSpellAbility().addEffect(new BurnoutCounterTargetEffect()); + this.getSpellAbility().addEffect(effect); // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( @@ -95,13 +99,10 @@ class BurnoutCounterTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - if(game.getStack().getSpell(source.getFirstTarget()).getColor(game).isBlue()){ + Spell targetSpell = game.getStack().getSpell(source.getFirstTarget()); + if(targetSpell != null && targetSpell.getColor(game).isBlue()){ game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); } return true; } - - public String getText(Ability source) { - return "Counter target instant spell if it's blue"; - } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.java b/Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.java index ca2291a5eb5..1d2a88c9abc 100644 --- a/Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.java +++ b/Mage.Sets/src/mage/sets/antiquities/GateToPhyrexia.java @@ -91,11 +91,4 @@ class GateToPhyrexiaAbility extends LimitedTimesPerTurnActivatedAbility { } return super.canActivate(playerId, game); } - - @Override - public String getRule() { - StringBuilder sb = new StringBuilder(""); - sb.append(super.getRule()).append(" Activate this ability only during your upkeep."); - return sb.toString(); - } } diff --git a/Mage.Sets/src/mage/sets/darkascension/FalkenrathAristocrat.java b/Mage.Sets/src/mage/sets/darkascension/FalkenrathAristocrat.java index f31b0642508..75e242e0968 100644 --- a/Mage.Sets/src/mage/sets/darkascension/FalkenrathAristocrat.java +++ b/Mage.Sets/src/mage/sets/darkascension/FalkenrathAristocrat.java @@ -1,117 +1,117 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are 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.darkascension; - -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.SimpleActivatedAbility; -import mage.abilities.costs.Cost; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.HasteAbility; -import mage.abilities.keyword.IndestructibleAbility; -import mage.cards.CardImpl; -import mage.counters.CounterType; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.common.TargetControlledCreaturePermanent; - -/** - * - * @author North - */ -public class FalkenrathAristocrat extends CardImpl { - - public FalkenrathAristocrat(UUID ownerId) { - super(ownerId, 138, "Falkenrath Aristocrat", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{B}{R}"); - this.expansionSetCode = "DKA"; - this.subtype.add("Vampire"); - - this.power = new MageInt(4); - this.toughness = new MageInt(1); - - this.addAbility(FlyingAbility.getInstance()); - this.addAbility(HasteAbility.getInstance()); - // Sacrifice a creature: Falkenrath Aristocrat is indestructible this turn. - // If the sacrificed creature was a Human, put a +1/+1 counter on Falkenrath Aristocrat. - SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), - new SacrificeTargetCost(new TargetControlledCreaturePermanent())); - ability.addEffect(new FalkenrathAristocratEffect()); - this.addAbility(ability); - } - - public FalkenrathAristocrat(final FalkenrathAristocrat card) { - super(card); - } - - @Override - public FalkenrathAristocrat copy() { - return new FalkenrathAristocrat(this); - } -} - -class FalkenrathAristocratEffect extends OneShotEffect { - - public FalkenrathAristocratEffect() { - super(Outcome.BoostCreature); - this.staticText = "If the sacrificed creature was a Human, put a +1/+1 counter on {this}"; - } - - public FalkenrathAristocratEffect(final FalkenrathAristocratEffect effect) { - super(effect); - } - - @Override - public FalkenrathAristocratEffect copy() { - return new FalkenrathAristocratEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - for (Cost cost : source.getCosts()) { - if (cost instanceof SacrificeTargetCost) { - Permanent sacrificedCreature = ((SacrificeTargetCost) cost).getPermanents().get(0); - Permanent sourceCreature = game.getPermanent(source.getSourceId()); - if (sacrificedCreature.hasSubtype("Human") && sourceCreature != null) { - sourceCreature.addCounters(CounterType.P1P1.createInstance(), game); - return true; - } - } - } - return false; - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.darkascension; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author North + */ +public class FalkenrathAristocrat extends CardImpl { + + public FalkenrathAristocrat(UUID ownerId) { + super(ownerId, 138, "Falkenrath Aristocrat", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{2}{B}{R}"); + this.expansionSetCode = "DKA"; + this.subtype.add("Vampire"); + + this.power = new MageInt(4); + this.toughness = new MageInt(1); + + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(HasteAbility.getInstance()); + // Sacrifice a creature: Falkenrath Aristocrat is indestructible this turn. + // If the sacrificed creature was a Human, put a +1/+1 counter on Falkenrath Aristocrat. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), + new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + ability.addEffect(new FalkenrathAristocratEffect()); + this.addAbility(ability); + } + + public FalkenrathAristocrat(final FalkenrathAristocrat card) { + super(card); + } + + @Override + public FalkenrathAristocrat copy() { + return new FalkenrathAristocrat(this); + } +} + +class FalkenrathAristocratEffect extends OneShotEffect { + + public FalkenrathAristocratEffect() { + super(Outcome.BoostCreature); + this.staticText = "If the sacrificed creature was a Human, put a +1/+1 counter on {this}"; + } + + public FalkenrathAristocratEffect(final FalkenrathAristocratEffect effect) { + super(effect); + } + + @Override + public FalkenrathAristocratEffect copy() { + return new FalkenrathAristocratEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Cost cost : source.getCosts()) { + if (cost instanceof SacrificeTargetCost) { + Permanent sacrificedCreature = ((SacrificeTargetCost) cost).getPermanents().get(0); + Permanent sourceCreature = game.getPermanent(source.getSourceId()); + if (sacrificedCreature.hasSubtype("Human") && sourceCreature != null) { + sourceCreature.addCounters(CounterType.P1P1.createInstance(), game); + return true; + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Icequake.java b/Mage.Sets/src/mage/sets/iceage/Icequake.java index d2cfa144f78..378e27cbc21 100644 --- a/Mage.Sets/src/mage/sets/iceage/Icequake.java +++ b/Mage.Sets/src/mage/sets/iceage/Icequake.java @@ -1,103 +1,100 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are 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.iceage; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.players.Player; -import mage.target.common.TargetLandPermanent; - - -/** - * - * @author fireshoes - */ -public class Icequake extends CardImpl { - - public Icequake(UUID ownerId) { - super(ownerId, 22, "Icequake", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); - this.expansionSetCode = "ICE"; - - // Destroy target land. - // If that land was a snow land, Icequake deals 1 damage to that land's controller. - this.getSpellAbility().addEffect(new IcequakeEffect()); - this.getSpellAbility().addTarget(new TargetLandPermanent()); - - - } - - public Icequake(final Icequake card) { - super(card); - } - - @Override - public Icequake copy() { - return new Icequake(this); - } -} - -class IcequakeEffect extends OneShotEffect { - - public IcequakeEffect() { - super(Outcome.Damage); - this.staticText = "Destroy target land.
If that land was a snow land, {this} deals 1 damage to that land's controller."; - } - - public IcequakeEffect(final IcequakeEffect effect) { - super(effect); - } - - @Override - public IcequakeEffect copy() { - return new IcequakeEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (permanent != null && controller != null) { - permanent.destroy(source.getSourceId(), game, false); - if (permanent.getSupertype().contains("Snow")) { - Player player = game.getPlayer(permanent.getControllerId()); - if (player != null) { - player.damage(1, source.getSourceId(), game, false, true); - } - } - return true; - } - return false; - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.iceage; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetLandPermanent; + + +/** + * + * @author fireshoes + */ +public class Icequake extends CardImpl { + + public Icequake(UUID ownerId) { + super(ownerId, 22, "Icequake", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); + this.expansionSetCode = "ICE"; + + // Destroy target land. + // If that land was a snow land, Icequake deals 1 damage to that land's controller. + this.getSpellAbility().addEffect(new IcequakeEffect()); + this.getSpellAbility().addTarget(new TargetLandPermanent()); + + + } + + public Icequake(final Icequake card) { + super(card); + } + + @Override + public Icequake copy() { + return new Icequake(this); + } +} + +class IcequakeEffect extends OneShotEffect { + + public IcequakeEffect() { + super(Outcome.Damage); + this.staticText = "Destroy target land.
If that land was a snow land, {this} deals 1 damage to that land's controller."; + } + + public IcequakeEffect(final IcequakeEffect effect) { + super(effect); + } + + @Override + public IcequakeEffect copy() { + return new IcequakeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent != null && controller != null) { + permanent.destroy(source.getSourceId(), game, false); + if (permanent.getSupertype().contains("Snow")) { + controller.damage(1, source.getSourceId(), game, false, true); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/iceage/Pyroblast.java b/Mage.Sets/src/mage/sets/iceage/Pyroblast.java index 04784cb21bf..3dc67daee7c 100644 --- a/Mage.Sets/src/mage/sets/iceage/Pyroblast.java +++ b/Mage.Sets/src/mage/sets/iceage/Pyroblast.java @@ -1,136 +1,138 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are 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.iceage; - -import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.effects.OneShotEffect; -import mage.cards.CardImpl; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.TargetPermanent; -import mage.target.TargetSpell; - -/** - * - * @author Plopman - */ -public class Pyroblast extends CardImpl { - - public Pyroblast(UUID ownerId) { - super(ownerId, 213, "Pyroblast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); - this.expansionSetCode = "ICE"; - - - // Choose one - Counter target spell if it's blue; or destroy target permanent if it's blue. - this.getSpellAbility().addEffect(new PyroblastCounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell()); - - Mode mode = new Mode(); - mode.getEffects().add(new DestroyTargetEffect()); - mode.getTargets().add(new TargetPermanent()); - - this.getSpellAbility().addMode(mode); - } - - public Pyroblast(final Pyroblast card) { - super(card); - } - - @Override - public Pyroblast copy() { - return new Pyroblast(this); - } -} - -class PyroblastCounterTargetEffect extends OneShotEffect { - - public PyroblastCounterTargetEffect() { - super(Outcome.Detriment); - } - - public PyroblastCounterTargetEffect(final PyroblastCounterTargetEffect effect) { - super(effect); - } - - @Override - public PyroblastCounterTargetEffect copy() { - return new PyroblastCounterTargetEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - if(game.getStack().getSpell(source.getFirstTarget()).getColor(game).isBlue()){ - game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); - } - return true; - } - - @Override - public String getText(Mode mode) { - return "Counter target spell if it's blue"; - } - -} - - -class DestroyTargetEffect extends OneShotEffect { - - - public DestroyTargetEffect() { - super(Outcome.DestroyPermanent); - } - - public DestroyTargetEffect(final DestroyTargetEffect effect) { - super(effect); - } - - @Override - public DestroyTargetEffect copy() { - return new DestroyTargetEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget()); - if (permanent != null && permanent.getColor(game).isBlue()) { - permanent.destroy(source.getSourceId(), game, false); - } - return true; - } - - @Override - public String getText(Mode mode) { - return "Destroy target permanent if it's blue"; - } - -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.iceage; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.target.TargetPermanent; +import mage.target.TargetSpell; + +/** + * + * @author Plopman + */ +public class Pyroblast extends CardImpl { + + public Pyroblast(UUID ownerId) { + super(ownerId, 213, "Pyroblast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{R}"); + this.expansionSetCode = "ICE"; + + + // Choose one - Counter target spell if it's blue; or destroy target permanent if it's blue. + this.getSpellAbility().addEffect(new PyroblastCounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell()); + + Mode mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + mode.getTargets().add(new TargetPermanent()); + + this.getSpellAbility().addMode(mode); + } + + public Pyroblast(final Pyroblast card) { + super(card); + } + + @Override + public Pyroblast copy() { + return new Pyroblast(this); + } +} + +class PyroblastCounterTargetEffect extends OneShotEffect { + + public PyroblastCounterTargetEffect() { + super(Outcome.Detriment); + } + + public PyroblastCounterTargetEffect(final PyroblastCounterTargetEffect effect) { + super(effect); + } + + @Override + public PyroblastCounterTargetEffect copy() { + return new PyroblastCounterTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell targetSpell = game.getStack().getSpell(source.getFirstTarget()); + if(targetSpell != null && targetSpell.getColor(game).isBlue()){ + game.getStack().counter(source.getFirstTarget(), source.getSourceId(), game); + } + return true; + } + + @Override + public String getText(Mode mode) { + return "Counter target spell if it's blue"; + } + +} + + +class DestroyTargetEffect extends OneShotEffect { + + + public DestroyTargetEffect() { + super(Outcome.DestroyPermanent); + } + + public DestroyTargetEffect(final DestroyTargetEffect effect) { + super(effect); + } + + @Override + public DestroyTargetEffect copy() { + return new DestroyTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget()); + if (permanent != null && permanent.getColor(game).isBlue()) { + permanent.destroy(source.getSourceId(), game, false); + } + return true; + } + + @Override + public String getText(Mode mode) { + return "Destroy target permanent if it's blue"; + } + +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.java b/Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.java index 4aac7c7bd1e..9b7905996ea 100644 --- a/Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.java +++ b/Mage.Sets/src/mage/sets/masterseditionii/EbonPraetor.java @@ -151,6 +151,6 @@ class EbonPraetorEffect extends OneShotEffect { } } } - return false; + return true; } } diff --git a/Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java b/Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java index 08305c042c1..b555221479c 100644 --- a/Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java +++ b/Mage.Sets/src/mage/sets/masterseditionii/Thermokarst.java @@ -87,10 +87,7 @@ class ThermokarstEffect extends OneShotEffect { if (permanent != null && controller != null) { permanent.destroy(source.getSourceId(), game, false); if (permanent.getSupertype().contains("Snow")) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { - player.gainLife(1, game); - } + controller.gainLife(1, game); } return true; } diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.java b/Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.java index e04760cb837..91bddccba45 100644 --- a/Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.java +++ b/Mage.Sets/src/mage/sets/mercadianmasques/CaveSense.java @@ -30,6 +30,7 @@ package mage.sets.mercadianmasques; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; @@ -63,8 +64,11 @@ public class CaveSense extends CardImpl { this.addAbility(ability); // Enchanted creature gets +1/+1 and has mountainwalk. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new MountainwalkAbility(), AttachmentType.AURA))); + Effect effect = new GainAbilityAttachedEffect(new MountainwalkAbility(), AttachmentType.AURA); + effect.setText("and has mountainwalk"); + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1)); + ability.addEffect(effect); + this.addAbility(ability); } public CaveSense(final CaveSense card) { diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.java b/Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.java index 47af6159d29..dbeedd47928 100644 --- a/Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.java +++ b/Mage.Sets/src/mage/sets/mercadianmasques/HauntedCrossroads.java @@ -37,7 +37,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterCreatureCard; -import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInYourGraveyard; /** * @@ -51,7 +51,7 @@ public class HauntedCrossroads extends CardImpl { // {B}: Put target creature card from your graveyard on top of your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutOnLibraryTargetEffect(true), new ManaCostsImpl("{B}")); - ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card from your graveyard"))); + ability.addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.java b/Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.java index f18c186b97c..1de3906ba4b 100644 --- a/Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.java +++ b/Mage.Sets/src/mage/sets/mercadianmasques/TigerClaws.java @@ -30,6 +30,7 @@ package mage.sets.mercadianmasques; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; @@ -67,8 +68,11 @@ public class TigerClaws extends CardImpl { this.addAbility(ability); // Enchanted creature gets +1/+1 and has trample. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA))); + Effect effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has trample"); + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 1)); + ability.addEffect(effect); + this.addAbility(ability); } public TigerClaws(final TigerClaws card) { diff --git a/Mage.Sets/src/mage/sets/thedark/ScarwoodHag.java b/Mage.Sets/src/mage/sets/thedark/ScarwoodHag.java index 28b56da4c86..823a74756b8 100644 --- a/Mage.Sets/src/mage/sets/thedark/ScarwoodHag.java +++ b/Mage.Sets/src/mage/sets/thedark/ScarwoodHag.java @@ -33,6 +33,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.LoseAbilityTargetEffect; import mage.abilities.keyword.ForestwalkAbility; @@ -65,8 +66,10 @@ public class ScarwoodHag extends CardImpl { this.addAbility(ability); // {tap}: Target creature loses forestwalk until end of turn. + Effect effect = new LoseAbilityTargetEffect(new ForestwalkAbility(true), Duration.EndOfTurn); + effect.setText("Target creature loses forestwalk until end of turn"); ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new LoseAbilityTargetEffect(new ForestwalkAbility(false), Duration.EndOfTurn), + effect, new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); From 43fb00dc37e22828d21d582a32bbe5e25cef600a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 26 Aug 2015 22:18:47 +0200 Subject: [PATCH 15/17] * Reciprocate - Fixed wrong casting cost. --- .../sets/championsofkamigawa/Reciprocate.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Reciprocate.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Reciprocate.java index 65eac2b615a..5098fa1427c 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/Reciprocate.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Reciprocate.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.championsofkamigawa; import java.util.HashSet; @@ -48,8 +47,8 @@ import mage.watchers.common.PlayerDamagedBySourceWatcher; */ public class Reciprocate extends CardImpl { - public Reciprocate(UUID ownerId) { - super(ownerId, 40, "Reciprocate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + public Reciprocate(UUID ownerId) { + super(ownerId, 40, "Reciprocate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{W}"); this.expansionSetCode = "CHK"; // Exile target creature that dealt damage to you this turn. @@ -81,7 +80,7 @@ class ReciprocateTarget extends TargetPermanent { @Override public boolean canTarget(UUID id, Ability source, Game game) { - PlayerDamagedBySourceWatcher watcher = (PlayerDamagedBySourceWatcher) game.getState().getWatchers().get("PlayerDamagedBySource",source.getControllerId()); + PlayerDamagedBySourceWatcher watcher = (PlayerDamagedBySourceWatcher) game.getState().getWatchers().get("PlayerDamagedBySource", source.getControllerId()); if (watcher != null && watcher.hasSourceDoneDamage(id, game)) { return super.canTarget(id, source, game); } @@ -95,7 +94,7 @@ class ReciprocateTarget extends TargetPermanent { PlayerDamagedBySourceWatcher watcher = (PlayerDamagedBySourceWatcher) game.getState().getWatchers().get("PlayerDamagedBySource", sourceControllerId); for (UUID targetId : availablePossibleTargets) { Permanent permanent = game.getPermanent(targetId); - if(permanent != null && watcher != null && watcher.hasSourceDoneDamage(targetId, game)){ + if (permanent != null && watcher != null && watcher.hasSourceDoneDamage(targetId, game)) { possibleTargets.add(targetId); } } @@ -111,14 +110,14 @@ class ReciprocateTarget extends TargetPermanent { int count = 0; MageObject targetSource = game.getObject(sourceId); PlayerDamagedBySourceWatcher watcher = (PlayerDamagedBySourceWatcher) game.getState().getWatchers().get("PlayerDamagedBySource", sourceControllerId); - for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, sourceControllerId, sourceId, game)) { - if (!targets.containsKey(permanent.getId()) && permanent.canBeTargetedBy(targetSource, sourceControllerId, game) + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, sourceControllerId, sourceId, game)) { + if (!targets.containsKey(permanent.getId()) && permanent.canBeTargetedBy(targetSource, sourceControllerId, game) && watcher != null && watcher.hasSourceDoneDamage(permanent.getId(), game)) { - count++; - if (count >= remainingTargets) { - return true; - } + count++; + if (count >= remainingTargets) { + return true; } + } } return false; } From 352df17951723864d002f862818ac07ac656f618 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 27 Aug 2015 10:40:00 +0300 Subject: [PATCH 16/17] Implement cards: Broken Dam, Extinguish, Guan Yu's 1,000-Li March, and Rockslide Ambush --- .../masterseditioniii/GuanYus1000LiMarch.java | 66 +++++++++++++++++ .../masterseditioniv/RockslideAmbush.java | 54 ++++++++++++++ .../mage/sets/portalsecondage/Extinguish.java | 68 ++++++++++++++++++ .../sets/portalthreekingdoms/BrokenDam.java | 70 +++++++++++++++++++ .../sets/portalthreekingdoms/Extinguish.java | 52 ++++++++++++++ .../GuanYus1000LiMarch.java | 52 ++++++++++++++ .../portalthreekingdoms/RockslideAmbush.java | 68 ++++++++++++++++++ .../src/mage/sets/starter1999/Extinguish.java | 52 ++++++++++++++ 8 files changed, 482 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/Extinguish.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.java create mode 100644 Mage.Sets/src/mage/sets/starter1999/Extinguish.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.java b/Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.java new file mode 100644 index 00000000000..a391fb5ad5f --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/GuanYus1000LiMarch.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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.TappedPredicate; + +/** + * + * @author LoneFox + */ +public class GuanYus1000LiMarch extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("tapped creatures"); + + static { + filter.add(new TappedPredicate()); + } + + public GuanYus1000LiMarch(UUID ownerId) { + super(ownerId, 13, "Guan Yu's 1,000-Li March", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{W}{W}"); + this.expansionSetCode = "ME3"; + + // Destroy all tapped creatures. + this.getSpellAbility().addEffect(new DestroyAllEffect(filter, false)); + } + + public GuanYus1000LiMarch(final GuanYus1000LiMarch card) { + super(card); + } + + @Override + public GuanYus1000LiMarch copy() { + return new GuanYus1000LiMarch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java b/Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java new file mode 100644 index 00000000000..b899b3818fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniv/RockslideAmbush.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniv; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class RockslideAmbush extends mage.sets.portalthreekingdoms.RockslideAmbush { + + public RockslideAmbush(UUID ownerId) { + super(ownerId); + this.cardNumber = 134; + this.expansionSetCode = "ME4"; + this.rarity = Rarity.COMMON; + } + + public RockslideAmbush(final RockslideAmbush card) { + super(card); + } + + @Override + public RockslideAmbush copy() { + return new RockslideAmbush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/Extinguish.java b/Mage.Sets/src/mage/sets/portalsecondage/Extinguish.java new file mode 100644 index 00000000000..4ce95004029 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/Extinguish.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.portalsecondage; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author LoneFox + */ +public class Extinguish extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("sorcery spell"); + + static { + filter.add(new CardTypePredicate(CardType.SORCERY)); + } + + public Extinguish(UUID ownerId) { + super(ownerId, 38, "Extinguish", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "PO2"; + + // Counter target sorcery spell. + this.getSpellAbility().addTarget(new TargetSpell(filter)); + this.getSpellAbility().addEffect(new CounterTargetEffect()); + } + + public Extinguish(final Extinguish card) { + super(card); + } + + @Override + public Extinguish copy() { + return new Extinguish(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.java new file mode 100644 index 00000000000..698ebcd5b1d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/BrokenDam.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class BrokenDam extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.not(new AbilityPredicate(HorsemanshipAbility.class))); + } + + public BrokenDam(UUID ownerId) { + super(ownerId, 37, "Broken Dam", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{U}"); + this.expansionSetCode = "PTK"; + + // Tap one or two target creatures without horsemanship. + this.getSpellAbility().addEffect(new TapTargetEffect("one or two target creatures without horsemanship")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(1, 2, filter, false)); + } + + public BrokenDam(final BrokenDam card) { + super(card); + } + + @Override + public BrokenDam copy() { + return new BrokenDam(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.java new file mode 100644 index 00000000000..796af8ca00f --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/Extinguish.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Extinguish extends mage.sets.portalsecondage.Extinguish { + + public Extinguish(UUID ownerId) { + super(ownerId); + this.cardNumber = 43; + this.expansionSetCode = "PTK"; + } + + public Extinguish(final Extinguish card) { + super(card); + } + + @Override + public Extinguish copy() { + return new Extinguish(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.java new file mode 100644 index 00000000000..8f6b260b422 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/GuanYus1000LiMarch.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class GuanYus1000LiMarch extends mage.sets.masterseditioniii.GuanYus1000LiMarch { + + public GuanYus1000LiMarch(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "PTK"; + } + + public GuanYus1000LiMarch(final GuanYus1000LiMarch card) { + super(card); + } + + @Override + public GuanYus1000LiMarch copy() { + return new GuanYus1000LiMarch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.java new file mode 100644 index 00000000000..528a5f5016e --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/RockslideAmbush.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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class RockslideAmbush extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Mountain you control"); + + static { + filter.add(new SubtypePredicate("Mountain")); + } + + public RockslideAmbush(UUID ownerId) { + super(ownerId, 121, "Rockslide Ambush", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); + this.expansionSetCode = "PTK"; + + // Rockslide Ambush deals damage to target creature equal to the number of Mountains you control. + this.getSpellAbility().addEffect(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter))); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public RockslideAmbush(final RockslideAmbush card) { + super(card); + } + + @Override + public RockslideAmbush copy() { + return new RockslideAmbush(this); + } +} diff --git a/Mage.Sets/src/mage/sets/starter1999/Extinguish.java b/Mage.Sets/src/mage/sets/starter1999/Extinguish.java new file mode 100644 index 00000000000..50f758d1e78 --- /dev/null +++ b/Mage.Sets/src/mage/sets/starter1999/Extinguish.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.starter1999; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Extinguish extends mage.sets.portalsecondage.Extinguish { + + public Extinguish(UUID ownerId) { + super(ownerId); + this.cardNumber = 37; + this.expansionSetCode = "S99"; + } + + public Extinguish(final Extinguish card) { + super(card); + } + + @Override + public Extinguish copy() { + return new Extinguish(this); + } +} From 828705dc9c53f87cd9fbc4365112449be9531b08 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 27 Aug 2015 10:51:20 +0300 Subject: [PATCH 17/17] Implement cards: Desert Sandstorm, Desperate Charge, Virtuous Charge, and Wielding the Green Dragon --- .../masterseditioniii/DesperateCharge.java | 54 ++++++++++++++++ .../portalthreekingdoms/DesertSandstorm.java | 59 ++++++++++++++++++ .../portalthreekingdoms/DesperateCharge.java | 59 ++++++++++++++++++ .../portalthreekingdoms/VirtuousCharge.java | 59 ++++++++++++++++++ .../WieldingTheGreenDragon.java | 61 +++++++++++++++++++ 5 files changed, 292 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java create mode 100644 Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java b/Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java new file mode 100644 index 00000000000..d33a2052ff8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/DesperateCharge.java @@ -0,0 +1,54 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.masterseditioniii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DesperateCharge extends mage.sets.portalthreekingdoms.DesperateCharge { + + public DesperateCharge(UUID ownerId) { + super(ownerId); + this.cardNumber = 63; + this.expansionSetCode = "ME3"; + this.rarity = Rarity.COMMON; + } + + public DesperateCharge(final DesperateCharge card) { + super(card); + } + + @Override + public DesperateCharge copy() { + return new DesperateCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java new file mode 100644 index 00000000000..88e0093051f --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesertSandstorm.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.DamageAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DesertSandstorm extends CardImpl { + + public DesertSandstorm(UUID ownerId) { + super(ownerId, 107, "Desert Sandstorm", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); + this.expansionSetCode = "PTK"; + + // Desert Sandstorm deals 1 damage to each creature. + this.getSpellAbility().addEffect(new DamageAllEffect(1, new FilterCreaturePermanent())); + } + + public DesertSandstorm(final DesertSandstorm card) { + super(card); + } + + @Override + public DesertSandstorm copy() { + return new DesertSandstorm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java new file mode 100644 index 00000000000..d5fcab16d6d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/DesperateCharge.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DesperateCharge extends CardImpl { + + public DesperateCharge(UUID ownerId) { + super(ownerId, 74, "Desperate Charge", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "PTK"; + + // Creatures you control get +2/+0 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn)); + } + + public DesperateCharge(final DesperateCharge card) { + super(card); + } + + @Override + public DesperateCharge copy() { + return new DesperateCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java new file mode 100644 index 00000000000..ba2a99e8a7d --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/VirtuousCharge.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class VirtuousCharge extends CardImpl { + + public VirtuousCharge(UUID ownerId) { + super(ownerId, 29, "Virtuous Charge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "PTK"; + + // Creatures you control get +1/+1 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); + } + + public VirtuousCharge(final VirtuousCharge card) { + super(card); + } + + @Override + public VirtuousCharge copy() { + return new VirtuousCharge(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java b/Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java new file mode 100644 index 00000000000..9e6f56d4b96 --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalthreekingdoms/WieldingTheGreenDragon.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are 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.portalthreekingdoms; + +import java.util.UUID; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class WieldingTheGreenDragon extends CardImpl { + + public WieldingTheGreenDragon(UUID ownerId) { + super(ownerId, 157, "Wielding the Green Dragon", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{G}"); + this.expansionSetCode = "PTK"; + + // Target creature gets +4/+4 until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public WieldingTheGreenDragon(final WieldingTheGreenDragon card) { + super(card); + } + + @Override + public WieldingTheGreenDragon copy() { + return new WieldingTheGreenDragon(this); + } +}