diff --git a/common/ruletypes.h b/common/ruletypes.h index 6d93a8790..99909e08a 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -587,6 +587,7 @@ RULE_INT(NPC, NPCToNPCAggroTimerMin, 500, "Minimum time span after which one NPC RULE_INT(NPC, NPCToNPCAggroTimerMax, 6000, "Maximum time span after which one NPC aggro another NPC (milliseconds)") RULE_BOOL(NPC, UseClassAsLastName, true, "Uses class archetype as LastName for NPC with none") RULE_BOOL(NPC, NewLevelScaling, true, "Better level scaling, use old if new formulas would break your server") +RULE_REAL(NPC,NPCBackstabMod, 1.9, "Multiplier for NPC Backstab, Higher = Lower backstab amount") RULE_INT(NPC, NPCGatePercent, 20, " Percentage at which the NPC Will attempt to gate at") RULE_BOOL(NPC, NPCGateNearBind, false, "Will NPC attempt to gate when near bind location?") RULE_INT(NPC, NPCGateDistanceBind, 75, "Distance from bind before NPC will attempt to gate") diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 20957f1bf..b642b3faa 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -24,6 +24,7 @@ #include "mob.h" #include "string_ids.h" #include "lua_parser.h" +#include "npc.h" #include @@ -182,7 +183,7 @@ int Mob::GetBaseSkillDamage(EQ::skills::SkillType skill, Mob *target) } } else if (IsNPC()) { auto *npc = CastToNPC(); - base = std::max(base, npc->GetBaseDamage()); + base = round((npc->GetMaxDMG() - npc->GetMinDMG()) / RuleR(NPC, NPCBackstabMod)); // parses show relatively low BS mods from lots of NPCs, so either their BS skill is super low // or their mod is divided again, this is probably not the right mod, but it's better skill_bonus /= 3.0f;