[Rules] Backstab Damage Modifier (#3908)

* [Rules] Backstab Damage Modifier

Added NPCBackstabMod - Default 1.9 - Lower mod = higher backstab.

* Update special_attacks.cpp

corrected math to npc base_damage
This commit is contained in:
Fryguy
2024-01-08 02:58:48 -05:00
committed by GitHub
parent c731f3f560
commit 0f7f71334a
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -24,6 +24,7 @@
#include "mob.h"
#include "string_ids.h"
#include "lua_parser.h"
#include "npc.h"
#include <string.h>
@@ -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;