1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

- Corrected guard types

- Corrected town positions
This commit is contained in:
DjWarmonger 2014-06-03 08:57:20 +02:00
parent 9972d233a6
commit 6221f4ac2c
2 changed files with 6 additions and 2 deletions

View File

@ -222,6 +222,10 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
{
monsterStrength = static_cast<EMonsterStrength::EMonsterStrength>(rand.nextInt(EMonsterStrength::LAST_ITEM));
}
//rectangular maps are the future of gaming
//setHeight(20);
//setWidth(50);
}
void CMapGenOptions::updatePlayers()

View File

@ -410,7 +410,7 @@ void CRmgTemplateZone::addMonster(CMapGenerator* gen, int3 &pos, si32 strength)
creId = VLC->creh->pickRandomMonster(gen->rand);
auto cre = VLC->creh->creatures[creId];
amount = std::ceil((float)strength / cre->fightValue);
if (amount >= cre->ammMin && amount <= 100)
if (strength >= cre->fightValue && amount >= cre->ammMin && amount <= 100) //at leats one full monster. size between minimum size of given stack and 100
break;
}
@ -448,7 +448,7 @@ bool CRmgTemplateZone::fill(CMapGenerator* gen)
town->builtBuildings.insert(BuildingID::FORT);
town->builtBuildings.insert(BuildingID::DEFAULT);
placeObject(gen, town, getPos());
placeObject(gen, town, getPos() + town->getVisitableOffset()); //towns are big objects and should be centered around visitable position
logGlobal->traceStream() << "Placed object";
logGlobal->traceStream() << "Fill player info " << player_id;