From bf31fcb585014fd5cf440dd330ff7eb76ea590c3 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 9 Nov 2014 11:09:19 +0100 Subject: [PATCH] Added Gerrard's Verdict, Grafted Wargear, Parallax Wave, Psychatog. --- .../mage/sets/apocalypse/GerrardsVerdict.java | 165 ++++++++++++++++++ .../mage/sets/fifthdawn/GraftedWargear.java | 73 ++++++++ .../src/mage/sets/magic2011/WarlordsAxe.java | 6 +- .../src/mage/sets/nemesis/ParallaxWave.java | 116 ++++++++++++ .../src/mage/sets/odyssey/Psychatog.java | 52 ++++++ .../scarsofmirrodin/GraftedExoskeleton.java | 7 +- .../sets/vintagemasters/ParallaxWave.java | 52 ++++++ .../mage/sets/vintagemasters/Psychatog.java | 76 ++++++++ Mage/src/mage/players/PlayerImpl.java | 2 +- 9 files changed, 545 insertions(+), 4 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/apocalypse/GerrardsVerdict.java create mode 100644 Mage.Sets/src/mage/sets/fifthdawn/GraftedWargear.java create mode 100644 Mage.Sets/src/mage/sets/nemesis/ParallaxWave.java create mode 100644 Mage.Sets/src/mage/sets/odyssey/Psychatog.java create mode 100644 Mage.Sets/src/mage/sets/vintagemasters/ParallaxWave.java create mode 100644 Mage.Sets/src/mage/sets/vintagemasters/Psychatog.java diff --git a/Mage.Sets/src/mage/sets/apocalypse/GerrardsVerdict.java b/Mage.Sets/src/mage/sets/apocalypse/GerrardsVerdict.java new file mode 100644 index 0000000000..b371a6c895 --- /dev/null +++ b/Mage.Sets/src/mage/sets/apocalypse/GerrardsVerdict.java @@ -0,0 +1,165 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.WatcherScope; +import mage.filter.common.FilterLandCard; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.watchers.Watcher; + +/** + * + * @author LevelX2 + */ +public class GerrardsVerdict extends CardImpl { + + public GerrardsVerdict(UUID ownerId) { + super(ownerId, 102, "Gerrard's Verdict", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{W}{B}"); + this.expansionSetCode = "APC"; + + this.color.setBlack(true); + this.color.setWhite(true); + + // Target player discards two cards. You gain 3 life for each land card discarded this way. + this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); + this.getSpellAbility().addEffect(new GerrardsVerdictEffect()); + this.getSpellAbility().addTarget(new TargetPlayer()); + this.addWatcher(new GerrardsVerdictWatcher()); + + } + + public GerrardsVerdict(final GerrardsVerdict card) { + super(card); + } + + @Override + public GerrardsVerdict copy() { + return new GerrardsVerdict(this); + } +} + +class GerrardsVerdictEffect extends OneShotEffect { + + public GerrardsVerdictEffect() { + super(Outcome.Benefit); + this.staticText = "You gain 3 life for each land card discarded this way"; + } + + public GerrardsVerdictEffect(final GerrardsVerdictEffect effect) { + super(effect); + } + + @Override + public GerrardsVerdictEffect copy() { + return new GerrardsVerdictEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + GerrardsVerdictWatcher watcher = (GerrardsVerdictWatcher) game.getState().getWatchers().get("GerrardsVerdictWatcher"); + if (watcher != null) { + Cards cards = watcher.getCardsDiscardedBySource(source.getSourceId()); + int life = cards.count(new FilterLandCard(), game) * 3; + controller.gainLife(life, game); + return true; + } + } + return false; + } +} + +class GerrardsVerdictWatcher extends Watcher { + + private final Map cardsDiscardedBySource = new HashMap<>(); + + public GerrardsVerdictWatcher() { + super("GerrardsVerdictWatcher", WatcherScope.GAME); + } + + public GerrardsVerdictWatcher(final GerrardsVerdictWatcher watcher) { + super(watcher); + for (Entry entry : watcher.cardsDiscardedBySource.entrySet()) { + cardsDiscardedBySource.put(entry.getKey(), entry.getValue()); + } + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DISCARDED_CARD) { + Card card = game.getCard(event.getTargetId()); + if (card != null) { + Cards cards = cardsDiscardedBySource.get(event.getSourceId()); + if (cards == null) { + cards = new CardsImpl(); + cardsDiscardedBySource.put(event.getSourceId(), cards); + } + cards.add(card); + } + } + } + + /** + * get and remove the cards discarded by a sourceId + * @param sourceId + * @return + */ + public Cards getCardsDiscardedBySource(UUID sourceId) { + Cards cards = cardsDiscardedBySource.get(sourceId); + cardsDiscardedBySource.remove(sourceId); + return cards; + } + + @Override + public void reset() { + cardsDiscardedBySource.clear(); + } + + @Override + public GerrardsVerdictWatcher copy() { + return new GerrardsVerdictWatcher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthdawn/GraftedWargear.java b/Mage.Sets/src/mage/sets/fifthdawn/GraftedWargear.java new file mode 100644 index 0000000000..5b05ea0438 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthdawn/GraftedWargear.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fifthdawn; + +import java.util.UUID; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.UnattachedTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.SacrificeEquippedEffect; +import mage.abilities.effects.common.continious.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author LevelX2 + */ +public class GraftedWargear extends CardImpl { + + public GraftedWargear(UUID ownerId) { + super(ownerId, 126, "Grafted Wargear", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); + this.expansionSetCode = "5DN"; + this.subtype.add("Equipment"); + + // Equipped creature gets +3/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 2))); + + // Whenever Grafted Wargear becomes unattached from a permanent, sacrifice that permanent. + this.addAbility(new UnattachedTriggeredAbility(new SacrificeEquippedEffect(), false)); + + // Equip {0} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(0))); + + } + + public GraftedWargear(final GraftedWargear card) { + super(card); + } + + @Override + public GraftedWargear copy() { + return new GraftedWargear(this); + } +} diff --git a/Mage.Sets/src/mage/sets/magic2011/WarlordsAxe.java b/Mage.Sets/src/mage/sets/magic2011/WarlordsAxe.java index ae3ff7cfc0..4d0533fb41 100644 --- a/Mage.Sets/src/mage/sets/magic2011/WarlordsAxe.java +++ b/Mage.Sets/src/mage/sets/magic2011/WarlordsAxe.java @@ -50,8 +50,12 @@ public class WarlordsAxe extends CardImpl { super(ownerId, 220, "Warlord's Axe", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{3}"); this.expansionSetCode = "M11"; this.subtype.add("Equipment"); - this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(4))); + + // Equipped creature gets +3/+2. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 1))); + + // Equip {4} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(4))); } protected WarlordsAxe(WarlordsAxe me) { diff --git a/Mage.Sets/src/mage/sets/nemesis/ParallaxWave.java b/Mage.Sets/src/mage/sets/nemesis/ParallaxWave.java new file mode 100644 index 0000000000..d398fbcdc7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/nemesis/ParallaxWave.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.nemesis; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.LeavesBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.abilities.keyword.FadingAbility; +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.counters.CounterType; +import mage.game.ExileZone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ParallaxWave extends CardImpl { + + public ParallaxWave(UUID ownerId) { + super(ownerId, 17, "Parallax Wave", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); + this.expansionSetCode = "NMS"; + + this.color.setWhite(true); + + // Fading 5 + this.addAbility(new FadingAbility(5, this)); + + // Remove a fade counter from Parallax Wave: Exile target creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(this.getId(), this.getName()), new RemoveCountersSourceCost(CounterType.FADE.createInstance())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // When Parallax Wave leaves the battlefield, each player returns to the battlefield all cards he or she owns exiled with Parallax Wave. + this.addAbility(new LeavesBattlefieldTriggeredAbility(new ParallaxWaveEffect(), false)); + + } + + public ParallaxWave(final ParallaxWave card) { + super(card); + } + + @Override + public ParallaxWave copy() { + return new ParallaxWave(this); + } +} + +class ParallaxWaveEffect extends OneShotEffect { + + public ParallaxWaveEffect() { + super(Outcome.Benefit); + this.staticText = "each player returns to the battlefield all cards he or she owns exiled with {this}"; + } + + public ParallaxWaveEffect(final ParallaxWaveEffect effect) { + super(effect); + } + + @Override + public ParallaxWaveEffect copy() { + return new ParallaxWaveEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + ExileZone exileZone = game.getExile().getExileZone(source.getSourceId()); + if (exileZone != null) { + for (Card card: exileZone.getCards(game)) { + Player player = game.getPlayer(card.getOwnerId()); + if (player != null) { + player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId()); + } + } + exileZone.clear(); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/odyssey/Psychatog.java b/Mage.Sets/src/mage/sets/odyssey/Psychatog.java new file mode 100644 index 0000000000..eb1f8226f1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Psychatog.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.odyssey; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class Psychatog extends mage.sets.vintagemasters.Psychatog { + + public Psychatog(UUID ownerId) { + super(ownerId); + this.cardNumber = 292; + this.expansionSetCode = "ODY"; + } + + public Psychatog(final Psychatog card) { + super(card); + } + + @Override + public Psychatog copy() { + return new Psychatog(this); + } +} diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/GraftedExoskeleton.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/GraftedExoskeleton.java index f486c12d65..966afe4808 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/GraftedExoskeleton.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/GraftedExoskeleton.java @@ -50,13 +50,16 @@ public class GraftedExoskeleton extends CardImpl { super(ownerId, 162, "Grafted Exoskeleton", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{4}"); this.expansionSetCode = "SOM"; this.subtype.add("Equipment"); - - this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); + // Equipped creature gets +2/+2 and has infect. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(InfectAbility.getInstance(), AttachmentType.EQUIPMENT))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); + // Whenever Grafted Exoskeleton becomes unattached from a permanent, sacrifice that permanent. this.addAbility(new UnattachedTriggeredAbility(new SacrificeEquippedEffect(), false)); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); } public GraftedExoskeleton(final GraftedExoskeleton card) { diff --git a/Mage.Sets/src/mage/sets/vintagemasters/ParallaxWave.java b/Mage.Sets/src/mage/sets/vintagemasters/ParallaxWave.java new file mode 100644 index 0000000000..7968657a9a --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/ParallaxWave.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.vintagemasters; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ParallaxWave extends mage.sets.nemesis.ParallaxWave { + + public ParallaxWave(UUID ownerId) { + super(ownerId); + this.cardNumber = 37; + this.expansionSetCode = "VMA"; + } + + public ParallaxWave(final ParallaxWave card) { + super(card); + } + + @Override + public ParallaxWave copy() { + return new ParallaxWave(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/Psychatog.java b/Mage.Sets/src/mage/sets/vintagemasters/Psychatog.java new file mode 100644 index 0000000000..66465e4156 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/Psychatog.java @@ -0,0 +1,76 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.vintagemasters; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.ExileFromGraveCost; +import mage.abilities.effects.common.continious.BoostSourceEffect; +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.target.common.TargetCardInYourGraveyard; + +/** + * + * @author LevelX2 + */ +public class Psychatog extends CardImpl { + + public Psychatog(UUID ownerId) { + super(ownerId, 258, "Psychatog", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}{B}"); + this.expansionSetCode = "VMA"; + this.subtype.add("Atog"); + + this.color.setBlue(true); + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // Discard a card: Psychatog gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,1,Duration.EndOfTurn), new DiscardCardCost())); + + // Exile two cards from your graveyard: Psychatog gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1,1,Duration.EndOfTurn), new ExileFromGraveCost(new TargetCardInYourGraveyard(2, new FilterCard("cards from your graveyard"))))); + + } + + public Psychatog(final Psychatog card) { + super(card); + } + + @Override + public Psychatog copy() { + return new Psychatog(this); + } +} diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 1ed27ed221..4fab433469 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -1444,7 +1444,7 @@ public abstract class PlayerImpl implements Player, Serializable { @Override public int gainLife(int amount, Game game) { - if (!canGainLife) { + if (!canGainLife || amount == 0) { return 0; } GameEvent event = new GameEvent(GameEvent.EventType.GAIN_LIFE, playerId, playerId, playerId, amount, false);