mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Implemented "Quantity does not grow" for monsters (#2094)
This commit is contained in:
parent
8d1f884d94
commit
ef4e199f15
@ -207,12 +207,15 @@ void CGCreature::initObj()
|
|||||||
|
|
||||||
void CGCreature::newTurn() const
|
void CGCreature::newTurn() const
|
||||||
{//Works only for stacks of single type of size up to 2 millions
|
{//Works only for stacks of single type of size up to 2 millions
|
||||||
|
if (!notGrowingTeam)
|
||||||
|
{
|
||||||
if (stacks.begin()->second->count < VLC->modh->settings.CREEP_SIZE && cb->getDate(Date::DAY_OF_WEEK) == 1 && cb->getDate(Date::DAY) > 1)
|
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;
|
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_COUNT, std::min(power / 1000, (ui32)VLC->modh->settings.CREEP_SIZE)); //set new amount
|
||||||
cb->setObjProperty(id, ObjProperty::MONSTER_POWER, power); //increase temppower
|
cb->setObjProperty(id, ObjProperty::MONSTER_POWER, power); //increase temppower
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (VLC->modh->modules.STACK_EXP)
|
if (VLC->modh->modules.STACK_EXP)
|
||||||
cb->setObjProperty(id, ObjProperty::MONSTER_EXP, VLC->modh->settings.NEUTRAL_STACK_EXP); //for testing purpose
|
cb->setObjProperty(id, ObjProperty::MONSTER_EXP, VLC->modh->settings.NEUTRAL_STACK_EXP); //for testing purpose
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user