mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Add rule to allow non-PC pet NPCs to crit
NPCs can't crit at all ever on live
This commit is contained in:
parent
a6a056ad0d
commit
592f9a9cb9
@ -398,6 +398,7 @@ RULE_INT(Combat, NPCBashKickStunChance, 15) //Percent chance that a bash/kick wi
|
||||
RULE_INT(Combat, MeleeCritDifficulty, 8900) // lower is easier
|
||||
RULE_INT(Combat, ArcheryCritDifficulty, 3400) // lower is easier
|
||||
RULE_INT(Combat, ThrowingCritDifficulty, 1100) // lower is easier
|
||||
RULE_BOOL(Combat, NPCCanCrit, false) // true allows non PC pet NPCs to crit
|
||||
RULE_BOOL(Combat, UseIntervalAC, true)
|
||||
RULE_INT(Combat, PetAttackMagicLevel, 30)
|
||||
RULE_BOOL(Combat, EnableFearPathing, true)
|
||||
|
||||
@ -3953,6 +3953,9 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
}
|
||||
#endif // BOTS
|
||||
|
||||
if (IsNPC() && !RuleB(Combat, NPCCanCrit))
|
||||
return;
|
||||
|
||||
// 1: Try Slay Undead
|
||||
if (defender->GetBodyType() == BT_Undead || defender->GetBodyType() == BT_SummonedUndead ||
|
||||
defender->GetBodyType() == BT_Vampire) {
|
||||
@ -3983,14 +3986,12 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
// We either require an innate crit chance or some SPA 169 to crit
|
||||
bool innate_crit = false;
|
||||
int crit_chance = GetCriticalChanceBonus(hit.skill);
|
||||
if (IsClient()) {
|
||||
if ((GetClass() == WARRIOR || GetClass() == BERSERKER) && GetLevel() >= 12)
|
||||
innate_crit = true;
|
||||
else if (GetClass() == RANGER && GetLevel() >= 12 && hit.skill == EQEmu::skills::SkillArchery)
|
||||
innate_crit = true;
|
||||
else if (GetClass() == ROGUE && GetLevel() >= 12 && hit.skill == EQEmu::skills::SkillThrowing)
|
||||
innate_crit = true;
|
||||
}
|
||||
if ((GetClass() == WARRIOR || GetClass() == BERSERKER) && GetLevel() >= 12)
|
||||
innate_crit = true;
|
||||
else if (GetClass() == RANGER && GetLevel() >= 12 && hit.skill == EQEmu::skills::SkillArchery)
|
||||
innate_crit = true;
|
||||
else if (GetClass() == ROGUE && GetLevel() >= 12 && hit.skill == EQEmu::skills::SkillThrowing)
|
||||
innate_crit = true;
|
||||
|
||||
// we have a chance to crit!
|
||||
if (innate_crit || crit_chance) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user