mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Don't crash for ante if only basic lands are found
This commit is contained in:
@@ -301,7 +301,8 @@ public class GameNew {
|
|||||||
Predicate<Card> goodForAnte = Predicates.not(CardPredicates.Presets.BASIC_LANDS);
|
Predicate<Card> goodForAnte = Predicates.not(CardPredicates.Presets.BASIC_LANDS);
|
||||||
Card ante = Aggregates.random(Iterables.filter(lib, goodForAnte));
|
Card ante = Aggregates.random(Iterables.filter(lib, goodForAnte));
|
||||||
if (ante == null) {
|
if (ante == null) {
|
||||||
throw new RuntimeException(p + " library is empty.");
|
game.getGameLog().add("Ante", "Only basic lands found. Will ante one of them", 0);
|
||||||
|
ante = Aggregates.random(lib);
|
||||||
}
|
}
|
||||||
game.getGameLog().add("Ante", p + " anted " + ante, 0);
|
game.getGameLog().add("Ante", p + " anted " + ante, 0);
|
||||||
game.getAction().moveTo(ZoneType.Ante, ante);
|
game.getAction().moveTo(ZoneType.Ante, ante);
|
||||||
|
|||||||
Reference in New Issue
Block a user