Skip to content

Commit 44e1b58

Browse files
committed
Add preliminary "added phys based on gem level"
1 parent d7b6c98 commit 44e1b58

3 files changed

Lines changed: 57 additions & 1 deletion

File tree

src/Modules/CalcActiveSkill.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,16 @@ function calcs.buildActiveSkillModList(env, activeSkill)
691691
activeEffect.srcInstance.skillStageCount = nil
692692
end
693693

694+
-- TODO If the table stats are present on each gem, this can be handled via SkillStatMap instead
695+
-- Hollow Palm Technique added phys for skills that would use Quarterstaff
696+
if activeSkill.actor.modDB.conditions.HollowPalm and activeEffect.grantedEffect.weaponTypes and activeEffect.grantedEffect.weaponTypes.Staff then
697+
local gemLevel = activeEffect.level
698+
local physMin = data.hollowPalmAddedPhys[gemLevel and gemLevel or 1][1]
699+
local physMax = data.hollowPalmAddedPhys[gemLevel and gemLevel or 1][2]
700+
skillModList:NewMod("PhysicalMin", "BASE", physMin, "Hollow Palm Technique", ModFlag.Attack, nil, { type = "Condition", var = "HollowPalm" })
701+
skillModList:NewMod("PhysicalMax", "BASE", physMax, "Hollow Palm Technique", ModFlag.Attack, nil, { type = "Condition", var = "HollowPalm" })
702+
end
703+
694704
-- Extract skill data
695705
for _, value in ipairs(env.modDB:List(activeSkill.skillCfg, "SkillData")) do
696706
activeSkill.skillData[value.key] = value.value

src/Modules/CalcSetup.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ function calcs.initEnv(build, mode, override, specEnv)
13861386
-- Hollow Palm Technique
13871387
if (not env.player.itemList["Weapon 1"]) and env.modDB.mods.Keystone then
13881388
for _, keystone in ipairs(env.modDB.mods.Keystone) do
1389-
if keystone.value == "Eternal Youth" then -- TODO Update to correct Keystone value "Hollow Palm"
1389+
if keystone.value == "Eternal Youth" then -- TODO Update to correct Keystone value "Hollow Palm Technique"
13901390
env.player.weaponData2 = copyTable(env.data.unarmedWeaponData[env.classId])
13911391
for i = 1, 2 do
13921392
env.player["weaponData" .. tostring(i)].asThoughUsing = env.player["weaponData" .. tostring(i)].asThoughUsing or { }

src/Modules/Data.lua

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,52 @@ data.unarmedWeaponData = {
511511
[6] = { type = "None", AttackRate = 1.4, CritChance = 5, PhysicalMin = 2, PhysicalMax = 5 }, -- Shadow
512512
}
513513

514+
-- TODO update/remove once game data is available
515+
-- Note: I'm not sure whether this data will be on all usable gems or just a new central table. Using this one for testing for now based on old Shattering Palm values
516+
-- If it is the same table for all skills it will likely appear in `Misc.lua`
517+
data.hollowPalmAddedPhys = {
518+
[1] = { 6, 9 },
519+
[2] = { 10, 14 },
520+
[3] = { 15, 22 },
521+
[4] = { 20, 31 },
522+
[5] = { 26, 40 },
523+
[6] = { 33, 49 },
524+
[7] = { 39, 59 },
525+
[8] = { 46, 70 },
526+
[9] = { 54, 81 },
527+
[10] = { 62, 92 },
528+
[11] = { 70, 105 },
529+
[12] = { 78, 117 },
530+
[13] = { 87, 130 },
531+
[14] = { 96, 144 },
532+
[15] = { 106, 159 },
533+
[16] = { 116, 173 },
534+
[17] = { 126, 189 },
535+
[18] = { 136, 205 },
536+
[19] = { 147, 221 },
537+
[20] = { 159, 238 },
538+
[21] = { 170, 256 },
539+
[22] = { 182, 274 },
540+
[23] = { 195, 292 },
541+
[24] = { 208, 311 },
542+
[25] = { 221, 331 },
543+
[26] = { 234, 351 },
544+
[27] = { 248, 372 },
545+
[28] = { 262, 393 },
546+
[29] = { 277, 415 },
547+
[30] = { 291, 437 },
548+
[31] = { 307, 460 },
549+
[32] = { 322, 484 },
550+
[33] = { 338, 507 },
551+
[34] = { 355, 532 },
552+
[35] = { 371, 557 },
553+
[36] = { 388, 583 },
554+
[37] = { 406, 609 },
555+
[38] = { 423, 635 },
556+
[39] = { 442, 662 },
557+
[40] = { 460, 690 },
558+
}
559+
514560
data.setJewelRadiiGlobally = function(treeVersion)
515561
local tMajor, tMinor = treeVersion:match("(%d+)_(%d+)")
516562
tMajor, tMinor = tonumber(tMajor), tonumber(tMinor)

0 commit comments

Comments
 (0)