diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-09 19:17:27 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-08-21 00:28:20 +0200 |
commit | 3ed0124aeca5f7f17f611eb0da0e82580e1f92a1 (patch) | |
tree | 4e8ad153c67d0c39ce3e1d20ecea53adf79c3980 | |
parent | 370df4421c58da27796b9ecb4fdabfdae0988a7f (diff) | |
download | washingtons-war-3ed0124aeca5f7f17f611eb0da0e82580e1f92a1.tar.gz |
don't allow sea move lone general to lone enemy general
-rw-r--r-- | rules.js | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -857,6 +857,8 @@ function place_american_reinforcements(who, count, where) { } logp("reinforced " + where + " with " + count + " CU"); place_american_cu(where, count); + if (has_enemy_general(where)) + capture_enemy_general(where); } function place_french_reinforcements(who, where) { @@ -2156,6 +2158,9 @@ function gen_move_general() { if (to != from) { if (is_non_blockaded_port(to)) { if (!has_american_pc(to) && !has_american_or_french_cu(to)) { + // don't leave alone + if (alone && has_enemy_general(to)) + continue // TODO: duplicate action if can move by normal road gen_action('move', to); } |