mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Added "monster strength" info to templates.
This commit is contained in:
@@ -65,6 +65,16 @@ void CJsonRmgTemplateLoader::loadTemplates()
|
||||
zone->setTerrainTypes(parseTerrainTypes(zoneNode["terrainTypes"].Vector(), zone->getDefaultTerrainTypes()));
|
||||
zone->setTownsAreSameType((zoneNode["townsAreSameType"].Bool()));
|
||||
|
||||
const std::string monsterStrength = zoneNode["monsters"].String();
|
||||
if (monsterStrength == "weak")
|
||||
zone->setMonsterStrength(EMonsterStrength::ZONE_WEAK);
|
||||
else if (monsterStrength == "normal")
|
||||
zone->setMonsterStrength(EMonsterStrength::ZONE_NORMAL);
|
||||
else if (monsterStrength == "strong")
|
||||
zone->setMonsterStrength(EMonsterStrength::ZONE_STRONG);
|
||||
else
|
||||
throw (rmgException("incorrect monster power"));
|
||||
|
||||
if (!zoneNode["mines"].isNull())
|
||||
{
|
||||
auto mines = zoneNode["mines"].Struct();
|
||||
|
||||
Reference in New Issue
Block a user