mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-29 12:32:29 +00:00
Comment each method with source function calls [skip ci]
This commit is contained in:
parent
ea49422ff7
commit
3b23477139
@ -1,3 +1,13 @@
|
|||||||
|
--[[
|
||||||
|
*
|
||||||
|
* The purpose of this lua file is to backport combat formulas pre-overhaul
|
||||||
|
* https://github.com/EQEmu/Server/commit/9e824876ba5dac262b121c0e60d022bb2ecc45bd
|
||||||
|
*
|
||||||
|
* If your server has years and years of content built on old formulas, it may be appropriate to use this
|
||||||
|
* instead of taking on the massive task of rescaling tons of carefully tested and layered content
|
||||||
|
*
|
||||||
|
]]
|
||||||
|
|
||||||
MonkACBonusWeight = RuleI.Get(Rule.MonkACBonusWeight);
|
MonkACBonusWeight = RuleI.Get(Rule.MonkACBonusWeight);
|
||||||
NPCACFactor = RuleR.Get(Rule.NPCACFactor);
|
NPCACFactor = RuleR.Get(Rule.NPCACFactor);
|
||||||
OldACSoftcapRules = RuleB.Get(Rule.OldACSoftcapRules);
|
OldACSoftcapRules = RuleB.Get(Rule.OldACSoftcapRules);
|
||||||
@ -49,6 +59,7 @@ RogueCritThrowingChance = 25;
|
|||||||
RogueDeadlyStrikeChance = 80;
|
RogueDeadlyStrikeChance = 80;
|
||||||
RogueDeadlyStrikeMod = 2;
|
RogueDeadlyStrikeMod = 2;
|
||||||
|
|
||||||
|
-- Source Function: Mob::GetMeleeMitigation()
|
||||||
function MeleeMitigation(e)
|
function MeleeMitigation(e)
|
||||||
e.IgnoreDefault = true;
|
e.IgnoreDefault = true;
|
||||||
|
|
||||||
@ -61,6 +72,7 @@ function MeleeMitigation(e)
|
|||||||
return e;
|
return e;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::CheckHitChance()
|
||||||
function CheckHitChance(e)
|
function CheckHitChance(e)
|
||||||
e.IgnoreDefault = true;
|
e.IgnoreDefault = true;
|
||||||
|
|
||||||
@ -208,6 +220,7 @@ function CheckHitChance(e)
|
|||||||
return e;
|
return e;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::TryCriticalHit()
|
||||||
function TryCriticalHit(e)
|
function TryCriticalHit(e)
|
||||||
e.IgnoreDefault = true;
|
e.IgnoreDefault = true;
|
||||||
|
|
||||||
@ -348,6 +361,7 @@ function TryCriticalHit(e)
|
|||||||
return e;
|
return e;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::TryPetCriticalHit()
|
||||||
function TryPetCriticalHit(self, defender, hit)
|
function TryPetCriticalHit(self, defender, hit)
|
||||||
if (hit.damage_done < 1) then
|
if (hit.damage_done < 1) then
|
||||||
return hit;
|
return hit;
|
||||||
@ -394,6 +408,7 @@ function TryPetCriticalHit(self, defender, hit)
|
|||||||
return hit;
|
return hit;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::GetCriticalChanceBonus()
|
||||||
function GetCriticalChanceBonus(self, skill)
|
function GetCriticalChanceBonus(self, skill)
|
||||||
|
|
||||||
local critical_chance = 0;
|
local critical_chance = 0;
|
||||||
@ -412,6 +427,7 @@ function GetCriticalChanceBonus(self, skill)
|
|||||||
return critical_chance;
|
return critical_chance;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::GetCritDmgMob()
|
||||||
function GetCritDmgMod(self, skill)
|
function GetCritDmgMod(self, skill)
|
||||||
local critDmg_mod = 0;
|
local critDmg_mod = 0;
|
||||||
|
|
||||||
@ -429,6 +445,7 @@ function GetCritDmgMod(self, skill)
|
|||||||
return critDmg_mod;
|
return critDmg_mod;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::GetCrippBlowChance()
|
||||||
function GetCrippBlowChance(self)
|
function GetCrippBlowChance(self)
|
||||||
local aabonuses = self:GetAABonuses();
|
local aabonuses = self:GetAABonuses();
|
||||||
local itembonuses = self:GetItemBonuses();
|
local itembonuses = self:GetItemBonuses();
|
||||||
@ -442,6 +459,7 @@ function GetCrippBlowChance(self)
|
|||||||
return crip_chance;
|
return crip_chance;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::MeleeMitigation()
|
||||||
function DoMeleeMitigation(defender, attacker, hit, opts)
|
function DoMeleeMitigation(defender, attacker, hit, opts)
|
||||||
if hit.damage_done <= 0 then
|
if hit.damage_done <= 0 then
|
||||||
return hit;
|
return hit;
|
||||||
@ -573,6 +591,7 @@ function DoMeleeMitigation(defender, attacker, hit, opts)
|
|||||||
return hit;
|
return hit;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: N/A
|
||||||
function GetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating)
|
function GetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating)
|
||||||
if defender:IsClient() then
|
if defender:IsClient() then
|
||||||
return ClientGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating);
|
return ClientGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating);
|
||||||
@ -581,6 +600,7 @@ function GetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_ratin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Client::GetMeleeMitDmg()
|
||||||
function ClientGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating)
|
function ClientGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating)
|
||||||
if (not attacker:IsNPC() or UseOldDamageIntervalRules) then
|
if (not attacker:IsNPC() or UseOldDamageIntervalRules) then
|
||||||
return MobGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating);
|
return MobGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating);
|
||||||
@ -629,6 +649,7 @@ function ClientGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation
|
|||||||
return math.floor(dmg_bonus + dmg_interval * d);
|
return math.floor(dmg_bonus + dmg_interval * d);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::GetMeleeMitDmg()
|
||||||
function MobGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating)
|
function MobGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_rating, attack_rating)
|
||||||
local d = 10.0;
|
local d = 10.0;
|
||||||
local mit_roll = Random.Real(0, mitigation_rating);
|
local mit_roll = Random.Real(0, mitigation_rating);
|
||||||
@ -668,6 +689,7 @@ function MobGetMeleeMitDmg(defender, attacker, damage, min_damage, mitigation_ra
|
|||||||
return damage;
|
return damage;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Client::GetRawACNoShield()
|
||||||
function GetRawACNoShield(self)
|
function GetRawACNoShield(self)
|
||||||
self = self:CastToClient();
|
self = self:CastToClient();
|
||||||
|
|
||||||
@ -692,6 +714,7 @@ function GetRawACNoShield(self)
|
|||||||
return ac, shield_ac;
|
return ac, shield_ac;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::GetDamageTable()
|
||||||
function GetDamageTable(attacker, skill)
|
function GetDamageTable(attacker, skill)
|
||||||
if not attacker:IsClient() then
|
if not attacker:IsClient() then
|
||||||
return 100;
|
return 100;
|
||||||
@ -734,11 +757,13 @@ function GetDamageTable(attacker, skill)
|
|||||||
return 100;
|
return 100;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: N/A - Not used
|
||||||
function ApplyDamageTable(e)
|
function ApplyDamageTable(e)
|
||||||
e.IgnoreDefault = true;
|
e.IgnoreDefault = true;
|
||||||
return e;
|
return e;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::CommonOutgoingHitSuccess()
|
||||||
function CommonOutgoingHitSuccess(e)
|
function CommonOutgoingHitSuccess(e)
|
||||||
e = ApplyMeleeDamageBonus(e);
|
e = ApplyMeleeDamageBonus(e);
|
||||||
e.hit.damage_done = e.hit.damage_done + (e.hit.damage_done * e.other:GetSkillDmgTaken(e.hit.skill) / 100) + (e.self:GetSkillDmgAmt(e.hit.skill) + e.other:GetFcDamageAmtIncoming(e.self, 0, true, e.hit.skill));
|
e.hit.damage_done = e.hit.damage_done + (e.hit.damage_done * e.other:GetSkillDmgTaken(e.hit.skill) / 100) + (e.self:GetSkillDmgAmt(e.hit.skill) + e.other:GetFcDamageAmtIncoming(e.self, 0, true, e.hit.skill));
|
||||||
@ -748,6 +773,7 @@ function CommonOutgoingHitSuccess(e)
|
|||||||
return e;
|
return e;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source Function: Mob::ApplyMeleeDamageBonus()
|
||||||
function ApplyMeleeDamageBonus(e)
|
function ApplyMeleeDamageBonus(e)
|
||||||
local dmgbonusmod = e.self:GetMeleeDamageMod_SE(e.hit.skill);
|
local dmgbonusmod = e.self:GetMeleeDamageMod_SE(e.hit.skill);
|
||||||
if (opts) then
|
if (opts) then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user