From a4dee75c2f963783c74fdbd98cb85126c332fe6c Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 1 Apr 2023 17:57:25 +0300 Subject: [PATCH 22/22] civ2civ3/sandbox: Make Barracks to affect Small Land units Now Barracks and Sun Tzu affect all military land units. Requested by chippo Designed by bard See osdn #47636 Signed-off-by: Marko Lindqvist --- data/civ2civ3/buildings.ruleset | 6 +- data/civ2civ3/effects.ruleset | 135 ++++++++------------------------ data/civ2civ3/units.ruleset | 8 +- data/sandbox/buildings.ruleset | 6 +- data/sandbox/effects.ruleset | 135 ++++++++------------------------ data/sandbox/units.ruleset | 8 +- 6 files changed, 80 insertions(+), 218 deletions(-) diff --git a/data/civ2civ3/buildings.ruleset b/data/civ2civ3/buildings.ruleset index 3c7ff07d28..fd3759857a 100644 --- a/data/civ2civ3/buildings.ruleset +++ b/data/civ2civ3/buildings.ruleset @@ -248,7 +248,7 @@ sound = "b_barracks_i" sound_alt = "b_generic" ; /* xgettext:no-c-format */ helptext = _("\ -With a Barracks, each new land unit built in a city will\ +With a Barracks, each new military land unit built in a city will\ automatically have Veteran status, which means that its attack and\ defense strengths are increased by 50%.\ "), _("\ @@ -277,7 +277,7 @@ sound = "b_barracks_ii" sound_alt = "b_generic" ; /* xgettext:no-c-format */ helptext = _("\ -With a Barracks, each new land unit built in a city will\ +With a Barracks, each new military land unit built in a city will\ automatically have Veteran status, which means that its attack and\ defense strengths are increased by 50%.\ "), _("\ @@ -304,7 +304,7 @@ sound = "b_barracks_iii" sound_alt = "b_generic" ; /* xgettext:no-c-format */ helptext = _("\ -With a Barracks, each new land unit built in a city will\ +With a Barracks, each new military land unit built in a city will\ automatically have Veteran status, which means that its attack and\ defense strengths are increased by 50%.\ "), _("\ diff --git a/data/civ2civ3/effects.ruleset b/data/civ2civ3/effects.ruleset index b8208a9205..063086a4fe 100644 --- a/data/civ2civ3/effects.ruleset +++ b/data/civ2civ3/effects.ruleset @@ -1833,124 +1833,64 @@ reqs = "OutputType", "Luxury", "Local" } -[effect_barracks] +[effect_barracks_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_b] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_barracks_hp] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - } - -[effect_barracks_b_hp] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE + { "type", "name", "range", "present" + "Building", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE } -[effect_barracks_ii] +[effect_barracks_ii_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_ii_b] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Barracks II", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_barracks_ii_hp] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Land", "Local", TRUE + { "type", "name", "range", "present" + "Building", "Barracks II", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE } -[effect_barracks_ii_b_hp] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - } - -[effect_barracks_iii] +[effect_barracks_iii_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "Building", "Barracks III", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_iii_b] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks III", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Barracks III", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_barracks_iii_hp] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range" - "Building", "Barracks III", "City" - "UnitClass", "Land", "Local" - } - -[effect_barracks_iii_b_hp] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range" - "Building", "Barracks III", "City" - "UnitClass", "Big Land", "Local" + { "type", "name", "range" + "Building", "Barracks III", "City" + "UnitClassFlag", "Barracks", "Local" } [effect_cathedral] @@ -3749,22 +3689,11 @@ 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 - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_sun_tzus_war_academy_1] -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 - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Sun Tzu's War Academy", "Player", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_sun_tzus_war_academy_culture] diff --git a/data/civ2civ3/units.ruleset b/data/civ2civ3/units.ruleset index 3337f7cfcf..e7860c8028 100644 --- a/data/civ2civ3/units.ruleset +++ b/data/civ2civ3/units.ruleset @@ -61,6 +61,7 @@ class_flags = _("CanFortify"), ; /* xgettext:no-c-format */ _("Gets a 50% defensive bonus while in cities.") + _("Barracks"), _("Benefits from barracks") } [veteran_system] @@ -157,7 +158,8 @@ min_speed = 1 hp_loss_pct = 0 flags = "TerrainSpeed", "DamageSlows", "CanOccupyCity", "BuildAnywhere", "CollectRansom", "ZOC", "CanFortify", "CanPillage", - "TerrainDefense", "Airliftable", "NonNatBombardTgt" + "TerrainDefense", "Airliftable", "NonNatBombardTgt", + "Barracks" [unitclass_land_small] ; /* TRANS: Unit class: used adjectivally */ @@ -166,7 +168,7 @@ min_speed = 1 hp_loss_pct = 0 flags = "TerrainSpeed", "DamageSlows", "BuildAnywhere", "CollectRansom", "ZOC", "CanFortify", "TerrainDefense", "DoesntOccupyTile", - "Airliftable", "NonNatBombardTgt" + "Airliftable", "NonNatBombardTgt", "Barracks" [unitclass_land_big] ; /* TRANS: Unit class: used adjectivally */ @@ -175,7 +177,7 @@ min_speed = 1 hp_loss_pct = 0 flags = "TerrainSpeed", "DamageSlows", "CanOccupyCity", "BuildAnywhere", "CollectRansom","ZOC", "CanFortify", "KillCitizen", "Airliftable", - "NonNatBombardTgt" + "NonNatBombardTgt", "Barracks" [unitclass_merchant] ; /* TRANS: Unit class: used adjectivally */ diff --git a/data/sandbox/buildings.ruleset b/data/sandbox/buildings.ruleset index 9546eb8447..64db7e3e55 100644 --- a/data/sandbox/buildings.ruleset +++ b/data/sandbox/buildings.ruleset @@ -251,7 +251,7 @@ sound = "b_barracks_i" sound_alt = "b_generic" ; /* xgettext:no-c-format */ helptext = _("\ -With a Barracks, each new land unit built in a city will\ +With a Barracks, each new military land unit built in a city will\ automatically have Veteran status, which means that its attack and\ defense strengths are increased by 50%.\ "), _("\ @@ -280,7 +280,7 @@ sound = "b_barracks_ii" sound_alt = "b_generic" ; /* xgettext:no-c-format */ helptext = _("\ -With a Barracks, each new land unit built in a city will\ +With a Barracks, each new military land unit built in a city will\ automatically have Veteran status, which means that its attack and\ defense strengths are increased by 50%.\ "), _("\ @@ -307,7 +307,7 @@ sound = "b_barracks_iii" sound_alt = "b_generic" ; /* xgettext:no-c-format */ helptext = _("\ -With a Barracks, each new land unit built in a city will\ +With a Barracks, each new military land unit built in a city will\ automatically have Veteran status, which means that its attack and\ defense strengths are increased by 50%.\ "), _("\ diff --git a/data/sandbox/effects.ruleset b/data/sandbox/effects.ruleset index 516919cb57..f3a4cd1063 100644 --- a/data/sandbox/effects.ruleset +++ b/data/sandbox/effects.ruleset @@ -1949,124 +1949,64 @@ reqs = "OutputType", "Luxury", "Local" } -[effect_barracks] +[effect_barracks_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_b] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_barracks_hp] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - } - -[effect_barracks_b_hp] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE + { "type", "name", "range", "present" + "Building", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE } -[effect_barracks_ii] +[effect_barracks_ii_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_ii_b] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Barracks II", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_barracks_ii_hp] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Land", "Local", TRUE + { "type", "name", "range", "present" + "Building", "Barracks II", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE } -[effect_barracks_ii_b_hp] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks II", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - } - -[effect_barracks_iii] +[effect_barracks_iii_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "Building", "Barracks III", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_iii_b] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "Building", "Barracks III", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Barracks III", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_barracks_iii_hp] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range" - "Building", "Barracks III", "City" - "UnitClass", "Land", "Local" - } - -[effect_barracks_iii_b_hp] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range" - "Building", "Barracks III", "City" - "UnitClass", "Big Land", "Local" + { "type", "name", "range" + "Building", "Barracks III", "City" + "UnitClassFlag", "Barracks", "Local" } [effect_cathedral] @@ -3881,22 +3821,11 @@ 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 - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_sun_tzus_war_academy_1] -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 - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "Building", "Sun Tzu's War Academy", "Player", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } [effect_sun_tzus_war_academy_culture] diff --git a/data/sandbox/units.ruleset b/data/sandbox/units.ruleset index 3278716e58..2a159eed72 100644 --- a/data/sandbox/units.ruleset +++ b/data/sandbox/units.ruleset @@ -71,6 +71,7 @@ class_flags = _("CanFortify"), ; /* xgettext:no-c-format */ _("Gets a 50% defensive bonus while in cities.") + _("Barracks"), _("Benefits from barracks") } [veteran_system] @@ -167,7 +168,8 @@ min_speed = 1 hp_loss_pct = 0 flags = "TerrainSpeed", "DamageSlows", "CanOccupyCity", "BuildAnywhere", "CollectRansom", "ZOC", "CanFortify", "CanPillage", - "TerrainDefense", "LightWeight", "BorderPolice", "NonNatBombardTgt" + "TerrainDefense", "LightWeight", "BorderPolice", + "NonNatBombardTgt", "Barracks" [unitclass_land_small] ; /* TRANS: Unit class: used adjectivally */ @@ -176,7 +178,7 @@ min_speed = 1 hp_loss_pct = 0 flags = "TerrainSpeed", "DamageSlows", "BuildAnywhere", "CollectRansom", "ZOC", "TerrainDefense", "DoesntOccupyTile", "LightWeight", - "Expellable", "NonNatBombardTgt" + "Expellable", "NonNatBombardTgt", "Barracks" [unitclass_land_big] ; /* TRANS: Unit class: used adjectivally */ @@ -185,7 +187,7 @@ min_speed = 1 hp_loss_pct = 0 flags = "TerrainSpeed", "DamageSlows", "CanOccupyCity", "BuildAnywhere", "CollectRansom","ZOC", "CanFortify", "KillCitizen", "MediumWeight", - "NonNatBombardTgt" + "NonNatBombardTgt", "Barracks" [unitclass_merchant] ; /* TRANS: Unit class: used adjectivally */ -- 2.39.2