From 74c354ff3c669cdb2cd6d3d77cfc9b1946747641 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 20 Jun 2015 11:39:55 +0300 Subject: [PATCH 01/42] Add ExileFromTopOfLibraryCost and implement some cards that use it: Arc-Slogger, Royal Herbalist, and Seasoned Tactician --- .../mage/sets/alliances/RoyalHerbalist1.java | 71 +++++++++++++++ .../mage/sets/alliances/RoyalHerbalist2.java | 56 ++++++++++++ .../sets/alliances/SeasonedTactician.java | 73 ++++++++++++++++ .../src/mage/sets/mirrodin/ArcSlogger.java | 72 ++++++++++++++++ .../common/ExileFromTopOfLibraryCost.java | 86 +++++++++++++++++++ 5 files changed, 358 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/alliances/RoyalHerbalist1.java create mode 100644 Mage.Sets/src/mage/sets/alliances/RoyalHerbalist2.java create mode 100644 Mage.Sets/src/mage/sets/alliances/SeasonedTactician.java create mode 100644 Mage.Sets/src/mage/sets/mirrodin/ArcSlogger.java create mode 100644 Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java diff --git a/Mage.Sets/src/mage/sets/alliances/RoyalHerbalist1.java b/Mage.Sets/src/mage/sets/alliances/RoyalHerbalist1.java new file mode 100644 index 0000000000..43da9ffc9b --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/RoyalHerbalist1.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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromTopOfLibraryCost; +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 LoneFox + + */ +public class RoyalHerbalist1 extends CardImpl { + + public RoyalHerbalist1(UUID ownerId) { + super(ownerId, 147, "Royal Herbalist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}, Exile the top card of your library: You gain 1 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new ManaCostsImpl("{2}")); + ability.addCost(new ExileFromTopOfLibraryCost(1)); + this.addAbility(ability); + } + + public RoyalHerbalist1(final RoyalHerbalist1 card) { + super(card); + } + + @Override + public RoyalHerbalist1 copy() { + return new RoyalHerbalist1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/RoyalHerbalist2.java b/Mage.Sets/src/mage/sets/alliances/RoyalHerbalist2.java new file mode 100644 index 0000000000..df1a431a58 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/RoyalHerbalist2.java @@ -0,0 +1,56 @@ +/* + * 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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class RoyalHerbalist2 extends mage.sets.alliances.RoyalHerbalist1 { + + public RoyalHerbalist2(UUID ownerId) { + super(ownerId); + this.cardNumber = 148; + } + + public RoyalHerbalist2(final RoyalHerbalist2 card) { + super(card); + } + + @Override + public RoyalHerbalist2 copy() { + return new RoyalHerbalist2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/SeasonedTactician.java b/Mage.Sets/src/mage/sets/alliances/SeasonedTactician.java new file mode 100644 index 0000000000..bc9ed2cad6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/SeasonedTactician.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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromTopOfLibraryCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PreventNextDamageFromChosenSourceToYouEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LoneFox + + */ +public class SeasonedTactician extends CardImpl { + + public SeasonedTactician(UUID ownerId) { + super(ownerId, 150, "Seasoned Tactician", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Human"); + this.subtype.add("Advisor"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {3}, Exile the top four cards of your library: The next time a source of your choice would deal damage to you this turn, prevent that damage. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventNextDamageFromChosenSourceToYouEffect(Duration.EndOfTurn), + new ManaCostsImpl("{3}")); + ability.addCost(new ExileFromTopOfLibraryCost(4)); + this.addAbility(ability); + } + + public SeasonedTactician(final SeasonedTactician card) { + super(card); + } + + @Override + public SeasonedTactician copy() { + return new SeasonedTactician(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirrodin/ArcSlogger.java b/Mage.Sets/src/mage/sets/mirrodin/ArcSlogger.java new file mode 100644 index 0000000000..5566992025 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirrodin/ArcSlogger.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.mirrodin; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.ExileFromTopOfLibraryCost; +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.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + + */ +public class ArcSlogger extends CardImpl { + + public ArcSlogger(UUID ownerId) { + super(ownerId, 85, "Arc-Slogger", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "MRD"; + this.subtype.add("Beast"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // {R}, Exile the top ten cards of your library: Arc-Slogger deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); + ability.addCost(new ExileFromTopOfLibraryCost(10)); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public ArcSlogger(final ArcSlogger card) { + super(card); + } + + @Override + public ArcSlogger copy() { + return new ArcSlogger(this); + } +} diff --git a/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java b/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java new file mode 100644 index 0000000000..7e4840d3ef --- /dev/null +++ b/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java @@ -0,0 +1,86 @@ +/* + * 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.abilities.costs.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.costs.CostImpl; +import mage.cards.Card; +import mage.game.Game; +import mage.players.Library; +import mage.players.Player; +import mage.util.CardUtil; + +/** + * + * @author LoneFox + */ +public class ExileFromTopOfLibraryCost extends CostImpl { + + private final int amount; + + public ExileFromTopOfLibraryCost(int amount) { + this.amount = amount; + this.text = "Exile the top " + (amount == 1 ? "card" : CardUtil.numberToText(amount) + " cards") + + " of your library"; + } + + public ExileFromTopOfLibraryCost(ExileFromTopOfLibraryCost cost) { + super(cost); + this.amount = cost.amount; + } + + @Override + public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { + Player controller = game.getPlayer(controllerId); + if(controller == null) { + return false; + } + return controller.getLibrary().size() >= amount; + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Player controller = game.getPlayer(controllerId); + if(controller != null) { + Library library = controller.getLibrary(); + for(int i = 0; i < amount; i++) { + Card card = library.removeFromTop(game); + card.moveToExile(null, null, sourceId, game); + } + paid = true; + } + return paid; + } + + @Override + public ExileFromTopOfLibraryCost copy() { + return new ExileFromTopOfLibraryCost(this); + } +} From 824a7442fc3c0ddf4e1b23162f5d8f85f81062bb Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 20 Jun 2015 14:14:51 +0300 Subject: [PATCH 02/42] Implement cards: Cuombajj Witches, Ivory Tower, and Su-Chi --- .../src/mage/sets/antiquities/IvoryTower.java | 97 ++++++++++++++ .../src/mage/sets/antiquities/SuChi.java | 53 ++++++++ .../sets/arabiannights/CuombajjWitches.java | 53 ++++++++ .../mage/sets/fourthedition/IvoryTower.java | 55 ++++++++ .../sets/mastersedition/CuombajjWitches.java | 120 ++++++++++++++++++ .../mage/sets/mastersedition/IvoryTower.java | 55 ++++++++ .../src/mage/sets/mastersedition/SuChi.java | 55 ++++++++ .../mage/sets/revisededition/IvoryTower.java | 55 ++++++++ .../mage/sets/vintagemasters/IvoryTower.java | 53 ++++++++ .../src/mage/sets/vintagemasters/SuChi.java | 65 ++++++++++ 10 files changed, 661 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/antiquities/IvoryTower.java create mode 100644 Mage.Sets/src/mage/sets/antiquities/SuChi.java create mode 100644 Mage.Sets/src/mage/sets/arabiannights/CuombajjWitches.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/IvoryTower.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/IvoryTower.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/SuChi.java create mode 100644 Mage.Sets/src/mage/sets/revisededition/IvoryTower.java create mode 100644 Mage.Sets/src/mage/sets/vintagemasters/IvoryTower.java create mode 100644 Mage.Sets/src/mage/sets/vintagemasters/SuChi.java diff --git a/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java b/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java new file mode 100644 index 0000000000..53491f4ec8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java @@ -0,0 +1,97 @@ +/* + * 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.antiquities; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.OnEventTriggeredAbility; +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.game.events.GameEvent.EventType; +import mage.players.Player; + +/** + * + * @author LoneFox + + */ +public class IvoryTower extends CardImpl { + + public IvoryTower(UUID ownerId) { + super(ownerId, 18, "Ivory Tower", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{1}"); + this.expansionSetCode = "ATQ"; + + this.addAbility(new OnEventTriggeredAbility(EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", + new IvoryTowerEffect(), false)); + } + + public IvoryTower(final IvoryTower card) { + super(card); + } + + @Override + public IvoryTower copy() { + return new IvoryTower(this); + } +} + +class IvoryTowerEffect extends OneShotEffect { + + public IvoryTowerEffect() { + super(Outcome.GainLife); + this.staticText = "you gain X life, where X is the number of cards in your hand minus 4."; + } + + public IvoryTowerEffect(IvoryTowerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if(player != null) { + int amount = player.getHand().size() - 4; + if(amount > 0) { + player.gainLife(amount, game); + return true; + } + } + return false; + } + + @Override + public IvoryTowerEffect copy() { + return new IvoryTowerEffect(this); + } + +} + diff --git a/Mage.Sets/src/mage/sets/antiquities/SuChi.java b/Mage.Sets/src/mage/sets/antiquities/SuChi.java new file mode 100644 index 0000000000..ddcf6367db --- /dev/null +++ b/Mage.Sets/src/mage/sets/antiquities/SuChi.java @@ -0,0 +1,53 @@ +/* + * 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.antiquities; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class SuChi extends mage.sets.vintagemasters.SuChi { + + public SuChi(UUID ownerId) { + super(ownerId); + this.cardNumber = 31; + this.expansionSetCode = "ATQ"; + } + + public SuChi(final SuChi card) { + super(card); + } + + @Override + public SuChi copy() { + return new SuChi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/arabiannights/CuombajjWitches.java b/Mage.Sets/src/mage/sets/arabiannights/CuombajjWitches.java new file mode 100644 index 0000000000..ce19524adc --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/CuombajjWitches.java @@ -0,0 +1,53 @@ +/* + * 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.arabiannights; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class CuombajjWitches extends mage.sets.mastersedition.CuombajjWitches { + + public CuombajjWitches(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "ARN"; + } + + public CuombajjWitches(final CuombajjWitches card) { + super(card); + } + + @Override + public CuombajjWitches copy() { + return new CuombajjWitches(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/IvoryTower.java b/Mage.Sets/src/mage/sets/fourthedition/IvoryTower.java new file mode 100644 index 0000000000..5d228eb598 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/IvoryTower.java @@ -0,0 +1,55 @@ +/* + * 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.fourthedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class IvoryTower extends mage.sets.antiquities.IvoryTower { + + public IvoryTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 346; + this.expansionSetCode = "4ED"; + this.rarity = Rarity.RARE; + } + + public IvoryTower(final IvoryTower card) { + super(card); + } + + @Override + public IvoryTower copy() { + return new IvoryTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.java b/Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.java new file mode 100644 index 0000000000..d41dd19d1b --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.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.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.Effect; +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.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + + */ +public class CuombajjWitches extends CardImpl { + + public CuombajjWitches(UUID ownerId) { + super(ownerId, 65, "Cuombajj Witches", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}{B}"); + this.expansionSetCode = "MED"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // {T}: Cuombajj Witches deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice. + Effect effect = new DamageTargetEffect(1); + effect.setText("{this} deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice"); + Ability ability = new CuombajjWitchesAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if(ability instanceof CuombajjWitchesAbility) { + Player controller = game.getPlayer(ability.getControllerId()); + if(controller != null) { + UUID opponentId = null; + if(game.getOpponents(controller.getId()).size() > 1) { + Target target = new TargetOpponent(true); + if(controller.chooseTarget(Outcome.Neutral, target, ability, game)) { + opponentId = target.getFirstTarget(); + } + } + else { + opponentId = game.getOpponents(controller.getId()).iterator().next(); + } + + if(opponentId != null) { + ability.getTargets().get(1).setTargetController(opponentId); + } + } + } + } + + public CuombajjWitches(final CuombajjWitches card) { + super(card); + } + + @Override + public CuombajjWitches copy() { + return new CuombajjWitches(this); + } +} + +// This is for identification in case something grants a second SimpleActivatedAbility to the Witches. +class CuombajjWitchesAbility extends SimpleActivatedAbility { + public CuombajjWitchesAbility(Zone zone, Effect effect, Cost cost) { + super(zone, effect, cost); + } + + public CuombajjWitchesAbility(final CuombajjWitchesAbility ability) { + super(ability); + } + + @Override + public CuombajjWitchesAbility copy() { + return new CuombajjWitchesAbility(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/IvoryTower.java b/Mage.Sets/src/mage/sets/mastersedition/IvoryTower.java new file mode 100644 index 0000000000..02ee9f8193 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/IvoryTower.java @@ -0,0 +1,55 @@ +/* + * 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.mastersedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class IvoryTower extends mage.sets.antiquities.IvoryTower { + + public IvoryTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 158; + this.expansionSetCode = "MED"; + this.rarity = Rarity.RARE; + } + + public IvoryTower(final IvoryTower card) { + super(card); + } + + @Override + public IvoryTower copy() { + return new IvoryTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/SuChi.java b/Mage.Sets/src/mage/sets/mastersedition/SuChi.java new file mode 100644 index 0000000000..5a7c9a2f0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/SuChi.java @@ -0,0 +1,55 @@ +/* + * 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.mastersedition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class SuChi extends mage.sets.vintagemasters.SuChi { + + public SuChi(UUID ownerId) { + super(ownerId); + this.cardNumber = 168; + this.expansionSetCode = "MED"; + this.rarity = Rarity.RARE; + } + + public SuChi(final SuChi card) { + super(card); + } + + @Override + public SuChi copy() { + return new SuChi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/revisededition/IvoryTower.java b/Mage.Sets/src/mage/sets/revisededition/IvoryTower.java new file mode 100644 index 0000000000..185dc401b6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/IvoryTower.java @@ -0,0 +1,55 @@ +/* + * 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.revisededition; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class IvoryTower extends mage.sets.antiquities.IvoryTower { + + public IvoryTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 254; + this.expansionSetCode = "3ED"; + this.rarity = Rarity.RARE; + } + + public IvoryTower(final IvoryTower card) { + super(card); + } + + @Override + public IvoryTower copy() { + return new IvoryTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/IvoryTower.java b/Mage.Sets/src/mage/sets/vintagemasters/IvoryTower.java new file mode 100644 index 0000000000..d12c27f1f8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/IvoryTower.java @@ -0,0 +1,53 @@ +/* + * 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.vintagemasters; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class IvoryTower extends mage.sets.antiquities.IvoryTower { + + public IvoryTower(UUID ownerId) { + super(ownerId); + this.cardNumber = 269; + this.expansionSetCode = "VMA"; + } + + public IvoryTower(final IvoryTower card) { + super(card); + } + + @Override + public IvoryTower copy() { + return new IvoryTower(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/SuChi.java b/Mage.Sets/src/mage/sets/vintagemasters/SuChi.java new file mode 100644 index 0000000000..075ba52173 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/SuChi.java @@ -0,0 +1,65 @@ +/* + * 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.vintagemasters; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.common.BasicManaEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class SuChi extends CardImpl { + + public SuChi(UUID ownerId) { + super(ownerId, 285, "Su-Chi", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); + this.expansionSetCode = "VMA"; + this.subtype.add("Construct"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Su-Chi dies, add {4} to your mana pool. + this.addAbility(new DiesTriggeredAbility(new BasicManaEffect(new Mana(0, 0, 0, 0, 0, 4, 0)), false)); + } + + public SuChi(final SuChi card) { + super(card); + } + + @Override + public SuChi copy() { + return new SuChi(this); + } +} From 3e79299b2f7e0838948cf76df9d453f98d39897f Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 20 Jun 2015 18:12:51 +0300 Subject: [PATCH 03/42] Implement cards: Elvish Hunter, False Demise, Goblin Flectomancer, and Liberate --- .../src/mage/sets/alliances/FalseDemise1.java | 55 ++++++++++ .../src/mage/sets/alliances/FalseDemise2.java | 55 ++++++++++ .../sets/fallenempires/ElvishHunter1.java | 53 +++++++++ .../sets/fallenempires/ElvishHunter2.java | 53 +++++++++ .../sets/fallenempires/ElvishHunter3.java | 53 +++++++++ .../sets/guildpact/GoblinFlectomancer.java | 73 +++++++++++++ .../src/mage/sets/invasion/Liberate.java | 103 ++++++++++++++++++ .../sets/masterseditionii/ElvishHunter.java | 74 +++++++++++++ .../sets/mercadianmasques/FalseDemise.java | 74 +++++++++++++ 9 files changed, 593 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/alliances/FalseDemise1.java create mode 100644 Mage.Sets/src/mage/sets/alliances/FalseDemise2.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/ElvishHunter1.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/ElvishHunter2.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/ElvishHunter3.java create mode 100644 Mage.Sets/src/mage/sets/guildpact/GoblinFlectomancer.java create mode 100644 Mage.Sets/src/mage/sets/invasion/Liberate.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/ElvishHunter.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/FalseDemise.java diff --git a/Mage.Sets/src/mage/sets/alliances/FalseDemise1.java b/Mage.Sets/src/mage/sets/alliances/FalseDemise1.java new file mode 100644 index 0000000000..980d5b7005 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/FalseDemise1.java @@ -0,0 +1,55 @@ +/* + * 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.alliances; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class FalseDemise1 extends mage.sets.mercadianmasques.FalseDemise { + + public FalseDemise1(UUID ownerId) { + super(ownerId); + this.cardNumber = 40; + this.expansionSetCode = "ALL"; + this.rarity = Rarity.COMMON; + } + + public FalseDemise1(final FalseDemise1 card) { + super(card); + } + + @Override + public FalseDemise1 copy() { + return new FalseDemise1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/FalseDemise2.java b/Mage.Sets/src/mage/sets/alliances/FalseDemise2.java new file mode 100644 index 0000000000..614a15ca4d --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/FalseDemise2.java @@ -0,0 +1,55 @@ +/* + * 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.alliances; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class FalseDemise2 extends mage.sets.mercadianmasques.FalseDemise { + + public FalseDemise2(UUID ownerId) { + super(ownerId); + this.cardNumber = 41; + this.expansionSetCode = "ALL"; + this.rarity = Rarity.COMMON; + } + + public FalseDemise2(final FalseDemise2 card) { + super(card); + } + + @Override + public FalseDemise2 copy() { + return new FalseDemise2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter1.java b/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter1.java new file mode 100644 index 0000000000..1680fd5489 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter1.java @@ -0,0 +1,53 @@ +/* + * 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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class ElvishHunter1 extends mage.sets.masterseditionii.ElvishHunter { + + public ElvishHunter1(UUID ownerId) { + super(ownerId); + this.cardNumber = 72; + this.expansionSetCode = "FEM"; + } + + public ElvishHunter1(final ElvishHunter1 card) { + super(card); + } + + @Override + public ElvishHunter1 copy() { + return new ElvishHunter1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter2.java b/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter2.java new file mode 100644 index 0000000000..85ee6e335e --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter2.java @@ -0,0 +1,53 @@ +/* + * 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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class ElvishHunter2 extends mage.sets.masterseditionii.ElvishHunter { + + public ElvishHunter2(UUID ownerId) { + super(ownerId); + this.cardNumber = 73; + this.expansionSetCode = "FEM"; + } + + public ElvishHunter2(final ElvishHunter2 card) { + super(card); + } + + @Override + public ElvishHunter2 copy() { + return new ElvishHunter2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter3.java b/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter3.java new file mode 100644 index 0000000000..9760808898 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/ElvishHunter3.java @@ -0,0 +1,53 @@ +/* + * 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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class ElvishHunter3 extends mage.sets.masterseditionii.ElvishHunter { + + public ElvishHunter3(UUID ownerId) { + super(ownerId); + this.cardNumber = 74; + this.expansionSetCode = "FEM"; + } + + public ElvishHunter3(final ElvishHunter3 card) { + super(card); + } + + @Override + public ElvishHunter3 copy() { + return new ElvishHunter3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/guildpact/GoblinFlectomancer.java b/Mage.Sets/src/mage/sets/guildpact/GoblinFlectomancer.java new file mode 100644 index 0000000000..dbfc606904 --- /dev/null +++ b/Mage.Sets/src/mage/sets/guildpact/GoblinFlectomancer.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.guildpact; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.ChooseNewTargetsTargetEffect; +import mage.abilities.effects.common.ChooseNewTargetsTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterInstantOrSorcerySpell; +import mage.target.TargetSpell; + +/** + * + * @author LoneFox + + */ +public class GoblinFlectomancer extends CardImpl { + + public GoblinFlectomancer(UUID ownerId) { + super(ownerId, 116, "Goblin Flectomancer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}{R}{R}"); + this.expansionSetCode = "GPT"; + this.subtype.add("Goblin"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Sacrifice Goblin Flectomancer: You may change the targets of target instant or sorcery spell. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChooseNewTargetsTargetEffect(), new SacrificeSourceCost()); + ability.addTarget(new TargetSpell(new FilterInstantOrSorcerySpell())); + this.addAbility(ability); + } + + public GoblinFlectomancer(final GoblinFlectomancer card) { + super(card); + } + + @Override + public GoblinFlectomancer copy() { + return new GoblinFlectomancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/Liberate.java b/Mage.Sets/src/mage/sets/invasion/Liberate.java new file mode 100644 index 0000000000..9543953f2d --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Liberate.java @@ -0,0 +1,103 @@ +/* + * 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.invasion; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ReturnFromExileEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class Liberate extends CardImpl { + + public Liberate(UUID ownerId) { + super(ownerId, 21, "Liberate", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{W}"); + this.expansionSetCode = "INV"; + + // Exile target creature you control. Return that card to the battlefield under its owner's control at the beginning of the next end step. + this.getSpellAbility().addEffect(new LiberateEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + } + + public Liberate(final Liberate card) { + super(card); + } + + @Override + public Liberate copy() { + return new Liberate(this); + } +} + +class LiberateEffect extends OneShotEffect { + + public LiberateEffect() { + super(Outcome.Detriment); + staticText = "exile target creature you control. Return that card to the battlefield under its owner's control at the beginning of the next end step"; + } + + public LiberateEffect(final LiberateEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if(permanent != null && sourceObject != null) { + if(permanent.moveToExile(source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game)) { + AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD, false)); + delayedAbility.setSourceId(source.getSourceId()); + delayedAbility.setControllerId(source.getControllerId()); + delayedAbility.setSourceObject(source.getSourceObject(game), game); + game.addDelayedTriggeredAbility(delayedAbility); + return true; + } + } + return false; + } + + @Override + public LiberateEffect copy() { + return new LiberateEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/ElvishHunter.java b/Mage.Sets/src/mage/sets/masterseditionii/ElvishHunter.java new file mode 100644 index 0000000000..8fc917f695 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/ElvishHunter.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.masterseditionii; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class ElvishHunter extends CardImpl { + + public ElvishHunter(UUID ownerId) { + super(ownerId, 157, "Elvish Hunter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "ME2"; + this.subtype.add("Elf"); + this.subtype.add("Archer"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {1}{G}, {tap}: Target creature doesn't untap during its controller's next untap step. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DontUntapInControllersNextUntapStepTargetEffect("Target creature"), + new ManaCostsImpl("{1}{G}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ElvishHunter(final ElvishHunter card) { + super(card); + } + + @Override + public ElvishHunter copy() { + return new ElvishHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/FalseDemise.java b/Mage.Sets/src/mage/sets/mercadianmasques/FalseDemise.java new file mode 100644 index 0000000000..045f899846 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/FalseDemise.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.mercadianmasques; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.DiesAttachedTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.ReturnToBattlefieldUnderYourControlAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class FalseDemise extends CardImpl { + + public FalseDemise(UUID ownerId) { + super(ownerId, 80, "False Demise", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // When enchanted creature dies, return that card to the battlefield under your control. + this.addAbility(new DiesAttachedTriggeredAbility(new ReturnToBattlefieldUnderYourControlAttachedEffect(), "enchanted creature")); + } + + public FalseDemise(final FalseDemise card) { + super(card); + } + + @Override + public FalseDemise copy() { + return new FalseDemise(this); + } +} From 0594954cdeba2d7d5e7caf447b3bd49c45d130a9 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 20 Jun 2015 18:30:12 +0300 Subject: [PATCH 04/42] Remove duplicate implementations of some Alliances image variants --- .../src/mage/sets/alliances/DeadlyInsect.java | 52 ------------------- .../src/mage/sets/alliances/ElvishRanger.java | 52 ------------------- .../mage/sets/alliances/ElvishRanger1.java | 9 ++-- .../mage/sets/alliances/ElvishRanger2.java | 2 +- .../src/mage/sets/alliances/StormCrow.java | 52 ------------------- 5 files changed, 4 insertions(+), 163 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/alliances/DeadlyInsect.java delete mode 100644 Mage.Sets/src/mage/sets/alliances/ElvishRanger.java delete mode 100644 Mage.Sets/src/mage/sets/alliances/StormCrow.java diff --git a/Mage.Sets/src/mage/sets/alliances/DeadlyInsect.java b/Mage.Sets/src/mage/sets/alliances/DeadlyInsect.java deleted file mode 100644 index a78b52a38e..0000000000 --- a/Mage.Sets/src/mage/sets/alliances/DeadlyInsect.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.alliances; - -import java.util.UUID; - -/** - * - * @author LevelX2 - */ -public class DeadlyInsect extends mage.sets.mercadianmasques.DeadlyInsect { - - public DeadlyInsect(UUID ownerId) { - super(ownerId); - this.cardNumber = 64; - this.expansionSetCode = "ALL"; - } - - public DeadlyInsect(final DeadlyInsect card) { - super(card); - } - - @Override - public DeadlyInsect copy() { - return new DeadlyInsect(this); - } -} diff --git a/Mage.Sets/src/mage/sets/alliances/ElvishRanger.java b/Mage.Sets/src/mage/sets/alliances/ElvishRanger.java deleted file mode 100644 index ac3c61195d..0000000000 --- a/Mage.Sets/src/mage/sets/alliances/ElvishRanger.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.alliances; - -import java.util.UUID; - -/** - * - * @author Plopman - */ -public class ElvishRanger extends mage.sets.portal.ElvishRanger { - - public ElvishRanger(UUID ownerId) { - super(ownerId); - this.cardNumber = 67; - this.expansionSetCode = "ALL"; - } - - public ElvishRanger(final ElvishRanger card) { - super(card); - } - - @Override - public ElvishRanger copy() { - return new ElvishRanger(this); - } -} diff --git a/Mage.Sets/src/mage/sets/alliances/ElvishRanger1.java b/Mage.Sets/src/mage/sets/alliances/ElvishRanger1.java index 4fea6246ce..8b66591b48 100644 --- a/Mage.Sets/src/mage/sets/alliances/ElvishRanger1.java +++ b/Mage.Sets/src/mage/sets/alliances/ElvishRanger1.java @@ -37,15 +37,12 @@ import mage.constants.Rarity; * * @author Backfir3 */ -public class ElvishRanger1 extends CardImpl { +public class ElvishRanger1 extends mage.sets.portal.ElvishRanger { public ElvishRanger1(UUID ownerId) { - super(ownerId, 67, "Elvish Ranger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + super(ownerId); + this.cardNumber = 67; this.expansionSetCode = "ALL"; - this.subtype.add("Elf"); - - this.power = new MageInt(4); - this.toughness = new MageInt(1); } public ElvishRanger1(final ElvishRanger1 card) { diff --git a/Mage.Sets/src/mage/sets/alliances/ElvishRanger2.java b/Mage.Sets/src/mage/sets/alliances/ElvishRanger2.java index c41a416127..9aa1ebd775 100644 --- a/Mage.Sets/src/mage/sets/alliances/ElvishRanger2.java +++ b/Mage.Sets/src/mage/sets/alliances/ElvishRanger2.java @@ -33,7 +33,7 @@ import java.util.UUID; * * @author Backfir3 */ -public class ElvishRanger2 extends mage.sets.alliances.ElvishRanger1 { +public class ElvishRanger2 extends mage.sets.portal.ElvishRanger { public ElvishRanger2(UUID ownerId) { super(ownerId); diff --git a/Mage.Sets/src/mage/sets/alliances/StormCrow.java b/Mage.Sets/src/mage/sets/alliances/StormCrow.java deleted file mode 100644 index fc0f90d598..0000000000 --- a/Mage.Sets/src/mage/sets/alliances/StormCrow.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.alliances; - -import java.util.UUID; - -/** - * - * @author LevelX2 - */ -public class StormCrow extends mage.sets.ninthedition.StormCrow { - - public StormCrow(UUID ownerId) { - super(ownerId); - this.cardNumber = 54; - this.expansionSetCode = "ALL"; - } - - public StormCrow(final StormCrow card) { - super(card); - } - - @Override - public StormCrow copy() { - return new StormCrow(this); - } -} From 79fe0d98f35fce60162d06f4f9d95e1b962fc6df Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 20 Jun 2015 18:55:15 +0300 Subject: [PATCH 05/42] Add missing image variants for Arcane Denial, Gorilla Chieftain, Guerrilla Tactics, and Reprisal --- .../{ArcaneDenial.java => ArcaneDenial1.java} | 10 +- .../mage/sets/alliances/ArcaneDenial2.java | 52 +++++++++ ...aChieftain.java => GorillaChieftain1.java} | 10 +- .../sets/alliances/GorillaChieftain2.java | 52 +++++++++ ...llaTactics.java => GuerrillaTactics1.java} | 104 +++++++++--------- .../sets/alliances/GuerrillaTactics2.java | 54 +++++++++ .../{Reprisal.java => Reprisal1.java} | 10 +- .../src/mage/sets/alliances/Reprisal2.java | 54 +++++++++ 8 files changed, 279 insertions(+), 67 deletions(-) rename Mage.Sets/src/mage/sets/alliances/{ArcaneDenial.java => ArcaneDenial1.java} (86%) create mode 100644 Mage.Sets/src/mage/sets/alliances/ArcaneDenial2.java rename Mage.Sets/src/mage/sets/alliances/{GorillaChieftain.java => GorillaChieftain1.java} (87%) create mode 100644 Mage.Sets/src/mage/sets/alliances/GorillaChieftain2.java rename Mage.Sets/src/mage/sets/alliances/{GuerrillaTactics.java => GuerrillaTactics1.java} (86%) create mode 100644 Mage.Sets/src/mage/sets/alliances/GuerrillaTactics2.java rename Mage.Sets/src/mage/sets/alliances/{Reprisal.java => Reprisal1.java} (90%) create mode 100644 Mage.Sets/src/mage/sets/alliances/Reprisal2.java diff --git a/Mage.Sets/src/mage/sets/alliances/ArcaneDenial.java b/Mage.Sets/src/mage/sets/alliances/ArcaneDenial1.java similarity index 86% rename from Mage.Sets/src/mage/sets/alliances/ArcaneDenial.java rename to Mage.Sets/src/mage/sets/alliances/ArcaneDenial1.java index 21f5df01eb..483888568c 100644 --- a/Mage.Sets/src/mage/sets/alliances/ArcaneDenial.java +++ b/Mage.Sets/src/mage/sets/alliances/ArcaneDenial1.java @@ -33,20 +33,20 @@ import java.util.UUID; * * @author LevelX2 */ -public class ArcaneDenial extends mage.sets.commander2013.ArcaneDenial { +public class ArcaneDenial1 extends mage.sets.commander2013.ArcaneDenial { - public ArcaneDenial(UUID ownerId) { + public ArcaneDenial1(UUID ownerId) { super(ownerId); this.cardNumber = 32; this.expansionSetCode = "ALL"; } - public ArcaneDenial(final ArcaneDenial card) { + public ArcaneDenial1(final ArcaneDenial1 card) { super(card); } @Override - public ArcaneDenial copy() { - return new ArcaneDenial(this); + public ArcaneDenial1 copy() { + return new ArcaneDenial1(this); } } diff --git a/Mage.Sets/src/mage/sets/alliances/ArcaneDenial2.java b/Mage.Sets/src/mage/sets/alliances/ArcaneDenial2.java new file mode 100644 index 0000000000..ac89fc3c15 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/ArcaneDenial2.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.alliances; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ArcaneDenial2 extends mage.sets.commander2013.ArcaneDenial { + + public ArcaneDenial2(UUID ownerId) { + super(ownerId); + this.cardNumber = 33; + this.expansionSetCode = "ALL"; + } + + public ArcaneDenial2(final ArcaneDenial2 card) { + super(card); + } + + @Override + public ArcaneDenial2 copy() { + return new ArcaneDenial2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/GorillaChieftain.java b/Mage.Sets/src/mage/sets/alliances/GorillaChieftain1.java similarity index 87% rename from Mage.Sets/src/mage/sets/alliances/GorillaChieftain.java rename to Mage.Sets/src/mage/sets/alliances/GorillaChieftain1.java index 158ab6df2a..487d2863c4 100644 --- a/Mage.Sets/src/mage/sets/alliances/GorillaChieftain.java +++ b/Mage.Sets/src/mage/sets/alliances/GorillaChieftain1.java @@ -33,20 +33,20 @@ import java.util.UUID; * * @author Quercitron */ -public class GorillaChieftain extends mage.sets.seventhedition.GorillaChieftain { +public class GorillaChieftain1 extends mage.sets.seventhedition.GorillaChieftain { - public GorillaChieftain(UUID ownerId) { + public GorillaChieftain1(UUID ownerId) { super(ownerId); this.cardNumber = 77; this.expansionSetCode = "ALL"; } - public GorillaChieftain(final GorillaChieftain card) { + public GorillaChieftain1(final GorillaChieftain1 card) { super(card); } @Override - public GorillaChieftain copy() { - return new GorillaChieftain(this); + public GorillaChieftain1 copy() { + return new GorillaChieftain1(this); } } diff --git a/Mage.Sets/src/mage/sets/alliances/GorillaChieftain2.java b/Mage.Sets/src/mage/sets/alliances/GorillaChieftain2.java new file mode 100644 index 0000000000..facc87d9df --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/GorillaChieftain2.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.alliances; + +import java.util.UUID; + +/** + * + * @author Quercitron + */ +public class GorillaChieftain2 extends mage.sets.seventhedition.GorillaChieftain { + + public GorillaChieftain2(UUID ownerId) { + super(ownerId); + this.cardNumber = 78; + this.expansionSetCode = "ALL"; + } + + public GorillaChieftain2(final GorillaChieftain2 card) { + super(card); + } + + @Override + public GorillaChieftain2 copy() { + return new GorillaChieftain2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/GuerrillaTactics.java b/Mage.Sets/src/mage/sets/alliances/GuerrillaTactics1.java similarity index 86% rename from Mage.Sets/src/mage/sets/alliances/GuerrillaTactics.java rename to Mage.Sets/src/mage/sets/alliances/GuerrillaTactics1.java index f09c089f24..c887643a77 100644 --- a/Mage.Sets/src/mage/sets/alliances/GuerrillaTactics.java +++ b/Mage.Sets/src/mage/sets/alliances/GuerrillaTactics1.java @@ -1,54 +1,54 @@ -/* - * 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.alliances; - +/* + * 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.alliances; + import java.util.UUID; -import mage.constants.Rarity; - -/** - * - * @author dustinconrad - */ -public class GuerrillaTactics extends mage.sets.ninthedition.GuerrillaTactics { - - public GuerrillaTactics(UUID ownerId) { - super(ownerId); - this.cardNumber = 110; +import mage.constants.Rarity; + +/** + * + * @author dustinconrad + */ +public class GuerrillaTactics1 extends mage.sets.ninthedition.GuerrillaTactics { + + public GuerrillaTactics1(UUID ownerId) { + super(ownerId); + this.cardNumber = 110; this.expansionSetCode = "ALL"; - this.rarity = Rarity.COMMON; - } - - public GuerrillaTactics(final GuerrillaTactics card) { - super(card); - } - - @Override - public GuerrillaTactics copy() { - return new GuerrillaTactics(this); - } -} + this.rarity = Rarity.COMMON; + } + + public GuerrillaTactics1(final GuerrillaTactics1 card) { + super(card); + } + + @Override + public GuerrillaTactics1 copy() { + return new GuerrillaTactics1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/GuerrillaTactics2.java b/Mage.Sets/src/mage/sets/alliances/GuerrillaTactics2.java new file mode 100644 index 0000000000..c8590db5f2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/GuerrillaTactics2.java @@ -0,0 +1,54 @@ +/* + * 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.alliances; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author dustinconrad + */ +public class GuerrillaTactics2 extends mage.sets.ninthedition.GuerrillaTactics { + + public GuerrillaTactics2(UUID ownerId) { + super(ownerId); + this.cardNumber = 111; + this.expansionSetCode = "ALL"; + this.rarity = Rarity.COMMON; + } + + public GuerrillaTactics2(final GuerrillaTactics2 card) { + super(card); + } + + @Override + public GuerrillaTactics2 copy() { + return new GuerrillaTactics2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/Reprisal.java b/Mage.Sets/src/mage/sets/alliances/Reprisal1.java similarity index 90% rename from Mage.Sets/src/mage/sets/alliances/Reprisal.java rename to Mage.Sets/src/mage/sets/alliances/Reprisal1.java index 643407129a..9bc04ed91c 100644 --- a/Mage.Sets/src/mage/sets/alliances/Reprisal.java +++ b/Mage.Sets/src/mage/sets/alliances/Reprisal1.java @@ -34,21 +34,21 @@ import mage.constants.Rarity; * * @author Quercitron */ -public class Reprisal extends mage.sets.seventhedition.Reprisal { +public class Reprisal1 extends mage.sets.seventhedition.Reprisal { - public Reprisal(UUID ownerId) { + public Reprisal1(UUID ownerId) { super(ownerId); this.cardNumber = 144; this.expansionSetCode = "ALL"; this.rarity = Rarity.COMMON; } - public Reprisal(final Reprisal card) { + public Reprisal1(final Reprisal1 card) { super(card); } @Override - public Reprisal copy() { - return new Reprisal(this); + public Reprisal1 copy() { + return new Reprisal1(this); } } diff --git a/Mage.Sets/src/mage/sets/alliances/Reprisal2.java b/Mage.Sets/src/mage/sets/alliances/Reprisal2.java new file mode 100644 index 0000000000..80ac2f0193 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/Reprisal2.java @@ -0,0 +1,54 @@ +/* + * 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.alliances; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author Quercitron + */ +public class Reprisal2 extends mage.sets.seventhedition.Reprisal { + + public Reprisal2(UUID ownerId) { + super(ownerId); + this.cardNumber = 145; + this.expansionSetCode = "ALL"; + this.rarity = Rarity.COMMON; + } + + public Reprisal2(final Reprisal2 card) { + super(card); + } + + @Override + public Reprisal2 copy() { + return new Reprisal2(this); + } +} From 03dcc4a9f60d003514ae7960ccf4b220de909c5f Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 20 Jun 2015 19:53:11 +0200 Subject: [PATCH 06/42] Added Menace ability. --- .../keyword/CantBlockAloneAttachedEffect.java | 15 -------- .../mage/abilities/keyword/HauntAbility.java | 1 - .../mage/abilities/keyword/MenaceAbility.java | 38 +++++++++++++++++++ Utils/keywords.txt | 1 + 4 files changed, 39 insertions(+), 16 deletions(-) delete mode 100644 Mage/src/mage/abilities/keyword/CantBlockAloneAttachedEffect.java create mode 100644 Mage/src/mage/abilities/keyword/MenaceAbility.java diff --git a/Mage/src/mage/abilities/keyword/CantBlockAloneAttachedEffect.java b/Mage/src/mage/abilities/keyword/CantBlockAloneAttachedEffect.java deleted file mode 100644 index 06b01440a2..0000000000 --- a/Mage/src/mage/abilities/keyword/CantBlockAloneAttachedEffect.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -package mage.abilities.keyword; - -/** - * - * @author ludwig.hirth - */ -public class CantBlockAloneAttachedEffect { - -} diff --git a/Mage/src/mage/abilities/keyword/HauntAbility.java b/Mage/src/mage/abilities/keyword/HauntAbility.java index 76e3ebc6f0..d9e276b1ec 100644 --- a/Mage/src/mage/abilities/keyword/HauntAbility.java +++ b/Mage/src/mage/abilities/keyword/HauntAbility.java @@ -40,7 +40,6 @@ import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.events.ZoneChangeEvent; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; diff --git a/Mage/src/mage/abilities/keyword/MenaceAbility.java b/Mage/src/mage/abilities/keyword/MenaceAbility.java new file mode 100644 index 0000000000..cad29e9ab9 --- /dev/null +++ b/Mage/src/mage/abilities/keyword/MenaceAbility.java @@ -0,0 +1,38 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.keyword; + +import mage.abilities.Ability; +import mage.abilities.StaticAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByMoreThanOneSourceEffect; +import mage.abilities.effects.common.combat.CantBeBlockedByOneEffect; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class MenaceAbility extends StaticAbility { + + public MenaceAbility() { + super(Zone.BATTLEFIELD, new CantBeBlockedByOneEffect(2)); + } + + public MenaceAbility(MenaceAbility ability) { + super(ability); + } + + @Override + public Ability copy() { + return new MenaceAbility(this); + } + + @Override + public String getRule() { + return "Menace (This creature can't be blocked except by two or more creatures.)"; + } + +} diff --git a/Utils/keywords.txt b/Utils/keywords.txt index 7c0e7fe923..57945d8a0f 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -37,6 +37,7 @@ Islandwalk|new| Level up|cost| Lifelink|instance| Living weapon|new| +Menace|new| Miracle|cost| Mountaincycling|cost| Mountainwalk|new| From 1668783ba2c87b5fe82e42d8b5ff4795111c1eed Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 20 Jun 2015 19:53:41 +0200 Subject: [PATCH 07/42] Added damage done watcher. --- Mage/src/mage/MageObjectReference.java | 6 +- .../common/CardsInOpponentGraveCondition.java | 2 +- .../common/SourceDealtDamageCondition.java | 37 ++++++++++ Mage/src/mage/game/GameImpl.java | 2 + .../watchers/common/DamageDoneWatcher.java | 67 +++++++++++++++++++ 5 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 Mage/src/mage/abilities/condition/common/SourceDealtDamageCondition.java create mode 100644 Mage/src/mage/watchers/common/DamageDoneWatcher.java diff --git a/Mage/src/mage/MageObjectReference.java b/Mage/src/mage/MageObjectReference.java index b406030eb9..8242aff19a 100644 --- a/Mage/src/mage/MageObjectReference.java +++ b/Mage/src/mage/MageObjectReference.java @@ -69,7 +69,11 @@ public class MageObjectReference implements Comparable, Ser if (mageObject != null) { this.zoneChangeCounter = mageObject.getZoneChangeCounter(game); } else { - throw new IllegalArgumentException("The provided sourceId is not connected to an object in the game"); + if (game.getPlayerList().contains(sourceId)) { + this.zoneChangeCounter = 0; + } else { + throw new IllegalArgumentException("The provided sourceId is not connected to an object in the game"); + } } } diff --git a/Mage/src/mage/abilities/condition/common/CardsInOpponentGraveCondition.java b/Mage/src/mage/abilities/condition/common/CardsInOpponentGraveCondition.java index 6c82596133..1c2d203d2c 100644 --- a/Mage/src/mage/abilities/condition/common/CardsInOpponentGraveCondition.java +++ b/Mage/src/mage/abilities/condition/common/CardsInOpponentGraveCondition.java @@ -13,7 +13,7 @@ import java.util.UUID; * @author Loki */ public class CardsInOpponentGraveCondition implements Condition { - private int value; + private final int value; public CardsInOpponentGraveCondition(int value) { this.value = value; diff --git a/Mage/src/mage/abilities/condition/common/SourceDealtDamageCondition.java b/Mage/src/mage/abilities/condition/common/SourceDealtDamageCondition.java new file mode 100644 index 0000000000..0a4f7044e1 --- /dev/null +++ b/Mage/src/mage/abilities/condition/common/SourceDealtDamageCondition.java @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.game.Game; +import mage.watchers.common.DamageDoneWatcher; + +/** + * + * @author LevelX2 + */ + +public class SourceDealtDamageCondition implements Condition { + private final int value; + + public SourceDealtDamageCondition(int value) { + this.value = value; + } + + @Override + public boolean apply(Game game, Ability source) { + DamageDoneWatcher watcher = (DamageDoneWatcher) game.getState().getWatchers().get("DamageDone"); + return watcher != null && watcher.damageDone(source.getSourceId(), source.getSourceObjectZoneChangeCounter(), game) >= value; + } + + @Override + public String toString() { + return "{this} has dealt " + value + " or more damage this turn" ; + } + + +} \ No newline at end of file diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index 28383956d0..49aa03847d 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -122,6 +122,7 @@ import mage.watchers.Watchers; import mage.watchers.common.BlockedAttackerWatcher; import mage.watchers.common.BloodthirstWatcher; import mage.watchers.common.CastSpellLastTurnWatcher; +import mage.watchers.common.DamageDoneWatcher; import mage.watchers.common.MorbidWatcher; import mage.watchers.common.PlayerDamagedBySourceWatcher; import mage.watchers.common.PlayerLostLifeWatcher; @@ -912,6 +913,7 @@ public abstract class GameImpl implements Game, Serializable { watchers.add(new SoulbondWatcher()); watchers.add(new PlayerLostLifeWatcher()); watchers.add(new BlockedAttackerWatcher()); + watchers.add(new DamageDoneWatcher()); //20100716 - 103.5 for (UUID playerId: state.getPlayerList(startingPlayerId)) { diff --git a/Mage/src/mage/watchers/common/DamageDoneWatcher.java b/Mage/src/mage/watchers/common/DamageDoneWatcher.java new file mode 100644 index 0000000000..df94911ebc --- /dev/null +++ b/Mage/src/mage/watchers/common/DamageDoneWatcher.java @@ -0,0 +1,67 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.watchers.common; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.MageObjectReference; +import mage.constants.WatcherScope; +import mage.game.Game; +import mage.game.events.DamageEvent; +import mage.game.events.GameEvent; +import mage.watchers.Watcher; + +/** + * + * @author LevelX2 + */ + +public class DamageDoneWatcher extends Watcher { + + // which object did how much damage during the turn + public Map damagingObjects = new HashMap<>(); + + public DamageDoneWatcher() { + super("DamageDone", WatcherScope.GAME); + } + + public DamageDoneWatcher(final DamageDoneWatcher watcher) { + super(watcher); + this.damagingObjects.putAll(damagingObjects); + } + + @Override + public DamageDoneWatcher copy() { + return new DamageDoneWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + switch(event.getType()) { + case DAMAGED_CREATURE: + case DAMAGED_PLANESWALKER: + case DAMAGED_PLAYER: + { + MageObjectReference mor = new MageObjectReference(event.getSourceId(), game); + int count = damagingObjects.containsKey(mor) ? damagingObjects.get(mor) : 0; + damagingObjects.put(mor, count + event.getAmount()); + } + } + } + + @Override + public void reset() { + super.reset(); + damagingObjects.clear(); + } + + public int damageDone(UUID objectId, int zoneChangeCounter, Game game) { + MageObjectReference mor = new MageObjectReference(objectId, zoneChangeCounter, game); + return damagingObjects.containsKey(mor) ? damagingObjects.get(mor) : 0; + } + +} From 613fbd26e3df3b44f0bc51da84ef560707a062f4 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 20 Jun 2015 19:54:57 +0200 Subject: [PATCH 08/42] [ORI] Added Boggart Brute, Chandra FIre of Kaladesh, Lighning Javelin, Pia and Kiran Nalaar. --- .../mage/sets/magicorigins/BoggartBrute.java | 63 ++++++++ .../magicorigins/ChandraFireOfKaladesh.java | 96 ++++++++++++ .../magicorigins/ChandraRoaringFlame.java | 146 ++++++++++++++++++ .../sets/magicorigins/LightningJavelin.java | 63 ++++++++ .../sets/magicorigins/PiaAndKiranNalaar.java | 95 ++++++++++++ 5 files changed, 463 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/magicorigins/BoggartBrute.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/ChandraFireOfKaladesh.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/ChandraRoaringFlame.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/LightningJavelin.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.java diff --git a/Mage.Sets/src/mage/sets/magicorigins/BoggartBrute.java b/Mage.Sets/src/mage/sets/magicorigins/BoggartBrute.java new file mode 100644 index 0000000000..e4778a4b55 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/BoggartBrute.java @@ -0,0 +1,63 @@ +/* + * 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.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LevelX2 + */ +public class BoggartBrute extends CardImpl { + + public BoggartBrute(UUID ownerId) { + super(ownerId, 133, "Boggart Brute", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ORI"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Menace + this.addAbility(new MenaceAbility()); + } + + public BoggartBrute(final BoggartBrute card) { + super(card); + } + + @Override + public BoggartBrute copy() { + return new BoggartBrute(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/ChandraFireOfKaladesh.java b/Mage.Sets/src/mage/sets/magicorigins/ChandraFireOfKaladesh.java new file mode 100644 index 0000000000..a81cf2576b --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/ChandraFireOfKaladesh.java @@ -0,0 +1,96 @@ +/* + * 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.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.condition.common.SourceDealtDamageCondition; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect; +import mage.abilities.effects.common.ExileAndReturnTransformedSourceEffect.Gender; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.TargetPlayer; + +/** + * + * @author LevelX2 + */ +public class ChandraFireOfKaladesh extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a red spell"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public ChandraFireOfKaladesh(UUID ownerId) { + super(ownerId, 135, "Chandra, Fire of Kaladesh", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); + this.expansionSetCode = "ORI"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.canTransform = true; + this.secondSideCard = new ChandraRoaringFlame(ownerId); + + // Whenever you cast a red spell, untap Chandra, Fire of Kaladesh. + this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false)); + + // {T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control. + this.addAbility(new TransformAbility()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addEffect(new ConditionalOneShotEffect(new ExileAndReturnTransformedSourceEffect(Gender.FEMAL), new SourceDealtDamageCondition(3))); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + + } + + public ChandraFireOfKaladesh(final ChandraFireOfKaladesh card) { + super(card); + } + + @Override + public ChandraFireOfKaladesh copy() { + return new ChandraFireOfKaladesh(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/ChandraRoaringFlame.java b/Mage.Sets/src/mage/sets/magicorigins/ChandraRoaringFlame.java new file mode 100644 index 0000000000..a12cfc19dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/ChandraRoaringFlame.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.magicorigins; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageSelfEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +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.counters.CounterType; +import mage.game.Game; +import mage.game.command.Emblem; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ChandraRoaringFlame extends CardImpl { + + public ChandraRoaringFlame(UUID ownerId) { + super(ownerId, 135, "Chandra, Roaring Flame", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, ""); + this.expansionSetCode = "ORI"; + this.subtype.add("Chandra"); + this.color.setRed(true); + + this.nightCard = true; + this.canTransform = true; + + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false)); + + // +1: Chandra, Roaring Flame deals 2 damage to target player. + LoyaltyAbility loyaltyAbility = new LoyaltyAbility(new DamageTargetEffect(2), 1); + loyaltyAbility.addTarget(new TargetPlayer()); + this.addAbility(loyaltyAbility); + + //-2: Chandra, Roaring Flame deals 2 damage to target creature. + loyaltyAbility = new LoyaltyAbility(new DamageTargetEffect(2), -2); + loyaltyAbility.addTarget(new TargetCreaturePermanent()); + this.addAbility(loyaltyAbility); + + //-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you." + this.addAbility(new LoyaltyAbility(new ChandraRoaringFlameEmblemEffect(), -7)); + + + } + + public ChandraRoaringFlame(final ChandraRoaringFlame card) { + super(card); + } + + @Override + public ChandraRoaringFlame copy() { + return new ChandraRoaringFlame(this); + } +} + +class ChandraRoaringFlameEmblemEffect extends OneShotEffect { + + public ChandraRoaringFlameEmblemEffect() { + super(Outcome.Damage); + this.staticText = "{this} deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with \"At the beginning of your upkeep, this emblem deals 3 damage to you.\""; + } + + public ChandraRoaringFlameEmblemEffect(final ChandraRoaringFlameEmblemEffect effect) { + super(effect); + } + + @Override + public ChandraRoaringFlameEmblemEffect copy() { + return new ChandraRoaringFlameEmblemEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + List opponentsEmblem = new ArrayList<>(); + for(UUID playerId: game.getOpponents(controller.getId())) { + Player opponent = game.getPlayer(playerId); + if (opponent != null) { + if (opponent.damage(6, source.getSourceId(), game, false, true) > 0) { + opponentsEmblem.add(opponent); + } + } + } + for (Player opponent : opponentsEmblem) { + game.addEmblem(new ChandraRoaringFlameEmblem(), source, opponent.getId()); + } + } + return false; + } +} + +/** + * Emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you." + */ +class ChandraRoaringFlameEmblem extends Emblem { + + public ChandraRoaringFlameEmblem() { + setName("EMBLEM: Chandra, Roaring Flame"); + Effect effect = new DamageTargetEffect(3); + effect.setText("this emblem deals 3 damage to you"); + this.getAbilities().add(new BeginningOfUpkeepTriggeredAbility(Zone.COMMAND, effect, TargetController.YOU, false, true)); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/magicorigins/LightningJavelin.java b/Mage.Sets/src/mage/sets/magicorigins/LightningJavelin.java new file mode 100644 index 0000000000..f81246bc81 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/LightningJavelin.java @@ -0,0 +1,63 @@ +/* + * 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.magicorigins; + +import java.util.UUID; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class LightningJavelin extends CardImpl { + + public LightningJavelin(UUID ownerId) { + super(ownerId, 153, "Lightning Javelin", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); + this.expansionSetCode = "ORI"; + + // Lightning Javelin deals 3 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(3)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + // Scry 1. + this.getSpellAbility().addEffect(new ScryEffect(1)); + } + + public LightningJavelin(final LightningJavelin card) { + super(card); + } + + @Override + public LightningJavelin copy() { + return new LightningJavelin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.java b/Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.java new file mode 100644 index 0000000000..62aa3fc788 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/PiaAndKiranNalaar.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.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.game.permanent.token.Token; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LevelX2 + */ +public class PiaAndKiranNalaar extends CardImpl { + + public PiaAndKiranNalaar(UUID ownerId) { + super(ownerId, 157, "Pia and Kiran Nalaar", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "ORI"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Artificer"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PiaAndKiranNalaarThopterToken(), 2))); + + // {2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{R}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterControlledArtifactPermanent("an artifact"),true))); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public PiaAndKiranNalaar(final PiaAndKiranNalaar card) { + super(card); + } + + @Override + public PiaAndKiranNalaar copy() { + return new PiaAndKiranNalaar(this); + } +} + + +class PiaAndKiranNalaarThopterToken extends Token { + PiaAndKiranNalaarThopterToken() { + super("Thopter", "a 1/1 colorless Thopter artifact creature token with flying"); + cardType.add(CardType.CREATURE); + cardType.add(CardType.ARTIFACT); + subtype.add("Thopter"); + power = new MageInt(1); + toughness = new MageInt(1); + this.addAbility(FlyingAbility.getInstance()); + } +} \ No newline at end of file From 911c239074044b0bcfc810c2a7056ebbff6e4f4e Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 20 Jun 2015 19:59:12 +0200 Subject: [PATCH 09/42] [ORI] Updated mtg-cards-data.txt (90 cards). --- Utils/mtg-cards-data.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 7539be256d..00a8867a88 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -26217,6 +26217,7 @@ Jace, Vryn's Prodigy|Magic Origins|60|M|{1}{U}{1}{U}|Legendary Creature - Human Jhessian Thief|Magic Origins|62|U|{2}{U}|Creature - Human Rogue|1|3|Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)$Whenever Jhessian Thief deals combat damage to a player, draw a card.| Ringwarden Owl|Magic Origins|068|C|{3}{U}{U}|Creature - Bird|3|3|Flying (This creature can't be blocked except by creatures with flying or reach.)$Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)| Separatist Voidmage|Magic Origins|72|C|{3}{U}|Creature - Human Wizard|2|2|When Separatist Voidmage enters the battlefield, you may return target creature to its owner's hand.| +Sphinx's Tutelage|Magic Origins|76|U|{2}{U}|Enchantment|||Whenever you draw a card, target opponent puts the top two cards of his or her library into his or her graveyard. If they're both nonland cards that share a color, repeat this process.${5}{U}: Draw a card, then discard a card.| Into the Void|Magic Origins|277|U|{3}{U}{3}{U}|Sorcery|||Return up to two target creatures to their owners' hands.$Return up to two target creatures to their owners' hands.| Mahamoti Djinn|Magic Origins|278|R|{4}{U}{U}{4}{U}{U}|Creature - Djinn|5|65|6|Flying$Flying| Weave Fate|Magic Origins|279|C|{3}{U}{3}{U}|Instant|||Draw two cards.$Draw two cards.| @@ -26263,6 +26264,7 @@ Vastwood Gorger|Magic Origins|?|C|{5}{G}{5}{G}|Creature - Wurm|5|65|6|| Yeva's Forcemage|Magic Origins|?|C|{2}{G}{2}{G}|Creature - Elf Shaman|2|22|2|When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.$When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.| Conclave Naturalists|Magic Origins|171|U|{4}{G}|Creature - Dryad|4|4|When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment.| Dwynen, Gilt-Leaf Daen|Magic Origins|172|R|{2}{G}{G}|Legendary Creature - Elf Warrior|3|4|Reach$Other Elf creatures you control get +1/+1.$Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control.| +Elemental Bond|Magic Origins|174|U|{2}{G}|Enchantment|||Whenever a creature with power 3 or greater enters the battlefield under your control, draw a card.| Hitchclaw Recluse|Magic Origins|181|C|{2}{G}|Creature - Spider|1|4|Reach| Joraga Invocation|Magic Origins|183|U|{4}{G}{G}|Sorcery|||Each creature you control gets +3/+3 until end of turn and must be blocked this turn if able.| Mantle of Webs|Magic Origins|187|C|{1}{G}|Enchantment - Aura|||Enchant Creature$Enchanted creature gets +1/+3 and has reach.| @@ -26271,6 +26273,7 @@ Nissa, Vastwood Seer|Magic Origins|189|M|{2}{G}{2}{G}|Legendary Creature - Elf S Plummet|Magic Origins|286|C|{1}{G}{1}{G}|Instant|||Destroy target creature with flying.$Destroy target creature with flying.| Prized Unicorn|Magic Origins|287|U|{3}{G}{3}{G}|Creature - Unicorn|2|22|2|All creatures able to block Prized Unicorn do so.$All creatures able to block Prized Unicorn do so.| Terra Stomper|Magic Origins|288|R|{3}{G}{G}{G}{3}{G}{G}{G}|Creature - Beast|8|88|8|Terra Stomper can't be countered.$Trample$Terra Stomper can't be countered.$Trample| +Zendikar Incarnate|Magic Origins|219|U|{2}{R}{G}|Creature - Elemental|0|4|Zendikar Incarnate's power is equal to the amount of lands you control.| Meteorite|Magic Origins|?|U|{5}{5}|Artifact|||When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.$When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.| Gold-Forged Sentinel|Magic Origins|?|U|{6}{6}|Artifact Creature - Chimera|4|44|4|Flying$Flying| Runed Servitor|Magic Origins|?|U|{2}{2}|Artifact Creature - Construct|2|22|2|When Runed Servitor dies, each player draws a card.$When Runed Servitor dies, each player draws a card.| From fd6d89ae0b5e498e9d22c12f92cff048e5b0a1a9 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 20 Jun 2015 21:21:32 +0300 Subject: [PATCH 10/42] Fixes from LevelX's review --- .../src/mage/sets/antiquities/IvoryTower.java | 2 +- .../sets/mastersedition/CuombajjWitches.java | 24 +++++-------------- .../common/ExileFromTopOfLibraryCost.java | 9 ++++--- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java b/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java index 53491f4ec8..6f4d25c427 100644 --- a/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java +++ b/Mage.Sets/src/mage/sets/antiquities/IvoryTower.java @@ -82,8 +82,8 @@ class IvoryTowerEffect extends OneShotEffect { int amount = player.getHand().size() - 4; if(amount > 0) { player.gainLife(amount, game); - return true; } + return true; } return false; } diff --git a/Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.java b/Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.java index d41dd19d1b..88ec79f8ee 100644 --- a/Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.java +++ b/Mage.Sets/src/mage/sets/mastersedition/CuombajjWitches.java @@ -53,6 +53,8 @@ import mage.target.common.TargetOpponent; */ public class CuombajjWitches extends CardImpl { + private final UUID originalId; + public CuombajjWitches(UUID ownerId) { super(ownerId, 65, "Cuombajj Witches", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{B}{B}"); this.expansionSetCode = "MED"; @@ -64,15 +66,16 @@ public class CuombajjWitches extends CardImpl { // {T}: Cuombajj Witches deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice. Effect effect = new DamageTargetEffect(1); effect.setText("{this} deals 1 damage to target creature or player and 1 damage to target creature or player of an opponent's choice"); - Ability ability = new CuombajjWitchesAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); ability.addTarget(new TargetCreatureOrPlayer()); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); + originalId = ability.getOriginalId(); } @Override public void adjustTargets(Ability ability, Game game) { - if(ability instanceof CuombajjWitchesAbility) { + if(ability.getOriginalId().equals(originalId)) { Player controller = game.getPlayer(ability.getControllerId()); if(controller != null) { UUID opponentId = null; @@ -95,6 +98,7 @@ public class CuombajjWitches extends CardImpl { public CuombajjWitches(final CuombajjWitches card) { super(card); + this.originalId = card.originalId; } @Override @@ -102,19 +106,3 @@ public class CuombajjWitches extends CardImpl { return new CuombajjWitches(this); } } - -// This is for identification in case something grants a second SimpleActivatedAbility to the Witches. -class CuombajjWitchesAbility extends SimpleActivatedAbility { - public CuombajjWitchesAbility(Zone zone, Effect effect, Cost cost) { - super(zone, effect, cost); - } - - public CuombajjWitchesAbility(final CuombajjWitchesAbility ability) { - super(ability); - } - - @Override - public CuombajjWitchesAbility copy() { - return new CuombajjWitchesAbility(this); - } -} diff --git a/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java b/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java index 7e4840d3ef..4488c55b61 100644 --- a/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java +++ b/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java @@ -31,7 +31,9 @@ package mage.abilities.costs.common; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.CostImpl; -import mage.cards.Card; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.Zone; import mage.game.Game; import mage.players.Library; import mage.players.Player; @@ -70,10 +72,11 @@ public class ExileFromTopOfLibraryCost extends CostImpl { Player controller = game.getPlayer(controllerId); if(controller != null) { Library library = controller.getLibrary(); + Cards cards = new CardsImpl(); for(int i = 0; i < amount; i++) { - Card card = library.removeFromTop(game); - card.moveToExile(null, null, sourceId, game); + cards.add(library.removeFromTop(game)); } + controller.moveCards(cards, Zone.LIBRARY, Zone.EXILED, ability, game); paid = true; } return paid; From 1acf0fa509a565cee4e2dc34b1e7d9551b08ac35 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 20 Jun 2015 23:38:43 +0200 Subject: [PATCH 11/42] Forcefield, added a log text about the chosen creature. --- Mage.Sets/src/mage/sets/mastersedition/Forcefield.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/mastersedition/Forcefield.java b/Mage.Sets/src/mage/sets/mastersedition/Forcefield.java index cc7ebcd252..dd707a170d 100644 --- a/Mage.Sets/src/mage/sets/mastersedition/Forcefield.java +++ b/Mage.Sets/src/mage/sets/mastersedition/Forcefield.java @@ -28,6 +28,7 @@ package mage.sets.mastersedition; import java.util.UUID; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -45,6 +46,7 @@ import mage.filter.predicate.permanent.UnblockedPredicate; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCreaturePermanent; @@ -98,9 +100,14 @@ class ForcefieldEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { Target target = new TargetCreaturePermanent(1, 1, filter, true); if (controller.choose(Outcome.PreventDamage, target, source.getSourceId(), game)) { + Permanent creature = game.getPermanent(target.getFirstTarget()); + if (creature != null) { + game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen " + creature.getLogName()); + } ContinuousEffect effect = new ForcefieldPreventionEffect(); effect.setTargetPointer(new FixedTarget(target.getFirstTarget())); game.addEffect(effect, source); From 0ef8fbf567ee78a8ffc16f2741a6ece24dee8640 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 21 Jun 2015 01:31:38 +0200 Subject: [PATCH 12/42] [ORI] Added 5 red cards. --- .../mage/sets/journeyintonyx/Starfall.java | 1 - .../src/mage/sets/magic2012/TectonicRift.java | 50 +++------ .../src/mage/sets/magic2014/SeismicStomp.java | 48 ++------ .../sets/magicorigins/EnthrallingVictor.java | 90 +++++++++++++++ .../mage/sets/magicorigins/RavagingBlaze.java | 105 ++++++++++++++++++ .../sets/magicorigins/SeismicElemental.java | 74 ++++++++++++ .../sets/magicorigins/SubterraneanScout.java | 78 +++++++++++++ .../sets/magicorigins/VolcanicRambler.java | 71 ++++++++++++ .../common/SpellMasteryCondition.java | 51 +++++++++ 9 files changed, 493 insertions(+), 75 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/magicorigins/EnthrallingVictor.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/RavagingBlaze.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/SubterraneanScout.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/VolcanicRambler.java create mode 100644 Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java b/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java index 6bd88fd895..59a2497194 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java @@ -30,7 +30,6 @@ package mage.sets.journeyintonyx; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; diff --git a/Mage.Sets/src/mage/sets/magic2012/TectonicRift.java b/Mage.Sets/src/mage/sets/magic2012/TectonicRift.java index 24c54246ef..61e118d124 100644 --- a/Mage.Sets/src/mage/sets/magic2012/TectonicRift.java +++ b/Mage.Sets/src/mage/sets/magic2012/TectonicRift.java @@ -31,13 +31,13 @@ import java.util.UUID; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; -import mage.abilities.Ability; -import mage.abilities.effects.RestrictionEffect; import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetLandPermanent; /** @@ -45,15 +45,22 @@ import mage.target.common.TargetLandPermanent; * @author North */ public class TectonicRift extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures without flying"); + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + public TectonicRift(UUID ownerId) { super(ownerId, 157, "Tectonic Rift", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{R}"); this.expansionSetCode = "M12"; - + // Destroy target land. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetLandPermanent()); - this.getSpellAbility().addEffect(new TectonicRiftEffect()); + // Creatures without flying can't block this turn. + this.getSpellAbility().addEffect(new CantBlockAllEffect(filter, Duration.EndOfTurn)); } public TectonicRift(final TectonicRift card) { @@ -65,34 +72,3 @@ public class TectonicRift extends CardImpl { return new TectonicRift(this); } } - -class TectonicRiftEffect extends RestrictionEffect { - - TectonicRiftEffect() { - super(Duration.EndOfTurn); - staticText = "Creatures without flying can't block this turn"; - } - - TectonicRiftEffect(final TectonicRiftEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (!permanent.getAbilities().contains(FlyingAbility.getInstance())) { - return true; - } - return false; - } - - @Override - public TectonicRiftEffect copy() { - return new TectonicRiftEffect(this); - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } - -} diff --git a/Mage.Sets/src/mage/sets/magic2014/SeismicStomp.java b/Mage.Sets/src/mage/sets/magic2014/SeismicStomp.java index a8d57175e1..a35907ae63 100644 --- a/Mage.Sets/src/mage/sets/magic2014/SeismicStomp.java +++ b/Mage.Sets/src/mage/sets/magic2014/SeismicStomp.java @@ -28,29 +28,34 @@ package mage.sets.magic2014; import java.util.UUID; -import mage.abilities.Ability; -import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; -import mage.game.Game; -import mage.game.permanent.Permanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; /** * * @author jeffwadsworth */ public class SeismicStomp extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures without flying"); + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + public SeismicStomp(UUID ownerId) { super(ownerId, 152, "Seismic Stomp", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{R}"); this.expansionSetCode = "M14"; - // Creatures without flying can't block this turn. - this.getSpellAbility().addEffect(new SeismicStompEffect()); + this.getSpellAbility().addEffect(new CantBlockAllEffect(filter, Duration.EndOfTurn)); } public SeismicStomp(final SeismicStomp card) { @@ -62,34 +67,3 @@ public class SeismicStomp extends CardImpl { return new SeismicStomp(this); } } - -class SeismicStompEffect extends RestrictionEffect { - - SeismicStompEffect() { - super(Duration.EndOfTurn); - staticText = "Creatures without flying can't block this turn"; - } - - SeismicStompEffect(final SeismicStompEffect effect) { - super(effect); - } - - @Override - public boolean applies(Permanent permanent, Ability source, Game game) { - if (!permanent.getAbilities().contains(FlyingAbility.getInstance())) { - return true; - } - return false; - } - - @Override - public SeismicStompEffect copy() { - return new SeismicStompEffect(this); - } - - @Override - public boolean canBlock(Permanent attacker, Permanent blocker, Ability source, Game game) { - return false; - } - -} diff --git a/Mage.Sets/src/mage/sets/magicorigins/EnthrallingVictor.java b/Mage.Sets/src/mage/sets/magicorigins/EnthrallingVictor.java new file mode 100644 index 0000000000..231b0d9ac5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/EnthrallingVictor.java @@ -0,0 +1,90 @@ +/* + * 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.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +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.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetCreaturePermanent; + + +/** + * + * @author LevelX2 + */ +public class EnthrallingVictor extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls with power 2 or less"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public EnthrallingVictor(UUID ownerId) { + super(ownerId, 142, "Enthralling Victor", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "ORI"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Enthralling Victor enters the battlefield, gain control of target creature an opponent controls with power 2 or less until end of turn. Untap that creature. It gains haste until end of turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new GainControlTargetEffect(Duration.EndOfTurn, true), false); + Effect effect = new UntapTargetEffect(); + effect.setText("untap that creature"); + ability.addEffect(effect); + ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "it gains haste until end of turn")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public EnthrallingVictor(final EnthrallingVictor card) { + super(card); + } + + @Override + public EnthrallingVictor copy() { + return new EnthrallingVictor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/RavagingBlaze.java b/Mage.Sets/src/mage/sets/magicorigins/RavagingBlaze.java new file mode 100644 index 0000000000..15d9672c16 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/RavagingBlaze.java @@ -0,0 +1,105 @@ +/* + * 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.magicorigins; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.common.SpellMasteryCondition; +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.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class RavagingBlaze extends CardImpl { + + public RavagingBlaze(UUID ownerId) { + super(ownerId, 159, "Ravaging Blaze", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{X}{R}{R}"); + this.expansionSetCode = "ORI"; + + // Ravaging Blaze deals X damage to target creature. + // Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller. + this.getSpellAbility().addEffect(new RavagingBlazeEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public RavagingBlaze(final RavagingBlaze card) { + super(card); + } + + @Override + public RavagingBlaze copy() { + return new RavagingBlaze(this); + } +} + +class RavagingBlazeEffect extends OneShotEffect { + + public RavagingBlazeEffect() { + super(Outcome.Damage); + staticText = "{this} deals X damage to target creature.
" + + "Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, {this} also deals X damage to that creature's controller."; + } + + public RavagingBlazeEffect(final RavagingBlazeEffect effect) { + super(effect); + } + + @Override + public RavagingBlazeEffect copy() { + return new RavagingBlazeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent != null) { + int xValue = source.getManaCostsToPay().getX(); + if (xValue > 0) { + permanent.damage(xValue, source.getSourceId(), game, false, true); + if (SpellMasteryCondition.getInstance().apply(game, source)) { + Player targetController = game.getPlayer(permanent.getControllerId()); + if (targetController != null) { + targetController.damage(xValue, source.getSourceId(), game, false, true); + } + } + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.java b/Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.java new file mode 100644 index 0000000000..3f67be9e03 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.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.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.combat.CantBlockAllEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author LevelX2 + */ +public class SeismicElemental extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures without flying"); + + static { + filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); + } + + public SeismicElemental(UUID ownerId) { + super(ownerId, 161, "Seismic Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); + this.expansionSetCode = "ORI"; + this.subtype.add("Elemental"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Seismic Elemental enters the battlefield, creatures without flying can't block this turn. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CantBlockAllEffect(filter, Duration.EndOfTurn), false)); + } + + public SeismicElemental(final SeismicElemental card) { + super(card); + } + + @Override + public SeismicElemental copy() { + return new SeismicElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/SubterraneanScout.java b/Mage.Sets/src/mage/sets/magicorigins/SubterraneanScout.java new file mode 100644 index 0000000000..9604a67346 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/SubterraneanScout.java @@ -0,0 +1,78 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SubterraneanScout extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.LessThan, 3)); + } + + public SubterraneanScout(UUID ownerId) { + super(ownerId, 164, "Subterranean Scout", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "ORI"; + this.subtype.add("Goblin"); + this.subtype.add("Scout"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Subterranean Scout enters the battlefield, target creature with power 2 or less can't be blocked this turn. + Ability ability = new EntersBattlefieldTriggeredAbility(new CantBeBlockedTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + } + + public SubterraneanScout(final SubterraneanScout card) { + super(card); + } + + @Override + public SubterraneanScout copy() { + return new SubterraneanScout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/VolcanicRambler.java b/Mage.Sets/src/mage/sets/magicorigins/VolcanicRambler.java new file mode 100644 index 0000000000..17361c9fc8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/VolcanicRambler.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.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +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 VolcanicRambler extends CardImpl { + + public VolcanicRambler(UUID ownerId) { + super(ownerId, 167, "Volcanic Rambler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{R}"); + this.expansionSetCode = "ORI"; + this.subtype.add("Elemental"); + this.power = new MageInt(6); + this.toughness = new MageInt(4); + + // {2}{R}: Volcanic Rambler deals 1 damage to target player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public VolcanicRambler(final VolcanicRambler card) { + super(card); + } + + @Override + public VolcanicRambler copy() { + return new VolcanicRambler(this); + } +} diff --git a/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java b/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java new file mode 100644 index 0000000000..db9faa2008 --- /dev/null +++ b/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java @@ -0,0 +1,51 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LevelX2 + */ + +public class SpellMasteryCondition implements Condition { + + private static final FilterCard filter = new FilterCard(); + + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.INSTANT), new CardTypePredicate(CardType.SORCERY))); + } + + private static SpellMasteryCondition fInstance = null; + + public static SpellMasteryCondition getInstance() { + if (fInstance == null) { + fInstance = new SpellMasteryCondition(); + } + return fInstance; + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + return player != null && player.getGraveyard().count(filter, game) >= 2; + } + + @Override + public String toString() { + return "there are two or more instant and/or sorcery cards in your graveyard"; + } + + +} \ No newline at end of file From a41d8d8d6e60568234b4f3b020e0285eb57bfe07 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 21 Jun 2015 01:33:51 +0200 Subject: [PATCH 13/42] [ORI] Fixed power of Hixus, Prison Warden. --- Mage.Sets/src/mage/sets/magicorigins/HixusPrisonWarden.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/magicorigins/HixusPrisonWarden.java b/Mage.Sets/src/mage/sets/magicorigins/HixusPrisonWarden.java index bc5db55e56..43db2e99f1 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/HixusPrisonWarden.java +++ b/Mage.Sets/src/mage/sets/magicorigins/HixusPrisonWarden.java @@ -63,7 +63,7 @@ public class HixusPrisonWarden extends CardImpl { this.subtype.add("Human"); this.subtype.add("Soldier"); this.power = new MageInt(4); - this.toughness = new MageInt(44); + this.toughness = new MageInt(4); // Flash this.addAbility(FlashAbility.getInstance()); From 3a5748550153eb2b740a5ec69d4b28e6dca5ae0a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 21 Jun 2015 01:39:25 +0200 Subject: [PATCH 14/42] [ORI] Fix of SpellMasteryCondition. --- .../mage/abilities/condition/common/SpellMasteryCondition.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java b/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java index db9faa2008..fd8a29207c 100644 --- a/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java +++ b/Mage/src/mage/abilities/condition/common/SpellMasteryCondition.java @@ -36,6 +36,8 @@ public class SpellMasteryCondition implements Condition { return fInstance; } + private SpellMasteryCondition() {} + @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); From 6e34416afec128839f7876afd1d148eb05d42969 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 21 Jun 2015 13:28:42 +0300 Subject: [PATCH 15/42] Fix the text of Betrayal of Flesh entwine cost --- Mage.Sets/src/mage/sets/mirrodin/BetrayalOfFlesh.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/mirrodin/BetrayalOfFlesh.java b/Mage.Sets/src/mage/sets/mirrodin/BetrayalOfFlesh.java index b947a3451f..50d0a33d43 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/BetrayalOfFlesh.java +++ b/Mage.Sets/src/mage/sets/mirrodin/BetrayalOfFlesh.java @@ -66,7 +66,7 @@ public class BetrayalOfFlesh extends CardImpl { mode.getTargets().add(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); this.getSpellAbility().getModes().addMode(mode); // Entwine-Sacrifice three lands. - this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent(), true)))); + this.addAbility(new EntwineAbility(new SacrificeTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("three lands"), true)))); } public BetrayalOfFlesh(final BetrayalOfFlesh card) { From 2dfdc42b8962fd8ee902b907d40e7fff4d9af6bc Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 21 Jun 2015 13:29:14 +0300 Subject: [PATCH 16/42] Fix Grixis Illusionist being able to target opponent's lands --- .../src/mage/sets/conflux/GrixisIllusionist.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/conflux/GrixisIllusionist.java b/Mage.Sets/src/mage/sets/conflux/GrixisIllusionist.java index 8057f0fa27..c30582b9eb 100644 --- a/Mage.Sets/src/mage/sets/conflux/GrixisIllusionist.java +++ b/Mage.Sets/src/mage/sets/conflux/GrixisIllusionist.java @@ -37,7 +37,10 @@ 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.FilterLandPermanent; +import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.Target; import mage.target.common.TargetLandPermanent; @@ -47,6 +50,12 @@ import mage.target.common.TargetLandPermanent; */ public class GrixisIllusionist extends CardImpl { + private static final FilterLandPermanent filter = new FilterLandPermanent("land you control"); + + static { + filter.add(new ControllerPredicate(TargetController.YOU)); + } + public GrixisIllusionist(UUID ownerId) { super(ownerId, 29, "Grixis Illusionist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); this.expansionSetCode = "CON"; @@ -58,10 +67,9 @@ public class GrixisIllusionist extends CardImpl { // {tap}: Target land you control becomes the basic land type of your choice until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.EndOfTurn), new TapSourceCost()); - Target target = new TargetLandPermanent(); + Target target = new TargetLandPermanent(filter); ability.addTarget(target); this.addAbility(ability); - } public GrixisIllusionist(final GrixisIllusionist card) { From 15e229ab2390483b1d3d941f2d58b269e8dd9303 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 21 Jun 2015 13:30:35 +0300 Subject: [PATCH 17/42] Fix lands targeted by Tidal Warrior, Grixis Illusionist, and other similar effects erroneously keeping all their subtypes --- .../common/continuous/BecomesBasicLandTargetEffect.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java b/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java index 3931652585..31a33d5831 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java @@ -72,7 +72,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, String... landNames) { this(duration, chooseLandType, true, landNames); } - + public BecomesBasicLandTargetEffect(Duration duration, boolean chooseLandType, boolean loseOther, String... landNames) { super(duration, Outcome.Detriment); this.landTypes.addAll(Arrays.asList(landNames)); @@ -86,6 +86,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { super(effect); this.landTypes.addAll(effect.landTypes); this.chooseLandType = effect.chooseLandType; + this.loseOther = effect.loseOther; } @Override @@ -111,7 +112,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { this.discard(); } } - + if(!loseOther) { for (UUID targetPermanent : targetPointer.getTargets(game, source)) { Permanent land = game.getPermanent(targetPermanent); From 3598f07caa4d3ad91101f0bdf9d1f84db3a93f57 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 21 Jun 2015 13:38:54 +0300 Subject: [PATCH 18/42] Another simplification for ExileFromTopOfLibraryCost --- .../costs/common/ExileFromTopOfLibraryCost.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java b/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java index 4488c55b61..0262041875 100644 --- a/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java +++ b/Mage/src/mage/abilities/costs/common/ExileFromTopOfLibraryCost.java @@ -31,11 +31,8 @@ package mage.abilities.costs.common; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.CostImpl; -import mage.cards.Cards; -import mage.cards.CardsImpl; import mage.constants.Zone; import mage.game.Game; -import mage.players.Library; import mage.players.Player; import mage.util.CardUtil; @@ -71,12 +68,7 @@ public class ExileFromTopOfLibraryCost extends CostImpl { public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { Player controller = game.getPlayer(controllerId); if(controller != null) { - Library library = controller.getLibrary(); - Cards cards = new CardsImpl(); - for(int i = 0; i < amount; i++) { - cards.add(library.removeFromTop(game)); - } - controller.moveCards(cards, Zone.LIBRARY, Zone.EXILED, ability, game); + controller.moveCards(controller.getLibrary().getTopCards(game, amount), Zone.LIBRARY, Zone.EXILED, ability, game); paid = true; } return paid; From 87f919ecac3c60f50198d5c55209abcfff8c366b Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 21 Jun 2015 23:49:16 +0200 Subject: [PATCH 19/42] * Reworked handling of revealed and look at windows. Windows can stay open now and moved to a position and stay there. --- ...eDialog.form => CardInfoWindowDialog.form} | 0 ...eDialog.java => CardInfoWindowDialog.java} | 112 ++++++++++++++++-- .../mage/client/dialog/ShowCardsDialog.java | 54 +++++---- .../main/java/mage/client/game/GamePanel.java | 71 +++++++---- .../mage/client/util/gui/GuiDisplayUtil.java | 13 +- .../mage/plugins/card/utils/ImageManager.java | 3 + .../card/utils/impl/ImageManagerImpl.java | 30 +++++ .../src/main/resources/game/looked_at.png | Bin 0 -> 1274 bytes .../src/main/resources/game/revealed.png | Bin 0 -> 3305 bytes .../mage/server/game/GameSessionPlayer.java | 1 - Mage/src/mage/game/GameImpl.java | 3 +- Mage/src/mage/game/GameState.java | 8 +- 12 files changed, 232 insertions(+), 63 deletions(-) rename Mage.Client/src/main/java/mage/client/dialog/{ExileZoneDialog.form => CardInfoWindowDialog.form} (100%) rename Mage.Client/src/main/java/mage/client/dialog/{ExileZoneDialog.java => CardInfoWindowDialog.java} (51%) create mode 100644 Mage.Client/src/main/resources/game/looked_at.png create mode 100644 Mage.Client/src/main/resources/game/revealed.png diff --git a/Mage.Client/src/main/java/mage/client/dialog/ExileZoneDialog.form b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.form similarity index 100% rename from Mage.Client/src/main/java/mage/client/dialog/ExileZoneDialog.form rename to Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.form diff --git a/Mage.Client/src/main/java/mage/client/dialog/ExileZoneDialog.java b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java similarity index 51% rename from Mage.Client/src/main/java/mage/client/dialog/ExileZoneDialog.java rename to Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java index d85e8d2ee6..67e8fa7401 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/ExileZoneDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java @@ -27,42 +27,140 @@ */ /* - * ExileZoneDialog.java + * CardInfoWindowDialog.java * * Created on Feb 1, 2010, 3:00:35 PM */ package mage.client.dialog; +import java.awt.Point; import java.beans.PropertyVetoException; import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; +import javax.swing.ImageIcon; +import javax.swing.SwingUtilities; import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE; import mage.client.cards.BigCard; import mage.client.util.Config; +import mage.client.util.SettingsManager; +import mage.client.util.gui.GuiDisplayUtil; +import mage.view.CardsView; import mage.view.ExileView; +import mage.view.SimpleCardsView; +import org.mage.plugins.card.utils.impl.ImageManagerImpl; /** * * @author BetaSteward_at_googlemail.com */ -public class ExileZoneDialog extends MageDialog { +public class CardInfoWindowDialog extends MageDialog { - /** Creates new form ExileZoneDialog */ - public ExileZoneDialog() { + public static enum ShowType { REVEAL, LOOKED_AT, EXILE, OTHER }; + + private ShowType showType; + private boolean positioned; + + public CardInfoWindowDialog(ShowType showType, String name) { + this.title = name; + this.showType = showType; + this.positioned = false; this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); initComponents(); this.setModal(false); + switch(this.showType) { + case LOOKED_AT: + this.setFrameIcon(new ImageIcon(ImageManagerImpl.getInstance().getLookedAtImage())); + this.setClosable(true); + break; + case REVEAL: + this.setFrameIcon(new ImageIcon(ImageManagerImpl.getInstance().getRevealedImage())); + this.setClosable(true); + break; + case EXILE: + this.setFrameIcon(new ImageIcon(ImageManagerImpl.getInstance().getExileImage())); + break; + default: + // no icon yet + } + this.setTitelBarToolTip(name); } public void cleanUp() { cards.cleanUp(); } + public void loadCards(SimpleCardsView showCards, BigCard bigCard, UUID gameId) { + + boolean changed = cards.loadCards(showCards, bigCard, gameId); + if (showCards.size() > 0) { + show(); + if (changed) { + try { + if (!positioned) { + this.setIcon(false); + firstWindowPosition(); + } + } catch (PropertyVetoException ex) { + Logger.getLogger(CardInfoWindowDialog.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + else { + this.hideDialog(); + } + } + + public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId) { + boolean changed = cards.loadCards(showCards, bigCard, gameId, null); + + if (showCards.size() > 0) { + show(); + if (changed) { + try { + if (!positioned) { + this.setIcon(false); + firstWindowPosition(); + } else { + + } + } catch (PropertyVetoException ex) { + Logger.getLogger(CardInfoWindowDialog.class.getName()).log(Level.SEVERE, null, ex); + } + } + + } + else { + this.hideDialog(); + } + } + + private void firstWindowPosition() { + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + if (!positioned) { + int width = CardInfoWindowDialog.this.getWidth(); + int height = CardInfoWindowDialog.this.getHeight(); + if (width > 0 && height > 0) { + positioned = true; + Point centered = SettingsManager.getInstance().getComponentPosition(width, height); + int xPos = centered.x / 2; + int yPos = centered.y / 2; + CardInfoWindowDialog.this.setLocation(xPos, yPos); + GuiDisplayUtil.keepComponentInsideScreen(centered.x, centered.y, CardInfoWindowDialog.this); + CardInfoWindowDialog.this.show(); + } + } + + + // ShowCardsDialog.this.setVisible(true); + } + }); + } + public void loadCards(ExileView exile, BigCard bigCard, UUID gameId) { - this.title = exile.getName(); - this.setTitelBarToolTip(exile.getName()); boolean changed = cards.loadCards(exile, bigCard, gameId, null); if (exile.size() > 0) { show(); @@ -70,7 +168,7 @@ public class ExileZoneDialog extends MageDialog { try { this.setIcon(false); } catch (PropertyVetoException ex) { - Logger.getLogger(ExileZoneDialog.class.getName()).log(Level.SEVERE, null, ex); + Logger.getLogger(CardInfoWindowDialog.class.getName()).log(Level.SEVERE, null, ex); } } } diff --git a/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java b/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java index 7e221e11e7..433aecd21c 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java @@ -34,6 +34,16 @@ package mage.client.dialog; +import java.awt.Component; +import java.awt.Point; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.Serializable; +import java.util.Map; +import java.util.UUID; +import javax.swing.ImageIcon; +import javax.swing.JLayeredPane; +import javax.swing.SwingUtilities; import mage.cards.CardDimensions; import mage.client.MageFrame; import mage.client.cards.BigCard; @@ -44,29 +54,29 @@ import mage.client.util.gui.GuiDisplayUtil; import mage.view.CardsView; import mage.view.SimpleCardsView; import org.mage.card.arcane.CardPanel; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; -import java.io.Serializable; -import java.util.Map; -import java.util.UUID; +import org.mage.plugins.card.utils.impl.ImageManagerImpl; /** * @author BetaSteward_at_googlemail.com */ public class ShowCardsDialog extends MageDialog implements MouseListener { - private boolean reloaded = false; + + + // remember if this dialog was already auto positioned, so don't do it after the first time + private boolean positioned; + /** * Creates new form ShowCardsDialog */ public ShowCardsDialog() { + this.positioned = false; + this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); initComponents(); this.setModal(false); + } public void cleanUp() { @@ -88,7 +98,6 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { } public void loadCards(String name, CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, boolean modal, Map options) { - this.reloaded = true; this.title = name; this.setTitelBarToolTip(name); cardArea.loadCards(showCards, bigCard, dimension, gameId, this); @@ -106,7 +115,7 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { if (getParent() != MageFrame.getDesktop() /*|| this.isClosed*/) { MageFrame.getDesktop().add(this, JLayeredPane.DEFAULT_LAYER); } - pack(); + pack(); this.revalidate(); this.repaint(); @@ -115,26 +124,21 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - int width = ShowCardsDialog.this.getWidth(); - int height = ShowCardsDialog.this.getWidth(); - if (width > 0 && height > 0) { - Point centered = SettingsManager.getInstance().getComponentPosition(width, height); - ShowCardsDialog.this.setLocation(centered.x, centered.y); - GuiDisplayUtil.keepComponentInsideScreen(centered.x, centered.y, ShowCardsDialog.this); + if (!positioned) { + int width = ShowCardsDialog.this.getWidth(); + int height = ShowCardsDialog.this.getHeight(); + if (width > 0 && height > 0) { + Point centered = SettingsManager.getInstance().getComponentPosition(width, height); + ShowCardsDialog.this.setLocation(centered.x, centered.y); + positioned = true; + GuiDisplayUtil.keepComponentInsideScreen(centered.x, centered.y, ShowCardsDialog.this); + } } ShowCardsDialog.this.setVisible(true); } }); } - public boolean isReloaded() { - return this.reloaded; - } - - public void clearReloaded() { - this.reloaded = false; - } - private void initComponents() { cardArea = new CardArea(); diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index 029e928fd7..6837a7ed6e 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -50,6 +50,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; +import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -85,7 +86,8 @@ import mage.client.components.HoverButton; import mage.client.components.MageComponents; import mage.client.components.ext.dlg.DialogManager; import mage.client.components.layout.RelativeLayout; -import mage.client.dialog.ExileZoneDialog; +import mage.client.dialog.CardInfoWindowDialog; +import mage.client.dialog.CardInfoWindowDialog.ShowType; import mage.client.dialog.PickChoiceDialog; import mage.client.dialog.PickNumberDialog; import mage.client.dialog.PickPileDialog; @@ -143,9 +145,9 @@ public final class GamePanel extends javax.swing.JPanel { private static final int X_PHASE_WIDTH = 55; private static final int STACK_MIN_CARDS_OFFSET_Y = 7; private final Map players = new HashMap<>(); - private final Map exiles = new HashMap<>(); - private final Map revealed = new HashMap<>(); - private final Map lookedAt = new HashMap<>(); + private final Map exiles = new HashMap<>(); + private final Map revealed = new HashMap<>(); + private final Map lookedAt = new HashMap<>(); private final ArrayList pickTarget = new ArrayList<>(); private UUID gameId; private UUID playerId; // playerId of the player @@ -255,15 +257,15 @@ public final class GamePanel extends javax.swing.JPanel { if (pickNumber != null) { pickNumber.removeDialog(); } - for (ExileZoneDialog exileDialog: exiles.values()) { + for (CardInfoWindowDialog exileDialog: exiles.values()) { exileDialog.cleanUp(); exileDialog.removeDialog(); } - for (ShowCardsDialog revealDialog: revealed.values()) { + for (CardInfoWindowDialog revealDialog: revealed.values()) { revealDialog.cleanUp(); revealDialog.removeDialog(); } - for (ShowCardsDialog lookedAtDialog: lookedAt.values()) { + for (CardInfoWindowDialog lookedAtDialog: lookedAt.values()) { lookedAtDialog.cleanUp(); lookedAtDialog.removeDialog(); } @@ -682,7 +684,7 @@ public final class GamePanel extends javax.swing.JPanel { for (ExileView exile: game.getExile()) { if (!exiles.containsKey(exile.getId())) { - ExileZoneDialog newExile = new ExileZoneDialog(); + CardInfoWindowDialog newExile = new CardInfoWindowDialog(ShowType.EXILE, exile.getName()); exiles.put(exile.getId(), newExile); MageFrame.getDesktop().add(newExile, JLayeredPane.MODAL_LAYER); newExile.show(); @@ -805,30 +807,53 @@ public final class GamePanel extends javax.swing.JPanel { currentStep.setLocation(prevPoint.x - 15, prevPoint.y); } } - + private void showRevealed(GameView game) { - for (RevealedView reveal: game.getRevealed()) { - if (!revealed.containsKey(reveal.getName())) { - ShowCardsDialog newReveal = new ShowCardsDialog(); - revealed.put(reveal.getName(), newReveal); - } - revealed.get(reveal.getName()).loadCards("Revealed " + reveal.getName(), reveal.getCards(), bigCard, Config.dimensions, gameId, false); + for (RevealedView revealView: game.getRevealed()) { + handleGameInfoWindow(revealed, ShowType.REVEAL, revealView.getName(), revealView.getCards()); } + removeClosedCardInfoWindows(revealed); } private void showLookedAt(GameView game) { - for (ShowCardsDialog looked: lookedAt.values()) { - looked.clearReloaded(); + for (LookedAtView lookedAtView: game.getLookedAt()) { + handleGameInfoWindow(lookedAt, ShowType.LOOKED_AT, lookedAtView.getName(), lookedAtView.getCards()); } - for (LookedAtView looked: game.getLookedAt()) { - if (!lookedAt.containsKey(looked.getName())) { - ShowCardsDialog newLookedAt = new ShowCardsDialog(); - lookedAt.put(looked.getName(), newLookedAt); + removeClosedCardInfoWindows(lookedAt); + } + + private void handleGameInfoWindow(Map windowMap, ShowType showType, String name, LinkedHashMap cardsView) { + CardInfoWindowDialog cardInfoWindowDialog; + if (!windowMap.containsKey(name)) { + cardInfoWindowDialog = new CardInfoWindowDialog(showType, name); + windowMap.put(name, cardInfoWindowDialog); + MageFrame.getDesktop().add(cardInfoWindowDialog, JLayeredPane.MODAL_LAYER); + } else { + cardInfoWindowDialog = windowMap.get(name); + } + + if (cardInfoWindowDialog != null && !cardInfoWindowDialog.isClosed()) { + switch(showType) { + case REVEAL: + cardInfoWindowDialog.loadCards((CardsView) cardsView, bigCard, gameId); + break; + case LOOKED_AT: + cardInfoWindowDialog.loadCards((SimpleCardsView) cardsView, bigCard, gameId); + break; } - lookedAt.get(looked.getName()).loadCards("Looked at by " + looked.getName(), looked.getCards(), bigCard, Config.dimensions, gameId, false); } } - + + private void removeClosedCardInfoWindows(Map windowMap) { + // Remove closed window objects from the maps + for (Iterator> iterator = windowMap.entrySet().iterator(); iterator.hasNext();) { + Map.Entry entry = iterator.next(); + if (entry.getValue().isClosed()) { + iterator.remove(); + } + } + } + public void ask(String question, GameView gameView, int messageId) { updateGame(gameView); this.feedbackPanel.getFeedback(FeedbackMode.QUESTION, question, false, null, messageId); diff --git a/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java b/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java index 8252189c8c..72847cca1a 100644 --- a/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java +++ b/Mage.Client/src/main/java/mage/client/util/gui/GuiDisplayUtil.java @@ -75,21 +75,26 @@ public class GuiDisplayUtil { Dimension screenDim = c.getToolkit().getScreenSize(); GraphicsConfiguration g = c.getGraphicsConfiguration(); if (g != null) { - Insets insets = c.getToolkit().getScreenInsets(g); - + Insets insets = c.getToolkit().getScreenInsets(g); + boolean setLocation = false; if (x + c.getWidth() > screenDim.width - insets.right) { x = (screenDim.width - insets.right) - c.getWidth(); + setLocation = true; } else if (x < insets.left) { x = insets.left; + setLocation = true; } if (y + c.getHeight() > screenDim.height - insets.bottom) { y = (screenDim.height - insets.bottom) - c.getHeight(); + setLocation = true; } else if (y < insets.top) { y = insets.top; + setLocation = true; + } + if (setLocation) { + c.setLocation(x, y); } - - c.setLocation(x, y); } else { System.out.println("GuiDisplayUtil::keepComponentInsideScreen -> no GraphicsConfiguration"); } diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java b/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java index 52138aa996..63f2dcf900 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/utils/ImageManager.java @@ -15,6 +15,9 @@ public interface ImageManager { Image getTokenIconImage(); Image getTriggeredAbilityImage(); Image getActivatedAbilityImage(); + Image getLookedAtImage(); + Image getRevealedImage(); + Image getExileImage(); Image getCopyInformIconImage(); Image getCounterImageViolet(); Image getCounterImageRed(); diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/utils/impl/ImageManagerImpl.java b/Mage.Client/src/main/java/org/mage/plugins/card/utils/impl/ImageManagerImpl.java index 4ec5ac433d..9209be5d87 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/utils/impl/ImageManagerImpl.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/utils/impl/ImageManagerImpl.java @@ -110,6 +110,33 @@ public class ImageManagerImpl implements ImageManager { return imageTokenIcon; } + @Override + public Image getLookedAtImage() { + if (lookedAtIcon == null) { + Image image = getImageFromResourceTransparent("/game/looked_at.png", Color.WHITE, new Rectangle(20, 20)); + lookedAtIcon = BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB); + } + return lookedAtIcon; + } + + @Override + public Image getRevealedImage() { + if (revealedIcon == null) { + Image image = getImageFromResourceTransparent("/game/revealed.png", Color.WHITE, new Rectangle(20, 20)); + revealedIcon = BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB); + } + return revealedIcon; + } + + @Override + public Image getExileImage() { + if (exileIcon == null) { + Image image = getImageFromResourceTransparent("/info/exile.png", Color.WHITE, new Rectangle(20, 20)); + exileIcon = BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB); + } + return exileIcon; + } + @Override public BufferedImage getTriggeredAbilityImage() { if (triggeredAbilityIcon == null) { @@ -374,6 +401,9 @@ public class ImageManagerImpl implements ImageManager { private static BufferedImage imageTokenIcon; private static BufferedImage triggeredAbilityIcon; private static BufferedImage activatedAbilityIcon; + private static BufferedImage lookedAtIcon; + private static BufferedImage revealedIcon; + private static BufferedImage exileIcon; private static BufferedImage imageCopyIcon; private static BufferedImage imageCounterGreen; private static BufferedImage imageCounterGrey; diff --git a/Mage.Client/src/main/resources/game/looked_at.png b/Mage.Client/src/main/resources/game/looked_at.png new file mode 100644 index 0000000000000000000000000000000000000000..0f679faa850fb2f2ac0dbc9d2039cf17992835c2 GIT binary patch literal 1274 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE;=WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2cW~I!Kh>{3jAFJg2T)jk)8oi3#0-$aN1{?c|g2d$P)DnfH z)bz|eTc!8A_bVx6rr0WloBA5~7C5J7WO`H;r3P2|g(O#HCtIc{+1n}DR9FEG$W1Lt zRH(?!$t$+1uvG$^YXxM3g!Ppaz)DK8ZIvL7itr6kaLzAERWQ{v)=f4rG*mD%(=#+N zH8V5RQ7|$vG}1Q!A~Rh>6Dw0QDv55FG|-pw6wGYnPFt43sj+7T$xvrSfQI&tPC^3CAB!YD6^m>Ge1uOWMX1cerbuV z640d(FXR@$jm;~D1`{yA^eYkz^bPe4Kwg3=^!3HBG&dKny0|1L72#g21{a4^7NqJ2 zr55Lx79|5CE=?I^Re_arQEFmIeo;t%ehw@Y12XbU@{2R_3lyA#%@j1kGxJjN%ZoL^ z>V18!JoAc667!N%JzZ>-fF|f=W~Nw~I2#zdSQuKG7+JU&8oHWTnz$OenV1@znK}Z) z-q8f6*Cju>G&eP`1g19yq1O?oUQklVEdbi=l3J8mmYU*Ll%J~r_OewbZnv1@G!Lpb z1-Dx)aO%|uIz}H9u}BdO69T3l5EGtkfgE_kPt60S_99@ip6mYKkAZNNu*SiS4R$*s{r2F&%J5+8^EJ;Z_uWswRumilwCKr7ng0Fq87uF- zeE;tHBDtwAcY4iz?69PL_N+gj98L&`9OuyD`M%z;eQ8c~-ci|UfnD1hHn8tC(0O#R z>ukvkrmxcGfh~Gp7IURqd^>ykxR#Vaqwfo+v<1B?WdRMD<=>Q5<_OgipQ!WDcRMJc;gD<*9am7R9; zDa)?Z?%$VEj|)f~UN~iS|ArkeW!9ZuvP5QnhQoq?dnJ;0oo-oL_i5=F?!CQME2mGI nC7XEthwlIX^8c!8I1CsL7)CxhwYTIBs5J6)^>bP0l+XkK>7B`` literal 0 HcmV?d00001 diff --git a/Mage.Client/src/main/resources/game/revealed.png b/Mage.Client/src/main/resources/game/revealed.png new file mode 100644 index 0000000000000000000000000000000000000000..c004949400129e88fe86f1b12e9b1b2ac00027f2 GIT binary patch literal 3305 zcmVNc=P)004&%004{+008|`004nN004b?008NW002DY000@xb3BE2000Uv zX+uL$Nkc;*P;zf(X>4Tx07%E3mUmQC*A|D*y?1({%`gH|hTglt0MdJtUPWP;8DJ;_ z4l^{dA)*2iMMRn+NKnLp(NH8-M6nPQRImpm2q-ZaMN}+rM%Ih2ti1Q~^84egZ|$@9 zx%=$B&srA%lBX}1mj+7#kjfMAgFKw+5s^`J>;QlP9$S?PR%=$HTzo3l9?ED;xoI3-JvF1F8#m>QQXW*8-A zz9>Nv%ZWK*kqtikEV84R*{M9Xh{ZXlvs2k(?iKO2Od&_ah_8qXGr62B5#JKAMv5?% zE8;ie*i;TP0{|3BY!`4?i6S-;F^L}%f`(o2L0Dz>ZZynda zx(`h}FNp#{x{a}MR#uh~m%}m=7xWMPPlvyuufAs_KJJh5&|Nw4Oks+EF0LCZEhSCJ zr)Q)ySsc3IpNIG#2mW;)20@&74xhslMTCi_jLS<9wVTK03b<)JI+ypKn)naH{-njZ z7KzgM5l~}{fYfy=Kz{89C<+lE(fh?+|D$id_%I-TdEqLPi*x_)H~nY9rQ#)noA5c# zB`Ac>67n+__r%Wu$9dISw03U@r;Pdb`_%=KWKZEBGfDjQH zqKX(I48#TTN1~8;gpaI8ijWGV0cl0Lkv`-mGK$O~Z&4T&1w}_0qHIx~s8AFOwFb2w zRf4KU9Y%GadQmq~W2jlwM>H9&h}K8jpuNx$=mc~Yx)5D~ZbG-CFQRXwC(y4k7z_=g zjj_UbVj?j~n6;P^%sxyT<{V}aGme?VVzKgAeXJeUAIroFu!Yzv>{0Al>=1SW`vynE zso>0T?zku%50{Utz#YMz!42UiaSM1Uye8fT?~iBWbMU43MtnE^I(`DbK#(SA6YK~f zge1ZyLM5SA?cA^NYNxAX$R>L=^W`U z=_Q#=)*?HSqsRjC4stX30{Id7jRZx)NWx2kEwMqOMxsMvNaDF9UQ$!iNpiJhu4IMe z3CZh{Gg5ddEh!f%rqp_=8mW^~BT{qH6lqgwf9X`|66qt-SEQ$8urgXQZZd3{0-1v{ z7i7jM2t}RZLSa!hQyM83DHBu-Rh#NXO`;Z4zoQONXJut%m&u07X3N&do|YY@Av7(T z7cGTWN;^&)roCIDw8Uu%XUX;@txJZM%*!p6bCl!A70I>9-IjYNPnUO-PnO>$-zoo4 z0i~d)5U7x)uwUV#!pu_YQro4hrA14RFTJM-E9xl*DXvvKsMxPKr=+app_HyvrF21Q zMwzDUsGOu+u6#y$T7{xwufkO+S2?TllrBqmqNmU+>Amz>RYg@#RiSFV>VWEknzmY~ zTE1GF+Cz1MIzv5Pys-#cBCZ~; zMXm#GGH#)6)ozd6)!Y-@Tijj2>R4y()XvmDLKXQ&yjjk&I!+oQOrohQ}U>eb4k~HZbSnyy9x( zW?3$*y{uH6t~>7#3G*6dj`%lF|oWk4CLGP(p*(a%)B zP)E2$IF@OjS(EuDD=h0owsbZxyFW)SXM4_Mu6ypcYf)=iYkTrk^ETy;t#evezaCm2 zx4vhC`i6oH6B|7?9^ORQl)UMue3SgL{8yX9H+L5(6>KaR-{P^QrBI@fUpTVWc5B@> z)Hd$6f$iqotG0hEVi#R4HYu(seqX{Wx%!RiH@;dd*9H0$NjB!N_E9`?+$Pe+^P4d?`Y6!s5po@n0fF?V_0L~w~TL_n-rRgn?4-k z9U46xbhx+Ks=4`y;*ru8xJB49eKh*$jqhB)>uNP@t#6~X6(0k~gvXwKAN&3Aai8No zCm1JMf6)A)ww=;m)B$zmbj)@pc8+#Mb`75NKH1Z4+ui=7(T|5tsh+AiEql834Bs>djZ*&hXA3QVUFm(Q=>&;8Iyl!2)z2f%ZaOm)z zk?4`pJM24CcT?`ZxR-fv;r_-4=m$j)r5;v1Qhe0#v+mDrqn4wm$6Uwy9|u3aKh7F| z_DjYu?mT-%DP~zdZD6*{hzpfVoGnQ(rI47rl{xbNDUeZQr}_casZQ@3HSIKj?nw{^;}Z z!Kc(upZ)~{nDhK^CfpAI000SaNLh0L01FcU01FcV0GgZ_0000XbVXQnLvm$dbZKvH zAXI5>WdJfTF*G_bH99aeATlvJH8VOiI6xd!_W%F^_en%SR5(wCl)Y7o%!wD`(|Ig*=*J-Y&UyX;CAHPU|oRUxtd*7YV4haJFqX% zHl4^ZpnmOiLW9^O=f}{BN;VfK)W$?J4N?I}Io;l`PW33t; z!PEHrlj0HlL3jmgNqjwG?wM1VwQ6((f0cA%_aEUw?EPh3j9A&-?`RYoFY!MoqR;Wa z!weK}*xb2@xo1vc)~ZqKX*3$HZ{cvX?MO_+C2&moqpHs8(Y!1Ddy&_}x)gK-#|TWo z5d483k-RtQB6W}O;1xK;y9Nk#XwiNV@CEXH%US(@9S&1D zl~hmS8>{TFU6J5LkH^0Ab^)rUq3vLAlH@OUn{ze~H{nZcK4bj{C&2mZw#y2>A^HtY zK{{uS)2&3zVh8vMyh}Pa?ic7ftP~f1mxpr(LfoWBB^?x@r{UO$HP)(8^PkdPcZ|Ss nSOvc}Wp;qz8SsPfI!)LHX~tu-AYQNO00000NkvXXu0mjf-E=lv literal 0 HcmV?d00001 diff --git a/Mage.Server/src/main/java/mage/server/game/GameSessionPlayer.java b/Mage.Server/src/main/java/mage/server/game/GameSessionPlayer.java index 0b43412b38..cafa72133a 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameSessionPlayer.java +++ b/Mage.Server/src/main/java/mage/server/game/GameSessionPlayer.java @@ -255,7 +255,6 @@ public class GameSessionPlayer extends GameSessionWatcher { list.add(new LookedAtView(entry.getKey(), entry.getValue(), game)); } gameView.setLookedAt(list); - game.getState().clearLookedAt(playerId); return gameView; } diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index 49aa03847d..f9a2930de5 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -1201,7 +1201,6 @@ public abstract class GameImpl implements Game, Serializable { applyEffects(); state.getPlayers().resetPassed(); fireUpdatePlayersEvent(); - state.getRevealed().reset(); resetShortLivingLKI(); break; } else { @@ -1980,6 +1979,8 @@ public abstract class GameImpl implements Game, Serializable { } logger.trace("fireUpdatePlayersEvent"); tableEventSource.fireTableEvent(EventType.UPDATE, null, this); + getState().clearLookedAt(); + getState().clearRevealed(); } @Override diff --git a/Mage/src/mage/game/GameState.java b/Mage/src/mage/game/GameState.java index 83236ef4e6..6f5db885c1 100644 --- a/Mage/src/mage/game/GameState.java +++ b/Mage/src/mage/game/GameState.java @@ -445,8 +445,12 @@ public class GameState implements Serializable, Copyable { return lookedAt.get(playerId); } - public void clearLookedAt(UUID playerId) { - lookedAt.remove(playerId); + public void clearRevealed() { + revealed.clear(); + } + + public void clearLookedAt() { + lookedAt.clear(); } public Turn getTurn() { From 88928772fbbd8524d15f819942355a11c53a364a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 21 Jun 2015 23:50:03 +0200 Subject: [PATCH 20/42] * Zur's Weirding - Fixed that the player hand cards were not revealed. --- .../src/mage/sets/iceage/ZursWeirding.java | 50 ++++++++++++++++--- .../src/mage/sets/tenthedition/Peek.java | 2 +- .../src/mage/sets/urzassaga/Telepathy.java | 3 +- .../mage/sets/zendikar/ExplorersScope.java | 27 +++++----- .../cards/abilities/keywords/ProvokeTest.java | 5 +- .../mage/watchers/common/MiracleWatcher.java | 2 +- 6 files changed, 62 insertions(+), 27 deletions(-) diff --git a/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java b/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java index 96b514713e..cfc246e3fe 100644 --- a/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java +++ b/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java @@ -31,18 +31,20 @@ import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; import mage.abilities.effects.ReplacementEffectImpl; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Layer; import mage.constants.Outcome; import mage.constants.Rarity; +import mage.constants.SubLayer; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.players.Player; import mage.players.PlayerList; @@ -56,8 +58,8 @@ public class ZursWeirding extends CardImpl { super(ownerId, 112, "Zur's Weirding", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); this.expansionSetCode = "ICE"; - // Players play with their hands revealed. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayerRevealHandCardsEffect())); // If a player would draw a card, he or she reveals it instead. Then any other player may pay 2 life. If a player does, put that card into its owner's graveyard. Otherwise, that player draws a card. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ZursWeirdingReplacementEffect())); @@ -97,32 +99,32 @@ class ZursWeirdingReplacementEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player player = game.getPlayer(event.getTargetId()); - MageObject sourceObject = game.getObject(source.getSourceId()); - if (player != null) { + MageObject sourceObject = source.getSourceObject(game); + if (player != null && sourceObject != null) { Card card = player.getLibrary().getFromTop(game); if (card != null) { // reveals it instead - player.revealCards(sourceObject != null ? sourceObject.getName() : null, new CardsImpl(card), game); + player.revealCards(sourceObject.getIdName() + " next draw of " + player.getName() + " (" + game.getTurnNum()+"|"+game.getPhase().getType() +")", new CardsImpl(card), game); // Then any other player may pay 2 life. If a player does, put that card into its owner's graveyard PlayerList playerList = game.getPlayerList().copy(); playerList.setCurrent(player.getId()); Player currentPlayer = playerList.getNext(game); - String message = new StringBuilder("Pay 2 life to put ").append(card.getName()).append(" into graveyard?").toString(); + String message = new StringBuilder("Pay 2 life to put ").append(card.getLogName()).append(" into graveyard?").toString(); while (!currentPlayer.getId().equals(player.getId())) { if (currentPlayer.canPayLifeCost() && currentPlayer.getLife() >= 2 && currentPlayer.chooseUse(Outcome.Benefit, message, game)) { currentPlayer.loseLife(2, game); player.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, source, game); - game.getState().getRevealed().reset(); +// game.getState().getRevealed().reset(); return true; } currentPlayer = playerList.getNext(game); } - game.getState().getRevealed().reset(); +// game.getState().getRevealed().reset(); } } return false; @@ -138,3 +140,35 @@ class ZursWeirdingReplacementEffect extends ReplacementEffectImpl { } } +class PlayerRevealHandCardsEffect extends ContinuousEffectImpl { + + public PlayerRevealHandCardsEffect() { + super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Detriment); + staticText = "Players play with their hands revealed"; + } + + public PlayerRevealHandCardsEffect(final PlayerRevealHandCardsEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID playerID : controller.getInRange()) { + Player player = game.getPlayer(playerID); + if (player != null) { + player.revealCards(player.getName() + "'s hand cards", player.getHand(), game, false); + } + } + return true; + } + return false; + } + + @Override + public PlayerRevealHandCardsEffect copy() { + return new PlayerRevealHandCardsEffect(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/tenthedition/Peek.java b/Mage.Sets/src/mage/sets/tenthedition/Peek.java index 7f60d71d82..b442810153 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/Peek.java +++ b/Mage.Sets/src/mage/sets/tenthedition/Peek.java @@ -85,7 +85,7 @@ class PeekEffect extends OneShotEffect { Player player = game.getPlayer(targetPointer.getFirst(game, source)); MageObject sourceObject = source.getSourceObject(game); if (player != null && controller != null && sourceObject != null) { - controller.lookAtCards(sourceObject.getIdName(), player.getHand(), game); + controller.lookAtCards(sourceObject.getIdName() + " " + player.getName() + " (" + game.getTurnNum()+"|"+game.getPhase().getType() +")", player.getHand(), game); } return true; } diff --git a/Mage.Sets/src/mage/sets/urzassaga/Telepathy.java b/Mage.Sets/src/mage/sets/urzassaga/Telepathy.java index b24a9e4b0f..037fe814b7 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/Telepathy.java +++ b/Mage.Sets/src/mage/sets/urzassaga/Telepathy.java @@ -48,7 +48,6 @@ public class Telepathy extends CardImpl { super(ownerId, 102, "Telepathy", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}"); this.expansionSetCode = "USG"; - // Your opponents play with their hands revealed. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OpponentsPlayWithTheTopCardRevealedEffect())); } @@ -82,7 +81,7 @@ class OpponentsPlayWithTheTopCardRevealedEffect extends ContinuousEffectImpl { for (UUID opponentId : game.getOpponents(controller.getId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - controller.revealCards(sourceObject.getName() + " " + opponent.getName(), opponent.getHand(), game, false); + controller.revealCards(sourceObject.getIdName() + " " + opponent.getName(), opponent.getHand(), game, false); } } return true; diff --git a/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java b/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java index 9046d67a0c..f4733ff67b 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java +++ b/Mage.Sets/src/mage/sets/zendikar/ExplorersScope.java @@ -28,6 +28,7 @@ package mage.sets.zendikar; import java.util.UUID; +import mage.MageObject; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; @@ -42,7 +43,6 @@ import mage.cards.CardImpl; import mage.cards.Cards; import mage.cards.CardsImpl; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.players.Player; /** @@ -56,7 +56,10 @@ public class ExplorersScope extends CardImpl { this.expansionSetCode = "ZEN"; this.subtype.add("Equipment"); + // Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped. this.addAbility(new AttacksAttachedTriggeredAbility(new ExplorersScopeEffect())); + + // Equip ({1}: Attach to target creature you control. Equip only as a sorcery.) this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1))); } @@ -88,28 +91,24 @@ class ExplorersScopeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player == null) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller == null || sourceObject == null) { return false; } - Card card = player.getLibrary().getFromTop(game); + Card card = controller.getLibrary().getFromTop(game); if (card != null) { Cards cards = new CardsImpl(); cards.add(card); - player.lookAtCards("Explorer's Scope", cards, game); + controller.lookAtCards(sourceObject.getIdName(), cards, game); if (card.getCardType().contains(CardType.LAND)) { - String message = "Put " + card.getName() + " onto the battlefield tapped?"; - if (player.chooseUse(Outcome.PutLandInPlay, message, game)) { - if (card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId())) { - Permanent permanent = game.getPermanent(card.getId()); - if (permanent != null) { - permanent.setTapped(true); - } - } + String message = "Put " + card.getLogName() + " onto the battlefield tapped?"; + if (controller.chooseUse(Outcome.PutLandInPlay, message, game)) { + card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId(), true); } } } return true; } -} \ No newline at end of file +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ProvokeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ProvokeTest.java index b39949adc9..0200455ca2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ProvokeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ProvokeTest.java @@ -29,6 +29,9 @@ package org.mage.test.cards.abilities.keywords; import mage.constants.PhaseStep; import mage.constants.Zone; +import mage.game.permanent.Permanent; +import mage.game.permanent.PermanentToken; +import org.junit.Assert; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -89,5 +92,5 @@ public class ProvokeTest extends CardTestPlayerBase{ assertLife(playerA, 18); // one attack from Imp assertLife(playerB, 15); // Not blocked - } + } } diff --git a/Mage/src/mage/watchers/common/MiracleWatcher.java b/Mage/src/mage/watchers/common/MiracleWatcher.java index c2fd6a518e..847be13193 100644 --- a/Mage/src/mage/watchers/common/MiracleWatcher.java +++ b/Mage/src/mage/watchers/common/MiracleWatcher.java @@ -99,7 +99,7 @@ public class MiracleWatcher extends Watcher { Cards cards = new CardsImpl(); cards.add(card); controller.lookAtCards("Miracle", cards, game); - if (controller.chooseUse(Outcome.Benefit, "Reveal " + card.getName() + " to be able to use Miracle?", game)) { + if (controller.chooseUse(Outcome.Benefit, "Reveal " + card.getLogName() + " to be able to use Miracle?", game)) { controller.revealCards("Miracle", cards, game); game.fireEvent(GameEvent.getEvent(GameEvent.EventType.MIRACLE_CARD_REVEALED, card.getId(), card.getId(),controller.getId())); break; From d6037c6f6ccef14009fc5250f76cc040fa77866d Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 21 Jun 2015 23:56:42 +0200 Subject: [PATCH 21/42] * Carrion Call - Fixed that the created tokens had no infect. --- .../sets/scarsofmirrodin/CarrionCall.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java index b5df5712a3..6e230d5b0a 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CarrionCall.java @@ -29,11 +29,13 @@ package mage.sets.scarsofmirrodin; import java.util.UUID; +import mage.MageInt; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.InfectAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.game.permanent.token.InsectToken; +import mage.game.permanent.token.Token; /** * @@ -45,7 +47,8 @@ public class CarrionCall extends CardImpl { super(ownerId, 115, "Carrion Call", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{G}"); this.expansionSetCode = "SOM"; - this.getSpellAbility().addEffect(new CreateTokenEffect(new InsectToken("SOM"), 2)); + // Put two 1/1 green Insect creature tokens with infect onto the battlefield. (They deal damage to creatures in the form of -1/-1 counters and to players in the form of poison counters.) + this.getSpellAbility().addEffect(new CreateTokenEffect(new CarrionCallInsectToken(), 2)); } public CarrionCall (final CarrionCall card) { @@ -57,3 +60,19 @@ public class CarrionCall extends CardImpl { return new CarrionCall(this); } } + +class CarrionCallInsectToken extends Token { + + public CarrionCallInsectToken() { + super("Insect", "1/1 green Insect creature tokens with infect"); + setOriginalExpansionSetCode("SOM"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Insect"); + power = new MageInt(1); + toughness = new MageInt(1); + + addAbility(InfectAbility.getInstance()); + } +} + From 97f9e9222ce8deee70b1d02b2006baf1b9031a32 Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Mon, 22 Jun 2015 00:21:05 +0100 Subject: [PATCH 22/42] Added Amoeboid Changeling --- .../mage/sets/lorwyn/AmoeboidChangeling.java | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/lorwyn/AmoeboidChangeling.java diff --git a/Mage.Sets/src/mage/sets/lorwyn/AmoeboidChangeling.java b/Mage.Sets/src/mage/sets/lorwyn/AmoeboidChangeling.java new file mode 100644 index 0000000000..5141b2e47a --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/AmoeboidChangeling.java @@ -0,0 +1,83 @@ +/* + * 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.lorwyn; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.LoseAllCreatureTypesTargetEffect; +import mage.abilities.keyword.ChangelingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author EvilGeek + */ +public class AmoeboidChangeling extends CardImpl { + + public AmoeboidChangeling(UUID ownerId) { + super(ownerId, 51, "Amoeboid Changeling", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Shapeshifter"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Changeling + this.addAbility(ChangelingAbility.getInstance()); + + // {tap}: Target creature gains all creature types until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilityTargetEffect(ChangelingAbility.getInstance(), Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + + this.addAbility(ability); + + // {tap}: Target creature loses all creature types until end of turn. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseAllCreatureTypesTargetEffect(Duration.EndOfTurn), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + + this.addAbility(ability); + } + + public AmoeboidChangeling(final AmoeboidChangeling card) { + super(card); + } + + @Override + public AmoeboidChangeling copy() { + return new AmoeboidChangeling(this); + } +} From 18c7486c4a9711fadac0c224bfcdb8cf7f47ae4a Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Mon, 22 Jun 2015 00:47:51 +0100 Subject: [PATCH 23/42] Added Mind Peel --- .../src/mage/sets/stronghold/MindPeel.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/stronghold/MindPeel.java diff --git a/Mage.Sets/src/mage/sets/stronghold/MindPeel.java b/Mage.Sets/src/mage/sets/stronghold/MindPeel.java new file mode 100644 index 0000000000..b4bc105d2d --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/MindPeel.java @@ -0,0 +1,65 @@ +/* + * 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.stronghold; + +import java.util.UUID; + +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author EvilGeek + */ +public class MindPeel extends CardImpl { + + public MindPeel(UUID ownerId) { + super(ownerId, 13, "Mind Peel", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{B}"); + this.expansionSetCode = "STH"; + + // Buyback {2}{B}{B} + this.addAbility(new BuybackAbility("{2}{B}{B}")); + + // Target player discards a card. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new DiscardTargetEffect(1)); + } + + public MindPeel(final MindPeel card) { + super(card); + } + + @Override + public MindPeel copy() { + return new MindPeel(this); + } +} From 3828302505681ee44d97a7c17997be78eeceee02 Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Mon, 22 Jun 2015 01:01:45 +0100 Subject: [PATCH 24/42] Added Unhinge --- Mage.Sets/src/mage/sets/torment/Unhinge.java | 65 ++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/torment/Unhinge.java diff --git a/Mage.Sets/src/mage/sets/torment/Unhinge.java b/Mage.Sets/src/mage/sets/torment/Unhinge.java new file mode 100644 index 0000000000..b7ad8f64f0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/Unhinge.java @@ -0,0 +1,65 @@ +/* + * 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.torment; + +import java.util.UUID; + +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.TargetPlayer; + +/** + * + * @author EvilGeek + */ +public class Unhinge extends CardImpl { + + public Unhinge(UUID ownerId) { + super(ownerId, 87, "Unhinge", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}"); + this.expansionSetCode = "TOR"; + + // Target player discards a card. + this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().addEffect(new DiscardTargetEffect(1)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + } + + public Unhinge(final Unhinge card) { + super(card); + } + + @Override + public Unhinge copy() { + return new Unhinge(this); + } +} From 6259004a442cf083522a25a27634adb8a0d3bf1c Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Sun, 21 Jun 2015 18:19:28 -0400 Subject: [PATCH 25/42] Implemented Scion of the Ur-Dragon --- .../sets/timespiral/ScionOfTheUrDragon.java | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/timespiral/ScionOfTheUrDragon.java diff --git a/Mage.Sets/src/mage/sets/timespiral/ScionOfTheUrDragon.java b/Mage.Sets/src/mage/sets/timespiral/ScionOfTheUrDragon.java new file mode 100644 index 0000000000..3112e6b86b --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/ScionOfTheUrDragon.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.timespiral; + +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.SearchEffect; +import mage.abilities.effects.common.CopyEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterPermanentCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInLibrary; + +/** + * @author duncant + */ + +public class ScionOfTheUrDragon extends CardImpl { + + public ScionOfTheUrDragon(UUID ownerId) { + super(ownerId, 246, "Scion of the Ur-Dragon", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{W}{U}{B}{R}{G}"); + this.expansionSetCode = "TSP"; + this.supertype.add("Legendary"); + this.subtype.add("Dragon"); + this.subtype.add("Avatar"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + this.addAbility(FlyingAbility.getInstance()); + + // {2}: Search your library for a Dragon permanent card and put it into your graveyard. If you do, Scion of the Ur-Dragon becomes a copy of that card until end of turn. Then shuffle your library. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new ScionOfTheUrDragonEffect(), + new ManaCostsImpl("{2}"))); + } + + public ScionOfTheUrDragon(final ScionOfTheUrDragon card) { + super(card); + } + + @Override + public ScionOfTheUrDragon copy() { + return new ScionOfTheUrDragon(this); + } +} + +class ScionOfTheUrDragonEffect extends SearchEffect { + private static final FilterCard filter = new FilterPermanentCard("Dragon permanent card"); + + static { + filter.add(new SubtypePredicate("Dragon")); + } + + public ScionOfTheUrDragonEffect() { + super(new TargetCardInLibrary(filter), Outcome.Copy); + staticText = "Search your library for a Dragon permanent card and put it into your graveyard. If you do, Scion of the Ur-Dragon becomes a copy of that card until end of turn. Then shuffle your library."; + } + + ScionOfTheUrDragonEffect(final ScionOfTheUrDragonEffect effect) { + super(effect); + } + + @Override + public ScionOfTheUrDragonEffect copy() { + return new ScionOfTheUrDragonEffect(this); + } + + @Override + public boolean apply(Game game, Ability ability) { + Player player = game.getPlayer(ability.getControllerId()); + Permanent sourcePermanent = game.getPermanent(ability.getSourceId()); + if (player != null && sourcePermanent != null) { + if (player.searchLibrary(target, game)) { + for (UUID cardId : target.getTargets()) { + Card card = player.getLibrary().getCard(cardId, game); + if (card != null) { + player.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, ability, game); + CopyEffect copyEffect = new CopyEffect(Duration.EndOfTurn, card, ability.getSourceId()); + game.addEffect(copyEffect, ability); + } + } + } + player.shuffleLibrary(game); + return true; + } + return false; + } +} From 87ffebe4abfccd17b8b830358f810fee956c9985 Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Sun, 21 Jun 2015 18:22:48 -0400 Subject: [PATCH 26/42] Fixed Scourge of Valkas triggering on Dragons entering the battlefield under other player's control. --- Mage.Sets/src/mage/sets/magic2014/ScourgeOfValkas.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/magic2014/ScourgeOfValkas.java b/Mage.Sets/src/mage/sets/magic2014/ScourgeOfValkas.java index 509aebbab1..a164346158 100644 --- a/Mage.Sets/src/mage/sets/magic2014/ScourgeOfValkas.java +++ b/Mage.Sets/src/mage/sets/magic2014/ScourgeOfValkas.java @@ -30,7 +30,7 @@ package mage.sets.magic2014; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.dynamicvalue.DynamicValue; @@ -78,7 +78,7 @@ public class ScourgeOfValkas extends CardImpl { // Whenever Scourge of Valkas or another Dragon enters the battlefield under your control, it deals X damage to target creature or player, where X is the number of Dragons you control. DynamicValue dragons = new PermanentsOnBattlefieldCount(filter2); - Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(dragons), filter, false, rule); + Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(dragons), filter, false, rule); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); From 2c1ec664b70f0b5446a6b1dde496077e17c51f3f Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Sun, 21 Jun 2015 18:23:23 -0400 Subject: [PATCH 27/42] Implemented Patriarch's Bidding --- .../sets/onslaught/PatriarchsBidding.java | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/onslaught/PatriarchsBidding.java diff --git a/Mage.Sets/src/mage/sets/onslaught/PatriarchsBidding.java b/Mage.Sets/src/mage/sets/onslaught/PatriarchsBidding.java new file mode 100644 index 0000000000..e5a030662c --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/PatriarchsBidding.java @@ -0,0 +1,135 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.onslaught; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.repository.CardRepository; +import mage.choices.Choice; +import mage.choices.ChoiceImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * @author duncant + */ +public class PatriarchsBidding extends CardImpl { + + public PatriarchsBidding(UUID ownerId) { + super(ownerId, 161, "Patriarch's Bidding", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "ONS"; + + // Each player chooses a creature type. Each player returns all creature cards of a type chosen this way from his or her graveyard to the battlefield. + this.getSpellAbility().addEffect(new PatriarchsBiddingEffect()); + } + + public PatriarchsBidding(final PatriarchsBidding card) { + super(card); + } + + @Override + public PatriarchsBidding copy() { + return new PatriarchsBidding(this); + } +} + +class PatriarchsBiddingEffect extends OneShotEffect { + + public PatriarchsBiddingEffect() { + super(Outcome.PutCreatureInPlay); + this.staticText = "Each player chooses a creature type. Each player returns all creature cards of a type chosen this way from his or her graveyard to the battlefield."; + } + + public PatriarchsBiddingEffect(final PatriarchsBiddingEffect effect) { + super(effect); + } + + @Override + public PatriarchsBiddingEffect copy() { + return new PatriarchsBiddingEffect(this); + } + + @Override + public boolean apply(Game game, Ability ability) { + Player controller = game.getPlayer(ability.getControllerId()); + MageObject sourceObject = game.getObject(ability.getSourceId()); + if (controller != null) { + Set chosenTypes = new HashSet<>(); + for (UUID playerId : controller.getInRange()) { + Player player = game.getPlayer(playerId); + Choice typeChoice = new ChoiceImpl(true); + typeChoice.setMessage("Choose a creature type"); + typeChoice.setChoices(CardRepository.instance.getCreatureTypes()); + while (!player.choose(Outcome.PutCreatureInPlay, typeChoice, game)) { + if (!player.isInGame()) { + break; + } + } + String chosenType = typeChoice.getChoice(); + if (chosenType != null) { + game.informPlayers(sourceObject.getName() + ": " + player.getLogName() + " has chosen " + chosenType); + chosenTypes.add(chosenType); + } + } + + List predicates = new ArrayList<>(); + for (String type : chosenTypes) { + predicates.add(new SubtypePredicate(type)); + } + FilterCard filter = new FilterCreatureCard(); + filter.add(Predicates.or(predicates)); + + for (UUID playerId : controller.getInRange()) { + Player player = game.getPlayer(playerId); + if (player != null) { + for (Card card : player.getGraveyard().getCards(filter, game)) { + player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, ability.getSourceId()); + } + } + } + return true; + } + return false; + } +} From 38ff191a3930d86ffdbebd49f1d5a54fc8153354 Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Sun, 21 Jun 2015 18:56:07 -0400 Subject: [PATCH 28/42] Implemented Burgeoning --- .../src/mage/sets/stronghold/Burgeoning.java | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/stronghold/Burgeoning.java diff --git a/Mage.Sets/src/mage/sets/stronghold/Burgeoning.java b/Mage.Sets/src/mage/sets/stronghold/Burgeoning.java new file mode 100644 index 0000000000..2e005cfeb6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/Burgeoning.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.stronghold; + +import java.util.UUID; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.PutLandFromHandOntoBattlefieldEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.permanent.Permanent; + +/** + * @author duncant + */ +public class Burgeoning extends CardImpl { + + public Burgeoning(UUID ownerId) { + super(ownerId, 52, "Burgeoning", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "STH"; + + // Whenever an opponent plays a land, you may put a land card from your hand onto the battlefield. + this.addAbility(new BurgeoningTriggeredAbility()); + } + + public Burgeoning(final Burgeoning card) { + super(card); + } + + @Override + public Burgeoning copy() { + return new Burgeoning(this); + } +} + + +class BurgeoningTriggeredAbility extends TriggeredAbilityImpl { + BurgeoningTriggeredAbility() { + super(Zone.BATTLEFIELD, new PutLandFromHandOntoBattlefieldEffect()); + } + + BurgeoningTriggeredAbility(BurgeoningTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.LAND_PLAYED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent land = game.getPermanent(event.getTargetId()); + return game.getOpponents(controllerId).contains(land.getControllerId()); + } + + @Override + public BurgeoningTriggeredAbility copy() { + return new BurgeoningTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever an opponent plays a land, you may put a land card from your hand onto the battlefield."; + } +} From fb313be1b6973845ced0aa609ba2e0e3ba8ca90e Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Sun, 21 Jun 2015 19:47:29 -0400 Subject: [PATCH 29/42] Implemented Shapesharer --- .../src/mage/sets/lorwyn/Shapesharer.java | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/lorwyn/Shapesharer.java diff --git a/Mage.Sets/src/mage/sets/lorwyn/Shapesharer.java b/Mage.Sets/src/mage/sets/lorwyn/Shapesharer.java new file mode 100644 index 0000000000..8cd1d57057 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/Shapesharer.java @@ -0,0 +1,115 @@ +/* + * 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.lorwyn; + +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.OneShotEffect; +import mage.abilities.keyword.ChangelingAbility; +import mage.cards.CardImpl; +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.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.util.functions.EmptyApplyToPermanent; + + +/** + * @author duncant + */ +public class Shapesharer extends CardImpl { + + private static final FilterPermanent filterShapeshifter = new FilterPermanent("Shapeshifter"); + + static { + filterShapeshifter.add(new SubtypePredicate("Shapeshifter")); + } + + public Shapesharer(UUID ownerId) { + super(ownerId, 85, "Shapesharer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Shapeshifter"); + + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(ChangelingAbility.getInstance()); + + // {2}{U}: Target Shapeshifter becomes a copy of target creature until your next turn. + Ability copyAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new ShapesharerEffect(), + new ManaCostsImpl("{2}{U}")); + copyAbility.addTarget(new TargetPermanent(filterShapeshifter)); + copyAbility.addTarget(new TargetCreaturePermanent()); + this.addAbility(copyAbility); + } + + public Shapesharer(final Shapesharer card) { + super(card); + } + + @Override + public Shapesharer copy() { + return new Shapesharer(this); + } +} + +class ShapesharerEffect extends OneShotEffect { + public ShapesharerEffect() { + super(Outcome.Copy); + this.staticText = "Target Shapeshifter becomes a copy of target creature until your next turn."; + } + + public ShapesharerEffect(final ShapesharerEffect effect) { + super(effect); + } + + @Override + public ShapesharerEffect copy() { + return new ShapesharerEffect(this); + } + + @Override + public boolean apply(Game game, Ability ability) { + Permanent copyTo = game.getPermanent(ability.getFirstTarget()); + if (copyTo != null) { + Permanent copyFrom = game.getPermanentOrLKIBattlefield(ability.getTargets().get(1).getFirstTarget()); + game.copyPermanent(Duration.EndOfTurn, copyFrom, copyTo, ability, new EmptyApplyToPermanent()); + } + return true; + } +} From 16cadde43f91c4144b290fb7dc8c5037260d7f63 Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Sun, 21 Jun 2015 22:52:04 -0400 Subject: [PATCH 30/42] Fixed Ojutai, Soul of Winter's triggered ability being unable to target noncreature nonland permanents. --- .../sets/fatereforged/OjutaiSoulOfWinter.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/sets/fatereforged/OjutaiSoulOfWinter.java b/Mage.Sets/src/mage/sets/fatereforged/OjutaiSoulOfWinter.java index ee0b842c36..4649e5ed85 100644 --- a/Mage.Sets/src/mage/sets/fatereforged/OjutaiSoulOfWinter.java +++ b/Mage.Sets/src/mage/sets/fatereforged/OjutaiSoulOfWinter.java @@ -40,7 +40,9 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.SetTargetPointer; import mage.constants.TargetController; +import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; +import mage.filter.common.FilterNonlandPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.TargetPermanent; @@ -51,13 +53,13 @@ import mage.target.TargetPermanent; */ public class OjutaiSoulOfWinter extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Dragon you control"); - private static final FilterCreaturePermanent filterPermanent = new FilterCreaturePermanent("permanent an opponent controls"); + private static final FilterCreaturePermanent filterDragon = new FilterCreaturePermanent("Dragon you control"); + private static final FilterPermanent filterNonlandPermanent = new FilterNonlandPermanent("nonland permanent an opponent controls"); static { - filter.add(new SubtypePredicate("Dragon")); - filter.add(new ControllerPredicate(TargetController.YOU)); - filterPermanent.add(new ControllerPredicate(TargetController.OPPONENT)); + filterDragon.add(new SubtypePredicate("Dragon")); + filterDragon.add(new ControllerPredicate(TargetController.YOU)); + filterNonlandPermanent.add(new ControllerPredicate(TargetController.OPPONENT)); } public OjutaiSoulOfWinter(UUID ownerId) { @@ -75,9 +77,9 @@ public class OjutaiSoulOfWinter extends CardImpl { // Whenever a Dragon you control attacks, tap target nonland permanent an opponent controls. That permanent doesn't untap during its controller's next untap step. Ability ability = new AttacksAllTriggeredAbility( new TapTargetEffect(), - false, filter, SetTargetPointer.NONE, false); + false, filterDragon, SetTargetPointer.NONE, false); ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That permanent")); - ability.addTarget(new TargetPermanent(filterPermanent)); + ability.addTarget(new TargetPermanent(filterNonlandPermanent)); this.addAbility(ability); } From aa919bedda649d7aab9834b8337c0de46f510cc7 Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Mon, 22 Jun 2015 14:06:24 +0100 Subject: [PATCH 31/42] Added Bog-Strider Ash --- .../src/mage/sets/lorwyn/BogStriderAsh.java | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/lorwyn/BogStriderAsh.java diff --git a/Mage.Sets/src/mage/sets/lorwyn/BogStriderAsh.java b/Mage.Sets/src/mage/sets/lorwyn/BogStriderAsh.java new file mode 100644 index 0000000000..b6d5ee01e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/BogStriderAsh.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.lorwyn; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.SwampwalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author EvilGeek + */ +public class BogStriderAsh extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a Goblin spell"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + + public BogStriderAsh(UUID ownerId) { + super(ownerId, 198, "Bog-Strider Ash", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Treefolk"); + this.subtype.add("Shaman"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Swampwalk + this.addAbility(new SwampwalkAbility()); + + // Whenever a player casts a Goblin spell, you may pay {G}. If you do, you gain 2 life. + this.addAbility(new SpellCastAllTriggeredAbility(new DoIfCostPaid(new GainLifeEffect(2), new ManaCostsImpl("{G}")), filter, true)); + } + + public BogStriderAsh(final BogStriderAsh card) { + super(card); + } + + @Override + public BogStriderAsh copy() { + return new BogStriderAsh(this); + } +} From 78188d6f24b3cef63b693085211cde8fbd21eb38 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 22 Jun 2015 15:31:15 +0200 Subject: [PATCH 32/42] Removed dispay of card ID for looked at cards to prevent unfair use of card identity. --- Mage.Common/src/mage/view/LookedAtView.java | 2 +- .../src/test/java/org/mage/test/player/TestPlayer.java | 7 ++++++- Mage/src/mage/game/LookedAt.java | 7 ++++--- Mage/src/mage/players/Player.java | 2 ++ Mage/src/mage/players/PlayerImpl.java | 6 ++++++ 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Mage.Common/src/mage/view/LookedAtView.java b/Mage.Common/src/mage/view/LookedAtView.java index db1759c0c0..a7485e7120 100644 --- a/Mage.Common/src/mage/view/LookedAtView.java +++ b/Mage.Common/src/mage/view/LookedAtView.java @@ -46,7 +46,7 @@ public class LookedAtView implements Serializable { public LookedAtView(String name, Cards cards, Game game) { this.name = name; for (Card card: cards.getCards(game)) { - this.cards.put(card.getId(), new CardView(card, game, card.getId())); + this.cards.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode())); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index be7c65487a..6de99aff26 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -1127,7 +1127,12 @@ public class TestPlayer implements Player { public void lookAtCards(String name, Cards cards, Game game) { computerPlayer.lookAtCards(name, cards, game); } - + + @Override + public void lookAtCards(String name, Card card, Game game) { + computerPlayer.lookAtCards(name, card, game); + } + @Override public void phasing(Game game) { computerPlayer.phasing(game); diff --git a/Mage/src/mage/game/LookedAt.java b/Mage/src/mage/game/LookedAt.java index 17b8af9b8a..501cb34c70 100644 --- a/Mage/src/mage/game/LookedAt.java +++ b/Mage/src/mage/game/LookedAt.java @@ -52,13 +52,14 @@ public class LookedAt extends HashMap implements Serializable, Co } } - public void add(String name, Card card) { - this.get(name).add(card); + public void add(String name, Card card) { + this.createLookedAt(name).add(card); } public void add(String name, Cards cards) { - if (!this.containsKey(name)) + if (!this.containsKey(name)) { createLookedAt(name); + } this.put(name, cards.copy()); } diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index c2f4a016ac..c369e8f045 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -293,6 +293,7 @@ public interface Player extends MageItem, Copyable { void revealCards(String name, Cards cards, Game game); void revealCards(String name, Cards cards, Game game, boolean postToLog); + void lookAtCards(String name, Card card, Game game); void lookAtCards(String name, Cards cards, Game game); @Override @@ -488,6 +489,7 @@ public interface Player extends MageItem, Copyable { * @param sourceId * @param game * @param fromZone if null, this info isn't postet + * @param withName * @return */ boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone, boolean withName); diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 65228de1e6..fe29574f39 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -1332,6 +1332,12 @@ public abstract class PlayerImpl implements Player, Serializable { } } + @Override + public void lookAtCards(String name, Card card, Game game) { + game.getState().getLookedAt(this.playerId).add(name, card); + game.fireUpdatePlayersEvent(); + } + @Override public void lookAtCards(String name, Cards cards, Game game) { game.getState().getLookedAt(this.playerId).add(name, cards); From 6fa1f4c2e05bbb8c7a53156236300814a93afe95 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 22 Jun 2015 15:32:00 +0200 Subject: [PATCH 33/42] Hideaway - Some minor fixes. --- .../sets/commander2013/MosswortBridge.java | 2 +- .../src/mage/sets/lorwyn/HowltoothHollow.java | 2 +- .../src/mage/sets/lorwyn/ShelldockIsle.java | 2 +- .../src/mage/sets/lorwyn/SpinerockKnoll.java | 2 +- .../mage/sets/lorwyn/WindbriskHeights.java | 2 +- .../effects/ReplacementEffectImpl.java | 1 - .../effects/common/HideawayPlayEffect.java | 4 +- .../abilities/keyword/HideawayAbility.java | 76 +++++++------------ 8 files changed, 35 insertions(+), 56 deletions(-) diff --git a/Mage.Sets/src/mage/sets/commander2013/MosswortBridge.java b/Mage.Sets/src/mage/sets/commander2013/MosswortBridge.java index 7b06549eec..67a79cfed7 100644 --- a/Mage.Sets/src/mage/sets/commander2013/MosswortBridge.java +++ b/Mage.Sets/src/mage/sets/commander2013/MosswortBridge.java @@ -55,7 +55,7 @@ public class MosswortBridge extends CardImpl { this.expansionSetCode = "C13"; // Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.) - this.addAbility(new HideawayAbility(this)); + this.addAbility(new HideawayAbility()); // {tap}: Add {G} to your mana pool. this.addAbility(new GreenManaAbility()); diff --git a/Mage.Sets/src/mage/sets/lorwyn/HowltoothHollow.java b/Mage.Sets/src/mage/sets/lorwyn/HowltoothHollow.java index 94b1f779ed..81a296af4c 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/HowltoothHollow.java +++ b/Mage.Sets/src/mage/sets/lorwyn/HowltoothHollow.java @@ -53,7 +53,7 @@ public class HowltoothHollow extends CardImpl { this.expansionSetCode = "LRW"; // Hideaway - this.addAbility(new HideawayAbility(this)); + this.addAbility(new HideawayAbility()); // {tap}: Add {B} to your mana pool. this.addAbility(new BlackManaAbility()); diff --git a/Mage.Sets/src/mage/sets/lorwyn/ShelldockIsle.java b/Mage.Sets/src/mage/sets/lorwyn/ShelldockIsle.java index cb3936feca..38128358b2 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/ShelldockIsle.java +++ b/Mage.Sets/src/mage/sets/lorwyn/ShelldockIsle.java @@ -53,7 +53,7 @@ public class ShelldockIsle extends CardImpl { this.expansionSetCode = "LRW"; // Hideaway - this.addAbility(new HideawayAbility(this)); + this.addAbility(new HideawayAbility()); // {tap}: Add {U} to your mana pool. this.addAbility(new BlueManaAbility()); // {U}, {tap}: You may play the exiled card without paying its mana cost if a library has twenty or fewer cards in it. diff --git a/Mage.Sets/src/mage/sets/lorwyn/SpinerockKnoll.java b/Mage.Sets/src/mage/sets/lorwyn/SpinerockKnoll.java index b457916279..f7a2d91975 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/SpinerockKnoll.java +++ b/Mage.Sets/src/mage/sets/lorwyn/SpinerockKnoll.java @@ -61,7 +61,7 @@ public class SpinerockKnoll extends CardImpl { this.expansionSetCode = "LRW"; // Hideaway - this.addAbility(new HideawayAbility(this)); + this.addAbility(new HideawayAbility()); // {tap}: Add {R} to your mana pool. this.addAbility(new RedManaAbility()); diff --git a/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java b/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java index da4e1a83b5..3fa54c3295 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java +++ b/Mage.Sets/src/mage/sets/lorwyn/WindbriskHeights.java @@ -54,7 +54,7 @@ public class WindbriskHeights extends CardImpl { this.expansionSetCode = "LRW"; // Hideaway (This land enters the battlefield tapped. When it does, look at the top four cards of your library, exile one face down, then put the rest on the bottom of your library.) - this.addAbility(new HideawayAbility(this)); + this.addAbility(new HideawayAbility()); // {tap}: Add {W} to your mana pool. this.addAbility(new WhiteManaAbility()); // {W}, {tap}: You may play the exiled card without paying its mana cost if you attacked with three or more creatures this turn. diff --git a/Mage/src/mage/abilities/effects/ReplacementEffectImpl.java b/Mage/src/mage/abilities/effects/ReplacementEffectImpl.java index 48b96a68be..a0c2208381 100644 --- a/Mage/src/mage/abilities/effects/ReplacementEffectImpl.java +++ b/Mage/src/mage/abilities/effects/ReplacementEffectImpl.java @@ -33,7 +33,6 @@ import mage.constants.Duration; import mage.constants.EffectType; import mage.constants.Outcome; import mage.game.Game; -import mage.game.events.GameEvent; /** * diff --git a/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java b/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java index 039ce418f7..63358fb60c 100644 --- a/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java +++ b/Mage/src/mage/abilities/effects/common/HideawayPlayEffect.java @@ -70,7 +70,7 @@ public class HideawayPlayEffect extends OneShotEffect { if (card.getCardType().contains(CardType.LAND)) { // If the revealed card is a land, you can play it only if it's your turn and you haven't yet played a land this turn. if (game.getActivePlayerId().equals(source.getControllerId()) && controller.canPlayLand()) { - if (controller.chooseUse(Outcome.Benefit, new StringBuilder("Play ").append(card.getName()).append(" from Exile?").toString(), game)) { + if (controller.chooseUse(Outcome.Benefit, "Play " + card.getLogName() + " from Exile?", game)) { card.setFaceDown(false, game); return controller.playLand(card, game); } @@ -82,7 +82,7 @@ public class HideawayPlayEffect extends OneShotEffect { // The land's last ability allows you to play the removed card as part of the resolution of that ability. // Timing restrictions based on the card's type are ignored (for instance, if it's a creature or sorcery). // Other play restrictions are not (such as "Play [this card] only during combat"). - if (controller.chooseUse(Outcome.Benefit, new StringBuilder("Cast ").append(card.getName()).append(" without paying it's mana cost?").toString(), game)) { + if (controller.chooseUse(Outcome.Benefit, "Cast "+ card.getLogName() + " without paying it's mana cost?", game)) { card.setFaceDown(false, game); return controller.cast(card.getSpellAbility(), game, true); } diff --git a/Mage/src/mage/abilities/keyword/HideawayAbility.java b/Mage/src/mage/abilities/keyword/HideawayAbility.java index b59172bccf..124e7eec05 100644 --- a/Mage/src/mage/abilities/keyword/HideawayAbility.java +++ b/Mage/src/mage/abilities/keyword/HideawayAbility.java @@ -64,7 +64,7 @@ import mage.util.CardUtil; */ public class HideawayAbility extends StaticAbility { - public HideawayAbility(Card card) { + public HideawayAbility() { super(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new TapSourceEffect(true))); Ability ability = new EntersBattlefieldTriggeredAbility(new HideawayExileEffect(), false); ability.setRuleVisible(false); @@ -93,7 +93,6 @@ public class HideawayAbility extends StaticAbility { class HideawayExileEffect extends OneShotEffect { private static FilterCard filter1 = new FilterCard("card to exile face down"); - private static FilterCard filter2 = new FilterCard("card to put on the bottom of your library"); public HideawayExileEffect() { super(Outcome.Benefit); @@ -111,46 +110,26 @@ class HideawayExileEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - Cards cards = new CardsImpl(Zone.PICK); - int count = Math.min(player.getLibrary().size(), 4); - for (int i = 0; i < count; i++) { - Card card = player.getLibrary().removeFromTop(game); - cards.add(card); - game.setZone(card.getId(), Zone.PICK); - } - + Player controller = game.getPlayer(source.getControllerId()); Permanent hideawaySource = game.getPermanent(source.getSourceId()); - if (cards.size() == 0 || hideawaySource == null) { + if (hideawaySource == null || controller == null) { return false; } - - TargetCard target1 = new TargetCard(Zone.PICK, filter1); - if (player.choose(Outcome.Detriment, cards, target1, game)) { - Card card = cards.get(target1.getFirstTarget(), game); - if (card != null) { - cards.remove(card); - card.moveToExile(CardUtil.getCardExileZoneId(game, source), - new StringBuilder("Hideaway (").append(hideawaySource.getName()).append(")").toString(), - source.getSourceId(), game); - card.setFaceDown(true, game); - } - target1.clearChosen(); - } - + + Cards cards = new CardsImpl(Zone.LIBRARY); + cards.addAll(controller.getLibrary().getTopCards(game, 4)); if (cards.size() > 0) { - TargetCard target2 = new TargetCard(Zone.PICK, filter2); - while (player.isInGame() && cards.size() > 1) { - player.choose(Outcome.Benefit, cards, target2, game); - Card card = cards.get(target2.getFirstTarget(), game); + TargetCard target1 = new TargetCard(Zone.LIBRARY, filter1); + if (controller.choose(Outcome.Detriment, cards, target1, game)) { + Card card = cards.get(target1.getFirstTarget(), game); if (card != null) { cards.remove(card); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); + controller.moveCardToExileWithInfo(card, CardUtil.getCardExileZoneId(game, source), + "Hideaway (" + hideawaySource.getIdName() +")", source.getSourceId(), game, Zone.LIBRARY, false); + card.setFaceDown(true, game); } - target2.clearChosen(); } - Card card = cards.get(cards.iterator().next(), game); - card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false); + controller.putCardsOnBottomOfLibrary(cards, game, source, true); } return true; @@ -179,24 +158,25 @@ class HideawayLookAtFaceDownCardEffect extends AsThoughEffectImpl { } @Override - public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { - Card card = game.getCard(sourceId); - if (card != null && game.getState().getZone(sourceId) == Zone.EXILED) { - Card sourceCard = game.getCard(source.getSourceId()); - if (sourceCard == null) { - return false; - } - + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + if (game.getState().getZone(objectId) != Zone.EXILED + || !game.getState().getCardState(objectId).isFaceDown()) { + return false; + } + // TODO: Does not handle if a player had the control of the land permanent some time before + // we would need to add a watcher to handle this + Permanent sourcePermanet = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (sourcePermanet != null && sourcePermanet.getControllerId().equals(affectedControllerId)) { ExileZone exile = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); - if (exile != null && exile.contains(sourceId)) { - Cards cards = new CardsImpl(card); - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - // only the controller can see the card, so return always false - controller.lookAtCards("Exiled with " + sourceCard.getName(), cards, game); + Card card = game.getCard(objectId); + if (exile != null && exile.contains(objectId) && card != null) { + Player player = game.getPlayer(affectedControllerId); + if (player != null) { + player.lookAtCards("Hideaway by " + sourcePermanet.getIdName(), card, game); } } } + // only the current or a previous controller can see the card, so always return false for reveal request return false; } } From ebeec78c7fcbf855ee85241bbccffe07fa2341be Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 22 Jun 2015 15:32:14 +0200 Subject: [PATCH 34/42] Added some tests. --- .../sets/magic2015/GoblinRabblemaster.java | 1 - .../requirement/AttackRequirementTest.java | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/requirement/AttackRequirementTest.java diff --git a/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java b/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java index 98442e2a75..9d23e6719a 100644 --- a/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java +++ b/Mage.Sets/src/mage/sets/magic2015/GoblinRabblemaster.java @@ -46,7 +46,6 @@ import mage.constants.Rarity; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.ControllerPredicate; diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/requirement/AttackRequirementTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/requirement/AttackRequirementTest.java new file mode 100644 index 0000000000..6fcfd8a443 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/requirement/AttackRequirementTest.java @@ -0,0 +1,91 @@ +/* + * 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 org.mage.test.cards.requirement; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ + +public class AttackRequirementTest extends CardTestPlayerBase { + + + @Test + public void testSimpleAttackRequirement() { + // Defender + // {G}: Wall of Tanglecord gains reach until end of turn. (It can block creatures with flying.) + addCard(Zone.BATTLEFIELD, playerA, "Wall of Tanglecord"); // 0/6 + + // Juggernaut attacks each turn if able. + // Juggernaut can't be blocked by Walls + addCard(Zone.BATTLEFIELD, playerB, "Juggernaut"); // 5/3 + + // Juggernaut should be forced to ttack + block(2, playerA, "Wall of Tanglecord", "Juggernaut"); // this block should'nt work because of Juggernauts restriction + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, 15); + assertLife(playerB, 20); + + } + + + @Test + public void testAttackRequirementWithAttackRestriction() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 3); + // Defender + // {G}: Wall of Tanglecord gains reach until end of turn. (It can block creatures with flying.) + addCard(Zone.BATTLEFIELD, playerA, "Wall of Tanglecord"); // 0/6 + + // Creatures can't attack you unless their controller pays {2} for each creature he or she controls that's attacking you + addCard(Zone.HAND, playerA, "Ghostly Prison"); + + // Juggernaut attacks each turn if able. + // Juggernaut can't be blocked by Walls + addCard(Zone.BATTLEFIELD, playerB, "Juggernaut"); // 5/3 + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ghostly Prison"); + + // Juggernaut is forced to attack but can't without paying the Ghostly Prison cost and don't has to pay the costs so no attack + + setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, 20); + assertLife(playerB, 20); + + } + +} From 314681837414ffb25fb2c782ab8b705dc444f5e3 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 22 Jun 2015 19:32:07 +0200 Subject: [PATCH 35/42] * Fixed possible null pointer exception of ReturnToLibrarySpellEffect.. --- .../effects/common/ReturnToLibrarySpellEffect.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java b/Mage/src/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java index 35e3292023..bc8af09cfe 100644 --- a/Mage/src/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java +++ b/Mage/src/mage/abilities/effects/common/ReturnToLibrarySpellEffect.java @@ -33,6 +33,7 @@ import mage.cards.Card; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; +import mage.game.stack.Spell; import mage.players.Player; /** @@ -58,9 +59,12 @@ public class ReturnToLibrarySpellEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard(); - if (spellCard != null) { - controller.moveCardToLibraryWithInfo(spellCard, source.getSourceId(), game, Zone.STACK, toTop, true); + Spell spell = game.getStack().getSpell(source.getSourceId()); + if (spell != null) { + Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard(); + if (spellCard != null) { + controller.moveCardToLibraryWithInfo(spellCard, source.getSourceId(), game, Zone.STACK, toTop, true); + } } return true; } From bcd81309e981c5c717551de4b3ee57e2dd6e9fff Mon Sep 17 00:00:00 2001 From: emerald000 Date: Mon, 22 Jun 2015 14:21:29 -0400 Subject: [PATCH 36/42] Added Dwynen Gilt-Leaf Daen and Elemental Bond. --- .../sets/magicorigins/DwynenGiltLeafDaen.java | 85 +++++++++++++++++++ .../mage/sets/magicorigins/ElementalBond.java | 68 +++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/magicorigins/DwynenGiltLeafDaen.java create mode 100644 Mage.Sets/src/mage/sets/magicorigins/ElementalBond.java diff --git a/Mage.Sets/src/mage/sets/magicorigins/DwynenGiltLeafDaen.java b/Mage.Sets/src/mage/sets/magicorigins/DwynenGiltLeafDaen.java new file mode 100644 index 0000000000..6dbf311ece --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/DwynenGiltLeafDaen.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.magicorigins; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.ReachAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; + +/** + * + * @author emerald000 + */ +public class DwynenGiltLeafDaen extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Elf", "attacking Elf you control"); + static { + filter.add(new AttackingPredicate()); + } + + public DwynenGiltLeafDaen(UUID ownerId) { + super(ownerId, 172, "Dwynen, Gilt-Leaf Daen", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + this.expansionSetCode = "ORI"; + this.supertype.add("Legendary"); + this.subtype.add("Elf"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // Reach + this.addAbility(ReachAbility.getInstance()); + + // Other Elf creatures you control get +1/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, new FilterCreaturePermanent("Elf", "Elf creatures"), true))); + + // Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control. + this.addAbility(new AttacksTriggeredAbility(new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)), false)); + } + + public DwynenGiltLeafDaen(final DwynenGiltLeafDaen card) { + super(card); + } + + @Override + public DwynenGiltLeafDaen copy() { + return new DwynenGiltLeafDaen(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magicorigins/ElementalBond.java b/Mage.Sets/src/mage/sets/magicorigins/ElementalBond.java new file mode 100644 index 0000000000..4c0b67a0c3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/magicorigins/ElementalBond.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.magicorigins; + +import java.util.UUID; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.Filter.ComparisonType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +/** + * + * @author emerald000 + */ +public class ElementalBond extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("creature with power 3 or greater"); + static { + filter.add(new PowerPredicate(ComparisonType.GreaterThan, 2)); + } + + public ElementalBond(UUID ownerId) { + super(ownerId, 174, "Elemental Bond", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + this.expansionSetCode = "ORI"; + + // Whenever a creature with power 3 or greater enters the battlefield under your control, draw a card. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter)); + } + + public ElementalBond(final ElementalBond card) { + super(card); + } + + @Override + public ElementalBond copy() { + return new ElementalBond(this); + } +} From 259ef3aed563e168c812056098113eaf937bdaf0 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 22 Jun 2015 21:02:07 +0200 Subject: [PATCH 37/42] * Kicker - Fixed that multikicker activation number was not reset after canceled cast. --- Mage/src/mage/abilities/keyword/KickerAbility.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/abilities/keyword/KickerAbility.java b/Mage/src/mage/abilities/keyword/KickerAbility.java index 6828e26a06..ada8a8248f 100644 --- a/Mage/src/mage/abilities/keyword/KickerAbility.java +++ b/Mage/src/mage/abilities/keyword/KickerAbility.java @@ -141,7 +141,9 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo return kickerCost; } - public void resetKicker() { + public void resetKicker(Game game, Ability source) { + String key = getActivationKey(source, "", game); + activations.remove(key); for (OptionalAdditionalCost cost: kickerCosts) { cost.reset(); } @@ -196,13 +198,13 @@ public class KickerAbility extends StaticAbility implements OptionalAdditionalSo if (ability instanceof SpellAbility) { Player player = game.getPlayer(controllerId); if (player != null) { - this.resetKicker(); + this.resetKicker(game, ability); for (OptionalAdditionalCost kickerCost: kickerCosts) { boolean again = true; while (player.isInGame() && again) { String times = ""; if (kickerCost.isRepeatable()) { - int activatedCount = kickerCost.getActivateCount(); + int activatedCount = getKickedCounter(game, ability); times = Integer.toString(activatedCount + 1) + (activatedCount == 0 ? " time ":" times "); } if (kickerCost.canPay(ability, sourceId, controllerId, game) && From 85524b0a4b8fbb349eb51e5268ceba065b14d7b0 Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Mon, 22 Jun 2015 21:05:32 +0100 Subject: [PATCH 38/42] Added Urborg Elf --- .../src/mage/sets/apocalypse/UrborgElf.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/apocalypse/UrborgElf.java diff --git a/Mage.Sets/src/mage/sets/apocalypse/UrborgElf.java b/Mage.Sets/src/mage/sets/apocalypse/UrborgElf.java new file mode 100644 index 0000000000..147e44e996 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/UrborgElf.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.apocalypse; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.mana.BlackManaAbility; +import mage.abilities.mana.BlueManaAbility; +import mage.abilities.mana.GreenManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author EvilGeek + */ +public class UrborgElf extends CardImpl { + + public UrborgElf(UUID ownerId) { + super(ownerId, 90, "Urborg Elf", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "APC"; + this.subtype.add("Elf"); + this.subtype.add("Druid"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Add {G}, {U}, or {B} to your mana pool. + this.addAbility(new GreenManaAbility()); + this.addAbility(new BlueManaAbility()); + this.addAbility(new BlackManaAbility()); + } + + public UrborgElf(final UrborgElf card) { + super(card); + } + + @Override + public UrborgElf copy() { + return new UrborgElf(this); + } +} From 67e9ee1fa91ed240b0d9a845d921e3281e5dc190 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 23 Jun 2015 00:46:27 +0200 Subject: [PATCH 39/42] * Changed graveyard window handling to a window that can stay open. --- .../main/java/mage/client/cards/Cards.java | 27 ++++-- .../components/ext/dlg/DialogManager.java | 2 +- .../client/dialog/CardInfoWindowDialog.form | 2 +- .../client/dialog/CardInfoWindowDialog.java | 93 ++++++++----------- .../main/java/mage/client/game/GamePanel.java | 36 +++++++ .../java/mage/client/game/HelperPanel.java | 2 +- .../java/mage/client/game/PlayerPanelExt.java | 39 +++++--- 7 files changed, 120 insertions(+), 81 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/cards/Cards.java b/Mage.Client/src/main/java/mage/client/cards/Cards.java index 3360df1160..c6ee605bbb 100644 --- a/Mage.Client/src/main/java/mage/client/cards/Cards.java +++ b/Mage.Client/src/main/java/mage/client/cards/Cards.java @@ -34,20 +34,31 @@ package mage.client.cards; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; import mage.cards.MageCard; import mage.client.plugins.impl.Plugins; import mage.client.util.CardsViewUtil; import mage.client.util.Config; -import mage.view.*; +import mage.view.CardView; +import mage.view.CardsView; +import mage.view.PermanentView; +import mage.view.SimpleCardsView; +import mage.view.StackAbilityView; import org.apache.log4j.Logger; import org.mage.card.arcane.CardPanel; -import javax.swing.border.Border; -import javax.swing.border.EmptyBorder; -import java.awt.*; -import java.util.*; -import java.util.Map.Entry; - /** * * @author BetaSteward_at_googlemail.com @@ -58,7 +69,7 @@ public class Cards extends javax.swing.JPanel { private final Map cards = new LinkedHashMap<>(); private boolean dontDisplayTapped = false; - private static final int GAP_X = 5; + private static final int GAP_X = 0; private String zone; private static final Border emptyBorder = new EmptyBorder(0,0,0,0); diff --git a/Mage.Client/src/main/java/mage/client/components/ext/dlg/DialogManager.java b/Mage.Client/src/main/java/mage/client/components/ext/dlg/DialogManager.java index 66db7ad4c3..2c9dc93239 100644 --- a/Mage.Client/src/main/java/mage/client/components/ext/dlg/DialogManager.java +++ b/Mage.Client/src/main/java/mage/client/components/ext/dlg/DialogManager.java @@ -20,7 +20,7 @@ import java.util.UUID; public class DialogManager extends JComponent implements MouseListener, MouseMotionListener { - private final static Map dialogManagers = new HashMap(); + private final static Map dialogManagers = new HashMap<>(); public static DialogManager getManager(UUID gameId) { if (!dialogManagers.containsKey(gameId)) { diff --git a/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.form b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.form index df7949b8fc..caf3d65750 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.form +++ b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.form @@ -23,7 +23,7 @@ - + diff --git a/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java index 67e8fa7401..18d3cbdc59 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/CardInfoWindowDialog.java @@ -34,16 +34,19 @@ package mage.client.dialog; +import static com.sun.java.accessibility.util.AWTEventMonitor.addWindowListener; import java.awt.Point; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import java.beans.PropertyVetoException; import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.ImageIcon; import javax.swing.SwingUtilities; -import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE; import mage.client.cards.BigCard; import mage.client.util.Config; +import mage.client.util.ImageHelper; import mage.client.util.SettingsManager; import mage.client.util.gui.GuiDisplayUtil; import mage.view.CardsView; @@ -57,17 +60,19 @@ import org.mage.plugins.card.utils.impl.ImageManagerImpl; */ public class CardInfoWindowDialog extends MageDialog { - public static enum ShowType { REVEAL, LOOKED_AT, EXILE, OTHER }; + public static enum ShowType { REVEAL, LOOKED_AT, EXILE, GRAVEYARD, OTHER }; private ShowType showType; private boolean positioned; + private String name; public CardInfoWindowDialog(ShowType showType, String name) { + this.name = name; this.title = name; this.showType = showType; this.positioned = false; - this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); initComponents(); + this.setModal(false); switch(this.showType) { case LOOKED_AT: @@ -78,6 +83,18 @@ public class CardInfoWindowDialog extends MageDialog { this.setFrameIcon(new ImageIcon(ImageManagerImpl.getInstance().getRevealedImage())); this.setClosable(true); break; + case GRAVEYARD: + this.setFrameIcon(new ImageIcon(ImageHelper.getImageFromResources("/info/grave.png"))); + this.setIconifiable(false); + this.setClosable(true); + this.setDefaultCloseOperation(HIDE_ON_CLOSE); + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + CardInfoWindowDialog.this.hideDialog(); + } + }); + break; case EXILE: this.setFrameIcon(new ImageIcon(ImageManagerImpl.getInstance().getExileImage())); break; @@ -92,72 +109,38 @@ public class CardInfoWindowDialog extends MageDialog { } public void loadCards(SimpleCardsView showCards, BigCard bigCard, UUID gameId) { - - boolean changed = cards.loadCards(showCards, bigCard, gameId); - if (showCards.size() > 0) { - show(); - if (changed) { - try { - if (!positioned) { - this.setIcon(false); - firstWindowPosition(); - } - } catch (PropertyVetoException ex) { - Logger.getLogger(CardInfoWindowDialog.class.getName()).log(Level.SEVERE, null, ex); - } - } - } - else { - this.hideDialog(); - } + cards.loadCards(showCards, bigCard, gameId); + showAndPositionWindow(); } public void loadCards(CardsView showCards, BigCard bigCard, UUID gameId) { - boolean changed = cards.loadCards(showCards, bigCard, gameId, null); - - if (showCards.size() > 0) { - show(); - if (changed) { - try { - if (!positioned) { - this.setIcon(false); - firstWindowPosition(); - } else { - - } - } catch (PropertyVetoException ex) { - Logger.getLogger(CardInfoWindowDialog.class.getName()).log(Level.SEVERE, null, ex); - } - } - + cards.loadCards(showCards, bigCard, gameId, null); + if (showType.equals(ShowType.GRAVEYARD)) { + setTitle(name + "'s Graveyard (" + showCards.size() + ")"); + this.setTitelBarToolTip(name); } - else { - this.hideDialog(); - } + showAndPositionWindow(); } - private void firstWindowPosition() { + private void showAndPositionWindow() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - if (!positioned) { - int width = CardInfoWindowDialog.this.getWidth(); - int height = CardInfoWindowDialog.this.getHeight(); - if (width > 0 && height > 0) { + int width = CardInfoWindowDialog.this.getWidth(); + int height = CardInfoWindowDialog.this.getHeight(); + if (width > 0 && height > 0) { + Point centered = SettingsManager.getInstance().getComponentPosition(width, height); + if (!positioned) { positioned = true; - Point centered = SettingsManager.getInstance().getComponentPosition(width, height); int xPos = centered.x / 2; int yPos = centered.y / 2; CardInfoWindowDialog.this.setLocation(xPos, yPos); - GuiDisplayUtil.keepComponentInsideScreen(centered.x, centered.y, CardInfoWindowDialog.this); - CardInfoWindowDialog.this.show(); - } + show(); + } + GuiDisplayUtil.keepComponentInsideScreen(centered.x, centered.y, CardInfoWindowDialog.this); } - - - // ShowCardsDialog.this.setVisible(true); } - }); + }); } public void loadCards(ExileView exile, BigCard bigCard, UUID gameId) { @@ -197,7 +180,7 @@ public class CardInfoWindowDialog extends MageDialog { getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cards, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 418, Short.MAX_VALUE) + .addComponent(cards, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index 6837a7ed6e..43af41bc1d 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -148,6 +148,8 @@ public final class GamePanel extends javax.swing.JPanel { private final Map exiles = new HashMap<>(); private final Map revealed = new HashMap<>(); private final Map lookedAt = new HashMap<>(); + private final Map graveyardWindows = new HashMap<>(); + private final Map graveyards = new HashMap<>(); private final ArrayList pickTarget = new ArrayList<>(); private UUID gameId; private UUID playerId; // playerId of the player @@ -261,6 +263,10 @@ public final class GamePanel extends javax.swing.JPanel { exileDialog.cleanUp(); exileDialog.removeDialog(); } + for (CardInfoWindowDialog graveyardDialog: graveyardWindows.values()) { + graveyardDialog.cleanUp(); + graveyardDialog.removeDialog(); + } for (CardInfoWindowDialog revealDialog: revealed.values()) { revealDialog.cleanUp(); revealDialog.removeDialog(); @@ -650,6 +656,17 @@ public final class GamePanel extends javax.swing.JPanel { if (player.getPlayerId().equals(playerId)) { updateSkipButtons(player.isPassedTurn(), player.isPassedUntilEndOfTurn(), player.isPassedUntilNextMain(), player.isPassedAllTurns(), player.isPassedUntilStackResolved()); } + // update open or remove closed graveyard windows + + graveyards.put(player.getName(), player.getGraveyard()); + if (graveyardWindows.containsKey(player.getName())) { + CardInfoWindowDialog cardInfoWindowDialog = graveyardWindows.get(player.getName()); + if (cardInfoWindowDialog.isClosed()) { + graveyardWindows.remove(player.getName()); + } else { + cardInfoWindowDialog.loadCards(player.getGraveyard(), bigCard, gameId); + } + } } else { logger.warn("Couldn't find player."); logger.warn(" uuid:" + player.getPlayerId()); @@ -691,6 +708,7 @@ public final class GamePanel extends javax.swing.JPanel { } exiles.get(exile.getId()).loadCards(exile, bigCard, gameId); } + showRevealed(game); showLookedAt(game); if (game.getCombat().size() > 0) { @@ -808,6 +826,24 @@ public final class GamePanel extends javax.swing.JPanel { } } + public void openGraveyardWindow(String playerName) { + if(graveyardWindows.containsKey(playerName)) { + CardInfoWindowDialog cardInfoWindowDialog = graveyardWindows.get(playerName); + if (cardInfoWindowDialog.isVisible()) { + cardInfoWindowDialog.hideDialog(); + } else { + cardInfoWindowDialog.show(); + } +// if (!cardInfoWindowDialog.isClosed()) { + return; +// } + } + CardInfoWindowDialog newGraveyard = new CardInfoWindowDialog(ShowType.GRAVEYARD, playerName); + graveyardWindows.put(playerName, newGraveyard); + MageFrame.getDesktop().add(newGraveyard, JLayeredPane.MODAL_LAYER); + newGraveyard.loadCards(graveyards.get(playerName), bigCard, gameId); + } + private void showRevealed(GameView game) { for (RevealedView revealView: game.getRevealed()) { handleGameInfoWindow(revealed, ShowType.REVEAL, revealView.getName(), revealView.getCards()); diff --git a/Mage.Client/src/main/java/mage/client/game/HelperPanel.java b/Mage.Client/src/main/java/mage/client/game/HelperPanel.java index 5f325d1f98..602e94b6b1 100644 --- a/Mage.Client/src/main/java/mage/client/game/HelperPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/HelperPanel.java @@ -226,7 +226,7 @@ public class HelperPanel extends JPanel { if (message.length() < this.getWidth() / 10) { message = getSmallText(message); } else { - message = "Use ability?" + getSmallText(message.substring(this.getWidth() / 10)); + message = "Use ability?" + getSmallText(message.substring(0, this.getWidth() / 10)); } } textArea.setText(message); diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index 47b9f52048..de217391c7 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -34,6 +34,28 @@ package mage.client.game; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Image; +import java.awt.Rectangle; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.image.BufferedImage; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import javax.swing.BorderFactory; +import javax.swing.GroupLayout; +import javax.swing.GroupLayout.Alignment; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.LayoutStyle.ComponentPlacement; +import javax.swing.SwingConstants; +import javax.swing.border.Border; +import javax.swing.border.LineBorder; import mage.MageException; import mage.cards.MageCard; import mage.cards.action.ActionCallback; @@ -60,20 +82,6 @@ import mage.view.ManaPoolView; import mage.view.PlayerView; import org.mage.card.arcane.ManaSymbols; -import javax.swing.*; -import javax.swing.GroupLayout.Alignment; -import javax.swing.LayoutStyle.ComponentPlacement; -import javax.swing.border.Border; -import javax.swing.border.LineBorder; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.image.BufferedImage; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.UUID; - /** * Enhanced player pane. * @@ -787,11 +795,12 @@ public class PlayerPanelExt extends javax.swing.JPanel { } private void btnGraveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGraveActionPerformed + MageFrame.getGame(gameId).openGraveyardWindow(player.getName()); /*if (graveyard == null) { graveyard = new ShowCardsDialog(); }*/ //graveyard.loadCards(player.getName() + " graveyard", player.getGraveyard(), bigCard, Config.dimensions, gameId, false); - DialogManager.getManager(gameId).showGraveyardDialog(player.getGraveyard(), bigCard, gameId); + // DialogManager.getManager(gameId).showGraveyardDialog(player.getGraveyard(), bigCard, gameId); } private void btnCommandZoneActionPerformed(java.awt.event.ActionEvent evt) { From c7184a605578ecf23493a1e85f536ffbb62c58de Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 23 Jun 2015 01:09:31 +0200 Subject: [PATCH 40/42] * Browbeat - Fixed player list handling. --- .../src/mage/sets/judgment/Browbeat.java | 26 +++++++------------ Mage/src/mage/game/GameState.java | 23 +++++++++++++++- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/Mage.Sets/src/mage/sets/judgment/Browbeat.java b/Mage.Sets/src/mage/sets/judgment/Browbeat.java index 7884cf7a6e..fb71c3674c 100644 --- a/Mage.Sets/src/mage/sets/judgment/Browbeat.java +++ b/Mage.Sets/src/mage/sets/judgment/Browbeat.java @@ -28,22 +28,17 @@ package mage.sets.judgment; import java.util.UUID; - import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.costs.common.DiscardTargetCost; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Rarity; -import mage.filter.FilterCard; import mage.game.Game; import mage.game.stack.Spell; import mage.game.stack.StackObject; import mage.players.Player; import mage.target.TargetPlayer; -import mage.target.common.TargetCardInHand; /** * @@ -55,7 +50,6 @@ public class Browbeat extends CardImpl { super(ownerId, 82, "Browbeat", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{R}"); this.expansionSetCode = "JUD"; - // Any player may have Browbeat deal 5 damage to him or her. If no one does, target player draws three cards. this.getSpellAbility().addEffect(new BrowbeatDrawEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); @@ -75,6 +69,7 @@ class BrowbeatDrawEffect extends OneShotEffect { public BrowbeatDrawEffect() { super(Outcome.DrawCard); + staticText = "Any player may have {source} deal 5 damage to him or her. If no one does, target player draws three cards."; } public BrowbeatDrawEffect(final BrowbeatDrawEffect effect) { @@ -88,6 +83,10 @@ class BrowbeatDrawEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } StackObject spell = null; for(StackObject object : game.getStack()){ if(object instanceof Spell && object.getSourceId().equals(source.getSourceId())){ @@ -96,12 +95,12 @@ class BrowbeatDrawEffect extends OneShotEffect { } if(spell != null){ boolean drawCards = true; - for(UUID uuid : game.getPlayerList()){ - Player player = game.getPlayer(uuid); - if(player != null && player.chooseUse(Outcome.Detriment, "Have " + spell.getName() + " deal 5 damage to you?", game)){ + for(UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)){ + Player player = game.getPlayer(playerId); + if (player != null && player.chooseUse(Outcome.Detriment, "Have " + spell.getLogName() + " deal 5 damage to you?", game)){ drawCards = false; player.damage(5, source.getSourceId(), game, false, true); - game.informPlayers(player.getLogName() + " has " + spell.getName() + " deal 5 to him or her"); + game.informPlayers(player.getLogName() + " has " + spell.getLogName() + " deal 5 to him or her"); } } if (drawCards) { @@ -116,11 +115,4 @@ class BrowbeatDrawEffect extends OneShotEffect { return false; } - @Override - public String getText(Mode mode) { - if (staticText != null && !staticText.isEmpty()) { - return staticText; - } - return "Any player may have {source} deal 5 damage to him or her. If no one does, target player draws three cards."; - } } diff --git a/Mage/src/mage/game/GameState.java b/Mage/src/mage/game/GameState.java index 6f5db885c1..c48ba70ad0 100644 --- a/Mage/src/mage/game/GameState.java +++ b/Mage/src/mage/game/GameState.java @@ -585,7 +585,28 @@ public class GameState implements Serializable, Copyable { newPlayerList.setCurrent(playerId); return newPlayerList; } - + /** + * Returns a list of all active players of the game in range of playerId, + * also setting the playerId to the current player of the list. + * + * @param playerId + * @param game + * @return playerList + */ + public PlayerList getPlayersInRange(UUID playerId, Game game) { + PlayerList newPlayerList = new PlayerList(); + Player currentPlayer = game.getPlayer(playerId); + if (currentPlayer != null) { + for (Player player: players.values()) { + if (!player.hasLeft()&& !player.hasLost() && currentPlayer.getInRange().contains(player.getId())) { + newPlayerList.add(player.getId()); + } + } + newPlayerList.setCurrent(playerId); + } + return newPlayerList; + } + public Permanent getPermanent(UUID permanentId) { if (permanentId != null && battlefield.containsPermanent(permanentId)) { Permanent permanent = battlefield.getPermanent(permanentId); From 00569c4047d47a966140e6b90b7f61a62980a2c6 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Mon, 22 Jun 2015 18:46:01 -0500 Subject: [PATCH 41/42] Added 12 Clash Pack promos, 5 judge promos, 2 upcoming FNM promos, renamed MerfolkToken to MerfolkWizardToken, added collector's number that were missing for ORI in mtg-cards-data.txt, added other various cards. --- .../plugins/card/dl/sources/GathererSets.java | 2 +- .../dl/sources/MagicCardsImageSource.java | 1 + .../src/main/resources/card-pictures-tok.txt | 17 ++ .../src/main/resources/image.url.properties | 4 +- Mage.Sets/src/mage/sets/ClashPack.java | 50 +++++ .../mage/sets/clashpack/CourserOfKruphix.java | 54 ++++++ .../sets/clashpack/FatedIntervention.java | 54 ++++++ .../mage/sets/clashpack/FontOfFertility.java | 54 ++++++ .../mage/sets/clashpack/HerosDownfall.java | 54 ++++++ .../mage/sets/clashpack/HydraBroodmaster.java | 54 ++++++ .../mage/sets/clashpack/NecropolisFiend.java | 54 ++++++ .../mage/sets/clashpack/PrognosticSphinx.java | 54 ++++++ .../mage/sets/clashpack/ProphetOfKruphix.java | 54 ++++++ .../mage/sets/clashpack/ReaperOfTheWilds.java | 54 ++++++ .../mage/sets/clashpack/SultaiAscendancy.java | 54 ++++++ .../mage/sets/clashpack/TempleOfMystery.java | 54 ++++++ .../src/mage/sets/clashpack/WhipOfErebos.java | 54 ++++++ .../mage/sets/commander/ChromeshellCrab.java | 90 +++++++++ .../sets/fourthedition/ApprenticeWizard.java | 52 +++++ .../sets/fridaynightmagic/PathToExile.java | 52 +++++ .../sets/fridaynightmagic/SerumVisions.java | 52 +++++ .../mage/sets/futuresight/UnblinkingBleb.java | 69 +++++++ .../src/mage/sets/invasion/SleepersRobe.java | 82 ++++++++ .../src/mage/sets/judgepromo/Damnation.java | 52 +++++ .../mage/sets/judgepromo/DualcasterMage.java | 52 +++++ .../sets/judgepromo/FeldonOfTheThirdPath.java | 52 +++++ .../mage/sets/judgepromo/RavagesOfWar.java | 52 +++++ .../{Wasteland.java => Wasteland1.java} | 12 +- .../src/mage/sets/judgepromo/Wasteland2.java | 54 ++++++ .../sets/legends/ConcordantCrossroads.java | 52 +++++ .../mage/sets/legions/ChromeshellCrab.java | 52 +++++ .../src/mage/sets/lorwyn/Benthicore.java | 179 +++++++++--------- .../src/mage/sets/lorwyn/BoggartMob.java | 92 +++++++++ .../src/mage/sets/lorwyn/SummonTheSchool.java | 158 ++++++++-------- .../sets/mastersedition/ApprenticeWizard.java | 70 +++++++ .../ConcordantCrossroads.java | 65 +++++++ .../mercadianmasques/DiplomaticImmunity.java | 79 ++++++++ .../src/mage/sets/mirage/ChokingSands.java | 52 +++++ .../morningtide/StonybrookSchoolmaster.java | 65 +++++++ .../sets/morningtide/SupremeExemplar.java | 74 ++++++++ .../mage/sets/onslaught/AphettoAlchemist.java | 86 +++++++++ .../mage/sets/onslaught/AvenSoulgazer.java | 126 ++++++++++++ .../sets/onslaught/DisruptivePitmage.java | 76 ++++++++ .../src/mage/sets/onslaught/NosyGoblin.java | 79 ++++++++ .../mage/sets/scourge/AphettoRunecaster.java | 66 +++++++ .../mage/sets/scourge/MischievousQuanar.java | 95 ++++++++++ .../mage/sets/stronghold/ConstantMists.java | 66 +++++++ .../mage/sets/thedark/ApprenticeWizard.java | 54 ++++++ .../sets/vintagemasters/ChokingSands.java | 109 +++++++++++ ...folkToken.java => MerfolkWizardToken.java} | 42 ++-- Utils/known-sets.txt | 1 + Utils/mtg-cards-data.txt | 138 ++++++++++---- Utils/mtg-sets-data.txt | 1 + 53 files changed, 3033 insertions(+), 237 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/ClashPack.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/CourserOfKruphix.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/FatedIntervention.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/FontOfFertility.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/HerosDownfall.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/HydraBroodmaster.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/NecropolisFiend.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/PrognosticSphinx.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/ProphetOfKruphix.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/ReaperOfTheWilds.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/SultaiAscendancy.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/TempleOfMystery.java create mode 100644 Mage.Sets/src/mage/sets/clashpack/WhipOfErebos.java create mode 100644 Mage.Sets/src/mage/sets/commander/ChromeshellCrab.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/ApprenticeWizard.java create mode 100644 Mage.Sets/src/mage/sets/fridaynightmagic/PathToExile.java create mode 100644 Mage.Sets/src/mage/sets/fridaynightmagic/SerumVisions.java create mode 100644 Mage.Sets/src/mage/sets/futuresight/UnblinkingBleb.java create mode 100644 Mage.Sets/src/mage/sets/invasion/SleepersRobe.java create mode 100644 Mage.Sets/src/mage/sets/judgepromo/Damnation.java create mode 100644 Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.java create mode 100644 Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.java create mode 100644 Mage.Sets/src/mage/sets/judgepromo/RavagesOfWar.java rename Mage.Sets/src/mage/sets/judgepromo/{Wasteland.java => Wasteland1.java} (89%) create mode 100644 Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java create mode 100644 Mage.Sets/src/mage/sets/legends/ConcordantCrossroads.java create mode 100644 Mage.Sets/src/mage/sets/legions/ChromeshellCrab.java create mode 100644 Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/ApprenticeWizard.java create mode 100644 Mage.Sets/src/mage/sets/masterseditioniii/ConcordantCrossroads.java create mode 100644 Mage.Sets/src/mage/sets/mercadianmasques/DiplomaticImmunity.java create mode 100644 Mage.Sets/src/mage/sets/mirage/ChokingSands.java create mode 100644 Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java create mode 100644 Mage.Sets/src/mage/sets/morningtide/SupremeExemplar.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/AphettoAlchemist.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/AvenSoulgazer.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/DisruptivePitmage.java create mode 100644 Mage.Sets/src/mage/sets/onslaught/NosyGoblin.java create mode 100644 Mage.Sets/src/mage/sets/scourge/AphettoRunecaster.java create mode 100644 Mage.Sets/src/mage/sets/scourge/MischievousQuanar.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/ConstantMists.java create mode 100644 Mage.Sets/src/mage/sets/thedark/ApprenticeWizard.java create mode 100644 Mage.Sets/src/mage/sets/vintagemasters/ChokingSands.java rename Mage/src/mage/game/permanent/token/{MerfolkToken.java => MerfolkWizardToken.java} (67%) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java index a65db2670e..fa6428a9f3 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/GathererSets.java @@ -43,7 +43,7 @@ public class GathererSets implements Iterable { "CMD", "C13", "C14", "PC2", "ISD", "DKA", "AVR", "RTR", "GTC", "DGM", - "MMA", + "MMA", "MM2", "THS", "BNG", "JOU", "CNS", "VMA", "TPR", "KTK", "FRF", "DTK"}; diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java index 5bb3f704db..80c7b7b4dc 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/MagicCardsImageSource.java @@ -16,6 +16,7 @@ public class MagicCardsImageSource implements CardImageSource { private static final Map setNameTokenReplacement = new HashMap() { { + put("CLASH", "clash-pack"); put("TPR", "tempest-remastered"); put("ORI", "magic-origins"); put("MM2", "modern-masters-2015"); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 93fdf9a8e0..406edd7926 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1,3 +1,20 @@ +#Generate|TOK:MM2|Eldrazi Spawn 1| +#Generate|TOK:MM2|Eldrazi Spawn 2| +#Generate|TOK:MM2|Eldrazi Spawn 3| +#Generate|TOK:MM2|Elephant| +#Generate|TOK:MM2|Faerie Rogue| +#Generate|TOK:MM2|Germ| +#Generate|TOK:MM2|Golem| +#Generate|TOK:MM2|Insect| +#Generate|TOK:MM2|Myr| +#Generate|TOK:MM2|Saproling| +#Generate|TOK:MM2|Snake| +#Generate|TOK:MM2|Soldier| +#Generate|TOK:MM2|Spirit| +#Generate|TOK:MM2|Thrull| +#Generate|TOK:MM2|Wolf| +#Generate|TOK:MM2|Wurm| + #Generate|TOK:TPR|Goblin| #Generate|TOK:TPR|Pegasus| #Generate|TOK:TPR|Rat| diff --git a/Mage.Client/src/main/resources/image.url.properties b/Mage.Client/src/main/resources/image.url.properties index 21a5556cc2..75f83debf0 100644 --- a/Mage.Client/src/main/resources/image.url.properties +++ b/Mage.Client/src/main/resources/image.url.properties @@ -64,6 +64,6 @@ ddd=gvl unh=uh dde=pvc # Remove setname as soon as the images can be downloaded -ignore.urls=TOK,MMB +ignore.urls=TOK,MM2 # sets ordered by release time (newest goes first) -token.lookup.order=TPR,MPRP,DD3,DDO,ORI,MMB,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file +token.lookup.order=TPR,MPRP,DD3,DDO,ORI,MM2,PTC,DTK,FRF,KTK,M15,VMA,CNS,JOU,BNG,THS,DDL,M14,MMA,DGM,GTC,RTR,M13,AVR,DDI,DKA,ISD,M12,NPH,MBS,SOM,M11,ROE,DDE,WWK,ZEN,M10,GVL,ARB,DVD,CFX,JVC,ALA,EVE,SHM,EVG,MOR,LRW,10E,CLS,CHK,GRC \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ClashPack.java b/Mage.Sets/src/mage/sets/ClashPack.java new file mode 100644 index 0000000000..88c39d8b8e --- /dev/null +++ b/Mage.Sets/src/mage/sets/ClashPack.java @@ -0,0 +1,50 @@ +/* +* 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; + +import java.util.GregorianCalendar; +import mage.cards.ExpansionSet; +import mage.constants.SetType; + +/** + * + * @author LevelX2 + */ +public class ClashPack extends ExpansionSet { + private static final ClashPack fINSTANCE = new ClashPack(); + + public static ClashPack getInstance() { + return fINSTANCE; + } + + private ClashPack() { + super("Clash Pack", "CLASH", "mage.sets.clashpack", new GregorianCalendar(2014, 7, 18).getTime(), SetType.SUPPLEMENTAL); + this.hasBasicLands = false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/clashpack/CourserOfKruphix.java b/Mage.Sets/src/mage/sets/clashpack/CourserOfKruphix.java new file mode 100644 index 0000000000..98524ef6af --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/CourserOfKruphix.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class CourserOfKruphix extends mage.sets.bornofthegods.CourserOfKruphix { + + public CourserOfKruphix(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public CourserOfKruphix(final CourserOfKruphix card) { + super(card); + } + + @Override + public CourserOfKruphix copy() { + return new CourserOfKruphix(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/FatedIntervention.java b/Mage.Sets/src/mage/sets/clashpack/FatedIntervention.java new file mode 100644 index 0000000000..df451800e4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/FatedIntervention.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class FatedIntervention extends mage.sets.bornofthegods.FatedIntervention { + + public FatedIntervention(UUID ownerId) { + super(ownerId); + this.cardNumber = 2; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public FatedIntervention(final FatedIntervention card) { + super(card); + } + + @Override + public FatedIntervention copy() { + return new FatedIntervention(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/FontOfFertility.java b/Mage.Sets/src/mage/sets/clashpack/FontOfFertility.java new file mode 100644 index 0000000000..65dc6e6c42 --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/FontOfFertility.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class FontOfFertility extends mage.sets.journeyintonyx.FontOfFertility { + + public FontOfFertility(UUID ownerId) { + super(ownerId); + this.cardNumber = 3; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public FontOfFertility(final FontOfFertility card) { + super(card); + } + + @Override + public FontOfFertility copy() { + return new FontOfFertility(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/HerosDownfall.java b/Mage.Sets/src/mage/sets/clashpack/HerosDownfall.java new file mode 100644 index 0000000000..94d55e720b --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/HerosDownfall.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class HerosDownfall extends mage.sets.theros.HerosDownfall { + + public HerosDownfall(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public HerosDownfall(final HerosDownfall card) { + super(card); + } + + @Override + public HerosDownfall copy() { + return new HerosDownfall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/HydraBroodmaster.java b/Mage.Sets/src/mage/sets/clashpack/HydraBroodmaster.java new file mode 100644 index 0000000000..be735b6dbd --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/HydraBroodmaster.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class HydraBroodmaster extends mage.sets.journeyintonyx.HydraBroodmaster { + + public HydraBroodmaster(UUID ownerId) { + super(ownerId); + this.cardNumber = 4; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public HydraBroodmaster(final HydraBroodmaster card) { + super(card); + } + + @Override + public HydraBroodmaster copy() { + return new HydraBroodmaster(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/NecropolisFiend.java b/Mage.Sets/src/mage/sets/clashpack/NecropolisFiend.java new file mode 100644 index 0000000000..920343b98e --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/NecropolisFiend.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class NecropolisFiend extends mage.sets.khansoftarkir.NecropolisFiend { + + public NecropolisFiend(UUID ownerId) { + super(ownerId); + this.cardNumber = 7; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public NecropolisFiend(final NecropolisFiend card) { + super(card); + } + + @Override + public NecropolisFiend copy() { + return new NecropolisFiend(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/PrognosticSphinx.java b/Mage.Sets/src/mage/sets/clashpack/PrognosticSphinx.java new file mode 100644 index 0000000000..1c831c9ab0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/PrognosticSphinx.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class PrognosticSphinx extends mage.sets.theros.PrognosticSphinx { + + public PrognosticSphinx(UUID ownerId) { + super(ownerId); + this.cardNumber = 1; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public PrognosticSphinx(final PrognosticSphinx card) { + super(card); + } + + @Override + public PrognosticSphinx copy() { + return new PrognosticSphinx(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/ProphetOfKruphix.java b/Mage.Sets/src/mage/sets/clashpack/ProphetOfKruphix.java new file mode 100644 index 0000000000..7437e2fab4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/ProphetOfKruphix.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ProphetOfKruphix extends mage.sets.theros.ProphetOfKruphix { + + public ProphetOfKruphix(UUID ownerId) { + super(ownerId); + this.cardNumber = 5; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public ProphetOfKruphix(final ProphetOfKruphix card) { + super(card); + } + + @Override + public ProphetOfKruphix copy() { + return new ProphetOfKruphix(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/ReaperOfTheWilds.java b/Mage.Sets/src/mage/sets/clashpack/ReaperOfTheWilds.java new file mode 100644 index 0000000000..dcaa6a5812 --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/ReaperOfTheWilds.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ReaperOfTheWilds extends mage.sets.theros.ReaperOfTheWilds { + + public ReaperOfTheWilds(UUID ownerId) { + super(ownerId); + this.cardNumber = 10; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public ReaperOfTheWilds(final ReaperOfTheWilds card) { + super(card); + } + + @Override + public ReaperOfTheWilds copy() { + return new ReaperOfTheWilds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/SultaiAscendancy.java b/Mage.Sets/src/mage/sets/clashpack/SultaiAscendancy.java new file mode 100644 index 0000000000..3cba2cae8f --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/SultaiAscendancy.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class SultaiAscendancy extends mage.sets.khansoftarkir.SultaiAscendancy { + + public SultaiAscendancy(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public SultaiAscendancy(final SultaiAscendancy card) { + super(card); + } + + @Override + public SultaiAscendancy copy() { + return new SultaiAscendancy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/TempleOfMystery.java b/Mage.Sets/src/mage/sets/clashpack/TempleOfMystery.java new file mode 100644 index 0000000000..fb8fbee480 --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/TempleOfMystery.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class TempleOfMystery extends mage.sets.theros.TempleOfMystery { + + public TempleOfMystery(UUID ownerId) { + super(ownerId); + this.cardNumber = 6; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public TempleOfMystery(final TempleOfMystery card) { + super(card); + } + + @Override + public TempleOfMystery copy() { + return new TempleOfMystery(this); + } +} diff --git a/Mage.Sets/src/mage/sets/clashpack/WhipOfErebos.java b/Mage.Sets/src/mage/sets/clashpack/WhipOfErebos.java new file mode 100644 index 0000000000..f48c4ba085 --- /dev/null +++ b/Mage.Sets/src/mage/sets/clashpack/WhipOfErebos.java @@ -0,0 +1,54 @@ +/* + * 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.clashpack; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class WhipOfErebos extends mage.sets.theros.WhipOfErebos { + + public WhipOfErebos(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "CLASH"; + this.rarity = Rarity.SPECIAL; + } + + public WhipOfErebos(final WhipOfErebos card) { + super(card); + } + + @Override + public WhipOfErebos copy() { + return new WhipOfErebos(this); + } +} diff --git a/Mage.Sets/src/mage/sets/commander/ChromeshellCrab.java b/Mage.Sets/src/mage/sets/commander/ChromeshellCrab.java new file mode 100644 index 0000000000..5c46924088 --- /dev/null +++ b/Mage.Sets/src/mage/sets/commander/ChromeshellCrab.java @@ -0,0 +1,90 @@ +/* + * 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.commander; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.ExchangeControlTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ChromeshellCrab extends CardImpl { + + private static final String rule = "you may exchange control of target creature you control and target creature an opponent controls"; + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + + static { + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public ChromeshellCrab(UUID ownerId) { + super(ownerId, 41, "Chromeshell Crab", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "CMD"; + this.subtype.add("Crab"); + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Morph {4}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{U}"))); + + // When Chromeshell Crab is turned face up, you may exchange control of target creature you control and target creature an opponent controls. + Effect effect = new ExchangeControlTargetEffect(Duration.EndOfGame, rule, false, true); + effect.setText("exchange control of target creature you control and target creature an opponent controls"); + Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect, false, true); + ability.addTarget(new TargetControlledCreaturePermanent()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public ChromeshellCrab(final ChromeshellCrab card) { + super(card); + } + + @Override + public ChromeshellCrab copy() { + return new ChromeshellCrab(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/ApprenticeWizard.java b/Mage.Sets/src/mage/sets/fourthedition/ApprenticeWizard.java new file mode 100644 index 0000000000..34537065ea --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/ApprenticeWizard.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.fourthedition; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ApprenticeWizard extends mage.sets.mastersedition.ApprenticeWizard { + + public ApprenticeWizard(UUID ownerId) { + super(ownerId); + this.cardNumber = 61; + this.expansionSetCode = "4ED"; + } + + public ApprenticeWizard(final ApprenticeWizard card) { + super(card); + } + + @Override + public ApprenticeWizard copy() { + return new ApprenticeWizard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fridaynightmagic/PathToExile.java b/Mage.Sets/src/mage/sets/fridaynightmagic/PathToExile.java new file mode 100644 index 0000000000..5a5e9dbe4e --- /dev/null +++ b/Mage.Sets/src/mage/sets/fridaynightmagic/PathToExile.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.fridaynightmagic; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class PathToExile extends mage.sets.conflux.PathToExile { + + public PathToExile(UUID ownerId) { + super(ownerId); + this.cardNumber = 182; + this.expansionSetCode = "FNMP"; + } + + public PathToExile(final PathToExile card) { + super(card); + } + + @Override + public PathToExile copy() { + return new PathToExile(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fridaynightmagic/SerumVisions.java b/Mage.Sets/src/mage/sets/fridaynightmagic/SerumVisions.java new file mode 100644 index 0000000000..4a98857ee0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fridaynightmagic/SerumVisions.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.fridaynightmagic; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SerumVisions extends mage.sets.fifthdawn.SerumVisions { + + public SerumVisions(UUID ownerId) { + super(ownerId); + this.cardNumber = 183; + this.expansionSetCode = "FNMP"; + } + + public SerumVisions(final SerumVisions card) { + super(card); + } + + @Override + public SerumVisions copy() { + return new SerumVisions(this); + } +} diff --git a/Mage.Sets/src/mage/sets/futuresight/UnblinkingBleb.java b/Mage.Sets/src/mage/sets/futuresight/UnblinkingBleb.java new file mode 100644 index 0000000000..75cd4c35bf --- /dev/null +++ b/Mage.Sets/src/mage/sets/futuresight/UnblinkingBleb.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.futuresight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.TurnedFaceUpAllTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterPermanent; + +/** + * + * @author fireshoes + */ +public class UnblinkingBleb extends CardImpl { + + public UnblinkingBleb(UUID ownerId) { + super(ownerId, 45, "Unblinking Bleb", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "FUT"; + this.subtype.add("Illusion"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Morph {2}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{2}{U}"))); + + // Whenever Unblinking Bleb or another permanent is turned face up, you may scry 2. + this.addAbility(new TurnedFaceUpAllTriggeredAbility(new ScryEffect(2), new FilterPermanent("{this} or another permanent"), true)); + } + + public UnblinkingBleb(final UnblinkingBleb card) { + super(card); + } + + @Override + public UnblinkingBleb copy() { + return new UnblinkingBleb(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/invasion/SleepersRobe.java b/Mage.Sets/src/mage/sets/invasion/SleepersRobe.java new file mode 100644 index 0000000000..4efa36bc20 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/SleepersRobe.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.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FearAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class SleepersRobe extends CardImpl { + + public SleepersRobe(UUID ownerId) { + super(ownerId, 273, "Sleeper's Robe", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{B}"); + this.expansionSetCode = "INV"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has fear. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FearAbility.getInstance(), AttachmentType.AURA))); + + // Whenever enchanted creature deals combat damage to an opponent, you may draw a card. + this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new DrawCardSourceControllerEffect(1), "enchanted creature", true, false, false, TargetController.OPPONENT)); + } + + public SleepersRobe(final SleepersRobe card) { + super(card); + } + + @Override + public SleepersRobe copy() { + return new SleepersRobe(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/judgepromo/Damnation.java b/Mage.Sets/src/mage/sets/judgepromo/Damnation.java new file mode 100644 index 0000000000..b52992b4a0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgepromo/Damnation.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.judgepromo; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class Damnation extends mage.sets.planarchaos.Damnation { + + public Damnation(UUID ownerId) { + super(ownerId); + this.cardNumber = 94; + this.expansionSetCode = "JR"; + } + + public Damnation(final Damnation card) { + super(card); + } + + @Override + public Damnation copy() { + return new Damnation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.java b/Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.java new file mode 100644 index 0000000000..3b3b3502ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgepromo/DualcasterMage.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.judgepromo; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class DualcasterMage extends mage.sets.commander2014.DualcasterMage { + + public DualcasterMage(UUID ownerId) { + super(ownerId); + this.cardNumber = 95; + this.expansionSetCode = "JR"; + } + + public DualcasterMage(final DualcasterMage card) { + super(card); + } + + @Override + public DualcasterMage copy() { + return new DualcasterMage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.java b/Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.java new file mode 100644 index 0000000000..624e723230 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgepromo/FeldonOfTheThirdPath.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.judgepromo; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class FeldonOfTheThirdPath extends mage.sets.commander2014.FeldonOfTheThirdPath { + + public FeldonOfTheThirdPath(UUID ownerId) { + super(ownerId); + this.cardNumber = 96; + this.expansionSetCode = "JR"; + } + + public FeldonOfTheThirdPath(final FeldonOfTheThirdPath card) { + super(card); + } + + @Override + public FeldonOfTheThirdPath copy() { + return new FeldonOfTheThirdPath(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgepromo/RavagesOfWar.java b/Mage.Sets/src/mage/sets/judgepromo/RavagesOfWar.java new file mode 100644 index 0000000000..9287aef52e --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgepromo/RavagesOfWar.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.judgepromo; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class RavagesOfWar extends mage.sets.portalthreekingdoms.RavagesOfWar { + + public RavagesOfWar(UUID ownerId) { + super(ownerId); + this.cardNumber = 97; + this.expansionSetCode = "JR"; + } + + public RavagesOfWar(final RavagesOfWar card) { + super(card); + } + + @Override + public RavagesOfWar copy() { + return new RavagesOfWar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgepromo/Wasteland.java b/Mage.Sets/src/mage/sets/judgepromo/Wasteland1.java similarity index 89% rename from Mage.Sets/src/mage/sets/judgepromo/Wasteland.java rename to Mage.Sets/src/mage/sets/judgepromo/Wasteland1.java index 51b136604e..4b0cf0a571 100644 --- a/Mage.Sets/src/mage/sets/judgepromo/Wasteland.java +++ b/Mage.Sets/src/mage/sets/judgepromo/Wasteland1.java @@ -33,20 +33,20 @@ import java.util.UUID; * * @author fireshoes */ -public class Wasteland extends mage.sets.tempest.Wasteland { +public class Wasteland1 extends mage.sets.tempest.Wasteland { - public Wasteland(UUID ownerId) { + public Wasteland1(UUID ownerId) { super(ownerId); this.cardNumber = 55; this.expansionSetCode = "JR"; } - public Wasteland(final Wasteland card) { + public Wasteland1(final Wasteland1 card) { super(card); } @Override - public Wasteland copy() { - return new Wasteland(this); + public Wasteland1 copy() { + return new Wasteland1(this); } -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java b/Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java new file mode 100644 index 0000000000..3f62f4a673 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgepromo/Wasteland2.java @@ -0,0 +1,54 @@ +/* + * 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.judgepromo; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class Wasteland2 extends mage.sets.tempest.Wasteland { + + public Wasteland2(UUID ownerId) { + super(ownerId); + this.cardNumber = 98; + this.expansionSetCode = "JR"; + this.rarity = Rarity.RARE; + } + + public Wasteland2(final Wasteland2 card) { + super(card); + } + + @Override + public Wasteland2 copy() { + return new Wasteland2(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/legends/ConcordantCrossroads.java b/Mage.Sets/src/mage/sets/legends/ConcordantCrossroads.java new file mode 100644 index 0000000000..421d353dfb --- /dev/null +++ b/Mage.Sets/src/mage/sets/legends/ConcordantCrossroads.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.legends; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ConcordantCrossroads extends mage.sets.masterseditioniii.ConcordantCrossroads { + + public ConcordantCrossroads(UUID ownerId) { + super(ownerId); + this.cardNumber = 93; + this.expansionSetCode = "LEG"; + } + + public ConcordantCrossroads(final ConcordantCrossroads card) { + super(card); + } + + @Override + public ConcordantCrossroads copy() { + return new ConcordantCrossroads(this); + } +} diff --git a/Mage.Sets/src/mage/sets/legions/ChromeshellCrab.java b/Mage.Sets/src/mage/sets/legions/ChromeshellCrab.java new file mode 100644 index 0000000000..89d6e431aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/legions/ChromeshellCrab.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.legions; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ChromeshellCrab extends mage.sets.commander.ChromeshellCrab { + + public ChromeshellCrab(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "LGN"; + } + + public ChromeshellCrab(final ChromeshellCrab card) { + super(card); + } + + @Override + public ChromeshellCrab copy() { + return new ChromeshellCrab(this); + } +} diff --git a/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java b/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java index 2f1de4dda3..13503b6c74 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java +++ b/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java @@ -1,88 +1,91 @@ -/* - * 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.lorwyn; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.MageInt; -import mage.abilities.Ability; -import mage.abilities.common.EntersBattlefieldTriggeredAbility; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapTargetCost; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.UntapSourceEffect; -import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.ShroudAbility; -import mage.cards.CardImpl; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.TappedPredicate; -import mage.game.permanent.token.MerfolkToken; -import mage.target.common.TargetControlledPermanent; - -import java.util.UUID; - -/** - * - * @author Loki - */ -public class Benthicore extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Merfolk you control"); - - static { - filter.add(Predicates.not(new TappedPredicate())); - filter.add(new SubtypePredicate("Merfolk")); - } - - public Benthicore(UUID ownerId) { - super(ownerId, 53, "Benthicore", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{U}"); - this.expansionSetCode = "LRW"; - this.subtype.add("Elemental"); - - this.power = new MageInt(5); - this.toughness = new MageInt(5); - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MerfolkToken(), 2), false)); - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); - ability.addEffect(new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.EndOfTurn)); - this.addAbility(ability); - } - - public Benthicore(final Benthicore card) { - super(card); - } - - @Override - public Benthicore copy() { - return new Benthicore(this); - } -} - +/* + * 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.lorwyn; + +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.game.permanent.token.MerfolkWizardToken; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class Benthicore extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Merfolk you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Merfolk")); + } + + public Benthicore(UUID ownerId) { + super(ownerId, 53, "Benthicore", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{U}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Elemental"); + this.color.setBlue(true); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // When Benthicore enters the battlefield, put two 1/1 blue Merfolk Wizard creature tokens onto the battlefield. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MerfolkWizardToken(), 2), false)); + + // Tap two untapped Merfolk you control: Untap Benthicore. It gains shroud until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new TapTargetCost(new TargetControlledPermanent(2, 2, filter, false))); + ability.addEffect(new GainAbilitySourceEffect(ShroudAbility.getInstance(), Duration.EndOfTurn)); + this.addAbility(ability); + } + + public Benthicore(final Benthicore card) { + super(card); + } + + @Override + public Benthicore copy() { + return new Benthicore(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java b/Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java new file mode 100644 index 0000000000..0bfee0cd16 --- /dev/null +++ b/Mage.Sets/src/mage/sets/lorwyn/BoggartMob.java @@ -0,0 +1,92 @@ +/* + * 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.lorwyn; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.ChampionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.permanent.token.Token; + +/** + * + * @author fireshoes + */ +public class BoggartMob extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin you control"); + + static { + filter.add(new SubtypePredicate("Goblin")); + } + + public BoggartMob(UUID ownerId) { + super(ownerId, 104, "Boggart Mob", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Champion a Goblin + this.addAbility(new ChampionAbility(this, "Goblin")); + + // Whenever a Goblin you control deals combat damage to a player, you may put a 1/1 black Goblin Rogue creature token onto the battlefield. + this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility( + new CreateTokenEffect(new BlackGoblinRogueToken()), + filter, true, SetTargetPointer.NONE, true)); + } + + public BoggartMob(final BoggartMob card) { + super(card); + } + + @Override + public BoggartMob copy() { + return new BoggartMob(this); + } +} + +class BlackGoblinRogueToken extends Token { + BlackGoblinRogueToken() { + super("Goblin Rogue", "1/1 black Goblin Rogue creature token"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Goblin"); + subtype.add("Rogue"); + power = new MageInt(1); + toughness = new MageInt(1); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java b/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java index f69a60c2ca..ca8c1add57 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java +++ b/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java @@ -1,79 +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.lorwyn; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.TapTargetCost; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ReturnToHandSourceEffect; -import mage.cards.CardImpl; -import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.filter.predicate.permanent.TappedPredicate; -import mage.game.permanent.token.MerfolkToken; -import mage.target.common.TargetControlledPermanent; - -import java.util.UUID; - -/** - * - * @author Loki - */ -public class SummonTheSchool extends CardImpl { - - private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Merfolk you control"); - - static { - filter.add(Predicates.not(new TappedPredicate())); - filter.add(new SubtypePredicate("Merfolk")); - } - - public SummonTheSchool(UUID ownerId) { - super(ownerId, 42, "Summon the School", Rarity.UNCOMMON, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{W}"); - this.expansionSetCode = "LRW"; - this.subtype.add("Merfolk"); - - // Put two 1/1 blue Merfolk Wizard creature tokens onto the battlefield. - this.getSpellAbility().addEffect(new CreateTokenEffect(new MerfolkToken(), 2)); - // Tap four untapped Merfolk you control: Return Summon the School from your graveyard to your hand. - this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnToHandSourceEffect(), new TapTargetCost(new TargetControlledPermanent(4, 4, filter, false)))); - } - - public SummonTheSchool(final SummonTheSchool card) { - super(card); - } - - @Override - public SummonTheSchool copy() { - return new SummonTheSchool(this); - } -} +/* + * 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.lorwyn; + +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.cards.CardImpl; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.game.permanent.token.MerfolkWizardToken; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * + * @author Loki + */ +public class SummonTheSchool extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("untapped Merfolk you control"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new SubtypePredicate("Merfolk")); + } + + public SummonTheSchool(UUID ownerId) { + super(ownerId, 42, "Summon the School", Rarity.UNCOMMON, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{W}"); + this.expansionSetCode = "LRW"; + this.subtype.add("Merfolk"); + this.color.setWhite(true); + // Put two 1/1 blue Merfolk Wizard creature tokens onto the battlefield. + this.getSpellAbility().addEffect(new CreateTokenEffect(new MerfolkWizardToken(), 2)); + // Tap four untapped Merfolk you control: Return Summon the School from your graveyard to your hand. + this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnToHandSourceEffect(), new TapTargetCost(new TargetControlledPermanent(4, 4, filter, false)))); + } + + public SummonTheSchool(final SummonTheSchool card) { + super(card); + } + + @Override + public SummonTheSchool copy() { + return new SummonTheSchool(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/ApprenticeWizard.java b/Mage.Sets/src/mage/sets/mastersedition/ApprenticeWizard.java new file mode 100644 index 0000000000..7269e5fe27 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/ApprenticeWizard.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.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class ApprenticeWizard extends CardImpl { + + public ApprenticeWizard(UUID ownerId) { + super(ownerId, 30, "Apprentice Wizard", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); + this.expansionSetCode = "MED"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // {U}, {tap}: Add {3} to your mana pool. + Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(3), new ManaCostsImpl("{U}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public ApprenticeWizard(final ApprenticeWizard card) { + super(card); + } + + @Override + public ApprenticeWizard copy() { + return new ApprenticeWizard(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/masterseditioniii/ConcordantCrossroads.java b/Mage.Sets/src/mage/sets/masterseditioniii/ConcordantCrossroads.java new file mode 100644 index 0000000000..8a0a0ed3b7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditioniii/ConcordantCrossroads.java @@ -0,0 +1,65 @@ +/* + * 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.masterseditioniii; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.HasteAbility; +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; + +/** + * + * @author fireshoes + */ +public class ConcordantCrossroads extends CardImpl { + + public ConcordantCrossroads(UUID ownerId) { + super(ownerId, 114, "Concordant Crossroads", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "ME3"; + this.supertype.add("World"); + + // All creatures have haste. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, new FilterCreaturePermanent("Creatures")))); + } + + public ConcordantCrossroads(final ConcordantCrossroads card) { + super(card); + } + + @Override + public ConcordantCrossroads copy() { + return new ConcordantCrossroads(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mercadianmasques/DiplomaticImmunity.java b/Mage.Sets/src/mage/sets/mercadianmasques/DiplomaticImmunity.java new file mode 100644 index 0000000000..b8bcda5eff --- /dev/null +++ b/Mage.Sets/src/mage/sets/mercadianmasques/DiplomaticImmunity.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.mercadianmasques; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class DiplomaticImmunity extends CardImpl { + + public DiplomaticImmunity(UUID ownerId) { + super(ownerId, 75, "Diplomatic Immunity", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + this.expansionSetCode = "MMQ"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Shroud + this.addAbility(ShroudAbility.getInstance()); + + // Enchanted creature has shroud. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ShroudAbility.getInstance(), AttachmentType.AURA))); + } + + public DiplomaticImmunity(final DiplomaticImmunity card) { + super(card); + } + + @Override + public DiplomaticImmunity copy() { + return new DiplomaticImmunity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/ChokingSands.java b/Mage.Sets/src/mage/sets/mirage/ChokingSands.java new file mode 100644 index 0000000000..5ecbfc820c --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/ChokingSands.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.mirage; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ChokingSands extends mage.sets.vintagemasters.ChokingSands { + + public ChokingSands(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "MIR"; + } + + public ChokingSands(final ChokingSands card) { + super(card); + } + + @Override + public ChokingSands copy() { + return new ChokingSands(this); + } +} diff --git a/Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java b/Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java new file mode 100644 index 0000000000..691d5c6c07 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/StonybrookSchoolmaster.java @@ -0,0 +1,65 @@ +/* + * 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.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.BecomesTappedTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.game.permanent.token.MerfolkWizardToken; + +/** + * + * @author fireshoes + */ +public class StonybrookSchoolmaster extends CardImpl { + + public StonybrookSchoolmaster(UUID ownerId) { + super(ownerId, 25, "Stonybrook Schoolmaster", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Whenever Stonybrook Schoolmaster becomes tapped, you may put a 1/1 blue Merfolk Wizard creature token onto the battlefield. + this.addAbility(new BecomesTappedTriggeredAbility(new CreateTokenEffect(new MerfolkWizardToken()), true)); + } + + public StonybrookSchoolmaster(final StonybrookSchoolmaster card) { + super(card); + } + + @Override + public StonybrookSchoolmaster copy() { + return new StonybrookSchoolmaster(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/morningtide/SupremeExemplar.java b/Mage.Sets/src/mage/sets/morningtide/SupremeExemplar.java new file mode 100644 index 0000000000..77b80554c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/morningtide/SupremeExemplar.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.morningtide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.ChampionAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author fireshoes + */ +public class SupremeExemplar extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elemental"); + + static { + filter.add(new SubtypePredicate("Elemental")); + } + + public SupremeExemplar(UUID ownerId) { + super(ownerId, 53, "Supreme Exemplar", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{U}"); + this.expansionSetCode = "MOR"; + this.subtype.add("Elemental"); + this.power = new MageInt(10); + this.toughness = new MageInt(10); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Champion an Elemental + this.addAbility(new ChampionAbility(this, "Elemental")); + } + + public SupremeExemplar(final SupremeExemplar card) { + super(card); + } + + @Override + public SupremeExemplar copy() { + return new SupremeExemplar(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/onslaught/AphettoAlchemist.java b/Mage.Sets/src/mage/sets/onslaught/AphettoAlchemist.java new file mode 100644 index 0000000000..de5eaff598 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AphettoAlchemist.java @@ -0,0 +1,86 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author fireshoes + */ +public class AphettoAlchemist extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or creature"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.ARTIFACT), + new CardTypePredicate(CardType.CREATURE))); + } + + public AphettoAlchemist(UUID ownerId) { + super(ownerId, 64, "Aphetto Alchemist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {tap}: Untap target artifact or creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + + // Morph {U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{U}"))); + } + + public AphettoAlchemist(final AphettoAlchemist card) { + super(card); + } + + @Override + public AphettoAlchemist copy() { + return new AphettoAlchemist(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/onslaught/AvenSoulgazer.java b/Mage.Sets/src/mage/sets/onslaught/AvenSoulgazer.java new file mode 100644 index 0000000000..10cdf3ad74 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/AvenSoulgazer.java @@ -0,0 +1,126 @@ +/* + * 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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.other.FaceDownPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class AvenSoulgazer extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("face down creature"); + + static { + filter.add(new FaceDownPredicate()); + } + + public AvenSoulgazer(UUID ownerId) { + super(ownerId, 8, "Aven Soulgazer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Bird"); + this.subtype.add("Cleric"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {2}{W}: Look at target face-down creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AvenSoulgazerLookFaceDownEffect(), new ManaCostsImpl("{2}{W}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public AvenSoulgazer(final AvenSoulgazer card) { + super(card); + } + + @Override + public AvenSoulgazer copy() { + return new AvenSoulgazer(this); + } +} + +class AvenSoulgazerLookFaceDownEffect extends OneShotEffect { + + public AvenSoulgazerLookFaceDownEffect() { + super(Outcome.Benefit); + this.staticText = "Look at target face-down creature"; + } + + public AvenSoulgazerLookFaceDownEffect(final AvenSoulgazerLookFaceDownEffect effect) { + super(effect); + } + + @Override + public AvenSoulgazerLookFaceDownEffect copy() { + return new AvenSoulgazerLookFaceDownEffect(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) { + return false; + } + Permanent faceDownCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (faceDownCreature != null) { + Permanent copyFaceDown = faceDownCreature.copy(); + copyFaceDown.setFaceDown(false, game); + Cards cards = new CardsImpl(); + cards.add(copyFaceDown); + player.lookAtCards("face down card - " + mageObject.getName(), cards, game); + } else { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/onslaught/DisruptivePitmage.java b/Mage.Sets/src/mage/sets/onslaught/DisruptivePitmage.java new file mode 100644 index 0000000000..471f920adf --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/DisruptivePitmage.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class DisruptivePitmage extends CardImpl { + + public DisruptivePitmage(UUID ownerId) { + super(ownerId, 81, "Disruptive Pitmage", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Counter target spell unless its controller pays {1}. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(new GenericManaCost(1)), new TapSourceCost()); + ability.addTarget(new TargetSpell()); + this.addAbility(ability); + + // Morph {U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{U}"))); + } + + public DisruptivePitmage(final DisruptivePitmage card) { + super(card); + } + + @Override + public DisruptivePitmage copy() { + return new DisruptivePitmage(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/onslaught/NosyGoblin.java b/Mage.Sets/src/mage/sets/onslaught/NosyGoblin.java new file mode 100644 index 0000000000..b82adb5110 --- /dev/null +++ b/Mage.Sets/src/mage/sets/onslaught/NosyGoblin.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.onslaught; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.other.FaceDownPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class NosyGoblin extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("face down creature"); + + static { + filter.add(new FaceDownPredicate()); + } + + public NosyGoblin(UUID ownerId) { + super(ownerId, 220, "Nosy Goblin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ONS"; + this.subtype.add("Goblin"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // {tap}, Sacrifice Nosy Goblin: Destroy target face-down creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public NosyGoblin(final NosyGoblin card) { + super(card); + } + + @Override + public NosyGoblin copy() { + return new NosyGoblin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scourge/AphettoRunecaster.java b/Mage.Sets/src/mage/sets/scourge/AphettoRunecaster.java new file mode 100644 index 0000000000..ab5295e4c7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/AphettoRunecaster.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.TurnedFaceUpAllTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterPermanent; + +/** + * + * @author fireshoes + */ +public class AphettoRunecaster extends CardImpl { + + public AphettoRunecaster(UUID ownerId) { + super(ownerId, 28, "Aphetto Runecaster", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Whenever a permanent is turned face up, you may draw a card. + this.addAbility(new TurnedFaceUpAllTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new FilterPermanent("a permanent"), false, true)); + } + + public AphettoRunecaster(final AphettoRunecaster card) { + super(card); + } + + @Override + public AphettoRunecaster copy() { + return new AphettoRunecaster(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/scourge/MischievousQuanar.java b/Mage.Sets/src/mage/sets/scourge/MischievousQuanar.java new file mode 100644 index 0000000000..8c26c18b5a --- /dev/null +++ b/Mage.Sets/src/mage/sets/scourge/MischievousQuanar.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.scourge; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CopyTargetSpellEffect; +import mage.abilities.effects.common.continuous.BecomesFaceDownCreatureEffect; +import mage.abilities.keyword.MorphAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetSpell; + +/** + * + * @author fireshoes + */ +public class MischievousQuanar extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("instant or sorcery spell"); + + static { + filter.add(Predicates.or( + new CardTypePredicate(CardType.INSTANT), + new CardTypePredicate(CardType.SORCERY))); + } + + public MischievousQuanar(UUID ownerId) { + super(ownerId, 42, "Mischievous Quanar", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "SCG"; + this.subtype.add("Beast"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {3}{U}{U}: Turn Mischievous Quanar face down. + Effect effect = new BecomesFaceDownCreatureEffect(Duration.Custom, BecomesFaceDownCreatureEffect.FaceDownType.MANUAL); + effect.setText("Turn Michievous Quanar face down. (It becomes a 2/2 creature.)"); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{U}{U}"))); + + // Morph {1}{U}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}{U}"))); + + // When Mischievous Quanar is turned face up, copy target instant or sorcery spell. You may choose new targets for that copy. + Effect effect2 = new CopyTargetSpellEffect(); + effect2.setText("copy target instant or sorcery spell. You may choose new targets for that copy"); + Ability ability = new TurnedFaceUpSourceTriggeredAbility(effect2); + ability.addTarget(new TargetSpell(filter)); + this.addAbility(ability); + } + + public MischievousQuanar(final MischievousQuanar card) { + super(card); + } + + @Override + public MischievousQuanar copy() { + return new MischievousQuanar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/ConstantMists.java b/Mage.Sets/src/mage/sets/stronghold/ConstantMists.java new file mode 100644 index 0000000000..a35e1777b9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/ConstantMists.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.stronghold; + +import java.util.UUID; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.PreventAllDamageByAllEffect; +import mage.abilities.keyword.BuybackAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledLandPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author fireshoes + */ +public class ConstantMists extends CardImpl { + + public ConstantMists(UUID ownerId) { + super(ownerId, 54, "Constant Mists", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{G}"); + this.expansionSetCode = "STH"; + + // Buyback-Sacrifice a land. + this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))))); + + // Prevent all combat damage that would be dealt this turn. + this.getSpellAbility().addEffect(new PreventAllDamageByAllEffect(Duration.EndOfTurn, true)); + } + + public ConstantMists(final ConstantMists card) { + super(card); + } + + @Override + public ConstantMists copy() { + return new ConstantMists(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/thedark/ApprenticeWizard.java b/Mage.Sets/src/mage/sets/thedark/ApprenticeWizard.java new file mode 100644 index 0000000000..2c66993687 --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/ApprenticeWizard.java @@ -0,0 +1,54 @@ +/* + * 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.thedark; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author fireshoes + */ +public class ApprenticeWizard extends mage.sets.mastersedition.ApprenticeWizard { + + public ApprenticeWizard(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "DRK"; + this.rarity = Rarity.RARE; + } + + public ApprenticeWizard(final ApprenticeWizard card) { + super(card); + } + + @Override + public ApprenticeWizard copy() { + return new ApprenticeWizard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/ChokingSands.java b/Mage.Sets/src/mage/sets/vintagemasters/ChokingSands.java new file mode 100644 index 0000000000..a7c36337ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/ChokingSands.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.vintagemasters; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author fireshoes + */ +public class ChokingSands extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent("non-Swamp"); + + static { + filter.add(Predicates.not(new SubtypePredicate("Swamp"))); + } + + public ChokingSands(UUID ownerId) { + super(ownerId, 109, "Choking Sands", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); + this.expansionSetCode = "VMA"; + + // Destroy target non-Swamp land. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetLandPermanent(filter)); + + // If that land was nonbasic, Choking Sands deals 2 damage to the land's controller. + this.getSpellAbility().addEffect(new ChokingSandsEffect()); + } + + public ChokingSands(final ChokingSands card) { + super(card); + } + + @Override + public ChokingSands copy() { + return new ChokingSands(this); + } +} + +class ChokingSandsEffect extends OneShotEffect { + + public ChokingSandsEffect() { + super(Outcome.Damage); + this.staticText = "If that land was nonbasic, Choking Sands deals 2 damage to the land's controller"; + } + + public ChokingSandsEffect(final ChokingSandsEffect effect) { + super(effect); + } + + @Override + public ChokingSandsEffect copy() { + return new ChokingSandsEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD); + if (permanent != null && !permanent.getSupertype().contains("Basic")) { + Player player = game.getPlayer(permanent.getControllerId()); + if (player != null) { + player.damage(2, source.getSourceId(), game, false, true); + return true; + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage/src/mage/game/permanent/token/MerfolkToken.java b/Mage/src/mage/game/permanent/token/MerfolkWizardToken.java similarity index 67% rename from Mage/src/mage/game/permanent/token/MerfolkToken.java rename to Mage/src/mage/game/permanent/token/MerfolkWizardToken.java index ee97ff82a8..ad83a93e28 100644 --- a/Mage/src/mage/game/permanent/token/MerfolkToken.java +++ b/Mage/src/mage/game/permanent/token/MerfolkWizardToken.java @@ -1,21 +1,21 @@ -package mage.game.permanent.token; - -import mage.MageInt; -import mage.constants.CardType; - -/** - * - * @author Loki - */ -public class MerfolkToken extends Token { - - public MerfolkToken() { - super("Merfolk", "1/1 blue Merfolk Wizard creature token"); - cardType.add(CardType.CREATURE); - color.setBlue(true); - subtype.add("Merfolk"); - subtype.add("Wizard"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; + +/** + * + * @author Loki + */ +public class MerfolkWizardToken extends Token { + + public MerfolkWizardToken() { + super("Merfolk Wizard", "1/1 blue Merfolk Wizard creature token"); + cardType.add(CardType.CREATURE); + color.setBlue(true); + subtype.add("Merfolk"); + subtype.add("Wizard"); + power = new MageInt(1); + toughness = new MageInt(1); + } +} diff --git a/Utils/known-sets.txt b/Utils/known-sets.txt index 3397c42b57..28a4e10182 100644 --- a/Utils/known-sets.txt +++ b/Utils/known-sets.txt @@ -8,6 +8,7 @@ Avacyn Restored|avacynrestored| Betrayers of Kamigawa|betrayersofkamigawa| Born of the Gods|bornofthegods| Champions of Kamigawa|championsofkamigawa| +Clash Pack|clashpack| Classic Sixth Edition|classicsixthedition| Coldsnap|coldsnap| Commander 2013 Edition|commander2013| diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 00a8867a88..f290c3fef1 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -1,4 +1,4 @@ -Ardent Plea|Alara Reborn|1|U|{1}{W}{U}|Enchantment|||Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)$Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)| +Ardent Plea|Alara Reborn|1|U|{1}{W}{U}|Enchantment|||Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)$Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)| Aven Mimeomancer|Alara Reborn|2|R|{1}{W}{U}|Creature - Bird Wizard|3|1|Flying$At the beginning of your upkeep, you may put a feather counter on target creature. If you do, that creature is 3/1 and has flying for as long as it has a feather counter on it.| Ethercaste Knight|Alara Reborn|3|C|{W}{U}|Artifact Creature - Human Knight|1|3|Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)| Ethersworn Shieldmage|Alara Reborn|4|C|{1}{W}{U}|Artifact Creature - Vedalken Wizard|2|2|Flash$When Ethersworn Shieldmage enters the battlefield, prevent all damage that would be dealt to artifact creatures this turn.| @@ -5889,6 +5889,8 @@ Hordeling Outburst|Friday Night Magic|178|U|{1}{R}{R}|Sorcery|||Put three 1/1 re Suspension Field|Friday Night Magic|179|U|{1}{W}|Enchantment|||When Suspension Field enters the battlefield, you may exile target creature with toughness 3 or greater until Suspension Field leaves the battlefield. (That creature returns under its owner's control.)| Abzan Beastmaster|Friday Night Magic|180|U|{2}{G}|Creature - Hound Shaman|2|1|At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness.| Frost Walker|Friday Night Magic|181|U|{1}{U}|Creature - Elemental|4|1|When Frost Walker becomes the target of a spell or ability, sacrifice it.| +Path to Exile|Friday Night Magic|182|U|{W}|Instant|||Exile target creature. Its controller may search his or her library for a basic land card, put that card onto the battlefield tapped, then shuffle his or her library.| +Serum Visions|Friday Night Magic|183|C|{U}|Sorcery|||Draw a card.$Scry 2. (To scry 2, look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)| Bladewing the Risen|From the Vault: Dragons|1|R|{3}{B}{B}{R}{R}|Legendary Creature - Zombie Dragon|4|4|Flying$When Bladewing the Risen enters the battlefield, you may return target Dragon permanent card from your graveyard to the battlefield.${B}{R}: Dragon creatures get +1/+1 until end of turn.| Nicol Bolas|From the Vault: Dragons|10|R|{2}{U}{U}{B}{B}{R}{R}|Legendary Creature - Elder Dragon|7|7|Flying$At the beginning of your upkeep, sacrifice Nicol Bolas unless you pay {U}{B}{R}.$Whenever Nicol Bolas deals damage to an opponent, that player discards his or her hand.| Niv-Mizzet, the Firemind|From the Vault: Dragons|11|R|{2}{U}{U}{R}{R}|Legendary Creature - Dragon Wizard|4|4|Flying$Whenever you draw a card, Niv-Mizzet, the Firemind deals 1 damage to target creature or player.${tap}: Draw a card.| @@ -7878,6 +7880,10 @@ Island|Judge Promo|90|L||Land|||({T}: Add {U} to your mana pool.)| Swamp|Judge Promo|91|L||Land|||({T}: Add {B} to your mana pool.)| Mountain|Judge Promo|92|L||Land|||({T}: Add {R} to your mana pool.)| Forest|Judge Promo|93|L||Land|||({T}: Add {G} to your mana pool.)| +Damnation|Judge Promo|94|R|{2}{B}{B}|Sorcery|||Destroy all creatures. They can't be regenerated.| +Dualcaster Mage|Judge Promo|95|R|{1}{R}{R}|Creature - Human Wizard|2|2|Flash$When Dualcaster Mage enters the battlefield, copy target instant or sorcery spell. You may choose new targets for the copy.| +Feldon of the Third Path|Judge Promo|96|M|{1}{R}{R}|Legendary Creature - Human Artificer|2|3|{2}{R}, {tap}: Put a token onto the battlefield that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.| +Ravages of War|Judge Promo|97|R|{3}{W}|Sorcery|||Destroy all lands.| Ancestor's Chosen|Judgment|1|U|{5}{W}{W}|Creature - Human Cleric|4|4|First strike (This creature deals combat damage before creatures without first strike.)$When Ancestor's Chosen enters the battlefield, you gain 1 life for each card in your graveyard.| Funeral Pyre|Judgment|10|C|{W}|Instant|||Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield.| Spellgorger Barbarian|Judgment|100|C|{3}{R}|Creature - Human Nightmare Barbarian|3|1|When Spellgorger Barbarian enters the battlefield, discard a card at random.$When Spellgorger Barbarian leaves the battlefield, draw a card.| @@ -25676,6 +25682,46 @@ Mercurial Pretender|Prerelease Events|84|Special|{4}{U}|Creature - Shapeshifter| Indulgent Tormentor|Prerelease Events|85|Special|{3}{B}{B}|Creature - Demon|5|3|Flying$At the beginning of your upkeep, draw a card unless target opponent sacrifices a creature or pays 3 life.| Siege Dragon|Prerelease Events|86|Special|{5}{R}{R}|Creature - Dragon|5|5|Flying$When Siege Dragon enters the battlefield, destroy all Walls your opponents control.$Whenever Siege Dragon attacks, if defending player controls no Walls, it deals 2 damage to each creature without flying that player controls.| Phytotitan|Prerelease Events|87|Special|{4}{G}{G}|Creature - Plant Elemental|7|2|When Phytotitan dies, return it to the battlefield tapped under its owner's control at the beginning of his or her next upkeep.| +Abzan Ascendancy|Prerelease Events|88|Special|{W}{B}{G}|Enchantment|||When Abzan Ascendancy enters the battlefield, put a +1/+1 counter on each creature you control.$Whenever a nontoken creature you control dies, put a 1/1 white Spirit creature token with flying onto the battlefield.| +Anafenza, the Foremost|Prerelease Events|89|Special|{W}{B}{G}|Legendary Creature - Human Soldier|4|4|Whenever Anafenza, the Foremost attacks, put a +1/+1 counter on another target tapped creature you control.$If a creature card would be put into an opponent's graveyard from anywhere, exile it instead.| +Ankle Shanker|Prerelease Events|90|Special|{2}{R}{W}{B}|Creature - Goblin Berserker|2|2|Haste$Whenever Ankle Shanker attacks, creatures you control gain first strike and deathtouch until end of turn.| +Avalanche Tusker|Prerelease Events|91|Special|{2}{G}{U}{R}|Creature - Elephant Warrior|6|4|Whenever Avalanche Tusker attacks, target creature defending player controls blocks it this combat if able.| +Bloodsoaked Champion|Prerelease Events|92|Special|{B}|Creature - Human Warrior|2|1|Bloodsoaked Champion can't block.$Raid - {1}{B}: Return Bloodsoaked Champion from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn.| +Butcher of the Horde|Prerelease Events|93|Special|{1}{R}{W}{B}|Creature - Demon|5|4|Flying$Sacrifice another creature: Butcher of the Horde gains your choice of vigilance, lifelink, or haste until end of turn.| +Crackling Doom|Prerelease Events|94|Special|{R}{W}{B}|Instant|||Crackling Doom deals 2 damage to each opponent. Each opponent sacrifices a creature with the greatest power among creatures he or she controls.| +Crater's Claws|Prerelease Events|95|Special|{X}{R}|Sorcery|||Crater's Claws deals X damage to target creature or player.$Ferocious - Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater.| +Deflecting Palm|Prerelease Events|96|Special|{R}{W}|Instant|||The next time a source of your choice would deal damage to you this turn, prevent that damage. If damage is prevented this way, Deflecting Palm deals that much damage to that source's controller.| +Dig Through Time|Prerelease Events|97|Special|{6}{U}{U}|Instant|||Delve (Each card you exile from your graveyard while casting this spell pays for {1}.)$Look at the top seven cards of your library. Put two of them into your hand and the rest on the bottom of your library in any order.| +Dragon-Style Twins|Prerelease Events|98|Special|{3}{R}{R}|Creature - Human Monk|3|3|Double strike$Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)| +Duneblast|Prerelease Events|99|Special|{4}{W}{B}{G}|Sorcery|||Choose up to one creature. Destroy the rest.| +Flying Crane Technique|Prerelease Events|100|Special|{3}{U}{R}{W}|Instant|||Untap all creatures you control. They gain flying and double strike until end of turn.| +Grim Haruspex|Prerelease Events|101|Special|{2}{B}|Creature - Human Wizard|3|2|Morph {B} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$Whenever another nontoken creature you control dies, draw a card.| +Hardened Scales|Prerelease Events|102|Special|{G}|Enchantment|||If one or more +1/+1 counters would be placed on a creature you control, that many plus one +1/+1 counters are placed on it instead.| +Herald of Anafenza|Prerelease Events|103|Special|{W}|Creature - Human Soldier|1|2|Outlast {2}{W} ({2}{W}, {tap}: Put a +1/+1 counter on this creature. Outlast only as a sorcery.)$Whenever you activate Herald of Anafenza's outlast ability, put a 1/1 white Warrior creature token onto the battlefield.| +High Sentinels of Arashin|Prerelease Events|104|Special|{3}{W}|Creature - Bird Soldier|3|4|Flying$High Sentinels of Arashin gets +1/+1 for each other creature you control with a +1/+1 counter on it.${3}{W}: Put a +1/+1 counter on target creature.| +Icy Blast|Prerelease Events|105|Special|{X}{U}|Instant|||Tap X target creatures.$Ferocious - If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps.| +Ivorytusk Fortress|Prerelease Events|106|Special|{2}{W}{B}{G}|Creature - Elephant|5|7|Untap each creature you control with a +1/+1 counter on it during each other player's untap step.| +Jeering Instigator|Prerelease Events|107|Special|{1}{R}|Creature - Goblin Rogue|2|1|Morph {2}{R} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Jeering Instigator is turned face up, if it's your turn, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn.| +Jeskai Ascendancy|Prerelease Events|108|Special|{U}{R}{W}|Enchantment|||Whenever you cast a noncreature spell, creatures you control get +1/+1 until end of turn. Untap those creatures.$Whenever you cast a noncreature spell, you may draw a card. If you do, discard a card.| +Kheru Lich Lord|Prerelease Events|109|Special|{3}{B}{G}{U}|Creature - Zombie Wizard|4|4|At the beginning of your upkeep, you may pay {2}{B}. If you do, return a creature card at random from your graveyard to the battlefield. It gains flying, trample, and haste. Exile that card at the beginning of your next end step. If it would leave the battlefield, exile it instead of putting it anywhere else.| +Mardu Ascendancy|Prerelease Events|110|Special|{R}{W}{B}|Enchantment|||Whenever a nontoken creature you control attacks, put a 1/1 red Goblin creature token onto the battlefield tapped and attacking.$Sacrifice Mardu Ascendancy: Creatures you control get +0/+3 until end of turn.| +Master of Pearls|Prerelease Events|111|Special|{1}{W}|Creature - Human Monk|2|2|Morph {3}{W}{W} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Master of Pearls is turned face up, creatures you control get +2/+2 until end of turn.| +Narset, Enlightened Master|Prerelease Events|112|Special|{3}{U}{R}{W}|Legendary Creature - Human Monk|3|2|First strike, hexproof$Whenever Narset, Enlightened Master attacks, exile the top four cards of your library. Until end of turn, you may cast noncreature cards exiled with Narset this turn without paying their mana costs.| +Necropolis Fiend|Prerelease Events|113|Special|{7}{B}{B}|Creature - Demon|4|5|Delve (Each card you exile from your graveyard while casting this spell pays for {1}.)$Flying${X}, {tap}, Exile X cards from your graveyard: Target creature gets -X/-X until end of turn.| +Rakshasa Vizier|Prerelease Events|114|Special|{2}{B}{G}{U}|Creature - Cat Demon|4|4|Whenever one or more cards are put into exile from your graveyard, put that many +1/+1 counters on Rakshasa Vizier.| +Rattleclaw Mystic|Prerelease Events|115|Special|{1}{G}|Creature - Human Shaman|2|1|{tap}: Add {G}, {U}, or {R} to your mana pool.$Morph {2} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Rattleclaw Mystic is turned face up, add {G}{U}{R} to your mana pool.| +Sage of the Inward Eye|Prerelease Events|116|Special|{2}{U}{R}{W}|Creature - Djinn Wizard|3|4|Flying$Whenever you cast a noncreature spell, creatures you control gain lifelink until end of turn.| +Sidisi, Brood Tyrant|Prerelease Events|117|Special|{1}{B}{G}{U}|Legendary Creature - Naga Shaman|3|3|Whenever Sidisi, Brood Tyrant enters the battlefield or attacks, put the top three cards of your library into your graveyard.$Whenever one or more creature cards are put into your graveyard from your library, put a 2/2 black Zombie creature token onto the battlefield.| +Siege Rhino|Prerelease Events|118|Special|{1}{W}{B}{G}|Creature - Rhino|4|5|Trample$When Siege Rhino enters the battlefield, each opponent loses 3 life and you gain 3 life.| +Sultai Ascendancy|Prerelease Events|119|Special|{B}{G}{U}|Enchantment|||At the beginning of your upkeep, look at the top two cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.| +Surrak Dragonclaw|Prerelease Events|120|Special|{2}{G}{U}{R}|Legendary Creature - Human Warrior|6|6|Flash$Surrak Dragonclaw can't be countered.$Creature spells you control can't be countered.$Other creatures you control have trample.| +Temur Ascendancy|Prerelease Events|121|Special|{G}{U}{R}|Enchantment|||Creatures you control have haste.$Whenever a creature with power 4 or greater enters the battlefield under your control, you may draw a card.| +Thousand Winds|Prerelease Events|122|Special|{4}{U}{U}|Creature - Elemental|5|6|Flying$Morph {5}{U}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)$When Thousand Winds is turned face up, return all other tapped creatures to their owners' hands.| +Trail of Mystery|Prerelease Events|123|Special|{1}{G}|Enchantment|||Whenever a face-down creature enters the battlefield under your control, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.$Whenever a permanent you control is turned face up, if it's a creature, it gets +2/+2 until end of turn.| +Trap Essence|Prerelease Events|124|Special|{G}{U}{R}|Instant|||Counter target creature spell. Put two +1/+1 counters on up to one target creature.| +Utter End|Prerelease Events|125|Special|{2}{W}{B}|Instant|||Exile target nonland permanent.| +Villainous Wealth|Prerelease Events|126|Special|{X}{B}{G}{U}|Sorcery|||Target opponent exiles the top X cards of his or her library. You may cast any number of nonland cards with converted mana cost X or less from among them without paying their mana costs.| +Zurgo Helmsmasher|Prerelease Events|127|Special|{2}{R}{W}{B}|Legendary Creature - Orc Warrior|7|2|Haste$Zurgo Helmsmasher attacks each combat if able.$Zurgo Helmsmasher has indestructible as long as it's your turn.$Whenever a creature dealt damage by Zurgo Helmsmasher this turn dies, put a +1/+1 counter on Zurgo Helmsmasher.| Scion of Ugin|Dragons of Tarkir|1|U|{6}|Creature - Dragon Spirit|4|4|Flying| Anafenza, Kin-Tree Spirit|Dragons of Tarkir|2|R|{W}{W}|Legendary Creature - Spirit Soldier|2|2|Whenever another nontoken creature enters the battlefield under your control, bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.)| Arashin Foremost|Dragons of Tarkir|3|R|{1}{W}{W}|Creature - Human Warrior|2|2|Double strike$Whenever Arashin Foremost enters the battlefield or attacks, another target Warrior creature you control gains double strike until end of turn.| @@ -26189,41 +26235,33 @@ Sickle Ripper|Modern Masters 2015 Edition|96|C|{1}{B}|Creature - Elemental Warri Sign in Blood|Modern Masters 2015 Edition|97|C|{B}{B}|Sorcery|||Target player draws two cards and loses 2 life.| Spread the Sickness|Modern Masters 2015 Edition|98|U|{4}{B}|Sorcery|||Destroy target creature, then proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.)| Surgical Extraction|Modern Masters 2015 Edition|99|R|{BP}|Instant|||({BP} can be paid with either {B} or 2 life.)$Choose target card in a graveyard other than a basic land card. Search its owner's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library.| -Charging Griffin|Magic Origins|?|C|{3}{W}{3}{W}|Creature - Griffin|2|22|2|Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.$Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.| -Mighty Leap|Magic Origins|?|C|{1}{W}{1}{W}|Instant|||Target creature gets +2/+2 and gains flying until end of turn.$Target creature gets +2/+2 and gains flying until end of turn.| -Yoked Ox|Magic Origins|?|C|{W}{W}|Creature - Ox|0|40|4|| Akroan Jailer|Magic Origins|1|C|{W}|Creature - Human Soldier|1|1|{2}{W}, {T}: Tap target creature.| +Charging Griffin|Magic Origins|9|C|{3}{W}{3}{W}|Creature - Griffin|2|22|2|Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.$Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.| Grasp of the Hieromancer|Magic Origins|15|C|{1}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +1/+1 and has "Whenever this creature attacks, tap target creature defending player controls."| Heavy Infantry|Magic Origins|18|C|{4}{W}|Creature - Human Soldier|3|4|When Heavy Infantry enters the battlefield, tap target creature an opponent controls.| Hixus, Prison Warden|Magic Origins|19|R|{3}{W}{W}{3}{W}{W}|Legendary Creature - Human Soldier|4|44|4|Flash$Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield.$Flash$Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield.| Gideon, Battle-Forged|Magic Origins|23|M||Planeswalker - Gideon|3|+2: Up to one target creature an opponent controls attacks Gideon, Battle-Forged during its controller's next turn if able.$+1: Until your next turn, target creature gains indestructible. Untap that creature.$0: Until end of turn, Gideon, Battle-Forged becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.| Kytheon, Hero of Akros|Magic Origins|23|M|{W}|Legendary Creature - Human Soldier|2|1|At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon, then return him to the battlefield transformed under his owner's control.${2}{W}: Kytheon gains indestructible until end of turn.| +Mighty Leap|Magic Origins|26|C|{1}{W}{1}{W}|Instant|||Target creature gets +2/+2 and gains flying until end of turn.$Target creature gets +2/+2 and gains flying until end of turn.| Sentinel of the Eternal Watch|Magic Origins|30|U|{5}{W}|Creature - Giant Soldier|4|6|Vigilance (Attacking doesn't cause this creature to tap.)$At the beginning of combat on each opponent's turn, tap target creature that player controls.| Valor in Akros|Magic Origins|39|U|{3}{W}|Enchantment|||Whenever a creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn.| -Aegis Angel|Magic Origins|273|R|{4}{W}{W}{4}{W}{W}|Creature - Angel|5|55|5|Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.$Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.| -Divine Verdict|Magic Origins|274|C|{3}{W}{3}{W}|Instant|||Destroy target attacking or blocking creature.$Destroy target attacking or blocking creature.| -Eagle of the Watch|Magic Origins|275|C|{2}{W}|Creature - Bird|2|1|Flying, vigilance| -Serra Angel|Magic Origins|276|U|{3}{W}{W}{3}{W}{W}|Creature - Angel|4|44|4|Flying$Vigilance$Flying$Vigilance| -Claustrophobia|Magic Origins|?|C|{1}{U}{U}{1}{U}{U}|Enchantment - Aura|||$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| -Disperse|Magic Origins|?|C|{1}{U}{1}{U}|Instant|||Return target nonland permanent to its owner's hand.$Return target nonland permanent to its owner's hand.| +Yoked Ox|Magic Origins|42|C|{W}{W}|Creature - Ox|0|40|4|| +Claustrophobia|Magic Origins|50|C|{1}{U}{U}{1}{U}{U}|Enchantment - Aura|||$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| +Disperse|Magic Origins|54|C|{1}{U}{1}{U}|Instant|||Return target nonland permanent to its owner's hand.$Return target nonland permanent to its owner's hand.| Displacement Wave|Magic Origins|?|?mtg-set-icon mtg-set-magic-origins-unknown|{X}{U}{U}{X}{U}{U}|Sorcery|||Return all nonland permanents with converted mana cost X or less to their owners' hands.$Return all nonland permanents with converted mana cost X or less to their owners' hands.| -Maritime Guard|Magic Origins|?|C|{1}{U}{1}{U}|Creature - Merfolk Soldier|1|31|3|| Mizzium Meddler|Magic Origins|?|R|{2}{U}{2}{U}|Creature - Vedalken Wizard|1|41|4|Flash$When Mizzium Meddler enters the battlefield, change a target of target spell or ability to Mizzium Meddler.$Flash$When Mizzium Meddler enters the battlefield, change a target of target spell or ability to Mizzium Meddler.| -Scrapskin Drake|Magic Origins|?|C|{2}{U}{2}{U}|Creature - Zombie Drake|2|32|3|Flying$Scrapskin Drake can block only creatures with flying.$Flying$Scrapskin Drake can block only creatures with flying.| -Tower Geist|Magic Origins|?|U|{3}{U}{3}{U}|Creature - Spirit|2|22|2|Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.$Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.| Hydrolash|Magic Origins|59|U|{2}{U}|Instant|||Attacking creatures get -2/-0 until end of turn.$Draw a card.| Jace, Telepath Unbound|Magic Origins|60|M||Planeswalker - Jace|55|+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". $+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". | Jace, Vryn's Prodigy|Magic Origins|60|M|{1}{U}{1}{U}|Legendary Creature - Human Wizard|0|20|2|{T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn''s Prodigy, then return him to the battefield transformed under his owner's control. ${T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn''s Prodigy, then return him to the battefield transformed under his owner's control. | Jhessian Thief|Magic Origins|62|U|{2}{U}|Creature - Human Rogue|1|3|Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)$Whenever Jhessian Thief deals combat damage to a player, draw a card.| -Ringwarden Owl|Magic Origins|068|C|{3}{U}{U}|Creature - Bird|3|3|Flying (This creature can't be blocked except by creatures with flying or reach.)$Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)| +Maritime Guard|Magic Origins|63|C|{1}{U}{1}{U}|Creature - Merfolk Soldier|1|31|3|| +Ringwarden Owl|Magic Origins|68|C|{3}{U}{U}|Creature - Bird|3|3|Flying (This creature can't be blocked except by creatures with flying or reach.)$Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)| +Scrapskin Drake|Magic Origins|69|C|{2}{U}{2}{U}|Creature - Zombie Drake|2|32|3|Flying$Scrapskin Drake can block only creatures with flying.$Flying$Scrapskin Drake can block only creatures with flying.| Separatist Voidmage|Magic Origins|72|C|{3}{U}|Creature - Human Wizard|2|2|When Separatist Voidmage enters the battlefield, you may return target creature to its owner's hand.| Sphinx's Tutelage|Magic Origins|76|U|{2}{U}|Enchantment|||Whenever you draw a card, target opponent puts the top two cards of his or her library into his or her graveyard. If they're both nonland cards that share a color, repeat this process.${5}{U}: Draw a card, then discard a card.| -Into the Void|Magic Origins|277|U|{3}{U}{3}{U}|Sorcery|||Return up to two target creatures to their owners' hands.$Return up to two target creatures to their owners' hands.| -Mahamoti Djinn|Magic Origins|278|R|{4}{U}{U}{4}{U}{U}|Creature - Djinn|5|65|6|Flying$Flying| -Weave Fate|Magic Origins|279|C|{3}{U}{3}{U}|Instant|||Draw two cards.$Draw two cards.| -Catacomb Slug|Magic Origins|?|C|{4}{B}{4}{B}|Creature - Slug|2|62|6|| -Cruel Revival|Magic Origins|?|C|{4}{B}{4}{B}|Instant|||Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.$Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.| -Weight of the Underworld|Magic Origins|?|C|{3}{B}{3}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets -3/-2.$Enchant creature$Enchanted creature gets -3/-2.| +Tower Geist|Magic Origins|80|U|{3}{U}{3}{U}|Creature - Spirit|2|22|2|Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.$Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.| +Catacomb Slug|Magic Origins|86|C|{4}{B}{4}{B}|Creature - Slug|2|62|6|| +Cruel Revival|Magic Origins|88|C|{4}{B}{4}{B}|Instant|||Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.$Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.| Deadbridge Shaman|Magic Origins|91|C|{2}{B}|Creature - Elf Shaman|3|1|When Deadbridge Shaman dies, target opponent discards a card.| Eyeblight Assassin|Magic Origins|95|C|{2}{B}|Creature - Elf Assassin|2|2|When Eyeblight Assassin enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn.| Infernal Scarring|Magic Origins|102|C|{1}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+0 and has "When this creature dies, draw a card."| @@ -26233,14 +26271,8 @@ Malakir Cullblade|Magic Origins|108|U|{1}{B}|Creature - Vampire Warrior|1|1|When Rabid Bloodsucker|Magic Origins|113|C|{4}{B}|Creature - Vampire|3|2|Flying$When Rabid Bloodsucker enters the battlefield, each player loses 2 life.| Reave Soul|Magic Origins|115|C|{1}{B}|Sorcery|||Destroy target creature with power 3 or less.| Shambling Ghoul|Magic Origins|119|C|{1}{B}|Creature - Zombie|2|3|Shambling Ghoul enters the battlefield tapped.| -Flesh to Dust|Magic Origins|280|C|{3}{B}{B}{3}{B}{B}|Instant|||Destroy target creature. It can't be regenerated.$Destroy target creature. It can't be regenerated.| -Mind Rot|Magic Origins|281|C|{2}{B}{2}{B}|Sorcery|||Target player discards two cards.$Target player discards two cards.| -Nightmare|Magic Origins|282|R|{5}{B}{5}{B}|Creature - Nightmare Horse|0|00|0|Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.$Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.| -Sengir Vampire|Magic Origins|283|U|{3}{B}{B}{3}{B}{B}|Creature - Vampire|4|44|4|Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.$Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.| -Act of Treason|Magic Origins|?|C|{2}{R}{2}{R}|Sorcery|||Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.$Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.| -Cobblebrute|Magic Origins|?|C|{3}{R}{3}{R}|Creature - Elemental|5|25|2|| -Fiery Conclusion|Magic Origins|?|C|{1}{R}{1}{R}|Instant|||As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.$As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.| -Titan's Strength|Magic Origins|?|C|{R}{R}|Instant|||Target creature gets +3/+1 until end of turn. Scry 1.$Target creature gets +3/+1 until end of turn. Scry 1.| +Weight of the Underworld|Magic Origins|126|C|{3}{B}{3}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets -3/-2.$Enchant creature$Enchanted creature gets -3/-2.| +Act of Treason|Magic Origins|129|C|{2}{R}{2}{R}|Sorcery|||Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.$Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.| Avaricious Dragon|Magic Origins|131|M|{2}{R}{R}|Creature - Dragon|4|4|Flying$At the beginning of your draw step, draw an additional card.$At the beginning of your end step, discard your hand.| Bellows Lizard|Magic Origins|132|C|{R}{R}|Creature - Lizard|1|11|1|{1}{R}: Bellows Lizard gets +1/+0 until end of turn.${1}{R}: Bellows Lizard gets +1/+0 until end of turn.| Boggart Brute|Magic Origins|133|C|{2}{R}|Creature - Goblin Warrior|3|2|Menace (This creature can't be blocked except by two or more creatures.)| @@ -26248,19 +26280,20 @@ Chandra, Fire of Kaladesh|Magic Origins|135|M|{1}{R}{R}{1}{R}{R}|Legendary Creat Chandra, Roaring Flame|Magic Origins|135|M||Planeswalker - Chandra|44|+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."$+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."| Chandra's Fury|Magic Origins|136|C|{4}{R}{4}{R}|Instant|||Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls.$Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls.| Chandra's Ignition|Magic Origins|137|R|{3}{R}{R}|Sorcery|||Target creature you control deals damage equal to its power to each other creature and each opponent.| +Cobblebrute|Magic Origins|138|C|{3}{R}{3}{R}|Creature - Elemental|5|25|2|| Enthralling Victor|Magic Origins|142|U|{3}{R}|Creature - Human Warrior|3|2|When Enthralling Victor enters the battlefield, gain control of target creature an opponent controls with power 2 or less until end of turn. Untap that creature. It gains haste until end of turn.| +Fiery Conclusion|Magic Origins|144|C|{1}{R}{1}{R}|Instant|||As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.$As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.| Lightning Javelin|Magic Origins|153|C|{3}{R}|Sorcery|||Lightning Javelin deals 3 damage to target creature or player. Scry 1.| Pia and Kiran Nalaar|Magic Origins|157|R|{2}{R}{R}|Legendary Creature - Human Artificer|2|2|When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield.${2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player.| Ravaging Blaze|Magic Origins|159|U|{X}{R}{R}|Instant|||Ravaging Blaze deals X damage to target creature. $Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller.| Seismic Elemental|Magic Origins|161|U|{3}{R}{R}|Creature - Elemental|4|4|When Seismic Elemental enters the battlefield, creatures without flying can't block this turn.| Subterranean Scout|Magic Origins|164|C|{1}{R}|Creature - Goblin Scout|2|1|When Subterranean Scout enters the battlefield, target creature with power 2 or less can't be blocked this turn.| +Titan's Strength|Magic Origins|166|C|{R}{R}|Instant|||Target creature gets +3/+1 until end of turn. Scry 1.$Target creature gets +3/+1 until end of turn. Scry 1.| Volcanic Rambler|Magic Origins|167|C|{5}{R}|Creature - Elemental|6|4|{2}{R}: Volcanic Rambler deals 1 damage to target player.| -Fiery Hellhound|Magic Origins|284|C|{1}{R}{R}{1}{R}{R}|Creature - Elemental Hound|2|22|2|{R}: Fiery Hellhound gets +1/+0 until end of turn.${R}: Fiery Hellhound gets +1/+0 until end of turn.| -Shivan Dragon|Magic Origins|285|R|{4}{R}{R}{4}{R}{R}|Creature - Dragon|5|55|5|Flying${R}: Shivan Dragon gets +1/+0 until end of turn.$Flying${R}: Shivan Dragon gets +1/+0 until end of turn.| -Elvish Visionary|Magic Origins|?|C|{1}{G}{1}{G}|Creature - Elf Shaman|1|11|1|When Elvish Visionary enters the battlefield, draw a card.$When Elvish Visionary enters the battlefield, draw a card.| -Leaf Gilder|Magic Origins|?|C|{1}{G}{1}{G}|Creature - Elf Druid|2|12|1|{T}: Add {G} to your mana pool.${T}: Add {G} to your mana pool.| +Elvish Visionary|Magic Origins|175|C|{1}{G}{1}{G}|Creature - Elf Shaman|1|11|1|When Elvish Visionary enters the battlefield, draw a card.$When Elvish Visionary enters the battlefield, draw a card.| +Leaf Gilder|Magic Origins|184|C|{1}{G}{1}{G}|Creature - Elf Druid|2|12|1|{T}: Add {G} to your mana pool.${T}: Add {G} to your mana pool.| Titanic Growth|Magic Origins|?|C|{1}{G}{1}{G}|Instant|||Target creature gets +4/+4 until end of turn.$Target creature gets +4/+4 until end of turn.| -Vastwood Gorger|Magic Origins|?|C|{5}{G}{5}{G}|Creature - Wurm|5|65|6|| +Vastwood Gorger|Magic Origins|204|C|{5}{G}{5}{G}|Creature - Wurm|5|65|6|| Yeva's Forcemage|Magic Origins|?|C|{2}{G}{2}{G}|Creature - Elf Shaman|2|22|2|When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.$When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.| Conclave Naturalists|Magic Origins|171|U|{4}{G}|Creature - Dryad|4|4|When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment.| Dwynen, Gilt-Leaf Daen|Magic Origins|172|R|{2}{G}{G}|Legendary Creature - Elf Warrior|3|4|Reach$Other Elf creatures you control get +1/+1.$Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control.| @@ -26270,15 +26303,28 @@ Joraga Invocation|Magic Origins|183|U|{4}{G}{G}|Sorcery|||Each creature you cont Mantle of Webs|Magic Origins|187|C|{1}{G}|Enchantment - Aura|||Enchant Creature$Enchanted creature gets +1/+3 and has reach.| Nissa, Sage Animist|Magic Origins|189|M||Planeswalker - Nissa|33|+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.$+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.| Nissa, Vastwood Seer|Magic Origins|189|M|{2}{G}{2}{G}|Legendary Creature - Elf Scout|2|22|2|When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.$When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.| +Zendikar Incarnate|Magic Origins|219|U|{2}{R}{G}|Creature - Elemental|0|4|Zendikar Incarnate's power is equal to the amount of lands you control.| +Gold-Forged Sentinel|Magic Origins|226|U|{6}{6}|Artifact Creature - Chimera|4|44|4|Flying$Flying| +Jayemdae Tome|Magic Origins|231|U|{4}{4}|Artifact|||{4}, {T}: Draw a card.${4}, {T}: Draw a card.| +Meteorite|Magic Origins|233|U|{5}{5}|Artifact|||When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.$When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.| +Runed Servitor|Magic Origins|238|U|{2}{2}|Artifact Creature - Construct|2|22|2|When Runed Servitor dies, each player draws a card.$When Runed Servitor dies, each player draws a card.| +Veteran's Sidearm|Magic Origins|242|C|{2}|Artifact - Equipment|||Equipped creature gets +1/+1.$Equip {1}| +Aegis Angel|Magic Origins|273|R|{4}{W}{W}{4}{W}{W}|Creature - Angel|5|55|5|Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.$Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.| +Divine Verdict|Magic Origins|274|C|{3}{W}{3}{W}|Instant|||Destroy target attacking or blocking creature.$Destroy target attacking or blocking creature.| +Eagle of the Watch|Magic Origins|275|C|{2}{W}|Creature - Bird|2|1|Flying, vigilance| +Serra Angel|Magic Origins|276|U|{3}{W}{W}{3}{W}{W}|Creature - Angel|4|44|4|Flying$Vigilance$Flying$Vigilance| +Into the Void|Magic Origins|277|U|{3}{U}{3}{U}|Sorcery|||Return up to two target creatures to their owners' hands.$Return up to two target creatures to their owners' hands.| +Mahamoti Djinn|Magic Origins|278|R|{4}{U}{U}{4}{U}{U}|Creature - Djinn|5|65|6|Flying$Flying| +Weave Fate|Magic Origins|279|C|{3}{U}{3}{U}|Instant|||Draw two cards.$Draw two cards.| +Flesh to Dust|Magic Origins|280|C|{3}{B}{B}{3}{B}{B}|Instant|||Destroy target creature. It can't be regenerated.$Destroy target creature. It can't be regenerated.| +Mind Rot|Magic Origins|281|C|{2}{B}{2}{B}|Sorcery|||Target player discards two cards.$Target player discards two cards.| +Nightmare|Magic Origins|282|R|{5}{B}{5}{B}|Creature - Nightmare Horse|0|00|0|Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.$Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.| +Sengir Vampire|Magic Origins|283|U|{3}{B}{B}{3}{B}{B}|Creature - Vampire|4|44|4|Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.$Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.| +Fiery Hellhound|Magic Origins|284|C|{1}{R}{R}{1}{R}{R}|Creature - Elemental Hound|2|22|2|{R}: Fiery Hellhound gets +1/+0 until end of turn.${R}: Fiery Hellhound gets +1/+0 until end of turn.| +Shivan Dragon|Magic Origins|285|R|{4}{R}{R}{4}{R}{R}|Creature - Dragon|5|55|5|Flying${R}: Shivan Dragon gets +1/+0 until end of turn.$Flying${R}: Shivan Dragon gets +1/+0 until end of turn.| Plummet|Magic Origins|286|C|{1}{G}{1}{G}|Instant|||Destroy target creature with flying.$Destroy target creature with flying.| Prized Unicorn|Magic Origins|287|U|{3}{G}{3}{G}|Creature - Unicorn|2|22|2|All creatures able to block Prized Unicorn do so.$All creatures able to block Prized Unicorn do so.| Terra Stomper|Magic Origins|288|R|{3}{G}{G}{G}{3}{G}{G}{G}|Creature - Beast|8|88|8|Terra Stomper can't be countered.$Trample$Terra Stomper can't be countered.$Trample| -Zendikar Incarnate|Magic Origins|219|U|{2}{R}{G}|Creature - Elemental|0|4|Zendikar Incarnate's power is equal to the amount of lands you control.| -Meteorite|Magic Origins|?|U|{5}{5}|Artifact|||When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.$When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.| -Gold-Forged Sentinel|Magic Origins|?|U|{6}{6}|Artifact Creature - Chimera|4|44|4|Flying$Flying| -Runed Servitor|Magic Origins|?|U|{2}{2}|Artifact Creature - Construct|2|22|2|When Runed Servitor dies, each player draws a card.$When Runed Servitor dies, each player draws a card.| -Jayemdae Tome|Magic Origins|?|U|{4}{4}|Artifact|||{4}, {T}: Draw a card.${4}, {T}: Draw a card.| -Veteran's Sidearm|Magic Origins|242|C|{2}|Artifact - Equipment|||Equipped creature gets +1/+1.$Equip {1}| Ambush Commander|Duel Decks: Anthology, Elves vs. Goblins|1|R|{3}{G}{G}|Creature - Elf|2|2|Forests you control are 1/1 green Elf creatures that are still lands.${1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.| Lys Alana Huntmaster|Duel Decks: Anthology, Elves vs. Goblins|10|C|{2}{G}{G}|Creature - Elf Warrior|3|3|Whenever you cast an Elf spell, you may put a 1/1 green Elf Warrior creature token onto the battlefield.| Stonewood Invoker|Duel Decks: Anthology, Elves vs. Goblins|11|C|{1}{G}|Creature - Elf Mutant|2|2|{7}{G}: Stonewood Invoker gets +5/+5 until end of turn.| @@ -26914,4 +26960,16 @@ Mountain|Tempest Remastered|265|L||Basic Land - Mountain|||R| Forest|Tempest Remastered|266|L||Basic Land - Forest|||G| Forest|Tempest Remastered|267|L||Basic Land - Forest|||G| Forest|Tempest Remastered|268|L||Basic Land - Forest|||G| -Forest|Tempest Remastered|269|L||Basic Land - Forest|||G| \ No newline at end of file +Forest|Tempest Remastered|269|L||Basic Land - Forest|||G| +Prognostic Sphinx|Clash Pack|1|Special|{3}{U}{U}|Creature - Sphinx|3|5|Flying$Discard a card: Prognostic Sphinx gains hexproof until end of turn. Tap it.$Whenever Prognostic Sphinx attacks, scry 3. (Look at the top three cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.)| +Fated Intervention|Clash Pack|2|Special|{2}{G}{G}{G}|Insant|||Put two 3/3 green Centaur enchantment creature tokens onto the battlefield. If it's your turn, scry 2.| +Font of Fertility|Clash Pack|3|Special|{G}|Enchantment|||{1}{G}, Sacrifice Font of Fertility: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.| +Hydra Broodmaster|Clash Pack|4|Special|{4}{G}{G}|Creature - Hydra|7|7|{X}{X}{G}: Monstrosity X. (If this creature isn't monstrous, put X +1/+1 counters on it and it becomes monstrous.)$When Hydra Broodmaster becomes monstrous, put X X/X green Hydra creature tokens onto the battlefield.| +Prophet of Kruphix|Clash Pack|5|Special|{3}{U}{G}|Creature - Human Wizard|2|3|Untap all creatures and lands you control during each other player's untap step.$You may cast creature cards as though they had flash.| +Temple of Mystery|Clash Pack|6|Special||Land|||Temple of Mystery enters the battlefield tapped.$When Temple of Mystery enters the battlefield, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)${tap}: Add {G} or {U} to your mana pool.| +Necropolis Fiend|Clash Pack|7|Special|{7}{B}{B}|Creature - Demon|4|5|Delve (Each card you exile from your graveyard while casting this spell pays for {1}.)$Flying${X}, {tap}, Exile X cards from your graveyard: Target creature gets -X/-X until end of turn.| +Hero's Downfall|Clash Pack|8|Special|{1}{B}{B}|Instant|||Destroy target creature or planeswalker.| +Sultai Ascendancy|Clash Pack|9|Special|{B}{G}{U}|Enchantment|||At the beginning of your upkeep, look at the top two cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.| +Reaper of the Wilds|Clash Pack|10|Special|{2}{B}{G}|Creature - Gorgon|4|5|Whenever another creature dies, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)${B}: Reaper of the Wilds gains deathtouch until end of turn.${1}{G}: Reaper of the Wilds gains hexproof until end of turn.| +Whip of Erebos|Clash Pack|11|Special|{2}{B}{B}|Legendary Enchantment Artifact|||Creatures you control have lifelink.${2}{B}{B}, {tap}: Return target creature card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step. If it would leave the battlefield, exile it instead of putting it anywhere else. Activate this ability only any time you could cast a sorcery.| +Courser of Kruphix|Clash Pack|12|Special|{1}{G}{G}|Enchantment Creature Centaur|2|4|Play with the top card of your library revealed.$You may play the top card of your library if it's a land card.$Whenever a land enters the battlefield under your control, you gain 1 life.| \ No newline at end of file diff --git a/Utils/mtg-sets-data.txt b/Utils/mtg-sets-data.txt index 5d9cfa41e0..c1af58d3ac 100644 --- a/Utils/mtg-sets-data.txt +++ b/Utils/mtg-sets-data.txt @@ -21,6 +21,7 @@ Beatdown Box Set|BTD| Born of the Gods|BNG| Champions of Kamigawa|CHK| Chronicles|CHR| +Clash Pack|CLASH| Commander 2013 Edition|C13| Commander 2014 Edition|C14| Conflux|CON| From 993db1b04da80d46bcf591874078879bb37314e0 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Mon, 22 Jun 2015 20:15:53 -0500 Subject: [PATCH 42/42] Updated mtg-cards-data with new spoilers and cleaned up a double power/toughness/loyalty issue in the file. (maybe script problem?) Removed set color flag from a couple merfolk cards I had changed the token info in. --- .../src/mage/sets/lorwyn/Benthicore.java | 1 - .../src/mage/sets/lorwyn/SummonTheSchool.java | 2 +- Utils/mtg-cards-data.txt | 107 ++++++++++-------- 3 files changed, 61 insertions(+), 49 deletions(-) diff --git a/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java b/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java index 13503b6c74..bf454890b0 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java +++ b/Mage.Sets/src/mage/sets/lorwyn/Benthicore.java @@ -67,7 +67,6 @@ public class Benthicore extends CardImpl { super(ownerId, 53, "Benthicore", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{6}{U}"); this.expansionSetCode = "LRW"; this.subtype.add("Elemental"); - this.color.setBlue(true); this.power = new MageInt(5); this.toughness = new MageInt(5); diff --git a/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java b/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java index ca8c1add57..a06e49f902 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java +++ b/Mage.Sets/src/mage/sets/lorwyn/SummonTheSchool.java @@ -61,7 +61,7 @@ public class SummonTheSchool extends CardImpl { super(ownerId, 42, "Summon the School", Rarity.UNCOMMON, new CardType[]{CardType.TRIBAL, CardType.SORCERY}, "{3}{W}"); this.expansionSetCode = "LRW"; this.subtype.add("Merfolk"); - this.color.setWhite(true); + // Put two 1/1 blue Merfolk Wizard creature tokens onto the battlefield. this.getSpellAbility().addEffect(new CreateTokenEffect(new MerfolkWizardToken(), 2)); // Tap four untapped Merfolk you control: Return Summon the School from your graveyard to your hand. diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index f290c3fef1..52bea82e0b 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -26236,95 +26236,108 @@ Sign in Blood|Modern Masters 2015 Edition|97|C|{B}{B}|Sorcery|||Target player dr Spread the Sickness|Modern Masters 2015 Edition|98|U|{4}{B}|Sorcery|||Destroy target creature, then proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.)| Surgical Extraction|Modern Masters 2015 Edition|99|R|{BP}|Instant|||({BP} can be paid with either {B} or 2 life.)$Choose target card in a graveyard other than a basic land card. Search its owner's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library.| Akroan Jailer|Magic Origins|1|C|{W}|Creature - Human Soldier|1|1|{2}{W}, {T}: Tap target creature.| -Charging Griffin|Magic Origins|9|C|{3}{W}{3}{W}|Creature - Griffin|2|22|2|Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.$Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.| +Blessed Spirits|Magic Origins|7|U|{2}{W}|Creature - Spirit|2|2|Flying$Whenever you cast an enchantment spell, put a +1/+1 counter on Blessed Spirits.| +Charging Griffin|Magic Origins|9|C|{3}{W}|Creature - Griffin|2|2|Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.$Flying$Whenever Charging Griffin attacks, it gets +1/+1 until end of turn.| +Enshrouding Mist|Magic Origins|13|C|{W}|Instant|||Target creature gets +1/+1 until end of turn. Prevent all damage that would dealt to it this turn. If it's renowned, untap it.| Grasp of the Hieromancer|Magic Origins|15|C|{1}{W}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +1/+1 and has "Whenever this creature attacks, tap target creature defending player controls."| Heavy Infantry|Magic Origins|18|C|{4}{W}|Creature - Human Soldier|3|4|When Heavy Infantry enters the battlefield, tap target creature an opponent controls.| -Hixus, Prison Warden|Magic Origins|19|R|{3}{W}{W}{3}{W}{W}|Legendary Creature - Human Soldier|4|44|4|Flash$Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield.$Flash$Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield.| +Hixus, Prison Warden|Magic Origins|19|R|{3}{W}{W}|Legendary Creature - Human Soldier|4|4|Flash$Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield.$Flash$Whenever a creature deals combat damage to you, if Hixus, Prison Warden entered the battlefield this turn, exile that creature until Hixus leaves the battlefield.| +Knight of the Pilgrim's Road|Magic Origins|20|C|{2}{W}|Creature - Human Knight|3|2|Renown 1 (When this creature deals combat damage to a player, if it isn't renowned, put a +1/+1 counter on it and it becomes renowned.)| Gideon, Battle-Forged|Magic Origins|23|M||Planeswalker - Gideon|3|+2: Up to one target creature an opponent controls attacks Gideon, Battle-Forged during its controller's next turn if able.$+1: Until your next turn, target creature gains indestructible. Untap that creature.$0: Until end of turn, Gideon, Battle-Forged becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.| Kytheon, Hero of Akros|Magic Origins|23|M|{W}|Legendary Creature - Human Soldier|2|1|At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon, then return him to the battlefield transformed under his owner's control.${2}{W}: Kytheon gains indestructible until end of turn.| -Mighty Leap|Magic Origins|26|C|{1}{W}{1}{W}|Instant|||Target creature gets +2/+2 and gains flying until end of turn.$Target creature gets +2/+2 and gains flying until end of turn.| +Mighty Leap|Magic Origins|26|C|{1}{W}|Instant|||Target creature gets +2/+2 and gains flying until end of turn.$Target creature gets +2/+2 and gains flying until end of turn.| +Patron of the Valiant|Magic Origins|28|U|{3}{W}{W}|4|4|Flying$When Patron of the Valiant enters the battlefield, put a +1/+1 counter on each creature you control with a +1/+1 counter on it.| +Relic Hunter|Magic Origins|29|R|{1}{W}|Creature - Human|2|2|Renown 1 (When this creature deals combat damage to a player, put a +1/+1 counter on it and it becomes renowned.)$When Relic Hunter becomes renowned, you may search your library for an Equipment card, reveal it, put it in your hand, then shuffle your library.| Sentinel of the Eternal Watch|Magic Origins|30|U|{5}{W}|Creature - Giant Soldier|4|6|Vigilance (Attacking doesn't cause this creature to tap.)$At the beginning of combat on each opponent's turn, tap target creature that player controls.| Valor in Akros|Magic Origins|39|U|{3}{W}|Enchantment|||Whenever a creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn.| -Yoked Ox|Magic Origins|42|C|{W}{W}|Creature - Ox|0|40|4|| -Claustrophobia|Magic Origins|50|C|{1}{U}{U}{1}{U}{U}|Enchantment - Aura|||$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| -Disperse|Magic Origins|54|C|{1}{U}{1}{U}|Instant|||Return target nonland permanent to its owner's hand.$Return target nonland permanent to its owner's hand.| +Yoked Ox|Magic Origins|42|C|{W}|Creature - Ox|0|4|| +Alhammarrat, High Arbiter|43|R|{5}{U}{U}|Legendary Creature - Sphinx|5|5|Flying$As Alhammarret, High Arbiter enters the battlefield, each opponent reveals his or her hand. You choose the name of a nonland card revealed this way.$Your opponents can't cast spells with the chosen name (as long as this creature is on the battlefield).| +Clash of Wills|49|U|{X}{U}|Instant|||Counter target spell unless its controller pays {X}.| +Claustrophobia|Magic Origins|50|C|{1}{U}{U}|Enchantment - Aura|||$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.$Enchant creature$When Claustrophobia enters the battlefield, tap enchanted creature.$Enchanted creature doesn't untap during its controller's untap step.| +Disperse|Magic Origins|54|C|{1}{U}|Instant|||Return target nonland permanent to its owner's hand.$Return target nonland permanent to its owner's hand.| Displacement Wave|Magic Origins|?|?mtg-set-icon mtg-set-magic-origins-unknown|{X}{U}{U}{X}{U}{U}|Sorcery|||Return all nonland permanents with converted mana cost X or less to their owners' hands.$Return all nonland permanents with converted mana cost X or less to their owners' hands.| -Mizzium Meddler|Magic Origins|?|R|{2}{U}{2}{U}|Creature - Vedalken Wizard|1|41|4|Flash$When Mizzium Meddler enters the battlefield, change a target of target spell or ability to Mizzium Meddler.$Flash$When Mizzium Meddler enters the battlefield, change a target of target spell or ability to Mizzium Meddler.| Hydrolash|Magic Origins|59|U|{2}{U}|Instant|||Attacking creatures get -2/-0 until end of turn.$Draw a card.| -Jace, Telepath Unbound|Magic Origins|60|M||Planeswalker - Jace|55|+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". $+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". | -Jace, Vryn's Prodigy|Magic Origins|60|M|{1}{U}{1}{U}|Legendary Creature - Human Wizard|0|20|2|{T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn''s Prodigy, then return him to the battefield transformed under his owner's control. ${T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn''s Prodigy, then return him to the battefield transformed under his owner's control. | +Jace, Telepath Unbound|Magic Origins|60|M||Planeswalker - Jace|5|+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". $+1: Up to one target creature gets -2/-0 until your next turn.$-3: You may cast target instant or sorcery card from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.$-9: You get an emblem with "Whenever you cast a spell, target opponent puts the top five cards of his or her library into his or her graveyard". | +Jace, Vryn's Prodigy|Magic Origins|60|M|{1}{U}|Legendary Creature - Human Wizard|0|2|{T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn''s Prodigy, then return him to the battefield transformed under his owner's control. ${T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn''s Prodigy, then return him to the battefield transformed under his owner's control. | Jhessian Thief|Magic Origins|62|U|{2}{U}|Creature - Human Rogue|1|3|Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)$Whenever Jhessian Thief deals combat damage to a player, draw a card.| -Maritime Guard|Magic Origins|63|C|{1}{U}{1}{U}|Creature - Merfolk Soldier|1|31|3|| +Maritime Guard|Magic Origins|63|C|{1}{U}|Creature - Merfolk Soldier|1|3|| +Mizzium Meddler|Magic Origins|?|R|{2}{U}|Creature - Vedalken Wizard|1|4|Flash$When Mizzium Meddler enters the battlefield, change a target of target spell or ability to Mizzium Meddler.$Flash$When Mizzium Meddler enters the battlefield, change a target of target spell or ability to Mizzium Meddler.| Ringwarden Owl|Magic Origins|68|C|{3}{U}{U}|Creature - Bird|3|3|Flying (This creature can't be blocked except by creatures with flying or reach.)$Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)| -Scrapskin Drake|Magic Origins|69|C|{2}{U}{2}{U}|Creature - Zombie Drake|2|32|3|Flying$Scrapskin Drake can block only creatures with flying.$Flying$Scrapskin Drake can block only creatures with flying.| +Scrapskin Drake|Magic Origins|69|C|{2}{U}|Creature - Zombie Drake|2|3|Flying$Scrapskin Drake can block only creatures with flying.$Flying$Scrapskin Drake can block only creatures with flying.| +Send to Sleep|Magic Origins|71|C|{1}{U}|Instant|||Tap up to two target creatures.$Spell mastery - If there are two or more instant and/or sorcery cards in your graveyard, those creatures don't untap during their controllers' next untap steps.| Separatist Voidmage|Magic Origins|72|C|{3}{U}|Creature - Human Wizard|2|2|When Separatist Voidmage enters the battlefield, you may return target creature to its owner's hand.| Sphinx's Tutelage|Magic Origins|76|U|{2}{U}|Enchantment|||Whenever you draw a card, target opponent puts the top two cards of his or her library into his or her graveyard. If they're both nonland cards that share a color, repeat this process.${5}{U}: Draw a card, then discard a card.| -Tower Geist|Magic Origins|80|U|{3}{U}{3}{U}|Creature - Spirit|2|22|2|Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.$Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.| -Catacomb Slug|Magic Origins|86|C|{4}{B}{4}{B}|Creature - Slug|2|62|6|| -Cruel Revival|Magic Origins|88|C|{4}{B}{4}{B}|Instant|||Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.$Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.| +Tower Geist|Magic Origins|80|U|{3}{U}|Creature - Spirit|2|2|Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.$Flying$When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard.| +Catacomb Slug|Magic Origins|86|C|{4}{B}|Creature - Slug|2|6|| +Cruel Revival|Magic Origins|88|C|{4}{B}|Instant|||Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.$Destroy target non-Zombie creature. It can't be regenerated. Return up to one target Zombie card from your graveyard to your hand.| Deadbridge Shaman|Magic Origins|91|C|{2}{B}|Creature - Elf Shaman|3|1|When Deadbridge Shaman dies, target opponent discards a card.| Eyeblight Assassin|Magic Origins|95|C|{2}{B}|Creature - Elf Assassin|2|2|When Eyeblight Assassin enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn.| Infernal Scarring|Magic Origins|102|C|{1}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +2/+0 and has "When this creature dies, draw a card."| +Kothophed, Soul Hoarder|Magic Origins|104|R|{4}{B}{B}|Legendary Creature - Demon|6|6|Flying$Whenever a permanent owned by another player is put into the graveyard from the battlefield, you draw one card and lose 1 life.| +Languish|Magic Origins|105|R|{2}{B}{B}|Sorcery|||All creatures get -4/-4 until end of turn.| Liliana, Defiant Necromancer|Magic Origins|106|M||Planeswalker - Liliana|3|+2: Each player discards a card.$-X: Return target nonlegendary creature with converted mana cost X from your graveyard to the battlefield.$-8: You get an emblem with "Whenever a creature you control dies, return it to the battlefield under your control at the beginning of the next end step."| Liliana, Heretical Healer|Magic Origins|106|M|{1}{B}{B}|Legendary Creature - Human Cleric|2|3|Lifelink$Whenever another nontoken creature you control dies, exile Liliana Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield.| Malakir Cullblade|Magic Origins|108|U|{1}{B}|Creature - Vampire Warrior|1|1|Whenever a creature an opponent controls dies, put a +1/+1 counter on Malakir Cullblade.| Rabid Bloodsucker|Magic Origins|113|C|{4}{B}|Creature - Vampire|3|2|Flying$When Rabid Bloodsucker enters the battlefield, each player loses 2 life.| Reave Soul|Magic Origins|115|C|{1}{B}|Sorcery|||Destroy target creature with power 3 or less.| Shambling Ghoul|Magic Origins|119|C|{1}{B}|Creature - Zombie|2|3|Shambling Ghoul enters the battlefield tapped.| -Weight of the Underworld|Magic Origins|126|C|{3}{B}{3}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets -3/-2.$Enchant creature$Enchanted creature gets -3/-2.| +Weight of the Underworld|Magic Origins|126|C|{3}{B}|Enchantment - Aura|||Enchant creature$Enchanted creature gets -3/-2.$Enchant creature$Enchanted creature gets -3/-2.| Act of Treason|Magic Origins|129|C|{2}{R}{2}{R}|Sorcery|||Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.$Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.| Avaricious Dragon|Magic Origins|131|M|{2}{R}{R}|Creature - Dragon|4|4|Flying$At the beginning of your draw step, draw an additional card.$At the beginning of your end step, discard your hand.| -Bellows Lizard|Magic Origins|132|C|{R}{R}|Creature - Lizard|1|11|1|{1}{R}: Bellows Lizard gets +1/+0 until end of turn.${1}{R}: Bellows Lizard gets +1/+0 until end of turn.| +Bellows Lizard|Magic Origins|132|C|{R}|Creature - Lizard|1|1|{1}{R}: Bellows Lizard gets +1/+0 until end of turn.${1}{R}: Bellows Lizard gets +1/+0 until end of turn.| Boggart Brute|Magic Origins|133|C|{2}{R}|Creature - Goblin Warrior|3|2|Menace (This creature can't be blocked except by two or more creatures.)| -Chandra, Fire of Kaladesh|Magic Origins|135|M|{1}{R}{R}{1}{R}{R}|Legendary Creature - Human Shaman|2|22|2|Whenever you cast a red spell, untap Chandra, Fire of Kaladesh.${T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control.$Whenever you cast a red spell, untap Chandra, Fire of Kaladesh.${T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control.| -Chandra, Roaring Flame|Magic Origins|135|M||Planeswalker - Chandra|44|+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."$+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."| -Chandra's Fury|Magic Origins|136|C|{4}{R}{4}{R}|Instant|||Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls.$Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls.| +Chandra, Fire of Kaladesh|Magic Origins|135|M|{1}{R}{R}|Legendary Creature - Human Shaman|2|2|Whenever you cast a red spell, untap Chandra, Fire of Kaladesh.${T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control.$Whenever you cast a red spell, untap Chandra, Fire of Kaladesh.${T}: Chandra, Fire of Kaladesh deals 1 damage to target player. If Chandra has dealt 3 or more damage this turn, exile her, then return her to the battlefield transformed under her owner's control.| +Chandra, Roaring Flame|Magic Origins|135|M||Planeswalker - Chandra|4|+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."$+1: Chandra, Roaring Flame deals 2 damage to target player.$-2: Chandra, Roaring Flame deals 2 damage to target creature.$-7: Chandra, Roaring Flame deals 6 damage to each opponent. Each player dealt damage this way gets an emblem with "At the beginning of your upkeep, this emblem deals 3 damage to you."| +Chandra's Fury|Magic Origins|136|C|{4}{R}|Instant|||Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls.$Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls.| Chandra's Ignition|Magic Origins|137|R|{3}{R}{R}|Sorcery|||Target creature you control deals damage equal to its power to each other creature and each opponent.| -Cobblebrute|Magic Origins|138|C|{3}{R}{3}{R}|Creature - Elemental|5|25|2|| +Cobblebrute|Magic Origins|138|C|{3}{R}{3}{R}|Creature - Elemental|5|2|| Enthralling Victor|Magic Origins|142|U|{3}{R}|Creature - Human Warrior|3|2|When Enthralling Victor enters the battlefield, gain control of target creature an opponent controls with power 2 or less until end of turn. Untap that creature. It gains haste until end of turn.| -Fiery Conclusion|Magic Origins|144|C|{1}{R}{1}{R}|Instant|||As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.$As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.| +Fiery Conclusion|Magic Origins|144|C|{1}{R}|Instant|||As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.$As an additional cost to cast Fiery Conclusion, sacrifice a creature.$Fiery Conclusion deals 5 damage to target creature.| +Fiery Impulse|Magic Origins|145|C|{R}|Instant|||Fiery Imulse deals 2 damage to target creature.$Spell mastery - If there are two or more instant and/or sorcery cards in your graveyard, Fiery Impulse deals 3 damage to that creature instead.| Lightning Javelin|Magic Origins|153|C|{3}{R}|Sorcery|||Lightning Javelin deals 3 damage to target creature or player. Scry 1.| Pia and Kiran Nalaar|Magic Origins|157|R|{2}{R}{R}|Legendary Creature - Human Artificer|2|2|When Pia and Kiran Nalaar enters the battlefield put 2 1/1 colorless Thopter artifact creature tokens with flying onto the battlefield.${2}{R}, Sacrifice an artifact: Pia and Kiran Nalaar deals 2 damage to target creature or player.| Ravaging Blaze|Magic Origins|159|U|{X}{R}{R}|Instant|||Ravaging Blaze deals X damage to target creature. $Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller.| Seismic Elemental|Magic Origins|161|U|{3}{R}{R}|Creature - Elemental|4|4|When Seismic Elemental enters the battlefield, creatures without flying can't block this turn.| Subterranean Scout|Magic Origins|164|C|{1}{R}|Creature - Goblin Scout|2|1|When Subterranean Scout enters the battlefield, target creature with power 2 or less can't be blocked this turn.| -Titan's Strength|Magic Origins|166|C|{R}{R}|Instant|||Target creature gets +3/+1 until end of turn. Scry 1.$Target creature gets +3/+1 until end of turn. Scry 1.| +Titan's Strength|Magic Origins|166|C|{R}|Instant|||Target creature gets +3/+1 until end of turn. Scry 1.$Target creature gets +3/+1 until end of turn. Scry 1.| Volcanic Rambler|Magic Origins|167|C|{5}{R}|Creature - Elemental|6|4|{2}{R}: Volcanic Rambler deals 1 damage to target player.| -Elvish Visionary|Magic Origins|175|C|{1}{G}{1}{G}|Creature - Elf Shaman|1|11|1|When Elvish Visionary enters the battlefield, draw a card.$When Elvish Visionary enters the battlefield, draw a card.| -Leaf Gilder|Magic Origins|184|C|{1}{G}{1}{G}|Creature - Elf Druid|2|12|1|{T}: Add {G} to your mana pool.${T}: Add {G} to your mana pool.| -Titanic Growth|Magic Origins|?|C|{1}{G}{1}{G}|Instant|||Target creature gets +4/+4 until end of turn.$Target creature gets +4/+4 until end of turn.| -Vastwood Gorger|Magic Origins|204|C|{5}{G}{5}{G}|Creature - Wurm|5|65|6|| -Yeva's Forcemage|Magic Origins|?|C|{2}{G}{2}{G}|Creature - Elf Shaman|2|22|2|When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.$When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.| Conclave Naturalists|Magic Origins|171|U|{4}{G}|Creature - Dryad|4|4|When Conclave Naturalists enters the battlefield, you may destroy target artifact or enchantment.| Dwynen, Gilt-Leaf Daen|Magic Origins|172|R|{2}{G}{G}|Legendary Creature - Elf Warrior|3|4|Reach$Other Elf creatures you control get +1/+1.$Whenever Dwynen, Gilt-Leaf Daen attacks, you gain 1 life for each attacking Elf you control.| Elemental Bond|Magic Origins|174|U|{2}{G}|Enchantment|||Whenever a creature with power 3 or greater enters the battlefield under your control, draw a card.| +Elvish Visionary|Magic Origins|175|C|{1}{G}|Creature - Elf Shaman|1|1|When Elvish Visionary enters the battlefield, draw a card.$When Elvish Visionary enters the battlefield, draw a card.| Hitchclaw Recluse|Magic Origins|181|C|{2}{G}|Creature - Spider|1|4|Reach| Joraga Invocation|Magic Origins|183|U|{4}{G}{G}|Sorcery|||Each creature you control gets +3/+3 until end of turn and must be blocked this turn if able.| +Leaf Gilder|Magic Origins|184|C|{1}{G}|Creature - Elf Druid|2|1|{T}: Add {G} to your mana pool.${T}: Add {G} to your mana pool.| Mantle of Webs|Magic Origins|187|C|{1}{G}|Enchantment - Aura|||Enchant Creature$Enchanted creature gets +1/+3 and has reach.| -Nissa, Sage Animist|Magic Origins|189|M||Planeswalker - Nissa|33|+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.$+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.| -Nissa, Vastwood Seer|Magic Origins|189|M|{2}{G}{2}{G}|Legendary Creature - Elf Scout|2|22|2|When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.$When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.| +Nissa, Sage Animist|Magic Origins|189|M||Planeswalker - Nissa|3|+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.$+1: Reveal the top card of your library. If it's a land card, put it onto the battlefield. Otherwise, put it into your hand.$-2: Put a legendary 4/4 green Elemental creature token named Ashaya, the Awoken World onto the battlefield.$-7: Untap up to six target lands. They become 6/6 Elemental creatures. They're still lands.| +Nissa, Vastwood Seer|Magic Origins|189|M|{2}{G}|Legendary Creature - Elf Scout|2|2|When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.$When Nissa, Vastwood Seer enters the battlefield, you may search your library for a basic Forest card, reveal it, put it into your hand, then shuffle your library.$Whenever a land enters the battlefield under your control, if you control seven or more lands, exile Nissa, then return her to the battlefield transformed under her owner's control.| +Rhox Maulers|Magic Origins|196|C|{4}{G}|Creature - Rhino Soldier|4|4|Trample (This creature can deal excess combat damage to defending player or planeswalker while attacking.)$Renown 2 (When this creature deals combat damage to a player, if it isn't renowned, put two +1/+1 counters on it and it becomes renowned.)| +Titanic Growth|Magic Origins|201|C|{1}{G}|Instant|||Target creature gets +4/+4 until end of turn.$Target creature gets +4/+4 until end of turn.| +Vastwood Gorger|Magic Origins|204|C|{5}{G}|Creature - Wurm|5|6|| +Yeva's Forcemage|Magic Origins|208|C|{2}{G}|Creature - Elf Shaman|2|2|When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.$When Yeva's Forcemage enters the battlefield, target creature gets +2/+2 until end of turn.| +Blazing Hellhound|Magic Origins|210|U|{2}{B}{R}|Creature - Elemental Hound|4|3|{1}, Sacrifice another creature: Blazing Hellhound deals 1 damage to target creature or player.| Zendikar Incarnate|Magic Origins|219|U|{2}{R}{G}|Creature - Elemental|0|4|Zendikar Incarnate's power is equal to the amount of lands you control.| -Gold-Forged Sentinel|Magic Origins|226|U|{6}{6}|Artifact Creature - Chimera|4|44|4|Flying$Flying| -Jayemdae Tome|Magic Origins|231|U|{4}{4}|Artifact|||{4}, {T}: Draw a card.${4}, {T}: Draw a card.| -Meteorite|Magic Origins|233|U|{5}{5}|Artifact|||When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.$When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.| -Runed Servitor|Magic Origins|238|U|{2}{2}|Artifact Creature - Construct|2|22|2|When Runed Servitor dies, each player draws a card.$When Runed Servitor dies, each player draws a card.| +Gold-Forged Sentinel|Magic Origins|226|U|{6}|Artifact Creature - Chimera|4|4|Flying$Flying| +Jayemdae Tome|Magic Origins|231|U|{4}|Artifact|||{4}, {T}: Draw a card.${4}, {T}: Draw a card.| +Meteorite|Magic Origins|233|U|{5}|Artifact|||When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.$When Meteorite enters the battlefield, it deals 2 damage to target creature or player.${T}: Add one mana of any color to your mana pool.| +Runed Servitor|Magic Origins|238|U|{2}|Artifact Creature - Construct|2|2|When Runed Servitor dies, each player draws a card.$When Runed Servitor dies, each player draws a card.| Veteran's Sidearm|Magic Origins|242|C|{2}|Artifact - Equipment|||Equipped creature gets +1/+1.$Equip {1}| -Aegis Angel|Magic Origins|273|R|{4}{W}{W}{4}{W}{W}|Creature - Angel|5|55|5|Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.$Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.| -Divine Verdict|Magic Origins|274|C|{3}{W}{3}{W}|Instant|||Destroy target attacking or blocking creature.$Destroy target attacking or blocking creature.| +Aegis Angel|Magic Origins|273|R|{4}{W}{W}|Creature - Angel|5|5|Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.$Flying$When Aegis Angel enters the battlefield, another target permanent gains indestructible for as long as you control Aegis Angel.| +Divine Verdict|Magic Origins|274|C|{3}{W}|Instant|||Destroy target attacking or blocking creature.$Destroy target attacking or blocking creature.| Eagle of the Watch|Magic Origins|275|C|{2}{W}|Creature - Bird|2|1|Flying, vigilance| -Serra Angel|Magic Origins|276|U|{3}{W}{W}{3}{W}{W}|Creature - Angel|4|44|4|Flying$Vigilance$Flying$Vigilance| -Into the Void|Magic Origins|277|U|{3}{U}{3}{U}|Sorcery|||Return up to two target creatures to their owners' hands.$Return up to two target creatures to their owners' hands.| -Mahamoti Djinn|Magic Origins|278|R|{4}{U}{U}{4}{U}{U}|Creature - Djinn|5|65|6|Flying$Flying| -Weave Fate|Magic Origins|279|C|{3}{U}{3}{U}|Instant|||Draw two cards.$Draw two cards.| -Flesh to Dust|Magic Origins|280|C|{3}{B}{B}{3}{B}{B}|Instant|||Destroy target creature. It can't be regenerated.$Destroy target creature. It can't be regenerated.| -Mind Rot|Magic Origins|281|C|{2}{B}{2}{B}|Sorcery|||Target player discards two cards.$Target player discards two cards.| -Nightmare|Magic Origins|282|R|{5}{B}{5}{B}|Creature - Nightmare Horse|0|00|0|Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.$Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.| -Sengir Vampire|Magic Origins|283|U|{3}{B}{B}{3}{B}{B}|Creature - Vampire|4|44|4|Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.$Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.| -Fiery Hellhound|Magic Origins|284|C|{1}{R}{R}{1}{R}{R}|Creature - Elemental Hound|2|22|2|{R}: Fiery Hellhound gets +1/+0 until end of turn.${R}: Fiery Hellhound gets +1/+0 until end of turn.| -Shivan Dragon|Magic Origins|285|R|{4}{R}{R}{4}{R}{R}|Creature - Dragon|5|55|5|Flying${R}: Shivan Dragon gets +1/+0 until end of turn.$Flying${R}: Shivan Dragon gets +1/+0 until end of turn.| +Serra Angel|Magic Origins|276|U|{3}{W}{W}|Creature - Angel|4|4|Flying$Vigilance$Flying$Vigilance| +Into the Void|Magic Origins|277|U|{3}{U}|Sorcery|||Return up to two target creatures to their owners' hands.$Return up to two target creatures to their owners' hands.| +Mahamoti Djinn|Magic Origins|278|R|{4}{U}{U}|Creature - Djinn|5|6|Flying$Flying| +Weave Fate|Magic Origins|279|C|{3}{U}|Instant|||Draw two cards.$Draw two cards.| +Flesh to Dust|Magic Origins|280|C|{3}{B}{B}|Instant|||Destroy target creature. It can't be regenerated.$Destroy target creature. It can't be regenerated.| +Mind Rot|Magic Origins|281|C|{2}{B}|Sorcery|||Target player discards two cards.$Target player discards two cards.| +Nightmare|Magic Origins|282|R|{5}{B}|Creature - Nightmare Horse|0|0|Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.$Flying$Nightmare's power and toughness are each equal to the number of Swamps you control.| +Sengir Vampire|Magic Origins|283|U|{3}{B}{B}|Creature - Vampire|4|4|Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.$Flying$Whenever a creature dealt damage by Sengir Vampire this turn dies, put a +1/+1 counter on Sengir Vampire.| +Fiery Hellhound|Magic Origins|284|C|{1}{R}{R}|Creature - Elemental Hound|2|2|{R}: Fiery Hellhound gets +1/+0 until end of turn.${R}: Fiery Hellhound gets +1/+0 until end of turn.| +Shivan Dragon|Magic Origins|285|R|{4}{R}{R}|Creature - Dragon|5|5|Flying${R}: Shivan Dragon gets +1/+0 until end of turn.$Flying${R}: Shivan Dragon gets +1/+0 until end of turn.| Plummet|Magic Origins|286|C|{1}{G}{1}{G}|Instant|||Destroy target creature with flying.$Destroy target creature with flying.| -Prized Unicorn|Magic Origins|287|U|{3}{G}{3}{G}|Creature - Unicorn|2|22|2|All creatures able to block Prized Unicorn do so.$All creatures able to block Prized Unicorn do so.| -Terra Stomper|Magic Origins|288|R|{3}{G}{G}{G}{3}{G}{G}{G}|Creature - Beast|8|88|8|Terra Stomper can't be countered.$Trample$Terra Stomper can't be countered.$Trample| +Prized Unicorn|Magic Origins|287|U|{3}{G}|Creature - Unicorn|2|22|2|All creatures able to block Prized Unicorn do so.$All creatures able to block Prized Unicorn do so.| +Terra Stomper|Magic Origins|288|R|{3}{G}{G}{G}|Creature - Beast|8|8|Terra Stomper can't be countered.$Trample$Terra Stomper can't be countered.$Trample| Ambush Commander|Duel Decks: Anthology, Elves vs. Goblins|1|R|{3}{G}{G}|Creature - Elf|2|2|Forests you control are 1/1 green Elf creatures that are still lands.${1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.| Lys Alana Huntmaster|Duel Decks: Anthology, Elves vs. Goblins|10|C|{2}{G}{G}|Creature - Elf Warrior|3|3|Whenever you cast an Elf spell, you may put a 1/1 green Elf Warrior creature token onto the battlefield.| Stonewood Invoker|Duel Decks: Anthology, Elves vs. Goblins|11|C|{1}{G}|Creature - Elf Mutant|2|2|{7}{G}: Stonewood Invoker gets +5/+5 until end of turn.|