From 959d55fef2f4be46a1f0790415080b3e87f81873 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 16 Apr 2014 17:38:41 +0200 Subject: [PATCH] [JOU] Added 9 cards. Fixed some bugs of JOU cards. --- .../sets/journeyintonyx/DesperateStand.java | 76 +++++++++++ .../sets/journeyintonyx/DiscipleOfDeceit.java | 125 ++++++++++++++++++ .../sets/journeyintonyx/FontOfFertility.java | 71 ++++++++++ .../sets/journeyintonyx/FontOfFortunes.java | 67 ++++++++++ .../mage/sets/journeyintonyx/FontOfIre.java | 69 ++++++++++ .../sets/journeyintonyx/FontOfReturn.java | 70 ++++++++++ .../mage/sets/journeyintonyx/FontOfVigor.java | 67 ++++++++++ .../sets/journeyintonyx/ForgebornOreads.java | 3 + .../mage/sets/journeyintonyx/GoldenHind.java | 64 +++++++++ .../sets/journeyintonyx/HarnessByForce.java | 76 +++++++++++ .../sets/journeyintonyx/SetessanTactics.java | 2 +- .../mage/sets/theros/MarchOfTheReturned.java | 6 +- .../costs/common/DiscardTargetCost.java | 2 +- .../ExchangeControlTargetEffect.java | 3 +- .../continious/GainControlTargetEffect.java | 28 ++-- 15 files changed, 713 insertions(+), 16 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/DesperateStand.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/DiscipleOfDeceit.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/FontOfFertility.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/FontOfFortunes.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/FontOfIre.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/FontOfReturn.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/FontOfVigor.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/GoldenHind.java create mode 100644 Mage.Sets/src/mage/sets/journeyintonyx/HarnessByForce.java diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DesperateStand.java b/Mage.Sets/src/mage/sets/journeyintonyx/DesperateStand.java new file mode 100644 index 00000000000..439e5de0328 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DesperateStand.java @@ -0,0 +1,76 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.abilityword.StriveAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.VigilanceAbility; +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 DesperateStand extends CardImpl { + + public DesperateStand(UUID ownerId) { + super(ownerId, 147, "Desperate Stand", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{R}{W}"); + this.expansionSetCode = "JOU"; + + this.color.setRed(true); + this.color.setWhite(true); + + // Strive - Desperate Stand costs RW more to cast for each target beyond the first. + this.addAbility(new StriveAbility("{R}{W}")); + // Any number of target creatures each get +2/+0 and gain first strike and vigilance until end of turn. + Effect effect = new BoostTargetEffect(2,0,Duration.EndOfTurn); + effect.setText("Any number of target creatures each get +2/+0"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, "and gain first strike")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, "and vigilance until end of turn")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); + + } + + public DesperateStand(final DesperateStand card) { + super(card); + } + + @Override + public DesperateStand copy() { + return new DesperateStand(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DiscipleOfDeceit.java b/Mage.Sets/src/mage/sets/journeyintonyx/DiscipleOfDeceit.java new file mode 100644 index 00000000000..a4fb0b79832 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DiscipleOfDeceit.java @@ -0,0 +1,125 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.keyword.InspiredAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.filter.common.FilterNonlandCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class DiscipleOfDeceit extends CardImpl { + + public DiscipleOfDeceit(UUID ownerId) { + super(ownerId, 148, "Disciple of Deceit", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}{B}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Human"); + this.subtype.add("Rogue"); + + this.color.setBlue(true); + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Inspired - Whenever Disciple of Deceit becomes untapped, you may discard a nonland card. If you do, search your library for a card with the same converted mana cost as that card, reveal it, put it into your hand, then shuffle your library. + this.addAbility(new InspiredAbility(new DiscipleOfDeceitEffect(), false)); + + } + + public DiscipleOfDeceit(final DiscipleOfDeceit card) { + super(card); + } + + @Override + public DiscipleOfDeceit copy() { + return new DiscipleOfDeceit(this); + } +} + +class DiscipleOfDeceitEffect extends OneShotEffect { + + public DiscipleOfDeceitEffect() { + super(Outcome.Benefit); + this.staticText = "you may discard a nonland card. If you do, search your library for a card with the same converted mana cost as that card, reveal it, put it into your hand, then shuffle your library"; + } + + public DiscipleOfDeceitEffect(final DiscipleOfDeceitEffect effect) { + super(effect); + } + + @Override + public DiscipleOfDeceitEffect copy() { + return new DiscipleOfDeceitEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + MageObject mageObject = game.getObject(source.getSourceId()); + if (player != null && mageObject != null) { + Cost cost = new DiscardTargetCost(new TargetCardInHand(new FilterNonlandCard())); + String message = "Discard a nonland card to search your library?"; + if (cost.canPay(source.getSourceId(), source.getControllerId(), game) + && player.chooseUse(Outcome.Detriment, message, game)) { + if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) { + Card card = game.getCard(cost.getTargets().getFirstTarget()); + if (card == null) { + return false; + } + String targetName = new StringBuilder("card with converted mana cost of ").append(card.getManaCost().convertedManaCost()).toString(); + FilterCard filter = new FilterCard(targetName); + filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, card.getManaCost().convertedManaCost())); + return new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true, true).apply(game, source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/FontOfFertility.java b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfFertility.java new file mode 100644 index 00000000000..86b5f064fc2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfFertility.java @@ -0,0 +1,71 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterBasicLandCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author LevelX2 + */ +public class FontOfFertility extends CardImpl { + + public FontOfFertility(UUID ownerId) { + super(ownerId, 125, "Font of Fertility", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "JOU"; + + this.color.setGreen(true); + + // {1}{G}, Sacrifice Font of Fertility: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, true, true, Outcome.PutLandInPlay), new ManaCostsImpl("{1}{G}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public FontOfFertility(final FontOfFertility card) { + super(card); + } + + @Override + public FontOfFertility copy() { + return new FontOfFertility(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/FontOfFortunes.java b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfFortunes.java new file mode 100644 index 00000000000..b174f21ea70 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfFortunes.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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class FontOfFortunes extends CardImpl { + + public FontOfFortunes(UUID ownerId) { + super(ownerId, 38, "Font of Fortunes", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "JOU"; + + this.color.setBlue(true); + + // {1}{U}, Sacrifice Font of Fortunes: Draw two cards. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(2), new ManaCostsImpl("{1}{U}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public FontOfFortunes(final FontOfFortunes card) { + super(card); + } + + @Override + public FontOfFortunes copy() { + return new FontOfFortunes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/FontOfIre.java b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfIre.java new file mode 100644 index 00000000000..74eac9a14f7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfIre.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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class FontOfIre extends CardImpl { + + public FontOfIre(UUID ownerId) { + super(ownerId, 97, "Font of Ire", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); + this.expansionSetCode = "JOU"; + + this.color.setRed(true); + + // {3}{R}, Sacrifice Font of Ire: Font of Ire deals 5 damage to target player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), new ManaCostsImpl("{3}{R}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetPlayer(true)); + this.addAbility(ability); + } + + public FontOfIre(final FontOfIre card) { + super(card); + } + + @Override + public FontOfIre copy() { + return new FontOfIre(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/FontOfReturn.java b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfReturn.java new file mode 100644 index 00000000000..be7a4b9598c --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfReturn.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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class FontOfReturn extends CardImpl { + + public FontOfReturn(UUID ownerId) { + super(ownerId, 71, "Font of Return", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}"); + this.expansionSetCode = "JOU"; + + this.color.setBlack(true); + + // {3}{B}, Sacrifice Font of Return: Return up to three target creature cards from your graveyard to your hand. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnFromGraveyardToHandTargetEffect(), new ManaCostsImpl("{1}{G}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCardInYourGraveyard(0, 3, new FilterCreatureCard("creature cards from your graveyard"))); + this.addAbility(ability); + } + + public FontOfReturn(final FontOfReturn card) { + super(card); + } + + @Override + public FontOfReturn copy() { + return new FontOfReturn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/FontOfVigor.java b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfVigor.java new file mode 100644 index 00000000000..f954edc2fce --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/FontOfVigor.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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class FontOfVigor extends CardImpl { + + public FontOfVigor(UUID ownerId) { + super(ownerId, 11, "Font of Vigor", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); + this.expansionSetCode = "JOU"; + + this.color.setWhite(true); + + // {2}{W}, Sacrifice Font of Vigor: You gain 7 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(7), new ManaCostsImpl("{2}{W}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + public FontOfVigor(final FontOfVigor card) { + super(card); + } + + @Override + public FontOfVigor copy() { + return new FontOfVigor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/ForgebornOreads.java b/Mage.Sets/src/mage/sets/journeyintonyx/ForgebornOreads.java index 7a697516976..71d20e4a88b 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/ForgebornOreads.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/ForgebornOreads.java @@ -28,6 +28,7 @@ package mage.sets.journeyintonyx; import java.util.UUID; +import mage.MageInt; import mage.abilities.Ability; import mage.abilities.abilityword.ConstellationAbility; import mage.abilities.effects.common.DamageTargetEffect; @@ -48,6 +49,8 @@ public class ForgebornOreads extends CardImpl { this.subtype.add("Nymph"); this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(2); // Constellation - Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to target creature or player. Ability ability = new ConstellationAbility(new DamageTargetEffect(1)); diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/GoldenHind.java b/Mage.Sets/src/mage/sets/journeyintonyx/GoldenHind.java new file mode 100644 index 00000000000..dc85bd8e1f9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/GoldenHind.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.journeyintonyx; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class GoldenHind extends CardImpl { + + public GoldenHind(UUID ownerId) { + super(ownerId, 124, "Golden Hind", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "JOU"; + this.subtype.add("Elk"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // T: Add {G} to your mana pool. + this.addAbility(new GreenManaAbility()); + } + + public GoldenHind(final GoldenHind card) { + super(card); + } + + @Override + public GoldenHind copy() { + return new GoldenHind(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/HarnessByForce.java b/Mage.Sets/src/mage/sets/journeyintonyx/HarnessByForce.java new file mode 100644 index 00000000000..2ca3cb0e8e8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/HarnessByForce.java @@ -0,0 +1,76 @@ +/* + * 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.journeyintonyx; + +import java.util.UUID; +import mage.abilities.abilityword.StriveAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.continious.GainControlTargetEffect; +import mage.abilities.keyword.HasteAbility; +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 HarnessByForce extends CardImpl { + + public HarnessByForce(UUID ownerId) { + super(ownerId, 100, "Harness by Force", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{R}{R}"); + this.expansionSetCode = "JOU"; + + this.color.setRed(true); + + // Strive - Harness by Force costs {2}{R} more to cast for each target beyond the first. + this.addAbility(new StriveAbility("{2}{R}")); + // Gain control of any number of target creatures until end of turn. Untap those creatures. They gain haste until end of turn. + Effect effect = new GainControlTargetEffect(Duration.EndOfTurn); + effect.setText("Gain control of any number of target creatures until end of turn"); + this.getSpellAbility().addEffect(effect); + effect = new UntapTargetEffect(); + effect.setText("Untap those creatures"); + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "They gain haste until end of turn")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); + } + + public HarnessByForce(final HarnessByForce card) { + super(card); + } + + @Override + public HarnessByForce copy() { + return new HarnessByForce(this); + } +} diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/SetessanTactics.java b/Mage.Sets/src/mage/sets/journeyintonyx/SetessanTactics.java index 8edf8c4c6b3..c0d31974a00 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/SetessanTactics.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/SetessanTactics.java @@ -51,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class SetessanTactics extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature"); static { filter.add(new AnotherPredicate()); diff --git a/Mage.Sets/src/mage/sets/theros/MarchOfTheReturned.java b/Mage.Sets/src/mage/sets/theros/MarchOfTheReturned.java index 368dc32cee2..25992f6c379 100644 --- a/Mage.Sets/src/mage/sets/theros/MarchOfTheReturned.java +++ b/Mage.Sets/src/mage/sets/theros/MarchOfTheReturned.java @@ -49,10 +49,8 @@ public class MarchOfTheReturned extends CardImpl { this.color.setBlack(true); // Return up to two target creature cards from your graveyard to your hand. - Effect effect = new ReturnFromGraveyardToHandTargetEffect(); - effect.setText("Return up to two target creature cards from your graveyard to your hand"); - this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0,2, new FilterCreatureCard())); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(0,2, new FilterCreatureCard("creature cards from your graveyard"))); } public MarchOfTheReturned(final MarchOfTheReturned card) { diff --git a/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java b/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java index 346b705e8a9..736b08520c3 100644 --- a/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java +++ b/Mage/src/mage/abilities/costs/common/DiscardTargetCost.java @@ -45,7 +45,7 @@ import mage.target.common.TargetCardInHand; */ public class DiscardTargetCost extends CostImpl { - List cards = new ArrayList(); + List cards = new ArrayList<>(); protected boolean randomDiscard; public DiscardTargetCost(TargetCardInHand target) { diff --git a/Mage/src/mage/abilities/effects/common/continious/ExchangeControlTargetEffect.java b/Mage/src/mage/abilities/effects/common/continious/ExchangeControlTargetEffect.java index 9effcd77db1..1366ecb91b7 100644 --- a/Mage/src/mage/abilities/effects/common/continious/ExchangeControlTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/ExchangeControlTargetEffect.java @@ -96,8 +96,7 @@ public class ExchangeControlTargetEffect extends ContinuousEffectImpl