diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java index de3f1ff55b..9e9768bbce 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BudokaGardener.java @@ -106,7 +106,7 @@ class BudokaGardenerEffect extends OneShotEffect { p.flip(game); } } - return false; + return true; } @Override diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/CloudcrestLake.java b/Mage.Sets/src/mage/sets/championsofkamigawa/CloudcrestLake.java new file mode 100644 index 0000000000..4bd8ab4385 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/CloudcrestLake.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.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.common.SkipUntapSourceEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.SimpleManaAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.cards.CardImpl; + +/** + * @author Loki + */ +public class CloudcrestLake extends CardImpl { + + public CloudcrestLake(UUID ownerId) { + super(ownerId, 274, "Cloudcrest Lake", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "CHK"; + this.addAbility(new ColorlessManaAbility()); + Ability whiteManaAbility = new WhiteManaAbility(); + whiteManaAbility.addEffect(new SkipUntapSourceEffect()); + this.addAbility(whiteManaAbility); + Ability blueManaAbility = new BlueManaAbility(); + blueManaAbility.addEffect(new SkipUntapSourceEffect()); + this.addAbility(blueManaAbility); + } + + public CloudcrestLake(final CloudcrestLake card) { + super(card); + } + + @Override + public CloudcrestLake copy() { + return new CloudcrestLake(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/InameLifeAspect.java b/Mage.Sets/src/mage/sets/championsofkamigawa/InameLifeAspect.java new file mode 100644 index 0000000000..6615a71c51 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/InameLifeAspect.java @@ -0,0 +1,79 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author Loki + */ +public class InameLifeAspect extends CardImpl { + + private final static FilterCard filter = new FilterCard("Spirit cards"); + + static { + filter.getSubtype().add("Spirit"); + filter.setScopeSubtype(Filter.ComparisonScope.Any); + } + + public InameLifeAspect(UUID ownerId) { + super(ownerId, 215, "Iname, Life Aspect", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "CHK"; + this.supertype.add("Legendary"); + this.subtype.add("Spirit"); + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + Ability ability = new DiesTriggeredAbility(new ExileSourceEffect(), true); + ability.addEffect(new ReturnToHandTargetEffect()); + ability.addTarget(new TargetCardInYourGraveyard(0, 0, filter)); + this.addAbility(ability); + } + + public InameLifeAspect(final InameLifeAspect card) { + super(card); + } + + @Override + public InameLifeAspect copy() { + return new InameLifeAspect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KitsuneHealer.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KitsuneHealer.java index 050244da29..68780dce34 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/KitsuneHealer.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KitsuneHealer.java @@ -71,7 +71,7 @@ public class KitsuneHealer extends CardImpl { Ability firstAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PreventDamageTargetEffect(Constants.Duration.EndOfTurn, 1), new TapSourceCost()); firstAbility.addTarget(new TargetCreatureOrPlayer()); this.addAbility(firstAbility); - Ability secondAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new KitsuneHealerEffect(Constants.Duration.EndOfTurn), new TapSourceCost()); + Ability secondAbility = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new KitsuneHealerEffect(), new TapSourceCost()); secondAbility.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(secondAbility); } @@ -89,9 +89,9 @@ public class KitsuneHealer extends CardImpl { class KitsuneHealerEffect extends PreventionEffectImpl { - public KitsuneHealerEffect(Constants.Duration duration) { - super(duration); - staticText = "Prevent all damage that would be dealt to target legendary creature " + duration.toString(); + public KitsuneHealerEffect() { + super(Constants.Duration.EndOfTurn); + staticText = "Prevent all damage that would be dealt to target legendary creature this turn"; } public KitsuneHealerEffect(final PreventAllCombatDamageEffect effect) { @@ -100,7 +100,7 @@ class KitsuneHealerEffect extends PreventionEffectImpl { @Override public KitsuneHealerEffect copy() { - return new KitsuneHealerEffect(Constants.Duration.EndOfTurn); + return new KitsuneHealerEffect(); } @Override diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KuroPitlord.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KuroPitlord.java new file mode 100644 index 0000000000..f750b79bce --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KuroPitlord.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class KuroPitlord extends CardImpl { + + public KuroPitlord(UUID ownerId) { + super(ownerId, 123, "Kuro, Pitlord", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{B}{B}{B}"); + this.expansionSetCode = "CHK"; + this.supertype.add("Legendary"); + this.subtype.add("Demon"); + this.subtype.add("Spirit"); + this.color.setBlack(true); + this.power = new MageInt(9); + this.toughness = new MageInt(9); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{B}{B}{B}{B}")), Constants.TargetController.YOU, false)); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostTargetEffect(-1, -1, Constants.Duration.EndOfTurn), new PayLifeCost(1)); + } + + public KuroPitlord(final KuroPitlord card) { + super(card); + } + + @Override + public KuroPitlord copy() { + return new KuroPitlord(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/LanternLitGraveyard.java b/Mage.Sets/src/mage/sets/championsofkamigawa/LanternLitGraveyard.java new file mode 100644 index 0000000000..f919f09b93 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/LanternLitGraveyard.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.championsofkamigawa; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.common.SkipUntapSourceEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.RedManaAbility; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class LanternLitGraveyard extends CardImpl { + + public LanternLitGraveyard(UUID ownerId) { + super(ownerId, 278, "Lantern-Lit Graveyard", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, ""); + this.expansionSetCode = "CHK"; + this.addAbility(new ColorlessManaAbility()); + Ability blueManaAbility = new BlueManaAbility(); + blueManaAbility.addEffect(new SkipUntapSourceEffect()); + this.addAbility(blueManaAbility); + Ability redManaAbility = new RedManaAbility(); + redManaAbility.addEffect(new SkipUntapSourceEffect()); + this.addAbility(redManaAbility); + } + + public LanternLitGraveyard(final LanternLitGraveyard card) { + super(card); + } + + @Override + public LanternLitGraveyard copy() { + return new LanternLitGraveyard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/NagaoBoundByHonor.java b/Mage.Sets/src/mage/sets/championsofkamigawa/NagaoBoundByHonor.java new file mode 100644 index 0000000000..19748bcfc7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/NagaoBoundByHonor.java @@ -0,0 +1,78 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.abilities.keyword.BushidoAbility; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author Loki + */ +public class NagaoBoundByHonor extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("Samurai creatures"); + + static { + filter.getSubtype().add("Samurai"); + filter.setScopeSubtype(Filter.ComparisonScope.Any); + } + + public NagaoBoundByHonor(UUID ownerId) { + super(ownerId, 36, "Nagao, Bound by Honor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "CHK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Samurai"); + this.color.setWhite(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + this.addAbility(new BushidoAbility(1)); + this.addAbility(new AttacksTriggeredAbility(new BoostControlledEffect(1, 1, Constants.Duration.EndOfTurn, filter, false), false)); + } + + public NagaoBoundByHonor(final NagaoBoundByHonor card) { + super(card); + } + + @Override + public NagaoBoundByHonor copy() { + return new NagaoBoundByHonor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/NezumiGraverobber.java b/Mage.Sets/src/mage/sets/championsofkamigawa/NezumiGraverobber.java new file mode 100644 index 0000000000..ae0e63720f --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/NezumiGraverobber.java @@ -0,0 +1,135 @@ +/* + * 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; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.Flipped; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.*; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; +import mage.players.Player; +import mage.target.common.TargetCardInGraveyard; +import mage.target.common.TargetCardInOpponentsGraveyard; + +/** + * @author Loki + */ +public class NezumiGraverobber extends CardImpl { + + public NezumiGraverobber(UUID ownerId) { + super(ownerId, 129, "Nezumi Graverobber", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Rat"); + this.subtype.add("Rogue"); + this.color.setBlack(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ExileTargetEffect(), new ManaCostsImpl("{1}{B}")); + ability.addTarget(new TargetCardInOpponentsGraveyard(new FilterCard())); + ability.addEffect(new NezumiGraverobberFlipEffect()); + this.addAbility(ability); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new NighteyesTheDesecratorToken()), Flipped.getInstance(), ""))); + } + + public NezumiGraverobber(final NezumiGraverobber card) { + super(card); + } + + @Override + public NezumiGraverobber copy() { + return new NezumiGraverobber(this); + } +} + +class NezumiGraverobberFlipEffect extends OneShotEffect { + + NezumiGraverobberFlipEffect() { + super(Constants.Outcome.BecomeCreature); + staticText = "If no cards are in that graveyard, flip Nezumi Graverobber"; + } + + NezumiGraverobberFlipEffect(final NezumiGraverobberFlipEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Card card = game.getCard(targetPointer.getFirst(source)); + if (card != null) { + Player player = game.getPlayer(card.getOwnerId()); + if (player != null) { + if (player.getGraveyard().size() == 0) { + Permanent p = game.getPermanent(source.getSourceId()); + if (p != null) { + p.flip(game); + } + } + } + } + return true; + } + + @Override + public NezumiGraverobberFlipEffect copy() { + return new NezumiGraverobberFlipEffect(this); + } + +} + +class NighteyesTheDesecratorToken extends Token { + NighteyesTheDesecratorToken() { + super("Nighteyes The Desecrator", ""); + supertype.add("Legendary"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Rat"); + subtype.add("Wizard"); + power = new MageInt(4); + toughness = new MageInt(2); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), new ManaCostsImpl("{4}{B}")); + ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard())); + this.addAbility(ability); + } +} diff --git a/Mage.Sets/src/mage/sets/planechase/VerdantForce.java b/Mage.Sets/src/mage/sets/planechase/VerdantForce.java new file mode 100644 index 0000000000..c1e0b9fe9f --- /dev/null +++ b/Mage.Sets/src/mage/sets/planechase/VerdantForce.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.planechase; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class VerdantForce extends mage.sets.tempest.VerdantForce { + + public VerdantForce(UUID ownerId) { + super(ownerId); + this.cardNumber = 81; + this.expansionSetCode = "HOP"; + } + + public VerdantForce(final VerdantForce card) { + super(card); + } + + @Override + public VerdantForce copy() { + return new VerdantForce(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnika/CivicWayfinder.java b/Mage.Sets/src/mage/sets/ravnika/CivicWayfinder.java new file mode 100644 index 0000000000..2b9b1e714d --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnika/CivicWayfinder.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.ravnika; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class CivicWayfinder extends mage.sets.tenth.CivicWayfinder { + + public CivicWayfinder(UUID ownerId) { + super(ownerId); + this.cardNumber = 157; + this.expansionSetCode = "RAV"; + } + + public CivicWayfinder(final CivicWayfinder card) { + super(card); + } + + @Override + public CivicWayfinder copy() { + return new CivicWayfinder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ravnika/ScionOfTheWild.java b/Mage.Sets/src/mage/sets/ravnika/ScionOfTheWild.java new file mode 100644 index 0000000000..88340e9437 --- /dev/null +++ b/Mage.Sets/src/mage/sets/ravnika/ScionOfTheWild.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.ravnika; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class ScionOfTheWild extends mage.sets.tenth.ScionOfTheWild { + + public ScionOfTheWild(UUID ownerId) { + super(ownerId); + this.cardNumber = 182; + this.expansionSetCode = "RAV"; + } + + public ScionOfTheWild(final ScionOfTheWild card) { + super(card); + } + + @Override + public ScionOfTheWild copy() { + return new ScionOfTheWild(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java b/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java index 562befbd98..03ab5285cb 100644 --- a/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java @@ -31,6 +31,7 @@ package mage.abilities.effects.common; import mage.Constants.Outcome; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; import mage.game.Game; import mage.game.permanent.Permanent; @@ -59,7 +60,13 @@ public class ExileSourceEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { return permanent.moveToExile(null, "", source.getId(), game); - } + } else { + // try to exile card + Card card = game.getCard(source.getSourceId()); + if (card != null) { + return card.moveToExile(null, "", source.getId(), game); + } + } return false; } diff --git a/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java b/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java index 588d4bdd0a..6a60d07663 100644 --- a/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileTargetEffect.java @@ -33,6 +33,7 @@ import mage.Constants.Outcome; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; import mage.game.Game; import mage.game.permanent.Permanent; @@ -68,11 +69,16 @@ public class ExileTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(source.getFirstTarget()); + Permanent permanent = game.getPermanent(targetPointer.getFirst(source)); if (permanent != null) { return permanent.moveToExile(exileId, exileZone, source.getId(), game); - } - return false; + } else { + Card card = game.getCard(targetPointer.getFirst(source)); + if (card != null) { + return card.moveToExile(exileId, exileZone, source.getId(), game); + } + } + return false; } @Override diff --git a/Mage/src/mage/target/common/TargetCardInOpponentsGraveyard.java b/Mage/src/mage/target/common/TargetCardInOpponentsGraveyard.java new file mode 100644 index 0000000000..ada238d497 --- /dev/null +++ b/Mage/src/mage/target/common/TargetCardInOpponentsGraveyard.java @@ -0,0 +1,48 @@ +package mage.target.common; + +import mage.Constants; +import mage.abilities.Ability; +import mage.cards.Card; +import mage.filter.FilterCard; +import mage.game.Game; +import mage.target.TargetCard; + +import java.util.UUID; + + +public class TargetCardInOpponentsGraveyard extends TargetCard { + + public TargetCardInOpponentsGraveyard(FilterCard filter) { + this(1, 1, filter); + } + + public TargetCardInOpponentsGraveyard(int minNumTargets, int maxNumTargets, FilterCard filter) { + super(minNumTargets, maxNumTargets, Constants.Zone.GRAVEYARD, filter); + this.targetName = filter.getMessage() + " from an opponent's graveyard"; + } + + public TargetCardInOpponentsGraveyard(final TargetCardInOpponentsGraveyard target) { + super(target); + } + + @Override + public boolean canTarget(UUID id, Ability source, Game game) { + Card card = game.getCard(id); + if (card != null && game.getZone(card.getId()) == Constants.Zone.GRAVEYARD) { + if (game.getOpponents(source.getControllerId()).contains(card.getOwnerId())) { + return filter.match(card); + } + } + return false; + } + + @Override + public boolean canChoose(UUID sourceControllerId, Game game) { + return true; + } + + @Override + public TargetCardInOpponentsGraveyard copy() { + return new TargetCardInOpponentsGraveyard(this); + } +}