mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
New feature: Covert ops
- you can disguise members of your team as civilians or soldiers and, if careful, avoid detection by the enemy. - For more info, see http://www.bears-pit.com/board/ubbthreads.php/topics/309312/New_feature_Covert_operations.html#Post309312 - GameDir revision >= 1529 is needed for this feature - fixed a bug that could cause inventory items to be treated like armed bombs - bloodcats can now be skinned git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5529 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -387,67 +387,65 @@ void HandleEndTurnDrugAdjustments( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
|
||||
// Flugente: always do the following checks. Thereby, if the effect runs out, our stats will be back to normal
|
||||
// only do the checks for the player team, as soldiers do not have a gMercProfiles
|
||||
if ( pSoldier->bTeam == gbPlayerNum)
|
||||
//////////////// STRENGTH ////////////////
|
||||
pSoldier->bExtraStrength = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_STRENGTH ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_STRENGTH ];
|
||||
|
||||
//////////////// DEXTERITY ////////////////
|
||||
pSoldier->bExtraDexterity = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_DEXTERITY ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_DEXTERITY ];
|
||||
|
||||
//////////////// AGILITY ////////////////
|
||||
pSoldier->bExtraAgility = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_AGILITY ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_AGILITY ];
|
||||
|
||||
//////////////// WISDOM ////////////////
|
||||
pSoldier->bExtraWisdom = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_WISDOM ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_WISDOM ];
|
||||
|
||||
// if our sideeffect count is 1 (which should occur a while AFTER we took the drug), we suddenly become blind for a few turns...
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_BLIND ] == 0 && pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_BLIND ] == 1 )
|
||||
{
|
||||
//////////////// STRENGTH ////////////////
|
||||
pSoldier->bExtraStrength = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_STRENGTH ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_STRENGTH ];
|
||||
pSoldier->bBlindedCounter = 3;
|
||||
}
|
||||
|
||||
//////////////// DEXTERITY ////////////////
|
||||
pSoldier->bExtraDexterity = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_DEXTERITY ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_DEXTERITY ];
|
||||
// if our sideeffect count is 1 (which should occur a while AFTER we took the drug), we get a heart-attack and get knocked out...
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_KNOCKOUT ] == 0 && pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_KNOCKOUT ] == 1 )
|
||||
{
|
||||
// Keel over...
|
||||
DeductPoints( pSoldier, 0, 20000 );
|
||||
}
|
||||
|
||||
//////////////// AGILITY ////////////////
|
||||
pSoldier->bExtraAgility = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_AGILITY ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_AGILITY ];
|
||||
// if we have a life damaging effect, deduct life points
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_LIFEDAMAGE ] == 0 && pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_LIFEDAMAGE ] > 0 )
|
||||
{
|
||||
pSoldier->EVENT_SoldierGotHit( 0, 400, 0, pSoldier->ubDirection, 320, NOBODY , FIRE_WEAPON_NO_SPECIAL, pSoldier->bAimShotLocation, 0, -1 );
|
||||
|
||||
//////////////// WISDOM ////////////////
|
||||
pSoldier->bExtraWisdom = pSoldier->drugs.bDrugEffect[ DRUG_TYPE_WISDOM ] - pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_WISDOM ];
|
||||
|
||||
// if our sideeffect count is 1 (which should occur a while AFTER we took the drug), we suddenly become blind for a few turns...
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_BLIND ] == 0 && pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_BLIND ] == 1 )
|
||||
/*if ( pSoldier->stats.bLife > OKLIFE )
|
||||
{
|
||||
pSoldier->bBlindedCounter = 3;
|
||||
}
|
||||
|
||||
// if our sideeffect count is 1 (which should occur a while AFTER we took the drug), we get a heart-attack and get knocked out...
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_KNOCKOUT ] == 0 && pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_KNOCKOUT ] == 1 )
|
||||
{
|
||||
// Keel over...
|
||||
DeductPoints( pSoldier, 0, 20000 );
|
||||
}
|
||||
|
||||
// if we have a life damaging effect, deduct life points
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_LIFEDAMAGE ] == 0 && pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_LIFEDAMAGE ] > 0 )
|
||||
{
|
||||
if ( pSoldier->stats.bLife > OKLIFE )
|
||||
{
|
||||
INT8 lifepointdamage = pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_LIFEDAMAGE ];
|
||||
INT8 lifepointdamage = pSoldier->drugs.bDrugSideEffect[ DRUG_TYPE_LIFEDAMAGE ];
|
||||
|
||||
INT8 applieddamage = pSoldier->stats.bLife;
|
||||
INT8 applieddamage = pSoldier->stats.bLife;
|
||||
|
||||
pSoldier->stats.bLife = max(OKLIFE - 1, pSoldier->stats.bLife - lifepointdamage);
|
||||
pSoldier->stats.bLife = max(OKLIFE - 8, pSoldier->stats.bLife - lifepointdamage);
|
||||
|
||||
applieddamage -= pSoldier->stats.bLife;
|
||||
applieddamage -= pSoldier->stats.bLife;
|
||||
|
||||
pSoldier->iHealableInjury += (applieddamage * 100);
|
||||
}
|
||||
}
|
||||
pSoldier->iHealableInjury += (applieddamage * 100);
|
||||
}*/
|
||||
}
|
||||
|
||||
// if we took an antidote, reduce poisoning
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_CUREPOISON ] > 0 )
|
||||
// if we took an antidote, reduce poisoning
|
||||
if ( pSoldier->drugs.bDrugEffect[ DRUG_TYPE_CUREPOISON ] > 0 )
|
||||
{
|
||||
if ( pSoldier->bPoisonSum > 0 )
|
||||
{
|
||||
if ( pSoldier->bPoisonSum > 0 )
|
||||
if ( pSoldier->bPoisonBleeding > 0 )
|
||||
{
|
||||
if ( pSoldier->bPoisonBleeding > 0 )
|
||||
{
|
||||
pSoldier->bPoisonBleeding--;
|
||||
}
|
||||
else if ( pSoldier->bPoisonLife > 0 )
|
||||
{
|
||||
pSoldier->bPoisonLife--;
|
||||
}
|
||||
|
||||
pSoldier->bPoisonSum--;
|
||||
pSoldier->bPoisonBleeding--;
|
||||
}
|
||||
else if ( pSoldier->bPoisonLife > 0 )
|
||||
{
|
||||
pSoldier->bPoisonLife--;
|
||||
}
|
||||
|
||||
pSoldier->bPoisonSum--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user