mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 04:32:25 +00:00
Logging to MeleeMitigation [skip ci]
This commit is contained in:
parent
3b23477139
commit
c927fec803
@ -59,7 +59,8 @@ RogueCritThrowingChance = 25;
|
||||
RogueDeadlyStrikeChance = 80;
|
||||
RogueDeadlyStrikeMod = 2;
|
||||
|
||||
-- Source Function: Mob::GetMeleeMitigation()
|
||||
-- Source Function: Mob::MeleeMitigation()
|
||||
-- Partial: Rest happens in DoMeleeMitigation
|
||||
function MeleeMitigation(e)
|
||||
e.IgnoreDefault = true;
|
||||
|
||||
@ -478,6 +479,22 @@ function DoMeleeMitigation(defender, attacker, hit, opts)
|
||||
local weight = 0.0;
|
||||
local monkweight = MonkACBonusWeight;
|
||||
|
||||
eq.debug(
|
||||
string.format("[%s] [Mob::MeleeMitigation] Stability Bonuses | AA [%i] Item [%i] Spell [%i]",
|
||||
e.self:GetCleanName(),
|
||||
aabonuses:CombatStability(),
|
||||
itembonuses:CombatStability(),
|
||||
spellbonuses:CombatStability()
|
||||
)
|
||||
);
|
||||
|
||||
eq.debug(
|
||||
string.format("[%s] [Mob::MeleeMitigation] Soft Cap [%i]",
|
||||
e.self:GetCleanName(),
|
||||
softcap
|
||||
)
|
||||
);
|
||||
|
||||
if defender:IsClient() then
|
||||
armor, shield_ac = GetRawACNoShield(defender);
|
||||
weight = defender:CastToClient():CalcCurrentWeight() / 10;
|
||||
@ -582,12 +599,29 @@ function DoMeleeMitigation(defender, attacker, hit, opts)
|
||||
attack_rating = (attacker:GetATK() + (attacker:GetSkill(Skill.Offense) * 1.345) + ((attacker:GetSTR() - 66) * 0.9));
|
||||
end
|
||||
|
||||
eq.debug(
|
||||
string.format("[%s] [Mob::MeleeMitigation] Attack Rating [%02f] Mitigation Rating [%02f] Damage [%i] MinDmg [%i]",
|
||||
e.self:GetCleanName(),
|
||||
mitigation_rating,
|
||||
attack_rating,
|
||||
hit_damage_done,
|
||||
hit.min_damage
|
||||
)
|
||||
);
|
||||
|
||||
hit.damage_done = GetMeleeMitDmg(defender, attacker, hit.damage_done, hit.min_damage, mitigation_rating, attack_rating);
|
||||
|
||||
if hit.damage_done < 0 then
|
||||
hit.damage_done = 0;
|
||||
end
|
||||
|
||||
eq.debug(
|
||||
string.format("[%s] [Mob::MeleeMitigation] Final Damage [%i]",
|
||||
e.self:GetCleanName(),
|
||||
hit.damage_done
|
||||
)
|
||||
);
|
||||
|
||||
return hit;
|
||||
end
|
||||
|
||||
|
||||
@ -522,6 +522,16 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
||||
float aa_mit = (aabonuses.CombatStability + itembonuses.CombatStability +
|
||||
spellbonuses.CombatStability) / 100.0f;
|
||||
|
||||
Log.Out(
|
||||
Logs::General,
|
||||
Logs::Combat,
|
||||
"[%s] [Mob::MeleeMitigation] Stability Bonuses | AA [%i] Item [%i] Spell [%i] ",
|
||||
GetCleanName(),
|
||||
aabonuses.CombatStability,
|
||||
itembonuses.CombatStability,
|
||||
spellbonuses.CombatStability
|
||||
);
|
||||
|
||||
if (RuleB(Combat, UseIntervalAC)) {
|
||||
float softcap = (GetSkill(EQEmu::skills::SkillDefense) + GetLevel()) *
|
||||
RuleR(Combat, SoftcapFactor) * (1.0 + aa_mit);
|
||||
@ -637,6 +647,17 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
||||
|
||||
attack_rating = attacker->mod_attack_rating(attack_rating, this);
|
||||
|
||||
Log.Out(
|
||||
Logs::General,
|
||||
Logs::Combat,
|
||||
"[%s] [Mob::MeleeMitigation] Attack Rating [%.2f] Mitigation Rating [%.2f] Damage [%i] MinDmg [%i]",
|
||||
GetCleanName(),
|
||||
attack_rating,
|
||||
mitigation_rating,
|
||||
damage,
|
||||
minhit
|
||||
);
|
||||
|
||||
damage = GetMeleeMitDmg(attacker, damage, minhit, mitigation_rating, attack_rating);
|
||||
} else {
|
||||
////////////////////////////////////////////////////////
|
||||
@ -697,6 +718,14 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
||||
|
||||
if (damage < 0)
|
||||
damage = 0;
|
||||
|
||||
Log.Out(
|
||||
Logs::General,
|
||||
Logs::Combat,
|
||||
"[%s] [Mob::MeleeMitigation] Final Damage [%i]",
|
||||
GetCleanName(),
|
||||
damage
|
||||
);
|
||||
}
|
||||
|
||||
// This is called when the Mob is the one being hit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user