From 305403feebe362b2e3b229cf14588458dd7889a7 Mon Sep 17 00:00:00 2001 From: Steve Markham Date: Wed, 7 Feb 2018 20:30:44 -0500 Subject: [PATCH 1/2] Bugfix: Kindred Dominance type choice now works correctly. --- .../src/mage/cards/k/KindredDominance.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Mage.Sets/src/mage/cards/k/KindredDominance.java b/Mage.Sets/src/mage/cards/k/KindredDominance.java index d5183253769..dbd5bb23051 100644 --- a/Mage.Sets/src/mage/cards/k/KindredDominance.java +++ b/Mage.Sets/src/mage/cards/k/KindredDominance.java @@ -35,6 +35,8 @@ import mage.abilities.effects.common.ChooseCreatureTypeEffect; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.choices.Choice; +import mage.choices.ChoiceCreatureType; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SubType; @@ -55,7 +57,6 @@ public class KindredDominance extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{B}{B}"); // Choose a creature type. Destroy all creatures that are not the chosen type. - this.getSpellAbility().addEffect(new ChooseCreatureTypeEffect(Outcome.DestroyPermanent)); this.getSpellAbility().addEffect(new KindredDominanceEffect()); } @@ -88,14 +89,12 @@ class KindredDominanceEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - MageObject mageObject = game.getObject(source.getSourceId()); - if (controller != null & mageObject != null) { - SubType subType = ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(), game); - if (subType != null) { - FilterPermanent filter = new FilterCreaturePermanent("creatures"); - filter.add(Predicates.not(new SubtypePredicate(subType))); - return new DestroyAllEffect(filter).apply(game, source); - } + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); + if (controller != null && controller.choose(outcome, typeChoice, game)) { + game.informPlayers(controller.getLogName() + " has chosen " + typeChoice.getChoice()); + FilterCreaturePermanent filter = new FilterCreaturePermanent("All creatures not of the chosen type"); + filter.add(Predicates.not(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice())))); + return new DestroyAllEffect(filter).apply(game, source); } return false; } From db799afa747d3bd02fc01e004ac9cf50c3b92f92 Mon Sep 17 00:00:00 2001 From: Steve Markham Date: Thu, 8 Feb 2018 12:06:19 -0500 Subject: [PATCH 2/2] Corrected effect text --- Mage.Sets/src/mage/cards/k/KindredDominance.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/k/KindredDominance.java b/Mage.Sets/src/mage/cards/k/KindredDominance.java index dbd5bb23051..be611019039 100644 --- a/Mage.Sets/src/mage/cards/k/KindredDominance.java +++ b/Mage.Sets/src/mage/cards/k/KindredDominance.java @@ -74,7 +74,7 @@ class KindredDominanceEffect extends OneShotEffect { public KindredDominanceEffect() { super(Outcome.DestroyPermanent); - this.staticText = "Destroy all creatures that are not the chosen type."; + this.staticText = "Choose a creature type. Destroy all creatures that are not the chosen type."; } public KindredDominanceEffect(final KindredDominanceEffect effect) {