Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2929,7 +2929,7 @@ c["100% more Elemental Damage while Unbound"]={{[1]={[1]={type="Condition",var="
c["100% more Main Hand attack speed"]={{[1]={[1]={type="Condition",var="MainHandAttack"},[2]={skillType=1,type="SkillType"},flags=1,keywordFlags=0,name="Speed",type="MORE",value=100}},nil}
c["100% more Warcry Duration"]={{[1]={flags=0,keywordFlags=4,name="Duration",type="MORE",value=100}},nil}
c["100% of Cold Damage Converted to Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="ColdDamageConvertToFire",type="BASE",value=100}},nil}
c["100% of Cold and Lightning Damage from Hits taken as Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="LightningDamageFromHitsTakenAsFire",type="BASE",value=100}}," Cold and "}
c["100% of Cold and Lightning Damage from Hits taken as Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="ColdDamageFromHitsTakenAsFire",type="BASE",value=100},[2]={flags=0,keywordFlags=0,name="LightningDamageFromHitsTakenAsFire",type="BASE",value=100}},nil}
c["100% of Damage taken Recouped as Life"]={{[1]={flags=0,keywordFlags=0,name="LifeRecoup",type="BASE",value=100}},nil}
c["100% of Damage you Reflect to Enemies when Hit is leeched as Life"]={{[1]={flags=0,keywordFlags=0,name="DamageLifeLeech",type="BASE",value=100}}," you Reflect to Enemies when Hit "}
c["100% of Fire Damage from Hits taken as Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="FireDamageFromHitsTakenAsPhysical",type="BASE",value=100}},nil}
Expand Down
23 changes: 16 additions & 7 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,13 @@ local explodeFunc = function(chance, amount, type, ...)
}
end

local dmgTypes = {
["physical"] = "Physical",
["lightning"] = "Lightning",
["cold"] = "Cold",
["fire"] = "Fire",
["chaos"] = "Chaos",
}
-- List of special modifiers
---@type table<string, Mod[]|fun(num: number, ...: string): Mod|Mod[]>
local specialModList = {
Expand Down Expand Up @@ -5306,6 +5313,15 @@ local specialModList = {
mod("FireDamageFromHitsTakenAsCold", "BASE", num, { type = "Condition", var = "UsingFlask" }),
mod("LightningDamageFromHitsTakenAsCold", "BASE", num, { type = "Condition", var = "UsingFlask" }),
} end,
["(%d+)%% of (%a+) and (%a+) damage from hits taken as (%a+) damage"] = function(num, _, type1, type2, type3)
local fromType1 = dmgTypes[type1]
local fromType2 = dmgTypes[type2]
local toType = dmgTypes[type3]
return fromType1 and fromType2 and toType and {
mod(fromType1 .. "DamageFromHitsTakenAs" .. toType, "BASE", num),
mod(fromType2 .. "DamageFromHitsTakenAs" .. toType, "BASE", num),
}
end,
["items and gems have (%d+)%% reduced attribute requirements"] = function(num) return { mod("GlobalAttributeRequirements", "INC", -num) } end,
["items and gems have (%d+)%% increased attribute requirements"] = function(num) return { mod("GlobalAttributeRequirements", "INC", num) } end,
["mana reservation of herald skills is always (%d+)%%"] = function(num) return { mod("SkillData", "LIST", { key = "ManaReservationPercentForced", value = num }, { type = "SkillType", skillType = SkillType.Herald }) } end,
Expand Down Expand Up @@ -5933,13 +5949,6 @@ local suffixTypes = {
["leeched as energy shield"] = "EnergyShieldLeech",
["is leeched as energy shield"] = "EnergyShieldLeech",
}
local dmgTypes = {
["physical"] = "Physical",
["lightning"] = "Lightning",
["cold"] = "Cold",
["fire"] = "Fire",
["chaos"] = "Chaos",
}
local penTypes = {
["lightning resistance"] = "LightningPenetration",
["cold resistance"] = "ColdPenetration",
Expand Down
Loading