mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Items/ExtraLoot
* corrected calculation after writing a simulator and some consultation * sad thing is, this will not even be visible after rounding for display
This commit is contained in:
@@ -1255,11 +1255,11 @@ class SpellPage extends GenericPage
|
|||||||
$pctStack = [];
|
$pctStack = [];
|
||||||
for ($i = 1; $i <= $maxStack; $i++)
|
for ($i = 1; $i <= $maxStack; $i++)
|
||||||
{
|
{
|
||||||
$pctStack[$i] = (($baseChance ** $i) * 100) / $baseChance ;
|
$pctStack[$i] = (($baseChance ** $i) * 100) / $baseChance;
|
||||||
|
|
||||||
// remove chance from previous stacks
|
// remove chance from previous stacks
|
||||||
for ($j = 1; $j < $i; $j++)
|
if ($i > 1)
|
||||||
$pctStack[$j] -= ($pctStack[$i] / ($i - 1));
|
$pctStack[$i-1] -= $pctStack[$i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanup tiny fractions
|
// cleanup tiny fractions
|
||||||
|
|||||||
Reference in New Issue
Block a user