From 7929d945f6ceefc8841d837b783ccec2c6f51f83 Mon Sep 17 00:00:00 2001 From: lalien Date: Thu, 25 May 2006 10:42:56 +0000 Subject: [PATCH] Little Alien - Added additional damage multiplier to explosives/melee/guns git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@79 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 5 +++++ GameSettings.h | 3 +++ GameVersion.cpp | 4 ++-- JA2.vcproj | 4 ++-- Tactical/Weapons.cpp | 16 ++++++++++++---- TileEngine/Explosion Control.cpp | 7 ++++++- 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index b9bfc1ad..c93c8e83 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -386,6 +386,11 @@ void LoadGameExternalOptions() gGameExternalOptions.ubGameProgressStartMadlabQuest = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_START_MADLAB_QUEST",35); gGameExternalOptions.ubGameProgressMikeAvailable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_MIKE_AVALIABLE",50); gGameExternalOptions.ubGameProgressIggyAvaliable = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_IGGY_AVALIABLE",70); + + gGameExternalOptions.ubExplosivesDamageMultiplier = iniReader.ReadInteger("JA2 Gameplay Settings","EXPLOSIVES_DAMAGE_MULTIPLIER",1); + gGameExternalOptions.ubMeleeDamageMultiplier = iniReader.ReadInteger("JA2 Gameplay Settings","MELEE_DAMAGE_MULTIPLIER",1); + gGameExternalOptions.ubGunDamageMultiplier = iniReader.ReadInteger("JA2 Gameplay Settings","GUN_DAMAGE_MULTIPLIER",1); + } diff --git a/GameSettings.h b/GameSettings.h index f8e2b38a..d956fbb6 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -231,6 +231,9 @@ typedef struct UINT8 ubGameProgressStartMadlabQuest; UINT8 ubGameProgressMikeAvailable; UINT8 ubGameProgressIggyAvaliable; + UINT8 ubExplosivesDamageMultiplier; + UINT8 ubGunDamageMultiplier; + UINT8 ubMeleeDamageMultiplier; } GAME_EXTERNAL_OPTIONS; diff --git a/GameVersion.cpp b/GameVersion.cpp index d323ec10..78dccbbb 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.78 2006.05.23" }; + INT16 zVersionLabel[256] = { L"Release v1.13.79 2006.05.25" }; #endif -INT8 czVersionNumber[16] = { "Build 06.05.21" }; +INT8 czVersionNumber[16] = { "Build 06.05.25" }; INT16 zTrackingNumber[16] = { L"Z" }; diff --git a/JA2.vcproj b/JA2.vcproj index 2463ec66..13231e83 100644 --- a/JA2.vcproj +++ b/JA2.vcproj @@ -43,7 +43,7 @@ usItem].usItemClass == IC_BLADE || Item[pObj->usItem].usItemClass == IC_PUNCH || Item[pObj->usItem].usItemClass == IC_TENTACLES ) - return min(255,Weapon[ pObj->usItem ].ubImpact + GetMeleeDamageBonus(pObj)); + if ( Item[pObj->usItem].usItemClass == IC_BLADE || Item[pObj->usItem].usItemClass == IC_PUNCH || Item[pObj->usItem].usItemClass == IC_TENTACLES ) + { + UINT8 ubDamage = Weapon[ pObj->usItem ].ubImpact + GetMeleeDamageBonus(pObj); + return min(255, (UINT8)( (ubDamage) + ( (double)ubDamage / 100) * gGameExternalOptions.ubMeleeDamageMultiplier ) ); + } else - return min(255,Weapon[ pObj->usItem ].ubImpact + GetDamageBonus(pObj)); - + { + UINT8 ubDamage = Weapon[ pObj->usItem ].ubImpact + GetDamageBonus(pObj); + return min(255, (UINT8)( (ubDamage) + ( (double)ubDamage / 100) * gGameExternalOptions.ubGunDamageMultiplier ) ); + } } + + + UINT8 GetShotsPerBurst( OBJECTTYPE *pObj ) { // DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("GetShotsPerBurst")); diff --git a/TileEngine/Explosion Control.cpp b/TileEngine/Explosion Control.cpp index 5a412957..238ee046 100644 --- a/TileEngine/Explosion Control.cpp +++ b/TileEngine/Explosion Control.cpp @@ -1574,9 +1574,14 @@ BOOLEAN ExpAffect( INT16 sBombGridNo, INT16 sGridNo, UINT32 uiDist, UINT16 usIte // Calculate wound amount sWoundAmt = pExplosive->ubDamage + (INT16) ( (pExplosive->ubDamage * uiRoll) / 100 ); - + + sWoundAmt = min(255, (UINT16)( (sWoundAmt) + ( (double)sWoundAmt / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier ) ); //lal + + // Calculate breath amount ( if stun damage applicable ) sBreathAmt = ( pExplosive->ubStunDamage * 100 ) + (INT16) ( ( ( pExplosive->ubStunDamage / 2 ) * 100 * uiRoll ) / 100 ) ; + + sBreathAmt = min(255, (UINT16)( (sBreathAmt) + ( (double)sBreathAmt / 100) * gGameExternalOptions.ubExplosivesDamageMultiplier ) ); //lal // ATE: Make sure guys get pissed at us! HandleBuldingDestruction( sGridNo ,ubOwner );