mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Merge pull request #2677 from Card-Forge/mulligan-bypass
Speed up London Mulligan when you just want to mulligan again.
This commit is contained in:
@@ -60,7 +60,7 @@ public class InputLondonMulligan extends InputSyncronizedBase {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
getController().getGui().updateButtons(getOwner(), localizer.getMessage("lblOk"), "", cardsLeft == 0, false, true);
|
||||
getController().getGui().updateButtons(getOwner(), localizer.getMessage("lblOk"), localizer.getMessage("lblAuto"), cardsLeft == 0, cardsLeft != 0, true);
|
||||
|
||||
sb.append(String.format(localizer.getMessage("lblReturnForLondon"), cardsLeft));
|
||||
|
||||
@@ -79,6 +79,25 @@ public class InputLondonMulligan extends InputSyncronizedBase {
|
||||
done();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void onCancel() {
|
||||
int cardsLeft = toReturn - selected.size();
|
||||
int count = 0;
|
||||
for(Card c : player.getZone(ZoneType.Hand).getCards()) {
|
||||
if (selected.contains(c)) { continue; }
|
||||
|
||||
selected.add(c);
|
||||
setCardHighlight(c, selected.contains(c));
|
||||
count++;
|
||||
|
||||
if (cardsLeft == count) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
onOk();
|
||||
}
|
||||
|
||||
private void done() {
|
||||
resetCardHighlights();
|
||||
getController().getGame().getView().updateIsMulligan(false);
|
||||
|
||||
Reference in New Issue
Block a user