mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
battlefields in VLC and custom bonuses for terrain patches
This commit is contained in:
@ -246,8 +246,18 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
|
||||
|
||||
if(waterContent == EWaterContent::RANDOM)
|
||||
{
|
||||
waterContent = *RandomGeneratorUtil::nextItem(mapTemplate->getWaterContentAllowed(), rand);
|
||||
auto allowedContent = mapTemplate->getWaterContentAllowed();
|
||||
|
||||
if(allowedContent.size())
|
||||
{
|
||||
waterContent = *RandomGeneratorUtil::nextItem(mapTemplate->getWaterContentAllowed(), rand);
|
||||
}
|
||||
else
|
||||
{
|
||||
waterContent = EWaterContent::NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if(monsterStrength == EMonsterStrength::RANDOM)
|
||||
{
|
||||
monsterStrength = static_cast<EMonsterStrength::EMonsterStrength>(rand.nextInt(EMonsterStrength::GLOBAL_WEAK, EMonsterStrength::GLOBAL_STRONG));
|
||||
|
Reference in New Issue
Block a user