Skip to content

Commit

Permalink
[core] Clamp lower end of auto attack damage to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterSolstice8 committed Jan 8, 2025
1 parent 81d283a commit c943d2b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/map/attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,15 @@ void CAttack::ProcessDamage()
m_damage += (int32)(m_damage * ((100 + (m_attacker->getMod(Mod::AUGMENTS_TA))) / 100.0f));
}

// low level mobs can get negative fSTR so low they crater their (base weapon damage + fstr) to below 0.
// TODO: find out proper fSTR calc for low level mobs when your VIT is ridiculously high. It's likely that this is slightly wrong (possibly you'd get more hits for 0 than you should)
// However, there are legitimate strategies on retail with 1 dmg weapons and negative fSTR ranks that result in all auto attacks hitting for 0 but using enspells for damage so no TP is fed.
// Absorption isn't possible at this point in the calculation, so zero it.
if (m_damage < 0)
{
m_damage = 0;
}

// Try skill up.
if (m_damage > 0)
{
Expand Down

0 comments on commit c943d2b

Please sign in to comment.