Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/Classes/GemSelectControl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,11 @@ function GemSelectClass:AddGemTooltip(gemInstance)
self.tooltip:AddSeparator(10)
self:AddGrantedEffectInfo(gemInstance, additional)
for _, statSet in ipairs(additional.statSets) do
self:AddStatSetInfo(gemInstance, grantedEffect, statSet)
self:AddStatSetInfo(gemInstance, additional, statSet)
end
else
for _, statSet in ipairs(additional.statSets) do
self:AddStatSetInfo(gemInstance, grantedEffect, statSet, true)
self:AddStatSetInfo(gemInstance, additional, statSet, true)
end
end
end
Expand All @@ -573,7 +573,7 @@ end
function GemSelectClass:AddGrantedEffectInfo(gemInstance, grantedEffect, addReq)
local displayInstance = gemInstance.displayEffect or gemInstance
local grantedEffectLevel = grantedEffect.levels[displayInstance.level] or { }
if gemInstance.gemData.Tier and not grantedEffect.isLineage then
if gemInstance.gemData.Tier and not grantedEffect.isLineage and not grantedEffect.hidden then
self.tooltip:AddLine(16, string.format("^x7F7F7FTier: ^7%d", gemInstance.gemData.Tier))
end
if addReq and not grantedEffect.support then
Expand Down Expand Up @@ -661,7 +661,7 @@ function GemSelectClass:AddGrantedEffectInfo(gemInstance, grantedEffect, addReq)
if grantedEffectLevel.critChance then
self.tooltip:AddLine(16, string.format("^x7F7F7FCritical Hit Chance: ^7%.2f%%", grantedEffectLevel.critChance))
end
if gemInstance.gemData.weaponRequirements then
if gemInstance.gemData.weaponRequirements and not grantedEffect.hidden then
self.tooltip:AddLine(16, "^x7F7F7F Requires: ^7" .. gemInstance.gemData.weaponRequirements)
end
end
Expand Down
58 changes: 35 additions & 23 deletions src/Classes/SkillsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -756,41 +756,53 @@ function SkillsTabClass:CreateGemSlot(index)
end
-- Function for both granted effect and secondary such as vaal
local addQualityLines = function(qualityList, grantedEffect)
tooltip:AddLine(18, colorCodes.GEM..grantedEffect.name)
-- Hardcoded to use 20% quality instead of grabbing from gem, this is for consistency and so we always show something
tooltip:AddLine(16, colorCodes.NORMAL.."At +20% Quality:")
for k, qual in pairs(qualityList) do
-- Do the stats one at a time because we're not guaranteed to get the descriptions in the same order we look at them here
local stats = { }
stats[qual[1]] = qual[2] * 20
local descriptions = self.build.data.describeStats(stats, grantedEffect.statSets[1].statDescriptionScope)
-- line may be nil if the value results in no line due to not being enough quality
for _, line in ipairs(descriptions) do
if line then
-- Check if we have a handler for the mod in the gem's statMap or in the shared stat map for skills
if grantedEffect.statSets[1].statMap[qual[1]] or self.build.data.skillStatMap[qual[1]] then
tooltip:AddLine(16, colorCodes.MAGIC..line)
else
local line = colorCodes.UNSUPPORTED..line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
if #qualityList > 0 then
if grantedEffect.name == "" then
tooltip:AddLine(18, colorCodes.GEM..grantedEffect.statSets[1].label)
else
tooltip:AddLine(18, colorCodes.GEM..grantedEffect.name)
end
-- Hardcoded to use 20% quality instead of grabbing from gem, this is for consistency and so we always show something
tooltip:AddLine(16, colorCodes.NORMAL.."At +20% Quality:")
for k, qual in pairs(qualityList) do
-- Do the stats one at a time because we're not guaranteed to get the descriptions in the same order we look at them here
local stats = { }
stats[qual[1]] = qual[2] * 20
local descriptions = self.build.data.describeStats(stats, grantedEffect.statSets[1].statDescriptionScope, true)
-- line may be nil if the value results in no line due to not being enough quality
for _, line in ipairs(descriptions) do
if line then
-- Check if we have a handler for the mod in the gem's statMap or in the shared stat map for skills
if grantedEffect.statSets[1].statMap[qual[1]] or self.build.data.skillStatMap[qual[1]] then
tooltip:AddLine(16, colorCodes.MAGIC..line)
else
local line = colorCodes.UNSUPPORTED..line
line = main.notSupportedModTooltips and (line .. main.notSupportedTooltipText) or line
tooltip:AddLine(16, line)
end
end
end
end
end
end
-- Check if there is a quality of this type for the effect
if gemData and gemData.grantedEffect.qualityStats then
-- Currently only checks the first 2 additionalGrantedEffects. Will need to fix if gems ever add more
if gemData and gemData.grantedEffect.qualityStats and #gemData.grantedEffect.qualityStats > 0 then
local qualityTable = gemData.grantedEffect.qualityStats
addQualityLines(qualityTable, gemData.grantedEffect)
end
if gemData and gemData.secondaryGrantedEffect and gemData.secondaryGrantedEffect.qualityStats then
local qualityTable = gemData.secondaryGrantedEffect.qualityStats
if gemData and gemData.additionalGrantedEffects[1] and gemData.additionalGrantedEffects[1].qualityStats and #gemData.additionalGrantedEffects[1].qualityStats > 0 then
local qualityTable = gemData.additionalGrantedEffects[1].qualityStats
tooltip:AddSeparator(10)
addQualityLines(qualityTable, gemData.additionalGrantedEffects[1])
end
if gemData and gemData.additionalGrantedEffects[2] and gemData.additionalGrantedEffects[2].qualityStats and #gemData.additionalGrantedEffects[2].qualityStats > 0 then
local qualityTable = gemData.additionalGrantedEffects[2].qualityStats
tooltip:AddSeparator(10)
addQualityLines(qualityTable, gemData.secondaryGrantedEffect)
addQualityLines(qualityTable, gemData.additionalGrantedEffects[2])
end
-- Add stat comparisons for hovered quality (based on set quality)
if gemData and (gemData.grantedEffect.qualityStats or (gemData.secondaryGrantedEffect and gemData.secondaryGrantedEffect.qualityStats)) and self.displayGroup.gemList[index] then
if gemData and (gemData.grantedEffect.qualityStats or (gemData.additionalGrantedEffects[1] and gemData.additionalGrantedEffects[1].qualityStats or gemData.additionalGrantedEffects[2] and gemData.additionalGrantedEffects[2].qualityStats)) and self.displayGroup.gemList[index] then
local calcFunc, calcBase = self.build.calcsTab:GetMiscCalculator(self.build)
if calcFunc then
local storedQuality = self.displayGroup.gemList[index].quality
Expand Down
2 changes: 2 additions & 0 deletions src/Data/Skills/act_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5167,6 +5167,8 @@ skills["SupportMirageArcherPlayer"] = {
requireSkillTypes = { SkillType.RangedAttack, SkillType.CrossbowAmmoSkill, SkillType.OR, },
addSkillTypes = { },
excludeSkillTypes = { SkillType.HasUsageCondition, },
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down
22 changes: 22 additions & 0 deletions src/Data/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,8 @@ skills["SupportBarrierInvocationPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -1030,6 +1032,8 @@ skills["SupportBlasphemyPlayer"] = {
excludeSkillTypes = { SkillType.Trapped, SkillType.RemoteMined, SkillType.OR, SkillType.SummonsTotem, SkillType.UsedByTotem, SkillType.NOT, SkillType.AND, SkillType.SupportedByHourglass, },
isTrigger = true,
ignoreMinionTypes = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -2087,6 +2091,8 @@ skills["SupportMetaCastOnCritPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -2310,6 +2316,8 @@ skills["SupportMetaCastOnDodgePlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -2534,6 +2542,8 @@ skills["SupportMetaCastOnElementalAilmentPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -2756,6 +2766,8 @@ skills["SupportMetaCastOnMinionDeathPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, SkillType.CreatesMinion, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -4339,6 +4351,8 @@ skills["SupportMetaCastCurseOnBlockPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -5506,6 +5520,8 @@ skills["SupportElementalInvocationPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -11174,6 +11190,10 @@ skills["SupportHandOfChayulaPlayer"] = {
requireSkillTypes = { SkillType.AppliesCurse, SkillType.Mark, SkillType.OR, },
addSkillTypes = { },
excludeSkillTypes = { },
qualityStats = {
{ "base_curse_duration_+%", 1 },
{ "mark_effect_+%", 0.5 },
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -15888,6 +15908,8 @@ skills["SupportReapersInvocationPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down
12 changes: 12 additions & 0 deletions src/Data/Skills/act_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ skills["SupportAncestralWarriorTotemPlayer"] = {
["One Handed Axe"] = true,
["One Handed Sword"] = true,
},
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -1810,6 +1812,8 @@ skills["SupportMetaCastOnBlockPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -1954,6 +1958,8 @@ skills["SupportMetaCastOnMeleeKillPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[8] = { storedUses = 1, levelRequirement = 0, cooldown = 0.2, },
},
Expand Down Expand Up @@ -2022,6 +2028,8 @@ skills["SupportMetaCastOnMeleeStunPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[8] = { storedUses = 1, levelRequirement = 0, cooldown = 0.2, },
},
Expand Down Expand Up @@ -11200,6 +11208,8 @@ skills["SupportMortarCannonPlayer"] = {
requireSkillTypes = { SkillType.Grenade, },
addSkillTypes = { SkillType.UsedByTotem, },
excludeSkillTypes = { SkillType.Meta, SkillType.Triggered, SkillType.Channel, SkillType.Persistent, },
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -14326,6 +14336,8 @@ skills["SupportMetaCastLightningSpellOnHitPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down
6 changes: 6 additions & 0 deletions src/Data/Skills/other.lua
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,8 @@ skills["SupportMetaDeadeyeMarksPlayer"] = {
requireSkillTypes = { SkillType.Mark, },
addSkillTypes = { },
excludeSkillTypes = { },
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -1201,6 +1203,8 @@ skills["SupportMetaCastOnCharmUsePlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down Expand Up @@ -2975,6 +2979,8 @@ skills["SupportMetaCastFireSpellOnHitPlayer"] = {
addSkillTypes = { SkillType.Triggered, SkillType.Cooldown, },
excludeSkillTypes = { SkillType.SupportedByHourglass, },
isTrigger = true,
qualityStats = {
},
levels = {
[1] = { levelRequirement = 0, },
[2] = { levelRequirement = 0, },
Expand Down
2 changes: 1 addition & 1 deletion src/Export/Scripts/skills.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ directiveTable.skill = function(state, args, out)
--end
table.insert(skill.levels, level)
end
if not skill.qualityStats and not granted.IsSupport then
if not (skillGem and granted.IsSupport) then
skill.qualityStats = { }
local qualityStats = dat("GrantedEffectQualityStats"):GetRow("GrantedEffect", granted)
if qualityStats and qualityStats.GrantedStats then
Expand Down