From 1ef8aeb7ba688d05174c9ccc629e8398f801856c Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 10 Jun 2020 17:20:52 +0200 Subject: [PATCH] * Biomancer's Familiar - Fixed cost reduction effect working wrongly for up to 2 mana and creating exceptions. * Training Grounds - Fixed exception during get playable method. --- .../src/mage/cards/b/BiomancersFamiliar.java | 14 +---------- .../src/mage/cards/t/TrainingGrounds.java | 25 +++++++++++-------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BiomancersFamiliar.java b/Mage.Sets/src/mage/cards/b/BiomancersFamiliar.java index b6e4df29f6d..eb1b89e658f 100644 --- a/Mage.Sets/src/mage/cards/b/BiomancersFamiliar.java +++ b/Mage.Sets/src/mage/cards/b/BiomancersFamiliar.java @@ -86,19 +86,7 @@ class BiomancersFamiliarCostReductionEffect extends CostModificationEffectImpl { if (reduceMax <= 0) { return true; } - ChoiceImpl choice = new ChoiceImpl(true); - Set set = new LinkedHashSet<>(); - - for (int i = 0; i <= reduceMax; i++) { - set.add(String.valueOf(i)); - } - choice.setChoices(set); - choice.setMessage("Reduce ability cost"); - if (!controller.choose(Outcome.Benefit, choice, game)) { - return false; - } - int reduce = Integer.parseInt(choice.getChoice()); - CardUtil.reduceCost(abilityToModify, reduce); + CardUtil.reduceCost(abilityToModify, reduceMax); return true; } diff --git a/Mage.Sets/src/mage/cards/t/TrainingGrounds.java b/Mage.Sets/src/mage/cards/t/TrainingGrounds.java index ee1fb79b692..ea756b64133 100644 --- a/Mage.Sets/src/mage/cards/t/TrainingGrounds.java +++ b/Mage.Sets/src/mage/cards/t/TrainingGrounds.java @@ -42,8 +42,8 @@ public final class TrainingGrounds extends CardImpl { class TrainingGroundsEffect extends CostModificationEffectImpl { - private static final String effectText = "Activated abilities of creatures you control cost {2} less to activate. " + - "This effect can't reduce the mana in that cost to less than one mana"; + private static final String effectText = "Activated abilities of creatures you control cost up to {2} less to activate. " + + "This effect can't reduce the mana in that cost to less than one mana"; TrainingGroundsEffect() { super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST); @@ -74,15 +74,20 @@ class TrainingGroundsEffect extends CostModificationEffectImpl { ChoiceImpl choice = new ChoiceImpl(true); Set set = new LinkedHashSet<>(); - for (int i = 0; i <= reduceMax; i++) { - set.add(String.valueOf(i)); + int reduce; + if (game.inCheckPlayableState()) { + reduce = reduceMax; + } else { + for (int i = 0; i <= reduceMax; i++) { + set.add(String.valueOf(i)); + } + choice.setChoices(set); + choice.setMessage("Reduce ability cost"); + if (!controller.choose(Outcome.Benefit, choice, game)) { + return false; + } + reduce = Integer.parseInt(choice.getChoice()); } - choice.setChoices(set); - choice.setMessage("Reduce ability cost"); - if (!controller.choose(Outcome.Benefit, choice, game)) { - return false; - } - int reduce = Integer.parseInt(choice.getChoice()); CardUtil.reduceCost(abilityToModify, reduce); return true;