Fix Sublime Vision and Watchers Eye Purity of Lightning mod (#8739)
Watchers eye was not looping through the mods to add additional lines when a mod was split into 2 lines
The item tab was joining the split lines together and not adding the `{variant:}` text after a newline character was is a mod line
e.g. `"(10-20)% of Fire and Cold Damage taken as Lightning Damage while", "affected by Purity of Lightning"` was being turned into
`"{variant:}(10-20)% of Fire and Cold Damage taken as Lightning Damage while\n affected by Purity of Lightning"`
instead of
`"{variant:}(10-20)% of Fire and Cold Damage taken as Lightning Damage while\n{variant:}affected by Purity of Lightning"`
Co-authored-by: LocalIdentity <localidentity2@gmail.com>
This commit is contained in:
@@ -1077,7 +1077,8 @@ function ItemClass:BuildRaw()
|
||||
for varId in pairs(modLine.variantList) do
|
||||
varSpec = (varSpec and varSpec .. "," or "") .. varId
|
||||
end
|
||||
line = "{variant:" .. varSpec .. "}" .. line
|
||||
local var = "{variant:" .. varSpec .. "}"
|
||||
line = var .. line:gsub("\n", "\n" .. var) -- Variants that go over 1 line need to have the gsub to fix there being no "variant:" at the start
|
||||
end
|
||||
if modLine.modTags and #modLine.modTags > 0 then
|
||||
line = "{tags:" .. table.concat(modLine.modTags, ",") .. "}" .. line
|
||||
|
||||
@@ -3742,7 +3742,7 @@ c["20% of Damage taken Recouped as Mana"]={{[1]={flags=0,keywordFlags=0,name="Ma
|
||||
c["20% of Damage taken while affected by Clarity Recouped as Mana"]={{[1]={[1]={type="Condition",var="AffectedByClarity"},flags=0,keywordFlags=0,name="ManaRecoup",type="BASE",value=20}},nil}
|
||||
c["20% of Fire Damage from Hits taken as Cold Damage"]={{[1]={flags=0,keywordFlags=0,name="FireDamageFromHitsTakenAsCold",type="BASE",value=20}},nil}
|
||||
c["20% of Fire and Cold Damage taken as Lightning Damage while"]={{[1]={flags=0,keywordFlags=0,name="FireDamageTakenAsLightning",type="BASE",value=20},[2]={flags=0,keywordFlags=0,name="ColdDamageTakenAsLightning",type="BASE",value=20}}," while "}
|
||||
c["20% of Fire and Cold Damage taken as Lightning Damage while Immune to Shock while affected by Purity of Lightning"]={{[1]={[1]={type="Condition",var="AffectedByPurityofLightning"},flags=0,keywordFlags=0,name="FireDamageTakenAsLightning",type="BASE",value=20},[2]={[1]={type="Condition",var="AffectedByPurityofLightning"},flags=0,keywordFlags=0,name="ColdDamageTakenAsLightning",type="BASE",value=20}}," while Immune to Shock "}
|
||||
c["20% of Fire and Cold Damage taken as Lightning Damage while affected by Purity of Lightning"]={{[1]={[1]={type="Condition",var="AffectedByPurityofLightning"},flags=0,keywordFlags=0,name="FireDamageTakenAsLightning",type="BASE",value=20},[2]={[1]={type="Condition",var="AffectedByPurityofLightning"},flags=0,keywordFlags=0,name="ColdDamageTakenAsLightning",type="BASE",value=20}},nil}
|
||||
c["20% of Fire and Lightning Damage taken as Cold Damage while affected by Purity of Ice"]={{[1]={[1]={type="Condition",var="AffectedByPurityofIce"},flags=0,keywordFlags=0,name="FireDamageTakenAsCold",type="BASE",value=20},[2]={[1]={type="Condition",var="AffectedByPurityofIce"},flags=0,keywordFlags=0,name="LightningDamageTakenAsCold",type="BASE",value=20}},nil}
|
||||
c["20% of Leech is Instant while wielding a Claw"]={{[1]={[1]={type="Condition",var="UsingClaw"},flags=0,keywordFlags=0,name="InstantEnergyShieldLeech",type="BASE",value=20},[2]={[1]={type="Condition",var="UsingClaw"},flags=0,keywordFlags=0,name="InstantManaLeech",type="BASE",value=20},[3]={[1]={type="Condition",var="UsingClaw"},flags=0,keywordFlags=0,name="InstantLifeLeech",type="BASE",value=20}},nil}
|
||||
c["20% of Lightning Damage Leeched as Life during Effect"]={{[1]={[1]={type="Condition",var="UsingFlask"},flags=0,keywordFlags=0,name="LightningDamageLifeLeech",type="BASE",value=20}},nil}
|
||||
|
||||
@@ -680,19 +680,25 @@ local indexSublimeVision = 1
|
||||
local indexVoranasMarch = 2
|
||||
for _, mod in ipairs(data.uniqueMods["Watcher's Eye"]) do
|
||||
if not (mod.Id:match("^SublimeVision") or mod.Id:match("^SummonArbalist")) then
|
||||
if watchersEyeLegacyMods[mod.Id] then
|
||||
if watchersEyeLegacyMods[mod.Id].legacyMod then
|
||||
table.insert(watchersEye, "{variant:" .. indexWatchersEye .. "}" .. watchersEyeLegacyMods[mod.Id].legacyMod(mod.mod[1]))
|
||||
if watchersEyeLegacyMods[mod.Id] then
|
||||
if watchersEyeLegacyMods[mod.Id].legacyMod then
|
||||
for i, _ in ipairs(mod.mod) do
|
||||
table.insert(watchersEye, "{variant:" .. indexWatchersEye .. "}" .. watchersEyeLegacyMods[mod.Id].legacyMod(mod.mod[i]))
|
||||
end
|
||||
indexWatchersEye = indexWatchersEye + 1
|
||||
end
|
||||
if watchersEyeLegacyMods[mod.Id].version or watchersEyeLegacyMods[mod.Id].rename then
|
||||
for i, _ in ipairs(mod.mod) do
|
||||
table.insert(watchersEye, "{variant:" .. indexWatchersEye .. "}" .. mod.mod[i])
|
||||
end
|
||||
indexWatchersEye = indexWatchersEye + 1
|
||||
end
|
||||
else
|
||||
for i, _ in ipairs(mod.mod) do
|
||||
table.insert(watchersEye, "{variant:" .. indexWatchersEye .. "}" .. mod.mod[i])
|
||||
end
|
||||
indexWatchersEye = indexWatchersEye + 1
|
||||
end
|
||||
if watchersEyeLegacyMods[mod.Id].version or watchersEyeLegacyMods[mod.Id].rename then
|
||||
table.insert(watchersEye, "{variant:" .. indexWatchersEye .. "}" .. mod.mod[1])
|
||||
indexWatchersEye = indexWatchersEye + 1
|
||||
end
|
||||
else
|
||||
table.insert(watchersEye, "{variant:" .. indexWatchersEye .. "}" .. mod.mod[1])
|
||||
indexWatchersEye = indexWatchersEye + 1
|
||||
end
|
||||
elseif not mod.Id:match("^SummonArbalist") then
|
||||
for i, _ in ipairs(mod.mod) do
|
||||
table.insert(sublimeVision, "{variant:" .. indexSublimeVision .. "}" .. mod.mod[i])
|
||||
|
||||
Reference in New Issue
Block a user