Created
November 7, 2020 06:37
-
-
Save Hidden50/82d8da29454b8ce924f69fc0055fd101 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const f = ({bingos, reactionTime = 0.1, share, stay, whack, waitless}) => { | |
const baseCastTime = 1.5; // estimate | |
const baseCooldown = 8; | |
const baseBuffDuration = 20; | |
const castTime = baseCastTime * (1 + whack); | |
const cooldown = baseCooldown * (1 + bingos + 0.5 * whack - 0.05 * waitless); | |
const buffStrength = share / 10 * (1 + whack); | |
const buffDuration = baseBuffDuration * (1 + 0.25 * stay); | |
const timeBetweenBuffs = reactionTime + castTime + cooldown; | |
return buffStrength * buffDuration / timeBetweenBuffs; // average buff strength over time | |
}; | |
const options = [ | |
{bingos: -0.15, share:3, stay:0, whack: 0, waitless:0}, | |
{bingos: -0.15, share:2, stay:1, whack: 0, waitless:0}, | |
{bingos: -0.15, share:2, stay:0, whack: 0, waitless:1}, | |
{bingos: -0.15, share:2, stay:0, whack: 1, waitless:0}, | |
{bingos: -0.15, share:2, stay:0, whack: 0, waitless:0}, | |
{bingos: -0.15, share:1, stay:1, whack: 0, waitless:1}, | |
{bingos: -0.15, share:1, stay:1, whack: 1, waitless:0}, | |
]; | |
return options.map( x => [x, f(x)] ) | |
.map( ([x, averageBuffStrength]) => `${JSON.stringify(x).replace(/"/g, '').replace(/,\s*/g, ', ')} => ${Math.floor(100 * averageBuffStrength)}%` ) | |
.join("\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment