From 7f2d1e49f99c9d7eab960a3730cc3aa289124c10 Mon Sep 17 00:00:00 2001 From: Sol Date: Sat, 11 May 2013 17:53:32 +0000 Subject: [PATCH] - Don't crash for ante if only basic lands are found --- src/main/java/forge/game/GameNew.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/forge/game/GameNew.java b/src/main/java/forge/game/GameNew.java index 672c351132f..577f65b5bd7 100644 --- a/src/main/java/forge/game/GameNew.java +++ b/src/main/java/forge/game/GameNew.java @@ -301,7 +301,8 @@ public class GameNew { Predicate goodForAnte = Predicates.not(CardPredicates.Presets.BASIC_LANDS); Card ante = Aggregates.random(Iterables.filter(lib, goodForAnte)); 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.getAction().moveTo(ZoneType.Ante, ante);