diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/CallTheGatewatch.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/CallTheGatewatch.java new file mode 100644 index 00000000000..9128d932bae --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/CallTheGatewatch.java @@ -0,0 +1,62 @@ +/* + * 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.oathofthegatewatch; + +import java.util.UUID; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterPlaneswalkerCard; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author fireshoes + */ +public class CallTheGatewatch extends CardImpl { + + private static final FilterPlaneswalkerCard filter = new FilterPlaneswalkerCard("planeswalker card"); + + public CallTheGatewatch(UUID ownerId) { + super(ownerId, 16, "Call the Gatewatch", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}"); + this.expansionSetCode = "OGW"; + + // Search your library for a planeswalker card, reveal it, and put it into your hand. Then shuffle your library. + this.getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true)); + } + + public CallTheGatewatch(final CallTheGatewatch card) { + super(card); + } + + @Override + public CallTheGatewatch copy() { + return new CallTheGatewatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/EldraziMimic.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/EldraziMimic.java new file mode 100644 index 00000000000..f97b1a67bac --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/EldraziMimic.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.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SetTargetPointer; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author fireshoes + */ +public class EldraziMimic extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another colorless creature"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ColorlessPredicate()); + } + + public EldraziMimic(UUID ownerId) { + super(ownerId, 2, "Eldrazi Mimic", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Eldrazi"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Whenever another colorless creature enters the battlefield under your control, you may have the base power and toughness of Eldrazi Mimic + // become that creature's power and toughness until end of turn. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new EldraziMimicEffect(), filter, true, SetTargetPointer.PERMANENT, + "Whenever another colorless creature enters the battlefield under your control, you may have the base power and toughness of {this} become " + + "that creature's power and toughness until end of turn")); + } + + public EldraziMimic(final EldraziMimic card) { + super(card); + } + + @Override + public EldraziMimic copy() { + return new EldraziMimic(this); + } +} + +class EldraziMimicEffect extends OneShotEffect { + + public EldraziMimicEffect() { + super(Outcome.Detriment); + } + + public EldraziMimicEffect(final EldraziMimicEffect effect) { + super(effect); + } + + @Override + public EldraziMimicEffect copy() { + return new EldraziMimicEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source)); + if (permanent != null) { + ContinuousEffect effect = new SetPowerToughnessSourceEffect(permanent.getPower().getValue(), permanent.getToughness().getValue(), Duration.EndOfTurn, SubLayer.SetPT_7b); + game.addEffect(effect, source); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/FlayerDrone.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/FlayerDrone.java new file mode 100644 index 00000000000..5872c41bf52 --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/FlayerDrone.java @@ -0,0 +1,87 @@ +/* + * 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.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.FirstStrikeAbility; +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.mageobject.ColorlessPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class FlayerDrone extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another colorless creature"); + + static { + filter.add(new AnotherPredicate()); + filter.add(new ColorlessPredicate()); + } + + public FlayerDrone(UUID ownerId) { + super(ownerId, 148, "Flayer Drone", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // Whenever another colorless creature enters the battlefield under your control, target opponent loses 1 life. + Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1), filter, false); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public FlayerDrone(final FlayerDrone card) { + super(card); + } + + @Override + public FlayerDrone copy() { + return new FlayerDrone(this); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/ForcedWillEldrazi.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/ForcedWillEldrazi.java new file mode 100644 index 00000000000..bd9d3d5c5dd --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/ForcedWillEldrazi.java @@ -0,0 +1,91 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.DevoidAbility; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author fireshoes + */ +public class ForcedWillEldrazi extends CardImpl { + + public ForcedWillEldrazi(UUID ownerId) { + super(ownerId, 96, "Forced-Will Eldrazi", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // When you cast Forced-Will Eldrazi, you may pay {1}{C}. If you do, gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. + Ability ability = new CastSourceTriggeredAbility(new DoIfCostPaid(new GainControlTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{C}"))); + Effect effect = new UntapTargetEffect(); + effect.setText("Untap that creature"); + ability.addEffect(effect); + effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); + effect.setText("It gains haste until end of turn"); + ability.addEffect(effect); + Target target = new TargetCreaturePermanent(new FilterCreaturePermanent()); + ability.addTarget(target); + this.addAbility(ability); + } + + public ForcedWillEldrazi(final ForcedWillEldrazi card) { + super(card); + } + + @Override + public ForcedWillEldrazi copy() { + return new ForcedWillEldrazi(this); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/GladehartCavalry.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/GladehartCavalry.java new file mode 100644 index 00000000000..9e535d57ee0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/GladehartCavalry.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.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.SupportAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author fireshoes + */ +public class GladehartCavalry extends CardImpl { + + public GladehartCavalry(UUID ownerId) { + super(ownerId, 132, "Gladehart Cavalry", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Elf"); + this.subtype.add("Knight"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // When Gladehart Cavalry enters the battlefield, support 6. + this.addAbility(new SupportAbility(this, 6)); + + // Whenever a creature you control with a +1/+1 counter on it dies, you gain 2 life. + this.addAbility(new GladehartCavalryTriggeredAbility()); + } + + public GladehartCavalry(final GladehartCavalry card) { + super(card); + } + + @Override + public GladehartCavalry copy() { + return new GladehartCavalry(this); + } +} + +class GladehartCavalryTriggeredAbility extends TriggeredAbilityImpl { + + public GladehartCavalryTriggeredAbility() { + super(Zone.BATTLEFIELD, new GainLifeEffect(2)); + } + + public GladehartCavalryTriggeredAbility(final GladehartCavalryTriggeredAbility ability) { + super(ability); + } + + @Override + public GladehartCavalryTriggeredAbility copy() { + return new GladehartCavalryTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.ZONE_CHANGE; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD + && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) { + Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); + if (permanent != null + && permanent.getControllerId().equals(this.getControllerId()) + && permanent.getCardType().contains(CardType.CREATURE) + && permanent.getCounters().getCount(CounterType.P1P1) > 0) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever a creature you control with a +1/+1 counter on it dies, " + super.getRule(); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/JoragaAuxiliary.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/JoragaAuxiliary.java new file mode 100644 index 00000000000..9b055b99644 --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/JoragaAuxiliary.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.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.keyword.SupportEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class JoragaAuxiliary extends CardImpl { + + public JoragaAuxiliary(UUID ownerId) { + super(ownerId, 154, "Joraga Auxiliary", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Elf"); + this.subtype.add("Soldier"); + this.subtype.add("Ally"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // {4}{G}{W}: Support 2. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SupportEffect(this, 2), new ManaCostsImpl("{4}{G}{W}"))); + } + + public JoragaAuxiliary(final JoragaAuxiliary card) { + super(card); + } + + @Override + public JoragaAuxiliary copy() { + return new JoragaAuxiliary(this); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/LinvalaThePreserver.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/LinvalaThePreserver.java new file mode 100644 index 00000000000..d03352b0e9c --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/LinvalaThePreserver.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.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.OpponentControlsMoreCondition; +import mage.abilities.condition.common.OpponentHasMoreLifeCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.permanent.token.Token; + +/** + * + * @author fireshoes + */ +public class LinvalaThePreserver extends CardImpl { + + public LinvalaThePreserver(UUID ownerId) { + super(ownerId, 25, "Linvala, the Preserver", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "OGW"; + this.supertype.add("Legendary"); + this.subtype.add("Angel"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Linvala, the Preserver enters the battlefield, if an opponent has more life than you, you gain 5 life. + this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(5), false), + new OpponentHasMoreLifeCondition(), + "When {this} enters the battlefield, if an opponent has more life than you, you gain 5 life.")); + + // When Linvala enters the battlefield, if an opponent controls more creatures than you, put a 3/3 white Angel creature token with flying onto the battlefield. + this.addAbility(new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new LinvalaAngelToken()), false), + new OpponentControlsMoreCondition(new FilterCreaturePermanent()), + "When {this} enters the battlefield, if an opponent controls more creatures than you, put a 3/3 white Angel creature token with flying onto the battlefield.")); + } + + public LinvalaThePreserver(final LinvalaThePreserver card) { + super(card); + } + + @Override + public LinvalaThePreserver copy() { + return new LinvalaThePreserver(this); + } +} + +class LinvalaAngelToken extends Token { + + public LinvalaAngelToken() { + super("Angel", "3/3 white Angel creature token with flying"); + setOriginalExpansionSetCode("OGW"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Angel"); + power = new MageInt(3); + toughness = new MageInt(3); + addAbility(FlyingAbility.getInstance()); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/Mindmelter.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/Mindmelter.java new file mode 100644 index 00000000000..720a303572d --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/Mindmelter.java @@ -0,0 +1,82 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.ExileFromZoneTargetEffect; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.abilities.keyword.DevoidAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.target.common.TargetOpponent; + +/** + * + * @author fireshoes + */ +public class Mindmelter extends CardImpl { + + public Mindmelter(UUID ownerId) { + super(ownerId, 149, "Mindmelter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Eldrazi"); + this.subtype.add("Drone"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Devoid + this.addAbility(new DevoidAbility(this.color)); + + // Mindmelter can't be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + + // {3}{C}: Target opponent exiles a card from his or her hand. Activate this ability only any time you could cast a sorcery. + Effect effect = new ExileFromZoneTargetEffect(Zone.HAND, null, "", new FilterCard()); + effect.setText("Target opponent exiles a card from his or her hand"); + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{C}")); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + } + + public Mindmelter(final Mindmelter card) { + super(card); + } + + @Override + public Mindmelter copy() { + return new Mindmelter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/RelentlessHunter.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/RelentlessHunter.java new file mode 100644 index 00000000000..af0195b6b47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/RelentlessHunter.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.oathofthegatewatch; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author fireshoes + */ +public class RelentlessHunter extends CardImpl { + + public RelentlessHunter(UUID ownerId) { + super(ownerId, 158, "Relentless Hunter", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); + this.expansionSetCode = "OGW"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {1}{R}{G}: Relentless Hunter gets +1/+1 and gains trample until end of turn. + Effect effect1 = new BoostSourceEffect(1, 1, Duration.EndOfTurn); + effect1.setText("{this} gets +1/+1"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect1, new ManaCostsImpl("{1}{R}{G}")); + Effect effect2 = new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn); + effect2.setText("and gains trample until end of turn"); + ability.addEffect(effect2); + this.addAbility(ability); + } + + public RelentlessHunter(final RelentlessHunter card) { + super(card); + } + + @Override + public RelentlessHunter copy() { + return new RelentlessHunter(this); + } +} diff --git a/Mage/src/main/java/mage/abilities/condition/common/OpponentHasMoreLifeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/OpponentHasMoreLifeCondition.java new file mode 100644 index 00000000000..d78083d48d9 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/condition/common/OpponentHasMoreLifeCondition.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.abilities.condition.common; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author fireshoes + */ + +public class OpponentHasMoreLifeCondition implements Condition { + + public OpponentHasMoreLifeCondition() { + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + for (UUID uuid : game.getOpponents(controller.getId())) { + Player opponent = game.getPlayer(uuid); + if (opponent != null) { + if (opponent.getLife() > controller.getLife()) { + return true; + } + } + } + } + return false; + } + + @Override + public String toString() { + return "an opponent has more life than you"; + } +} diff --git a/Mage/src/main/java/mage/abilities/keyword/SupportAbility.java b/Mage/src/main/java/mage/abilities/keyword/SupportAbility.java index a3290f90cdb..6f7b9fdff6d 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SupportAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SupportAbility.java @@ -1,64 +1,64 @@ -/* - * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of BetaSteward_at_googlemail.com. - */ -package mage.abilities.keyword; - -import mage.abilities.common.EntersBattlefieldAbility; -import mage.abilities.effects.keyword.SupportEffect; -import mage.cards.Card; -import mage.constants.CardType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.AnotherPredicate; -import mage.target.common.TargetCreaturePermanent; - -/** - * - * @author LevelX2 - */ -public class SupportAbility extends EntersBattlefieldAbility { - - public SupportAbility(Card card, int amount) { - super(new SupportEffect(card, amount), false); - if (!card.getCardType().contains(CardType.INSTANT) && !card.getCardType().contains(CardType.SORCERY)) { - FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures"); - if (card.getCardType().contains(CardType.CREATURE)) { - filter.add(new AnotherPredicate()); - filter.setMessage("other target creatures"); - } - addTarget(new TargetCreaturePermanent(0, amount, filter, false)); - } - } - - public SupportAbility(final SupportAbility ability) { - super(ability); - } - - @Override - public SupportAbility copy() { - return new SupportAbility(this); - } -} +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.abilities.keyword; + +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.keyword.SupportEffect; +import mage.cards.Card; +import mage.constants.CardType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SupportAbility extends EntersBattlefieldTriggeredAbility { + + public SupportAbility(Card card, int amount) { + super(new SupportEffect(card, amount), false); + if (!card.getCardType().contains(CardType.INSTANT) && !card.getCardType().contains(CardType.SORCERY)) { + FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures"); + if (card.getCardType().contains(CardType.CREATURE)) { + filter.add(new AnotherPredicate()); + filter.setMessage("other target creatures"); + } + addTarget(new TargetCreaturePermanent(0, amount, filter, false)); + } + } + + public SupportAbility(final SupportAbility ability) { + super(ability); + } + + @Override + public SupportAbility copy() { + return new SupportAbility(this); + } +} diff --git a/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerCard.java b/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerCard.java new file mode 100644 index 00000000000..87d6315383f --- /dev/null +++ b/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerCard.java @@ -0,0 +1,59 @@ +/* +* 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.filter.common; + +import mage.constants.CardType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author fireshoes + */ +public class FilterPlaneswalkerCard extends FilterCard { + + public FilterPlaneswalkerCard() { + this("planeswalker card"); + } + + public FilterPlaneswalkerCard(String name) { + super(name); + this.add(new CardTypePredicate(CardType.PLANESWALKER)); + } + + public FilterPlaneswalkerCard(final FilterPlaneswalkerCard filter) { + super(filter); + } + + @Override + public FilterPlaneswalkerCard copy() { + return new FilterPlaneswalkerCard(this); + } + +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index bc026499119..ba1588e37f9 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -28248,7 +28248,9 @@ Endbringer|Oath of the Gatewatch|3|R|{5}{C}|Creature - Eldrazi|5|5|Untap Endbrin Kozilek, the Great Distortion|Oath of the Gatewatch|4|M|{8}{C}{C}|Legendary Creature - Eldrazi|12|12|When you cast Kozilek, the Great Distortion, if you have fewer than seven cards in hand, draw cards equal to the difference.$Menace$Discard a card with converted mana cost X: Counter target spell with converted mana cost X.| Spatial Contortion|Oath of the Gatewatch|8|U|{1}{C}|Instant|||Target creature gets +3/-3 until end of turn.| Walker of the Wastes|Oath of the Gatewatch|10|U|{4}{C}|Creature - Eldrazi|4|4|Trample$Walker of the Wastes gets +1/+1 for each land you control named Wastes.| +Call the Gatewatch|Oath of the Gatewatch|16|R|{2}{W}|Sorcery|||Search your library for a planeswalker card, reveal it, and put it into your hand. Then shuffle your library.| Immolating Glare|Oath of the Gatewatch|20|U|{1}{W}|Instant|||Destroy target attacking creature.| +Linvala, the Preserver|Oath of the Gatewatch|25|M|{4}{W}{W}|Legendary Creature - Angel|5|5|Flying$When Linvala, the Preserver enters the battlefield, if an opponent has more life than you, you gain 5 life.$When Linvala enters the battlefield, if an opponent controls more creatures than you, put a 3/3 white Angel creature token with flying onto the battlefield.| Munda's Vanguard|Oath of the Gatewatch|29|R|{4}{W}|Creature - Kor Knight Ally|3|3|Cohort — {T}, Tap an untapped Ally you control: Put a +1/+1 counter on each creature you control.| Shoulder to Shoulder|Oath of the Gatewatch|34|C|{2}{W}|Sorcery|||Support 2. (Put a +1/+1 counter on each of up to two target creatures.)$Draw a card.| Deepfathom Skulker|Oath of the Gatewatch|43|R|{5}{U}|Creature - Eldrazi|4|4|Devoid (This card has no color.)$Whenever a creature you control deals combat damage to a player, you may draw a card.${3}{C}: Target creature can't be blocked this turn.| @@ -28258,18 +28260,26 @@ Crush of Tentacles|Oath of the Gatewatch|53|M|{4}{U}{U}|Sorcery|||Surge {3}{U}{U Sphinx of the Final Word|Oath of the Gatewatch|63|M|{5}{U}{U}|Creature - Sphinx|5|5|Sphinx of the Final Word can't be countered.$Flying, hexproof$Instant and sorcery spells you control can't be countered by spells or abilities.| Dread Defiler|Oath of the Gatewatch|68|R|{6}{B}|Creature - Eldrazi|6|8|Devoid (This card has no color.)${3}{C}, Exile a creature card from your graveyard: Target opponent loses life equal to the exiled card's power.| Kalitas, Traitor of Ghet|Oath of the Gatewatch|86|M|{2}{B}{B}|Legendary Creature - Vampire Warrior|3|4|Lifelink$If a nontoken creature an opponent controls would die, instead exile that card and put a 2/2 black Zombie creature token onto the battlefield.${2}{B}, Sacrifice another Vampire or Zombie: Put two +1/+1 counters on Kalitas, Traitor of Ghet.| +Remorseless Punishment|Oath of the Gatewatch|89|R|{3}{B}{B}|Sorcery|||Target opponent loses 5 life unless that player discards two cards or sacrifices a creature or planeswalker. Repeat this process once.| +Forced-Will Eldrazi|Oath of the Gatewatch|96|R|{2}{R}|Creature - Eldrazi Drone|3|1|Devoid (This card has no color.)$Haste$When you cast Forced-Will Eldrazi, you may pay {1}{C}. If you do, gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.| Kozilek's Return|Oath of the Gatewatch|98|M|{2}{R}|Instant|||Devoid (This card has no color.)$Kozilek's Return deals 2 damage to each creature.$Whenever you cast an Eldrazi creature spell with converted mana cost 7 or greater, you may exile Kozilek's Return from your graveyard. If you do, Kozilek's Return deals 5 damage to each creature.| Chandra, Flamecaller|Oath of the Gatewatch|104|M|{4}{R}{R}|Planeswalker - Chandra|||+1: Put two 3/1 red Elemental creature tokens with haste onto the battlefield. Exile them at the beginning of the next end step.$0: Discard all the cards in your hand, then draw that many cards plus one.$-X: Chandra, Flamecaller deals X damage to each creature.| Goblin Dark-Dwellers|Oath of the Gatewatch|110|R|{3}{R}{R}|Creature - Goblin|4|4|Menace$When Goblin Dark-Dwellers enters the battlefield, you may cast target instant or sorcery card with converted mana cost 3 or less from your graveyard without paying its mana cost. If that card would be put into your graveyard this turn, exile it instead.| Reckless Bushwhacker|Oath of the Gatewatch|116|U|{2}{R}|Creature - Goblin Warrior Ally|2|1|Surge {1}{R} (You may cast this spell for its surge cost if you or a teammate has cast another spell this turn.)$Haste$When Reckless Bushwhacker enters the battlefield, if its surge cost was paid, other creatures you control get +1/+0 and gain haste until end of turn.| Tyrant of Valakut|Oath of the Gatewatch|119|R|{5}{R}{R}|Creature - Dragon|5|4|Surge {3}{R}{R} (You may cast this spell for its surge cost if you or a teammate has cast another spell this turn.)$Flying$When Tyrant of Valakut enters the battlefield, if its surge cost was paid, it deals 3 damage to target creature or player.| Scion Summoner|Oath of the Gatewatch|123|C|{2}{G}|Creature - Eldrazi Drone|2|2|Devoid (This card has no color.)$When Scion Summoner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool."| +Vile Redeemer|Oath of the Gatewatch|125|R|{2}{G}|Creature - Eldrazi|3|3|Devoid (This card has no color.)$Flash$When you cast Vile Redeemer, you may pay {C}. If you do put a 1/1 colorless Eldrazi Scion creature token onto the battlefield for each nontoken creature that died under your control this turn. They have "Sacrifice this creature: Add {C} to your mana pool."| World Breaker|Oath of the Gatewatch|126|M|{6}{G}|Creature - Eldrazi|5|7|Devoid (This card has no color.)$When you cast World Breaker, exile target artifact, enchantment, or land.$Reach${2}{C}, Sacrifice a land: Return World Breaker from your graveyard to your hand. ({C} represents colorless mana.)| Gladehart Cavalry|Oath of the Gatewatch|132|R|{5}{G}{G}|Creature - Elf Knight|6|6|When Gladehart Cavalry enters the battlefield, support 6. (Put a +1/+1 counter on each of up to six other target creatures.)$Whenever a creature you control with a +1/+1 counter on it dies, you gain 2 life.| Nissa, Voice of Zendikar|Oath of the Gatewatch|138|M|{1}{G}{G}|Planeswalker - Nissa|||+1: Put a 0/1 green Plant creature token onto the battlefield.$-2: Put a +1/+1 counter on each creature you control.$-7: You gain X life and draw X cards, where X is the number of lands you control.| +Flayer Drone|Oath of the Gatewatch|148|U|{1}{B}{R}|Creature - Eldrazi Drone|3|1|Devoid (This card has no color.)$First strike$Whenever another colorless creature enters the battlefield under your control, target opponent loses 1 life.| +Mindmelter|Oath of the Gatewatch|149|U|{1}{U}{B}|Creature - Eldrazi Drone|2|2|Devoid (This card has no color.)$Mindmelter can't be blocked.${3}{C}: Target opponent exiles a card from his or her hand. Activate this ability only any time you could cast a sorcery. ({C} represents colorless mana.)| Ayli, Eternal Pilgrim|Oath of the Gatewatch|151|R|{W}{B}|Legendary Creature - Kor Cleric|2|3|Deathtouch${1}, Sacrifice another creature: You gain life equal to the sacrificed creature's toughness.${1}{W}{B}, Sacrifice another creature: Exile target nonland permanent. Activate this ability only if you have at least 10 life more than your starting life total.| +Joraga Auxiliary|Oath of the Gatewatch|154|U|{1}{G}{W}|Creature - Elf Soldier Ally|2|3|{4}{G}{W}: Support 2. (Put a +1/+1 counter on each of up to two other target creatures.)| Jori En, Ruin Diver|Oath of the Gatewatch|155|R|{1}{U}{R}|Legendary Creature - Merfolk Wizard|2|3|Whenever you cast your second spell each turn, draw a card.| Mina and Denn, Wildborn|Oath of the Gatewatch|156|R|{2}{R}{G}|Legendary Creature - Elf Ally|4|4|You may play an additional land on each of your turns.${R}{G}, Return a land you control to its owner's hand: Target creature gains trample until end of turn.| +Reflector Mage|Oath of the Gatewatch|157|U|{1}{W}{U}|Creature - Human Wizard|2|3|When Reflector Mage enters the battlefield, return target creature an opponent controls to its owner's hand. That creature's owner can't cast spells with the same name as that creature until your next turn.| +Relentless Hunter|Oath of the Gatewatch|158|U|{1}{R}{G}|Creature - Human Warrior|3|3|{1}{R}{G}: Relentless Hunter gets +1/+1 and gains trample until end of turn.| Ashen Moor|Oath of the Gatewatch|168|U||Land|||Ashen Moor enters the battlefield tapped.${T}: Add {B} or {R} to your mana pool.| Blighted Crossroads|Oath of the Gatewatch|169|R||Land|||{T}: Add {C} to your mana pool. ({C} represents colorless mana.)${T}, Pay 1 life: Add one mana of any color to your mana pool. Spend this mana only to cast spells with devoid.| Crumbling Vestige|Oath of the Gatewatch|170|C||Land|||Crumbling Vestige enters the battlefield tapped.$When Crumbling Vestige enters the battlefield, add one mana of any color to your mana pool.${T}: Add {C} to you mana pool. ({C} represents colorless mana.)|