mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New weapon type modifiers for:
- damage - single shot AP - burst AP - auto fire AP Fixed some parts where the raw item property was used instead of the Get... function that should be used. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6470 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+10
-8
@@ -8021,25 +8021,27 @@ void HandleSuppressionFire( UINT8 ubTargetedMerc, UINT8 ubCausedAttacker )
|
||||
pSoldier = MercPtrs[ubCausedAttacker];
|
||||
if ( Item[ pSoldier->inv[pSoldier->ubAttackingHand].usItem ].usItemClass == IC_GUN )
|
||||
{
|
||||
UINT8 ubDamage = GetBasicDamage(&pSoldier->inv[pSoldier->ubAttackingHand]);
|
||||
|
||||
// +1% per point above 20 impact
|
||||
if ( Weapon[ pSoldier->inv[pSoldier->ubAttackingHand].usItem ].ubImpact > 20 )
|
||||
if ( ubDamage > 20 )
|
||||
{
|
||||
sFinalSuppressionEffectiveness += (Weapon[pSoldier->inv[pSoldier->ubAttackingHand].usItem].ubImpact - 20);
|
||||
sFinalSuppressionEffectiveness += (ubDamage - 20);
|
||||
|
||||
// +2% per point above 30 impact
|
||||
if ( Weapon[ pSoldier->inv[pSoldier->ubAttackingHand].usItem ].ubImpact > 30 )
|
||||
if ( ubDamage > 30 )
|
||||
{
|
||||
sFinalSuppressionEffectiveness += (Weapon[pSoldier->inv[pSoldier->ubAttackingHand].usItem].ubImpact - 30);
|
||||
sFinalSuppressionEffectiveness += (ubDamage - 30);
|
||||
|
||||
// +3% per point above 40 impact
|
||||
if ( Weapon[ pSoldier->inv[pSoldier->ubAttackingHand].usItem ].ubImpact > 40 )
|
||||
if ( ubDamage > 40 )
|
||||
{
|
||||
sFinalSuppressionEffectiveness += (Weapon[pSoldier->inv[pSoldier->ubAttackingHand].usItem].ubImpact - 40);
|
||||
sFinalSuppressionEffectiveness += (ubDamage - 40);
|
||||
|
||||
// +4% per point above 50 impact, some crazy gun here
|
||||
if ( Weapon[ pSoldier->inv[pSoldier->ubAttackingHand].usItem ].ubImpact > 50 )
|
||||
if ( ubDamage > 50 )
|
||||
{
|
||||
sFinalSuppressionEffectiveness += (Weapon[pSoldier->inv[pSoldier->ubAttackingHand].usItem].ubImpact - 50);
|
||||
sFinalSuppressionEffectiveness += (ubDamage - 50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user