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:
silversurfer
2013-10-05 15:15:50 +00:00
parent 2b19bd1959
commit c16971b9f2
9 changed files with 204 additions and 39 deletions
+10 -8
View File
@@ -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);
}
}
}