xoxfaby / BetterUI

Risk of Rain 2 mod BetterUI
Other
62 stars 33 forks source link

Add Little Disciple fire rate to the ItemStats integration #112

Open BLucky-gh opened 2 years ago

BLucky-gh commented 2 years ago

The Little Disciple fire rate scales with movement speed, and the description specifies the base fire rate, it would be neat if it also showed the calculated fire rate (sorry for fullscreen screenshot, can't win+shift+s while holding tab) image

DestroyedClone commented 2 years ago

https://riskofrain2.fandom.com/wiki/Little_Disciple#Math

The time in seconds between each fired wisp is determined by the formula 35 / (3 ⋅ movementSpeed)

This lines up with the in-game component RoR2.Items.SprintWispBodyBehavior, as the fractional value appears to be the same. (https://www.desmos.com/calculator/x71oxoaiwh)

1f / (SprintWispBodyBehavior.fireRate * base.body.moveSpeed);
...
private static readonly float fireRate = 0.08571429f;