summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-10-26 10:03:52 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2023-10-26 10:03:52 +0200
commit0d389b3c5a4cd50307af262666c7df01df33c6f6 (patch)
tree3a2e8421335f664390ffea2e4bde84606262f200 /lib
parent88b968a4a3bf84d4e60c1b150a25c46e7a84e97c (diff)
downloadcolonial-twilight-0d389b3c5a4cd50307af262666c7df01df33c6f6.zip
colonial-twilight-0d389b3c5a4cd50307af262666c7df01df33c6f6.tar.gz
FLNBotRules : rally 6 checks agitate
Diffstat (limited to 'lib')
-rw-r--r--lib/colonial_twilight/fln_bot_rules.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/colonial_twilight/fln_bot_rules.rb b/lib/colonial_twilight/fln_bot_rules.rb
index 78f06ba..6b6376f 100644
--- a/lib/colonial_twilight/fln_bot_rules.rb
+++ b/lib/colonial_twilight/fln_bot_rules.rb
@@ -100,6 +100,11 @@ module ColonialTwilight
def may_rally_6_in?(space, already_rallied)
# 2+ pop to agitate after rally
r = (already_rallied || may_rally_in?(space)) && space.pop > 1
+ if r
+ # to agitate : FLN base or control after rally
+ n = already_rallied ? 0 : place_guerrillas_in(space).values.sum
+ r &= (space.fln_bases.positive? || (space.gov < (space.fln + n)))
+ end
dbg " may_rally_6_in : #{space.name}", r
r
end