diff --git a/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java b/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java index 97b927b0565..bd8ff13e1c1 100644 --- a/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java +++ b/Mage.Sets/src/mage/cards/a/AlexiZephyrMage.java @@ -70,6 +70,7 @@ public class AlexiZephyrMage extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); + //TODO: Make ability properly copiable // {X}{U}, {tap}, Discard two cards: Return X target creatures to their owners' hands. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}")); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/a/AncientHellkite.java b/Mage.Sets/src/mage/cards/a/AncientHellkite.java index bb830ed9732..13b83e41682 100644 --- a/Mage.Sets/src/mage/cards/a/AncientHellkite.java +++ b/Mage.Sets/src/mage/cards/a/AncientHellkite.java @@ -60,6 +60,7 @@ public class AncientHellkite extends CardImpl { this.power = new MageInt(6); this.toughness = new MageInt(6); + //TODO: Make ability properly copiable this.addAbility(FlyingAbility.getInstance()); Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}"), SourceAttackingCondition.instance); ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls"))); diff --git a/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java b/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java index a203852f83f..2d85919813e 100644 --- a/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java +++ b/Mage.Sets/src/mage/cards/c/CandelabraOfTawnos.java @@ -53,6 +53,7 @@ public class CandelabraOfTawnos extends CardImpl { public CandelabraOfTawnos(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); + //TODO: Make ability properly copiable // {X}, {T}: Untap X target lands. Effect effect = new UntapTargetEffect(); effect.setText("untap X target lands"); diff --git a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java index 00a524ad1b7..459920fa243 100644 --- a/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java +++ b/Mage.Sets/src/mage/cards/c/ChampionOfStraySouls.java @@ -75,6 +75,7 @@ public class ChampionOfStraySouls extends CardImpl { * ability, before you pay any costs. You can't target any of the * creatures you sacrifice. */ + //TODO: Make ability properly copiable // {3}{B}{B}, {T}, Sacrifice X other creatures: Return X target creatures from your graveyard to the battlefield. Effect effect = new ReturnFromGraveyardToBattlefieldTargetEffect(); effect.setText("Return X target creatures from your graveyard to the battlefield"); diff --git a/Mage.Sets/src/mage/cards/c/CrownOfDoom.java b/Mage.Sets/src/mage/cards/c/CrownOfDoom.java index 3a447de9f27..f5417c9a115 100644 --- a/Mage.Sets/src/mage/cards/c/CrownOfDoom.java +++ b/Mage.Sets/src/mage/cards/c/CrownOfDoom.java @@ -68,6 +68,7 @@ public class CrownOfDoom extends CardImpl { effect.setText("it gets +2/+0 until end of turn"); this.addAbility(new AttacksAllTriggeredAbility(effect, false, StaticFilters.FILTER_PERMANENT_CREATURE, SetTargetPointer.PERMANENT, true)); + //TODO: Make ability properly copiable // {2}: Target player other than Crown of Doom's owner gains control of it. Activate this ability only during your turn. Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new CrownOfDoomEffect(), new ManaCostsImpl("{2}"), MyTurnCondition.instance); ability.addTarget(new TargetPlayer(1, 1, false, new FilterPlayer("player other than Crown of Doom's owner"))); diff --git a/Mage.Sets/src/mage/cards/c/CuombajjWitches.java b/Mage.Sets/src/mage/cards/c/CuombajjWitches.java index 2cb334d4f77..f4ea8c4cf10 100644 --- a/Mage.Sets/src/mage/cards/c/CuombajjWitches.java +++ b/Mage.Sets/src/mage/cards/c/CuombajjWitches.java @@ -62,6 +62,7 @@ public class CuombajjWitches extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); + //TODO: Make ability properly copiable // {T}: Cuombajj Witches deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice. Effect effect = new DamageTargetEffect(1); effect.setText("{this} deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice"); diff --git a/Mage.Sets/src/mage/cards/d/DeadeyeTracker.java b/Mage.Sets/src/mage/cards/d/DeadeyeTracker.java index 5915342b3df..405263345ef 100644 --- a/Mage.Sets/src/mage/cards/d/DeadeyeTracker.java +++ b/Mage.Sets/src/mage/cards/d/DeadeyeTracker.java @@ -40,12 +40,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.FilterCard; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.other.OwnerPredicate; -import mage.target.common.TargetCardInASingleGraveyard; +import mage.target.common.TargetCardInOpponentsGraveyard; /** * @@ -53,12 +50,6 @@ import mage.target.common.TargetCardInASingleGraveyard; */ public class DeadeyeTracker extends CardImpl { - private static final FilterCard filter = new FilterCard("cards from an opponent's graveyard"); - - static { - filter.add(Predicates.not(new OwnerPredicate(TargetController.YOU))); - } - public DeadeyeTracker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); @@ -73,7 +64,7 @@ public class DeadeyeTracker extends CardImpl { Effect effect = new ExploreSourceEffect(); effect.setText("{this} explores"); ability.addEffect(effect); - ability.addTarget(new TargetCardInASingleGraveyard(2, 2, filter)); + ability.addTarget(new TargetCardInOpponentsGraveyard(2, 2, new FilterCard("cards from an opponent's graveyard"), true)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java b/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java index afd5f0c8cad..b0fb8f6405b 100644 --- a/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java +++ b/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java @@ -58,6 +58,7 @@ public class DeclarationOfNaught extends CardImpl { // As Declaration of Naught enters the battlefield, name a card. this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL))); + //TODO: Make ability properly copiable // {U}: Counter target spell with the chosen name. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}")); ability.addTarget(new TargetSpell(filter)); diff --git a/Mage.Sets/src/mage/cards/d/DeepfireElemental.java b/Mage.Sets/src/mage/cards/d/DeepfireElemental.java index f4e4f95ecb7..60ed530eb7d 100644 --- a/Mage.Sets/src/mage/cards/d/DeepfireElemental.java +++ b/Mage.Sets/src/mage/cards/d/DeepfireElemental.java @@ -68,6 +68,7 @@ public class DeepfireElemental extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); + //TODO: Make ability properly copiable // {X}{X}{1}: Destroy target artifact or creature with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}{X}{1}")); ability.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/d/DiveDown.java b/Mage.Sets/src/mage/cards/d/DiveDown.java index d094dade725..8ce6392e1c8 100644 --- a/Mage.Sets/src/mage/cards/d/DiveDown.java +++ b/Mage.Sets/src/mage/cards/d/DiveDown.java @@ -48,7 +48,7 @@ public class DiveDown extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); // Target creature you control gets +0/+3 and gains hexproof until end of turn. - Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(0, 3, Duration.EndOfTurn); effect.setText("Target creature you control gets +0/+3"); this.getSpellAbility().addEffect(effect); effect = new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn); diff --git a/Mage.Sets/src/mage/cards/e/EntrancingMelody.java b/Mage.Sets/src/mage/cards/e/EntrancingMelody.java index b84395188be..8a49d375f06 100644 --- a/Mage.Sets/src/mage/cards/e/EntrancingMelody.java +++ b/Mage.Sets/src/mage/cards/e/EntrancingMelody.java @@ -37,7 +37,6 @@ import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.Duration; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; import mage.game.Game; import mage.target.common.TargetCreaturePermanent; @@ -65,8 +64,8 @@ public class EntrancingMelody extends CardImpl { if (ability instanceof SpellAbility) { ability.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X or less"); - filter.add(Predicates.not(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue))); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with converted mana cost X"); + filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue)); ability.addTarget(new TargetCreaturePermanent(filter)); } } diff --git a/Mage.Sets/src/mage/cards/f/FellFlagship.java b/Mage.Sets/src/mage/cards/f/FellFlagship.java index 1726fc2bdcb..c518dd75a15 100644 --- a/Mage.Sets/src/mage/cards/f/FellFlagship.java +++ b/Mage.Sets/src/mage/cards/f/FellFlagship.java @@ -28,6 +28,7 @@ package mage.cards.f; import java.util.UUID; +import mage.MageInt; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; @@ -58,6 +59,8 @@ public class FellFlagship extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); // Pirates you control get +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.WhileOnBattlefield, filter))); diff --git a/Mage.Sets/src/mage/cards/f/FloodwaterDam.java b/Mage.Sets/src/mage/cards/f/FloodwaterDam.java index dc1340b5777..10f6e12d9bf 100644 --- a/Mage.Sets/src/mage/cards/f/FloodwaterDam.java +++ b/Mage.Sets/src/mage/cards/f/FloodwaterDam.java @@ -53,6 +53,7 @@ public class FloodwaterDam extends CardImpl { public FloodwaterDam(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + //TODO: Make ability properly copiable // {X}{X}{1}, {tap}: Tap X target lands. Effect effect = new TapTargetEffect(); effect.setText("tap X target lands"); diff --git a/Mage.Sets/src/mage/cards/f/Foresight.java b/Mage.Sets/src/mage/cards/f/Foresight.java new file mode 100644 index 00000000000..19bd5aa71e8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Foresight.java @@ -0,0 +1,109 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.f; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbility; +import mage.abilities.effects.SearchEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public class Foresight extends CardImpl { + + public Foresight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}"); + + // Search your library for three cards, exile them, then shuffle your library. + this.getSpellAbility().addEffect(new ForesightEffect()); + + // Draw a card at the beginning of the next turn's upkeep. + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + } + + public Foresight(final Foresight card) { + super(card); + } + + @Override + public Foresight copy() { + return new Foresight(this); + } +} + +class ForesightEffect extends SearchEffect { + + ForesightEffect() { + super(new TargetCardInLibrary(3, new FilterCard()), Outcome.Benefit); + staticText = "Search your library for three cards, exile them, then shuffle your library."; + } + + ForesightEffect(final ForesightEffect effect) { + super(effect); + } + + @Override + public ForesightEffect copy() { + return new ForesightEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player.searchLibrary(target, game)) { + for (UUID targetId : getTargets()) { + Card card = player.getLibrary().getCard(targetId, game); + if (card != null) { + card.moveToExile(null, null, targetId, game); + } + } + return true; + } + player.shuffleLibrary(source, game); + return false; + } + + public List getTargets() { + return target.getTargets(); + } + +} diff --git a/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java b/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java index 46b50fe457f..2972eaff427 100644 --- a/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java +++ b/Mage.Sets/src/mage/cards/g/GethLordOfTheVault.java @@ -69,6 +69,7 @@ public class GethLordOfTheVault extends CardImpl { // Intimidate this.addAbility(IntimidateAbility.getInstance()); + //TODO: Make ability properly copiable // {X}{B}: Put target artifact or creature card with converted mana cost X from an opponent's graveyard onto the battlefield under your control tapped. // Then that player puts the top X cards of his or her library into his or her graveyard. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GethLordOfTheVaultEffect(), new ManaCostsImpl("{X}{B}")); diff --git a/Mage.Sets/src/mage/cards/g/GildedSentinel.java b/Mage.Sets/src/mage/cards/g/GildedSentinel.java index 060dd11be00..1175fab4a72 100644 --- a/Mage.Sets/src/mage/cards/g/GildedSentinel.java +++ b/Mage.Sets/src/mage/cards/g/GildedSentinel.java @@ -28,6 +28,7 @@ package mage.cards.g; import java.util.UUID; +import mage.MageInt; import mage.constants.SubType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -43,6 +44,9 @@ public class GildedSentinel extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); this.subtype.add(SubType.GOLEM); + + this.power = new MageInt(3); + this.toughness = new MageInt(3); } public GildedSentinel(final GildedSentinel card) { diff --git a/Mage.Sets/src/mage/cards/g/GorillaShaman.java b/Mage.Sets/src/mage/cards/g/GorillaShaman.java index fd7b5bc985c..96ce257d6f2 100644 --- a/Mage.Sets/src/mage/cards/g/GorillaShaman.java +++ b/Mage.Sets/src/mage/cards/g/GorillaShaman.java @@ -62,6 +62,7 @@ public class GorillaShaman extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); + //TODO: Make ability properly copiable // {X}{X}{1}: Destroy target noncreature artifact with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}{X}{1}")); ability.addTarget(new TargetPermanent(new FilterArtifactPermanent("noncreature artifact with converted mana cost X"))); diff --git a/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java b/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java index 1e0edfe2d0a..1b3082b518f 100644 --- a/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java +++ b/Mage.Sets/src/mage/cards/h/HakimLoreweaver.java @@ -81,6 +81,7 @@ public class HakimLoreweaver extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); + //TODO: Make ability properly copiable // {U}{U}: Return target Aura card from your graveyard to the battlefield attached to Hakim, Loreweaver. Activate this ability only during your upkeep and only if Hakim isn't enchanted. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new HakimLoreweaverEffect(), new ManaCostsImpl("{U}{U}"), new HakimLoreweaverCondition(), rule); ability.addTarget(new TargetCardInYourGraveyard()); diff --git a/Mage.Sets/src/mage/cards/h/HearthKami.java b/Mage.Sets/src/mage/cards/h/HearthKami.java index f9b6d38f2a7..636785d695b 100644 --- a/Mage.Sets/src/mage/cards/h/HearthKami.java +++ b/Mage.Sets/src/mage/cards/h/HearthKami.java @@ -60,6 +60,7 @@ public class HearthKami extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); + //TODO: Make ability properly copiable // {X}, Sacrifice Hearth Kami: Destroy target artifact with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}")); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java index 51502d1549e..07c212e770e 100644 --- a/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java +++ b/Mage.Sets/src/mage/cards/h/HopeOfGhirapur.java @@ -70,6 +70,7 @@ public class HopeOfGhirapur extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); + //TODO: Make ability properly copiable // Sacrifice Hope of Ghirapur: Until your next turn, target player who was dealt combat damage by Hope of Ghirapur this turn can't cast noncreature spells. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HopeOfGhirapurCantCastEffect(), new SacrificeSourceCost()); ability.addTarget(new TargetPlayer()); diff --git a/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java b/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java index f1b2d931d3f..a3d8e126cac 100644 --- a/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java +++ b/Mage.Sets/src/mage/cards/l/LinessaZephyrMage.java @@ -74,6 +74,7 @@ public class LinessaZephyrMage extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); + //TODO: Make ability properly copiable // {X}{U}{U}, {tap}: Return target creature with converted mana cost X to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new ManaCostsImpl("{X}{U}{U}")); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java b/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java index 16507b49f16..c9a584d835d 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheCandelabra.java @@ -59,6 +59,7 @@ public class MagusOfTheCandelabra extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); + //TODO: Make ability properly copiable // {X}, {T}: Untap X target lands. Effect effect = new UntapTargetEffect(); effect.setText("untap X target lands"); diff --git a/Mage.Sets/src/mage/cards/m/MartyrOfBones.java b/Mage.Sets/src/mage/cards/m/MartyrOfBones.java index eeda1f3e4df..ef14fb0c7c8 100644 --- a/Mage.Sets/src/mage/cards/m/MartyrOfBones.java +++ b/Mage.Sets/src/mage/cards/m/MartyrOfBones.java @@ -68,6 +68,7 @@ public class MartyrOfBones extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); + //TODO: Make ability properly copiable // {1}, Reveal X black cards from your hand, Sacrifice Martyr of Bones: Exile up to X target cards from a single graveyard. Effect effect = new ExileTargetEffect(null, null, Zone.GRAVEYARD); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(1)); diff --git a/Mage.Sets/src/mage/cards/m/MinamoSightbender.java b/Mage.Sets/src/mage/cards/m/MinamoSightbender.java index 9c7326c9a38..2b58cb8755f 100644 --- a/Mage.Sets/src/mage/cards/m/MinamoSightbender.java +++ b/Mage.Sets/src/mage/cards/m/MinamoSightbender.java @@ -64,6 +64,7 @@ public class MinamoSightbender extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); + //TODO: Make ability properly copiable // {X}, {T}: Target creature with power X or less can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new ManaCostsImpl("{X}")); Target target = new TargetCreaturePermanent(filter); diff --git a/Mage.Sets/src/mage/cards/m/MishrasHelix.java b/Mage.Sets/src/mage/cards/m/MishrasHelix.java index 3e5e464bc46..c8beab689b1 100644 --- a/Mage.Sets/src/mage/cards/m/MishrasHelix.java +++ b/Mage.Sets/src/mage/cards/m/MishrasHelix.java @@ -53,6 +53,7 @@ public class MishrasHelix extends CardImpl { public MishrasHelix(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); + //TODO: Make ability properly copiable // {X}, {tap}: Tap X target lands. Effect effect = new TapTargetEffect("X target lands"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); diff --git a/Mage.Sets/src/mage/cards/n/NecropolisFiend.java b/Mage.Sets/src/mage/cards/n/NecropolisFiend.java index eda396ee11c..6ddb06b9ed0 100644 --- a/Mage.Sets/src/mage/cards/n/NecropolisFiend.java +++ b/Mage.Sets/src/mage/cards/n/NecropolisFiend.java @@ -74,6 +74,7 @@ public class NecropolisFiend extends CardImpl { this.addAbility(new DelveAbility()); // Flying this.addAbility(FlyingAbility.getInstance()); + //TODO: Make ability properly copiable // {X}, {T}, Exile X cards from your graveyard: Target creature gets -X/-X until end of turn. DynamicValue xValue = new SignInversionDynamicValue(new ManacostVariableValue()); Effect effect = new BoostTargetEffect(xValue,xValue,Duration.EndOfTurn); diff --git a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java index 74edc354117..951a8c5ad04 100644 --- a/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java +++ b/Mage.Sets/src/mage/cards/n/NullmageAdvocate.java @@ -54,7 +54,7 @@ import java.util.UUID; public class NullmageAdvocate extends CardImpl { public NullmageAdvocate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.INSECT); this.subtype.add(SubType.DRUID); this.power = new MageInt(2); @@ -64,11 +64,11 @@ public class NullmageAdvocate extends CardImpl { Effect effect = new ReturnFromGraveyardToHandTargetEffect(); effect.setText("Return two target cards from an opponent's graveyard to his or her hand"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); - + effect = new DestroyTargetEffect("Destroy target artifact or enchantment"); effect.setTargetPointer(new SecondTargetPointer()); ability.addEffect(effect); - ability.addTarget(new TargetCardInOpponentsGraveyard(2,2, new FilterCard("two target cards from an opponent's graveyard"), true)); + ability.addTarget(new TargetCardInOpponentsGraveyard(2, 2, new FilterCard("cards from an opponent's graveyard"), true)); ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/Plaguebearer.java b/Mage.Sets/src/mage/cards/p/Plaguebearer.java index 7749ad75d46..e308d6b8eef 100644 --- a/Mage.Sets/src/mage/cards/p/Plaguebearer.java +++ b/Mage.Sets/src/mage/cards/p/Plaguebearer.java @@ -67,6 +67,7 @@ public class Plaguebearer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); + //TODO: Make ability properly copiable // {X}{X}{B}: Destroy target nonblack creature with converted mana cost X. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{X}{X}{B}")); ability.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java b/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java index 2d72cae907f..7efe835b4ee 100644 --- a/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java +++ b/Mage.Sets/src/mage/cards/q/QuillmaneBaku.java @@ -71,6 +71,7 @@ public class QuillmaneBaku extends CardImpl { // Whenever you cast a Spirit or Arcane spell, you may put a ki counter on Skullmane Baku. this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true)); + //TODO: Make ability properly copiable // {1}, Tap, Remove X ki counters from Quillmane Baku: Return target creature with converted mana cost X or less to its owner's hand. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new QuillmaneBakuReturnEffect(), new GenericManaCost(1)); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/s/SearchForAzcanta.java b/Mage.Sets/src/mage/cards/s/SearchForAzcanta.java index 70389391b7c..1fe5f694a8d 100644 --- a/Mage.Sets/src/mage/cards/s/SearchForAzcanta.java +++ b/Mage.Sets/src/mage/cards/s/SearchForAzcanta.java @@ -64,7 +64,7 @@ public class SearchForAzcanta extends CardImpl { this.addSuperType(SuperType.LEGENDARY); // At the beginning of your upkeep, look at the top card of your library. You may put it into your graveyard. Then if you have seven or more cards in your graveyard, you may transform Search for Azcanta. - Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SearchForAzcantaLookLibraryEffect(), TargetController.YOU, false); + Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SearchForAzcantaLookLibraryEffect(), TargetController.YOU, true); ability.addEffect(new ConditionalOneShotEffect(new TransformSourceEffect(true), new CardsInControllerGraveCondition(7), "Then if you have seven or more cards in your graveyard, you may transform {this}")); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/SliceinTwain.java b/Mage.Sets/src/mage/cards/s/SliceinTwain.java deleted file mode 100644 index abb03b31160..00000000000 --- a/Mage.Sets/src/mage/cards/s/SliceinTwain.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ - -package mage.cards.s; - -import mage.abilities.effects.common.DestroyTargetEffect; -import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.filter.StaticFilters; -import mage.target.TargetPermanent; - -import java.util.UUID; - -/** - * - * @author Loki - */ -public class SliceinTwain extends CardImpl { - - public SliceinTwain (UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}{G}"); - - this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); - this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); - } - - public SliceinTwain (final SliceinTwain card) { - super(card); - } - - @Override - public SliceinTwain copy() { - return new SliceinTwain(this); - } -} diff --git a/Mage.Sets/src/mage/cards/s/SurvivorOfTheUnseen.java b/Mage.Sets/src/mage/cards/s/SurvivorOfTheUnseen.java new file mode 100644 index 00000000000..cf4c4bade3e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SurvivorOfTheUnseen.java @@ -0,0 +1,118 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.constants.SubType; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.CumulativeUpkeepAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public class SurvivorOfTheUnseen extends CardImpl { + + public SurvivorOfTheUnseen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Cumulative upkeep {2} + this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{2}"))); + + // {T}: Draw two cards, then put a card from your hand on top of your library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SurvivorOfTheUnseenEffect(), new TapSourceCost())); + } + + public SurvivorOfTheUnseen(final SurvivorOfTheUnseen card) { + super(card); + } + + @Override + public SurvivorOfTheUnseen copy() { + return new SurvivorOfTheUnseen(this); + } +} + +class SurvivorOfTheUnseenEffect extends OneShotEffect { + + public SurvivorOfTheUnseenEffect() { + super(Outcome.DrawCard); + staticText = "Draw two cards, then put a card from your hand on top of your library"; + } + + public SurvivorOfTheUnseenEffect(final SurvivorOfTheUnseenEffect effect) { + super(effect); + } + + @Override + public SurvivorOfTheUnseenEffect copy() { + return new SurvivorOfTheUnseenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.drawCards(2, game); + putOnLibrary(player, source, game); + return true; + } + return false; + } + + private boolean putOnLibrary(Player player, Ability source, Game game) { + TargetCardInHand target = new TargetCardInHand(); + if (target.canChoose(source.getSourceId(), player.getId(), game)) { + player.chooseTarget(Outcome.ReturnToHand, target, source, game); + Card card = player.getHand().get(target.getFirstTarget(), game); + if (card != null) { + return player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false); + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SynodArtificer.java b/Mage.Sets/src/mage/cards/s/SynodArtificer.java index 98ab8fcfa59..bd0ac7cc024 100644 --- a/Mage.Sets/src/mage/cards/s/SynodArtificer.java +++ b/Mage.Sets/src/mage/cards/s/SynodArtificer.java @@ -69,6 +69,7 @@ public class SynodArtificer extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); + //TODO: Make ability properly copiable // {X}, {tap}: Tap X target noncreature artifacts. Effect tapEffect = new TapTargetEffect(); tapEffect.setText("Tap X target noncreature artifacts."); diff --git a/Mage.Sets/src/mage/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index 87f01b760fd..4532bc75483 100644 --- a/Mage.Sets/src/mage/sets/Alliances.java +++ b/Mage.Sets/src/mage/sets/Alliances.java @@ -78,6 +78,7 @@ public class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Fevered Strength", 11, Rarity.COMMON, FeveredStrength.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Floodwater Dam", 161, Rarity.RARE, mage.cards.f.FloodwaterDam.class)); cards.add(new SetCardInfo("Force of Will", 42, Rarity.UNCOMMON, mage.cards.f.ForceOfWill.class)); + cards.add(new SetCardInfo("Foresight", 162, Rarity.COMMON, mage.cards.f.Foresight.class)); cards.add(new SetCardInfo("Gorilla Berserkers", 75, Rarity.COMMON, GorillaBerserkers.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Gorilla Berserkers", 76, Rarity.COMMON, GorillaBerserkers.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Gorilla Chieftain", 77, Rarity.COMMON, mage.cards.g.GorillaChieftain.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage.Sets/src/mage/sets/Coldsnap.java b/Mage.Sets/src/mage/sets/Coldsnap.java index 2560657144e..ee0b109eb13 100644 --- a/Mage.Sets/src/mage/sets/Coldsnap.java +++ b/Mage.Sets/src/mage/sets/Coldsnap.java @@ -167,6 +167,7 @@ public class Coldsnap extends ExpansionSet { cards.add(new SetCardInfo("Surging Flame", 99, Rarity.COMMON, mage.cards.s.SurgingFlame.class)); cards.add(new SetCardInfo("Surging Might", 125, Rarity.COMMON, mage.cards.s.SurgingMight.class)); cards.add(new SetCardInfo("Surging Sentinels", 20, Rarity.COMMON, mage.cards.s.SurgingSentinels.class)); + cards.add(new SetCardInfo("Survivor of the Unseen", 48, Rarity.COMMON, mage.cards.s.SurvivorOfTheUnseen.class)); cards.add(new SetCardInfo("Swift Maneuver", 21, Rarity.COMMON, mage.cards.s.SwiftManeuver.class)); cards.add(new SetCardInfo("Tamanoa", 132, Rarity.RARE, mage.cards.t.Tamanoa.class)); cards.add(new SetCardInfo("Thermopod", 100, Rarity.COMMON, mage.cards.t.Thermopod.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/DefenderPlantToken.java b/Mage/src/main/java/mage/game/permanent/token/DefenderPlantToken.java index 046b1daab95..b1915879c10 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DefenderPlantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DefenderPlantToken.java @@ -52,7 +52,7 @@ public class DefenderPlantToken extends Token { cardType.add(CardType.CREATURE); subtype.add(SubType.PLANT); power = new MageInt(0); - toughness = new MageInt(1); + toughness = new MageInt(2); this.addAbility(DefenderAbility.getInstance()); }