diff --git a/common/ruletypes.h b/common/ruletypes.h index 99909e08a..77d9d4dfb 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -562,6 +562,7 @@ RULE_INT(Combat, ClassicTripleAttackChanceWarrior, 100, "Innate Chance for Warri RULE_INT(Combat, ClassicTripleAttackChanceMonk, 100, "Innate Chance for Monk to Triple Attack after a Double Attack (200 = 20%). DEFAULT: 100") RULE_INT(Combat, ClassicTripleAttackChanceBerserker, 100, "Innate Chance for Berserker to Triple Attack after a Double Attack (200 = 20%). DEFAULT: 100") RULE_INT(Combat, ClassicTripleAttackChanceRanger, 100, "Innate Chance for Ranger to Triple Attack after a Double Attack (200 = 20%). DEFAULT: 100") +RULE_INT(Combat, StunChance, 12, "Percent chance that client will be stunned when mob is behind player. DEFAULT: 12") RULE_CATEGORY_END() RULE_CATEGORY(NPC) diff --git a/zone/attack.cpp b/zone/attack.cpp index 585761bc0..aadcbbebb 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1419,7 +1419,7 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts, boo if (other->CheckHitChance(this, hit)) { if (IsNPC() && other->IsClient() && other->animation > 0 && GetLevel() >= 5 && BehindMob(other, GetX(), GetY())) { // ~ 12% chance - if (zone->random.Roll(12)) { + if (zone->random.Roll(RuleI(Combat, StunChance))) { int stun_resist2 = other->spellbonuses.FrontalStunResist + other->itembonuses.FrontalStunResist + other->aabonuses.FrontalStunResist; int stun_resist = other->spellbonuses.StunResist + other->itembonuses.StunResist + other->aabonuses.StunResist; if (zone->random.Roll(stun_resist2)) {