1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-19 00:17:56 +02:00

* fixed bugs 66, 74 from VCMI 0.73 bug thread

This commit is contained in:
mateuszb
2009-09-19 09:57:37 +00:00
parent 763571062d
commit bab07c0ab3
3 changed files with 31 additions and 2 deletions

View File

@ -608,9 +608,9 @@ DLL_EXPORT void BattleNextRound::applyGs( CGameState *gs )
s->counterAttacks = 1 + s->valOfFeatures(StackFeature::ADDITIONAL_RETALIATION);
//regeneration
if( s->hasFeatureOfType(StackFeature::HP_REGENERATION) )
if( s->hasFeatureOfType(StackFeature::HP_REGENERATION) && s->alive() )
s->firstHPleft = std::min<ui32>( s->MaxHealth(), s->valOfFeatures(StackFeature::HP_REGENERATION) );
if( s->hasFeatureOfType(StackFeature::FULL_HP_REGENERATION) )
if( s->hasFeatureOfType(StackFeature::FULL_HP_REGENERATION) && s->alive() )
s->firstHPleft = s->MaxHealth();
//remove effects and restore only those with remaining turns in duration