diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/PlayerReconcilesAction.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/PlayerReconcilesAction.java index 6a68a8f6a..8b5d12e4b 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/PlayerReconcilesAction.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/PlayerReconcilesAction.java @@ -110,16 +110,20 @@ public class PlayerReconcilesAction implements Action { new TriggeringResultEffect(new ReconcileResult(_playerId), "Player reconciled")); } })); - } else if (cardsInHand.size() > 0) { + } else if (!cardsInHand.isEmpty()) { _effectQueue.add(new PlayoutDecisionEffect(_playerId, new CardsSelectionDecision(1, "Reconcile - choose card to discard or press DONE", cardsInHand, 0, 1) { @Override public void decisionMade(String result) throws DecisionResultInvalidException { Set selectedCards = getSelectedCardsByResponse(result); - if (selectedCards.size() > 0) { + if (!selectedCards.isEmpty()) { _effectQueue.add(new DiscardCardsFromHandEffect(null, _playerId, selectedCards, false)); } - int cardsInHandAfterDiscard = cardsInHand.size() - selectedCards.size(); + //We refresh the hand size here because effects could have reacted to the discard, causing + // the previous hand size calculation to be stale. + //See https://github.com/PlayersCouncil/gemp-lotr/issues/89 + var currentCards = new HashSet(gameState.getHand(_playerId)); + int cardsInHandAfterDiscard = currentCards.size(); if (cardsInHandAfterDiscard < handSize) { _effectQueue.add(new DrawCardsEffect(PlayerReconcilesAction.this, _playerId, handSize - cardsInHandAfterDiscard)); }