diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2023-11-08 15:20:24 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2023-11-08 15:20:24 +0100 |
commit | 0c8b3c3000b565af71961dbf5cbb058ccfe9fd04 (patch) | |
tree | e11790d18fd2d89704104766ef777e09ee02962d /lib | |
parent | 45df0be14323eaaa140f56b930f3d56d8239a902 (diff) | |
download | colonial-twilight-0c8b3c3000b565af71961dbf5cbb058ccfe9fd04.zip colonial-twilight-0c8b3c3000b565af71961dbf5cbb058ccfe9fd04.tar.gz |
FLNBotRules : support rally 9 and specs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/colonial_twilight/fln_bot_rules.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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) |