From d75c37174e582ca822a177fe98f4a320a3d62a51 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 9 Nov 2024 20:23:21 +0200
Subject: [PATCH 78/78] Add Civil War action type

See RM #1094

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 common/actions.c                    | 43 +++++++++++++++++++++++++++++
 common/actions.h                    |  4 +++
 common/game.h                       |  3 ++
 common/networking/packets.def       |  1 -
 data/alien/game.ruleset             |  3 --
 data/civ1/actions.ruleset           |  6 ++++
 data/civ1/game.ruleset              |  3 --
 data/civ2/actions.ruleset           |  6 ++++
 data/civ2/game.ruleset              |  3 --
 data/civ2civ3/actions.ruleset       |  6 ++++
 data/civ2civ3/game.ruleset          |  3 --
 data/classic/actions.ruleset        |  8 +++++-
 data/classic/game.ruleset           |  3 --
 data/goldkeep/actions.ruleset       |  8 +++++-
 data/goldkeep/game.ruleset          |  3 --
 data/granularity/actions.ruleset    |  8 +++++-
 data/granularity/game.ruleset       |  3 --
 data/multiplayer/actions.ruleset    |  8 +++++-
 data/multiplayer/game.ruleset       |  3 --
 data/sandbox/actions.ruleset        |  6 ++++
 data/sandbox/game.ruleset           |  3 --
 data/stub/game.ruleset              |  3 --
 data/webperimental/actions.ruleset  |  8 +++++-
 data/webperimental/game.ruleset     |  3 --
 gen_headers/enums/actions_enums.def |  1 +
 server/plrhand.c                    |  5 ++--
 server/ruleset/rscompat.c           |  6 ++++
 server/ruleset/ruleload.c           |  7 +++--
 tools/ruleutil/rulesave.c           |  3 --
 29 files changed, 124 insertions(+), 46 deletions(-)

diff --git a/common/actions.c b/common/actions.c
index 4fe2fd7e1c..abaefc12c2 100644
--- a/common/actions.c
+++ b/common/actions.c
@@ -72,6 +72,9 @@ unit_action_new(action_id id,
                 const int min_distance,
                 const int max_distance,
                 bool actor_consuming_always);
+static struct action *
+player_action_new(action_id id,
+                  enum action_result result);
 
 static bool is_enabler_active(const struct action_enabler *enabler,
                               const struct req_context *actor,
@@ -817,6 +820,9 @@ static void hard_code_actions(void)
                       MAK_FORCED,
                       1, 1, FALSE);
 
+  actions[ACTION_CIVIL_WAR] =
+      player_action_new(ACTION_CIVIL_WAR, ACTRES_ENABLER_CHECK);
+
   /* The structure even for these need to be created, for
    * the action_id_rule_name() to work on iterations. */
 
@@ -1043,6 +1049,19 @@ unit_action_new(action_id id,
   return act;
 }
 
+/**********************************************************************//**
+  Create a new action performed by a player actor.
+**************************************************************************/
+static struct action *
+player_action_new(action_id id,
+                  enum action_result result)
+{
+  struct action *act = action_new(id, result,
+                                  0, 0, FALSE);
+
+  return act;
+}
+
 /**********************************************************************//**
   Returns TRUE iff the specified action ID refers to a valid action.
 **************************************************************************/
@@ -3461,6 +3480,21 @@ bool is_action_enabled_unit_on_self(const struct civ_map *nmap,
                                              unit_tile(actor_unit));
 }
 
+/**********************************************************************//**
+  Returns TRUE if actor_plr can do wanted_action as far as
+  action enablers are concerned.
+**************************************************************************/
+bool is_action_enabled_player(const struct civ_map *nmap,
+                              const action_id wanted_action,
+                              const struct player *actor_plr)
+{
+  return is_action_enabled(nmap, wanted_action,
+                           &(const struct req_context) {
+                             .player = actor_plr,
+                           },
+                           nullptr, nullptr, nullptr);
+}
+
 /**********************************************************************//**
   Find out if the action is enabled, may be enabled or isn't enabled given
   what the player owning the actor knowns.
@@ -6044,6 +6078,7 @@ const char *action_ui_name_ruleset_var_name(int act)
     return "ui_name_user_action_4";
   case ACTION_GAIN_VETERANCY:
   case ACTION_ESCAPE:
+  case ACTION_CIVIL_WAR:
     fc_assert(!action_id_is_internal(act)); /* Fail always */
     break;
   case ACTION_COUNT:
