1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

#3824 - fix empty army with only commander issues

This commit is contained in:
Andrii Danylchenko
2024-04-26 23:18:20 +03:00
parent 0fc17da164
commit 6e641dbdea
7 changed files with 41 additions and 5 deletions

View File

@ -145,6 +145,12 @@ ui64 FuzzyHelper::evaluateDanger(const CGObjectInstance * obj)
return danger;
}
case Obj::HERO:
{
const CGHeroInstance * hero = dynamic_cast<const CGHeroInstance *>(obj);
return getHeroArmyStrengthWithCommander(hero, hero);
}
case Obj::ARTIFACT:
case Obj::RESOURCE:
{
@ -153,7 +159,6 @@ ui64 FuzzyHelper::evaluateDanger(const CGObjectInstance * obj)
[[fallthrough]];
}
case Obj::MONSTER:
case Obj::HERO:
case Obj::GARRISON:
case Obj::GARRISON2:
case Obj::CREATURE_GENERATOR1: