[Combat] Adjustments to Crippling Blows/Slay Undead and Confirmed Critical Code (#4354)

* Adjustments to Crippling Blows/Slay Undead and Confirmed Critical Code

* Adjustments per comments
This commit is contained in:
Fryguy
2024-05-27 19:53:24 -04:00
committed by GitHub
parent b044d8533e
commit 0d888268a8
4 changed files with 184 additions and 149 deletions
+6
View File
@@ -236,7 +236,13 @@ public:
int compute_defense();
int GetTotalDefense(); // compute_defense + spell bonuses
bool CheckHitChance(Mob* attacker, DamageHitInfo &hit);
bool RollMeleeCritCheck(Mob *defender, EQ::skills::SkillType skill);
inline bool CanUndeadSlay() { return static_cast<bool>(GetUndeadSlayRate());}
inline bool IsUndeadForSlay() { return (GetBodyType() == BT_Undead || GetBodyType() == BT_SummonedUndead || GetBodyType() == BT_Vampire); }
int GetUndeadSlayRate();
void DoUndeadSlay(DamageHitInfo &hit, int crit_mod);
void TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *opts = nullptr);
bool TryUndeadSlay(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *opts = nullptr);
void TryPetCriticalHit(Mob *defender, DamageHitInfo &hit);
virtual bool TryFinishingBlow(Mob *defender, int64 &damage);
int TryHeadShot(Mob* defender, EQ::skills::SkillType skillInUse);