@@ -6408,6 +6443,8 @@ const char *action_ui_name_default(int act)
     return N_("%sGain Veterancy%s");
   case ACTION_ESCAPE:
     return N_("%sEscape%s");
+  case ACTION_CIVIL_WAR:
+    return N_("%sCivil War%s");
   case ACTION_COUNT:
     fc_assert(act != ACTION_COUNT);
     break;
@@ -6550,6 +6587,7 @@ const char *action_min_range_ruleset_var_name(int act)
   case ACTION_SPY_ESCAPE:
   case ACTION_GAIN_VETERANCY:
   case ACTION_ESCAPE:
+  case ACTION_CIVIL_WAR:
     /* Min range is not ruleset changeable */
     return NULL;
   case ACTION_NUKE:
@@ -6718,6 +6756,7 @@ const char *action_max_range_ruleset_var_name(int act)
   case ACTION_SPY_ESCAPE:
   case ACTION_GAIN_VETERANCY:
   case ACTION_ESCAPE:
+  case ACTION_CIVIL_WAR:
     /* Max range is not ruleset changeable */
     return NULL;
   case ACTION_HELP_WONDER:
@@ -6920,6 +6959,7 @@ const char *action_target_kind_ruleset_var_name(int act)
   case ACTION_SPY_ESCAPE:
   case ACTION_GAIN_VETERANCY:
   case ACTION_ESCAPE:
+  case ACTION_CIVIL_WAR:
     /* Target kind is not ruleset changeable */
     return NULL;
   case ACTION_NUKE:
@@ -7090,6 +7130,7 @@ const char *action_actor_consuming_always_ruleset_var_name(action_id act)
   case ACTION_SPY_ESCAPE:
   case ACTION_GAIN_VETERANCY:
   case ACTION_ESCAPE:
+  case ACTION_CIVIL_WAR:
     /* Actor consuming always is not ruleset changeable */
     return NULL;
   case ACTION_FOUND_CITY:
@@ -7299,6 +7340,7 @@ const char *action_blocked_by_ruleset_var_name(const struct action *act)
   case ACTION_HUT_FRIGHTEN3:
   case ACTION_HUT_FRIGHTEN4:
   case ACTION_GAIN_VETERANCY:
+  case ACTION_CIVIL_WAR:
   case ACTION_ESCAPE:
   case ACTION_USER_ACTION1:
   case ACTION_USER_ACTION2:
@@ -7477,6 +7519,7 @@ action_post_success_forced_ruleset_var_name(const struct action *act)
   case ACTION_SPY_ESCAPE:
   case ACTION_GAIN_VETERANCY:
   case ACTION_ESCAPE:
+  case ACTION_CIVIL_WAR:
   case ACTION_USER_ACTION1:
   case ACTION_USER_ACTION2:
   case ACTION_USER_ACTION3:
diff --git a/common/actions.h b/common/actions.h
index e5a14c4d5b..cab561207b 100644
--- a/common/actions.h
+++ b/common/actions.h
@@ -558,6 +558,10 @@ bool is_action_enabled_unit_on_self(const struct civ_map *nmap,
                                     const action_id wanted_action,
                                     const struct unit *actor_unit);
 
