diff --git a/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 2c7c384fdfb..d602cd56f6f 100644 --- a/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -42,6 +42,7 @@ import mage.Constants.TargetController; import mage.Constants.Zone; import mage.MageObject; import mage.abilities.ActivatedAbility; +import mage.abilities.SpecialAction; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.VariableManaCost; import mage.filter.common.FilterCreatureForCombat; @@ -171,6 +172,8 @@ public class HumanPlayer extends PlayerImpl { } else if (response.getInteger() != null) { passed = true; passedTurn = true; + } else if (response.getString() != null && response.getString().equals("special")) { + specialAction(game); } else if (response.getUUID() != null) { MageObject object = game.getObject(response.getUUID()); if (object != null) { @@ -355,6 +358,16 @@ public class HumanPlayer extends PlayerImpl { return response.getInteger(); } + protected void specialAction(Game game) { + Map specialActions = game.getState().getSpecialActions().getControlledBy(playerId); + game.fireGetChoiceEvent(playerId, name, specialActions.values()); + waitForResponse(); + if (response.getUUID() != null) { + if (specialActions.containsKey(response.getUUID())) + activateAbility(specialActions.get(response.getUUID()), game); + } + } + protected void activateAbility(Map abilities, Game game) { if (abilities.size() == 1) { activateAbility(abilities.values().iterator().next(), game);