From 0e632acbb1f264638438fd5d4a4cd43c8660fcb5 Mon Sep 17 00:00:00 2001 From: North Date: Mon, 3 Sep 2012 20:43:35 +0300 Subject: [PATCH] [ALA] 15 creature cards --- .../sets/shardsofalara/BehemothsHerald.java | 99 +++++++++++++ .../sets/shardsofalara/CarrionThrash.java | 81 ++++++++++ .../mage/sets/shardsofalara/DemonsHerald.java | 99 +++++++++++++ .../sets/shardsofalara/DragonsHerald.java | 99 +++++++++++++ .../mage/sets/shardsofalara/Drumhunter.java | 116 +++++++++++++++ .../sets/shardsofalara/EsperBattlemage.java | 139 ++++++++++++++++++ .../sets/shardsofalara/EtheriumSculptor.java | 109 ++++++++++++++ .../shardsofalara/ExuberantFirestoker.java | 118 +++++++++++++++ .../sets/shardsofalara/SanctumGargoyle.java | 73 +++++++++ .../mage/sets/shardsofalara/ScourgeDevil.java | 70 +++++++++ .../sets/shardsofalara/SphinxSovereign.java | 117 +++++++++++++++ .../sets/shardsofalara/SphinxsHerald.java | 97 ++++++++++++ .../sets/shardsofalara/SunseedNurturer.java | 116 +++++++++++++++ .../sets/shardsofalara/VithianStinger.java | 76 ++++++++++ .../sets/shardsofalara/WindwrightMage.java | 104 +++++++++++++ 15 files changed, 1513 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/BehemothsHerald.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/CarrionThrash.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/DemonsHerald.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/DragonsHerald.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/Drumhunter.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/EsperBattlemage.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/ExuberantFirestoker.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/SanctumGargoyle.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/ScourgeDevil.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/SphinxsHerald.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/SunseedNurturer.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/VithianStinger.java create mode 100644 Mage.Sets/src/mage/sets/shardsofalara/WindwrightMage.java diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BehemothsHerald.java b/Mage.Sets/src/mage/sets/shardsofalara/BehemothsHerald.java new file mode 100644 index 00000000000..7386e254c2b --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/BehemothsHerald.java @@ -0,0 +1,99 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author North + */ +public class BehemothsHerald extends CardImpl { + + private static final FilterCard filter = new FilterCard("card named Godsire"); + private static final FilterControlledCreaturePermanent filterRed = new FilterControlledCreaturePermanent("a red creature"); + private static final FilterControlledCreaturePermanent filterGreen = new FilterControlledCreaturePermanent("a green creature"); + private static final FilterControlledCreaturePermanent filterWhite = new FilterControlledCreaturePermanent("a white creature"); + + static { + filter.add(new NamePredicate("Godsire")); + filterRed.add(new ColorPredicate(ObjectColor.RED)); + filterGreen.add(new ColorPredicate(ObjectColor.GREEN)); + filterWhite.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public BehemothsHerald(UUID ownerId) { + super(ownerId, 124, "Behemoth's Herald", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Elf"); + this.subtype.add("Shaman"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{G}, {tap}, Sacrifice a red creature, a green creature, and a white creature: + // Search your library for a card named Godsire and put it onto the battlefield. Then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, new FilterCard(filter)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(target), + new ManaCostsImpl("{2}{G}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterRed, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterGreen, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterWhite, false))); + this.addAbility(ability); + } + + public BehemothsHerald(final BehemothsHerald card) { + super(card); + } + + @Override + public BehemothsHerald copy() { + return new BehemothsHerald(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/CarrionThrash.java b/Mage.Sets/src/mage/sets/shardsofalara/CarrionThrash.java new file mode 100644 index 00000000000..09a4765d16f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/CarrionThrash.java @@ -0,0 +1,81 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author North + */ +public class CarrionThrash extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("another creature card from your graveyard"); + + static { + filter.add(new AnotherPredicate()); + } + + public CarrionThrash(UUID ownerId) { + super(ownerId, 162, "Carrion Thrash", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{R}{G}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Viashino"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.color.setGreen(true); + this.color.setBlack(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // When Carrion Thrash dies, you may pay {2}. If you do, return another target creature card from your graveyard to your hand. + DiesTriggeredAbility ability = new DiesTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new GenericManaCost(2)), false); + ability.addTarget(new TargetCardInYourGraveyard(filter)); + this.addAbility(ability); + } + + public CarrionThrash(final CarrionThrash card) { + super(card); + } + + @Override + public CarrionThrash copy() { + return new CarrionThrash(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/DemonsHerald.java b/Mage.Sets/src/mage/sets/shardsofalara/DemonsHerald.java new file mode 100644 index 00000000000..3a437aa1248 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/DemonsHerald.java @@ -0,0 +1,99 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author North + */ +public class DemonsHerald extends CardImpl { + + private static final FilterCard filter = new FilterCard("card named Prince of Thralls"); + private static final FilterControlledCreaturePermanent filterBlue = new FilterControlledCreaturePermanent("a blue creature"); + private static final FilterControlledCreaturePermanent filterBlack = new FilterControlledCreaturePermanent("a black creature"); + private static final FilterControlledCreaturePermanent filterRed = new FilterControlledCreaturePermanent("a red creature"); + + static { + filter.add(new NamePredicate("Prince of Thralls")); + filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); + filterBlack.add(new ColorPredicate(ObjectColor.BLACK)); + filterRed.add(new ColorPredicate(ObjectColor.RED)); + } + + public DemonsHerald(UUID ownerId) { + super(ownerId, 72, "Demon's Herald", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{B}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{B}, {tap}, Sacrifice a blue creature, a black creature, and a red creature: + // Search your library for a card named Prince of Thralls and put it onto the battlefield. Then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, new FilterCard(filter)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(target), + new ManaCostsImpl("{2}{B}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterBlue, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterBlack, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterRed, false))); + this.addAbility(ability); + } + + public DemonsHerald(final DemonsHerald card) { + super(card); + } + + @Override + public DemonsHerald copy() { + return new DemonsHerald(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/DragonsHerald.java b/Mage.Sets/src/mage/sets/shardsofalara/DragonsHerald.java new file mode 100644 index 00000000000..90e46c394c0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/DragonsHerald.java @@ -0,0 +1,99 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author North + */ +public class DragonsHerald extends CardImpl { + + private static final FilterCard filter = new FilterCard("card named Hellkite Overlord"); + private static final FilterControlledCreaturePermanent filterBlack = new FilterControlledCreaturePermanent("a black creature"); + private static final FilterControlledCreaturePermanent filterRed = new FilterControlledCreaturePermanent("a red creature"); + private static final FilterControlledCreaturePermanent filterGreen = new FilterControlledCreaturePermanent("a green creature"); + + static { + filter.add(new NamePredicate("Hellkite Overlord")); + filterBlack.add(new ColorPredicate(ObjectColor.BLACK)); + filterRed.add(new ColorPredicate(ObjectColor.RED)); + filterGreen.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public DragonsHerald(UUID ownerId) { + super(ownerId, 98, "Dragon's Herald", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Goblin"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{R}, {tap}, Sacrifice a black creature, a red creature, and a green creature: + // Search your library for a card named Hellkite Overlord and put it onto the battlefield. Then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, new FilterCard(filter)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(target), + new ManaCostsImpl("{2}{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterBlack, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterRed, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterGreen, false))); + this.addAbility(ability); + } + + public DragonsHerald(final DragonsHerald card) { + super(card); + } + + @Override + public DragonsHerald copy() { + return new DragonsHerald(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Drumhunter.java b/Mage.Sets/src/mage/sets/shardsofalara/Drumhunter.java new file mode 100644 index 00000000000..dc5bc3debf4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/Drumhunter.java @@ -0,0 +1,116 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author North + */ +public class Drumhunter extends CardImpl { + + public Drumhunter(UUID ownerId) { + super(ownerId, 129, "Drumhunter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // At the beginning of your end step, if you control a creature with power 5 or greater, you may draw a card. + this.addAbility(new DrumHunterTriggeredAbility()); + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + } + + public Drumhunter(final Drumhunter card) { + super(card); + } + + @Override + public Drumhunter copy() { + return new Drumhunter(this); + } +} + +class DrumHunterTriggeredAbility extends TriggeredAbilityImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + } + + public DrumHunterTriggeredAbility() { + super(Zone.BATTLEFIELD, new DrawCardControllerEffect(1), true); + } + + public DrumHunterTriggeredAbility(final DrumHunterTriggeredAbility ability) { + super(ability); + } + + @Override + public DrumHunterTriggeredAbility copy() { + return new DrumHunterTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.END_PHASE_PRE && event.getPlayerId().equals(this.controllerId)) { + return true; + } + return false; + } + + @Override + public boolean checkInterveningIfClause(Game game) { + return game.getBattlefield().countAll(filter, this.controllerId, game) > 0; + } + + @Override + public String getRule() { + return "At the beginning of your end step, if you control a creature with power 5 or greater, you may draw a card."; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/EsperBattlemage.java b/Mage.Sets/src/mage/sets/shardsofalara/EsperBattlemage.java new file mode 100644 index 00000000000..4dee83fde0f --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/EsperBattlemage.java @@ -0,0 +1,139 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.ColoredManaSymbol; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class EsperBattlemage extends CardImpl { + + public EsperBattlemage(UUID ownerId) { + super(ownerId, 40, "Esper Battlemage", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + // {W}, {tap}: Prevent the next 2 damage that would be dealt to you this turn. + SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new EsperBattlemageEffect(), + new ColoredManaCost(ColoredManaSymbol.W)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + // {B}, {tap}: Target creature gets -1/-1 until end of turn. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostTargetEffect(-1, -1, Duration.EndOfTurn), + new ColoredManaCost(ColoredManaSymbol.B)); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public EsperBattlemage(final EsperBattlemage card) { + super(card); + } + + @Override + public EsperBattlemage copy() { + return new EsperBattlemage(this); + } +} + +class EsperBattlemageEffect extends PreventionEffectImpl { + + private int amount = 2; + + public EsperBattlemageEffect() { + super(Duration.EndOfTurn); + this.staticText = "Prevent the next 2 damage that would be dealt to you this turn"; + } + + public EsperBattlemageEffect(final EsperBattlemageEffect effect) { + super(effect); + this.amount = effect.amount; + } + + @Override + public EsperBattlemageEffect copy() { + return new EsperBattlemageEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + GameEvent preventEvent = new GameEvent(GameEvent.EventType.PREVENT_DAMAGE, + source.getControllerId(), source.getId(), source.getControllerId(), event.getAmount(), false); + if (!game.replaceEvent(preventEvent)) { + int damage = event.getAmount(); + if (damage >= this.amount) { + event.setAmount(damage - this.amount); + damage = this.amount; + this.used = true; + } else { + event.setAmount(0); + this.amount -= damage; + } + game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, + source.getControllerId(), source.getId(), source.getControllerId(), damage)); + } + return false; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (!this.used && super.applies(event, source, game) && event.getTargetId().equals(source.getControllerId())) { + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.java b/Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.java new file mode 100644 index 00000000000..8c74da0e609 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/EtheriumSculptor.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.SpellAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.CostModificationEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.util.CardUtil; + +/** + * + * @author North + */ +public class EtheriumSculptor extends CardImpl { + + public EtheriumSculptor(UUID ownerId) { + super(ownerId, 42, "Etherium Sculptor", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Vedalken"); + this.subtype.add("Artificer"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Artifact spells you cast cost {1} less to cast. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new EtheriumSculptorEffect())); + } + + public EtheriumSculptor(final EtheriumSculptor card) { + super(card); + } + + @Override + public EtheriumSculptor copy() { + return new EtheriumSculptor(this); + } +} + +class EtheriumSculptorEffect extends CostModificationEffectImpl { + + EtheriumSculptorEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "Artifact spells you cast cost {1} less to cast"; + } + + EtheriumSculptorEffect(EtheriumSculptorEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source, Ability abilityToModify) { + SpellAbility spellAbility = (SpellAbility) abilityToModify; + CardUtil.adjustCost(spellAbility, 1); + return true; + } + + @Override + public boolean applies(Ability abilityToModify, Ability source, Game game) { + if (abilityToModify instanceof SpellAbility) { + Card sourceCard = game.getCard(((SpellAbility) abilityToModify).getSourceId()); + if (sourceCard != null && sourceCard.getCardType().contains(CardType.ARTIFACT) && sourceCard.getOwnerId().equals(source.getControllerId())) { + return true; + } + } + return false; + } + + @Override + public EtheriumSculptorEffect copy() { + return new EtheriumSculptorEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/ExuberantFirestoker.java b/Mage.Sets/src/mage/sets/shardsofalara/ExuberantFirestoker.java new file mode 100644 index 00000000000..654c72cb125 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/ExuberantFirestoker.java @@ -0,0 +1,118 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class ExuberantFirestoker extends CardImpl { + + public ExuberantFirestoker(UUID ownerId) { + super(ownerId, 99, "Exuberant Firestoker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your end step, if you control a creature with power 5 or greater, you may have Exuberant Firestoker deal 2 damage to target player. + this.addAbility(new ExuberantFirestokerTriggeredAbility()); + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + } + + public ExuberantFirestoker(final ExuberantFirestoker card) { + super(card); + } + + @Override + public ExuberantFirestoker copy() { + return new ExuberantFirestoker(this); + } +} + +class ExuberantFirestokerTriggeredAbility extends TriggeredAbilityImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + } + + public ExuberantFirestokerTriggeredAbility() { + super(Zone.BATTLEFIELD, new DamageTargetEffect(2), true); + this.addTarget(new TargetPlayer()); + } + + public ExuberantFirestokerTriggeredAbility(final ExuberantFirestokerTriggeredAbility ability) { + super(ability); + } + + @Override + public ExuberantFirestokerTriggeredAbility copy() { + return new ExuberantFirestokerTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.END_PHASE_PRE && event.getPlayerId().equals(this.controllerId)) { + return true; + } + return false; + } + + @Override + public boolean checkInterveningIfClause(Game game) { + return game.getBattlefield().countAll(filter, this.controllerId, game) > 0; + } + + @Override + public String getRule() { + return "At the beginning of your end step, if you control a creature with power 5 or greater, you may have {this} deal 2 damage to target player."; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SanctumGargoyle.java b/Mage.Sets/src/mage/sets/shardsofalara/SanctumGargoyle.java new file mode 100644 index 00000000000..0b532930340 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/SanctumGargoyle.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterArtifactCard; +import mage.target.common.TargetCardInYourGraveyard; + +/** + * + * @author North + */ +public class SanctumGargoyle extends CardImpl { + + public SanctumGargoyle(UUID ownerId) { + super(ownerId, 24, "Sanctum Gargoyle", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Gargoyle"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Sanctum Gargoyle enters the battlefield, you may return target artifact card from your graveyard to your hand. + Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true); + ability.addTarget(new TargetCardInYourGraveyard(new FilterArtifactCard("artifact card from your graveyard"))); + this.addAbility(ability); + } + + public SanctumGargoyle(final SanctumGargoyle card) { + super(card); + } + + @Override + public SanctumGargoyle copy() { + return new SanctumGargoyle(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/ScourgeDevil.java b/Mage.Sets/src/mage/sets/shardsofalara/ScourgeDevil.java new file mode 100644 index 00000000000..dbc023cec18 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/ScourgeDevil.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.abilities.keyword.UnearthAbility; +import mage.cards.CardImpl; + +/** + * + * @author North + */ +public class ScourgeDevil extends CardImpl { + + public ScourgeDevil(UUID ownerId) { + super(ownerId, 113, "Scourge Devil", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Devil"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Scourge Devil enters the battlefield, creatures you control get +1/+0 until end of turn. + this.addAbility(new EntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn))); + // Unearth {2}{R} + this.addAbility(new UnearthAbility(new ManaCostsImpl("{2}{R}"))); + } + + public ScourgeDevil(final ScourgeDevil card) { + super(card); + } + + @Override + public ScourgeDevil copy() { + return new ScourgeDevil(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java b/Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java new file mode 100644 index 00000000000..2786b60032a --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java @@ -0,0 +1,117 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Outcome; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author North + */ +public class SphinxSovereign extends CardImpl { + + public SphinxSovereign(UUID ownerId) { + super(ownerId, 196, "Sphinx Sovereign", Rarity.MYTHIC, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{W}{U}{U}{B}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Sphinx"); + + this.color.setBlue(true); + this.color.setBlack(true); + this.color.setWhite(true); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // At the beginning of your end step, you gain 3 life if Sphinx Sovereign is untapped. Otherwise, each opponent loses 3 life. + this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new SphinxSovereignEffect(), false)); + } + + public SphinxSovereign(final SphinxSovereign card) { + super(card); + } + + @Override + public SphinxSovereign copy() { + return new SphinxSovereign(this); + } +} + +class SphinxSovereignEffect extends OneShotEffect { + + public SphinxSovereignEffect() { + super(Outcome.Benefit); + this.staticText = "you gain 3 life if {this} is untapped. Otherwise, each opponent loses 3 life"; + } + + public SphinxSovereignEffect(final SphinxSovereignEffect effect) { + super(effect); + } + + @Override + public SphinxSovereignEffect copy() { + return new SphinxSovereignEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent == null) { + permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); + } + + if (player != null && permanent != null) { + if (!permanent.isTapped()) { + player.gainLife(3, game); + } else { + for (UUID opponentId : player.getInRange()) { + Player opponent = game.getPlayer(opponentId); + if (opponent != null) { + opponent.loseLife(3, game); + } + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SphinxsHerald.java b/Mage.Sets/src/mage/sets/shardsofalara/SphinxsHerald.java new file mode 100644 index 00000000000..7b18ca52456 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/SphinxsHerald.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author North + */ +public class SphinxsHerald extends CardImpl { + private static final FilterCard filter = new FilterCard("card named Sphinx Sovereign"); + private static final FilterControlledCreaturePermanent filterWhite = new FilterControlledCreaturePermanent("a white creature"); + private static final FilterControlledCreaturePermanent filterBlue = new FilterControlledCreaturePermanent("a blue creature"); + private static final FilterControlledCreaturePermanent filterBlack = new FilterControlledCreaturePermanent("a black creature"); + + static { + filter.add(new NamePredicate("Sphinx Sovereign")); + filterWhite.add(new ColorPredicate(ObjectColor.WHITE)); + filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); + filterBlack.add(new ColorPredicate(ObjectColor.BLACK)); + } + public SphinxsHerald(UUID ownerId) { + super(ownerId, 58, "Sphinx's Herald", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{U}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Vedalken"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{U}, {tap}, Sacrifice a white creature, a blue creature, and a black creature: + // Search your library for a card named Sphinx Sovereign and put it onto the battlefield. Then shuffle your library. + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, new FilterCard(filter)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new SearchLibraryPutInPlayEffect(target), + new ManaCostsImpl("{2}{U}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterWhite, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterBlue, false))); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, filterBlack, false))); + this.addAbility(ability); + } + + public SphinxsHerald(final SphinxsHerald card) { + super(card); + } + + @Override + public SphinxsHerald copy() { + return new SphinxsHerald(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SunseedNurturer.java b/Mage.Sets/src/mage/sets/shardsofalara/SunseedNurturer.java new file mode 100644 index 00000000000..96a27accab5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/SunseedNurturer.java @@ -0,0 +1,116 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author North + */ +public class SunseedNurturer extends CardImpl { + + public SunseedNurturer(UUID ownerId) { + super(ownerId, 29, "Sunseed Nurturer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + this.subtype.add("Wizard"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // At the beginning of your end step, if you control a creature with power 5 or greater, you may gain 2 life. + this.addAbility(new SunseedNurturerTriggeredAbility()); + // {tap}: Add {1} to your mana pool. + this.addAbility(new ColorlessManaAbility()); + } + + public SunseedNurturer(final SunseedNurturer card) { + super(card); + } + + @Override + public SunseedNurturer copy() { + return new SunseedNurturer(this); + } +} + +class SunseedNurturerTriggeredAbility extends TriggeredAbilityImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater"); + + static { + filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); + } + + public SunseedNurturerTriggeredAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(2), true); + } + + public SunseedNurturerTriggeredAbility(final SunseedNurturerTriggeredAbility ability) { + super(ability); + } + + @Override + public SunseedNurturerTriggeredAbility copy() { + return new SunseedNurturerTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.END_PHASE_PRE && event.getPlayerId().equals(this.controllerId)) { + return true; + } + return false; + } + + @Override + public boolean checkInterveningIfClause(Game game) { + return game.getBattlefield().countAll(filter, this.controllerId, game) > 0; + } + + @Override + public String getRule() { + return "At the beginning of your end step, if you control a creature with power 5 or greater, you may gain 2 life."; + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/VithianStinger.java b/Mage.Sets/src/mage/sets/shardsofalara/VithianStinger.java new file mode 100644 index 00000000000..4da77d18f6c --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/VithianStinger.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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +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.abilities.keyword.UnearthAbility; +import mage.cards.CardImpl; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author North + */ +public class VithianStinger extends CardImpl { + + public VithianStinger(UUID ownerId) { + super(ownerId, 120, "Vithian Stinger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // {tap}: Vithian Stinger deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + // Unearth {1}{R} + this.addAbility(new UnearthAbility(new ManaCostsImpl("{1}{R}"))); + } + + public VithianStinger(final VithianStinger card) { + super(card); + } + + @Override + public VithianStinger copy() { + return new VithianStinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/WindwrightMage.java b/Mage.Sets/src/mage/sets/shardsofalara/WindwrightMage.java new file mode 100644 index 00000000000..43efa2ecda9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/shardsofalara/WindwrightMage.java @@ -0,0 +1,104 @@ +/* + * 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.shardsofalara; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author North + */ +public class WindwrightMage extends CardImpl { + + public WindwrightMage(UUID ownerId) { + super(ownerId, 208, "Windwright Mage", Rarity.COMMON, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{W}{U}{B}"); + this.expansionSetCode = "ALA"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.color.setBlack(true); + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + // Windwright Mage has flying as long as an artifact card is in your graveyard. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( + new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield), + WindwrightMageCondition.getInstance(), + "{this} has flying as long as an artifact card is in your graveyard"))); + } + + public WindwrightMage(final WindwrightMage card) { + super(card); + } + + @Override + public WindwrightMage copy() { + return new WindwrightMage(this); + } +} + +class WindwrightMageCondition implements Condition { + + private static WindwrightMageCondition fInstance = new WindwrightMageCondition(); + private static final FilterCard filter = new FilterCard("artifact"); + + static { + filter.add(new CardTypePredicate(CardType.ARTIFACT)); + } + + public static Condition getInstance() { + return fInstance; + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + return player != null && player.getGraveyard().count(filter, game) > 0; + } +}