% Chance of Rolling a Wish |
---|
{{Val}} |
% Chance of Rolling {{wishesDesired}} or More Wishes in {{rollAmount}} Rolls |
{{Prob}} |
Instructions
To get the number of unclaimed wishes in a roll type use the $wltu command
To get the bonuses use the $bonus command
To get the number of disabled characters in a roll type use the $dld command
To get the number of characthers in a roll type use the $bonus command
To get the personal rare value use the $persr command
To get the bonuses use the $bonus command
To get the number of disabled characters in a roll type use the $dld command
To get the number of characthers in a roll type use the $bonus command
To get the personal rare value use the $persr command
The Formula
The Formula for % Chance of Rolling a Wish
Let \(wl\) be the number of wishes in your roll type, \(wb_B\) be badge wish boost, and \(wb_F\) be the fist wish boost, \(wp\) be the wish prorection rate, \(C_D\) be the number of disabled characters in your roll type, \(C_L\) be the number of unclaimed characters in your roll type, \(C_T\) be the total number of characters in your roll type, and \(pr\) be your personal rare value.
\[
\begin{aligned}
P &= wp + \frac{wl × (1 + \frac{wb_B}{100}) + \frac{wb_F}{100}}{C_L - C_D + ((1 - \frac{C_L}{C_T})^{pr} )× C_T}
\end{aligned}
\]
The Formula for % Chance of Rolling \(x\) or More Wishes in \(n\) Rolls
For this formula we'll take the \(P\) from the previous formula and set it as \(p\) which is the probability of rolling a wish, then we take \(p\) and use it to get \(q\) which is \(1-p\) or the possibility of not rolling a wish, then we set \(x\) to the number of wishes you want, and \(n\) as the number of rolls you have
\[
\begin{aligned}
P(z) &= \sum_{z=x}^{n}\frac{n!}{(n-z)!z!}p^{z}q^{n-z}
\end{aligned}
\]
The Code
This is a simple JavaScript code snippet that just implements the formula shown above.
function WishSpawnRate(WL, WBB, WBF, CD, CL, CT, PR, WP) {
return (WL * (1 + WBB / 100) + WBF / 100) / (CL - CD + ((1 - (CL) / (CT)) ** PR) * CT) + (1 / WP);
}
This is a simple Python code snippet that just implements the formula shown above.
def WishSpawnRate(WL, WBB, WBF, CD, CL, CT, PR, WP):
return (WL * (1 + WBB / 100) + WBF / 100) / (CL - CD + ((1 - (CL) / (CT)) ** PR) * CT) + (1 / WP)