diff --git a/Mage.Sets/src/mage/sets/fifthedition/Millstone.java b/Mage.Sets/src/mage/sets/fifthedition/Millstone.java index 8df11284bbf..59d18972a7f 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/Millstone.java +++ b/Mage.Sets/src/mage/sets/fifthedition/Millstone.java @@ -30,13 +30,13 @@ package mage.sets.fifthedition; import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Rarity; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.Constants.Zone; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.common.MillTargetEffect; import mage.target.TargetPlayer; /** @@ -50,7 +50,7 @@ public class Millstone extends CardImpl { this.expansionSetCode = "5ED"; // {2}, {tap}: Target player puts the top two cards of his or her library into his or her graveyard. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MillTargetEffect(2), new GenericManaCost(2)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(2), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/futuresight/GravenCairns.java b/Mage.Sets/src/mage/sets/futuresight/GravenCairns.java new file mode 100644 index 00000000000..5d950bfa077 --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/GravenCairns.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.futuresight; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class GravenCairns extends mage.sets.shadowmoor.GravenCairns { + + public GravenCairns(UUID ownerId) { + super(ownerId); + this.cardNumber = 175; + this.expansionSetCode = "FUT"; + } + + public GravenCairns(final GravenCairns card) { + super(card); + } + + @Override + public GravenCairns copy() { + return new GravenCairns(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/DrownerOfSecrets.java b/Mage.Sets/src/mage/sets/lorwyn/DrownerOfSecrets.java index 7feca267adb..c65bc441c36 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/DrownerOfSecrets.java +++ b/Mage.Sets/src/mage/sets/lorwyn/DrownerOfSecrets.java @@ -35,7 +35,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapTargetCost; -import mage.abilities.effects.common.MillTargetEffect; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.Predicates; @@ -68,7 +68,7 @@ public class DrownerOfSecrets extends CardImpl { this.toughness = new MageInt(3); // Tap an untapped Merfolk you control: Target player puts the top card of his or her library into his or her graveyard. - Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new MillTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(filter))); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(1), new TapTargetCost(new TargetControlledPermanent(filter))); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/GravenCairns.java b/Mage.Sets/src/mage/sets/shadowmoor/GravenCairns.java new file mode 100644 index 00000000000..1e36cb88325 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shadowmoor/GravenCairns.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.shadowmoor; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Mana; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.BasicManaEffect; +import mage.abilities.mana.BasicManaAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class GravenCairns extends CardImpl { + + public GravenCairns(UUID ownerId) { + super(ownerId, 272, "Graven Cairns", Rarity.RARE, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "SHM"; + + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + // {BR}, {tap}: Add {B}{B}, {B}{R}, or {R}{R} to your mana pool. + this.addAbility(new GravenCairnsFirstManaAbility()); + this.addAbility(new GravenCairnsSecondManaAbility()); + this.addAbility(new GravenCairnsThirdManaAbility()); + } + + public GravenCairns(final GravenCairns card) { + super(card); + } + + @Override + public GravenCairns copy() { + return new GravenCairns(this); + } +} + +class GravenCairnsFirstManaAbility extends BasicManaAbility { + + public GravenCairnsFirstManaAbility() { + super(new BasicManaEffect(new Mana(0, 0, 0, 0, 2, 0, 0))); + this.addManaCost(new ManaCostsImpl("{B/R}")); + this.netMana.setBlack(2); + } + + public GravenCairnsFirstManaAbility(final GravenCairnsFirstManaAbility ability) { + super(ability); + } + + @Override + public GravenCairnsFirstManaAbility copy() { + return new GravenCairnsFirstManaAbility(this); + } +} + +class GravenCairnsSecondManaAbility extends BasicManaAbility { + + public GravenCairnsSecondManaAbility() { + super(new BasicManaEffect(new Mana(1, 0, 0, 0, 1, 0, 0))); + this.addManaCost(new ManaCostsImpl("{B/R}")); + this.netMana.setBlack(1); + this.netMana.setRed(1); + } + + public GravenCairnsSecondManaAbility(final GravenCairnsSecondManaAbility ability) { + super(ability); + } + + @Override + public GravenCairnsSecondManaAbility copy() { + return new GravenCairnsSecondManaAbility(this); + } +} + +class GravenCairnsThirdManaAbility extends BasicManaAbility { + + public GravenCairnsThirdManaAbility() { + super(new BasicManaEffect(new Mana(2, 0, 0, 0, 0, 0, 0))); + this.addManaCost(new ManaCostsImpl("{B/R}")); + this.netMana.setRed(2); + } + + public GravenCairnsThirdManaAbility(final GravenCairnsThirdManaAbility ability) { + super(ability); + } + + @Override + public GravenCairnsThirdManaAbility copy() { + return new GravenCairnsThirdManaAbility(this); + } +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/effects/common/MillTargetEffect.java b/Mage/src/mage/abilities/effects/common/MillTargetEffect.java deleted file mode 100644 index 0dd8e2964a2..00000000000 --- a/Mage/src/mage/abilities/effects/common/MillTargetEffect.java +++ /dev/null @@ -1,90 +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.abilities.effects.common; -import mage.Constants; -import mage.abilities.Ability; -import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.game.Game; -import mage.players.Player; - -/** - * - * @author jeff - */ - - -public class MillTargetEffect extends OneShotEffect { - - int count = 0; - - public MillTargetEffect(final MillTargetEffect effect) { - super(effect); - this.count = effect.count; - } - - public MillTargetEffect(final int count) { - super(Constants.Outcome.Detriment); - this.count = count; - getText(); - } - - @Override - public boolean apply(Game game, Ability source) { - Player targetPlayer = game.getPlayer(source.getFirstTarget()); - if (targetPlayer != null) { - for (int i = 0; i < count; i++) { - if (!targetPlayer.getLibrary().getCardList().isEmpty()) { - Card card = targetPlayer.getLibrary().removeFromTop(game); - if (card != null) { - card.moveToZone(Constants.Zone.GRAVEYARD, source.getId(), game, false); - } - } - } - return true; - } - return false; - } - - @Override - public MillTargetEffect copy() { - return new MillTargetEffect(this); - } - - private void getText() { - StringBuilder sb = new StringBuilder("Target player puts the top "); - if (count > 1) { - sb.append(count).append(" cards of his or her library into his or her graveyard"); - }else { - sb.append("card of his or her library into his or her graveyard"); - } - staticText = sb.toString(); - } -}