From 02131eb84802e4f9d7d3243329d607abed9ede92 Mon Sep 17 00:00:00 2001 From: daagar Date: Sun, 15 Feb 2015 09:44:06 -0600 Subject: [PATCH 1/4] Implement Mortal Combat --- .../src/mage/sets/tenth/MortalCombat.java | 80 +++++++++++++++++++ .../src/mage/sets/torment/MortalCombat.java | 52 ++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/tenth/MortalCombat.java create mode 100644 Mage.Sets/src/mage/sets/torment/MortalCombat.java diff --git a/Mage.Sets/src/mage/sets/tenth/MortalCombat.java b/Mage.Sets/src/mage/sets/tenth/MortalCombat.java new file mode 100644 index 00000000000..4b8217de172 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/MortalCombat.java @@ -0,0 +1,80 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.tenth; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.WinGameSourceControllerEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author daagar + */ +public class MortalCombat extends CardImpl { + + public MortalCombat(UUID ownerId) { + super(ownerId, 160, "Mortal Combat", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}"); + this.expansionSetCode = "10E"; + + // At the beginning of your upkeep, if twenty or more creature cards are in your graveyard, you win the game. + this.addAbility(new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false), + new TwentyGraveyardCreatureCondition(), + "At the beginning of your upkeep, if twenty or more creature cards are in your graveyard, you win the game.")); + } + + public MortalCombat(final MortalCombat card) { + super(card); + } + + @Override + public MortalCombat copy() { + return new MortalCombat(this); + } +} + +class TwentyGraveyardCreatureCondition implements Condition { + + private static final FilterCreatureCard filter = new FilterCreatureCard(); + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + return player.getGraveyard().count(filter, game) >= 20; + } +} diff --git a/Mage.Sets/src/mage/sets/torment/MortalCombat.java b/Mage.Sets/src/mage/sets/torment/MortalCombat.java new file mode 100644 index 00000000000..78d7e171179 --- /dev/null +++ b/Mage.Sets/src/mage/sets/torment/MortalCombat.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.torment; + +import java.util.UUID; + +/** + * + * @author daagar + */ +public class MortalCombat extends mage.sets.tenth.MortalCombat { + + public MortalCombat(UUID ownerId) { + super(ownerId); + this.cardNumber = 71; + this.expansionSetCode = "TOR"; + } + + public MortalCombat(final MortalCombat card) { + super(card); + } + + @Override + public MortalCombat copy() { + return new MortalCombat(this); + } +} From f039be04e179992b833121b16f77580d6d5fa449 Mon Sep 17 00:00:00 2001 From: daagar Date: Sun, 15 Feb 2015 15:37:36 -0600 Subject: [PATCH 2/4] Implement Myr Landshaper --- .../mage/sets/darksteel/MyrLandshaper.java | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java diff --git a/Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java b/Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java new file mode 100644 index 00000000000..5397b1cb9bf --- /dev/null +++ b/Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.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.darksteel; + +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.continious.AddCardTypeTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetLandPermanent; +import mage.target.Target; + +/** + * + * @author anonymous + */ +public class MyrLandshaper extends CardImpl { + + public MyrLandshaper(UUID ownerId) { + super(ownerId, 131, "Myr Landshaper", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}"); + this.expansionSetCode = "DST"; + this.subtype.add("Myr"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Target land becomes an artifact in addition to its other types until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCardTypeTargetEffect(CardType.ARTIFACT, Duration.EndOfTurn), new TapSourceCost()); + Target target = new TargetLandPermanent(); + ability.addTarget(target); + this.addAbility(ability); + } + + public MyrLandshaper(final MyrLandshaper card) { + super(card); + } + + @Override + public MyrLandshaper copy() { + return new MyrLandshaper(this); + } +} From d98e785abaf8afeec7783d52143126919f7e7601 Mon Sep 17 00:00:00 2001 From: daagar Date: Sun, 15 Feb 2015 16:03:07 -0600 Subject: [PATCH 3/4] Implement Commander Eesha --- .../mage/sets/judgment/CommanderEesha.java | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/judgment/CommanderEesha.java diff --git a/Mage.Sets/src/mage/sets/judgment/CommanderEesha.java b/Mage.Sets/src/mage/sets/judgment/CommanderEesha.java new file mode 100644 index 00000000000..6bad6d37fae --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/CommanderEesha.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.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author daagar + */ +public class CommanderEesha extends CardImpl { + + public static final FilterCard filter = new FilterCard("creatures"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public CommanderEesha(UUID ownerId) { + super(ownerId, 9, "Commander Eesha", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "JUD"; + this.supertype.add("Legendary"); + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // protection from creatures + this.addAbility(new ProtectionAbility(filter)); + } + + public CommanderEesha(final CommanderEesha card) { + super(card); + } + + @Override + public CommanderEesha copy() { + return new CommanderEesha(this); + } +} From 73abc78a9034c68ceb7bb8611eb594b6e5bba3ac Mon Sep 17 00:00:00 2001 From: daagar Date: Sun, 15 Feb 2015 16:03:49 -0600 Subject: [PATCH 4/4] Fix author comment --- Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java b/Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java index 5397b1cb9bf..1acf2a3f8b6 100644 --- a/Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java +++ b/Mage.Sets/src/mage/sets/darksteel/MyrLandshaper.java @@ -43,7 +43,7 @@ import mage.target.Target; /** * - * @author anonymous + * @author daagar */ public class MyrLandshaper extends CardImpl {