mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +00:00
[Rule] Stun Chance Percent Rule (#3922)
Added a rule for server operators to tune the Stun Chance from players when mobs are behind. DEFAULT: 12
This commit is contained in:
+1
-1
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user