+bool is_action_enabled_player(const struct civ_map *nmap,
+                              const action_id wanted_action,
+                              const struct player *actor_plr);
+
 struct act_prob action_prob_vs_city(const struct civ_map *nmap,
                                     const struct unit *actor,
                                     const action_id act_id,
diff --git a/common/game.h b/common/game.h
index eadd85679c..5fefdb5294 100644
--- a/common/game.h
+++ b/common/game.h
@@ -127,6 +127,9 @@ struct civ_game {
       /* Defined in the ruleset. */
 
       /* Game settings & other data. */
+      struct {
+        bool civil_war_enabled;
+      } deprecated;
 
       enum city_names_mode allowed_city_names;
       enum plrcolor_mode plrcolormode;
diff --git a/common/networking/packets.def b/common/networking/packets.def
index 66d29b25c4..450d628ccd 100644
--- a/common/networking/packets.def
+++ b/common/networking/packets.def
@@ -625,7 +625,6 @@ PACKET_GAME_INFO = 16; sc, is-info
   BOOL year_0_hack;
   UINT8 top_cities_count;
   UINT16 fragment_count;
-  BOOL civil_war_enabled;
   UINT16 granularity;
   WONDER_VISIB small_wonder_visibility;
 end
diff --git a/data/alien/game.ruleset b/data/alien/game.ruleset
index 9924d62ca2..3551c5a238 100644
--- a/data/alien/game.ruleset
+++ b/data/alien/game.ruleset
@@ -142,9 +142,6 @@ tech_parasite_allow_holes = TRUE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = TRUE
 
-; Whether civil war is possible at all
-civil_war_enabled        = FALSE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/civ1/actions.ruleset b/data/civ1/actions.ruleset
index afac2f09cf..3be1f4feb1 100644
--- a/data/civ1/actions.ruleset
+++ b/data/civ1/actions.ruleset
@@ -878,3 +878,9 @@ actor_reqs    =
     { "type",         "name",      "range", "present"
       "UnitTypeFlag", "NoVeteran", "Local", FALSE
     }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
+    }
diff --git a/data/civ1/game.ruleset b/data/civ1/game.ruleset
index 5ec581990b..59def66b1e 100644
--- a/data/civ1/game.ruleset
+++ b/data/civ1/game.ruleset
@@ -128,9 +128,6 @@ tech_parasite_allow_holes   = FALSE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes       = FALSE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/civ2/actions.ruleset b/data/civ2/actions.ruleset
index 2b4ac8fdb7..134e9359f3 100644
--- a/data/civ2/actions.ruleset
+++ b/data/civ2/actions.ruleset
@@ -1208,3 +1208,9 @@ actor_reqs    =
     { "type",         "name",      "range", "present"
       "UnitTypeFlag", "NoVeteran", "Local", FALSE
     }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
+    }
diff --git a/data/civ2/game.ruleset b/data/civ2/game.ruleset
index cdf5f22eb7..54fe86cbe5 100644
--- a/data/civ2/game.ruleset
+++ b/data/civ2/game.ruleset
@@ -124,9 +124,6 @@ tech_parasite_allow_holes = TRUE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = TRUE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/civ2civ3/actions.ruleset b/data/civ2civ3/actions.ruleset
index 03c53bd2c0..8cfcb192e5 100644
--- a/data/civ2civ3/actions.ruleset
+++ b/data/civ2civ3/actions.ruleset
@@ -1544,3 +1544,9 @@ actor_reqs    =
     { "type",         "name",      "range", "present"
       "UnitTypeFlag", "NoVeteran", "Local", FALSE
     }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
+    }
diff --git a/data/civ2civ3/game.ruleset b/data/civ2civ3/game.ruleset
index f4f3b980f4..ee94be145f 100644
--- a/data/civ2civ3/game.ruleset
+++ b/data/civ2civ3/game.ruleset
@@ -145,9 +145,6 @@ tech_parasite_allow_holes = FALSE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = FALSE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/classic/actions.ruleset b/data/classic/actions.ruleset
index d07d6feb1d..d2750cb061 100644
--- a/data/classic/actions.ruleset
+++ b/data/classic/actions.ruleset
@@ -1413,5 +1413,11 @@ target_reqs   =
 [enabler_gain_veterancy]
 action        = "Gain Veterancy"
 actor_reqs    =
-    { "type",         "name",         "range", "present"
+    { "type", "name", "range", "present"
+    }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
     }
diff --git a/data/classic/game.ruleset b/data/classic/game.ruleset
index cadc74e18e..ceb3cdf89b 100644
--- a/data/classic/game.ruleset
+++ b/data/classic/game.ruleset
@@ -138,9 +138,6 @@ tech_parasite_allow_holes = TRUE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = TRUE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/goldkeep/actions.ruleset b/data/goldkeep/actions.ruleset
index 45de4b6b54..6cc747b943 100644
--- a/data/goldkeep/actions.ruleset
+++ b/data/goldkeep/actions.ruleset
@@ -1480,5 +1480,11 @@ target_reqs   =
 [enabler_gain_veterancy]
 action        = "Gain Veterancy"
 actor_reqs    =
-    { "type",         "name",         "range", "present"
+    { "type", "name", "range", "present"
+    }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
     }
