From 810d33c8ba78609c33879e545f7ef8545d7d9c11 Mon Sep 17 00:00:00 2001 From: LevelX Date: Wed, 21 Dec 2011 19:56:47 +0100 Subject: [PATCH] [CHK] Brutal Deceiver, Callous Deceiver, Harsh Deceiver, Feral Deceiver - New cards Contagion Clasp - Changed counter ability outcome to unboost Creepy Doll - Fixed outcome Nim Deathmantle - Fix, It could target creatures going to opponents graveyard (fixes issue 383) Bonesplitter - Fixed equip costs Minor fixes to some cards - texts, removed unused imports, moved equip ability to last ability --- .../championsofkamigawa/BrutalDeceiver.java | 123 ++++++++++++++++++ .../championsofkamigawa/BudokaGardener.java | 2 +- .../championsofkamigawa/CallousDeceiver.java | 123 ++++++++++++++++++ .../championsofkamigawa/FeralDeceiver.java | 123 ++++++++++++++++++ .../championsofkamigawa/Frostwielder.java | 4 +- .../championsofkamigawa/HarshDeceiver.java | 122 +++++++++++++++++ .../sets/championsofkamigawa/HoldTheLine.java | 2 +- Mage.Sets/src/mage/sets/conflux/BoneSaw.java | 4 +- .../mage/sets/innistrad/ButchersCleaver.java | 9 +- .../src/mage/sets/innistrad/CreepyDoll.java | 2 +- .../src/mage/sets/mirrodin/Bonesplitter.java | 2 +- .../sets/scarsofmirrodin/ContagionClasp.java | 9 +- .../sets/scarsofmirrodin/DarksteelAxe.java | 2 +- .../sets/scarsofmirrodin/NimDeathmantle.java | 1 + .../src/mage/sets/worldwake/SearingBlaze.java | 2 +- .../mage/abilities/ActivatedAbilityImpl.java | 2 - .../common/LookLibraryControllerEffect.java | 88 +++++++++++++ .../counter/AddCountersTargetEffect.java | 8 +- 18 files changed, 608 insertions(+), 20 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/BrutalDeceiver.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/CallousDeceiver.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/FeralDeceiver.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/HarshDeceiver.java create mode 100644 Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BrutalDeceiver.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BrutalDeceiver.java new file mode 100644 index 00000000000..e5df9e91fcb --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BrutalDeceiver.java @@ -0,0 +1,123 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +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.ActivateOncePerTurnActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX + */ +public class BrutalDeceiver extends CardImpl { + + public BrutalDeceiver(UUID ownerId) { + super(ownerId, 161, "Brutal Deceiver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {1}: Look at the top card of your library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + + // {2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn. + Ability ability = new BrutalDeceiverAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0,Duration.EndOfTurn), new ManaCostsImpl("{2}")); + ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(),Duration.EndOfTurn)); + this.addAbility(ability); + } + + public BrutalDeceiver(final BrutalDeceiver card) { + super(card); + } + + @Override + public BrutalDeceiver copy() { + return new BrutalDeceiver(this); + } +} + +class BrutalDeceiverAbility extends ActivateOncePerTurnActivatedAbility { + + public BrutalDeceiverAbility(Zone zone, Effect effect, Cost cost) { + super(zone, effect, cost); + } + + public BrutalDeceiverAbility(BrutalDeceiverAbility ability) { + super(ability); + } + + @Override + public BrutalDeceiverAbility copy() { + return new BrutalDeceiverAbility(this); + } + + @Override + public boolean checkIfClause(Game game) { + Player player = game.getPlayer(this.getControllerId()); + if (player != null) { + Cards cards = new CardsImpl(); + Card card = player.getLibrary().getFromTop(game); + cards.add(card); + player.revealCards("Brutal Deceiver", cards, game); + if (card != null && card.getCardType().contains(CardType.LAND)) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "{2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn. Activate this ability only once each turn."; + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java index 768f32181b7..3544ca9c077 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java @@ -87,7 +87,7 @@ public class BudokaGardener extends CardImpl { class BudokaGardenerEffect extends OneShotEffect { BudokaGardenerEffect() { super(Constants.Outcome.PutLandInPlay); - staticText = "You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip {this}."; + staticText = "You may put a land card from your hand onto the battlefield. If you control ten or more lands, flip {this}"; } BudokaGardenerEffect(final BudokaGardenerEffect effect) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/CallousDeceiver.java b/Mage.Sets/src/mage/sets/championsofkamigawa/CallousDeceiver.java new file mode 100644 index 00000000000..d58ac987409 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/CallousDeceiver.java @@ -0,0 +1,123 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +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.ActivateOncePerTurnActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX + */ +public class CallousDeceiver extends CardImpl { + + public CallousDeceiver(UUID ownerId) { + super(ownerId, 53, "Callous Deceiver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + // {1}: Look at the top card of your library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + + // {2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains flying until end of turn. + Ability ability = new CallousDeceiverAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0,Duration.EndOfTurn), new ManaCostsImpl("{2}")); + ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(),Duration.EndOfTurn)); + this.addAbility(ability); + } + + public CallousDeceiver(final CallousDeceiver card) { + super(card); + } + + @Override + public CallousDeceiver copy() { + return new CallousDeceiver(this); + } + +} + +class CallousDeceiverAbility extends ActivateOncePerTurnActivatedAbility { + + public CallousDeceiverAbility(Zone zone, Effect effect, Cost cost) { + super(zone, effect, cost); + } + + public CallousDeceiverAbility(CallousDeceiverAbility ability) { + super(ability); + } + + @Override + public CallousDeceiverAbility copy() { + return new CallousDeceiverAbility(this); + } + + @Override + public boolean checkIfClause(Game game) { + Player player = game.getPlayer(this.getControllerId()); + if (player != null) { + Cards cards = new CardsImpl(); + Card card = player.getLibrary().getFromTop(game); + cards.add(card); + player.revealCards("Callous Deceiver", cards, game); + if (card != null && card.getCardType().contains(CardType.LAND)) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "{2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains flying until end of turn. Activate this ability only once each turn."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/FeralDeceiver.java b/Mage.Sets/src/mage/sets/championsofkamigawa/FeralDeceiver.java new file mode 100644 index 00000000000..b97a2f70b2a --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/FeralDeceiver.java @@ -0,0 +1,123 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +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.ActivateOncePerTurnActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX + */ +public class FeralDeceiver extends CardImpl { + + public FeralDeceiver(UUID ownerId) { + super(ownerId, 208, "Feral Deceiver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // {1}: Look at the top card of your library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + + // {2}: Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn. + Ability ability = new FeralDeceiverAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,2,Duration.EndOfTurn), new ManaCostsImpl("{2}")); + ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn)); + this.addAbility(ability); + } + + public FeralDeceiver(final FeralDeceiver card) { + super(card); + } + + @Override + public FeralDeceiver copy() { + return new FeralDeceiver(this); + } +} + +class FeralDeceiverAbility extends ActivateOncePerTurnActivatedAbility { + + public FeralDeceiverAbility(Zone zone, Effect effect, Cost cost) { + super(zone, effect, cost); + } + + public FeralDeceiverAbility(FeralDeceiverAbility ability) { + super(ability); + } + + @Override + public FeralDeceiverAbility copy() { + return new FeralDeceiverAbility(this); + } + + @Override + public boolean checkIfClause(Game game) { + Player player = game.getPlayer(this.getControllerId()); + if (player != null) { + Cards cards = new CardsImpl(); + Card card = player.getLibrary().getFromTop(game); + cards.add(card); + player.revealCards("Feral Deceiver", cards, game); + if (card != null && card.getCardType().contains(CardType.LAND)) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "{2}: Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn. Activate this ability only once each turn."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Frostwielder.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Frostwielder.java index 9f674d2ca47..0dc2a1abe92 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/Frostwielder.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Frostwielder.java @@ -40,7 +40,6 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.DamageTargetEffect; import mage.cards.CardImpl; @@ -75,7 +74,10 @@ public class Frostwielder extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(2); + // {T}: Frostwielder deals 1 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + + // If a creature dealt damage by Frostwielder this turn would die, exile it instead. ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FrostwielderEffect())); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/HarshDeceiver.java b/Mage.Sets/src/mage/sets/championsofkamigawa/HarshDeceiver.java new file mode 100644 index 00000000000..a39ecb9db14 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/HarshDeceiver.java @@ -0,0 +1,122 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +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.ActivateOncePerTurnActivatedAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LookLibraryControllerEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX + */ +public class HarshDeceiver extends CardImpl { + + public HarshDeceiver(UUID ownerId) { + super(ownerId, 11, "Harsh Deceiver", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // {1}: Look at the top card of your library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + + // {2}: Reveal the top card of your library. If it's a land card, untap {this} and it gets +1/+1 until end of turn. + Ability ability = new FeralDeceiverAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{2}")); + ability.addEffect(new BoostSourceEffect(1,1,Duration.EndOfTurn)); + this.addAbility(ability); + } + + public HarshDeceiver(final HarshDeceiver card) { + super(card); + } + + @Override + public HarshDeceiver copy() { + return new HarshDeceiver(this); + } +} + +class HarshDeceiverAbility extends ActivateOncePerTurnActivatedAbility { + + public HarshDeceiverAbility(Zone zone, Effect effect, Cost cost) { + super(zone, effect, cost); + } + + public HarshDeceiverAbility(HarshDeceiverAbility ability) { + super(ability); + } + + @Override + public HarshDeceiverAbility copy() { + return new HarshDeceiverAbility(this); + } + + @Override + public boolean checkIfClause(Game game) { + Player player = game.getPlayer(this.getControllerId()); + if (player != null) { + Cards cards = new CardsImpl(); + Card card = player.getLibrary().getFromTop(game); + cards.add(card); + player.revealCards("Harsh Deceiver", cards, game); + if (card != null && card.getCardType().contains(CardType.LAND)) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "{2}: Reveal the top card of your library. If it's a land card, untap {this} and it gets +1/+1 until end of turn. Activate this ability only once each turn."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/HoldTheLine.java b/Mage.Sets/src/mage/sets/championsofkamigawa/HoldTheLine.java index 8632121625d..e81a9eb9080 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/HoldTheLine.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/HoldTheLine.java @@ -46,9 +46,9 @@ public class HoldTheLine extends CardImpl { public HoldTheLine(UUID ownerId) { super(ownerId, 13, "Hold the Line", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{2}{W}{W}"); this.expansionSetCode = "CHK"; - this.color.setWhite(true); + // Blocking creatures get +7/+7 until end of turn. this.getSpellAbility().addEffect(new BoostAllEffect(7, 7, Duration.EndOfTurn, filter, false)); } diff --git a/Mage.Sets/src/mage/sets/conflux/BoneSaw.java b/Mage.Sets/src/mage/sets/conflux/BoneSaw.java index 9ef3a7b521e..eee41a7a1a0 100644 --- a/Mage.Sets/src/mage/sets/conflux/BoneSaw.java +++ b/Mage.Sets/src/mage/sets/conflux/BoneSaw.java @@ -49,9 +49,9 @@ public class BoneSaw extends CardImpl { super(ownerId, 135, "Bone Saw", Rarity.COMMON, new CardType[]{CardType.ARTIFACT}, "{0}"); this.expansionSetCode = "CON"; this.subtype.add("Equipment"); - this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); - } + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); +} public BoneSaw(final BoneSaw card) { super(card); diff --git a/Mage.Sets/src/mage/sets/innistrad/ButchersCleaver.java b/Mage.Sets/src/mage/sets/innistrad/ButchersCleaver.java index 0484e4196ee..a84d74001f8 100644 --- a/Mage.Sets/src/mage/sets/innistrad/ButchersCleaver.java +++ b/Mage.Sets/src/mage/sets/innistrad/ButchersCleaver.java @@ -40,9 +40,7 @@ import mage.abilities.effects.common.continious.BoostEquippedEffect; import mage.abilities.effects.common.continious.GainAbilityAttachedEffect; import mage.abilities.keyword.EquipAbility; import mage.abilities.keyword.LifelinkAbility; -import mage.abilities.keyword.UnblockableAbility; import mage.cards.CardImpl; -import mage.sets.magic2010.Lifelink; /** * @@ -57,14 +55,15 @@ public class ButchersCleaver extends CardImpl { this.expansionSetCode = "ISD"; this.subtype.add("Equipment"); - // Equip {3} - this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(3))); - // Equipped creature gets +3/+0. this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEquippedEffect(3, 0))); // As long as equipped creature is a Human, it has lifelink. this.addAbility(new ConditionalStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityAttachedEffect(LifelinkAbility.getInstance(), Constants.AttachmentType.EQUIPMENT), new EquippedHasSubtypeCondition("Human"), staticText)); + + // Equip {3} + this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(3))); + } public ButchersCleaver(final ButchersCleaver card) { diff --git a/Mage.Sets/src/mage/sets/innistrad/CreepyDoll.java b/Mage.Sets/src/mage/sets/innistrad/CreepyDoll.java index 41e8bfd1f5b..d9ede6935c5 100644 --- a/Mage.Sets/src/mage/sets/innistrad/CreepyDoll.java +++ b/Mage.Sets/src/mage/sets/innistrad/CreepyDoll.java @@ -110,7 +110,7 @@ class CreepyDollTriggeredAbility extends TriggeredAbilityImpl { CreepyDollEffect() { - super(Constants.Outcome.Tap); + super(Constants.Outcome.DestroyPermanent); staticText = ""; } diff --git a/Mage.Sets/src/mage/sets/mirrodin/Bonesplitter.java b/Mage.Sets/src/mage/sets/mirrodin/Bonesplitter.java index e57f4b1cdcb..9cd48ad299b 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/Bonesplitter.java +++ b/Mage.Sets/src/mage/sets/mirrodin/Bonesplitter.java @@ -48,7 +48,7 @@ public class Bonesplitter extends CardImpl { this.expansionSetCode = "MRD"; this.subtype.add("Equipment"); this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); - this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2))); + this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(1))); } public Bonesplitter(final Bonesplitter card) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ContagionClasp.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ContagionClasp.java index 2588b0a4312..b55b1275b6e 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ContagionClasp.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ContagionClasp.java @@ -30,7 +30,7 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; import mage.Constants.CardType; -import mage.Constants.Duration; +import mage.Constants.Outcome; import mage.Constants.Rarity; import mage.Constants.Zone; import mage.abilities.Ability; @@ -53,11 +53,16 @@ public class ContagionClasp extends CardImpl { public ContagionClasp (UUID ownerId) { super(ownerId, 144, "Contagion Clasp", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}"); this.expansionSetCode = "SOM"; - Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance()), false); + + // When Contagion Clasp enters the battlefield, put a -1/-1 counter on target creature. + Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersTargetEffect(CounterType.M1M1.createInstance(), Outcome.UnboostCreature), false); TargetCreaturePermanent target = new TargetCreaturePermanent(); target.setRequired(true); ability.addTarget(target); this.addAbility(ability); + + /* {4}, {T}: Proliferate. (You choose any number of permanents and/or players + * with counters on them, then give each another counter of a kind already there.) */ ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ProliferateEffect(), new GenericManaCost(4)); ability.addCost(new TapSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/DarksteelAxe.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/DarksteelAxe.java index d387dc470c8..64226e55e0c 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/DarksteelAxe.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/DarksteelAxe.java @@ -52,8 +52,8 @@ public class DarksteelAxe extends CardImpl { this.expansionSetCode = "SOM"; this.subtype.add("Equipment"); this.addAbility(IndestructibleAbility.getInstance()); - this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0))); + this.addAbility(new EquipAbility(Constants.Outcome.AddAbility, new GenericManaCost(2))); } public DarksteelAxe (final DarksteelAxe card) { diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java index 84e7b8a5efd..3167d4e9554 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/NimDeathmantle.java @@ -120,6 +120,7 @@ class NimDeathmantleTriggeredAbility extends TriggeredAbilityImpl { public SearingBlazeEffect() { super(Outcome.Damage); - staticText = "{this} deals 1 damage to target player and 1 damage to target creature that player controls. \nLandfall - If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player and 3 damage to that creature instead."; + staticText = "{this} deals 1 damage to target player and 1 damage to target creature that player controls. \nLandfall - If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player and 3 damage to that creature instead"; } public SearingBlazeEffect(final SearingBlazeEffect effect) { diff --git a/Mage/src/mage/abilities/ActivatedAbilityImpl.java b/Mage/src/mage/abilities/ActivatedAbilityImpl.java index f52f162271b..b32efb1466d 100644 --- a/Mage/src/mage/abilities/ActivatedAbilityImpl.java +++ b/Mage/src/mage/abilities/ActivatedAbilityImpl.java @@ -36,9 +36,7 @@ import mage.abilities.costs.Cost; import mage.abilities.costs.Costs; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCosts; -import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.PhyrexianManaCost; -import mage.abilities.costs.mana.VariableManaCost; import mage.abilities.effects.Effect; import mage.abilities.effects.Effects; import mage.cards.Card; diff --git a/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java b/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java new file mode 100644 index 00000000000..65e6a92a0fe --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/LookLibraryControllerEffect.java @@ -0,0 +1,88 @@ +/* +* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of BetaSteward_at_googlemail.com. +*/ + +package mage.abilities.effects.common; + +import mage.Constants.Outcome; +import mage.Constants.Zone; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX + */ +public class LookLibraryControllerEffect extends OneShotEffect { + + public LookLibraryControllerEffect() { + super(Outcome.Benefit); + staticText = "Look at the top card of your Library"; + } + + public LookLibraryControllerEffect(final LookLibraryControllerEffect effect) { + super(effect); + } + + @Override + public LookLibraryControllerEffect copy() { + return new LookLibraryControllerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + String windowname; + Player player = game.getPlayer(source.getControllerId()); + Card sourcecard = game.getCard(source.getSourceId()); + if (sourcecard == null) { + windowname = "Top card"; + } + else { + windowname = sourcecard.getName(); + } + if (player == null) { + return false; + } + + Card card = player.getLibrary().getFromTop(game); + if (card != null) { + Cards cards = new CardsImpl(Zone.PICK); + cards.add(card); + player.lookAtCards(windowname, cards, game); + } else { + return false; + } + + return true; + } +} + diff --git a/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java index d3dd0933f28..1a8d31e928f 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddCountersTargetEffect.java @@ -48,9 +48,13 @@ public class AddCountersTargetEffect extends OneShotEffect