From 0c8b3c3000b565af71961dbf5cbb058ccfe9fd04 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Wed, 8 Nov 2023 15:20:24 +0100 Subject: FLNBotRules : support rally 9 and specs --- lib/colonial_twilight/fln_bot_rules.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') diff --git a/lib/colonial_twilight/fln_bot_rules.rb b/lib/colonial_twilight/fln_bot_rules.rb index 77ee6d7..7093740 100644 --- a/lib/colonial_twilight/fln_bot_rules.rb +++ b/lib/colonial_twilight/fln_bot_rules.rb @@ -144,6 +144,16 @@ module ColonialTwilight _filter(f) { |s| s.gov_cubes.zero? } end + def may_rally_9_in?(space) + r = may_agitate_in?(space) && (space.terror.positive? || !space.oppose?) + dbg " may_rally_9_in : #{space.name}", r + r + end + + def rally_9_priority(spaces, resources) + _filter(spaces) { |s| !s.oppose? && resources > s.terror } + end + # Extort def may_extort_0_in?(space) -- cgit v1.2.3