From ef4e199f15c5835c4ee66d32ae4d6d1da1580a59 Mon Sep 17 00:00:00 2001 From: DjWarmonger Date: Sun, 22 Feb 2015 20:54:09 +0100 Subject: [PATCH] Implemented "Quantity does not grow" for monsters (#2094) --- lib/mapObjects/MiscObjects.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/mapObjects/MiscObjects.cpp b/lib/mapObjects/MiscObjects.cpp index 09c268532..477d7978a 100644 --- a/lib/mapObjects/MiscObjects.cpp +++ b/lib/mapObjects/MiscObjects.cpp @@ -207,11 +207,14 @@ void CGCreature::initObj() void CGCreature::newTurn() const {//Works only for stacks of single type of size up to 2 millions - if (stacks.begin()->second->count < VLC->modh->settings.CREEP_SIZE && cb->getDate(Date::DAY_OF_WEEK) == 1 && cb->getDate(Date::DAY) > 1) + if (!notGrowingTeam) { - ui32 power = temppower * (100 + VLC->modh->settings.WEEKLY_GROWTH)/100; - cb->setObjProperty(id, ObjProperty::MONSTER_COUNT, std::min (power/1000 , (ui32)VLC->modh->settings.CREEP_SIZE)); //set new amount - cb->setObjProperty(id, ObjProperty::MONSTER_POWER, power); //increase temppower + if (stacks.begin()->second->count < VLC->modh->settings.CREEP_SIZE && cb->getDate(Date::DAY_OF_WEEK) == 1 && cb->getDate(Date::DAY) > 1) + { + ui32 power = temppower * (100 + VLC->modh->settings.WEEKLY_GROWTH) / 100; + cb->setObjProperty(id, ObjProperty::MONSTER_COUNT, std::min(power / 1000, (ui32)VLC->modh->settings.CREEP_SIZE)); //set new amount + cb->setObjProperty(id, ObjProperty::MONSTER_POWER, power); //increase temppower + } } if (VLC->modh->modules.STACK_EXP) cb->setObjProperty(id, ObjProperty::MONSTER_EXP, VLC->modh->settings.NEUTRAL_STACK_EXP); //for testing purpose