From 1c0e1702ba3c7c65f56655eb17532c40b68bf9dd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 1 Apr 2023 17:42:55 +0300 Subject: [PATCH 18/26] 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 | 61 ++++++++------------------------- data/civ2civ3/units.ruleset | 10 +++--- data/sandbox/buildings.ruleset | 6 ++-- data/sandbox/effects.ruleset | 61 ++++++++------------------------- data/sandbox/units.ruleset | 10 +++--- 6 files changed, 48 insertions(+), 106 deletions(-) diff --git a/data/civ2civ3/buildings.ruleset b/data/civ2civ3/buildings.ruleset index 129600c001..ced944c824 100644 --- a/data/civ2civ3/buildings.ruleset +++ b/data/civ2civ3/buildings.ruleset @@ -263,7 +263,7 @@ sound_alt = "b_generic" flags = "Barracks" ; /* 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%.\ "), _("\ @@ -293,7 +293,7 @@ sound_alt = "b_generic" flags = "Barracks" ; /* 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%.\ "), _("\ @@ -321,7 +321,7 @@ sound_alt = "b_generic" flags = "Barracks" ; /* 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 5e511e1326..d41c610a07 100644 --- a/data/civ2civ3/effects.ruleset +++ b/data/civ2civ3/effects.ruleset @@ -1848,44 +1848,24 @@ reqs = "OutputType", "Luxury", "Local" } -[effect_barracks_land] +[effect_barracks_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "BuildingFlag", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } -[effect_barracks_bland] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_regen_land] +[effect_barracks_regen] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - } - -[effect_barracks_regen_bland] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE + { "type", "name", "range", "present" + "BuildingFlag", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE } [effect_cathedral] @@ -3721,22 +3701,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 81bb6804cf..64ce8255d0 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 */ @@ -184,7 +186,7 @@ min_speed = 1 hp_loss_pct = 0 flags = "BuildAnywhere", "DoesntOccupyTile", "ZOC", "TerrainDefense", "TerrainSpeed", "Airliftable", - "NonNatBombardTgt" + "NonNatBombardTgt", "Barracks" [unitclass_sea] ; /* TRANS: Unit class: used adjectivally */ diff --git a/data/sandbox/buildings.ruleset b/data/sandbox/buildings.ruleset index 43171c233b..15550b9277 100644 --- a/data/sandbox/buildings.ruleset +++ b/data/sandbox/buildings.ruleset @@ -266,7 +266,7 @@ sound_alt = "b_generic" flags = "Barracks" ; /* 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%.\ "), _("\ @@ -296,7 +296,7 @@ sound_alt = "b_generic" flags = "Barracks" ; /* 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%.\ "), _("\ @@ -324,7 +324,7 @@ sound_alt = "b_generic" flags = "Barracks" ; /* 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 b33cfdd1b9..b22141910c 100644 --- a/data/sandbox/effects.ruleset +++ b/data/sandbox/effects.ruleset @@ -1964,44 +1964,24 @@ reqs = "OutputType", "Luxury", "Local" } -[effect_barracks_land] +[effect_barracks_veteran] type = "Veteran_Build" value = 1 reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE + { "type", "name", "range", "present" + "BuildingFlag", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE + "UnitFlag", "NonMil", "Local", FALSE + "UnitFlag", "NoVeteran", "Local", FALSE } -[effect_barracks_bland] -type = "Veteran_Build" -value = 1 -reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE - "UnitFlag", "NonMil", "Local", FALSE - "UnitFlag", "NoVeteran", "Local", FALSE - } - -[effect_barracks_regen_land] +[effect_barracks_regen] type = "HP_Regen" value = 100 reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Land", "Local", TRUE - } - -[effect_barracks_regen_bland] -type = "HP_Regen" -value = 100 -reqs = - { "type", "name", "range", "present" - "BuildingFlag", "Barracks", "City", TRUE - "UnitClass", "Big Land", "Local", TRUE + { "type", "name", "range", "present" + "BuildingFlag", "Barracks", "City", TRUE + "UnitClassFlag", "Barracks", "Local", TRUE } [effect_cathedral] @@ -3851,22 +3831,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 04eba27b75..8df8061fb7 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 */ @@ -194,7 +196,7 @@ min_speed = 1 hp_loss_pct = 0 flags = "BuildAnywhere", "DoesntOccupyTile", "ZOC", "TerrainDefense", "TerrainSpeed", "MediumWeight", - "Expellable", "NonNatBombardTgt" + "Expellable", "NonNatBombardTgt", "Barracks" [unitclass_sea] ; /* TRANS: Unit class: used adjectivally */ -- 2.39.2