Skip to content

Commit ad95d2d

Browse files
committed
Add support for Atziri's Communion support gem
Supports Persistent Skills by reserving Life instead of Spirit.
1 parent 7d1aa43 commit ad95d2d

5 files changed

Lines changed: 89 additions & 1 deletion

File tree

src/Data/Gems.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17432,6 +17432,25 @@ return {
1743217432
Tier = 0,
1743317433
naturalMaxLevel = 1,
1743417434
},
17435+
["Metadata/Items/Gems/SkillGemAtzirisCommunionSupport"] = {
17436+
name = "Atziri's Communion",
17437+
gameId = "Metadata/Items/Gem/SupportGemAtzirisCommunion",
17438+
variantId = "AtzirisCommunionSupport",
17439+
grantedEffectId = "SupportAtzirisCommunionPlayer",
17440+
tags = {
17441+
support = true,
17442+
lineage = true,
17443+
persistent = true,
17444+
},
17445+
gemType = "Support",
17446+
gemFamily = "Atziri's Communion",
17447+
tagString = "Lineage, Persistent",
17448+
reqStr = 0,
17449+
reqDex = 0,
17450+
reqInt = 100,
17451+
Tier = 0,
17452+
naturalMaxLevel = 1,
17453+
},
1743517454
["Metadata/Items/Gems/SkillGemAtzirisImpatienceSupport"] = {
1743617455
name = "Atziri's Impatience",
1743717456
gameId = "Metadata/Items/Gem/SupportGemAtzirisImpatience",

src/Data/SkillStatMap.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ return {
179179
["base_skill_reserve_life_instead_of_mana"] = {
180180
flag("BloodMagicReserved"),
181181
},
182+
["skill_reserves_X_life_permyriad_per_spirit_instead_of_spirit"] = {
183+
mod("LifeReservePercentPerSpirit", "BASE", nil),
184+
div = 100,
185+
},
182186
["base_skill_cost_life_instead_of_mana"] = {
183187
flag("CostLifeInsteadOfMana"),
184188
},

src/Data/Skills/sup_int.lua

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,38 @@ skills["SupportAstralProjectionPlayer"] = {
654654
},
655655
}
656656
}
657+
skills["SupportAtzirisCommunionPlayer"] = {
658+
name = "Atziri's Communion",
659+
description = "Supports Persistent Skills, making them Reserve Life instead of Spirit. Cannot Support Skills which create Minions.",
660+
color = 3,
661+
support = true,
662+
requireSkillTypes = { SkillType.Persistent, },
663+
addSkillTypes = { },
664+
excludeSkillTypes = { SkillType.CreatesMinion, },
665+
gemFamily = { "AtziriCommunionLineage",},
666+
isLineage = true,
667+
flavourText = {"The Red Communion was meant to transcend the limits", "of the soul, to transfigure the flesh, to bestow immortality.", "It accomplished all of these things... most horribly.", },
668+
levels = {
669+
[1] = { levelRequirement = 0, },
670+
},
671+
statSets = {
672+
[1] = {
673+
label = "Atziri's Communion",
674+
incrementalEffectiveness = 0.054999999701977,
675+
statDescriptionScope = "gem_stat_descriptions",
676+
baseFlags = {
677+
},
678+
constantStats = {
679+
{ "skill_reserves_X_life_permyriad_per_spirit_instead_of_spirit", 66 },
680+
},
681+
stats = {
682+
},
683+
levels = {
684+
[1] = { actorLevel = 1, },
685+
},
686+
},
687+
}
688+
}
657689
skills["SupportAtzirisAllurePlayer"] = {
658690
name = "Atziri's Allure",
659691
description = "Supports Curse Spells you cast yourself, causing those Curses to ignore the usual Curse Limit, but be reflected back to you when inflicted.",

src/Export/Skills/sup_int.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ statMap = {
107107
#mods
108108
#skillEnd
109109

110+
#skill SupportAtzirisCommunionPlayer
111+
#set SupportAtzirisCommunionPlayer
112+
#mods
113+
#skillEnd
114+
110115
#skill SupportAtzirisAllurePlayer
111116
#set SupportAtzirisAllurePlayer
112117
statMap = {

src/Modules/CalcDefence.lua

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,15 @@ function calcs.doActorLifeManaSpiritReservation(actor)
235235
activeSkill.skillData["LifeReservationPercentForced"] = activeSkill.skillData["ManaReservationPercentForced"]
236236
activeSkill.skillData["ManaReservationPercentForced"] = nil
237237
end
238+
do
239+
local lifePerSpirit = skillModList:Sum("BASE", skillCfg, "LifeReservePercentPerSpirit")
240+
if lifePerSpirit > 0 then
241+
pool.Life.basePercent = pool.Life.basePercent + pool.Spirit.baseFlat * lifePerSpirit
242+
pool.Spirit.baseFlat = 0
243+
pool.Life.basePercent = pool.Life.basePercent + pool.Spirit.basePercent * lifePerSpirit
244+
pool.Spirit.basePercent = 0
245+
end
246+
end
238247
for name, values in pairs(pool) do
239248
values.more = skillModList:More(skillCfg, name.."Reserved", "Reserved")
240249
values.inc = skillModList:Sum("INC", skillCfg, name.."Reserved", "Reserved")
@@ -280,7 +289,26 @@ function calcs.doActorLifeManaSpiritReservation(actor)
280289
-- Extra reservation of blasphemy needs to be separated from the reservation caused by curses
281290
local blasphemyFlat = activeSkill.skillData["blasphemyReservationFlat" .. name]
282291
local blasphemyEffectiveFlat = m_max(round(blasphemyFlat * mult * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100) / values.efficiencyMore, 0), 0)
283-
values.reservedFlat = values.reservedFlat + blasphemyEffectiveFlat * instances
292+
local lifePerSpirit = skillModList:Sum("BASE", skillCfg, "LifeReservePercentPerSpirit")
293+
if name == "Spirit" and lifePerSpirit > 0 then
294+
local lifeBasePercent = blasphemyFlat * instances * lifePerSpirit
295+
local lifeEffectivePercent = m_max(round(lifeBasePercent * mult * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100) / values.efficiencyMore, 2), 0)
296+
actor["reserved_LifePercent"] = actor["reserved_LifePercent"] + lifeEffectivePercent
297+
if breakdown then
298+
t_insert(breakdown["LifeReserved"].reservations, {
299+
skillName = activeSkill.activeEffect.grantedEffect.name,
300+
base = lifeBasePercent .. "%",
301+
mult = mult ~= 1 and ("x "..mult),
302+
more = values.more ~= 1 and ("x "..values.more),
303+
inc = values.inc ~= 0 and ("x "..(1 + values.inc / 100)),
304+
efficiency = values.efficiency ~= 0 and ("x " .. round(100 / (100 + values.efficiency), 4)),
305+
efficiencyMore = values.efficiencyMore ~= 1 and ("x "..values.efficiencyMore),
306+
total = lifeEffectivePercent .. "%",
307+
})
308+
end
309+
else
310+
values.reservedFlat = values.reservedFlat + blasphemyEffectiveFlat * instances
311+
end
284312
end
285313
-- Blood Sacrament increases reservation per stage channelled
286314
if activeSkill.skillCfg.skillName == "Blood Sacrament" and activeSkill.activeStageCount then

0 commit comments

Comments
 (0)