[Rules] Add Backstab Rules (#2666)

* [Rules] Add backstab rules

Add rules to disable elemental and bane damage on backstab.

* Update special_attacks.cpp

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
Vayle
2022-12-21 18:41:25 -05:00
committed by GitHub
parent e811cb1e85
commit d5aecb228a
2 changed files with 10 additions and 3 deletions
+8 -3
View File
@@ -112,13 +112,18 @@ int Mob::GetBaseSkillDamage(EQ::skills::SkillType skill, Mob *target)
auto *inst = CastToClient()->GetInv().GetItem(EQ::invslot::slotPrimary);
if (inst && inst->GetItem() && inst->GetItem()->ItemType == EQ::item::ItemType1HPiercing) {
base = inst->GetItemBackstabDamage(true);
if (!inst->GetItemBackstabDamage())
if (!inst->GetItemBackstabDamage()) {
base += inst->GetItemWeaponDamage(true);
}
if (target) {
if (inst->GetItemElementalFlag(true) && inst->GetItemElementalDamage(true))
if (inst->GetItemElementalFlag(true) && inst->GetItemElementalDamage(true) && !RuleB(Combat, BackstabIgnoresElemental)) {
base += target->ResistElementalWeaponDmg(inst);
if (inst->GetItemBaneDamageBody(true) || inst->GetItemBaneDamageRace(true))
}
if ((inst->GetItemBaneDamageBody(true) || inst->GetItemBaneDamageRace(true)) && !RuleB(Combat, BackstabIgnoresBane)) {
base += target->CheckBaneDamage(inst);
}
}
}
} else if (IsNPC()) {