1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

vcmi: fix scouting bonus spelling error

With fallback for old mods.
This commit is contained in:
Konstantin 2023-02-19 14:40:28 +03:00
parent f264c541fb
commit 5d4bcb3c78
5 changed files with 9 additions and 6 deletions

View File

@ -810,7 +810,7 @@
{
"bonuses" : [
{
"type" : "SIGHT_RADIOUS",
"type" : "SIGHT_RADIUS",
"val" : 1,
"valueType" : "BASE_NUMBER"
}
@ -822,7 +822,7 @@
{
"bonuses" : [
{
"type" : "SIGHT_RADIOUS",
"type" : "SIGHT_RADIUS",
"val" : 1,
"valueType" : "BASE_NUMBER"
}

View File

@ -84,7 +84,7 @@
"base" : {
"effects" : {
"main" : {
"type" : "SIGHT_RADIOUS",
"type" : "SIGHT_RADIUS",
"valueType" : "BASE_NUMBER"
}
}

View File

@ -32,7 +32,10 @@ VCMI_LIB_NAMESPACE_BEGIN
#define FOREACH_RED_CHILD(pname) TNodes lchildren; getRedChildren(lchildren); for(CBonusSystemNode *pname : lchildren)
#define BONUS_NAME(x) { #x, Bonus::x },
const std::map<std::string, Bonus::BonusType> bonusNameMap = { BONUS_LIST };
const std::map<std::string, Bonus::BonusType> bonusNameMap = {
BONUS_LIST
{"SIGHT_RADIOUS", Bonus::SIGHT_RADIUS} /*the correct word is RADIUS, but this one's already used in mods. Deprecated. */
};
#undef BONUS_NAME
#define BONUS_VALUE(x) { #x, Bonus::x },

View File

@ -177,7 +177,7 @@ public:
BONUS_NAME(MORALE) \
BONUS_NAME(LUCK) \
BONUS_NAME(PRIMARY_SKILL) /*uses subtype to pick skill; additional info if set: 1 - only melee, 2 - only distance*/ \
BONUS_NAME(SIGHT_RADIOUS) /*the correct word is RADIUS, but this one's already used in mods */\
BONUS_NAME(SIGHT_RADIUS) \
BONUS_NAME(MANA_REGENERATION) /*points per turn apart from normal (1 + mysticism)*/ \
BONUS_NAME(FULL_MANA_REGENERATION) /*all mana points are replenished every day*/ \
BONUS_NAME(NONEVIL_ALIGNMENT_MIX) /*good and neutral creatures can be mixed without morale penalty*/ \

View File

@ -895,7 +895,7 @@ int3 CGHeroInstance::getSightCenter() const
int CGHeroInstance::getSightRadius() const
{
return 5 + valOfBonuses(Bonus::SIGHT_RADIOUS); // scouting gives SIGHT_RADIUS bonus
return 5 + valOfBonuses(Bonus::SIGHT_RADIUS); // scouting gives SIGHT_RADIUS bonus
}
si32 CGHeroInstance::manaRegain() const