From c1cbf72f7ce1581dfbfa38d37c1dbc14b23c87ad Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Wed, 19 Jun 2024 19:02:41 +0300
Subject: [PATCH 27/27] goldkeep: Replace "UnitFlag" with "UnitTypeFlag"

See RM #612

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 data/goldkeep/actions.ruleset | 288 +++++++++++++++++-----------------
 data/goldkeep/effects.ruleset | 132 ++++++++--------
 data/goldkeep/terrain.ruleset |  28 ++--
 3 files changed, 224 insertions(+), 224 deletions(-)

diff --git a/data/goldkeep/actions.ruleset b/data/goldkeep/actions.ruleset
index 272c0fa0b5..4e28d0dafb 100644
--- a/data/goldkeep/actions.ruleset
+++ b/data/goldkeep/actions.ruleset
@@ -32,7 +32,7 @@ if_attacker =
       "DiplRel",      "War",     "Local", TRUE
       "MinMoveFrags", "1",       "Local", TRUE
       ; Not a good idea to nuke our own area.
-      "UnitFlag",     "Nuclear", "Local", FALSE
+      "UnitTypeFlag", "Nuclear", "Local", FALSE
     }
 
 attack_actions = "Collect Ransom", "Attack", "Suicide Attack"
@@ -462,18 +462,18 @@ quiet_actions = "Transport Disembark 2", "Conquer City 2", "Enter Hut 2",
 action        = "Sabotage City"
 actor_reqs    =
     { "type",         "name",          "range", "present"
-      "UnitFlag",     "Diplomat",      "Local", TRUE
+      "UnitTypeFlag", "Diplomat",      "Local", TRUE
       "DiplRel",      "War",           "Local", TRUE
       "UnitState",    "OnLivableTile", "Local", TRUE
       "MinMoveFrags", "1",             "Local", TRUE
-      "UnitFlag",     "Spy",           "Local", FALSE
+      "UnitTypeFlag", "Spy",           "Local", FALSE
     }
 
 [enabler_sabotage_city_spy]
 action        = "Sabotage City Escape"
 actor_reqs    =
     { "type",         "name",          "range"
-      "UnitFlag",     "Spy",           "Local"
+      "UnitTypeFlag", "Spy",           "Local"
       "DiplRel",      "War",           "Local"
       "UnitState",    "OnLivableTile", "Local"
       "MinMoveFrags", "1",             "Local"
@@ -484,7 +484,7 @@ action        = "Targeted Sabotage City Escape"
 actor_reqs    =
     { "type",         "name",          "range"
       "DiplRel",      "War",           "Local"
-      "UnitFlag",     "Spy",           "Local"
+      "UnitTypeFlag", "Spy",           "Local"
       "UnitState",    "OnLivableTile", "Local"
       "MinMoveFrags", "1",             "Local"
     }
@@ -494,7 +494,7 @@ action        = "Sabotage City Production Escape"
 actor_reqs    =
     { "type",         "name",          "range"
       "DiplRel",      "War",           "Local"
-      "UnitFlag",     "Spy",           "Local"
+      "UnitTypeFlag", "Spy",           "Local"
       "UnitState",    "OnLivableTile", "Local"
       "MinMoveFrags", "1",             "Local"
     }
@@ -502,13 +502,13 @@ actor_reqs    =
 [enabler_eliminate_spy]
 action        = "Spy Attack"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "Spy", "Local", TRUE
-      "UnitState", "OnLivableTile", "Local", TRUE
-      "MinMoveFrags", "1", "Local", TRUE
-      "DiplRel", "Alliance", "Local", FALSE
-      "DiplRel", "Team", "Local", FALSE
-      "DiplRel", "Foreign", "Local", TRUE
+    { "type",         "name",          "range", "present"
+      "UnitTypeFlag", "Spy",           "Local", TRUE
+      "UnitState",    "OnLivableTile", "Local", TRUE
+      "MinMoveFrags", "1",             "Local", TRUE
+      "DiplRel",      "Alliance",      "Local", FALSE
+      "DiplRel",      "Team",          "Local", FALSE
+      "DiplRel",      "Foreign",       "Local", TRUE
     }
 target_reqs   =
     { "type",   "name", "range", "present"
@@ -519,12 +519,12 @@ target_reqs   =
 action        = "Establish Embassy Stay"
 actor_reqs    =
     { "type",         "name",             "range", "present"
-      "UnitFlag",     "Diplomat",         "Local", TRUE
+      "UnitTypeFlag", "Diplomat",         "Local", TRUE
       "UnitState",    "OnLivableTile",    "Local", TRUE
       "MinMoveFrags", "1",                "Local", TRUE
       "DiplRel",      "Foreign",          "Local", TRUE
       "DiplRel",      "Has real embassy", "Local", FALSE
-      "UnitFlag",     "Spy",              "Local", FALSE
+      "UnitTypeFlag", "Spy",              "Local", FALSE
     }
 target_reqs   =
     { "type",        "name",      "range",  "present"
@@ -535,7 +535,7 @@ target_reqs   =
 action        = "Establish Embassy"
 actor_reqs    =
     { "type",         "name",             "range", "present"
-      "UnitFlag",     "Spy",              "Local", TRUE
+      "UnitTypeFlag", "Spy",              "Local", TRUE
       "UnitState",    "OnLivableTile",    "Local", TRUE
       "MinMoveFrags", "1",                "Local", TRUE
       "DiplRel",      "Foreign",          "Local", TRUE
@@ -565,32 +565,32 @@ target_reqs   =
 [enabler_investigate_city]
 action        = "Investigate City Spend Unit"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "Diplomat", "Local", TRUE
-      "UnitState", "OnLivableTile", "Local", TRUE
-      "MinMoveFrags", "1", "Local", TRUE
-      "DiplRel", "Foreign", "Local", TRUE
-      "UnitFlag", "Spy", "Local", FALSE
+    { "type",         "name",          "range", "present"
+      "UnitTypeFlag", "Diplomat",      "Local", TRUE
+      "UnitState",    "OnLivableTile", "Local", TRUE
+      "MinMoveFrags", "1",             "Local", TRUE
+      "DiplRel",      "Foreign",       "Local", TRUE
+      "UnitTypeFlag", "Spy",           "Local", FALSE
     }
 
 [enabler_investigate_city_spy]
 action        = "Investigate City"
 actor_reqs    =
-    { "type",   "name", "range"
-      "UnitFlag", "Spy", "Local"
-      "UnitState", "OnLivableTile", "Local"
-      "MinMoveFrags", "1", "Local"
-      "DiplRel", "Foreign", "Local"
+    { "type",         "name",          "range"
+      "UnitTypeFlag", "Spy",           "Local"
+      "UnitState",    "OnLivableTile", "Local"
+      "MinMoveFrags", "1",             "Local"
+      "DiplRel",      "Foreign",       "Local"
     }
 
 [enabler_poison_city]
 action        = "Poison City Escape"
 actor_reqs    =
-    { "type",   "name", "range"
-      "UnitFlag", "Spy", "Local"
-      "DiplRel", "War", "Local"
-      "UnitState", "OnLivableTile", "Local"
-      "MinMoveFrags", "1", "Local"
+    { "type",         "name",          "range"
+      "UnitTypeFlag", "Spy",           "Local"
+      "DiplRel",      "War",           "Local"
+      "UnitState",    "OnLivableTile", "Local"
+      "MinMoveFrags", "1",             "Local"
     }
 target_reqs   =
     { "type",   "name", "range"
@@ -601,8 +601,8 @@ target_reqs   =
 action        = "Steal Tech"
 actor_reqs    =
     { "type",         "name",          "range", "present"
-      "UnitFlag",     "Spy",           "Local", FALSE
-      "UnitFlag",     "Diplomat",      "Local", TRUE
+      "UnitTypeFlag", "Spy",           "Local", FALSE
+      "UnitTypeFlag", "Diplomat",      "Local", TRUE
       "UnitState",    "OnLivableTile", "Local", TRUE
       "MinMoveFrags", "1",             "Local", TRUE
       "DiplRel",      "Foreign",       "Local", TRUE
@@ -616,7 +616,7 @@ target_reqs   =
 action        = "Steal Tech Escape Expected"
 actor_reqs    =
     { "type",         "name",          "range"
-      "UnitFlag",     "Spy",           "Local"
+      "UnitTypeFlag", "Spy",           "Local"
       "UnitState",    "OnLivableTile", "Local"
       "MinMoveFrags", "1",             "Local"
       "DiplRel",      "Foreign",       "Local"
@@ -630,7 +630,7 @@ target_reqs   =
 action        = "Targeted Steal Tech Escape Expected"
 actor_reqs    =
     { "type",         "name",          "range"
-      "UnitFlag",     "Spy",           "Local"
+      "UnitTypeFlag", "Spy",           "Local"
       "UnitState",    "OnLivableTile", "Local"
       "MinMoveFrags", "1",             "Local"
       "DiplRel",      "Foreign",       "Local"
@@ -644,13 +644,13 @@ target_reqs   =
 action        = "Incite City"
 actor_reqs    =
     { "type",         "name",          "range", "present"
-      "UnitFlag",     "Diplomat",      "Local", TRUE
+      "UnitTypeFlag", "Diplomat",      "Local", TRUE
       "DiplRel",      "Alliance",      "Local", FALSE
       "DiplRel",      "Team",          "Local", FALSE
       "UnitState",    "OnLivableTile", "Local", TRUE
       "MinMoveFrags", "1",             "Local", TRUE
       "DiplRel",      "Foreign",       "Local", TRUE
-      "UnitFlag",     "Spy",           "Local", FALSE
+      "UnitTypeFlag", "Spy",           "Local", FALSE
     }
 target_reqs   =
     { "type",     "name",      "range",  "present"
@@ -662,7 +662,7 @@ target_reqs   =
 action        = "Incite City Escape"
 actor_reqs    =
     { "type",         "name",          "range", "present"
-      "UnitFlag",     "Spy",           "Local", TRUE
+      "UnitTypeFlag", "Spy",           "Local", TRUE
       "DiplRel",      "Alliance",      "Local", FALSE
       "DiplRel",      "Team",          "Local", FALSE
       "UnitState",    "OnLivableTile", "Local", TRUE
@@ -678,29 +678,29 @@ target_reqs   =
 [enabler_bribe_unit]
 action        = "Bribe Unit"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "Diplomat", "Local", TRUE
-      "DiplRel", "Alliance", "Local", FALSE
-      "DiplRel", "Team", "Local", FALSE
-      "UnitState", "OnLivableTile", "Local", TRUE
-      "MinMoveFrags", "1", "Local", TRUE
-      "DiplRel", "Foreign", "Local", TRUE
+    { "type",         "name",          "range", "present"
+      "UnitTypeFlag", "Diplomat",      "Local", TRUE
+      "DiplRel",      "Alliance",      "Local", FALSE
+      "DiplRel",      "Team",          "Local", FALSE
+      "UnitState",    "OnLivableTile", "Local", TRUE
+      "MinMoveFrags", "1",             "Local", TRUE
+      "DiplRel",      "Foreign",       "Local", TRUE
     }
 target_reqs   =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "Unbribable", "Local", FALSE
-      "CityTile", "Center", "Tile", FALSE
-      "Gov", "Democracy", "Player", FALSE
+    { "type",         "name",       "range",  "present"
+      "UnitTypeFlag", "Unbribable", "Local",  FALSE
+      "CityTile",     "Center",     "Tile",   FALSE
+      "Gov",          "Democracy",  "Player", FALSE
     }
 
 [enabler_sabotage_unit]
 action        = "Sabotage Unit Escape"
 actor_reqs    =
-    { "type",   "name", "range"
-      "UnitFlag", "Spy", "Local"
-      "DiplRel", "War", "Local"
-      "UnitState", "OnLivableTile", "Local"
-      "MinMoveFrags", "1", "Local"
+    { "type",         "name",          "range"
+      "UnitTypeFlag", "Spy",           "Local"
+      "DiplRel",      "War",           "Local"
+      "UnitState",    "OnLivableTile", "Local"
+      "MinMoveFrags", "1",             "Local"
     }
 target_reqs   =
     { "type",   "name", "range", "present"
@@ -711,25 +711,25 @@ target_reqs   =
 [enabler_trade_route]
 action        = "Establish Trade Route"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "TradeRoute", "Local", TRUE
-      "UnitState", "HasHomeCity", "Local", TRUE
+    { "type",         "name",        "range", "present"
+      "UnitTypeFlag", "TradeRoute",  "Local", TRUE
+      "UnitState",    "HasHomeCity", "Local", TRUE
     }
 
 [enabler_marketplace]
 action        = "Enter Marketplace"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "TradeRoute", "Local", TRUE
-      "UnitState", "HasHomeCity", "Local", TRUE
+    { "type",         "name",        "range", "present"
+      "UnitTypeFlag", "TradeRoute",  "Local", TRUE
+      "UnitState",    "HasHomeCity", "Local", TRUE
     }
 
 [enabler_help_build_wonder]
 action        = "Help Wonder"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "HelpWonder", "Local", TRUE
-      "DiplRel", "Foreign", "Local", FALSE
+    { "type",         "name",       "range", "present"
+      "UnitTypeFlag", "HelpWonder", "Local", TRUE
+      "DiplRel",      "Foreign",    "Local", FALSE
     }
 target_reqs   =
     { "type",   "name", "range"
@@ -739,28 +739,28 @@ target_reqs   =
 [enabler_disband_unit_recover]
 action        = "Disband Unit Recover"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "EvacuateFirst", "Local", FALSE
-      "DiplRel",  "War",        "Local", FALSE
-      "DiplRel",  "Cease-fire", "Local", FALSE
-      "DiplRel",  "Armistice",  "Local", FALSE
-      "DiplRel",  "Peace",      "Local", FALSE
+    { "type",         "name",          "range", "present"
+      "UnitTypeFlag", "EvacuateFirst", "Local", FALSE
+      "DiplRel",      "War",           "Local", FALSE
+      "DiplRel",      "Cease-fire",    "Local", FALSE
+      "DiplRel",      "Armistice",     "Local", FALSE
+      "DiplRel",      "Peace",         "Local", FALSE
     }
 
 [enabler_disband_unit]
 action        = "Disband Unit"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "EvacuateFirst", "Local", FALSE
+    { "type",         "name",          "range", "present"
+      "UnitTypeFlag", "EvacuateFirst", "Local", FALSE
     }
 
 [enabler_build_city_pioneer]
 action        = "Found City"
 actor_reqs    =
-    { "type",   "name", "range"
-      "UnitFlag", "Cities", "Local"
-      "UnitState", "OnLivableTile", "Local"
-      "MinMoveFrags", "1", "Local"
+    { "type",         "name",          "range"
+      "UnitTypeFlag", "Cities",        "Local"
+      "UnitState",    "OnLivableTile", "Local"
+      "MinMoveFrags", "1",             "Local"
     }
 target_reqs   =
     { "type",   "name", "range", "present"
@@ -771,11 +771,11 @@ target_reqs   =
 [enabler_build_city_domestic]
 action        = "Found City"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "Cities", "Local", TRUE
-      "UnitState", "OnLivableTile", "Local", TRUE
-      "MinMoveFrags", "1", "Local", TRUE
-      "DiplRel", "Foreign", "Local", FALSE
+    { "type",         "name",          "range", "present"
+      "UnitTypeFlag", "Cities",        "Local", TRUE
+      "UnitState",    "OnLivableTile", "Local", TRUE
+      "MinMoveFrags", "1",             "Local", TRUE
+      "DiplRel",      "Foreign",       "Local", FALSE
     }
 target_reqs   =
     { "type",        "name",     "range", "present"
@@ -786,24 +786,24 @@ target_reqs   =
 [enabler_join_city]
 action        = "Join City"
 actor_reqs    =
-    { "type",   "name", "range", "present"
-      "UnitFlag", "AddToCity", "Local", TRUE
-      "DiplRel", "Foreign", "Local", FALSE
-      "MinMoveFrags", "1", "Local", TRUE
+    { "type",         "name",      "range", "present"
+      "UnitTypeFlag", "AddToCity", "Local", TRUE
+      "DiplRel",      "Foreign",   "Local", FALSE
+      "MinMoveFrags", "1",         "Local", TRUE
     }
 
 [enabler_nuke]
 action        = "Explode Nuclear"
 actor_reqs    =
-    { "type",     "name",    "range", "present"
-      "UnitFlag", "Nuclear", "Local", TRUE
+    { "type",         "name",    "range", "present"
+      "UnitTypeFlag", "Nuclear", "Local", TRUE
     }
 
 [enabler_nuke_city]
 action        = "Nuke City"
 actor_reqs    =
     { "type",         "name",    "range"
-      "UnitFlag",     "Nuclear", "Local"
+      "UnitTypeFlag", "Nuclear", "Local"
       "MinMoveFrags", "1",       "Local"
       "DiplRel",      "War",     "Local"
     }
@@ -812,7 +812,7 @@ actor_reqs    =
 action        = "Nuke Units"
 actor_reqs    =
     { "type",         "name",    "range"
-      "UnitFlag",     "Nuclear", "Local"
+      "UnitTypeFlag", "Nuclear", "Local"
       "MinMoveFrags", "1",       "Local"
       "DiplRel",      "War",     "Local"
     }
@@ -825,7 +825,7 @@ target_reqs   =
 action        = "Attack"
 actor_reqs    =
     { "type",          "name",         "range", "present"
-      "UnitFlag",      "NonMil",       "Local", FALSE
+      "UnitTypeFlag",  "NonMil",       "Local", FALSE
       "UnitClassFlag", "Missile",      "Local", FALSE
       "MinMoveFrags",  "1",            "Local", TRUE
       "UnitState",     "OnNativeTile", "Local", TRUE
@@ -836,10 +836,10 @@ actor_reqs    =
 action        = "Attack"
 actor_reqs    =
     { "type",          "name",    "range", "present"
-      "UnitFlag",      "NonMil",  "Local", FALSE
+      "UnitTypeFlag",  "NonMil",  "Local", FALSE
       "UnitClassFlag", "Missile", "Local", FALSE
       "MinMoveFrags",  "1",       "Local", TRUE
-      "UnitFlag",      "Marines", "Local", TRUE
+      "UnitTypeFlag",  "Marines", "Local", TRUE
       "DiplRel",       "War",     "Local", TRUE
     }
 
@@ -847,7 +847,7 @@ actor_reqs    =
 action        = "Attack"
 actor_reqs    =
     { "type",          "name",             "range", "present"
-      "UnitFlag",      "NonMil",           "Local", FALSE
+      "UnitTypeFlag",  "NonMil",           "Local", FALSE
       "UnitClassFlag", "Missile",          "Local", FALSE
       "MinMoveFrags",  "1",                "Local", TRUE
       "UnitClassFlag", "AttFromNonNative", "Local", TRUE
@@ -858,7 +858,7 @@ actor_reqs    =
 action        = "Collect Ransom"
 actor_reqs    =
     { "type",          "name",         "range", "present"
-      "UnitFlag",      "NonMil",       "Local", FALSE
+      "UnitTypeFlag",  "NonMil",       "Local", FALSE
       "UnitClassFlag", "Missile",      "Local", FALSE
       "MinMoveFrags",  "1",            "Local", TRUE
       "UnitState",     "OnNativeTile", "Local", TRUE
@@ -873,10 +873,10 @@ target_reqs   =
 action        = "Collect Ransom"
 actor_reqs    =
     { "type",          "name",         "range", "present"
-      "UnitFlag",      "NonMil",       "Local", FALSE
+      "UnitTypeFlag",  "NonMil",       "Local", FALSE
       "UnitClassFlag", "Missile",      "Local", FALSE
       "MinMoveFrags",  "1",            "Local", TRUE
-      "UnitFlag",      "Marines",      "Local", TRUE
+      "UnitTypeFlag",  "Marines",      "Local", TRUE
       "DiplRel",       "War",          "Local", TRUE
     }
 target_reqs   =
@@ -888,7 +888,7 @@ target_reqs   =
 action        = "Collect Ransom"
 actor_reqs    =
     { "type",          "name",             "range", "present"
-      "UnitFlag",      "NonMil",           "Local", FALSE
+      "UnitTypeFlag",  "NonMil",           "Local", FALSE
       "UnitClassFlag", "Missile",          "Local", FALSE
       "MinMoveFrags",  "1",                "Local", TRUE
       "UnitClassFlag", "AttFromNonNative", "Local", TRUE
@@ -903,7 +903,7 @@ target_reqs   =
 action        = "Suicide Attack"
 actor_reqs    =
     { "type",          "name",    "range", "present"
-      "UnitFlag",      "NonMil",  "Local", FALSE
+      "UnitTypeFlag",  "NonMil",  "Local", FALSE
       "UnitClassFlag", "Missile", "Local", TRUE
       "MinMoveFrags",  "1",       "Local", TRUE
       "DiplRel",       "War",     "Local", TRUE
@@ -914,7 +914,7 @@ action        = "Conquer City"
 actor_reqs    =
     { "type",           "name",          "range", "present"
       "UnitClassFlag",  "CanOccupyCity", "Local", TRUE
-      "UnitFlag",       "NonMil",        "Local", FALSE
+      "UnitTypeFlag",   "NonMil",        "Local", FALSE
       "DiplRel",        "War",           "Local", TRUE
       "MinMoveFrags",   "1",             "Local", TRUE
       "UnitState",      "OnLivableTile", "Local", TRUE
@@ -929,10 +929,10 @@ action        = "Conquer City 2"
 actor_reqs    =
     { "type",           "name",          "range", "present"
       "UnitClassFlag",  "CanOccupyCity", "Local", TRUE
-      "UnitFlag",       "NonMil",        "Local", FALSE
+      "UnitTypeFlag",   "NonMil",        "Local", FALSE
       "DiplRel",        "War",           "Local", TRUE
       "MinMoveFrags",   "1",             "Local", TRUE
-      "UnitFlag",       "Marines",       "Local", TRUE
+      "UnitTypeFlag",   "Marines",       "Local", TRUE
       "UnitState",      "OnLivableTile", "Local", FALSE
     }
 target_reqs   =
@@ -943,17 +943,17 @@ target_reqs   =
 [enabler_change_home_city]
 action        = "Home City"
 actor_reqs    =
-    { "type",      "name",        "range", "present"
-      "UnitFlag",  "NoHome",      "Local", FALSE
-      "UnitState", "HasHomeCity", "Local", TRUE
-      "DiplRel",   "Foreign",  "Local", FALSE
+    { "type",         "name",        "range", "present"
+      "UnitTypeFlag", "NoHome",      "Local", FALSE
+      "UnitState",    "HasHomeCity", "Local", TRUE
+      "DiplRel",      "Foreign",     "Local", FALSE
     }
 
 [enabler_paradrop_base_to_claimed]
 action        = "Paradrop Unit Enter"
 actor_reqs    =
     { "type",         "name",         "range", "present"
-      "UnitFlag",     "Paratroopers", "Local", TRUE
+      "UnitTypeFlag", "Paratroopers", "Local", TRUE
       "MinMoveFrags", "9",            "Local", TRUE
       "UnitState",    "Transporting", "Local", FALSE
       "Extra",        "Airbase",      "Tile",  TRUE
@@ -970,7 +970,7 @@ target_reqs   =
 action        = "Paradrop Unit Enter"
 actor_reqs    =
     { "type",         "name",         "range", "present"
-      "UnitFlag",     "Paratroopers", "Local", TRUE
+      "UnitTypeFlag", "Paratroopers", "Local", TRUE
       "MinMoveFrags", "9",            "Local", TRUE
       "UnitState",    "Transporting", "Local", FALSE
       "Extra",        "Airbase",      "Tile",  TRUE
@@ -986,13 +986,13 @@ target_reqs   =
 action        = "Paradrop Unit Enter Conquer"
 actor_reqs    =
     { "type",          "name",          "range", "present"
-      "UnitFlag",      "Paratroopers",  "Local", TRUE
+      "UnitTypeFlag",  "Paratroopers",  "Local", TRUE
       "MinMoveFrags",  "9",             "Local", TRUE
       "UnitState",     "Transporting",  "Local", FALSE
       "Extra",         "Airbase",       "Tile",  TRUE
       "DiplRel",       "War",           "Local", TRUE
       "UnitClassFlag", "CanOccupyCity", "Local", TRUE
-      "UnitFlag",      "NonMil",        "Local", FALSE
+      "UnitTypeFlag",  "NonMil",        "Local", FALSE
       "UnitClassFlag", "HutFrighten",   "Local", FALSE
     }
 target_reqs   =
@@ -1004,7 +1004,7 @@ target_reqs   =
 action        = "Paradrop Unit Enter Conquer"
 actor_reqs    =
     { "type",          "name",         "range", "present"
-      "UnitFlag",      "Paratroopers", "Local", TRUE
+      "UnitTypeFlag",  "Paratroopers", "Local", TRUE
       "MinMoveFrags",  "9",            "Local", TRUE
       "UnitState",     "Transporting", "Local", FALSE
       "Extra",         "Airbase",      "Tile",  TRUE
@@ -1021,7 +1021,7 @@ target_reqs   =
 action        = "Paradrop Unit Enter"
 actor_reqs    =
     { "type",         "name",         "range", "present"
-      "UnitFlag",     "Paratroopers", "Local", TRUE
+      "UnitTypeFlag", "Paratroopers", "Local", TRUE
       "MinMoveFrags", "9",            "Local", TRUE
       "UnitState",    "Transporting", "Local", FALSE
       "CityTile",     "Center",       "Tile",  TRUE
@@ -1038,7 +1038,7 @@ target_reqs   =
 action        = "Paradrop Unit Enter"
 actor_reqs    =
     { "type",         "name",         "range", "present"
-      "UnitFlag",     "Paratroopers", "Local", TRUE
+      "UnitTypeFlag", "Paratroopers", "Local", TRUE
       "MinMoveFrags", "9",            "Local", TRUE
       "UnitState",    "Transporting", "Local", FALSE
       "CityTile",     "Center",       "Tile",  TRUE
@@ -1054,13 +1054,13 @@ target_reqs   =
 action        = "Paradrop Unit Enter Conquer"
 actor_reqs    =
     { "type",          "name",          "range", "present"
-      "UnitFlag",      "Paratroopers",  "Local", TRUE
+      "UnitTypeFlag",  "Paratroopers",  "Local", TRUE
       "MinMoveFrags",  "9",             "Local", TRUE
       "UnitState",     "Transporting",  "Local", FALSE
       "CityTile",      "Center",        "Tile",  TRUE
       "DiplRel",       "War",           "Local", TRUE
       "UnitClassFlag", "CanOccupyCity", "Local", TRUE
-      "UnitFlag",      "NonMil",        "Local", FALSE
+      "UnitTypeFlag",  "NonMil",        "Local", FALSE
       "UnitClassFlag", "HutFrighten",   "Local", FALSE
     }
 target_reqs   =
@@ -1072,7 +1072,7 @@ target_reqs   =
 action        = "Paradrop Unit Enter Conquer"
 actor_reqs    =
     { "type",          "name",         "range", "present"
-      "UnitFlag",      "Paratroopers", "Local", TRUE
+      "UnitTypeFlag",  "Paratroopers", "Local", TRUE
       "MinMoveFrags",  "9",            "Local", TRUE
       "UnitState",     "Transporting", "Local", FALSE
       "CityTile",      "Center",       "Tile",  TRUE
@@ -1105,23 +1105,23 @@ actor_reqs    =
 [enabler_transform_terrain]
 action        = "Transform Terrain"
 actor_reqs    =
-    { "type",          "name",         "range"
-      "UnitFlag",      "Transform",    "Local"
-      "UnitFlag",      "Workers",      "Local"
+    { "type",         "name",      "range"
+      "UnitTypeFlag", "Transform", "Local"
+      "UnitTypeFlag", "Workers",   "Local"
     }
 
 [enabler_cultivate]
 action        = "Cultivate"
 actor_reqs    =
-    { "type",          "name",         "range", "present"
-      "UnitFlag",      "Workers",      "Local", TRUE
+    { "type",         "name",    "range", "present"
+      "UnitTypeFlag", "Workers", "Local", TRUE
     }
 
 [enabler_plant]
 action        = "Plant"
 actor_reqs    =
-    { "type",          "name",         "range", "present"
-      "UnitFlag",      "Workers",      "Local", TRUE
+    { "type",         "name",    "range", "present"
+      "UnitTypeFlag", "Workers", "Local", TRUE
     }
 
 [enabler_pillage]
@@ -1134,8 +1134,8 @@ actor_reqs    =
 [enabler_clean]
 action        = "Clean"
 actor_reqs    =
-    { "type",          "name",         "range", "present"
-      "UnitFlag",      "Workers",      "Local", TRUE
+    { "type",         "name",    "range", "present"
+      "UnitTypeFlag", "Workers", "Local", TRUE
     }
 
 [enabler_fortify_terrain]
@@ -1143,7 +1143,7 @@ action        = "Fortify"
 actor_reqs    =
     { "type",          "name",         "range", "present"
       "UnitClassFlag", "CanFortify",   "Local", TRUE
-      "UnitFlag",      "Cant_Fortify", "Local", FALSE
+      "UnitTypeFlag",  "Cant_Fortify", "Local", FALSE
       "TerrainFlag",   "NoFortify",    "Tile",  FALSE
       "Activity",      "Fortified",    "Local", FALSE
     }
@@ -1153,7 +1153,7 @@ action        = "Fortify"
 actor_reqs    =
     { "type",          "name",         "range", "present"
       "UnitClassFlag", "CanFortify",   "Local", TRUE
-      "UnitFlag",      "Cant_Fortify", "Local", FALSE
+      "UnitTypeFlag",  "Cant_Fortify", "Local", FALSE
       "CityTile",      "Center",       "Tile",  TRUE
       "Activity",      "Fortified",    "Local", FALSE
     }
@@ -1161,8 +1161,8 @@ actor_reqs    =
 [enabler_road]
 action        = "Build Road"
 actor_reqs    =
-    { "type",          "name",         "range"
-      "UnitFlag",      "Workers",      "Local"
+    { "type",         "name",    "range"
+      "UnitTypeFlag", "Workers", "Local"
     }
 target_reqs   =
     { "type",         "name",    "range"
@@ -1172,8 +1172,8 @@ target_reqs   =
 [enabler_base]
 action        = "Build Base"
 actor_reqs    =
-    { "type",          "name",         "range"
-      "UnitFlag",      "Workers",      "Local"
+    { "type",         "name",    "range"
+      "UnitTypeFlag", "Workers", "Local"
     }
 target_reqs   =
     { "type",         "name",    "range"
@@ -1183,8 +1183,8 @@ target_reqs   =
 [enabler_mining]
 action        = "Build Mine"
 actor_reqs    =
-    { "type",          "name",         "range"
-      "UnitFlag",      "Workers",      "Local"
+    { "type",         "name",    "range"
+      "UnitTypeFlag", "Workers", "Local"
     }
 target_reqs   =
     { "type",         "name",    "range", "present"
@@ -1195,9 +1195,9 @@ target_reqs   =
 [enabler_desert_oil]
 action        = "Build Mine"
 actor_reqs    =
-    { "type",     "name",         "range"
-      "UnitFlag", "Workers",      "Local"
-      "Tech",     "Construction", "Player"
+    { "type",         "name",         "range"
+      "UnitTypeFlag", "Workers",      "Local"
+      "Tech",         "Construction", "Player"
     }
 target_reqs   =
     { "type",    "name",         "range"
@@ -1207,9 +1207,9 @@ target_reqs   =
 [enabler_glacier_oil]
 action        = "Build Mine"
 actor_reqs    =
-    { "type",     "name",     "range"
-      "UnitFlag", "Workers",  "Local"
-      "Tech",     "Refining", "Player"
+    { "type",         "name",     "range"
+      "UnitTypeFlag", "Workers",  "Local"
+      "Tech",         "Refining", "Player"
     }
 target_reqs   =
     { "type",    "name",     "range"
@@ -1219,8 +1219,8 @@ target_reqs   =
 [enabler_irrigate_src_ocean]
 action        = "Build Irrigation"
 actor_reqs    =
-    { "type",          "name",         "range"
-      "UnitFlag",      "Workers",      "Local"
+    { "type",         "name",    "range"
+      "UnitTypeFlag", "Workers", "Local"
     }
 target_reqs   =
     { "type",         "name",        "range"
@@ -1231,8 +1231,8 @@ target_reqs   =
 [enabler_irrigate_src_river]
 action        = "Build Irrigation"
 actor_reqs    =
-    { "type",          "name",         "range"
-      "UnitFlag",      "Workers",      "Local"
+    { "type",         "name",    "range"
+      "UnitTypeFlag", "Workers", "Local"
     }
 target_reqs   =
     { "type",         "name",        "range"
@@ -1243,8 +1243,8 @@ target_reqs   =
 [enabler_irrigate_src_irrigation]
 action        = "Build Irrigation"
 actor_reqs    =
-    { "type",          "name",         "range"
-      "UnitFlag",      "Workers",      "Local"
+    { "type",         "name",    "range"
+      "UnitTypeFlag", "Workers", "Local"
     }
 target_reqs   =
     { "type",         "name",        "range"
diff --git a/data/goldkeep/effects.ruleset b/data/goldkeep/effects.ruleset
index 7082177574..52d87bda01 100644
--- a/data/goldkeep/effects.ruleset
+++ b/data/goldkeep/effects.ruleset
@@ -182,7 +182,7 @@ reqs    =
       "CityTile",      "Center",       "Tile",  TRUE
       "Activity",      "Fortified",    "Local", FALSE
       "UnitClassFlag", "CanFortify",   "Local", TRUE
-      "UnitFlag",      "Cant_Fortify", "Local", FALSE
+      "UnitTypeFlag",  "Cant_Fortify", "Local", FALSE
     }
 
 [effect_city_min_hp]
@@ -761,9 +761,9 @@ reqs	=
 type    = "Veteran_Build"
 value   = 1
 reqs	=
-    { "type",       "name",      "range"
-      "Gov", "Communism", "Player"
-      "UnitFlag", "Diplomat", "Local"
+    { "type",         "name",      "range"
+      "Gov",          "Communism", "Player"
+      "UnitTypeFlag", "Diplomat",  "Local"
     }
 
 [effect_gov_tile_bonus_0]
@@ -872,30 +872,30 @@ reqs	=
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Airport", "City", TRUE
-      "UnitClass", "Air", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
+    { "type",         "name",    "range", "present"
+      "Building",     "Airport", "City",  TRUE
+      "UnitClass",    "Air",     "Local", TRUE
+      "UnitTypeFlag", "NonMil",  "Local", FALSE
     }
 
 [effect_airport_0a]
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Airport", "City", TRUE
-      "UnitClass", "Helicopter", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
+    { "type",         "name",       "range", "present"
+      "Building",     "Airport",    "City",  TRUE
+      "UnitClass",    "Helicopter", "Local", TRUE
+      "UnitTypeFlag", "NonMil",     "Local", FALSE
     }
 
 [effect_airport_0b]
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Airport", "City", TRUE
-      "UnitClass", "Missile", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
+    { "type",         "name",    "range", "present"
+      "Building",     "Airport", "City",  TRUE
+      "UnitClass",    "Missile", "Local", TRUE
+      "UnitTypeFlag", "NonMil",  "Local", FALSE
     }
 
 [effect_airport_1]
@@ -981,7 +981,7 @@ reqs	=
     { "type",         "name",      "range", "present"
       "BuildingFlag", "Barracks",  "City",  TRUE
       "UnitClass",    "Land",      "Local", TRUE
-      "UnitFlag",     "NonMil",    "Local", FALSE
+      "UnitTypeFlag", "NonMil",    "Local", FALSE
     }
 
 [effect_barracks_bland]
@@ -991,7 +991,7 @@ reqs    =
     { "type",         "name",      "range", "present"
       "BuildingFlag", "Barracks",  "City",  TRUE
       "UnitClass",    "Big Land",  "Local", TRUE
-      "UnitFlag",     "NonMil",    "Local", FALSE
+      "UnitTypeFlag", "NonMil",    "Local", FALSE
     }
 
 [effect_barracks_regen_land]
@@ -1556,10 +1556,10 @@ reqs	=
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Port Facility", "City", TRUE
-      "UnitClass", "Sea", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
+    { "type",         "name",          "range", "present"
+      "Building",     "Port Facility", "City",  TRUE
+      "UnitClass",    "Sea",           "Local", TRUE
+      "UnitTypeFlag", "NonMil",        "Local", FALSE
     }
 
 [effect_port_facility_1]
@@ -1575,10 +1575,10 @@ reqs	=
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Port Facility", "City", TRUE
-      "UnitClass", "Trireme", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
+    { "type",         "name",          "range", "present"
+      "Building",     "Port Facility", "City",  TRUE
+      "UnitClass",    "Trireme",       "Local", TRUE
+      "UnitTypeFlag", "NonMil",        "Local", FALSE
     }
 
 [effect_port_facility_trireme_1]
@@ -2194,11 +2194,11 @@ reqs	=
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Lighthouse", "Player", TRUE
-      "UnitClass", "Sea", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
-      "Building", "Port Facility", "City", FALSE
+    { "type",         "name",          "range", "present"
+      "Building",     "Lighthouse",    "Player", TRUE
+      "UnitClass",    "Sea",           "Local",  TRUE
+      "UnitTypeFlag", "NonMil",        "Local",  FALSE
+      "Building",     "Port Facility", "City",   FALSE
     }
 
 [effect_lighthouse_trireme_move]
@@ -2214,11 +2214,11 @@ reqs	=
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Lighthouse", "Player", TRUE
-      "UnitClass", "Trireme", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
-      "Building", "Port Facility", "City", FALSE
+    { "type",         "name",          "range", "present"
+      "Building",     "Lighthouse",    "Player", TRUE
+      "UnitClass",    "Trireme",       "Local",  TRUE
+      "UnitTypeFlag", "NonMil",        "Local",  FALSE
+      "Building",     "Port Facility", "City",   FALSE
     }
 
 [effect_magellans_expedition]
@@ -2344,40 +2344,40 @@ reqs	=
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Sun Tzu's War Academy", "Player", TRUE
-      "UnitClass", "Land", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
+    { "type",         "name",                  "range", "present"
+      "Building",     "Sun Tzu's War Academy", "Player", TRUE
+      "UnitClass",    "Land",                  "Local",  TRUE
+      "UnitTypeFlag", "NonMil",                "Local",  FALSE
     }
 
 [effect_sun_tzus_big_land_veteran]
 type    = "Veteran_Build"
 value	= 1
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Sun Tzu's War Academy", "Player", TRUE
-      "UnitClass", "Big Land", "Local", TRUE
-      "UnitFlag", "NonMil", "Local", FALSE
+    { "type",         "name",                  "range",  "present"
+      "Building",     "Sun Tzu's War Academy", "Player", TRUE
+      "UnitClass",    "Big Land",              "Local",  TRUE
+      "UnitTypeFlag", "NonMil",                "Local",  FALSE
     }
 
 [effect_sun_tzus_land_combat_vet]
 type    = "Veteran_Combat"
 value	= 50
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Sun Tzu's War Academy", "Player", TRUE
-      "UnitClass", "Land", "Local", TRUE
-      "UnitFlag", "Diplomat", "Local", FALSE
+    { "type",         "name",                  "range",  "present"
+      "Building",     "Sun Tzu's War Academy", "Player", TRUE
+      "UnitClass",    "Land",                  "Local",  TRUE
+      "UnitTypeFlag", "Diplomat",              "Local",  FALSE
     }
 
 [effect_sun_tzus_big_land_combat_vet]
 type    = "Veteran_Combat"
 value	= 50
 reqs	=
-    { "type", "name", "range", "present"
-      "Building", "Sun Tzu's War Academy", "Player", TRUE
-      "UnitClass", "Big Land", "Local", TRUE
-      "UnitFlag", "Diplomat", "Local", FALSE
+    { "type",         "name",                  "range",  "present"
+      "Building",     "Sun Tzu's War Academy", "Player", TRUE
+      "UnitClass",    "Big Land",              "Local",  TRUE
+      "UnitTypeFlag", "Diplomat",              "Local",  FALSE
     }
 
 [effect_united_nations]
@@ -2715,8 +2715,8 @@ reqs    =
 type	= "Unit_Bribe_Cost_Pct"
 value	= -50
 reqs	=
-    { "type", "name", "range"
-      "UnitFlag", "Cities", "Local"
+    { "type",         "name",   "range"
+      "UnitTypeFlag", "Cities", "Local"
     }
 
 [effect_illegal_action_move_cost_base]
@@ -2957,36 +2957,36 @@ reqs    =
 type    = "Action_Success_Actor_Move_Cost"
 value   = 65535
 reqs    =
-    { "type",     "name",      "range", "quiet"
-      "Action",   "Attack",    "Local", TRUE
-      "UnitFlag", "OneAttack", "Local", TRUE
+    { "type",         "name",      "range", "quiet"
+      "Action",       "Attack",    "Local", TRUE
+      "UnitTypeFlag", "OneAttack", "Local", TRUE
     }
 
 [effect_action_success_attack_normal]
 type    = "Action_Success_Actor_Move_Cost"
 value   = 9
 reqs    =
-    { "type",     "name",      "range", "present"
-      "Action",   "Attack",    "Local", TRUE
-      "UnitFlag", "OneAttack", "Local", FALSE
+    { "type",         "name",      "range", "present"
+      "Action",       "Attack",    "Local", TRUE
+      "UnitTypeFlag", "OneAttack", "Local", FALSE
     }
 
 [effect_action_success_ransom_one_attack]
 type    = "Action_Success_Actor_Move_Cost"
 value   = 65535
 reqs    =
-    { "type",     "name",           "range", "quiet"
-      "Action",   "Collect Ransom", "Local", TRUE
-      "UnitFlag", "OneAttack",      "Local", TRUE
+    { "type",         "name",           "range", "quiet"
+      "Action",       "Collect Ransom", "Local", TRUE
+      "UnitTypeFlag", "OneAttack",      "Local", TRUE
     }
 
 [effect_action_success_ransom]
 type    = "Action_Success_Actor_Move_Cost"
 value   = 9
 reqs    =
-    { "type",     "name",           "range", "present"
-      "Action",   "Collect Ransom", "Local", TRUE
-      "UnitFlag", "OneAttack",      "Local", FALSE
+    { "type",         "name",           "range", "present"
+      "Action",       "Collect Ransom", "Local", TRUE
+      "UnitTypeFlag", "OneAttack",      "Local", FALSE
     }
 
 [effect_action_establish_embassy_success_move_cost]
diff --git a/data/goldkeep/terrain.ruleset b/data/goldkeep/terrain.ruleset
index f9bf1e04e2..4363f99c89 100644
--- a/data/goldkeep/terrain.ruleset
+++ b/data/goldkeep/terrain.ruleset
@@ -1471,7 +1471,7 @@ reqs           =
     { "type",         "name",         "range",  "present", "quiet"
       "Tech",         "Construction", "Player", TRUE,      FALSE
       "TerrainClass", "Land",         "Tile",   TRUE,      FALSE
-      "UnitFlag",     "Workers",      "Local",  TRUE,      FALSE
+      "UnitTypeFlag", "Workers",      "Local",  TRUE,      FALSE
       "CityTile",     "Center",        "Tile",  FALSE,     TRUE
     }
 build_time     = 3
@@ -1505,11 +1505,11 @@ rmact_gfx      = "None"
 rmact_gfx_alt  = "-"
 rmact_gfx_alt2 = "-"
 reqs           =
-    { "type", "name", "range", "present", "quiet"
-      "Tech", "Radio", "Player", TRUE, FALSE
-      "TerrainClass", "Land", "Tile", TRUE, FALSE
-      "UnitFlag", "Airbase", "Local", TRUE, FALSE
-      "CityTile", "Center", "Tile", FALSE, TRUE
+    { "type",         "name",    "range",  "present", "quiet"
+      "Tech",         "Radio",   "Player", TRUE,      FALSE
+      "TerrainClass", "Land",    "Tile",   TRUE,      FALSE
+      "UnitTypeFlag", "Airbase", "Local",  TRUE,      FALSE
+      "CityTile",     "Center",  "Tile",   FALSE,     TRUE
     }
 build_time     = 3
 removal_time   = 0
@@ -1536,11 +1536,11 @@ rmact_gfx      = "None"
 rmact_gfx_alt  = "-"
 rmact_gfx_alt2 = "-"
 reqs           =
-    { "type", "name", "range", "present", "quiet"
-      "Tech", "Radio", "Player", TRUE, FALSE
-      "TerrainClass", "Oceanic", "Tile", TRUE, FALSE
-      "UnitFlag", "Airbase", "Local", TRUE, FALSE
-      "CityTile", "Center", "Tile", FALSE, TRUE
+    { "type",         "name",    "range",  "present", "quiet"
+      "Tech",         "Radio",   "Player", TRUE,      FALSE
+      "TerrainClass", "Oceanic", "Tile",   TRUE,      FALSE
+      "UnitTypeFlag", "Airbase", "Local",  TRUE,      FALSE
+      "CityTile",     "Center",  "Tile",   FALSE,     TRUE
     }
 build_time     = 3
 removal_time   = 0
@@ -1591,7 +1591,7 @@ rmact_gfx_alt  = "-"
 rmact_gfx_alt2 = "-"
 reqs           =
     { "type",         "name",    "range"
-      "UnitFlag",     "Workers", "Local"
+      "UnitTypeFlag", "Workers", "Local"
       "TerrainClass", "Land",    "Tile"
     }
 build_time     = 0
@@ -1628,7 +1628,7 @@ reqs           =
     { "type",         "name",     "range"
       "Tech",         "Railroad", "Player"
       "Extra",        "Road",     "Tile"
-      "UnitFlag",     "Workers",  "Local"
+      "UnitTypeFlag", "Workers",  "Local"
       "TerrainClass", "Land",     "Tile"
     }
 build_time     = 3
@@ -1667,7 +1667,7 @@ reqs           =
     { "type",         "name",            "range"
       "Tech",         "Superconductors", "Player"
       "Extra",        "Railroad",        "Tile"
-      "UnitFlag",     "Workers",         "Local"
+      "UnitTypeFlag", "Workers",         "Local"
       "TerrainClass", "Land",            "Tile"
     }
 build_time     = 3
-- 
2.43.0

