summaryrefslogtreecommitdiffstats
path: root/lib/colonial_twilight
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-12-04 11:40:14 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2023-12-04 11:40:14 +0100
commit420487be4001873a7168db25fc6a52f4fe6fabcd (patch)
tree2d2341c71e7e3c5852ba1591da4eb625b4baf221 /lib/colonial_twilight
parent9be45071168928c2ad3b2a184c2a3c9e7183040a (diff)
downloadcolonial-twilight-420487be4001873a7168db25fc6a52f4fe6fabcd.zip
colonial-twilight-420487be4001873a7168db25fc6a52f4fe6fabcd.tar.gz
FLNBotRules : fix rally_9_priority with infinite resources
Diffstat (limited to 'lib/colonial_twilight')
-rw-r--r--lib/colonial_twilight/fln_bot_rules.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/colonial_twilight/fln_bot_rules.rb b/lib/colonial_twilight/fln_bot_rules.rb
index 3f04ed5..463ea8c 100644
--- a/lib/colonial_twilight/fln_bot_rules.rb
+++ b/lib/colonial_twilight/fln_bot_rules.rb
@@ -151,8 +151,8 @@ module ColonialTwilight
end
def rally_9_priority(spaces, resources)
- f = _filter(spaces) { |s| s.support? && resources > s.terror }
- _filter(f) { |s| s.neutral? && resources > s.terror }
+ f = _filter(spaces) { |s| s.support? && (resources.zero? || resources > s.terror) }
+ _filter(f) { |s| s.neutral? && (resources.zero? || resources > s.terror) }
end
# Extort