1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Yog will now only get Attack or Defence on leveling up

This commit is contained in:
Ivan Savenko
2024-01-31 00:18:10 +02:00
parent a9866bb5c6
commit ccea7fc1fb
2 changed files with 11 additions and 21 deletions

View File

@ -282,12 +282,12 @@ CHeroClass * CHeroClassHandler::loadFromJson(const std::string & scope, const Js
fillPrimarySkillData(node, heroClass, PrimarySkill::KNOWLEDGE);
auto percentSumm = std::accumulate(heroClass->primarySkillLowLevel.begin(), heroClass->primarySkillLowLevel.end(), 0);
if(percentSumm != 100)
logMod->error("Hero class %s has wrong lowLevelChance values: summ should be 100, but %d instead", heroClass->identifier, percentSumm);
if(percentSumm <= 0)
logMod->error("Hero class %s has wrong lowLevelChance values: must be above zero!", heroClass->identifier, percentSumm);
percentSumm = std::accumulate(heroClass->primarySkillHighLevel.begin(), heroClass->primarySkillHighLevel.end(), 0);
if(percentSumm != 100)
logMod->error("Hero class %s has wrong highLevelChance values: summ should be 100, but %d instead", heroClass->identifier, percentSumm);
if(percentSumm <= 0)
logMod->error("Hero class %s has wrong highLevelChance values: must be above zero!", heroClass->identifier, percentSumm);
for(auto skillPair : node["secondarySkills"].Struct())
{