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:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user