From 36ecc1e1212bc0d38e1a3eb504d9c20f65d29e30 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 10 Sep 2013 16:42:32 +0200 Subject: [PATCH] [THS] Added 11 blue cards. --- .../sets/darkascension/DungeonGeists.java | 2 +- .../src/mage/sets/planeshift/Gainsay.java | 52 ++++++ .../src/mage/sets/theros/ArtisanOfForms.java | 83 +++++++++ .../src/mage/sets/theros/CurseOfTheSwine.java | 121 ++++++++++++ Mage.Sets/src/mage/sets/theros/Dissolve.java | 68 +++++++ Mage.Sets/src/mage/sets/theros/Gainsay.java | 73 ++++++++ .../mage/sets/theros/LostInALabyrinth.java | 65 +++++++ .../src/mage/sets/theros/Omenspeaker.java | 66 +++++++ .../mage/sets/theros/ShipbreakerKraken.java | 173 ++++++++++++++++++ Mage.Sets/src/mage/sets/theros/SwanSong.java | 124 +++++++++++++ .../mage/sets/theros/TritonFortuneHunter.java | 66 +++++++ .../src/mage/sets/theros/VoyagesEnd.java | 65 +++++++ .../src/mage/sets/theros/WavecrashTriton.java | 80 ++++++++ .../abilities/effects/common/ScryEffect.java | 4 +- .../mage/abilities/keyword/HeroicAbility.java | 6 +- 15 files changed, 1044 insertions(+), 4 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/planeshift/Gainsay.java create mode 100644 Mage.Sets/src/mage/sets/theros/ArtisanOfForms.java create mode 100644 Mage.Sets/src/mage/sets/theros/CurseOfTheSwine.java create mode 100644 Mage.Sets/src/mage/sets/theros/Dissolve.java create mode 100644 Mage.Sets/src/mage/sets/theros/Gainsay.java create mode 100644 Mage.Sets/src/mage/sets/theros/LostInALabyrinth.java create mode 100644 Mage.Sets/src/mage/sets/theros/Omenspeaker.java create mode 100644 Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java create mode 100644 Mage.Sets/src/mage/sets/theros/SwanSong.java create mode 100644 Mage.Sets/src/mage/sets/theros/TritonFortuneHunter.java create mode 100644 Mage.Sets/src/mage/sets/theros/VoyagesEnd.java create mode 100644 Mage.Sets/src/mage/sets/theros/WavecrashTriton.java diff --git a/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java b/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java index 25e5fa57546..6ee01d3726d 100644 --- a/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java +++ b/Mage.Sets/src/mage/sets/darkascension/DungeonGeists.java @@ -79,6 +79,7 @@ public class DungeonGeists extends CardImpl { target.setRequired(true); ability.addTarget(target); this.addAbility(ability); + // watcher needed to send normal events to Dungeon Geists ReplacementEffect this.addWatcher(new DungeonGeistsWatcher()); } @@ -167,7 +168,6 @@ class DungeonGeistsWatcher extends WatcherImpl { if (zEvent.getFromZone() == Zone.BATTLEFIELD) { condition = true; game.replaceEvent(event); - return; } } } diff --git a/Mage.Sets/src/mage/sets/planeshift/Gainsay.java b/Mage.Sets/src/mage/sets/planeshift/Gainsay.java new file mode 100644 index 00000000000..80775952d52 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/Gainsay.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.planeshift; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Gainsay extends mage.sets.theros.Gainsay { + + public Gainsay(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "PLS"; + } + + public Gainsay(final Gainsay card) { + super(card); + } + + @Override + public Gainsay copy() { + return new Gainsay(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/ArtisanOfForms.java b/Mage.Sets/src/mage/sets/theros/ArtisanOfForms.java new file mode 100644 index 00000000000..c1ca967fc3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/ArtisanOfForms.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.theros; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.util.functions.ApplyToPermanent; + +/** + * + * @author LevelX2 + */ +public class ArtisanOfForms extends CardImpl { + + public ArtisanOfForms(UUID ownerId) { + super(ownerId, 40, "Artisan of Forms", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "THS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Heroic - Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature and gain this ability. + Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent()); + effect.setText("have {this} become a copy of target creature and gain this ability"); + this.addAbility(new HeroicAbility(effect, true)); + } + + public ArtisanOfForms(final ArtisanOfForms card) { + super(card); + } + + @Override + public ArtisanOfForms copy() { + return new ArtisanOfForms(this); + } +} + +class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent { + + @Override + public Boolean apply(Game game, Permanent permanent) { + Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent()); + effect.setText("have {this} become a copy of target creature and gain this ability"); + permanent.addAbility(new HeroicAbility(effect, true), game); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/theros/CurseOfTheSwine.java b/Mage.Sets/src/mage/sets/theros/CurseOfTheSwine.java new file mode 100644 index 00000000000..6c7253c712a --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/CurseOfTheSwine.java @@ -0,0 +1,121 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.SpellAbility; +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.permanent.token.Token; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class CurseOfTheSwine extends CardImpl { + + public CurseOfTheSwine(UUID ownerId) { + super(ownerId, 46, "Curse of the Swine", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{U}{U}"); + this.expansionSetCode = "THS"; + + this.color.setBlue(true); + + // Exile X target creatures. For each creature exiled this way, its controller puts a 2/2 green Boar creature token onto the battlefield. + this.getSpellAbility().addEffect(new CurseOfTheSwineEffect()); + // Correct number of targets will be set in adjustTargets + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability instanceof SpellAbility) { + ability.getTargets().clear(); + ability.addTarget(new TargetCreaturePermanent(ability.getManaCostsToPay().getX(), true)); + } + } + + public CurseOfTheSwine(final CurseOfTheSwine card) { + super(card); + } + + @Override + public CurseOfTheSwine copy() { + return new CurseOfTheSwine(this); + } +} + +class CurseOfTheSwineEffect extends OneShotEffect { + + public CurseOfTheSwineEffect() { + super(Outcome.Exile); + this.staticText = "Exile X target creatures. For each creature exiled this way, its controller puts a 2/2 green Boar creature token onto the battlefield"; + } + + public CurseOfTheSwineEffect(final CurseOfTheSwineEffect effect) { + super(effect); + } + + @Override + public CurseOfTheSwineEffect copy() { + return new CurseOfTheSwineEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for(UUID targetId : this.getTargetPointer().getTargets(game, source)) { + Permanent creature = game.getPermanent(targetId); + if (creature != null) { + if (creature.moveToExile(null, null, source.getSourceId(), game)) { + CurseOfTheSwineBoarToken swineToken = new CurseOfTheSwineBoarToken(); + swineToken.putOntoBattlefield(1, game, source.getSourceId(), creature.getControllerId()); + } + } + } + return true; + } +} + +class CurseOfTheSwineBoarToken extends Token { + CurseOfTheSwineBoarToken() { + super("Boar", "2/2 green Boar creature token"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Boar"); + power = new MageInt(2); + toughness = new MageInt(2); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/Dissolve.java b/Mage.Sets/src/mage/sets/theros/Dissolve.java new file mode 100644 index 00000000000..40c66caff0f --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/Dissolve.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.theros; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.abilities.effects.common.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.Target; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class Dissolve extends CardImpl { + + + public Dissolve(UUID ownerId) { + super(ownerId, 47, "Dissolve", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}{U}"); + this.expansionSetCode = "THS"; + + this.color.setBlue(true); + + // Counter target spell. Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) + this.getSpellAbility().addEffect(new CounterTargetEffect()); + Target target = new TargetSpell(); + target.setRequired(true); + this.getSpellAbility().addTarget(target); + this.getSpellAbility().addEffect(new ScryEffect(1)); + } + + public Dissolve(final Dissolve card) { + super(card); + } + + @Override + public Dissolve copy() { + return new Dissolve(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/Gainsay.java b/Mage.Sets/src/mage/sets/theros/Gainsay.java new file mode 100644 index 00000000000..d8f3754e4ed --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/Gainsay.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.theros; + +import java.util.UUID; +import mage.ObjectColor; +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.ColorPredicate; +import mage.target.Target; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class Gainsay extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("blue spell"); + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public Gainsay(UUID ownerId) { + super(ownerId, 49, "Gainsay", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "THS"; + + this.color.setBlue(true); + + // Counter target blue spell. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + Target target = new TargetSpell(filter); + target.setRequired(true); + this.getSpellAbility().addTarget(target); + } + + public Gainsay(final Gainsay card) { + super(card); + } + + @Override + public Gainsay copy() { + return new Gainsay(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/LostInALabyrinth.java b/Mage.Sets/src/mage/sets/theros/LostInALabyrinth.java new file mode 100644 index 00000000000..1da3264f8f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/LostInALabyrinth.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.theros; + +import java.util.UUID; +import mage.abilities.effects.common.ScryEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class LostInALabyrinth extends CardImpl { + + public LostInALabyrinth(UUID ownerId) { + super(ownerId, 52, "Lost in a Labyrinth", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "THS"; + + this.color.setBlue(true); + + // Target creature gets -3/-0 until end of turn. Scry 1. + this.getSpellAbility().addEffect(new BoostTargetEffect(-3,-0, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + this.getSpellAbility().addEffect(new ScryEffect(1)); + } + + public LostInALabyrinth(final LostInALabyrinth card) { + super(card); + } + + @Override + public LostInALabyrinth copy() { + return new LostInALabyrinth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/Omenspeaker.java b/Mage.Sets/src/mage/sets/theros/Omenspeaker.java new file mode 100644 index 00000000000..01537c3fbae --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/Omenspeaker.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.theros; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class Omenspeaker extends CardImpl { + + public Omenspeaker(UUID ownerId) { + super(ownerId, 57, "Omenspeaker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "THS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // When Omenspeaker enters the battlefield, scry 2. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(2), false)); + } + + public Omenspeaker(final Omenspeaker card) { + super(card); + } + + @Override + public Omenspeaker copy() { + return new Omenspeaker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java b/Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java new file mode 100644 index 00000000000..70f40e309f2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/ShipbreakerKraken.java @@ -0,0 +1,173 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those 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.BecomesMonstrousSourceTriggeredAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.MonstrosityAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.PhaseStep; +import mage.constants.Rarity; +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.target.common.TargetCreaturePermanent; +import mage.watchers.WatcherImpl; + +/** + * + * @author LevelX2 + */ +public class ShipbreakerKraken extends CardImpl { + + public ShipbreakerKraken(UUID ownerId) { + super(ownerId, 63, "Shipbreaker Kraken", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + this.expansionSetCode = "THS"; + this.subtype.add("Kraken"); + + this.color.setBlue(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // {6}{U}{U}: Monstrosity 4. + this.addAbility(new MonstrosityAbility("{6}{U}{U}", 4)); + // When Shipbreaker Kraken becomes monstrous, tap up to four target creatures. Those creatures don't untap during their controllers' untap steps for as long as you control Shipbreaker Kraken. + Ability ability = new BecomesMonstrousSourceTriggeredAbility(new TapTargetEffect()); + ability.addTarget(new TargetCreaturePermanent(0,4)); + ability.addEffect(new ShipbreakerKrakenReplacementEffect()); + this.addAbility(ability); + this.addWatcher(new ShipbreakerKrakenWatcher()); + } + + public ShipbreakerKraken(final ShipbreakerKraken card) { + super(card); + } + + @Override + public ShipbreakerKraken copy() { + return new ShipbreakerKraken(this); + } +} + +class ShipbreakerKrakenReplacementEffect extends ReplacementEffectImpl { + + public ShipbreakerKrakenReplacementEffect() { + super(Duration.OneUse, Outcome.Detriment); + this.staticText = "Those creatures don't untap during their controllers' untap steps for as long as you control {this}"; + } + + public ShipbreakerKrakenReplacementEffect(final ShipbreakerKrakenReplacementEffect effect) { + super(effect); + } + + @Override + public ShipbreakerKrakenReplacementEffect copy() { + return new ShipbreakerKrakenReplacementEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return false; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.LOST_CONTROL) { + if (event.getTargetId().equals(source.getSourceId())) { + this.used = true; + return false; + } + } + if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId())) { + ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (zEvent.getFromZone() == Zone.BATTLEFIELD) { + this.used = true; + return false; + } + } + + if (game.getTurn().getStepType() == PhaseStep.UNTAP && event.getType() == GameEvent.EventType.UNTAP) { + if (targetPointer.getTargets(game, source).contains(event.getTargetId())) { + return true; + } + } + + return false; + } +} + +class ShipbreakerKrakenWatcher extends WatcherImpl { + + ShipbreakerKrakenWatcher () { + super("ControlLost", WatcherScope.CARD); + } + + ShipbreakerKrakenWatcher(ShipbreakerKrakenWatcher watcher) { + super(watcher); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.LOST_CONTROL && event.getPlayerId().equals(controllerId) && event.getTargetId().equals(sourceId)) { + condition = true; + game.replaceEvent(event); + return; + } + if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(sourceId)) { + ZoneChangeEvent zEvent = (ZoneChangeEvent)event; + if (zEvent.getFromZone() == Zone.BATTLEFIELD) { + condition = true; + game.replaceEvent(event); + } + } + } + + @Override + public void reset() { + //don't reset condition each turn - only when this leaves the battlefield + } + + @Override + public ShipbreakerKrakenWatcher copy() { + return new ShipbreakerKrakenWatcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/SwanSong.java b/Mage.Sets/src/mage/sets/theros/SwanSong.java new file mode 100644 index 00000000000..1ebab32f166 --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/SwanSong.java @@ -0,0 +1,124 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.theros; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +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.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.game.permanent.token.Token; +import mage.game.stack.Spell; +import mage.target.TargetSpell; + +/** + * + * @author LevelX2 + */ +public class SwanSong extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("enchantment, instant or sorcery spell"); + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.ENCHANTMENT), + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + public SwanSong(UUID ownerId) { + super(ownerId, 65, "Swan Song", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{U}"); + this.expansionSetCode = "THS"; + + this.color.setBlue(true); + + // Counter target enchantment, instant or sorcery spell. Its controller puts a 2/2 blue Bird creature token with flying onto the battlefield. + this.getSpellAbility().addEffect(new SwanSongEffect()); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + } + + public SwanSong(final SwanSong card) { + super(card); + } + + @Override + public SwanSong copy() { + return new SwanSong(this); + } +} + +class SwanSongEffect extends OneShotEffect { + + public SwanSongEffect() { + super(Outcome.Benefit); + this.staticText = "Counter target enchantment, instant or sorcery spell. Its controller puts a 2/2 blue Bird creature token with flying onto the battlefield"; + } + + public SwanSongEffect(final SwanSongEffect effect) { + super(effect); + } + + @Override + public SwanSongEffect copy() { + return new SwanSongEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + boolean countered = false; + for (UUID targetId : targetPointer.getTargets(game, source)) { + Spell spell = game.getStack().getSpell(targetId); + if (game.getStack().counter(targetId, source.getSourceId(), game)) { + countered = true; + } + if (spell != null) { + Token token = new SwanSongBirdToken(); + token.putOntoBattlefield(1, game, source.getSourceId(), spell.getControllerId()); + } + } + return countered; + } +} + +class SwanSongBirdToken extends Token { + SwanSongBirdToken() { + super("Bird", "2/2 blue Bird creature token with flying"); + cardType.add(CardType.CREATURE); + color.setBlue(true); + subtype.add("Bird"); + power = new MageInt(2); + toughness = new MageInt(2); + this.addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/TritonFortuneHunter.java b/Mage.Sets/src/mage/sets/theros/TritonFortuneHunter.java new file mode 100644 index 00000000000..297821293e5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/TritonFortuneHunter.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.theros; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class TritonFortuneHunter extends CardImpl { + + public TritonFortuneHunter(UUID ownerId) { + super(ownerId, 69, "Triton Fortune Hunter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "THS"; + this.subtype.add("Merfolk"); + this.subtype.add("Soldier"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Heroic - Whenever you cast a spell that targets Triton Fortune Hunter, draw a card. + this.addAbility(new HeroicAbility(new DrawCardControllerEffect(1))); + } + + public TritonFortuneHunter(final TritonFortuneHunter card) { + super(card); + } + + @Override + public TritonFortuneHunter copy() { + return new TritonFortuneHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/VoyagesEnd.java b/Mage.Sets/src/mage/sets/theros/VoyagesEnd.java new file mode 100644 index 00000000000..76589b7bc92 --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/VoyagesEnd.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.theros; + +import java.util.UUID; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class VoyagesEnd extends CardImpl { + + public VoyagesEnd(UUID ownerId) { + super(ownerId, 73, "Voyage's End", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "THS"; + + this.color.setBlue(true); + + // Return target creature to its owner's hand. Scry 1. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + this.getSpellAbility().addEffect(new ScryEffect(1)); + + } + + public VoyagesEnd(final VoyagesEnd card) { + super(card); + } + + @Override + public VoyagesEnd copy() { + return new VoyagesEnd(this); + } +} diff --git a/Mage.Sets/src/mage/sets/theros/WavecrashTriton.java b/Mage.Sets/src/mage/sets/theros/WavecrashTriton.java new file mode 100644 index 00000000000..23a4bb2febf --- /dev/null +++ b/Mage.Sets/src/mage/sets/theros/WavecrashTriton.java @@ -0,0 +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.theros; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.SkipNextUntapTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.HeroicAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class WavecrashTriton extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + static{ + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public WavecrashTriton(UUID ownerId) { + super(ownerId, 74, "Wavecrash Triton", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "THS"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Heroic - Whenever you cast a spell that targets Wavecrash Triton, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. + Ability ability = new HeroicAbility(new TapTargetEffect()); + ability.addTarget(new TargetCreaturePermanent(filter)); + ability.addEffect(new SkipNextUntapTargetEffect("That creature")); + this.addAbility(ability); + } + + public WavecrashTriton(final WavecrashTriton card) { + super(card); + } + + @Override + public WavecrashTriton copy() { + return new WavecrashTriton(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/ScryEffect.java b/Mage/src/mage/abilities/effects/common/ScryEffect.java index aa6e62def76..a233db89f6e 100644 --- a/Mage/src/mage/abilities/effects/common/ScryEffect.java +++ b/Mage/src/mage/abilities/effects/common/ScryEffect.java @@ -88,7 +88,7 @@ public class ScryEffect extends OneShotEffect { target1.clearChosen(); } // move cards to the top of the library - int onTop = cards.size(); + int onBottom = scryNumber - cards.size(); if (cards.size() > 1) { TargetCard target2 = new TargetCard(Zone.PICK, filter2); target2.setRequired(true); @@ -107,7 +107,7 @@ public class ScryEffect extends OneShotEffect { card.moveToZone(Zone.LIBRARY, source.getId(), game, true); } game.informPlayers(new StringBuilder(player.getName()).append(" puts ") - .append(onTop).append(onTop == 1 ?" card":"cards") + .append(onBottom).append(onBottom == 1 ?" card":" cards") .append(" on the bottom of his or her library (scry ") .append(scryNumber).append(")").toString()); return true; diff --git a/Mage/src/mage/abilities/keyword/HeroicAbility.java b/Mage/src/mage/abilities/keyword/HeroicAbility.java index 9db340d83f1..f8f7d208ded 100644 --- a/Mage/src/mage/abilities/keyword/HeroicAbility.java +++ b/Mage/src/mage/abilities/keyword/HeroicAbility.java @@ -47,7 +47,11 @@ import mage.game.stack.Spell; public class HeroicAbility extends TriggeredAbilityImpl { public HeroicAbility(Effect effect) { - super(Zone.BATTLEFIELD, effect, false); + this(effect, false); + } + + public HeroicAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, effect, optional); } public HeroicAbility(final HeroicAbility ability) {