[Spells] Update to SPA 440 SE_FinishingBlowMaxLevel limit value sets HP ratio for FB (#1890)

* fb max level update

* Update to SPA 440 SE_FinishingBlowMaxLevel limit value sets HP ratio for FB
This commit is contained in:
KayenEQ
2021-12-15 22:00:34 -05:00
committed by GitHub
parent fbc5d045de
commit d460fb3db8
3 changed files with 16 additions and 11 deletions
+7 -2
View File
@@ -4758,8 +4758,13 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
bool Mob::TryFinishingBlow(Mob *defender, int &damage)
{
// base2 of FinishingBlowLvl is the HP limit (cur / max) * 1000, 10% is listed as 100
if (defender && !defender->IsClient() && defender->GetHPRatio() < 10) {
float hp_limit = 10.0f;
auto fb_hp_limit = std::max({ aabonuses.FinishingBlowLvl[SBIndex::FINISHING_BLOW_LEVEL_HP_RATIO], spellbonuses.FinishingBlowLvl[SBIndex::FINISHING_BLOW_LEVEL_HP_RATIO], itembonuses.FinishingBlowLvl[SBIndex::FINISHING_BLOW_LEVEL_HP_RATIO] });
if (fb_hp_limit) {
hp_limit = fb_hp_limit/10.0f;
}
if (defender && !defender->IsClient() && defender->GetHPRatio() < hp_limit) {
uint32 FB_Dmg =
aabonuses.FinishingBlow[SBIndex::FINISHING_EFFECT_DMG] + spellbonuses.FinishingBlow[SBIndex::FINISHING_EFFECT_DMG] + itembonuses.FinishingBlow[SBIndex::FINISHING_EFFECT_DMG];