@@ -2434,16 +2434,41 @@ function calcs.offence(env, actor, activeSkill)
24342434 -- Does not take into account mines or traps
24352435 if activeSkill .activeEffect .grantedEffect .name == " Explosive Arrow" and activeSkill .skillPart == 2 then
24362436 local hitRate = output .HitChance / 100 * globalOutput .Speed * globalOutput .ActionSpeedMod * skillData .dpsMultiplier
2437+ local initialHitRate = hitRate
2438+ local activeTotems = 1
24372439 if skillFlags .totem then
2438- local activeTotems = env .modDB :Override (nil , " TotemsSummoned" ) or skillModList :Sum (" BASE" , skillCfg , " ActiveTotemLimit" , " ActiveBallistaLimit" )
2440+ activeTotems = env .modDB :Override (nil , " TotemsSummoned" ) or skillModList :Sum (" BASE" , skillCfg , " ActiveTotemLimit" , " ActiveBallistaLimit" )
24392441 hitRate = hitRate * activeTotems
24402442 end
24412443 local duration = calcSkillDuration (activeSkill .skillModList , activeSkill .skillCfg , activeSkill .skillData , env , enemyDB )
24422444 local skillMax = activeSkill .skillModList :Sum (" BASE" , env .player .mainSkill .skillCfg , " ExplosiveArrowMaxFuseCount" )
24432445 local maximum = m_min (m_floor (hitRate * duration ) + 1 , skillMax )
2446+ local timeToMaximum = maximum / hitRate
24442447 skillModList :NewMod (" Multiplier:ExplosiveArrowStage" , " BASE" , maximum , " Base" )
24452448 skillModList :NewMod (" Multiplier:ExplosiveArrowStageAfterFirst" , " BASE" , maximum - 1 , " Base" )
24462449 globalOutput .MaxExplosiveArrowFuseCalculated = maximum
2450+ globalOutput .ExplosionsPerSecond = 1 / timeToMaximum
2451+ if globalBreakdown then
2452+ globalBreakdown .MaxExplosiveArrowFuseCalculated = {}
2453+ if skillFlags .totem then
2454+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" %.2f ^8(attack rate)" , initialHitRate ))
2455+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" x %d ^8(active totems)" , activeTotems ))
2456+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" = %.2f ^8(hit rate)" , hitRate ))
2457+ else
2458+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" %.2f ^8(hit rate)" , hitRate ))
2459+ end
2460+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" x %.2f ^8(duration)" , duration ))
2461+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" + 1 ^8(initial hit)" ))
2462+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" = %.2f" , (hitRate * duration ) + 1 ))
2463+ t_insert (globalBreakdown .MaxExplosiveArrowFuseCalculated , s_format (" = %d ^8(rounded down, capped at max)" , maximum ))
2464+
2465+ globalBreakdown .ExplosionsPerSecond = {}
2466+ t_insert (globalBreakdown .ExplosionsPerSecond , s_format (" 1 ^8(second)" ))
2467+ t_insert (globalBreakdown .ExplosionsPerSecond , s_format (" / %d ^8(max fuses)" , maximum ))
2468+ t_insert (globalBreakdown .ExplosionsPerSecond , s_format (" / %.2f ^8(hit rate)" , hitRate ))
2469+ t_insert (globalBreakdown .ExplosionsPerSecond , s_format (" = %.2f ^8(expl. per second)" , globalOutput .ExplosionsPerSecond ))
2470+
2471+ end
24472472 else
24482473 globalOutput .MaxExplosiveArrowFuseCalculated = nil
24492474 end
0 commit comments