1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

- Fixed guard generation

- Added Jebus template for comparison
This commit is contained in:
DjWarmonger
2014-06-08 08:42:29 +02:00
parent fed2821a94
commit c82bfd0f3e
2 changed files with 63 additions and 4 deletions

View File

@ -442,15 +442,16 @@ bool CRmgTemplateZone::addMonster(CMapGenerator* gen, int3 &pos, si32 strength)
continue;
if ((cre->AIValue * (cre->ammMin + cre->ammMax) / 2 < strength) && (strength < cre->AIValue * 100)) //at least one full monster. size between minimum size of given stack and 100
{
amount = strength / cre->AIValue;
if (amount >= 4)
amount *= gen->rand.nextDouble(0.75, 1.25);
possibleCreatures.push_back(cre->idNumber);
}
}
if (possibleCreatures.size())
{
creId = *RandomGeneratorUtil::nextItem(possibleCreatures, gen->rand);
amount = strength / VLC->creh->creatures[creId]->AIValue;
if (amount >= 4)
amount *= gen->rand.nextDouble(0.75, 1.25);
}
else //just pick any available creature
{
creId = CreatureID(132); //Azure Dragon