fix: Fixes Feint so it properly reduces damage (#1657)
This commit is contained in:
parent
49118556d3
commit
0ffea2e912
3 changed files with 78 additions and 58 deletions
|
|
@ -1385,11 +1385,6 @@ public abstract partial class BaseWeapon : Item, IWeapon, IFactionItem, ICraftab
|
|||
bonus += duelWield.BonusSwingSpeed;
|
||||
}
|
||||
|
||||
if (Feint.Registry.TryGetValue(m, out var feint))
|
||||
{
|
||||
bonus -= feint.SwingSpeedReduction;
|
||||
}
|
||||
|
||||
var context = TransformationSpellHelper.GetContext(m);
|
||||
|
||||
if (context?.Spell is ReaperFormSpell spell)
|
||||
|
|
@ -1985,6 +1980,12 @@ public abstract partial class BaseWeapon : Item, IWeapon, IFactionItem, ICraftab
|
|||
move = null;
|
||||
}
|
||||
|
||||
if (Feint.GetDamageReduction(attacker, defender, out var feintReduction))
|
||||
{
|
||||
// example: 35 damage * 50 / 100 = 17 damage
|
||||
damage -= damage * feintReduction / 100;
|
||||
}
|
||||
|
||||
var ignoreArmor = a is ArmorIgnore ||
|
||||
move?.IgnoreArmor(attacker) == true ||
|
||||
Bladeweave.BladeWeaving(attacker, out var bladeweavingAbi) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue