From cc46b54f7fe2747b258563b12faa2811a1a2f3ea Mon Sep 17 00:00:00 2001 From: Aeadoin <109764533+Aeadoin@users.noreply.github.com> Date: Mon, 6 Feb 2023 22:31:02 -0500 Subject: [PATCH] [Bots] Add Additional HeroicAgi/Dex Modifiers. (#2838) * [Bots] Add Additional HeroicAgi/Dex Modifiers. * Typo --- zone/attack.cpp | 5 +++-- zone/special_attacks.cpp | 10 ++++++---- zone/tune.cpp | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 5abd3efb6..adb70f437 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -248,8 +248,9 @@ int Mob::compute_defense() { int defense = GetSkill(EQ::skills::SkillDefense) * 400 / 225; defense += (8000 * (GetAGI() - 40)) / 36000; - if (IsClient()) - defense += CastToClient()->GetHeroicAGI() / 10; + if (IsClient() || IsBot()) { + defense += GetHeroicAGI() / 10; + } //516 SE_AC_Mitigation_Max_Percent auto ac_bonus = itembonuses.AC_Mitigation_Max_Percent + aabonuses.AC_Mitigation_Max_Percent + spellbonuses.AC_Mitigation_Max_Percent; diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index bec56cf1f..60ac3311c 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -2173,8 +2173,9 @@ int Mob::TryHeadShot(Mob *defender, EQ::skills::SkillType skillInUse) if (HeadShot_Dmg && HeadShot_Level && (defender->GetLevel() <= HeadShot_Level)) { int chance = GetDEX(); chance = 100 * chance / (chance + 3500); - if (IsClient()) - chance += CastToClient()->GetHeroicDEX() / 25; + if (IsClient() || IsBot()) { + chance += GetHeroicDEX() / 25; + } chance *= 10; int norm = aabonuses.HSLevel[SBIndex::FINISHING_EFFECT_LEVEL_CHANCE_BONUS]; if (norm > 0) @@ -2204,8 +2205,9 @@ int Mob::TryAssassinate(Mob *defender, EQ::skills::SkillType skillInUse) int chance = GetDEX(); if (skillInUse == EQ::skills::SkillBackstab) { chance = 100 * chance / (chance + 3500); - if (IsClient()) - chance += CastToClient()->GetHeroicDEX(); + if (IsClient() || IsBot()) { + chance += GetHeroicDEX(); + } chance *= 10; int norm = aabonuses.AssassinateLevel[SBIndex::FINISHING_EFFECT_LEVEL_CHANCE_BONUS]; if (norm > 0) diff --git a/zone/tune.cpp b/zone/tune.cpp index 273d2f488..3964a3eeb 100644 --- a/zone/tune.cpp +++ b/zone/tune.cpp @@ -1348,12 +1348,12 @@ int64 Mob::Tunecompute_defense(int avoidance_override, int add_avoidance) { int defense = GetSkill(EQ::skills::SkillDefense) * 400 / 225; defense += (8000 * (GetAGI() - 40)) / 36000; - if (IsClient()) { + if (IsClient() || IsBot()) { if (avoidance_override) { defense = avoidance_override; } else { - defense += CastToClient()->GetHeroicAGI() / 10; + defense += GetHeroicAGI() / 10; } defense += add_avoidance; //1 pt = 10 heroic agi }