updated Thran Turbine and Carpet of Flowers to their new errata

This commit is contained in:
Evan Kranzler 2017-09-28 11:05:26 -04:00
parent b70bf04b8e
commit 8d6986980d
2 changed files with 4 additions and 37 deletions

View file

@ -34,7 +34,6 @@ import mage.abilities.effects.common.ManaEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.choices.ChoiceColor; import mage.choices.ChoiceColor;
import mage.choices.ChoiceImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
@ -48,8 +47,6 @@ import mage.game.events.GameEvent.EventType;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
@ -145,7 +142,7 @@ class CarpetOfFlowersEffect extends ManaEffect {
CarpetOfFlowersEffect() { CarpetOfFlowersEffect() {
super(); 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) { CarpetOfFlowersEffect(final CarpetOfFlowersEffect effect) {
@ -163,19 +160,7 @@ class CarpetOfFlowersEffect extends ManaEffect {
return false; return false;
} }
} }
int countMax = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game); int count = game.getBattlefield().count(filter, source.getSourceId(), source.getTargets().getFirstTarget(), game);
ChoiceImpl choiceCount = new ChoiceImpl(true);
Set<String> 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());
}
if (count > 0) { if (count > 0) {
Mana mana = new Mana(); Mana mana = new Mana();
switch (choice.getChoice()) { switch (choice.getChoice()) {

View file

@ -39,8 +39,6 @@ import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.abilities.mana.conditional.ManaCondition; import mage.abilities.mana.conditional.ManaCondition;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.choices.Choice;
import mage.choices.ChoiceImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
@ -50,8 +48,6 @@ import mage.game.permanent.Permanent;
import mage.game.stack.Spell; import mage.game.stack.Spell;
import mage.players.Player; import mage.players.Player;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
@ -81,7 +77,7 @@ class ThranTurbineEffect extends OneShotEffect {
public ThranTurbineEffect() { public ThranTurbineEffect() {
super(Outcome.Benefit); 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) { public ThranTurbineEffect(final ThranTurbineEffect effect) {
@ -98,21 +94,7 @@ class ThranTurbineEffect extends OneShotEffect {
Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player player = game.getPlayer(targetPointer.getFirst(game, source));
if (player != null) { if (player != null) {
Choice numberChoice = new ChoiceImpl(); new AddConditionalColorlessManaEffect(2, new ThranTurbineManaBuilder()).apply(game, source);
Set<String> 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);
return true; return true;
} }
return false; return false;