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

Split enum EMonsterStrength into EMonsterStrength and EZoneMonsterStrength.

Removed obsolete ZONE_ and GLOBAL_ from enum item names.
Simplified serialization of zone monster strength in preparation for adding zone monster strength: none.
This commit is contained in:
Warzyw647
2023-05-04 21:43:31 +02:00
parent 9373239c03
commit 7f180b6e81
7 changed files with 32 additions and 36 deletions

View File

@@ -310,11 +310,11 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
if(monsterStrength == EMonsterStrength::RANDOM)
{
monsterStrength = static_cast<EMonsterStrength::EMonsterStrength>(rand.nextInt(EMonsterStrength::GLOBAL_WEAK, EMonsterStrength::GLOBAL_STRONG));
monsterStrength = static_cast<EMonsterStrength::EMonsterStrength>(rand.nextInt(EMonsterStrength::WEAK, EMonsterStrength::STRONG));
}
assert (vstd::iswithin(waterContent, EWaterContent::NONE, EWaterContent::ISLANDS));
assert (vstd::iswithin(monsterStrength, EMonsterStrength::GLOBAL_WEAK, EMonsterStrength::GLOBAL_STRONG));
assert (vstd::iswithin(monsterStrength, EMonsterStrength::WEAK, EMonsterStrength::STRONG));
//rectangular maps are the future of gaming