Armour and its attachements can now alter the fire damage received by setting a value in the <sFireResistance>-tag. This is affected by item status.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8664 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2019-02-10 20:42:39 +00:00
parent 0f558da7e4
commit de8bf8a7d6
14 changed files with 94 additions and 3 deletions
+9
View File
@@ -2138,6 +2138,15 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
}
}
// Flugente: check for fire resistance
if ( pExplosive->ubType == EXPLOSV_BURNABLEGAS )
{
INT16 fireresistance = ArmourVersusFirePercent( pSoldier );
sWoundAmt = max( 0, sWoundAmt * ( 100 - fireresistance ) / 100 );
sBreathAmt = max( 0, sBreathAmt * ( 100 - fireresistance ) / 100 );
}
// a gas effect, take damage directly...
pSoldier->SoldierTakeDamage( ANIM_STAND, sWoundAmt, sBreathAmt, TAKE_DAMAGE_GAS, NOBODY, NOWHERE, 0, TRUE );