1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
This commit is contained in:
DjWarmonger 2009-12-24 06:48:45 +00:00
parent f4dd78507c
commit e05c73d6ea

View File

@ -816,9 +816,9 @@ void CGameHandler::newTurn()
hth.move = h->maxMovePoints(gs->map->getTile(h->getPosition(false)).tertype != TerrainTile::water);
if(h->visitedTown && vstd::contains(h->visitedTown->builtBuildings,0)) //if hero starts turn in town with mage guild
hth.mana = h->manaLimit(); //restore all mana
hth.mana = std::max(h->mana, h->manaLimit()); //restore all mana
else
hth.mana = std::max(si32(0), std::min(h->mana + h->manaRegain(), h->manaLimit()) );
hth.mana = std::max(si32(0), std::max(h->mana, std::min(h->mana + h->manaRegain(), h->manaLimit())) );
n.heroes.insert(hth);