From e9e48b8d3370db7a0effe5d676e0e6ed81b8dd23 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 13 Nov 2021 09:30:59 +0200 Subject: [PATCH 25/25] Rename "Firepower1" combat bonus as "LowFirepower" This prepares us to having the actual firepower value being something else than 1. See osdn #43075 Signed-off-by: Marko Lindqvist --- ai/default/aiunit.c | 2 +- client/helpdata.c | 2 +- common/combat.c | 2 +- common/unittype.h | 4 ++-- data/civ2/units.ruleset | 4 ++-- data/classic/units.ruleset | 4 ++-- data/goldkeep/units.ruleset | 4 ++-- data/multiplayer/units.ruleset | 4 ++-- data/webperimental/units.ruleset | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ai/default/aiunit.c b/ai/default/aiunit.c index 4545843769..b5d94fa703 100644 --- a/ai/default/aiunit.c +++ b/ai/default/aiunit.c @@ -3120,7 +3120,7 @@ void dai_units_ruleset_init(struct ai_type *ait) /* Confirm firepower */ combat_bonus_list_iterate(punittype->bonuses, pbonus) { - if (pbonus->type == CBONUS_FIREPOWER1) { + if (pbonus->type == CBONUS_LOW_FIREPOWER) { unit_type_iterate(penemy) { if (utype_has_flag(penemy, pbonus->flag)) { struct unit_type_ai *utai = utype_ai_data(penemy, ait); diff --git a/client/helpdata.c b/client/helpdata.c index 40a2624e54..57164b0e23 100644 --- a/client/helpdata.c +++ b/client/helpdata.c @@ -1875,7 +1875,7 @@ char *helptext_unit(char *buf, size_t bufsz, struct player *pplayer, cbonus->value + 1, astr_build_or_list(&list, against, targets)); break; - case CBONUS_FIREPOWER1: + case CBONUS_LOW_FIREPOWER: cat_snprintf(buf, bufsz, /* TRANS: or-list of unit types */ _("%s Reduces target's firepower to 1 when " diff --git a/common/combat.c b/common/combat.c index ee2403e86c..18a2439626 100644 --- a/common/combat.c +++ b/common/combat.c @@ -446,7 +446,7 @@ void get_modified_firepower(const struct unit *attacker, */ if (combat_bonus_against(unit_type_get(attacker)->bonuses, unit_type_get(defender), - CBONUS_FIREPOWER1)) { + CBONUS_LOW_FIREPOWER)) { *def_fp = 1; } diff --git a/common/unittype.h b/common/unittype.h index 213a0534ac..a7332b46b2 100644 --- a/common/unittype.h +++ b/common/unittype.h @@ -428,8 +428,8 @@ BV_DEFINE(bv_unit_type_roles, L_MAX); #define SPECENUM_VALUE0NAME "DefenseMultiplier" #define SPECENUM_VALUE1 CBONUS_DEFENSE_DIVIDER #define SPECENUM_VALUE1NAME "DefenseDivider" -#define SPECENUM_VALUE2 CBONUS_FIREPOWER1 -#define SPECENUM_VALUE2NAME "Firepower1" +#define SPECENUM_VALUE2 CBONUS_LOW_FIREPOWER +#define SPECENUM_VALUE2NAME "LowFirepower" #define SPECENUM_VALUE3 CBONUS_DEFENSE_MULTIPLIER_PCT #define SPECENUM_VALUE3NAME "DefenseMultiplierPct" #define SPECENUM_VALUE4 CBONUS_DEFENSE_DIVIDER_PCT diff --git a/data/civ2/units.ruleset b/data/civ2/units.ruleset index 0262c2b515..0755dbd210 100644 --- a/data/civ2/units.ruleset +++ b/data/civ2/units.ruleset @@ -1285,7 +1285,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value", "quiet" "Helicopter", "DefenseDivider", 1, FALSE - "Helicopter", "Firepower1", 1, FALSE + "Helicopter", "LowFirepower", 1, FALSE "Fighter", "CityDefensePct", 100 "Bomber", "CityDefensePct", 300 } @@ -1394,7 +1394,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 "Fighter", "CityDefensePct", 100 "Bomber", "CityDefensePct", 300 } diff --git a/data/classic/units.ruleset b/data/classic/units.ruleset index 69af7f5493..7d68c11612 100644 --- a/data/classic/units.ruleset +++ b/data/classic/units.ruleset @@ -1329,7 +1329,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 "Bomber", "DefenseMultiplier", 1 } flags = "AirAttacker" @@ -1437,7 +1437,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 "Bomber", "DefenseMultiplier", 1 } vision_layer = "Stealth" diff --git a/data/goldkeep/units.ruleset b/data/goldkeep/units.ruleset index 8dac6639fd..3380dc0388 100644 --- a/data/goldkeep/units.ruleset +++ b/data/goldkeep/units.ruleset @@ -1352,7 +1352,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 "Bomber", "DefenseMultiplier", 1 } flags = "AirAttacker", "Shield2Gold" @@ -1461,7 +1461,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 "Bomber", "DefenseMultiplier", 1 } vision_layer = "Stealth" diff --git a/data/multiplayer/units.ruleset b/data/multiplayer/units.ruleset index a161ca3e85..10ceb4247a 100644 --- a/data/multiplayer/units.ruleset +++ b/data/multiplayer/units.ruleset @@ -1429,7 +1429,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 "Bomber", "DefenseMultiplier", 1 } flags = "AirAttacker" @@ -1536,7 +1536,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 "Bomber", "DefenseMultiplier", 1 } vision_layer = "Stealth" diff --git a/data/webperimental/units.ruleset b/data/webperimental/units.ruleset index d1f49f3d64..fd039740d5 100644 --- a/data/webperimental/units.ruleset +++ b/data/webperimental/units.ruleset @@ -1337,7 +1337,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 } flags = "AirAttacker", "MediumWeight" roles = "" @@ -1450,7 +1450,7 @@ targets = "Air", "Missile" bonuses = { "flag", "type", "value" "Helicopter", "DefenseDivider", 1 - "Helicopter", "Firepower1", 1 + "Helicopter", "LowFirepower", 1 } vision_layer = "Stealth" flags = "AirAttacker", "MediumWeight" -- 2.33.0