diff --git a/data/goldkeep/game.ruleset b/data/goldkeep/game.ruleset
index 6d5d97ec9f..19e6afcd3a 100644
--- a/data/goldkeep/game.ruleset
+++ b/data/goldkeep/game.ruleset
@@ -143,9 +143,6 @@ tech_parasite_allow_holes = TRUE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = TRUE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/granularity/actions.ruleset b/data/granularity/actions.ruleset
index 2487e6d16a..66b7860e4d 100644
--- a/data/granularity/actions.ruleset
+++ b/data/granularity/actions.ruleset
@@ -573,5 +573,11 @@ target_reqs   =
 [enabler_gain_veterancy]
 action        = "Gain Veterancy"
 actor_reqs    =
-    { "type",         "name",        "range", "present"
+    { "type", "name", "range", "present"
+    }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
     }
diff --git a/data/granularity/game.ruleset b/data/granularity/game.ruleset
index 91b4f69dfb..4a0450eff4 100644
--- a/data/granularity/game.ruleset
+++ b/data/granularity/game.ruleset
@@ -135,9 +135,6 @@ tech_parasite_allow_holes = TRUE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = TRUE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/multiplayer/actions.ruleset b/data/multiplayer/actions.ruleset
index 9b153240c1..751a1ff557 100644
--- a/data/multiplayer/actions.ruleset
+++ b/data/multiplayer/actions.ruleset
@@ -1401,5 +1401,11 @@ target_reqs   =
 [enabler_gain_veterancy]
 action        = "Gain Veterancy"
 actor_reqs    =
-    { "type",         "name",         "range", "present"
+    { "type", "name", "range", "present"
+    }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
     }
diff --git a/data/multiplayer/game.ruleset b/data/multiplayer/game.ruleset
index 8fcdd3566f..a3daeba185 100644
--- a/data/multiplayer/game.ruleset
+++ b/data/multiplayer/game.ruleset
@@ -141,9 +141,6 @@ tech_parasite_allow_holes = TRUE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = TRUE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/sandbox/actions.ruleset b/data/sandbox/actions.ruleset
index 033f5c303c..80bc9cd964 100644
--- a/data/sandbox/actions.ruleset
+++ b/data/sandbox/actions.ruleset
@@ -2929,3 +2929,9 @@ actor_reqs    =
     { "type",         "name",      "range", "present"
       "UnitTypeFlag", "NoVeteran", "Local", FALSE
     }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
+    }
diff --git a/data/sandbox/game.ruleset b/data/sandbox/game.ruleset
index 290bcaadfd..e80494c853 100644
--- a/data/sandbox/game.ruleset
+++ b/data/sandbox/game.ruleset
@@ -143,9 +143,6 @@ tech_parasite_allow_holes = FALSE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = FALSE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/stub/game.ruleset b/data/stub/game.ruleset
index 632101409c..f3426ca673 100644
--- a/data/stub/game.ruleset
+++ b/data/stub/game.ruleset
@@ -126,9 +126,6 @@ tech_parasite_allow_holes = TRUE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = TRUE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/data/webperimental/actions.ruleset b/data/webperimental/actions.ruleset
index 4d3ae34a6b..9e111570db 100644
--- a/data/webperimental/actions.ruleset
+++ b/data/webperimental/actions.ruleset
@@ -1659,5 +1659,11 @@ target_reqs   =
 [enabler_gain_veterancy]
 action        = "Gain Veterancy"
 actor_reqs    =
