@@ -274,16 +274,53 @@ local function setMoltenStrikeTertiaryRadiusBreakdown(breakdown, deadzoneRadius,
274
274
-- Trigger the inclusion of the radius display.
275
275
breakdownRadius .radius = currentDist
276
276
end
277
+ -- Returns base reload time according to stored values of Crossbow item base that is used for the skill
278
+ -- NOTE: This is a temporary workaround to allow for testing until the export of Reload Time data from the game files is sorted out
279
+ -- TODO: get data from item base itself rather than using hardcoded values
280
+ --- @param actor table @actor table that contains the data for the weapon
281
+ --- @return number
282
+ local function getCrossbowBaseReloadTime (actor )
283
+ local weaponName = actor .weaponData1 .name or " No Weapon Equipped" -- assuming Crossbows can only be wielded in mainhand for now
284
+ local crossbowBases = {
285
+ [" Makeshift Crossbow" ] = 0.8 ,
286
+ [" Tense Crossbow" ] = 0.85 ,
287
+ [" Sturdy Crossbow" ] = 0.75 ,
288
+ [" Varnished Crossbow" ] = 0.8 ,
289
+ [" Dyad Crossbow" ] = 1.1 ,
290
+ [" Alloy Crossbow" ] = 0.7 ,
291
+ [" Bombard Crossbow" ] = 0.75 ,
292
+ [" Construct Crossbow" ] = 0.8 ,
293
+ [" Blackfire Crossbow" ] = 0.85 ,
294
+ [" Piercing Crossbow" ] = 0.85 ,
295
+ [" Cumbrous Crossbow" ] = 0.9 ,
296
+ [" Dedalian Crossbow" ] = 0.85 ,
297
+ [" Esoteric Crossbow" ] = 0.8 ,
298
+ [" Advanced Tense Crossbow" ] = 0.85 ,
299
+ [" Advanced Sturdy Crossbow" ] = 0.75 ,
300
+ [" Advanced Varnished Crossbow" ] = 0.8 ,
301
+ [" Advanced Dyad Crossbow" ] = 1.1 ,
302
+ [" Advanced Bombard Crossbow" ] = 0.75 ,
303
+ [" Advanced Forlorn Crossbow" ] = 0.8 ,
304
+ [" Expert Sturdy Crossbow" ] = 0.75 ,
305
+ [" Expert Varnished Crossbow" ] = 0.8 ,
306
+ [" Expert Tense Crossbow" ] = 0.85 ,
307
+ [" Expert Dyad Crossbow" ] = 1.1 ,
308
+ [" Expert Bombard Crossbow" ] = 0.75 ,
309
+ [" Expert Forlorn Crossbow" ] = 0.8 ,
310
+ }
277
311
312
+ for baseName , reloadTime in pairs (crossbowBases ) do
313
+ if string.find (weaponName , " , " .. baseName ) then return reloadTime end -- need to add ", " to avoid false matches from non-Advanced/Expert versions
314
+ end
315
+ return 0 -- in case there are no matches, it's an invalid base and reload time is ignored
316
+ end
278
317
-- Calculate and return reload time in seconds for a specific Crossbow skill
279
318
--- @param actor table @actor using the skill
280
319
--- @param ammoSkill table @skill of type SkillType.CrossbowAmmoSkill
281
320
--- @param boltSkill table @skill that uses the ammo to shoot bolts
282
321
--- @return number
283
322
local function calcCrossbowReloadTime (actor , ammoSkill , boltSkill )
284
- -- todo remove placeholder
285
- -- Currently using 0.8 seconds as placeholder value until I can get the proper base values exported
286
- local baseReloadTime = 0.8
323
+ local baseReloadTime = getCrossbowBaseReloadTime (actor )
287
324
local reloadTimeMulti = calcLib .mod (boltSkill .skillModList , boltSkill .skillCfg , " ReloadSpeed" )
288
325
return baseReloadTime / reloadTimeMulti
289
326
end
@@ -2470,9 +2507,7 @@ function calcs.offence(env, actor, activeSkill)
2470
2507
t_insert (globalBreakdown .TotalFiringTime , s_format (" = %.2fs ^8(total firing time)" , output .TotalFiringTime ))
2471
2508
2472
2509
globalBreakdown .ReloadTime = { }
2473
- -- TODO remove placeholder
2474
- -- Currently using 0.8 seconds as placeholder value until I can get the proper base values exported
2475
- local baseReloadTime = 0.8
2510
+ local baseReloadTime = getCrossbowBaseReloadTime (actor )
2476
2511
local incReloadSpeed = skillModList :Sum (" INC" , skillCfg , " ReloadSpeed" )
2477
2512
local moreReloadSpeed = (100 + skillModList :Sum (" MORE" , skillCfg , " ReloadSpeed" )) / 100
2478
2513
t_insert (globalBreakdown .ReloadTime , s_format (" 1.00s / %.2f ^8(base reload time)" , baseReloadTime ))
0 commit comments