Skip to content

Commit

Permalink
Fix damage formula against structures and features
Browse files Browse the repository at this point in the history
Since level defaulted to 1 it meant structures/features here would set actualDamage to 94% as the base damage value.
  • Loading branch information
KJeff01 committed Sep 13, 2023
1 parent fd63dff commit 64c7606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ int objArmour(const BASE_OBJECT *psObj, WEAPON_CLASS weaponClass)
*/
int32_t objDamage(BASE_OBJECT *psObj, unsigned damage, unsigned originalhp, WEAPON_CLASS weaponClass, WEAPON_SUBCLASS weaponSubClass, bool isDamagePerSecond, int minDamage, bool empRadiusHit)
{
int level = 1;
int level = 0;
int armour = objArmour(psObj, weaponClass);
const int lastHit = psObj->timeLastHit;

Expand Down Expand Up @@ -499,7 +499,7 @@ int32_t objDamage(BASE_OBJECT *psObj, unsigned damage, unsigned originalhp, WEAP
unsigned int objGuessFutureDamage(WEAPON_STATS *psStats, unsigned int player, BASE_OBJECT *psTarget)
{
unsigned int damage;
int actualDamage, armour, level = 1;
int actualDamage, armour, level = 0;

if (psTarget == nullptr)
{
Expand Down

0 comments on commit 64c7606

Please sign in to comment.