[Rules] Add Rule to allow Assassinate on non-Humanoid body types. (#2331)

This commit is contained in:
Kinglykrab
2022-07-29 19:23:20 -04:00
committed by GitHub
parent cadd29e5d1
commit 3bda8251b9
2 changed files with 8 additions and 2 deletions
+7 -2
View File
@@ -2189,8 +2189,13 @@ int Mob::TryHeadShot(Mob *defender, EQ::skills::SkillType skillInUse)
int Mob::TryAssassinate(Mob *defender, EQ::skills::SkillType skillInUse)
{
if (defender && (defender->GetBodyType() == BT_Humanoid) && !defender->IsClient() && GetLevel() >= 60 &&
(skillInUse == EQ::skills::SkillBackstab || skillInUse == EQ::skills::SkillThrowing)) {
if (
defender &&
!defender->IsClient() &&
GetLevel() >= 60 &&
(skillInUse == EQ::skills::SkillBackstab || skillInUse == EQ::skills::SkillThrowing) &&
(defender->GetBodyType() == BT_Humanoid || !RuleB(Combat, AssassinateOnlyHumanoids))
) {
int chance = GetDEX();
if (skillInUse == EQ::skills::SkillBackstab) {
chance = 100 * chance / (chance + 3500);