-    { "type",         "name",         "range", "present"
+    { "type", "name", "range", "present"
+    }
+
+[enabler_civil_war]
+action        = "Civil War"
+actor_reqs    =
+    { "type", "name", "range", "present"
     }
diff --git a/data/webperimental/game.ruleset b/data/webperimental/game.ruleset
index 7e5e79752e..60bc14f672 100644
--- a/data/webperimental/game.ruleset
+++ b/data/webperimental/game.ruleset
@@ -142,9 +142,6 @@ tech_parasite_allow_holes = FALSE
 ; due to negative bulbs, if techlossforgiveness allows loss
 tech_loss_allow_holes     = FALSE
 
-; Whether civil war is possible at all
-civil_war_enabled        = TRUE
-
 ; Comma separated list of things to happen, in addition to death
 ; of owner, when gameloss unit dies
 ; "CivilWar"   - Part of the empire remains, controlled by a new player
diff --git a/gen_headers/enums/actions_enums.def b/gen_headers/enums/actions_enums.def
index 0218145351..a816014a38 100644
--- a/gen_headers/enums/actions_enums.def
+++ b/gen_headers/enums/actions_enums.def
@@ -144,6 +144,7 @@ values
   # Enabler checks only
   ACTION_GAIN_VETERANCY                   "Gain Veterancy"
   ACTION_ESCAPE                           "Escape"
+  ACTION_CIVIL_WAR                        "Civil War"
 
   # User actions
   ACTION_USER_ACTION1                     "User Action 1"
diff --git a/server/plrhand.c b/server/plrhand.c
index 1efcb5a6c8..b0caf77ac9 100644
--- a/server/plrhand.c
+++ b/server/plrhand.c
@@ -2916,14 +2916,15 @@ bool civil_war_possible(struct player *pplayer, bool conquering_city,
                         bool honour_server_option)
 {
   int n;
+  const struct civ_map *nmap = &(wld.map);
 
-  if (!game.info.civil_war_enabled) {
+  if (!is_action_enabled_player(nmap, ACTION_CIVIL_WAR, pplayer)) {
     return FALSE;
   }
 
   n = city_list_size(pplayer->cities);
 
-  if (n - (conquering_city?1:0) < GAME_MIN_CIVILWARSIZE) {
+  if (n - (conquering_city ? 1 : 0) < GAME_MIN_CIVILWARSIZE) {
     return FALSE;
   }
   if (honour_server_option) {
diff --git a/server/ruleset/rscompat.c b/server/ruleset/rscompat.c
index adcff0c620..faa299961b 100644
--- a/server/ruleset/rscompat.c
+++ b/server/ruleset/rscompat.c
@@ -486,6 +486,12 @@ void rscompat_postprocess(struct rscompat_info *info)
   requirement_vector_append(&enabler->actor_reqs, e_req);
   action_enabler_add(enabler);
 
+  if (game.server.deprecated.civil_war_enabled) {
+    enabler = action_enabler_new();
+    enabler->action = ACTION_CIVIL_WAR;
+    action_enabler_add(enabler);
+  }
+
   /* Upgrade existing effects. Done before new effects are added to prevent
    * the new effects from being upgraded by accident. */
   iterate_effect_cache(effect_list_compat_cb, info);
diff --git a/server/ruleset/ruleload.c b/server/ruleset/ruleload.c
index 622d07dec4..d82bb3a050 100644
--- a/server/ruleset/ruleload.c
+++ b/server/ruleset/ruleload.c
@@ -6690,11 +6690,14 @@ static bool load_ruleset_game(struct section_file *file, bool act,
                                            RS_MIN_FOOD_COST,
                                            RS_MAX_FOOD_COST,
                                            "civstyle.food_cost");
-    game.info.civil_war_enabled
-      = secfile_lookup_bool_default(file, TRUE, "civstyle.civil_war_enabled");
 
     if (compat->compat_mode && compat->version < RSFORMAT_3_3) {
+      game.server.deprecated.civil_war_enabled
+        = secfile_lookup_bool_default(file, TRUE, "civstyle.civil_war_enabled");
       rscompat_civil_war_effects_3_3(file);
+    } else {
+      /* Avoid additional Civil War enabler */
+      game.server.deprecated.civil_war_enabled = FALSE;
     }
 
     game.info.base_bribe_cost
diff --git a/tools/ruleutil/rulesave.c b/tools/ruleutil/rulesave.c
index 8952df58d3..71d446c7bb 100644
--- a/tools/ruleutil/rulesave.c
+++ b/tools/ruleutil/rulesave.c
@@ -1363,9 +1363,6 @@ static bool save_game_ruleset(const char *filename, const char *name)
   save_default_int(sfile, game.info.food_cost,
                    RS_DEFAULT_FOOD_COST,
                    "civstyle.food_cost", nullptr);
-  save_default_bool(sfile, game.info.civil_war_enabled,
-                    TRUE,
-                    "civstyle.civil_war_enabled", nullptr);
   save_default_bool(sfile,
                     BV_ISSET(action_by_number(ACTION_PARADROP)->sub_results,
                              ACT_SUB_RES_MAY_EMBARK),
-- 
2.45.2

