Fix: pows received wrong poison values. Those values were inconsistent and caused odd displays.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6528 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-10-24 19:52:15 +00:00
parent 30980e91fb
commit c5e72c4265
3 changed files with 16 additions and 4 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ enum{
MOVEITEM_MENU_1 = 0,
MOVEITEM_MENU_2,
MOVEITEM_MENU_3,
MOVEITEM_MENU_4, // WANNE: Allow up to 6 vehicles
MOVEITEM_MENU_4,
MOVEITEM_MENU_5,
MOVEITEM_MENU_6,
MOVEITEM_MENU_7,
+10 -3
View File
@@ -2255,11 +2255,18 @@ void EnemyCapturesPlayerSoldier( SOLDIERTYPE *pSoldier )
}
// adjust poison points
INT8 lifechanged = oldlife - pSoldier->stats.bLife;
INT8 lifechanged = pSoldier->stats.bLife - oldlife;
if ( lifechanged < 0 )
pSoldier->bPoisonLife = max(0, pSoldier->bPoisonLife - lifechanged);
{
// add a bit of poisoning...
pSoldier->bPoisonSum = min(pSoldier->bPoisonSum + 10, pSoldier->stats.bLifeMax);
pSoldier->bPoisonLife = min(pSoldier->bPoisonSum, pSoldier->stats.bLife);
}
else if ( lifechanged > 0)
pSoldier->bPoisonLife = max(pSoldier->bPoisonSum, pSoldier->bPoisonLife + lifechanged);
{
pSoldier->bPoisonLife = min(pSoldier->bPoisonSum, pSoldier->stats.bLife);
}
// SANDRO - make the lost life insta-healable
pSoldier->iHealableInjury = ((pSoldier->stats.bLifeMax - pSoldier->stats.bLife) * 100);
+5
View File
@@ -16888,6 +16888,11 @@ void SOLDIERTYPE::SoldierPropertyUpkeep()
if ( HasBackgroundFlag( BACKGROUND_EXP_UNDERGROUND ) && this->bSectorZ )
++bExtraExpLevel;
// Flugente: as pows received faulty poison values, we apply a very simple fix:
// remove in a few revisions - the code has already been fixed, so this won't be necessary anymore soon^^
this->bPoisonLife = min(this->bPoisonLife, this->bPoisonSum );
this->bPoisonBleeding = min(this->bPoisonBleeding, this->bBleeding);
}
INT32 CheckBleeding( SOLDIERTYPE *pSoldier )