Chance-weighted average attack/cast time of Retaliation Skills

Open
#10,140 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 8 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
lua
Domain
game-dev

Research direction

The issue provides a Ruby sample for calculating chance-weighted retaliation timing but names no project files or tests. Start by locating the retaliation-skill reuse and attack-time calculations, then determine where the requested average belongs; done means retaliation skill reuse is represented in the planner's timing results.

Written by the indexing model from the issue text.

Description

enhancement
Check for duplicates
  • I've checked for duplicate open and closed issues by using the search function of the issue tracker
What platform are you running Path of Building on?

Windows

Is your feature request related to a problem?

PoB cannot consider retaliation skills reusage.
I have developed a formula and calculation algorithm for the average attack time, taking into account the cooldown probability of retaliation skills, so please consider implementing this.

Describe the solution you'd like

Here is some sample code written in Ruby


puts "attack time ?"
a = gets.to_f

puts "usable time ?"
u = gets.to_f
puts "usable time mod% ?"
u = u * (1 + gets.to_i / 100)

puts "cooldown?"
d = gets.to_f

puts "chance to multiple retaliation?"
r = gets.to_f

x = (u/a).ceil

puts "max number of attacks " + x.to_s

avg = 0.0

for t in 1..x do
	avg += (1 - r**(t)) * (a + ((d - a) / t))  # [The probability that reuse will end after the t-th use ]*[Average attack time after t uses] 
end

avg /= x

puts "avg,attack time : " + avg.to_s

Describe alternatives you've considered

No response

Additional context

No response

Dominant language
Lua
Stars
5.5k
Forks
2.4k
Avg merge
6d 14h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PathOfBuildingCommunity/PathOfBuilding

All issues in PathOfBuildingCommunity/PathOfBuilding

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.