mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fixed #274
This commit is contained in:
parent
f4dd78507c
commit
e05c73d6ea
@ -816,9 +816,9 @@ void CGameHandler::newTurn()
|
|||||||
hth.move = h->maxMovePoints(gs->map->getTile(h->getPosition(false)).tertype != TerrainTile::water);
|
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
|
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
|
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);
|
n.heroes.insert(hth);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user