* UI: choose ability to cast improves (see 8add25fa12)

This commit is contained in:
Oleg Agafonov 2020-01-18 09:39:12 +04:00
parent 7da62e13ec
commit 7ca6677b93

View file

@ -2013,6 +2013,8 @@ public class HumanPlayer extends PlayerImpl {
MageObject object = game.getObject(card.getId());
if (object != null) {
String message = "Choose ability to cast" + (nonMana ? " for FREE" : "") + "<br>" + object.getLogName();
LinkedHashMap<UUID, ActivatedAbility> useableAbilities = getSpellAbilities(playerId, object, game.getState().getZone(object.getId()), game);
if (useableAbilities != null
&& useableAbilities.size() == 1) {
@ -2023,7 +2025,7 @@ public class HumanPlayer extends PlayerImpl {
updateGameStatePriority("chooseAbilityForCast", game);
prepareForResponse(game);
if (!isExecutingMacro()) {
game.fireGetChoiceEvent(playerId, name, object, new ArrayList<>(useableAbilities.values()));
game.fireGetChoiceEvent(playerId, message, object, new ArrayList<>(useableAbilities.values()));
}
waitForResponse(game);