From 4d50dfd4758f0f842b5d1f1b1dd1759f4c13f2d0 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Fri, 27 Nov 2020 14:33:20 +0400 Subject: [PATCH] * Reviving Vapors - fixed missing gain life part of the effect (#7205); --- .../src/mage/cards/d/DaxosOfMeletis.java | 5 +---- .../src/mage/cards/r/RevivingVapors.java | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java b/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java index ed3225770f..69497ca891 100644 --- a/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java +++ b/Mage.Sets/src/mage/cards/d/DaxosOfMeletis.java @@ -85,10 +85,7 @@ class DaxosOfMeletisEffect extends OneShotEffect { // move card to exile controller.moveCardsToExile(card, source, game, true, exileId, sourceObject.getIdName()); // player gains life - int cmc = card.getConvertedManaCost(); - if (cmc > 0) { - controller.gainLife(cmc, game, source); - } + controller.gainLife(card.getConvertedManaCost(), game, source); // Add effects only if the card has a spellAbility (e.g. not for lands). if (card.getSpellAbility() != null) { // allow to cast the card diff --git a/Mage.Sets/src/mage/cards/r/RevivingVapors.java b/Mage.Sets/src/mage/cards/r/RevivingVapors.java index 0c90f22883..94bf3d6f7a 100644 --- a/Mage.Sets/src/mage/cards/r/RevivingVapors.java +++ b/Mage.Sets/src/mage/cards/r/RevivingVapors.java @@ -1,15 +1,9 @@ - package mage.cards.r; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; @@ -18,14 +12,15 @@ import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class RevivingVapors extends CardImpl { public RevivingVapors(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{U}"); // Reveal the top three cards of your library and put one of them into your hand. You gain life equal to that card's converted mana cost. Put all other cards revealed this way into your graveyard. this.getSpellAbility().addEffect(new RevivingVaporsEffect()); @@ -62,12 +57,14 @@ class RevivingVaporsEffect extends OneShotEffect { Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 3)); if (!cards.isEmpty()) { + // Reveal the top three cards of your library and put one of them into your hand controller.revealCards(sourceObject.getName(), cards, game); Card card = null; if (cards.size() == 1) { card = cards.getRandom(game); } else { TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put into your hand")); + target.setNotTarget(true); target.setRequired(true); if (controller.choose(Outcome.DrawCard, cards, target, game)) { card = cards.get(target.getFirstTarget(), game); @@ -76,7 +73,12 @@ class RevivingVaporsEffect extends OneShotEffect { if (card != null) { cards.remove(card); controller.moveCards(card, Zone.HAND, source, game); + + // You gain life equal to that card's converted mana cost + controller.gainLife(card.getConvertedManaCost(), game, source); } + + // Put all other cards revealed this way into your graveyard controller.moveCards(cards, Zone.GRAVEYARD, source, game); } return true;