1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

- Fixed days without castle counter

- Fixed 'you have only 0 days...' message
- Checks victory/loss conditions every player turn instead of every day
- Fixed mantis #1463
This commit is contained in:
beegee1
2013-12-06 19:44:11 +00:00
parent 6427827b33
commit 2d095cf20a
8 changed files with 54 additions and 54 deletions

View File

@ -2438,8 +2438,10 @@ EVictoryLossCheckResult CGameState::checkForLoss( PlayerColor player ) const
}
}
if(!p->towns.size() && p->daysWithoutCastle >= 7)
if(p->towns.empty() && p->daysWithoutCastle && *p->daysWithoutCastle >= 6 && currentPlayer != player)
{
return EVictoryLossCheckResult::LOSS_STANDARD_TOWNS_AND_TIME_OVER;
}
return EVictoryLossCheckResult::NO_VICTORY_OR_LOSS;
}
@ -2752,7 +2754,7 @@ void CGPath::convert( ui8 mode )
PlayerState::PlayerState()
: color(-1), currentSelection(0xffffffff), enteredWinningCheatCode(0),
enteredLosingCheatCode(0), status(EPlayerStatus::INGAME), daysWithoutCastle(0)
enteredLosingCheatCode(0), status(EPlayerStatus::INGAME)
{
setNodeType(PLAYER);
}