From 19ae958bc7ca11a0fa101f9c74e17ad165c49770 Mon Sep 17 00:00:00 2001 From: emerald000 Date: Wed, 14 Jan 2015 20:34:13 -0500 Subject: [PATCH] [FRF] Added 5 blue cards. --- .../sets/fatereforged/MindscourDragon.java | 67 +++++++++ .../mage/sets/fatereforged/MistfireAdept.java | 82 +++++++++++ .../sets/fatereforged/MonasterySiege.java | 132 ++++++++++++++++++ .../sets/fatereforged/NeutralizingBlast.java | 67 +++++++++ .../sets/fatereforged/RakshasasDisdain.java | 64 +++++++++ 5 files changed, 412 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fatereforged/MindscourDragon.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/MistfireAdept.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/MonasterySiege.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/NeutralizingBlast.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/RakshasasDisdain.java diff --git a/Mage.Sets/src/mage/sets/fatereforged/MindscourDragon.java b/Mage.Sets/src/mage/sets/fatereforged/MindscourDragon.java new file mode 100644 index 0000000000..c3399f0980 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/MindscourDragon.java @@ -0,0 +1,67 @@ +/* + * 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.fatereforged; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.common.DealsDamageToOpponentTriggeredAbility; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author emerald000 + */ +public class MindscourDragon extends CardImpl { + + public MindscourDragon(UUID ownerId) { + super(ownerId, 41, "Mindscour Dragon", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{U}{U}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Dragon"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever Mindscour Dragon deals combat damage to an opponent, target player puts the top four cards of his or her library into his or her graveyard. + Ability ability = new DealsDamageToOpponentTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), false, true); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public MindscourDragon(final MindscourDragon card) { + super(card); + } + + @Override + public MindscourDragon copy() { + return new MindscourDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/MistfireAdept.java b/Mage.Sets/src/mage/sets/fatereforged/MistfireAdept.java new file mode 100644 index 0000000000..312bbd3742 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/MistfireAdept.java @@ -0,0 +1,82 @@ +/* + * 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.fatereforged; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProwessAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author emerald000 + */ +public class MistfireAdept extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a noncreature spell"); + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public MistfireAdept(UUID ownerId) { + super(ownerId, 42, "Mistfire Adept", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Human"); + this.subtype.add("Monk"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Prowess + this.addAbility(new ProwessAbility()); + + // Whenever you cast a noncreature spell, target creature gains flying until end of turn. + Ability ability = new SpellCastControllerTriggeredAbility(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn), filter, false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public MistfireAdept(final MistfireAdept card) { + super(card); + } + + @Override + public MistfireAdept copy() { + return new MistfireAdept(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/MonasterySiege.java b/Mage.Sets/src/mage/sets/fatereforged/MonasterySiege.java new file mode 100644 index 0000000000..799cfbb802 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/MonasterySiege.java @@ -0,0 +1,132 @@ +/* + * 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.fatereforged; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.common.BeginningOfDrawTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.ModeChoiceSourceCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ChooseModeEffect; +import mage.abilities.effects.common.DrawDiscardControllerEffect; +import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.CostModificationType; +import mage.constants.Duration; +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.target.Target; +import mage.util.CardUtil; + +/** + * + * @author emerald000 + */ +public class MonasterySiege extends CardImpl { + + public MonasterySiege(UUID ownerId) { + super(ownerId, 43, "Monastery Siege", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "FRF"; + + // As Monastery Siege enters the battlefield, choose Khans or Dragons. + this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?", "Khans", "Dragons"), null, true, + "As {this} enters the battlefield, choose Khans or Dragons.", "")); + + // * Khans - At the beginning of your draw step, draw an additional card, then discard a card. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfDrawTriggeredAbility(new DrawDiscardControllerEffect(1, 1), TargetController.YOU, false), + new ModeChoiceSourceCondition("Khans"), + "• Khans — At the beginning of your draw step, draw an additional card, then discard a card.")); + + // * Dragons - Spells your opponents cast that target you or a permanent you control cost {2} more to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MonasterySiegeCostIncreaseEffect())); + } + + public MonasterySiege(final MonasterySiege card) { + super(card); + } + + @Override + public MonasterySiege copy() { + return new MonasterySiege(this); + } +} + +class MonasterySiegeCostIncreaseEffect extends CostModificationEffectImpl { + + MonasterySiegeCostIncreaseEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.INCREASE_COST); + staticText = "• Dragons — Spells your opponents cast that target you or a permanent you control cost {2} more to cast"; + } + + MonasterySiegeCostIncreaseEffect(MonasterySiegeCostIncreaseEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + SpellAbility spellAbility = (SpellAbility) abilityToModify; + CardUtil.adjustCost(spellAbility, -2); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + if (new ModeChoiceSourceCondition("Dragons").apply(game, source)) { + if (abilityToModify instanceof SpellAbility) { + if (game.getOpponents(source.getControllerId()).contains(abilityToModify.getControllerId())) { + for (Target target : abilityToModify.getTargets()) { + for (UUID targetUUID : target.getTargets()) { + if (targetUUID.equals(source.getControllerId())) { + return true; + } + Permanent permanent = game.getPermanent(targetUUID); + if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) { + return true; + } + } + } + } + } + } + return false; + } + + @Override + public MonasterySiegeCostIncreaseEffect copy() { + return new MonasterySiegeCostIncreaseEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/NeutralizingBlast.java b/Mage.Sets/src/mage/sets/fatereforged/NeutralizingBlast.java new file mode 100644 index 0000000000..6e02c89303 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/NeutralizingBlast.java @@ -0,0 +1,67 @@ +/* + * 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.fatereforged; + +import java.util.UUID; +import mage.abilities.effects.common.CounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.MulticoloredPredicate; +import mage.target.TargetSpell; + +/** + * + * @author emerald000 + */ +public class NeutralizingBlast extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("multicolored spell"); + static { + filter.add(new MulticoloredPredicate()); + } + + public NeutralizingBlast(UUID ownerId) { + super(ownerId, 44, "Neutralizing Blast", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{U}"); + this.expansionSetCode = "FRF"; + + // Counter target multicolored spell. + this.getSpellAbility().addEffect(new CounterTargetEffect()); + this.getSpellAbility().addTarget(new TargetSpell(filter)); + } + + public NeutralizingBlast(final NeutralizingBlast card) { + super(card); + } + + @Override + public NeutralizingBlast copy() { + return new NeutralizingBlast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/RakshasasDisdain.java b/Mage.Sets/src/mage/sets/fatereforged/RakshasasDisdain.java new file mode 100644 index 0000000000..48a1f6b849 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/RakshasasDisdain.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.fatereforged; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetSpell; + +/** + * + * @author emerald000 + */ +public class RakshasasDisdain extends CardImpl { + + public RakshasasDisdain(UUID ownerId) { + super(ownerId, 45, "Rakshasa's Disdain", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "FRF"; + + // Counter target spell unless its controller pays {1} for each card in your graveyard. + Effect effect = new CounterUnlessPaysEffect(new CardsInControllerGraveyardCount()); + effect.setText("Counter target spell unless its controller pays {1} for each card in your graveyard"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetSpell()); + } + + public RakshasasDisdain(final RakshasasDisdain card) { + super(card); + } + + @Override + public RakshasasDisdain copy() { + return new RakshasasDisdain(this); + } +}