Skip to content

Commit 6f0a70a

Browse files
ibabdeibabdeLocalIdentityLocalIdentity
authored
Add support for more reservation efficiency and non-minion skill pre … (#1761)
* add support for more reservation efficiency and non-minion skill pre flag * fix efficiencymore != 1 * align label more/less * Formatting + Blasphemy Forgot to add the more reservation efficiency for Blasphemy in case GGG adds it in the future --------- Co-authored-by: ibabde <ibabde@proton.com> Co-authored-by: LocalIdentity <localidentity2@gmail.com> Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com>
1 parent 48929f0 commit 6f0a70a

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/Classes/CalcBreakdownControl.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ function CalcBreakdownClass:AddBreakdownSection(sectionData)
183183
{ label = "More/less", key = "more" },
184184
{ label = "Inc/red", key = "inc" },
185185
{ label = "Efficiency", key = "efficiency" },
186+
{ label = "Efficiency More/less", key = "efficiencyMore" },
186187
{ label = "Count", key = "count" },
187188
{ label = "Reservation", key = "total" },
188189
}

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5664,7 +5664,7 @@ c["Non-Channelling Spells deal 6% increased Damage per 100 maximum Life"]={{[1]=
56645664
c["Non-Channelling Spells have 3% increased Critical Hit Chance per 100 maximum Life"]={{[1]={[1]={neg=true,skillType=48,type="SkillType"},[2]={div=100,stat="Life",type="PerStat"},flags=2,keywordFlags=0,name="CritChance",type="INC",value=3}},nil}
56655665
c["Non-Channelling Spells have 5% increased Critical Hit Chance per 100 maximum Life"]={{[1]={[1]={neg=true,skillType=48,type="SkillType"},[2]={div=100,stat="Life",type="PerStat"},flags=2,keywordFlags=0,name="CritChance",type="INC",value=5}},nil}
56665666
c["Non-Keystone Passive Skills in Medium Radius of allocated Keystone Passive Skills can be allocated without being connected to your tree"]={{[1]={flags=0,keywordFlags=0,name="AllocateFromNodeRadius",type="LIST",value={from="Keystone",radiusIndex=2,to={[1]="Notable",[2]="Normal"}}}},nil}
5667-
c["Non-Minion Skills have 50% less Reservation Efficiency"]={nil,"Non-Minion Skills have 50% less Reservation Efficiency "}
5667+
c["Non-Minion Skills have 50% less Reservation Efficiency"]={{[1]={[1]={neg=true,skillType=6,type="SkillType"},flags=0,keywordFlags=0,name="ReservationEfficiency",type="MORE",value=-50}},nil}
56685668
c["Non-Unique Time-Lost Jewels have 40% increased radius"]={nil,"Non-Unique Time-Lost Jewels have 40% increased radius "}
56695669
c["Offering Skills have 15% increased Buff effect"]={{[1]={[1]={skillType=154,type="SkillType"},flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=15}},nil}
56705670
c["Offering Skills have 20% increased Area of Effect"]={{[1]={[1]={skillType=154,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=20}},nil}

src/Modules/CalcDefence.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
233233
values.more = skillModList:More(skillCfg, name.."Reserved", "Reserved")
234234
values.inc = skillModList:Sum("INC", skillCfg, name.."Reserved", "Reserved")
235235
values.efficiency = m_max(skillModList:Sum("INC", skillCfg, name.."ReservationEfficiency", "ReservationEfficiency"), -100)
236+
values.efficiencyMore = skillModList:More(skillCfg, name.."ReservationEfficiency", "ReservationEfficiency")
236237
-- used for Arcane Cloak calculations in ModStore.GetStat
237238
actor[name.."Efficiency"] = values.efficiency
238239
if activeSkill.skillData[name.."ReservationFlatForced"] then
@@ -241,7 +242,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
241242
local baseFlatVal = values.baseFlat * mult
242243
values.reservedFlat = 0
243244
if values.more > 0 and values.inc > -100 and baseFlatVal ~= 0 then
244-
values.reservedFlat = m_max(round(baseFlatVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100), 0), 0)
245+
values.reservedFlat = m_max(round(baseFlatVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100) / values.efficiencyMore, 0), 0)
245246
end
246247
end
247248
if activeSkill.skillData[name.."ReservationPercentForced"] then
@@ -250,7 +251,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
250251
local basePercentVal = values.basePercent * mult
251252
values.reservedPercent = 0
252253
if values.more > 0 and values.inc > -100 and basePercentVal ~= 0 then
253-
values.reservedPercent = m_max(round(basePercentVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100), 2), 0)
254+
values.reservedPercent = m_max(round(basePercentVal * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100) / values.efficiencyMore, 2), 0)
254255
end
255256
end
256257
if activeSkill.activeMineCount then
@@ -272,7 +273,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
272273

273274
-- Extra reservation of blasphemy needs to be separated from the reservation caused by curses
274275
local blasphemyFlat = activeSkill.skillData["blasphemyReservationFlat" .. name]
275-
local blasphemyEffectiveFlat = m_max(round(blasphemyFlat * mult * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100), 0), 0)
276+
local blasphemyEffectiveFlat = m_max(round(blasphemyFlat * mult * (100 + values.inc) / 100 * values.more / (1 + values.efficiency / 100) / values.efficiencyMore, 0), 0)
276277
values.reservedFlat = values.reservedFlat + blasphemyEffectiveFlat * instances
277278
end
278279
-- Blood Sacrament increases reservation per stage channelled
@@ -291,6 +292,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
291292
more = values.more ~= 1 and ("x "..values.more),
292293
inc = values.inc ~= 0 and ("x "..(1 + values.inc / 100)),
293294
efficiency = values.efficiency ~= 0 and ("x " .. round(100 / (100 + values.efficiency), 4)),
295+
efficiencyMore = values.efficiencyMore ~= 1 and ("x "..values.efficiencyMore),
294296
count = values.count and ("x " ..values.count),
295297
total = values.reservedFlat,
296298
})
@@ -308,6 +310,7 @@ function calcs.doActorLifeManaSpiritReservation(actor)
308310
more = values.more ~= 1 and ("x "..values.more),
309311
inc = values.inc ~= 0 and ("x "..(1 + values.inc / 100)),
310312
efficiency = values.efficiency ~= 0 and ("x " .. round(100 / (100 + values.efficiency), 4)),
313+
efficiencyMore = values.efficiencyMore ~= 1 and ("x "..values.efficiencyMore),
311314
total = values.reservedPercent .. "%",
312315
})
313316
end

src/Modules/ModParser.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,7 @@ local preFlagList = {
11971197
["^golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillType", skillType = SkillType.Golem } },
11981198
["^summoned golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillType", skillType = SkillType.Golem } },
11991199
["^golem skills have "] = { tag = { type = "SkillType", skillType = SkillType.Golem } },
1200+
["^non%-minion skills have "] = { tag = { type = "SkillType", skillType = SkillType.Minion, neg = true } },
12001201
["^zombies [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie", includeTransfigured = true } },
12011202
["^raised zombies [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie", includeTransfigured = true } },
12021203
["^skeletons [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Skeletons", includeTransfigured = true } },

0 commit comments

Comments
 (0)