diff --git a/Mage.Sets/src/mage/sets/apocalypse/DragonArch.java b/Mage.Sets/src/mage/sets/apocalypse/DragonArch.java new file mode 100644 index 0000000000..ebf26f8065 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/DragonArch.java @@ -0,0 +1,75 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.PutCreatureOnBattlefieldEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.MulticoloredPredicate; + +/** + * + * @author LoneFox + + */ +public class DragonArch extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("a multicolored creature card"); + + static { + filter.add(new MulticoloredPredicate()); + } + + public DragonArch(UUID ownerId) { + super(ownerId, 135, "Dragon Arch", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{5}"); + this.expansionSetCode = "APC"; + + // {2}, {T}: You may put a multicolored creature card from your hand onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutCreatureOnBattlefieldEffect(filter), + new ManaCostsImpl("{2}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public DragonArch(final DragonArch card) { + super(card); + } + + @Override + public DragonArch copy() { + return new DragonArch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/DwarvenPatrol.java b/Mage.Sets/src/mage/sets/apocalypse/DwarvenPatrol.java new file mode 100644 index 0000000000..8f646dd7ff --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/DwarvenPatrol.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.apocalypse; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.common.DontUntapInControllersUntapStepSourceEffect; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; + +/** + * + * @author LoneFox + + */ +public class DwarvenPatrol extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("nonred spell"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.RED))); + } + + public DwarvenPatrol(UUID ownerId) { + super(ownerId, 61, "Dwarven Patrol", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "APC"; + this.subtype.add("Dwarf"); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Dwarven Patrol doesn't untap during your untap step. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); + // Whenever you cast a nonred spell, untap Dwarven Patrol. + this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), filter, false)); + } + + public DwarvenPatrol(final DwarvenPatrol card) { + super(card); + } + + @Override + public DwarvenPatrol copy() { + return new DwarvenPatrol(this); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/HauntedAngel.java b/Mage.Sets/src/mage/sets/apocalypse/HauntedAngel.java new file mode 100644 index 0000000000..b044375bec --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/HauntedAngel.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.apocalypse; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.token.Token; + +/** + * + * @author LoneFox + + */ +public class HauntedAngel extends CardImpl { + + public HauntedAngel(UUID ownerId) { + super(ownerId, 12, "Haunted Angel", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "APC"; + this.subtype.add("Angel"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // When Haunted Angel dies, exile Haunted Angel and each other player puts a 3/3 black Angel creature token with flying onto the battlefield. + Ability ability = new DiesTriggeredAbility(new ExileSourceEffect()); + ability.addEffect(new HauntedAngelEffect()); + this.addAbility(ability); + } + + public HauntedAngel(final HauntedAngel card) { + super(card); + } + + @Override + public HauntedAngel copy() { + return new HauntedAngel(this); + } +} + +class HauntedAngelEffect extends OneShotEffect { + + public HauntedAngelEffect() { + super(Outcome.Detriment); + staticText = "and each other player puts a 3/3 black Angel creature token with flying onto the battlefield."; + } + + public HauntedAngelEffect(HauntedAngelEffect copy) { + super(copy); + } + + @Override + public HauntedAngelEffect copy() { + return new HauntedAngelEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + UUID controllerId = source.getControllerId(); + HauntedAngelToken token = new HauntedAngelToken(); + for(UUID playerId: game.getState().getPlayersInRange(controllerId, game)) { + if(!playerId.equals(controllerId)) { + token.putOntoBattlefield(1, game, source.getSourceId(), playerId); + } + } + return true; + } +} + +class HauntedAngelToken extends Token { + public HauntedAngelToken() { + super("Angel", "3/3 black Angel creature token with flying"); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add("Angel"); + power = new MageInt(3); + toughness = new MageInt(3); + this.addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/MinotaurIllusionist.java b/Mage.Sets/src/mage/sets/apocalypse/MinotaurIllusionist.java new file mode 100644 index 0000000000..4a92a0d075 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/MinotaurIllusionist.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.apocalypse; + +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.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.ShroudAbility; +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 LoneFox + + */ +public class MinotaurIllusionist extends CardImpl { + + public MinotaurIllusionist(UUID ownerId) { + super(ownerId, 111, "Minotaur Illusionist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{R}"); + this.expansionSetCode = "APC"; + this.subtype.add("Minotaur"); + this.subtype.add("Wizard"); + this.power = new MageInt(3); + this.toughness = new MageInt(4); + + // {1}{U}: Minotaur Illusionist gains shroud until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(ShroudAbility.getInstance(), + Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"))); + // {R}, Sacrifice Minotaur Illusionist: Minotaur Illusionist deals damage equal to its power to target creature. + Effect effect = new DamageTargetEffect(new SourcePermanentPowerCount()); + effect.setText("{this} deals damage equal to its power to target creature."); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{R}")); + ability.addCost(new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public MinotaurIllusionist(final MinotaurIllusionist card) { + super(card); + } + + @Override + public MinotaurIllusionist copy() { + return new MinotaurIllusionist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/Necravolver.java b/Mage.Sets/src/mage/sets/apocalypse/Necravolver.java new file mode 100644 index 0000000000..03427cbaf8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/Necravolver.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.apocalypse; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageGainLifeSourceTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.KickedCostCondition; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.KickerAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + + */ +public class Necravolver extends CardImpl { + + public Necravolver(UUID ownerId) { + super(ownerId, 46, "Necravolver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "APC"; + this.subtype.add("Volver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Kicker {1}{G} and/or {W} + KickerAbility kickerAbility = new KickerAbility("{1}{G}"); + kickerAbility.addKickerCost("{W}"); + this.addAbility(kickerAbility); + // If Necravolver was kicked with its {1}{G} kicker, it enters the battlefield with two +1/+1 counters on it and with trample. + Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), + new KickedCostCondition("{1}{G}"), true, "If {this} was kicked with its {1}{G} kicker, it enters the battlefield with two +1/+1 counters on it and with trample.", ""); + ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield)); + this.addAbility(ability); + // If Necravolver was kicked with its {W} kicker, it enters the battlefield with a +1/+1 counter on it and with "Whenever Necravolver deals damage, you gain that much life." + ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), + new KickedCostCondition("{W}"), true, "If {this} was kicked with its {W} kicker, it enters the battlefield with a +1/+1 counter on it and with \"Whenever {this} deals damage, you gain that much life.\"", ""); + ability.addEffect(new GainAbilitySourceEffect(new DealsDamageGainLifeSourceTriggeredAbility(), Duration.WhileOnBattlefield)); + this.addAbility(ability); + } + + public Necravolver(final Necravolver card) { + super(card); + } + + @Override + public Necravolver copy() { + return new Necravolver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/PlanarDespair.java b/Mage.Sets/src/mage/sets/apocalypse/PlanarDespair.java new file mode 100644 index 0000000000..9756644140 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/PlanarDespair.java @@ -0,0 +1,67 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.apocalypse; + +import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.DomainValue; +import mage.abilities.dynamicvalue.common.SignInversionDynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class PlanarDespair extends CardImpl { + + public PlanarDespair(UUID ownerId) { + super(ownerId, 50, "Planar Despair", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{B}{B}"); + this.expansionSetCode = "APC"; + + // Domain - All creatures get -1/-1 until end of turn for each basic land type among lands you control. + DynamicValue dv = new SignInversionDynamicValue(new DomainValue()); + Effect effect = new BoostAllEffect(dv, dv, Duration.EndOfTurn); + effect.setText("Domain - All creatures get -1/-1 until end of turn for each basic land type among lands you control."); + this.getSpellAbility().addEffect(effect); + } + + public PlanarDespair(final PlanarDespair card) { + super(card); + } + + @Override + public PlanarDespair copy() { + return new PlanarDespair(this); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/Rakavolver.java b/Mage.Sets/src/mage/sets/apocalypse/Rakavolver.java new file mode 100644 index 0000000000..62444bed93 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/Rakavolver.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.apocalypse; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageGainLifeSourceTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.common.KickedCostCondition; +import mage.abilities.effects.EntersBattlefieldEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.KickerAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.counters.CounterType; + +/** + * + * @author LoneFox + + */ +public class Rakavolver extends CardImpl { + + public Rakavolver(UUID ownerId) { + super(ownerId, 68, "Rakavolver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "APC"; + this.subtype.add("Volver"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Kicker {1}{W} and/or {U} + KickerAbility kickerAbility = new KickerAbility("{1}{W}"); + kickerAbility.addKickerCost("{U}"); + this.addAbility(kickerAbility); + // If Rakavolver was kicked with its {1}{W} kicker, it enters the battlefield with two +1/+1 counters on it and with "Whenever Rakavolver deals damage, you gain that much life." + Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), + new KickedCostCondition("{1}{W}"), true, "If {this} was kicked with its {1}{W} kicker, it enters the battlefield with two +1/+1 counters on it and with \"Whenever {this} deals damage, you gain that much life.\"", ""); + ability.addEffect(new GainAbilitySourceEffect(new DealsDamageGainLifeSourceTriggeredAbility(), Duration.WhileOnBattlefield)); + this.addAbility(ability); + // If Rakavolver was kicked with its {U} kicker, it enters the battlefield with a +1/+1 counter on it and with flying. + ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), + new KickedCostCondition("{U}"), true, "If {this} was kicked with its {U} kicker, it enters the battlefield with a +1/+1 counter on it and with flying.", ""); + ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield)); + this.addAbility(ability); + + } + + public Rakavolver(final Rakavolver card) { + super(card); + } + + @Override + public Rakavolver copy() { + return new Rakavolver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/StrengthOfNight.java b/Mage.Sets/src/mage/sets/apocalypse/StrengthOfNight.java new file mode 100644 index 0000000000..29b4505b4e --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/StrengthOfNight.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.apocalypse; + +import java.util.UUID; +import mage.abilities.condition.LockedInCondition; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.keyword.KickerAbility; +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.mageobject.SubtypePredicate; + +/** + * + * @author LoneFox + + */ +public class StrengthOfNight extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie creatures"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public StrengthOfNight(UUID ownerId) { + super(ownerId, 86, "Strength of Night", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{G}"); + this.expansionSetCode = "APC"; + + // Kicker {B} + this.addAbility(new KickerAbility("{B}")); + // Creatures you control get +1/+1 until end of turn. If Strength of Night was kicked, Zombie creatures you control get an additional +2/+2 until end of turn. + this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); + ContinuousEffect effect = new BoostControlledEffect(2, 2, Duration.EndOfTurn, filter); + this.getSpellAbility().addEffect(new ConditionalContinuousEffect(effect, new LockedInCondition(KickedCondition.getInstance()), + "If {this} was kicked, Zombie creatures you control get an additional +2/+2 until end of turn.")); + } + + public StrengthOfNight(final StrengthOfNight card) { + super(card); + } + + @Override + public StrengthOfNight copy() { + return new StrengthOfNight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/apocalypse/YavimayasEmbrace.java b/Mage.Sets/src/mage/sets/apocalypse/YavimayasEmbrace.java new file mode 100644 index 0000000000..5cd5ebbd05 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/YavimayasEmbrace.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.apocalypse; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.ControlEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class YavimayasEmbrace extends CardImpl { + + public YavimayasEmbrace(UUID ownerId) { + super(ownerId, 127, "Yavimaya's Embrace", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{5}{G}{U}{U}"); + this.expansionSetCode = "APC"; + 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); + // You control enchanted creature. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); + // Enchanted creature gets +2/+2 and has trample. + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA); + effect.setText("and has trample"); + ability.addEffect(effect); + this.addAbility(ability); +} + + public YavimayasEmbrace(final YavimayasEmbrace card) { + super(card); + } + + @Override + public YavimayasEmbrace copy() { + return new YavimayasEmbrace(this); + } +} diff --git a/Mage.Sets/src/mage/sets/conspiracy/Rout.java b/Mage.Sets/src/mage/sets/conspiracy/Rout.java new file mode 100644 index 0000000000..8f06de331a --- /dev/null +++ b/Mage.Sets/src/mage/sets/conspiracy/Rout.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.conspiracy; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PayMoreToCastAsThoughtItHadFlashAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author LoneFox + + */ +public class Rout extends CardImpl { + + public Rout(UUID ownerId) { + super(ownerId, 80, "Rout", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{W}{W}"); + this.expansionSetCode = "CNS"; + + Effect effect = new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true); + // You may cast Rout as though it had flash if you pay {2} more to cast it. + Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); + ability.addEffect(effect); + this.addAbility(ability); + // Destroy all creatures. They can't be regenerated. + this.getSpellAbility().addEffect(effect); + } + + public Rout(final Rout card) { + super(card); + } + + @Override + public Rout copy() { + return new Rout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/BreakingWave.java b/Mage.Sets/src/mage/sets/invasion/BreakingWave.java new file mode 100644 index 0000000000..38e6acc485 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/BreakingWave.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.invasion; + +import java.util.List; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PayMoreToCastAsThoughtItHadFlashAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author LoneFox + + */ +public class BreakingWave extends CardImpl { + + public BreakingWave(UUID ownerId) { + super(ownerId, 48, "Breaking Wave", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); + this.expansionSetCode = "INV"; + + Effect effect = new BreakingWaveEffect(); + // You may cast Breaking Wave as though it had flash if you pay {2} more to cast it. + Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); + ability.addEffect(effect); + this.addAbility(ability); + // Simultaneously untap all tapped creatures and tap all untapped creatures. + this.getSpellAbility().addEffect(effect); + } + + public BreakingWave(final BreakingWave card) { + super(card); + } + + @Override + public BreakingWave copy() { + return new BreakingWave(this); + } +} + +class BreakingWaveEffect extends OneShotEffect { + + public BreakingWaveEffect() { + super(Outcome.Neutral); + staticText = "Simultaneously untap all tapped creatures and tap all untapped creatures."; + } + + public BreakingWaveEffect(BreakingWaveEffect copy) { + super(copy); + } + + @Override + public BreakingWaveEffect copy() { + return new BreakingWaveEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + List creatures = game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), + source.getControllerId(), source.getSourceId(), game); + for(Permanent creature: creatures) { + if(creature.isTapped()) { + creature.untap(game); + } + else { + creature.tap(game); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/GhituFire.java b/Mage.Sets/src/mage/sets/invasion/GhituFire.java new file mode 100644 index 0000000000..75cc0e8bc8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/GhituFire.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.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PayMoreToCastAsThoughtItHadFlashAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + + */ +public class GhituFire extends CardImpl { + + public GhituFire(UUID ownerId) { + super(ownerId, 144, "Ghitu Fire", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{X}{R}"); + this.expansionSetCode = "INV"; + + Effect effect = new DamageTargetEffect(new ManacostVariableValue()); + // You may cast Ghitu Fire as though it had flash if you pay {2} more to cast it. + Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); + ability.addEffect(effect); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + // Ghitu Fire deals X damage to target creature or player. + this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public GhituFire(final GhituFire card) { + super(card); + } + + @Override + public GhituFire copy() { + return new GhituFire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/Rout.java b/Mage.Sets/src/mage/sets/invasion/Rout.java new file mode 100644 index 0000000000..1a3befd0b8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/Rout.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.invasion; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class Rout extends mage.sets.conspiracy.Rout { + + public Rout(UUID ownerId) { + super(ownerId); + this.cardNumber = 34; + this.expansionSetCode = "INV"; + } + + public Rout(final Rout card) { + super(card); + } + + @Override + public Rout copy() { + return new Rout(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/SaprolingSymbiosis.java b/Mage.Sets/src/mage/sets/invasion/SaprolingSymbiosis.java new file mode 100644 index 0000000000..f6926f69db --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/SaprolingSymbiosis.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.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PayMoreToCastAsThoughtItHadFlashAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.permanent.token.SaprolingToken; + +/** + * + * @author LoneFox + + */ +public class SaprolingSymbiosis extends CardImpl { + + public SaprolingSymbiosis(UUID ownerId) { + super(ownerId, 209, "Saproling Symbiosis", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{3}{G}"); + this.expansionSetCode = "INV"; + + Effect effect = new CreateTokenEffect(new SaprolingToken(), new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())); + // You may cast Saproling Symbiosis as though it had flash if you pay {2} more to cast it. + Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); + ability.addEffect(effect); + this.addAbility(ability); + // Put a 1/1 green Saproling creature token onto the battlefield for each creature you control. + this.getSpellAbility().addEffect(effect); + } + + public SaprolingSymbiosis(final SaprolingSymbiosis card) { + super(card); + } + + @Override + public SaprolingSymbiosis copy() { + return new SaprolingSymbiosis(this); + } +} diff --git a/Mage.Sets/src/mage/sets/invasion/TwilightsCall.java b/Mage.Sets/src/mage/sets/invasion/TwilightsCall.java new file mode 100644 index 0000000000..d08cb7cc2e --- /dev/null +++ b/Mage.Sets/src/mage/sets/invasion/TwilightsCall.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.invasion; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.PayMoreToCastAsThoughtItHadFlashAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreatureCard; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LoneFox + + */ +public class TwilightsCall extends CardImpl { + + public TwilightsCall(UUID ownerId) { + super(ownerId, 130, "Twilight's Call", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{B}{B}"); + this.expansionSetCode = "INV"; + + Effect effect = new TwilightsCallEffect(); + // You may cast Twilight's Call as though it had flash if you pay {2} more to cast it. + Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); + ability.addEffect(effect); + this.addAbility(ability); + // Each player returns all creature cards from his or her graveyard to the battlefield. + this.getSpellAbility().addEffect(effect); + } + + public TwilightsCall(final TwilightsCall card) { + super(card); + } + + @Override + public TwilightsCall copy() { + return new TwilightsCall(this); + } +} + +class TwilightsCallEffect extends OneShotEffect { + + public TwilightsCallEffect() { + super(Outcome.Neutral); + staticText = "Each player returns all creature cards from his or her graveyard to the battlefield."; + } + + public TwilightsCallEffect(TwilightsCallEffect copy) { + super(copy); + } + + @Override + public TwilightsCallEffect copy() { + return new TwilightsCallEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for(UUID playerId: game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if(player != null) { + for(Card card: player.getGraveyard().getCards(new FilterCreatureCard(), game)) { + card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), card.getOwnerId()); + } + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/izzetvsgolgari/TwilightsCall.java b/Mage.Sets/src/mage/sets/izzetvsgolgari/TwilightsCall.java new file mode 100644 index 0000000000..c3957066f4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/izzetvsgolgari/TwilightsCall.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.izzetvsgolgari; + +import java.util.UUID; + +/** + * + * @author LoneFox + + */ +public class TwilightsCall extends mage.sets.invasion.TwilightsCall { + + public TwilightsCall(UUID ownerId) { + super(ownerId); + this.cardNumber = 76; + this.expansionSetCode = "DDJ"; + } + + public TwilightsCall(final TwilightsCall card) { + super(card); + } + + @Override + public TwilightsCall copy() { + return new TwilightsCall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/Deadapult.java b/Mage.Sets/src/mage/sets/planeshift/Deadapult.java new file mode 100644 index 0000000000..0333ff47a8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/Deadapult.java @@ -0,0 +1,77 @@ +/* + * 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.planeshift; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +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.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author LoneFox + + */ +public class Deadapult extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Zombie"); + + static { + filter.add(new SubtypePredicate("Zombie")); + } + + public Deadapult(UUID ownerId) { + super(ownerId, 59, "Deadapult", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + this.expansionSetCode = "PLS"; + + // {R}, Sacrifice a Zombie: Deadapult deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(filter))); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public Deadapult(final Deadapult card) { + super(card); + } + + @Override + public Deadapult copy() { + return new Deadapult(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/LashknifeBarrier.java b/Mage.Sets/src/mage/sets/planeshift/LashknifeBarrier.java new file mode 100644 index 0000000000..6bd7bcce0b --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/LashknifeBarrier.java @@ -0,0 +1,112 @@ +/* + * 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.planeshift; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +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.game.Game; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author LoneFox + + */ +public class LashknifeBarrier extends CardImpl { + + public LashknifeBarrier(UUID ownerId) { + super(ownerId, 9, "Lashknife Barrier", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "PLS"; + + // When Lashknife Barrier enters the battlefield, draw a card. + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1))); + // If a source would deal damage to a creature you control, it deals that much damage minus 1 to that creature instead. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new LashknifeBarrierEffect())); + } + + public LashknifeBarrier(final LashknifeBarrier card) { + super(card); + } + + @Override + public LashknifeBarrier copy() { + return new LashknifeBarrier(this); + } +} + +class LashknifeBarrierEffect extends ReplacementEffectImpl { + + public LashknifeBarrierEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "If a source would deal damage to a creature you control, it deals that much damage minus 1 to that creature instead."; + } + + public LashknifeBarrierEffect(final LashknifeBarrierEffect effect) { + super(effect); + } + + @Override + public LashknifeBarrierEffect copy() { + return new LashknifeBarrierEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + event.setAmount(event.getAmount() - 1); + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == EventType.DAMAGE_CREATURE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + Permanent creature = game.getPermanent(event.getTargetId()); + return creature.getControllerId().equals(source.getControllerId()); + } + +} diff --git a/Mage.Sets/src/mage/sets/planeshift/NightscapeBattlemage.java b/Mage.Sets/src/mage/sets/planeshift/NightscapeBattlemage.java new file mode 100644 index 0000000000..93abcb56d6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/NightscapeBattlemage.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.planeshift; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.KickedCostCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.KickerAbility; +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.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + + */ +public class NightscapeBattlemage extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("up to two nonblack creatures"); + + static { + filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); + } + + public NightscapeBattlemage(UUID ownerId) { + super(ownerId, 47, "Nightscape Battlemage", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); + this.expansionSetCode = "PLS"; + this.subtype.add("Zombie"); + this.subtype.add("Wizard"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Kicker {2}{U} and/or {2}{R} + KickerAbility kickerAbility = new KickerAbility("{2}{U}"); + kickerAbility.addKickerCost("{2}{R}"); + this.addAbility(kickerAbility); + // When Nightscape Battlemage enters the battlefield, if it was kicked with its {2}{U} kicker, return up to two target nonblack creatures to their owners' hands. + TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent(0, 2, filter, false)); + this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{2}{U}"), + "When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, return up to two target nonblack creatures to their owners' hands.")); + // When Nightscape Battlemage enters the battlefield, if it was kicked with its {2}{R} kicker, destroy target land. + ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect(), false); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{2}{R}"), + "When {this} enters the battlefield, if it was kicked with its {2}{R} kicker, destroy target land.")); + } + + public NightscapeBattlemage(final NightscapeBattlemage card) { + super(card); + } + + @Override + public NightscapeBattlemage copy() { + return new NightscapeBattlemage(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planeshift/QuestingPhelddagrif.java b/Mage.Sets/src/mage/sets/planeshift/QuestingPhelddagrif.java new file mode 100644 index 0000000000..5c1d1edf58 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planeshift/QuestingPhelddagrif.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.planeshift; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + + */ +public class QuestingPhelddagrif extends mage.sets.prereleaseevents.QuestingPhelddagrif { + + public QuestingPhelddagrif(UUID ownerId) { + super(ownerId); + this.cardNumber = 119; + this.expansionSetCode = "PLS"; + this.rarity = Rarity.RARE; + } + + public QuestingPhelddagrif(final QuestingPhelddagrif card) { + super(card); + } + + @Override + public QuestingPhelddagrif copy() { + return new QuestingPhelddagrif(this); + } +} diff --git a/Mage.Sets/src/mage/sets/prereleaseevents/QuestingPhelddagrif.java b/Mage.Sets/src/mage/sets/prereleaseevents/QuestingPhelddagrif.java new file mode 100644 index 0000000000..1aee4f8fb0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/prereleaseevents/QuestingPhelddagrif.java @@ -0,0 +1,113 @@ +/* + * 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.prereleaseevents; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenTargetEffect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.common.GainLifeTargetEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.permanent.token.Token; +import mage.target.common.TargetOpponent; + +/** + * + * @author LoneFox + + */ +public class QuestingPhelddagrif extends CardImpl { + + private static final FilterCard filter = new FilterCard("black and from red"); + + static { + filter.add(Predicates.or(new ColorPredicate(ObjectColor.BLACK), new ColorPredicate(ObjectColor.RED))); + } + + public QuestingPhelddagrif(UUID ownerId) { + super(ownerId, 13, "Questing Phelddagrif", Rarity.SPECIAL, new CardType[]{CardType.CREATURE}, "{1}{W}{U}{G}"); + this.expansionSetCode = "PTC"; + this.subtype.add("Phelddagrif"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // {G}: Questing Phelddagrif gets +1/+1 until end of turn. Target opponent puts a 1/1 green Hippo creature token onto the battlefield. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), + new ManaCostsImpl("{G}")); + ability.addEffect(new CreateTokenTargetEffect(new HippoToken())); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + // {W}: Questing Phelddagrif gains protection from black and from red until end of turn. Target opponent gains 2 life. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new ProtectionAbility(filter), + Duration.EndOfTurn), new ManaCostsImpl("{W}")); + ability.addEffect(new GainLifeTargetEffect(2)); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + // {U}: Questing Phelddagrif gains flying until end of turn. Target opponent may draw a card. + ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(FlyingAbility.getInstance(), + Duration.EndOfTurn), new ManaCostsImpl("{U}")); + ability.addEffect(new DrawCardTargetEffect(1, true)); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public QuestingPhelddagrif(final QuestingPhelddagrif card) { + super(card); + } + + @Override + public QuestingPhelddagrif copy() { + return new QuestingPhelddagrif(this); + } +} + +class HippoToken extends Token { + public HippoToken() { + super("Hippo", "1/1 green Hippo creature token"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add("Hippo"); + power = new MageInt(1); + toughness = new MageInt(1); + } +} diff --git a/Mage/src/mage/abilities/effects/common/PutCreatureOnBattlefieldEffect.java b/Mage/src/mage/abilities/effects/common/PutCreatureOnBattlefieldEffect.java index 9d5d1572fd..822c21199b 100644 --- a/Mage/src/mage/abilities/effects/common/PutCreatureOnBattlefieldEffect.java +++ b/Mage/src/mage/abilities/effects/common/PutCreatureOnBattlefieldEffect.java @@ -1,6 +1,7 @@ package mage.abilities.effects.common; import mage.abilities.Ability; +import mage.abilities.Mode; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.constants.Outcome; @@ -15,15 +16,20 @@ import mage.target.common.TargetCardInHand; */ public class PutCreatureOnBattlefieldEffect extends OneShotEffect { - private static final String choiceText = "Put a creature card from your hand onto the battlefield?"; + private final FilterCreatureCard filter; public PutCreatureOnBattlefieldEffect() { + this(new FilterCreatureCard("a creature card")); + } + + public PutCreatureOnBattlefieldEffect(FilterCreatureCard filter) { super(Outcome.PutCreatureInPlay); - this.staticText = "You may put a creature card from your hand onto the battlefield"; + this.filter = filter; } public PutCreatureOnBattlefieldEffect(final PutCreatureOnBattlefieldEffect effect) { super(effect); + this.filter = effect.filter.copy(); } @Override @@ -34,11 +40,12 @@ public class PutCreatureOnBattlefieldEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); + String choiceText = "Put " + filter.getMessage() + " from your hand onto the battlefield?"; if (player == null || !player.chooseUse(Outcome.PutCreatureInPlay, choiceText, source, game)) { return false; } - TargetCardInHand target = new TargetCardInHand(new FilterCreatureCard()); + TargetCardInHand target = new TargetCardInHand(filter); if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { @@ -48,4 +55,13 @@ public class PutCreatureOnBattlefieldEffect extends OneShotEffect { } return false; } -} \ No newline at end of file + + @Override + public String getText(Mode mode) { + if(this.staticText != null && !this.staticText.isEmpty()) { + return staticText; + } + + return "You may put " + filter.getMessage() + " from your hand onto the battlefield"; + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 4535fb23d1..b9bf409993 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -456,7 +456,7 @@ Lightning Angel|Apocalypse|108|R|{1}{R}{W}{U}|Creature - Angel|3|4|Flying, vigil Llanowar Dead|Apocalypse|109|C|{B}{G}|Creature - Zombie Elf|2|2|{tap}: Add {B} to your mana pool.| Gerrard Capashen|Apocalypse|11|R|{3}{W}{W}|Legendary Creature - Human Soldier|3|4|At the beginning of your upkeep, you gain 1 life for each card in target opponent's hand.${3}{W}: Tap target creature. Activate this ability only if Gerrard Capashen is attacking.| Martyrs' Tomb|Apocalypse|110|U|{2}{W}{B}|Enchantment|||Pay 2 life: Prevent the next 1 damage that would be dealt to target creature this turn.| -Minotaur Illusionist|Apocalypse|111|U|{3}{U}|Creature - Minotaur Wizard|3|4|{1}{U}: Minotaur Illusionist gains shroud until end of turn. (It can't be the target of spells or abilities.)${R}, Sacrifice Minotaur Illusionist: Minotaur Illusionist deals damage equal to its power to target creature.| +Minotaur Illusionist|Apocalypse|111|U|{3}{U}{R}|Creature - Minotaur Wizard|3|4|{1}{U}: Minotaur Illusionist gains shroud until end of turn. (It can't be the target of spells or abilities.)${R}, Sacrifice Minotaur Illusionist: Minotaur Illusionist deals damage equal to its power to target creature.| Mystic Snake|Apocalypse|112|R|{1}{G}{U}{U}|Creature - Snake|2|2|Flash (You may cast this spell any time you could cast an instant.)$When Mystic Snake enters the battlefield, counter target spell.| Overgrown Estate|Apocalypse|113|R|{B}{G}{W}|Enchantment|||Sacrifice a land: You gain 3 life.| Pernicious Deed|Apocalypse|114|R|{1}{B}{G}|Enchantment|||{X}, Sacrifice Pernicious Deed: Destroy each artifact, creature, and enchantment with converted mana cost X or less.| @@ -27231,4 +27231,4 @@ Plains|Premium Deck Series: Slivers|37|L||Basic Land - Plains|||W| Island|Premium Deck Series: Slivers|38|L||Basic Land - Island|||U| Swamp|Premium Deck Series: Slivers|39|L||Basic Land - Swamp|||B| Mountain|Premium Deck Series: Slivers|40|L||Basic Land - Mountain|||R| -Forest|Premium Deck Series: Slivers|41|L||Basic Land - Forest|||G| \ No newline at end of file +Forest|Premium Deck Series: Slivers|41|L||Basic Land - Forest|||G|