From 79985325cba5d3f8dc0cfb540aa25665e35725ca Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 30 Nov 2021 16:24:33 +0200 Subject: [PATCH 33/33] Finish "FirePower1" to "LowFirepower" rename Some of the documentation still referred to LowFirepower combat bonus by its old name, as well as a variable name in AI code. These had been missed because of their different capitalization. This also fixes that issue as they end with standard capitalization of "LowFirepower" bonus. See osdn #43297 Signed-off-by: Marko Lindqvist --- ai/default/aiunit.c | 4 ++-- ai/default/aiunit.h | 2 +- ai/default/daimilitary.c | 2 +- data/alien/units.ruleset | 2 +- data/civ1/units.ruleset | 2 +- data/civ2/units.ruleset | 2 +- data/civ2civ3/units.ruleset | 2 +- data/classic/units.ruleset | 2 +- data/goldkeep/units.ruleset | 2 +- data/granularity/units.ruleset | 2 +- data/helpdata.txt | 2 +- data/multiplayer/units.ruleset | 2 +- data/ruledit/comments-3.2.txt | 2 +- data/sandbox/units.ruleset | 2 +- data/stub/units.ruleset | 2 +- data/webperimental/units.ruleset | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ai/default/aiunit.c b/ai/default/aiunit.c index acb8d7499d..132fb36220 100644 --- a/ai/default/aiunit.c +++ b/ai/default/aiunit.c @@ -3162,7 +3162,7 @@ void dai_units_ruleset_init(struct ai_type *ait) unit_type_iterate(ptype) { struct unit_type_ai *utai = fc_malloc(sizeof(*utai)); - utai->firepower1 = FALSE; + utai->low_firepower = FALSE; utai->ferry = FALSE; utai->missile_platform = FALSE; utai->carries_occupiers = FALSE; @@ -3181,7 +3181,7 @@ void dai_units_ruleset_init(struct ai_type *ait) if (utype_has_flag(penemy, pbonus->flag)) { struct unit_type_ai *utai = utype_ai_data(penemy, ait); - utai->firepower1 = TRUE; + utai->low_firepower = TRUE; } } unit_type_iterate_end; } diff --git a/ai/default/aiunit.h b/ai/default/aiunit.h index eb102dfba1..ef79014957 100644 --- a/ai/default/aiunit.h +++ b/ai/default/aiunit.h @@ -47,7 +47,7 @@ struct unit_ai { struct unit_type_ai { - bool firepower1; + bool low_firepower; bool ferry; bool missile_platform; bool carries_occupiers; diff --git a/ai/default/daimilitary.c b/ai/default/daimilitary.c index 30accc3eb5..c2004250d7 100644 --- a/ai/default/daimilitary.c +++ b/ai/default/daimilitary.c @@ -756,7 +756,7 @@ int dai_unit_defence_desirability(struct ai_type *ait, /* Sea and helicopters often have their firepower set to 1 when * defending. We can't have such units as defenders. */ if (!utype_has_flag(punittype, UTYF_BADCITYDEFENDER) - && !((struct unit_type_ai *)utype_ai_data(punittype, ait))->firepower1) { + && !((struct unit_type_ai *)utype_ai_data(punittype, ait))->low_firepower) { /* Sea units get 1 firepower in Pearl Harbour, * and helicopters very bad against fighters */ desire *= punittype->firepower; diff --git a/data/alien/units.ruleset b/data/alien/units.ruleset index 142ecb1f8f..df493352e6 100644 --- a/data/alien/units.ruleset +++ b/data/alien/units.ruleset @@ -294,7 +294,7 @@ flags = "Missile", "DoesntOccupyTile" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/civ1/units.ruleset b/data/civ1/units.ruleset index 9e03496f3a..74aa2413bb 100644 --- a/data/civ1/units.ruleset +++ b/data/civ1/units.ruleset @@ -270,7 +270,7 @@ flags = "Missile", "Unreachable", "HutNothing" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/civ2/units.ruleset b/data/civ2/units.ruleset index 0755dbd210..b59226ed9d 100644 --- a/data/civ2/units.ruleset +++ b/data/civ2/units.ruleset @@ -288,7 +288,7 @@ flags = "Unreachable", "DoesntOccupyTile", "HutFrighten" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/civ2civ3/units.ruleset b/data/civ2civ3/units.ruleset index b0f4d0e532..488faa26b5 100644 --- a/data/civ2civ3/units.ruleset +++ b/data/civ2civ3/units.ruleset @@ -326,7 +326,7 @@ flags = "Unreachable", "DoesntOccupyTile", "CanPillage", ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/classic/units.ruleset b/data/classic/units.ruleset index 7d68c11612..571b2ac86e 100644 --- a/data/classic/units.ruleset +++ b/data/classic/units.ruleset @@ -301,7 +301,7 @@ flags = "Unreachable", "DoesntOccupyTile", "HutFrighten" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/goldkeep/units.ruleset b/data/goldkeep/units.ruleset index 3380dc0388..13ba4dc3cc 100644 --- a/data/goldkeep/units.ruleset +++ b/data/goldkeep/units.ruleset @@ -313,7 +313,7 @@ flags = "Unreachable", "DoesntOccupyTile", "HutFrighten" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/granularity/units.ruleset b/data/granularity/units.ruleset index 4f1cbe0c2a..d9686c86d5 100644 --- a/data/granularity/units.ruleset +++ b/data/granularity/units.ruleset @@ -239,7 +239,7 @@ flags = "TerrainSpeed" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/helpdata.txt b/data/helpdata.txt index 45a8219c82..2c2fe15c30 100644 --- a/data/helpdata.txt +++ b/data/helpdata.txt @@ -1217,7 +1217,7 @@ _("\ - If the defender is a ship and is inside a city the firepower of \ the attacker is doubled and the firepower of the ship is set to 1.\ "), -; "FirePower1" combat bonus +; "LowFirepower" combat bonus _("\ - If a fighter is attacking a helicopter the firepower of the \ helicopter is set to 1.\ diff --git a/data/multiplayer/units.ruleset b/data/multiplayer/units.ruleset index 10ceb4247a..c680c24c10 100644 --- a/data/multiplayer/units.ruleset +++ b/data/multiplayer/units.ruleset @@ -301,7 +301,7 @@ flags = "Unreachable", "DoesntOccupyTile", "HutFrighten" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/ruledit/comments-3.2.txt b/data/ruledit/comments-3.2.txt index 29e9df82b1..d69127a33c 100644 --- a/data/ruledit/comments-3.2.txt +++ b/data/ruledit/comments-3.2.txt @@ -417,7 +417,7 @@ utypes = "\ ; multiplication with 2/3, etc.\n\ ; Effectively increases *attack* by value percent.\n\ ; Bonus is defined in attackers entry.\n\ -; \"FirePower1\" = Defender firepower is reduced to value 1 when\n\ +; \"LowFirepower\" = Defender firepower is reduced to value 1 when\n\ ; ever this has non-zero value.\n\ ; Bonus is defined in attackers entry.\n\ ; \"CityDefensePct\" = In a city, instead of \"Defend_Bonus\" effect\n\ diff --git a/data/sandbox/units.ruleset b/data/sandbox/units.ruleset index 8a5e38ea40..9c4395b45e 100644 --- a/data/sandbox/units.ruleset +++ b/data/sandbox/units.ruleset @@ -341,7 +341,7 @@ flags = "Unreachable", "DoesntOccupyTile", "CanPillage", ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/stub/units.ruleset b/data/stub/units.ruleset index 812de9673c..aa0f8b28d6 100644 --- a/data/stub/units.ruleset +++ b/data/stub/units.ruleset @@ -223,7 +223,7 @@ flags = "" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect diff --git a/data/webperimental/units.ruleset b/data/webperimental/units.ruleset index fd039740d5..fec175dccb 100644 --- a/data/webperimental/units.ruleset +++ b/data/webperimental/units.ruleset @@ -305,7 +305,7 @@ flags = "Unreachable", "DoesntOccupyTile", "HutFrighten" ; multiplication with 2/3, etc. ; Effectively increases *attack* by value percent. ; Bonus is defined in attackers entry. -; "FirePower1" = Defender firepower is reduced to value 1 when +; "LowFirepower" = Defender firepower is reduced to value 1 when ; ever this has non-zero value. ; Bonus is defined in attackers entry. ; "CityDefensePct" = In a city, instead of "Defend_Bonus" effect -- 2.33.0