diff --git a/Mage.Sets/src/mage/cards/a/AphettoDredging.java b/Mage.Sets/src/mage/cards/a/AphettoDredging.java index 3e455021cf..74df66d983 100644 --- a/Mage.Sets/src/mage/cards/a/AphettoDredging.java +++ b/Mage.Sets/src/mage/cards/a/AphettoDredging.java @@ -65,7 +65,7 @@ public class AphettoDredging extends CardImpl { if (ability instanceof SpellAbility) { Player controller = game.getPlayer(ability.getControllerId()); if (controller != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(game.getObject(ability.getSourceId())); while (!controller.choose(Outcome.PutCreatureInPlay, typeChoice, game)) { if (!controller.canRespond()) { return; diff --git a/Mage.Sets/src/mage/cards/b/BloodlineShaman.java b/Mage.Sets/src/mage/cards/b/BloodlineShaman.java index c8e5591919..4e9867eaa1 100644 --- a/Mage.Sets/src/mage/cards/b/BloodlineShaman.java +++ b/Mage.Sets/src/mage/cards/b/BloodlineShaman.java @@ -98,7 +98,7 @@ class BloodlineShamanEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null) { // Choose a creature type. - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!controller.choose(outcome, typeChoice, game)) { if (!controller.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java b/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java index 1249f6b126..4e440094aa 100644 --- a/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/c/CallerOfTheHunt.java @@ -129,7 +129,7 @@ class ChooseCreatureTypeEffect extends OneShotEffect { // code by LevelX2, but t Player controller = game.getPlayer(source.getControllerId()); MageObject mageObject = game.getObject(source.getSourceId()); if (controller != null && mageObject != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(mageObject); while (!controller.choose(outcome, typeChoice, game)) { if (!controller.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/c/CallousOppressor.java b/Mage.Sets/src/mage/cards/c/CallousOppressor.java index 63acbd3c2e..f5b9d78b01 100644 --- a/Mage.Sets/src/mage/cards/c/CallousOppressor.java +++ b/Mage.Sets/src/mage/cards/c/CallousOppressor.java @@ -44,7 +44,7 @@ import mage.abilities.effects.common.continuous.GainControlTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.Choice; -import mage.choices.ChoiceImpl; +import mage.choices.ChoiceCreatureType; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; @@ -154,9 +154,8 @@ class CallousOppressorChooseCreatureTypeEffect extends OneShotEffect { } Player opponent = game.getPlayer(target.getFirstTarget()); if (opponent != null && mageObject != null) { - Choice typeChoice = new ChoiceImpl(true); + Choice typeChoice = new ChoiceCreatureType(mageObject); typeChoice.setMessage("Choose creature type"); - typeChoice.setChoices(SubType.getCreatureTypes(false).stream().map(SubType::toString).collect(Collectors.toCollection(LinkedHashSet::new))); while (!opponent.choose(outcome, typeChoice, game)) { if (!opponent.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/c/CoordinatedBarrage.java b/Mage.Sets/src/mage/cards/c/CoordinatedBarrage.java index d9c068c192..518dfc76ac 100644 --- a/Mage.Sets/src/mage/cards/c/CoordinatedBarrage.java +++ b/Mage.Sets/src/mage/cards/c/CoordinatedBarrage.java @@ -89,7 +89,7 @@ class CoordinatedBarrageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Choice choice = new ChoiceCreatureType(); + Choice choice = new ChoiceCreatureType(game.getObject(source.getSourceId())); if (controller.choose(Outcome.Damage, choice, game)) { String chosenType = choice.getChoice(); FilterControlledPermanent filter = new FilterControlledPermanent(); diff --git a/Mage.Sets/src/mage/cards/d/DistantMelody.java b/Mage.Sets/src/mage/cards/d/DistantMelody.java index e773eeeedf..5502cf2232 100644 --- a/Mage.Sets/src/mage/cards/d/DistantMelody.java +++ b/Mage.Sets/src/mage/cards/d/DistantMelody.java @@ -89,7 +89,7 @@ class DistantMelodyEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); while (!player.choose(Outcome.BoostCreature, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java b/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java index 8b20c146ba..51047e5053 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java +++ b/Mage.Sets/src/mage/cards/e/ElvishSoultiller.java @@ -96,7 +96,7 @@ class ElvishSoultillerEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject mageObject = game.getObject(source.getSourceId()); if (controller != null && mageObject != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(mageObject); while (!controller.choose(outcome, typeChoice, game)) { if (!controller.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/e/Extinction.java b/Mage.Sets/src/mage/cards/e/Extinction.java index 5d26327169..0310e86933 100644 --- a/Mage.Sets/src/mage/cards/e/Extinction.java +++ b/Mage.Sets/src/mage/cards/e/Extinction.java @@ -83,7 +83,7 @@ class ExtinctionEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!player.choose(outcome, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/g/GraveSifter.java b/Mage.Sets/src/mage/cards/g/GraveSifter.java index df5c373f73..c60fe13164 100644 --- a/Mage.Sets/src/mage/cards/g/GraveSifter.java +++ b/Mage.Sets/src/mage/cards/g/GraveSifter.java @@ -95,7 +95,7 @@ class GraveSifterEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); typeChoice.setMessage("Choose creature type to return cards from your graveyard"); Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { diff --git a/Mage.Sets/src/mage/cards/h/HarshMercy.java b/Mage.Sets/src/mage/cards/h/HarshMercy.java index 931d63a938..72f42fb3b7 100644 --- a/Mage.Sets/src/mage/cards/h/HarshMercy.java +++ b/Mage.Sets/src/mage/cards/h/HarshMercy.java @@ -96,7 +96,7 @@ class HarshMercyEffect extends OneShotEffect { PlayerIteration: for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!player.choose(Outcome.DestroyPermanent, typeChoice, game)) { if (!player.canRespond()) { continue PlayerIteration; diff --git a/Mage.Sets/src/mage/cards/k/KaronaFalseGod.java b/Mage.Sets/src/mage/cards/k/KaronaFalseGod.java index 56a5c395e3..b287a99d53 100644 --- a/Mage.Sets/src/mage/cards/k/KaronaFalseGod.java +++ b/Mage.Sets/src/mage/cards/k/KaronaFalseGod.java @@ -152,7 +152,7 @@ class KaronaFalseGodEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null && controller != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!controller.choose(Outcome.BoostCreature, typeChoice, game)) { if (!controller.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/l/LuminescentRain.java b/Mage.Sets/src/mage/cards/l/LuminescentRain.java index 5437d5eec3..cb881e2b5e 100644 --- a/Mage.Sets/src/mage/cards/l/LuminescentRain.java +++ b/Mage.Sets/src/mage/cards/l/LuminescentRain.java @@ -86,9 +86,9 @@ class LuminescentRainEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); + Player player = game.getPlayer(source.getControllerId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); while (!player.choose(Outcome.BoostCreature, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/m/MistformSliver.java b/Mage.Sets/src/mage/cards/m/MistformSliver.java index 2ac7c3b16e..2364d2cd9c 100644 --- a/Mage.Sets/src/mage/cards/m/MistformSliver.java +++ b/Mage.Sets/src/mage/cards/m/MistformSliver.java @@ -92,7 +92,7 @@ class MistformSliverEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getSourceId()); if (player != null && permanent != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(permanent); while (!player.choose(Outcome.Detriment, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/n/NewBlood.java b/Mage.Sets/src/mage/cards/n/NewBlood.java index cd2c534219..a6f3905c73 100644 --- a/Mage.Sets/src/mage/cards/n/NewBlood.java +++ b/Mage.Sets/src/mage/cards/n/NewBlood.java @@ -39,7 +39,7 @@ import mage.abilities.text.TextPartSubType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.Choice; -import mage.choices.ChoiceImpl; +import mage.choices.ChoiceCreatureType; import mage.constants.*; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.predicate.Predicates; @@ -145,9 +145,8 @@ class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl { return; } if (fromSubType == null) { - Choice typeChoice = new ChoiceImpl(true); + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); typeChoice.setMessage("Choose creature type to change to Vampire"); - typeChoice.setChoices(SubType.getCreatureTypes(false).stream().map(SubType::toString).collect(Collectors.toCollection(LinkedHashSet::new))); while (!controller.choose(outcome, typeChoice, game)) { if (!controller.canRespond()) { return; diff --git a/Mage.Sets/src/mage/cards/o/Outbreak.java b/Mage.Sets/src/mage/cards/o/Outbreak.java index 1b6e48355a..4de53cd115 100644 --- a/Mage.Sets/src/mage/cards/o/Outbreak.java +++ b/Mage.Sets/src/mage/cards/o/Outbreak.java @@ -96,7 +96,7 @@ class OutbreakEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); while (!player.choose(outcome, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/p/PacksDisdain.java b/Mage.Sets/src/mage/cards/p/PacksDisdain.java index 8b98c53a0e..88c1951e0b 100644 --- a/Mage.Sets/src/mage/cards/p/PacksDisdain.java +++ b/Mage.Sets/src/mage/cards/p/PacksDisdain.java @@ -93,7 +93,7 @@ class PacksDisdainEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); while (!player.choose(Outcome.UnboostCreature, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/p/PatriarchsBidding.java b/Mage.Sets/src/mage/cards/p/PatriarchsBidding.java index a964d7f791..e450078385 100644 --- a/Mage.Sets/src/mage/cards/p/PatriarchsBidding.java +++ b/Mage.Sets/src/mage/cards/p/PatriarchsBidding.java @@ -93,7 +93,7 @@ class PatriarchsBiddingEffect extends OneShotEffect { Set chosenTypes = new HashSet<>(); for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!player.choose(Outcome.PutCreatureInPlay, typeChoice, game)) { if (!player.canRespond()) { break; diff --git a/Mage.Sets/src/mage/cards/p/PeerPressure.java b/Mage.Sets/src/mage/cards/p/PeerPressure.java index 8101dc06be..4ea1cfe77c 100644 --- a/Mage.Sets/src/mage/cards/p/PeerPressure.java +++ b/Mage.Sets/src/mage/cards/p/PeerPressure.java @@ -93,7 +93,7 @@ class PeerPressureEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Choice choice = new ChoiceCreatureType(); + Choice choice = new ChoiceCreatureType(game.getObject(source.getSourceId())); while (!controller.choose(Outcome.GainControl, choice, game)) { if (!controller.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/r/RiptideChronologist.java b/Mage.Sets/src/mage/cards/r/RiptideChronologist.java index b4a838bf6a..c4d0b45ad6 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideChronologist.java +++ b/Mage.Sets/src/mage/cards/r/RiptideChronologist.java @@ -94,7 +94,7 @@ class RiptideChronologistEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!player.choose(outcome, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java b/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java index 5a5d21a2b9..ec5ee0e304 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java +++ b/Mage.Sets/src/mage/cards/r/RiptideShapeshifter.java @@ -96,7 +96,7 @@ class RiptideShapeshifterEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { - Choice choice = new ChoiceCreatureType(); + Choice choice = new ChoiceCreatureType(sourceObject); while (!controller.choose(Outcome.BoostCreature, choice, game)) { if (!controller.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java b/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java index 181d0fa4d9..213b919807 100644 --- a/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java +++ b/Mage.Sets/src/mage/cards/r/RoarOfTheCrowd.java @@ -89,7 +89,7 @@ class RoarOfTheCrowdEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(game.getObject(source.getSourceId())); while (!player.choose(Outcome.LoseLife, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/s/Standardize.java b/Mage.Sets/src/mage/cards/s/Standardize.java index b34c706537..6a1adee518 100644 --- a/Mage.Sets/src/mage/cards/s/Standardize.java +++ b/Mage.Sets/src/mage/cards/s/Standardize.java @@ -85,7 +85,7 @@ class StandardizeEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); String chosenType = ""; if (player != null && sourceObject != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); typeChoice.setMessage("Choose a creature type other than Wall"); typeChoice.getChoices().remove("Wall"); while (!player.choose(Outcome.BoostCreature, typeChoice, game)) { diff --git a/Mage.Sets/src/mage/cards/t/TribalUnity.java b/Mage.Sets/src/mage/cards/t/TribalUnity.java index e3ac24efd3..fc9653ce1f 100644 --- a/Mage.Sets/src/mage/cards/t/TribalUnity.java +++ b/Mage.Sets/src/mage/cards/t/TribalUnity.java @@ -91,7 +91,7 @@ class TribalUnityEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); int boost = amount.calculate(game, source, this); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!player.choose(outcome, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/t/TsabosDecree.java b/Mage.Sets/src/mage/cards/t/TsabosDecree.java index 36aeb9acc3..b455b45505 100644 --- a/Mage.Sets/src/mage/cards/t/TsabosDecree.java +++ b/Mage.Sets/src/mage/cards/t/TsabosDecree.java @@ -90,7 +90,7 @@ class TsabosDecreeEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!player.choose(outcome, typeChoice, game)) { if (!player.canRespond()) { return false; diff --git a/Mage.Sets/src/mage/cards/w/WalkingDesecration.java b/Mage.Sets/src/mage/cards/w/WalkingDesecration.java index 54988c4923..f23339c4e2 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingDesecration.java +++ b/Mage.Sets/src/mage/cards/w/WalkingDesecration.java @@ -91,7 +91,7 @@ class WalkingDesecrationEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null) { - Choice typeChoice = new ChoiceCreatureType(); + Choice typeChoice = new ChoiceCreatureType(sourceObject); while (!player.choose(outcome, typeChoice, game)) { if (!player.canRespond()) { return false;