From e8ffb1f62ae26a81cd74a0b99ff9886d91f5b47e Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Tue, 2 Feb 2021 14:31:18 +0100 Subject: [PATCH] sandbox: add "Castle" as a new base type. A castle expands a fortress with an administration center, allowing it to claim terrain, to see cardinally adjacent tiles even when empty and to be captured by foreigners. See osdn #41433 --- data/sandbox/README.sandbox | 7 ++++- data/sandbox/game.ruleset | 27 +++++++++++++++++++ data/sandbox/terrain.ruleset | 50 ++++++++++++++++++++++++++++++++++-- 3 files changed, 81 insertions(+), 3 deletions(-) diff --git a/data/sandbox/README.sandbox b/data/sandbox/README.sandbox index f54ede849b..29210c15d0 100644 --- a/data/sandbox/README.sandbox +++ b/data/sandbox/README.sandbox @@ -116,6 +116,11 @@ Custom policy "Personal Freedom": You can trade off a science bonus against extra unhappiness from your aggressive military units. +Castle fortress add on +A castle allows a fortress to claim territory and to see cardinally +adjacent tiles even when empty. But beware: foreign military units able to +enter your castle may capture it - even during an armistice. + Opponents not seeing units in fortress or airbase: Opponents can't see units that are inside fortress or airbase. Units inside fort and airstrip can still be seen. @@ -162,4 +167,4 @@ casus belli against you. Chichen Itza wonder City with Chichen Itza wonder can build citybuilder units without paying -any population cost for them. \ No newline at end of file +any population cost for them. diff --git a/data/sandbox/game.ruleset b/data/sandbox/game.ruleset index 5396ddc44c..1e3147eac6 100644 --- a/data/sandbox/game.ruleset +++ b/data/sandbox/game.ruleset @@ -470,6 +470,9 @@ ui_name_conquer_city = _("%sConquer City%s") ; /* TRANS: _Conquer City from non native (100% chance of success). */ ui_name_conquer_city_2 = _("%sConquer City from non native%s") +; /* TRANS: _Storm the Castle (100% chance of success). */ +ui_name_conquer_extras = _("%sStorm the Castle%s") + ; /* TRANS: _Transform Terrain (3% chance of success). */ ui_name_transform_terrain = _("%sTransform Terrain%s") @@ -1478,6 +1481,30 @@ target_reqs = "Terrain", "Deep Ocean", "Local", TRUE } +[actionenabler_claim_extra_foreign] +action = "Conquer Extras" +actor_reqs = + { "type", "name", "range", "present" + "MinMoveFrags", "1", "Local", TRUE + "DiplRel", "Foreign", "Local", TRUE + "DiplRel", "Peace", "Local", FALSE + "DiplRel", "Alliance", "Local", FALSE + "DiplRel", "Team", "Local", FALSE + "UnitFlag", "NonMil", "Local", FALSE + } + +[actionenabler_claim_extra_unowned] +action = "Conquer Extras" +actor_reqs = + { "type", "name", "range", "present" + "MinMoveFrags", "1", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + } +target_reqs = + { "type", "name", "range", "present" + "CityTile", "Extras Owned", "Local", FALSE + } + ; Prevent building farmland on bare deserts. It does not yield any bonus ; over irrigation, and prevents any Super Highways trade bonus, so it ; would be a waste of time. diff --git a/data/sandbox/terrain.ruleset b/data/sandbox/terrain.ruleset index d6906e42f4..dfe95c7887 100644 --- a/data/sandbox/terrain.ruleset +++ b/data/sandbox/terrain.ruleset @@ -1550,6 +1550,7 @@ removal_time = 0 unit_seen = "Hidden" native_to = "Land", "Small Land", "Big Land" conflicts = "Airstrip", "Airbase" +hidden_by = "Castle" flags = "NativeTile", "DiplomatDefense", "NoAggressive" helptext = _("\ Fortresses are more permanent forts; construction on them can only begin \ @@ -1568,6 +1569,45 @@ With Astronomy, fortresses gain watchtowers from which units can see \ further afield.\ ") +[extra_castle] +name = _("Castle") +category = "Infra" +causes = "Base" +rmcauses = "Pillage" +graphic = "base.castle" +graphic_alt = "base.fortress" +activity_gfx = "unit.castle" +act_gfx_alt = "unit.fortress" +act_gfx_alt2 = "-" +rmact_gfx = "None" +rmact_gfx_alt = "-" +reqs = + { "type", "name", "range", "present", "quiet" + "Extra", "Fortress", "Local", TRUE, FALSE + "Tech", "Construction", "Player", TRUE, FALSE + "Tech", "Feudalism", "Player", TRUE, FALSE + "TerrainClass", "Land", "Local", TRUE, FALSE + "UnitFlag", "Settlers", "Local", TRUE, FALSE + "UnitClass", "Sea", "Local", FALSE, TRUE + "CityTile", "Center", "Local", FALSE, TRUE + "Extra", "River", "Local", FALSE, FALSE + } +build_time = 1 +removal_time = 0 +unit_seen = "Hidden" +native_to = "Land", "Small Land", "Big Land" +conflicts = "Airstrip", "Airbase" +flags = "NativeTile", "DiplomatDefense", "NoAggressive" +helptext = _("\ +Castles are fortresses with an administration center; construction on them \ +can only begin once the underlying fortress is complete.\ +"), _("\ +The castle and its surrounding area is ruled by a vassal with a high \ +degree of autonomy. \ +This makes a castle able to control terrain far from the borders of \ +its nation's cities.\ +") + [extra_airstrip] name = _("Airstrip") category = "Infra" @@ -1590,7 +1630,7 @@ reqs = build_time = 2 removal_time = 0 native_to = "Air", "Helicopter", "Missile" -conflicts = "Fort", "Fortress" +conflicts = "Fort", "Fortress", "Castle" hidden_by = "Airbase" flags = "Refuel", "ParadropFrom" helptext = _("\ @@ -1633,7 +1673,7 @@ build_time = 2 removal_time = 0 unit_seen = "Hidden" native_to = "Air", "Helicopter", "Missile" -conflicts = "Fort", "Fortress" +conflicts = "Fort", "Fortress", "Castle" flags = "Refuel", "ParadropFrom", "NoAggressive" helptext = _("\ Airbases are more permanent airstrips; construction on them can only \ @@ -2152,6 +2192,12 @@ extra = "Fortress" gui_type = "Fortress" border_sq = -1 +[base_castle] +extra = "Castle" +gui_type = "Fortress" +border_sq = 5 +vision_main_sq = 1 + [base_airstrip] extra = "Airstrip" gui_type = "Airbase" -- 2.20.1