[NCC] Agent's Toolkit - fixed game error on ability usage without counters

This commit is contained in:
Oleg Agafonov 2023-10-21 17:40:43 +04:00
parent c148e2f5d7
commit c1ba45b4bb

View file

@ -84,8 +84,12 @@ class AgentToolkitMoveCounterEffect extends OneShotEffect {
}
Permanent enteringCreature = (Permanent) enteringObject;
Choice moveCounterChoice = new ChoiceImpl(false);
Set<String> possibleCounterNames = new LinkedHashSet<>(agentsToolkitPermanent.getCounters(game).keySet());
if (possibleCounterNames.isEmpty()) {
return false;
}
Choice moveCounterChoice = new ChoiceImpl(false);
moveCounterChoice.setMessage("Choose counter to move");
moveCounterChoice.setChoices(possibleCounterNames);