调整dps插件对仇恨的估算方式
优化dps插件
This commit is contained in:
264
ThreatCoefficients.lua
Normal file
264
ThreatCoefficients.lua
Normal file
@@ -0,0 +1,264 @@
|
||||
local NanamiDPS = NanamiDPS
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- ThreatCoefficients: Complete spell threat database for WoW 1.12 + Turtle WoW
|
||||
--
|
||||
-- Each entry: bonus = flat threat added on top of damage
|
||||
-- mult = multiplier applied to damage (default 1.0)
|
||||
-- zero = true if the spell generates no threat at all
|
||||
--
|
||||
-- Global modifiers (stances, buffs, talents) are applied separately by the
|
||||
-- engine; this table only holds per-spell values.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
local TC = {}
|
||||
NanamiDPS.ThreatCoefficients = TC
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Warrior
|
||||
-------------------------------------------------------------------------------
|
||||
TC.spells = {
|
||||
-- Warrior: flat bonus + damage
|
||||
["Heroic Strike"] = { bonus = 145 },
|
||||
["Shield Slam"] = { bonus = 250 },
|
||||
["Revenge"] = { bonus = 315 },
|
||||
["Shield Bash"] = { bonus = 180 },
|
||||
["Cleave"] = { bonus = 100 },
|
||||
["Execute"] = { mult = 1.25 },
|
||||
["Hamstring"] = { bonus = 145, mult = 1.25 },
|
||||
["Thunder Clap"] = { bonus = 130 },
|
||||
["Sunder Armor"] = { bonus = 261 },
|
||||
["Overpower"] = { mult = 0.75 },
|
||||
["Disarm"] = { bonus = 104 },
|
||||
["Mocking Blow"] = { bonus = 250 },
|
||||
["Battle Shout"] = { bonus = 55 },
|
||||
["Demoralizing Shout"] = { bonus = 43 },
|
||||
|
||||
-- Druid: multiplicative model
|
||||
["Maul"] = { mult = 1.75 },
|
||||
["Swipe"] = { mult = 1.75 },
|
||||
["Faerie Fire (Feral)"] = { bonus = 108 },
|
||||
|
||||
-- Paladin: Holy damage + Righteous Fury amplified elsewhere
|
||||
["Holy Strike"] = { mult = 1.5 },
|
||||
["Consecration"] = { mult = 1.0 },
|
||||
["Holy Shield"] = { mult = 1.0 },
|
||||
["Judgement"] = { mult = 1.0 },
|
||||
["Seal of Righteousness"] = { mult = 1.0 },
|
||||
["Exorcism"] = { mult = 1.0 },
|
||||
["Hammer of Wrath"] = { mult = 1.0 },
|
||||
|
||||
-- Shaman: Turtle WoW enhanced
|
||||
["Earth Shock"] = { mult = 1.5 },
|
||||
["Flame Shock"] = { mult = 1.0 },
|
||||
["Frost Shock"] = { mult = 1.0 },
|
||||
["Stormstrike"] = { mult = 1.0 },
|
||||
|
||||
-- Priest
|
||||
["Mind Blast"] = { mult = 2.0 },
|
||||
["Holy Nova"] = { zero = true },
|
||||
|
||||
-- Warlock
|
||||
["Searing Pain"] = { mult = 2.0 },
|
||||
["Life Tap"] = { zero = true },
|
||||
|
||||
-- Hunter
|
||||
["Distracting Shot"] = { bonus = 600 },
|
||||
["Intimidation"] = { bonus = 580 },
|
||||
["Scorpid Poison"] = { bonus = 5 },
|
||||
|
||||
-- Rogue
|
||||
["Feint"] = { bonus = -800 },
|
||||
|
||||
-- Mage
|
||||
["Counterspell"] = { bonus = 300 },
|
||||
|
||||
-- Pet abilities
|
||||
["Growl"] = { bonus = 415 },
|
||||
["Thunderstomp"] = { bonus = 100 },
|
||||
["Torment"] = { bonus = 300 },
|
||||
["Suffering"] = { bonus = 300 },
|
||||
["Anguish"] = { bonus = 300 },
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Chinese localization aliases
|
||||
-------------------------------------------------------------------------------
|
||||
local cnAliases = {
|
||||
["\232\139\177\229\139\135\230\137\147\229\135\187"] = "Heroic Strike",
|
||||
["\231\155\190\231\137\140\231\140\155\229\135\187"] = "Shield Slam",
|
||||
["\229\164\141\228\187\135"] = "Revenge",
|
||||
["\231\155\190\229\135\187"] = "Shield Bash",
|
||||
["\233\161\186\229\138\136\230\150\169"] = "Cleave",
|
||||
["\230\150\169\230\157\128"] = "Execute",
|
||||
["\230\150\173\231\173\139"] = "Hamstring",
|
||||
["\233\155\183\233\156\134\228\184\128\229\135\187"] = "Thunder Clap",
|
||||
["\231\160\180\231\148\178\230\148\187\229\135\187"] = "Sunder Armor",
|
||||
["\229\142\139\229\136\182"] = "Overpower",
|
||||
["\231\188\180\230\162\176"] = "Disarm",
|
||||
["\229\152\178\229\188\132\230\137\147\229\135\187"] = "Mocking Blow",
|
||||
["\230\136\152\230\150\151\230\128\146\229\144\188"] = "Battle Shout",
|
||||
["\230\140\171\229\191\151\230\128\146\229\144\188"] = "Demoralizing Shout",
|
||||
["\230\167\152\229\135\187"] = "Maul",
|
||||
["\230\140\165\229\135\187"] = "Swipe",
|
||||
["\231\178\190\231\129\181\228\185\139\231\129\171(\233\135\142\233\135\145)"] = "Faerie Fire (Feral)",
|
||||
["\231\165\158\229\156\163\230\137\147\229\135\187"] = "Holy Strike",
|
||||
["\229\165\137\231\140\174"] = "Consecration",
|
||||
["\231\165\158\229\156\163\228\185\139\231\155\190"] = "Holy Shield",
|
||||
["\229\174\161\229\136\164"] = "Judgement",
|
||||
["\230\173\163\228\185\137\229\156\163\229\141\176"] = "Seal of Righteousness",
|
||||
["\233\169\177\233\173\148\230\234\175\175"] = "Exorcism",
|
||||
["\230\132\164\230\128\146\228\185\139\233\148\164"] = "Hammer of Wrath",
|
||||
["\229\156\176\233\156\135\230\156\175"] = "Earth Shock",
|
||||
["\231\129\171\231\132\176\229\134\178\229\135\187"] = "Flame Shock",
|
||||
["\229\134\176\233\156\156\229\134\178\229\135\187"] = "Frost Shock",
|
||||
["\233\163\142\230\154\180\230\137\147\229\135\187"] = "Stormstrike",
|
||||
["\229\191\131\231\129\181\233\156\135\231\136\134"] = "Mind Blast",
|
||||
["\231\165\158\229\156\163\230\150\176\230\152\159"] = "Holy Nova",
|
||||
["\231\129\188\231\131\173\228\185\139\231\151\155"] = "Searing Pain",
|
||||
["\231\148\159\229\145\189\229\136\134\230\181\129"] = "Life Tap",
|
||||
["\230\137\176\228\185\177\229\176\132\229\135\187"] = "Distracting Shot",
|
||||
["\232\157\157\230\175\146"] = "Scorpid Poison",
|
||||
["\232\131\129\232\191\171"] = "Intimidation",
|
||||
["\229\129\183\230\148\187"] = "Feint",
|
||||
["\229\143\141\229\136\182\233\173\148\230\179\149"] = "Counterspell",
|
||||
["\228\189\142\229\144\188"] = "Growl",
|
||||
["\233\155\183\233\156\134\232\184\143\232\184\143"] = "Thunderstomp",
|
||||
["\230\138\152\231\163\168"] = "Torment",
|
||||
["\229\143\151\233\154\190"] = "Suffering",
|
||||
}
|
||||
|
||||
for cn, en in pairs(cnAliases) do
|
||||
if TC.spells[en] then
|
||||
TC.spells[cn] = TC.spells[en]
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Stance / Form global multipliers (detected via buff texture scanning)
|
||||
-------------------------------------------------------------------------------
|
||||
TC.stancePatterns = {
|
||||
{ pat = "DefensiveStance", mod = 1.3 },
|
||||
{ pat = "OffensiveStance", mod = 0.8 },
|
||||
{ pat = "BerserkStance", mod = 0.8 },
|
||||
{ pat = "Racial_Avatar", mod = 0.8 },
|
||||
{ pat = "BearForm", mod = 1.3 },
|
||||
{ pat = "CatForm", mod = 0.8 },
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Buff-based threat reduction (e.g. Salvation)
|
||||
-------------------------------------------------------------------------------
|
||||
TC.buffPatterns = {
|
||||
{ pat = "SealOfSalvation", mod = 0.7 },
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Talent-based multipliers: detected via GetTalentInfo at combat start
|
||||
-- { tab, index, perPoint, base }
|
||||
-- Final = base + (rank * perPoint)
|
||||
-- Warrior Defiance: Protection tab, talent #9 => +5% per point (vanilla)
|
||||
-- Turtle WoW Defiance is stronger (+9.67% per point to reach 1.45x at 3/3)
|
||||
-- Druid Feral Instinct: Feral tab, talent #3 => +5% per point
|
||||
-------------------------------------------------------------------------------
|
||||
TC.talentMultipliers = {
|
||||
WARRIOR = {
|
||||
{ tab = 3, index = 9, perPoint = 0.15, base = 0, label = "Defiance" },
|
||||
},
|
||||
DRUID = {
|
||||
{ tab = 2, index = 3, perPoint = 0.05, base = 0, label = "Feral Instinct" },
|
||||
},
|
||||
SHAMAN = {
|
||||
{ tab = 2, index = 9, perPoint = 0.05, base = 0, label = "Spirit Shield" },
|
||||
},
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Class-level passive multiplier (always active, no stance check needed)
|
||||
-------------------------------------------------------------------------------
|
||||
TC.classPassiveMod = {
|
||||
ROGUE = 0.71,
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Righteous Fury detection for Paladin (buff texture)
|
||||
-- Base = 1.6x holy damage threat; talented (3/3 Improved RF) = 1.9x
|
||||
-------------------------------------------------------------------------------
|
||||
TC.righteousFury = {
|
||||
texture = "Spell_Holy_SealOfFury",
|
||||
baseMod = 1.6,
|
||||
talentTab = 2,
|
||||
talentIndex = 7,
|
||||
perPoint = 0.1,
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Shaman Rockbiter: global threat modifier when weapon has Rockbiter enchant
|
||||
-- Detected via GetWeaponEnchantInfo or buff texture
|
||||
-------------------------------------------------------------------------------
|
||||
TC.rockbiter = {
|
||||
texture = "Spell_Nature_RockBiter",
|
||||
globalMod = 1.3,
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Threat-clearing events: buff/debuff names that reset threat
|
||||
-------------------------------------------------------------------------------
|
||||
TC.threatWipeEvents = {
|
||||
["Feign Death"] = "FULL_WIPE",
|
||||
["Vanish"] = "FULL_WIPE",
|
||||
["Invisibility"] = "FULL_WIPE",
|
||||
["Soulshatter"] = "HALF_WIPE",
|
||||
["Fade"] = "TEMP_REDUCE",
|
||||
}
|
||||
|
||||
TC.threatWipeEventsCN = {
|
||||
["\229\129\135\230\173\187"] = "FULL_WIPE",
|
||||
["\230\182\136\229\164\177"] = "FULL_WIPE",
|
||||
["\233\154\144\232\186\171"] = "FULL_WIPE",
|
||||
["\231\129\181\233\173\130\231\162\142\232\163\130"] = "HALF_WIPE",
|
||||
["\230\184\144\233\154\144"] = "TEMP_REDUCE",
|
||||
}
|
||||
|
||||
for cn, v in pairs(TC.threatWipeEventsCN) do
|
||||
TC.threatWipeEvents[cn] = v
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Taunt spells: trigger threat-copy mechanic in ThreatEngine
|
||||
-------------------------------------------------------------------------------
|
||||
TC.tauntSpells = {
|
||||
["Growl"] = true,
|
||||
["Taunt"] = true,
|
||||
["Mocking Blow"] = true,
|
||||
["Challenging Shout"] = true,
|
||||
["Challenging Roar"] = true,
|
||||
["Hand of Reckoning"] = true,
|
||||
["Earthshaker Slam"] = true,
|
||||
["\228\189\142\229\144\188"] = true,
|
||||
["\229\152\178\232\174\189"] = true,
|
||||
["\229\152\178\229\188\132\230\137\147\229\135\187"] = true,
|
||||
["\230\140\145\230\136\152\230\128\146\229\144\188"] = true,
|
||||
["\230\140\145\230\136\152\229\146\134\229\147\174"] = true,
|
||||
}
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Healing threat coefficient
|
||||
-------------------------------------------------------------------------------
|
||||
TC.HEAL_THREAT_COEFF = 0.5
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Rage gain threat (per point of rage from active abilities)
|
||||
-------------------------------------------------------------------------------
|
||||
TC.RAGE_GAIN_THREAT = 5.0
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Mana gain threat (per point of mana from active abilities)
|
||||
-------------------------------------------------------------------------------
|
||||
TC.MANA_GAIN_THREAT = 0.5
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- OT threshold multipliers
|
||||
-------------------------------------------------------------------------------
|
||||
TC.OT_MELEE_THRESHOLD = 1.10
|
||||
TC.OT_RANGED_THRESHOLD = 1.30
|
||||
Reference in New Issue
Block a user