From cff8e338974659cf6e1872895354bcfa1c603c45 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 16 Aug 2013 10:16:33 +0200 Subject: [PATCH] [SOK] Added 26 cards. --- .../saviorsofkamigawa/AEtherShockwave.java | 75 ++++++++++ .../sets/saviorsofkamigawa/AkkiUnderling.java | 79 ++++++++++ .../saviorsofkamigawa/AkutaBornOfAsh.java | 110 ++++++++++++++ .../AyumiTheLastVisitor.java | 73 +++++++++ .../saviorsofkamigawa/BarrelDownSokenzan.java | 70 +++++++++ .../sets/saviorsofkamigawa/BloodClock.java | 111 ++++++++++++++ .../saviorsofkamigawa/BounteousKirin.java | 110 ++++++++++++++ .../saviorsofkamigawa/BurningEyeZubera.java | 87 +++++++++++ .../saviorsofkamigawa/CelestialKirin.java | 109 ++++++++++++++ .../ChargeAcrossTheAraba.java | 68 +++++++++ .../saviorsofkamigawa/ChoiceOfDamnations.java | 120 +++++++++++++++ .../saviorsofkamigawa/CloudhoofKirin.java | 127 ++++++++++++++++ .../DescendantOfKiyomaro.java | 81 ++++++++++ .../sets/saviorsofkamigawa/Glitterfang.java | 69 +++++++++ .../saviorsofkamigawa/GodosIrregulars.java | 95 ++++++++++++ .../sets/saviorsofkamigawa/HailOfArrows.java | 64 ++++++++ .../HidetsugusSecondRite.java | 95 ++++++++++++ .../HomuraHumanAscendant.java | 108 ++++++++++++++ .../sets/saviorsofkamigawa/InfernalKirin.java | 128 ++++++++++++++++ .../saviorsofkamigawa/OkinaNightwatch.java | 74 ++++++++++ .../saviorsofkamigawa/PlowThroughReito.java | 69 +++++++++ .../saviorsofkamigawa/RushingTideZubera.java | 88 +++++++++++ .../sets/saviorsofkamigawa/Secretkeeper.java | 79 ++++++++++ .../saviorsofkamigawa/SinkIntoTakenuma.java | 68 +++++++++ .../sets/saviorsofkamigawa/SkyfireKirin.java | 138 ++++++++++++++++++ .../saviorsofkamigawa/ThoughtsOfRuin.java | 130 +++++++++++++++++ .../src/mage/sets/tenth/HailOfArrows.java | 52 +++++++ 27 files changed, 2477 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/AEtherShockwave.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/AkkiUnderling.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/AkutaBornOfAsh.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/AyumiTheLastVisitor.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/BarrelDownSokenzan.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/BounteousKirin.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/BurningEyeZubera.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/CelestialKirin.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/ChargeAcrossTheAraba.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/CloudhoofKirin.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfKiyomaro.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/Glitterfang.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/HidetsugusSecondRite.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/HomuraHumanAscendant.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/InfernalKirin.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/OkinaNightwatch.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/PlowThroughReito.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/RushingTideZubera.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/Secretkeeper.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/SinkIntoTakenuma.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java create mode 100644 Mage.Sets/src/mage/sets/saviorsofkamigawa/ThoughtsOfRuin.java create mode 100644 Mage.Sets/src/mage/sets/tenth/HailOfArrows.java diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/AEtherShockwave.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AEtherShockwave.java new file mode 100644 index 0000000000..408421be90 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AEtherShockwave.java @@ -0,0 +1,75 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.Mode; +import mage.abilities.effects.common.TapAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author LevelX2 + */ +public class AEtherShockwave extends CardImpl { + + private static final FilterCreaturePermanent filterSpirit = new FilterCreaturePermanent("all Spirits"); + private static final FilterCreaturePermanent filterNonSpirit = new FilterCreaturePermanent("all non-Spirit creatures"); + static { + filterSpirit.add(new SubtypePredicate("Spirit")); + filterNonSpirit.add(Predicates.not(new SubtypePredicate("Spirit"))); + } + + public AEtherShockwave(UUID ownerId) { + super(ownerId, 1, "AEther Shockwave", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{W}"); + this.expansionSetCode = "SOK"; + + this.color.setWhite(true); + + // Choose one - Tap all Spirits; or tap all non-Spirit creatures. + this.getSpellAbility().addEffect(new TapAllEffect(filterSpirit)); + + Mode mode = new Mode(); + mode.getEffects().add(new TapAllEffect(filterNonSpirit)); + this.getSpellAbility().addMode(mode); + } + + public AEtherShockwave(final AEtherShockwave card) { + super(card); + } + + @Override + public AEtherShockwave copy() { + return new AEtherShockwave(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/AkkiUnderling.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AkkiUnderling.java new file mode 100644 index 0000000000..257597b73c --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AkkiUnderling.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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.CardsInHandCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class AkkiUnderling extends CardImpl { + + public AkkiUnderling(UUID ownerId) { + super(ownerId, 93, "Akki Underling", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // As long as you have seven or more cards in hand, Akki Underling gets +2/+1 and has first strike. + Condition condition = new CardsInHandCondition(CardsInHandCondition.CountType.MORE_THAN,6); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( + new BoostSourceEffect(2,1, Duration.WhileOnBattlefield), condition, "As long as you have seven or more cards in hand, {this} gets +2/+1")); + ability.addEffect(new ConditionalContinousEffect( + new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield), condition, "and has first strike")); + this.addAbility(ability); + } + + public AkkiUnderling(final AkkiUnderling card) { + super(card); + } + + @Override + public AkkiUnderling copy() { + return new AkkiUnderling(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/AkutaBornOfAsh.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AkutaBornOfAsh.java new file mode 100644 index 0000000000..ba8a3eef82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AkutaBornOfAsh.java @@ -0,0 +1,110 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class AkutaBornOfAsh extends CardImpl { + + private static final FilterControlledPermanent filterSwamp = new FilterControlledPermanent("a Swamp"); + static { + filterSwamp.add(new SubtypePredicate("Swamp")); + } + + public AkutaBornOfAsh(UUID ownerId) { + super(ownerId, 61, "Akuta, Born of Ash", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Spirit"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + // At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return Akuta, Born of Ash from your graveyard to the battlefield. + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, + new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filterSwamp))), + TargetController.YOU, false), + new MoreCardsInHandThanOpponentsCondition(), + "At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return {this} from your graveyard to the battlefield."); + this.addAbility(ability); + } + + public AkutaBornOfAsh(final AkutaBornOfAsh card) { + super(card); + } + + @Override + public AkutaBornOfAsh copy() { + return new AkutaBornOfAsh(this); + } +} + +class MoreCardsInHandThanOpponentsCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + int cardsInHand = player.getHand().size(); + for (UUID playerId : game.getOpponents(source.getControllerId())) { + Player opponent = game.getPlayer(playerId); + if (opponent != null && opponent.getHand().size() >= cardsInHand) { + return false; + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/AyumiTheLastVisitor.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AyumiTheLastVisitor.java new file mode 100644 index 0000000000..556c70771c --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/AyumiTheLastVisitor.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.LandwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; + +/** + * + * @author LevelX2 + */ +public class AyumiTheLastVisitor extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("Legendary land"); + static { + filter.add(new SupertypePredicate("Legendary")); + } + + public AyumiTheLastVisitor(UUID ownerId) { + super(ownerId, 122, "Ayumi, the Last Visitor", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Spirit"); + + this.color.setGreen(true); + this.power = new MageInt(7); + this.toughness = new MageInt(3); + + // Legendary landwalk + this.addAbility(new LandwalkAbility(filter)); + + } + + public AyumiTheLastVisitor(final AyumiTheLastVisitor card) { + super(card); + } + + @Override + public AyumiTheLastVisitor copy() { + return new AyumiTheLastVisitor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BarrelDownSokenzan.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BarrelDownSokenzan.java new file mode 100644 index 0000000000..be1359e908 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BarrelDownSokenzan.java @@ -0,0 +1,70 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.SweepNumber; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DiscardTargetEffect; +import mage.abilities.effects.common.SweepEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class BarrelDownSokenzan extends CardImpl { + + public BarrelDownSokenzan(UUID ownerId) { + super(ownerId, 94, "Barrel Down Sokenzan", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{R}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Arcane"); + + this.color.setRed(true); + + // Sweep - Return any number of Mountains you control to their owner's hand. Barrel Down Sokenzan deals damage to target creature equal to twice the number of Mountains returned this way. + this.getSpellAbility().addEffect(new SweepEffect("Mountain")); + DynamicValue sweepValue = new MultipliedValue(new SweepNumber("Mountain", false), 2); + this.getSpellAbility().addEffect(new DamageTargetEffect(sweepValue)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + } + + public BarrelDownSokenzan(final BarrelDownSokenzan card) { + super(card); + } + + @Override + public BarrelDownSokenzan copy() { + return new BarrelDownSokenzan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java new file mode 100644 index 0000000000..aec4ea4ada --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java @@ -0,0 +1,111 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author LevelX2 + */ +public class BloodClock extends CardImpl { + + public BloodClock(UUID ownerId) { + super(ownerId, 153, "Blood Clock", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}"); + this.expansionSetCode = "SOK"; + + // At the beginning of each player's upkeep, that player returns a permanent he or she controls to its owner's hand unless he or she pays 2 life. + Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new BloodClockEffect(), TargetController.ANY, false, true); + this.addAbility(ability); + } + + public BloodClock(final BloodClock card) { + super(card); + } + + @Override + public BloodClock copy() { + return new BloodClock(this); + } +} + +class BloodClockEffect extends OneShotEffect { + + public BloodClockEffect() { + super(Outcome.ReturnToHand); + this.staticText = "that player returns a permanent he or she controls to its owner's hand unless he or she pays 2 life"; + } + + public BloodClockEffect(final BloodClockEffect effect) { + super(effect); + } + + @Override + public BloodClockEffect copy() { + return new BloodClockEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(targetPointer.getFirst(game, source)); + if (player == null) { + return false; + } + if (player.getLife() > 2 && player.chooseUse(Outcome.Neutral, "Pay 2 life? If you don't, return a permanent you control to its owner's hand.", game)) { + player.loseLife(2, game); + game.informPlayers(player.getName() + " pays 2 life. He will not return a permanent he or she controls."); + return true; + } else { + Target target = new TargetControlledPermanent(); + target.isRequired(); + if (target.canChoose(source.getSourceId(), player.getId(), game) && player.chooseTarget(outcome, target, source, game)) { + Permanent permanent = game.getPermanent(target.getFirstTarget()); + if (permanent != null) { + game.informPlayers(player.getName() + " returns " + permanent.getName() + " to hand."); + return permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false); + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BounteousKirin.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BounteousKirin.java new file mode 100644 index 0000000000..2d236aedcc --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BounteousKirin.java @@ -0,0 +1,110 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterSpiritOrArcaneCard; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ +public class BounteousKirin extends CardImpl { + + public BounteousKirin(UUID ownerId) { + super(ownerId, 123, "Bounteous Kirin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Kirin"); + this.subtype.add("Spirit"); + + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's converted mana cost. + this.addAbility(new SpellCastTriggeredAbility(Zone.BATTLEFIELD, new BounteousKirinEffect(), new FilterSpiritOrArcaneCard(), true, true)); + } + + public BounteousKirin(final BounteousKirin card) { + super(card); + } + + @Override + public BounteousKirin copy() { + return new BounteousKirin(this); + } +} + +class BounteousKirinEffect extends OneShotEffect { + + public BounteousKirinEffect() { + super(Outcome.GainLife); + this.staticText = "you may gain life equal to that spell's converted mana cost"; + } + + public BounteousKirinEffect(final BounteousKirinEffect effect) { + super(effect); + } + + @Override + public BounteousKirinEffect copy() { + return new BounteousKirinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getState().getStack().getSpell(getTargetPointer().getFirst(game, source)); + if (spell != null) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int life = spell.getManaCost().convertedManaCost(); + controller.gainLife(life, game); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BurningEyeZubera.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BurningEyeZubera.java new file mode 100644 index 0000000000..1ba9b7de9d --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BurningEyeZubera.java @@ -0,0 +1,87 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class BurningEyeZubera extends CardImpl { + + public BurningEyeZubera(UUID ownerId) { + super(ownerId, 95, "Burning-Eye Zubera", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Zubera"); + this.subtype.add("Spirit"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Burning-Eye Zubera dies, if 4 or more damage was dealt to it this turn, Burning-Eye Zubera deals 3 damage to target creature or player. + Ability ability = new ConditionalTriggeredAbility(new DiesTriggeredAbility(new DamageTargetEffect(3)),new SourceGotFourDamage(), + "When {this} dies, if 4 or more damage was dealt to it this turn, Burning-Eye Zubera deals 3 damage to target creature or player"); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public BurningEyeZubera(final BurningEyeZubera card) { + super(card); + } + + @Override + public BurningEyeZubera copy() { + return new BurningEyeZubera(this); + } +} + +class SourceGotFourDamage implements Condition { + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent == null) { + permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + } + return permanent.getDamage() > 3; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/CelestialKirin.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/CelestialKirin.java new file mode 100644 index 0000000000..2c6cb4a5cc --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/CelestialKirin.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.sets.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterSpiritOrArcaneCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.stack.Spell; + +/** + * + * @author LevelX2 + */ +public class CelestialKirin extends CardImpl { + + public CelestialKirin(UUID ownerId) { + super(ownerId, 3, "Celestial Kirin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Kirin"); + this.subtype.add("Spirit"); + + this.color.setWhite(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever you cast a Spirit or Arcane spell, destroy all permanents with that spell's converted mana cost. + this.addAbility(new SpellCastTriggeredAbility(Zone.BATTLEFIELD, new CelestialKirinEffect(), new FilterSpiritOrArcaneCard(), false, true)); + } + + public CelestialKirin(final CelestialKirin card) { + super(card); + } + + @Override + public CelestialKirin copy() { + return new CelestialKirin(this); + } +} + +class CelestialKirinEffect extends OneShotEffect { + + public CelestialKirinEffect() { + super(Outcome.GainLife); + this.staticText = "destroy all permanents with that spell's converted mana cost"; + } + + public CelestialKirinEffect(final CelestialKirinEffect effect) { + super(effect); + } + + @Override + public CelestialKirinEffect copy() { + return new CelestialKirinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getState().getStack().getSpell(getTargetPointer().getFirst(game, source)); + if (spell != null) { + int cmc = spell.getManaCost().convertedManaCost(); + FilterPermanent filter = new FilterPermanent(); + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc)); + return new DestroyAllEffect(filter).apply(game, source); + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChargeAcrossTheAraba.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChargeAcrossTheAraba.java new file mode 100644 index 0000000000..4412523392 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChargeAcrossTheAraba.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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.SweepNumber; +import mage.abilities.effects.common.SweepEffect; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class ChargeAcrossTheAraba extends CardImpl { + + public ChargeAcrossTheAraba(UUID ownerId) { + super(ownerId, 4, "Charge Across the Araba", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{W}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Arcane"); + + this.color.setWhite(true); + + // Sweep - Return any number of Plains you control to their owner's hand. Creatures you control get +1/+1 until end of turn for each Plains returned this way. + this.getSpellAbility().addEffect(new SweepEffect("Plains")); + DynamicValue sweepValue = new SweepNumber("Plains", true); + this.getSpellAbility().addEffect(new BoostControlledEffect(sweepValue, sweepValue, Duration.EndOfTurn)); + + } + + public ChargeAcrossTheAraba(final ChargeAcrossTheAraba card) { + super(card); + } + + @Override + public ChargeAcrossTheAraba copy() { + return new ChargeAcrossTheAraba(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java new file mode 100644 index 0000000000..c9691ed64f --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java @@ -0,0 +1,120 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetOpponent; + +/** + * + * @author LevelX2 + */ +public class ChoiceOfDamnations extends CardImpl { + + public ChoiceOfDamnations(UUID ownerId) { + super(ownerId, 62, "Choice of Damnations", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{5}{B}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Arcane"); + + this.color.setBlack(true); + + // Target opponent chooses a number. You may have that player lose that much life. If you don't, that player sacrifices all but that many permanents. + this.getSpellAbility().addEffect(new ChoiceOfDamnationsEffect()); + this.getSpellAbility().addTarget(new TargetOpponent(true)); + } + + public ChoiceOfDamnations(final ChoiceOfDamnations card) { + super(card); + } + + @Override + public ChoiceOfDamnations copy() { + return new ChoiceOfDamnations(this); + } +} + +class ChoiceOfDamnationsEffect extends OneShotEffect { + + public ChoiceOfDamnationsEffect() { + super(Outcome.Benefit); + this.staticText = "Target opponent chooses a number. You may have that player lose that much life. If you don't, that player sacrifices all but that many permanents"; + } + + public ChoiceOfDamnationsEffect(final ChoiceOfDamnationsEffect effect) { + super(effect); + } + + @Override + public ChoiceOfDamnationsEffect copy() { + return new ChoiceOfDamnationsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); + if (targetPlayer != null) { + int amount = targetPlayer.getAmount(0, Integer.MAX_VALUE, "Chooses a number", game); + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + StringBuilder sb = new StringBuilder("Shall ").append(targetPlayer.getName()).append(" lose ").append(amount).append(" life?"); + if (controller.chooseUse(outcome, sb.toString(), game)) { + targetPlayer.loseLife(amount, game); + } else { + int numberPermanents = game.getState().getBattlefield().countAll(new FilterPermanent(), targetPlayer.getId(), game); + if (numberPermanents > amount) { + int numberToSacrifice = numberPermanents - amount; + Target target = new TargetControlledPermanent(numberToSacrifice, numberToSacrifice, new FilterPermanent(), false); + target.setRequired(true); + targetPlayer.chooseTarget(Outcome.Sacrifice, target, source, game); + for (UUID uuid : target.getTargets()) { + Permanent permanent = game.getPermanent(uuid); + if (permanent != null) { + permanent.moveToZone(Zone.GRAVEYARD, source.getSourceId(), game, true); + } + } + } + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/CloudhoofKirin.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/CloudhoofKirin.java new file mode 100644 index 0000000000..d2f521c12e --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/CloudhoofKirin.java @@ -0,0 +1,127 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterSpiritOrArcaneCard; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class CloudhoofKirin extends CardImpl { + + public CloudhoofKirin(UUID ownerId) { + super(ownerId, 31, "Cloudhoof Kirin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Kirin"); + this.subtype.add("Spirit"); + + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever you cast a Spirit or Arcane spell, you may have target player put the top X cards of his or her library into his or her graveyard, where X is that spell's converted mana cost. + Ability ability = new SpellCastTriggeredAbility(Zone.BATTLEFIELD, new CloudhoofKirinEffect(), new FilterSpiritOrArcaneCard(), true, true); + ability.addTarget(new TargetPlayer(true)); + this.addAbility(ability); + } + + public CloudhoofKirin(final CloudhoofKirin card) { + super(card); + } + + @Override + public CloudhoofKirin copy() { + return new CloudhoofKirin(this); + } +} + +class CloudhoofKirinEffect extends OneShotEffect { + + public CloudhoofKirinEffect() { + super(Outcome.Detriment); + this.staticText = "you may have target player put the top X cards of his or her library into his or her graveyard, where X is that spell's converted mana cost"; + } + + public CloudhoofKirinEffect(final CloudhoofKirinEffect effect) { + super(effect); + } + + @Override + public CloudhoofKirinEffect copy() { + return new CloudhoofKirinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + if (spell != null) { + Player targetPlayer = null; + for(Target target: source.getTargets()) { + if (target instanceof TargetPlayer) { + targetPlayer = game.getPlayer(target.getFirstTarget()); + } + } + if (targetPlayer != null) { + int cardsCount = Math.min(spell.getManaCost().convertedManaCost(), targetPlayer.getLibrary().size()); + for (int i = 0; i < cardsCount; i++) { + Card card = targetPlayer.getLibrary().removeFromTop(game); + if (card != null) { + card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false); + } + else { + break; + } + } + return true; + } + + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfKiyomaro.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfKiyomaro.java new file mode 100644 index 0000000000..8a4892cf7f --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/DescendantOfKiyomaro.java @@ -0,0 +1,81 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class DescendantOfKiyomaro extends CardImpl { + + public DescendantOfKiyomaro(UUID ownerId) { + super(ownerId, 7, "Descendant of Kiyomaro", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // As long as you have more cards in hand than each opponent, Descendant of Kiyomaro gets +1/+2 and has "Whenever this creature deals combat damage, you gain 3 life." + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( + new BoostSourceEffect(1,2, Duration.WhileOnBattlefield), + new MoreCardsInHandThanOpponentsCondition(), + "As long as you have more cards in hand than each opponent, Descendant of Kiyomaro gets +1/+2")); + ability.addEffect(new ConditionalContinousEffect( + new GainAbilitySourceEffect(new DealsCombatDamageTriggeredAbility(new GainLifeEffect(3), false)), + new MoreCardsInHandThanOpponentsCondition(), + "and has \"Whenever this creature deals combat damage, you gain 3 life.\"")); + this.addAbility(ability); + } + + public DescendantOfKiyomaro(final DescendantOfKiyomaro card) { + super(card); + } + + @Override + public DescendantOfKiyomaro copy() { + return new DescendantOfKiyomaro(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/Glitterfang.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/Glitterfang.java new file mode 100644 index 0000000000..ba490ad8e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/Glitterfang.java @@ -0,0 +1,69 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; + +/** + * + * @author LevelX2 + */ +public class Glitterfang extends CardImpl { + + public Glitterfang(UUID ownerId) { + super(ownerId, 100, "Glitterfang", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Spirit"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Haste + this.addAbility(HasteAbility.getInstance()); + // At the beginning of the end step, return Glitterfang to its owner's hand. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.ANY, false)); + } + + public Glitterfang(final Glitterfang card) { + super(card); + } + + @Override + public Glitterfang copy() { + return new Glitterfang(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java new file mode 100644 index 0000000000..5bd0be3575 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/GodosIrregulars.java @@ -0,0 +1,95 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; +import mage.filter.predicate.permanent.BlockingPredicate; +import mage.game.Game; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class GodosIrregulars extends CardImpl { + + private static final FilterCreaturePermanent basicFilter = new FilterCreaturePermanent("creature blocking it"); + static { + basicFilter.add(new BlockingPredicate()); + } + + public GodosIrregulars(UUID ownerId) { + super(ownerId, 101, "Godo's Irregulars", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {R}: Godo's Irregulars deals 1 damage to target creature blocking it. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R")); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getAbilityType().equals(AbilityType.ACTIVATED)) { + ability.getTargets().clear(); + FilterCreaturePermanent filter = basicFilter.copy(); + filter.add(new BlockingAttackerIdPredicate(this.getId())); + Target target = new TargetCreaturePermanent(filter); + ability.addTarget(target); + } + } + + public GodosIrregulars(final GodosIrregulars card) { + super(card); + } + + @Override + public GodosIrregulars copy() { + return new GodosIrregulars(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java new file mode 100644 index 0000000000..4a2aa426f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HailOfArrows.java @@ -0,0 +1,64 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DamageMultiEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterAttackingCreature; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author LevelX2 + */ +public class HailOfArrows extends CardImpl { + + public HailOfArrows(UUID ownerId) { + super(ownerId, 11, "Hail of Arrows", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{W}"); + this.expansionSetCode = "SOK"; + + this.color.setWhite(true); + + // Hail of Arrows deals X damage divided as you choose among any number of target attacking creatures. + this.getSpellAbility().addEffect(new DamageMultiEffect(new ManacostVariableValue())); + this.getSpellAbility().addTarget(new TargetAttackingCreature(0, Integer.MAX_VALUE, new FilterAttackingCreature(), true)); + } + + public HailOfArrows(final HailOfArrows card) { + super(card); + } + + @Override + public HailOfArrows copy() { + return new HailOfArrows(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/HidetsugusSecondRite.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HidetsugusSecondRite.java new file mode 100644 index 0000000000..8dd0a999de --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HidetsugusSecondRite.java @@ -0,0 +1,95 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class HidetsugusSecondRite extends CardImpl { + + public HidetsugusSecondRite(UUID ownerId) { + super(ownerId, 102, "Hidetsugu's Second Rite", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{3}{R}"); + this.expansionSetCode = "SOK"; + + this.color.setRed(true); + + // If target player has exactly 10 life, Hidetsugu's Second Rite deals 10 damage to that player. + this.getSpellAbility().addEffect(new HidetsugusSecondRiteEffect()); + this.getSpellAbility().addTarget(new TargetPlayer(true)); + } + + public HidetsugusSecondRite(final HidetsugusSecondRite card) { + super(card); + } + + @Override + public HidetsugusSecondRite copy() { + return new HidetsugusSecondRite(this); + } +} + +class HidetsugusSecondRiteEffect extends OneShotEffect { + + public HidetsugusSecondRiteEffect() { + super(Outcome.Damage); + this.staticText = "If target player has exactly 10 life, Hidetsugu's Second Rite deals 10 damage to that player"; + } + + public HidetsugusSecondRiteEffect(final HidetsugusSecondRiteEffect effect) { + super(effect); + } + + @Override + public HidetsugusSecondRiteEffect copy() { + return new HidetsugusSecondRiteEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); + if (targetPlayer != null) { + if (targetPlayer.getLife() == 10) { + targetPlayer.damage(10, source.getSourceId(), game, false, true); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/HomuraHumanAscendant.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HomuraHumanAscendant.java new file mode 100644 index 0000000000..d3ac2eef35 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/HomuraHumanAscendant.java @@ -0,0 +1,108 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.FlippedCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.CopyTokenEffect; +import mage.abilities.effects.common.FlipSourceEffect; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilityControlledEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.permanent.token.Token; + +/** + * + * @author LevelX2 + */ +public class HomuraHumanAscendant extends CardImpl { + + public HomuraHumanAscendant(UUID ownerId) { + super(ownerId, 103, "Homura, Human Ascendant", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Monk"); + + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + this.flipCard = true; + this.flipCardName = "Homura's Essence"; + + // Homura, Human Ascendant can't block. + this.addAbility(new CantBlockAbility()); + // When Homura dies, return it to the battlefield flipped. + this.addAbility(new DiesTriggeredAbility(new FlipSourceEffect())); + + Ability flipAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new HomurasEssence2()), FlippedCondition.getInstance(), "{this} becomes Homura's Essence")); + flipAbility.setRuleVisible(false); + this.addAbility(flipAbility); + } + + public HomuraHumanAscendant(final HomuraHumanAscendant card) { + super(card); + } + + @Override + public HomuraHumanAscendant copy() { + return new HomuraHumanAscendant(this); + } +} + +class HomurasEssence2 extends Token { + + + HomurasEssence2() { + super("Homura's Essence", ""); + supertype.add("Legendary"); + cardType.add(CardType.ENCHANTMENT); + color.setRed(true); + // Creatures you control get +2/+2 and have flying and "{R}: This creature gets +1/+0 until end of turn." + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, new FilterCreaturePermanent(), false)); + ability.addEffect(new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield)); + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,0, Duration.EndOfTurn), new ManaCostsImpl("{R}")); + ability.addEffect(new GainAbilityControlledEffect(gainedAbility, Duration.WhileOnBattlefield)); + this.addAbility(ability); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/InfernalKirin.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/InfernalKirin.java new file mode 100644 index 0000000000..fdb9f1c3a9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/InfernalKirin.java @@ -0,0 +1,128 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterSpiritOrArcaneCard; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.Target; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class InfernalKirin extends CardImpl { + + public InfernalKirin(UUID ownerId) { + super(ownerId, 72, "Infernal Kirin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Kirin"); + this.subtype.add("Spirit"); + + this.color.setBlack(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever you cast a Spirit or Arcane spell, target player reveals his or her hand and discards all cards with that spell's converted mana cost. + Ability ability = new SpellCastTriggeredAbility(Zone.BATTLEFIELD, new InfernalKirinEffect(), new FilterSpiritOrArcaneCard(), false, true); + ability.addTarget(new TargetPlayer(true)); + this.addAbility(ability); + + } + + public InfernalKirin(final InfernalKirin card) { + super(card); + } + + @Override + public InfernalKirin copy() { + return new InfernalKirin(this); + } +} + +class InfernalKirinEffect extends OneShotEffect { + + public InfernalKirinEffect() { + super(Outcome.Detriment); + this.staticText = "target player reveals his or her hand and discards all cards with that spell's converted mana cost"; + } + + public InfernalKirinEffect(final InfernalKirinEffect effect) { + super(effect); + } + + @Override + public InfernalKirinEffect copy() { + return new InfernalKirinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source)); + if (spell != null) { + int cmc = spell.getManaCost().convertedManaCost(); + Player targetPlayer = null; + for(Target target: source.getTargets()) { + if (target instanceof TargetPlayer) { + targetPlayer = game.getPlayer(target.getFirstTarget()); + } + } + if (targetPlayer != null) { + if (targetPlayer.getHand().size() > 0) { + targetPlayer.revealCards("Infernal Kirin", targetPlayer.getHand(), game); + for (UUID uuid: targetPlayer.getHand().copy()) { + Card card = game.getCard(uuid); + if (card != null && card.getManaCost().convertedManaCost() == cmc) { + targetPlayer.discard(card, source, game); + } + } + } + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/OkinaNightwatch.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/OkinaNightwatch.java new file mode 100644 index 0000000000..69009977db --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/OkinaNightwatch.java @@ -0,0 +1,74 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class OkinaNightwatch extends CardImpl { + + public OkinaNightwatch(UUID ownerId) { + super(ownerId, 140, "Okina Nightwatch", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Human"); + this.subtype.add("Monk"); + + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // As long as you have more cards in hand than each opponent, Okina Nightwatch gets +3/+3. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( + new BoostSourceEffect(3,3, Duration.WhileOnBattlefield), + new MoreCardsInHandThanOpponentsCondition(), + "As long as you have more cards in hand than each opponent, Okina Nightwatch gets +3/+3")); + this.addAbility(ability); + } + + public OkinaNightwatch(final OkinaNightwatch card) { + super(card); + } + + @Override + public OkinaNightwatch copy() { + return new OkinaNightwatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/PlowThroughReito.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PlowThroughReito.java new file mode 100644 index 0000000000..f4cd80bab8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PlowThroughReito.java @@ -0,0 +1,69 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.SweepNumber; +import mage.abilities.effects.common.SweepEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class PlowThroughReito extends CardImpl { + + public PlowThroughReito(UUID ownerId) { + super(ownerId, 22, "Plow Through Reito", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Arcane"); + + this.color.setWhite(true); + + // Sweep - Return any number of Plains you control to their owner's hand. Target creature gets +1/+1 until end of turn for each Plains returned this way. + this.getSpellAbility().addEffect(new SweepEffect("Plains")); + DynamicValue sweepValue = new SweepNumber("Plains", false); + this.getSpellAbility().addEffect(new BoostTargetEffect(sweepValue, sweepValue, Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + } + + public PlowThroughReito(final PlowThroughReito card) { + super(card); + } + + @Override + public PlowThroughReito copy() { + return new PlowThroughReito(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/RushingTideZubera.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RushingTideZubera.java new file mode 100644 index 0000000000..d6ea14ae1a --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RushingTideZubera.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.sets.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class RushingTideZubera extends CardImpl { + + public RushingTideZubera(UUID ownerId) { + super(ownerId, 52, "Rushing-Tide Zubera", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Zubera"); + this.subtype.add("Spirit"); + + this.color.setBlue(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Rushing-Tide Zubera dies, if 4 or more damage was dealt to it this turn, draw three cards. + Ability ability = new ConditionalTriggeredAbility(new DiesTriggeredAbility(new DrawCardControllerEffect(3)),new RushingTideZuberaCondition(), + "When {this} dies, if 4 or more damage was dealt to it this turn, draw three cards."); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public RushingTideZubera(final RushingTideZubera card) { + super(card); + } + + @Override + public RushingTideZubera copy() { + return new RushingTideZubera(this); + } +} + +class RushingTideZuberaCondition implements Condition { + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent == null) { + permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + } + return permanent.getDamage() > 3; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/Secretkeeper.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/Secretkeeper.java new file mode 100644 index 0000000000..4cc1904049 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/Secretkeeper.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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class Secretkeeper extends CardImpl { + + public Secretkeeper(UUID ownerId) { + super(ownerId, 54, "Secretkeeper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Spirit"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // As long as you have more cards in hand than each opponent, Secretkeeper gets +2/+2 and has flying. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( + new BoostSourceEffect(2,2, Duration.WhileOnBattlefield), + new MoreCardsInHandThanOpponentsCondition(), + "As long as you have more cards in hand than each opponent, Secretkeeper gets +2/+2")); + ability.addEffect(new ConditionalContinousEffect( + new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), + new MoreCardsInHandThanOpponentsCondition(), + "and has flying")); + this.addAbility(ability); + } + + public Secretkeeper(final Secretkeeper card) { + super(card); + } + + @Override + public Secretkeeper copy() { + return new Secretkeeper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SinkIntoTakenuma.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SinkIntoTakenuma.java new file mode 100644 index 0000000000..1c62a4cd10 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SinkIntoTakenuma.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.saviorsofkamigawa; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.SweepNumber; +import mage.abilities.effects.common.DiscardTargetEffect; +import mage.abilities.effects.common.SweepEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class SinkIntoTakenuma extends CardImpl { + + public SinkIntoTakenuma(UUID ownerId) { + super(ownerId, 89, "Sink into Takenuma", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{B}"); + this.expansionSetCode = "SOK"; + this.subtype.add("Arcane"); + + this.color.setBlack(true); + + // Sweep - Return any number of Swamps you control to their owner's hand. Target player discards a card for each Swamp returned this way. + this.getSpellAbility().addEffect(new SweepEffect("Swamp")); + DynamicValue sweepValue = new SweepNumber("Swamp", false); + this.getSpellAbility().addEffect(new DiscardTargetEffect(sweepValue)); + this.getSpellAbility().addTarget(new TargetPlayer(true)); + } + + public SinkIntoTakenuma(final SinkIntoTakenuma card) { + super(card); + } + + @Override + public SinkIntoTakenuma copy() { + return new SinkIntoTakenuma(this); + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java new file mode 100644 index 0000000000..cf6e6bcb9d --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/SkyfireKirin.java @@ -0,0 +1,138 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continious.GainControlTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.AbilityType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterSpiritOrArcaneCard; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.stack.Spell; +import mage.target.Target; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author LevelX2 + */ +public class SkyfireKirin extends CardImpl { + + public SkyfireKirin(UUID ownerId) { + super(ownerId, 113, "Skyfire Kirin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "SOK"; + this.supertype.add("Legendary"); + this.subtype.add("Kirin"); + this.subtype.add("Spirit"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever you cast a Spirit or Arcane spell, you may gain control of target creature with that spell's converted mana cost until end of turn. + Ability ability = new SpellCastTriggeredAbility(Zone.BATTLEFIELD, new SkyfireKirinEffect(), new FilterSpiritOrArcaneCard(), true, true); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getAbilityType().equals(AbilityType.TRIGGERED)) { + Spell spell = game.getStack().getSpell(ability.getEffects().get(0).getTargetPointer().getFirst(game, ability)); + if (spell != null) { + int cmc = spell.getManaCost().convertedManaCost(); + ability.getTargets().clear(); + FilterPermanent filter = new FilterCreaturePermanent(new StringBuilder("creature with converted mana costs of ").append(cmc).toString()); + Target target = new TargetPermanent(filter); + ability.addTarget(target); + } + } + } + + public SkyfireKirin(final SkyfireKirin card) { + super(card); + } + + @Override + public SkyfireKirin copy() { + return new SkyfireKirin(this); + } +} + +class SkyfireKirinEffect extends OneShotEffect { + + public SkyfireKirinEffect() { + super(Outcome.Detriment); + this.staticText = "you may gain control of target creature with that spell's converted mana cost until end of turn"; + } + + public SkyfireKirinEffect(final SkyfireKirinEffect effect) { + super(effect); + } + + @Override + public SkyfireKirinEffect copy() { + return new SkyfireKirinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent targetCreature = null; + for(Target target: source.getTargets()) { + if (target instanceof TargetPermanent) { + targetCreature = game.getPermanent(target.getFirstTarget()); + } + } + if (targetCreature != null) { + ContinuousEffect effect = new GainControlTargetEffect(Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(targetCreature.getId())); + game.addEffect(effect, source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ThoughtsOfRuin.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ThoughtsOfRuin.java new file mode 100644 index 0000000000..3f41455722 --- /dev/null +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ThoughtsOfRuin.java @@ -0,0 +1,130 @@ +/* + * 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.saviorsofkamigawa; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LevelX2 + */ +public class ThoughtsOfRuin extends CardImpl { + + public ThoughtsOfRuin(UUID ownerId) { + super(ownerId, 118, "Thoughts of Ruin", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); + this.expansionSetCode = "SOK"; + + this.color.setRed(true); + + // Each player sacrifices a land for each card in your hand. + this.getSpellAbility().addEffect(new ThoughtsOfRuinEffect()); + + } + + public ThoughtsOfRuin(final ThoughtsOfRuin card) { + super(card); + } + + @Override + public ThoughtsOfRuin copy() { + return new ThoughtsOfRuin(this); + } +} + +class ThoughtsOfRuinEffect extends OneShotEffect { + + private static final FilterLandPermanent filter = new FilterLandPermanent(); + + public ThoughtsOfRuinEffect() { + super(Outcome.Detriment); + this.staticText = "Each player sacrifices a land for each card in your hand"; + } + + public ThoughtsOfRuinEffect(final ThoughtsOfRuinEffect effect) { + super(effect); + } + + @Override + public ThoughtsOfRuinEffect copy() { + return new ThoughtsOfRuinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int amount = controller.getHand().size(); + if (amount > 0) { + List permanentsToSacrifice = new ArrayList(); + // select all lands to sacrifice + for (UUID playerId : controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null) { + int lands = game.getState().getBattlefield().countAll(filter, playerId, game); + if (amount >= lands) { + permanentsToSacrifice.addAll(game.getState().getBattlefield().getAllActivePermanents(filter, playerId, game)); + } else { + FilterLandPermanent playerFilter = filter.copy(); + playerFilter.add(new ControllerIdPredicate(playerId)); + Target target = new TargetLandPermanent(amount, amount, playerFilter, true); + target.setRequired(true); + player.choose(outcome, target, source.getSourceId(), game); + for (UUID landId : target.getTargets()) { + Permanent permanent = game.getPermanent(landId); + if (permanent != null) { + permanentsToSacrifice.add(permanent); + } + } + } + + } + } + // sacrifice all lands + for (Permanent permanent :permanentsToSacrifice) { + permanent.sacrifice(source.getSourceId(), game); + } + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/tenth/HailOfArrows.java b/Mage.Sets/src/mage/sets/tenth/HailOfArrows.java new file mode 100644 index 0000000000..7b770ccc86 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/HailOfArrows.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.tenth; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class HailOfArrows extends mage.sets.saviorsofkamigawa.HailOfArrows { + + public HailOfArrows(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "10E"; + } + + public HailOfArrows(final HailOfArrows card) { + super(card); + } + + @Override + public HailOfArrows copy() { + return new HailOfArrows(this); + } +}