From 8d6986980dfca5c67de04776590f321934912a6a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 28 Sep 2017 11:05:26 -0400 Subject: [PATCH] updated Thran Turbine and Carpet of Flowers to their new errata --- .../src/mage/cards/c/CarpetOfFlowers.java | 19 ++-------------- Mage.Sets/src/mage/cards/t/ThranTurbine.java | 22 ++----------------- 2 files changed, 4 insertions(+), 37 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java b/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java index d320f00f06..ac2aa41969 100644 --- a/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java +++ b/Mage.Sets/src/mage/cards/c/CarpetOfFlowers.java @@ -34,7 +34,6 @@ import mage.abilities.effects.common.ManaEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.ChoiceColor; -import mage.choices.ChoiceImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SubType; @@ -48,8 +47,6 @@ import mage.game.events.GameEvent.EventType; import mage.players.Player; import mage.target.common.TargetOpponent; -import java.util.LinkedHashSet; -import java.util.Set; import java.util.UUID; /** @@ -145,7 +142,7 @@ class CarpetOfFlowersEffect extends ManaEffect { CarpetOfFlowersEffect() { super(); - staticText = "add up to X mana of any one color to your mana pool, where X is the number of Islands target opponent controls"; + staticText = "add X mana of any one color to your mana pool, where X is the number of Islands target opponent controls"; } CarpetOfFlowersEffect(final CarpetOfFlowersEffect effect) { @@ -163,19 +160,7 @@ class CarpetOfFlowersEffect extends ManaEffect { return false; } } - int countMax = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game); - ChoiceImpl choiceCount = new ChoiceImpl(true); - Set set = new LinkedHashSet<>(countMax + 1); - for (int i = 0; i <= countMax; i++) { - set.add(Integer.toString(i)); - } - choiceCount.setChoices(set); - choiceCount.setMessage("Choose number of mana"); - controller.choose(Outcome.PutManaInPool, choiceCount, game); - int count = 0; - if (choiceCount.getChoice() != null) { - count = Integer.parseInt(choiceCount.getChoice()); - } + int count = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game); if (count > 0) { Mana mana = new Mana(); switch (choice.getChoice()) { diff --git a/Mage.Sets/src/mage/cards/t/ThranTurbine.java b/Mage.Sets/src/mage/cards/t/ThranTurbine.java index b2480d4a6d..2ebbe11744 100644 --- a/Mage.Sets/src/mage/cards/t/ThranTurbine.java +++ b/Mage.Sets/src/mage/cards/t/ThranTurbine.java @@ -39,8 +39,6 @@ import mage.abilities.mana.builder.ConditionalManaBuilder; import mage.abilities.mana.conditional.ManaCondition; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.choices.Choice; -import mage.choices.ChoiceImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.TargetController; @@ -50,8 +48,6 @@ import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; -import java.util.HashSet; -import java.util.Set; import java.util.UUID; /** @@ -81,7 +77,7 @@ class ThranTurbineEffect extends OneShotEffect { public ThranTurbineEffect() { super(Outcome.Benefit); - staticText = "add {C} or {C}{C} to your mana pool. You can't spend this mana to cast spells"; + staticText = "add {C}{C} to your mana pool. You can't spend this mana to cast spells"; } public ThranTurbineEffect(final ThranTurbineEffect effect) { @@ -98,21 +94,7 @@ class ThranTurbineEffect extends OneShotEffect { Player player = game.getPlayer(targetPointer.getFirst(game, source)); if (player != null) { - Choice numberChoice = new ChoiceImpl(); - Set numbers = new HashSet<>(); - numbers.add(Integer.toString(1)); - numbers.add(Integer.toString(2)); - numberChoice.setChoices(numbers); - numberChoice.setMessage("Choose the amount of {C} mana to add"); - - while (!player.choose(Outcome.Benefit, numberChoice, game)) { - if (!player.canRespond()) { - return false; - } - } - - int count = Integer.parseInt(numberChoice.getChoice()); - new AddConditionalColorlessManaEffect(count, new ThranTurbineManaBuilder()).apply(game, source); + new AddConditionalColorlessManaEffect(2, new ThranTurbineManaBuilder()).apply(game, source); return true; } return false;