diff --git a/utils/mods/legacy_combat.lua b/utils/mods/legacy_combat.lua index 3232d8da0..44f4cbcac 100644 --- a/utils/mods/legacy_combat.lua +++ b/utils/mods/legacy_combat.lua @@ -75,7 +75,7 @@ function MeleeMitigation(e) e.hit.base_damage ) ); - + e.hit.damage_done = 2 * e.hit.base_damage * GetDamageTable(e.self, e.hit.skill) / 100; e.hit = DoMeleeMitigation(e.self, e.other, e.hit, e.opts); @@ -221,6 +221,16 @@ function CheckHitChance(e) end local tohit_roll = Random.Real(0, 100); + + eq.debug( + string.format("[%s] [Mob::CheckHitChance] Chance [%i] ToHitRoll [%i] Hit? [%t]", + e.self:GetCleanName(), + chancetohit, + tohit_roll, + (tohit_roll <= chancetohit) + ) + ); + if (tohit_roll <= chancetohit) then e.ReturnValue = true; else diff --git a/zone/attack.cpp b/zone/attack.cpp index 5a20a8992..9f6e56e66 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -305,6 +305,16 @@ bool Mob::CheckHitChance(Mob* other, EQEmu::skills::SkillType skillinuse, int Ha float tohit_roll = zone->random.Real(0, 100); + Log.Out( + Logs::General, + Logs::Combat, + "[%s] [Mob::CheckHitChance] Chance [%i] ToHitRoll [%i] Hit? [%s]", + GetCleanName(), + chancetohit, + tohit_roll, + (tohit_roll <= chancetohit) ? "true" : "false" + ); + Log.Out(Logs::Detail, Logs::Attack, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll); return(tohit_roll <= chancetohit); diff --git a/zone/mob.cpp b/zone/mob.cpp index c47788ee5..662e226d0 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -4603,11 +4603,16 @@ int16 Mob::GetCritDmgMob(uint16 skill) int critDmg_mod = 0; // All skill dmg mod + Skill specific - critDmg_mod += itembonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + spellbonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + aabonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + - itembonuses.CritDmgMob[skill] + spellbonuses.CritDmgMob[skill] + aabonuses.CritDmgMob[skill]; + critDmg_mod += itembonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + + spellbonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + + aabonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + + itembonuses.CritDmgMob[skill] + + spellbonuses.CritDmgMob[skill] + + aabonuses.CritDmgMob[skill]; - if(critDmg_mod < -100) + if (critDmg_mod < -100) { critDmg_mod = -100; + } return critDmg_mod; }