diff --git a/Mage.Sets/src/mage/sets/Kaladesh.java b/Mage.Sets/src/mage/sets/Kaladesh.java index 4a398155c5d..c2240aecd93 100644 --- a/Mage.Sets/src/mage/sets/Kaladesh.java +++ b/Mage.Sets/src/mage/sets/Kaladesh.java @@ -58,5 +58,11 @@ public class Kaladesh extends ExpansionSet { this.numBoosterUncommon = 3; this.numBoosterRare = 1; this.ratioBoosterMythic = 8; + /* There are additional cards, numbered 265–270, that don't appear in Kaladesh + booster packs. These are new cards that are exclusive in the Planeswalker + Decks supplemental product, which are replacing Intro Packs. + These additional cards have a Kaladesh expansion symbol and are legal in all + formats in which Kaladesh is legal. */ + this.maxCardNumberInBooster = 264; } } diff --git a/Mage.Sets/src/mage/sets/kaladesh/ChandraPyrogenius.java b/Mage.Sets/src/mage/sets/kaladesh/ChandraPyrogenius.java new file mode 100644 index 00000000000..3348d3a9e29 --- /dev/null +++ b/Mage.Sets/src/mage/sets/kaladesh/ChandraPyrogenius.java @@ -0,0 +1,85 @@ +/* + * 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.kaladesh; + +import java.util.UUID; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effects; +import mage.abilities.effects.common.DamageAllControlledTargetEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ChandraPyrogenius extends CardImpl { + + public ChandraPyrogenius(UUID ownerId) { + super(ownerId, 265, "Chandra, Pyrogenius", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{4}{R}{R}"); + this.expansionSetCode = "KLD"; + this.subtype.add("Chandra"); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); + + // +2: Chandra, Pyrogenius deals 2 damage to each opponent. + this.addAbility(new LoyaltyAbility(new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT), 2)); + + // -3: Chandra, Pyrogenius deals 4 damage to target creature. + LoyaltyAbility ability = new LoyaltyAbility(new DamageTargetEffect(4), -3); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // -10: Chandra, Pyrogenius deals 6 damage to target player and each creature he or she controls. + Effects effects = new Effects(); + effects.add(new DamageTargetEffect(6)); + effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent())); + ability = new LoyaltyAbility(effects, -10); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public ChandraPyrogenius(final ChandraPyrogenius card) { + super(card); + } + + @Override + public ChandraPyrogenius copy() { + return new ChandraPyrogenius(this); + } +} diff --git a/Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java new file mode 100644 index 00000000000..de7e35c3a1f --- /dev/null +++ b/Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java @@ -0,0 +1,146 @@ +/* + * 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.kaladesh; + +import java.util.UUID; +import mage.MageObject; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.BasicManaEffect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GetEmblemEffect; +import mage.cards.Card; +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.FilterSpell; +import mage.game.Game; +import mage.game.command.Emblem; +import mage.players.Library; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ChandraTorchOfDefiance extends CardImpl { + + public ChandraTorchOfDefiance(UUID ownerId) { + super(ownerId, 110, "Chandra, Torch of Defiance", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{R}"); + this.expansionSetCode = "KLD"; + this.subtype.add("Chandra"); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); + + // +1: Exile the top card of your library. You may cast that card. If you don't, Chandra, Torch of Defiance deals 2 damage to each opponent. + LoyaltyAbility ability = new LoyaltyAbility(new ChandraTorchOfDefianceEffect(), 1); + this.addAbility(ability); + + // +1: Add {R}{R} to your mana pool. + this.addAbility(new LoyaltyAbility(new BasicManaEffect(Mana.RedMana(2)), +1)); + + // -3: Chandra, Torch of Defiance deals 4 damage to target creature. + ability = new LoyaltyAbility(new DamageTargetEffect(4), -3); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // -7: You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player." + this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new ChandraTorchOfDefianceEmblem()), -6)); + } + + public ChandraTorchOfDefiance(final ChandraTorchOfDefiance card) { + super(card); + } + + @Override + public ChandraTorchOfDefiance copy() { + return new ChandraTorchOfDefiance(this); + } +} + +class ChandraTorchOfDefianceEffect extends OneShotEffect { + + public ChandraTorchOfDefianceEffect() { + super(Outcome.Detriment); + this.staticText = "Exile the top card of your library. You may cast that card. If you don't, Chandra, Torch of Defiance deals 2 damage to each opponent"; + } + + public ChandraTorchOfDefianceEffect(final ChandraTorchOfDefianceEffect effect) { + super(effect); + } + + @Override + public ChandraTorchOfDefianceEffect copy() { + return new ChandraTorchOfDefianceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null && controller.getLibrary().size() > 0) { + Library library = controller.getLibrary(); + Card card = library.removeFromTop(game); + if (card != null) { + controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true); + if (controller.chooseUse(Outcome.Benefit, "Cast the card?", source, game)) { + controller.cast(card.getSpellAbility(), game, false); + } else { + new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT).apply(game, source); + } + } + return true; + } + return false; + } +} + +class ChandraTorchOfDefianceEmblem extends Emblem { + + // You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player." + public ChandraTorchOfDefianceEmblem() { + this.setName("Emblem - Chandra, Torch of Defiance"); + Effect effect = new DamageTargetEffect(5); + effect.setText("this emblem deals 5 damage to target creature or player"); + Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, new FilterSpell("a spell"), false, false); + ability.addTarget(new TargetCreatureOrPlayer()); + getAbilities().add(ability); + } +} diff --git a/Mage.Sets/src/mage/sets/kaladesh/NissaNaturesArtisan.java b/Mage.Sets/src/mage/sets/kaladesh/NissaNaturesArtisan.java new file mode 100644 index 00000000000..aff47101d86 --- /dev/null +++ b/Mage.Sets/src/mage/sets/kaladesh/NissaNaturesArtisan.java @@ -0,0 +1,131 @@ +/* + * 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.kaladesh; + +import java.util.LinkedHashSet; +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandCard; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class NissaNaturesArtisan extends CardImpl { + + public NissaNaturesArtisan(UUID ownerId) { + super(ownerId, 270, "Nissa, Nature's Artisan", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{4}{G}{G}"); + this.expansionSetCode = "KLD"; + this.subtype.add("Nissa"); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); + + // +3: You gain 3 life. + this.addAbility(new LoyaltyAbility(new GainLifeEffect(3), 3)); + + // -4: Reveal the top two cards of your library. Put all land cards from among them onto the battlefield and the rest into your hand. + this.addAbility(new LoyaltyAbility(new NissaNaturesArtisanEffect(), -4)); + + // -12: Creatures you control get +5/+5 and gain trample until end of turn. + Effect effect = new BoostControlledEffect(5, 5, Duration.EndOfTurn); + effect.setText("Creature you control get +5/+5"); + LoyaltyAbility ability = new LoyaltyAbility(effect, -12); + ability.addEffect(new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); + this.addAbility(ability); + } + + public NissaNaturesArtisan(final NissaNaturesArtisan card) { + super(card); + } + + @Override + public NissaNaturesArtisan copy() { + return new NissaNaturesArtisan(this); + } +} + +class NissaNaturesArtisanEffect extends OneShotEffect { + + public NissaNaturesArtisanEffect() { + super(Outcome.PutCardInPlay); + staticText = "Reveal the top two cards of your library. Put all land cards from among them onto the battlefield and the rest into your hand"; + } + + public NissaNaturesArtisanEffect(final NissaNaturesArtisanEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || sourceObject == null) { + return false; + } + Cards cards = new CardsImpl(); + cards.addAll(controller.getLibrary().getTopCards(game, 2)); + if (cards.size() > 0) { + controller.revealCards(sourceObject.getIdName(), cards, game); + Set toBattlefield = new LinkedHashSet<>(); + for (Card card : cards.getCards(new FilterLandCard(), source.getSourceId(), source.getControllerId(), game)) { + cards.remove(card); + toBattlefield.add(card); + } + controller.moveCards(toBattlefield, Zone.BATTLEFIELD, source, game, false, false, true, null); + controller.moveCards(cards, Zone.HAND, source, game); + } + return true; + } + + @Override + public NissaNaturesArtisanEffect copy() { + return new NissaNaturesArtisanEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/kaladesh/NissaVitalForce.java b/Mage.Sets/src/mage/sets/kaladesh/NissaVitalForce.java new file mode 100644 index 00000000000..79311297da3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/kaladesh/NissaVitalForce.java @@ -0,0 +1,123 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.kaladesh; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GetEmblemEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterControlledLandPermanent; +import mage.filter.common.FilterLandPermanent; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.command.Emblem; +import mage.game.permanent.token.Token; +import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author fireshoes + */ +public class NissaVitalForce extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("land you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + + public NissaVitalForce(UUID ownerId) { + super(ownerId, 163, "Nissa, Vital Force", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{3}{G}{G}"); + this.expansionSetCode = "KLD"; + this.subtype.add("Nissa"); + + this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5)); + + // +1: Untap target land you control. Until your next turn, it becomes a 5/5 Elemental creature with haste. It's still a land. + LoyaltyAbility ability = new LoyaltyAbility(new UntapTargetEffect(), 1); + ability.addEffect(new BecomesCreatureTargetEffect(new NissaVitalForceToken(), false, true, Duration.UntilYourNextTurn)); + ability.addTarget(new TargetLandPermanent(filter)); + this.addAbility(ability); + + // -3: Return target permanent card from your graveyard to your hand. + ability = new LoyaltyAbility(new ReturnToHandTargetEffect(), -3); + ability.addTarget(new TargetCardInYourGraveyard(new FilterPermanentCard("permanent card from your graveyard"))); + this.addAbility(ability); + + // -6: You get an emblem with "Whenever a land enters the battlefield under your control, you may draw a card." + this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new NissaVitalForceEmblem()), -6)); + } + + public NissaVitalForce(final NissaVitalForce card) { + super(card); + } + + @Override + public NissaVitalForce copy() { + return new NissaVitalForce(this); + } +} + +class NissaVitalForceToken extends Token { + + public NissaVitalForceToken() { + super("", "5/5 Elemental creature with haste"); + this.cardType.add(CardType.CREATURE); + + this.subtype.add("Elemental"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + this.addAbility(HasteAbility.getInstance()); + } +} + +class NissaVitalForceEmblem extends Emblem { + + // You get an emblem with "Whenever a land enters the battlefield under your control, you may draw a card." + public NissaVitalForceEmblem() { + this.setName("Emblem - Nissa, Vital Force"); + Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.COMMAND, new DrawCardSourceControllerEffect(1), new FilterControlledLandPermanent("a land"), + true, null, true); + getAbilities().add(ability); + } +}