1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Adding zoneMonserStrength: none

This commit is contained in:
Warzyw647
2023-05-03 12:07:00 +02:00
parent 3378a3c740
commit 8ebaa3fd6b
4 changed files with 9 additions and 4 deletions

View File

@@ -409,6 +409,9 @@ CGCreature * ObjectManager::chooseGuard(si32 strength, bool zoneGuard)
//precalculate actual (randomized) monster strength based on this post
//http://forum.vcmi.eu/viewtopic.php?p=12426#12426
if(zone.zoneMonsterStrength == EMonsterStrength::ZONE_NONE)
return nullptr; //no guards in this zone
int mapMonsterStrength = map.getMapGenOptions().getMonsterStrength();
int monsterStrength = (zoneGuard ? 0 : zone.zoneMonsterStrength) + mapMonsterStrength - 1; //array index from 0 to 4
static const std::array<int, 5> value1{2500, 1500, 1000, 500, 0};