- Fix crash where Human needs to sacrifice more permanents than he controls.

This commit is contained in:
Sol
2013-05-05 15:37:41 +00:00
parent 1f5d7fcc46
commit c6b21caea9

View File

@@ -249,7 +249,12 @@ public class PlayerControllerHuman extends PlayerController {
if (max <= 0)
return new ArrayList<Card>();
InputSelectCards inp = new InputSelectCardsFromList(isOptional ? 0 : amount, max, validTargets);
int min = isOptional ? 0 : amount;
if (min > max) {
min = max;
}
InputSelectCards inp = new InputSelectCardsFromList(min, max, validTargets);
// TODO: Either compose a message here, or pass it as parameter from caller.
inp.setMessage("Select %d " + validMessage + "(s) to sacrifice");