Goldmine Bug

Started by Briar, November 14, 2017, 04:51:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Briar

172/172 ratio, ran gold mine 25 times 3 times in a row.  Got three different amounts (12m, 10m, 9m)

Didn't lose any leaders (obviously). Shouldn't it be the same amount all three times?
At the risk of ruining Briar's career by disparaging her find of the famous Sackaleaderer horse...

Quote from: Ungatt Trunn II
Yes. I wear high heels Krowdon. Any tips on how I should do my hair?

windhound

Goldmine is loot x1.8 (yes, it says double, don't ask me why it's 1.8)
The snip of code that calcs how much money you get is just:
$money = cashandfood() * 1.8;

The cashandfood function is:
$users[wizards] * $users[health] / 100 * 32 * (1 + $users[labs] / $users[land]) * (1 + $users[labs] / $users[land]) * $urace[magic] / (calcSizeBonus($users[networth]) * calcSizeBonus($users[networth]));

So:
leaders * health / 100 * 32 * (1 + huts / land)^2 * race-magic-bonus / networth-based-bonus^2

the networth-based-bonus is calculated:
function calcSizeBonus($networth) {
    if ($networth <= 100000)
        $size = 0.524;
    elseif ($networth <= 500000)
        $size = 0.887;
    elseif ($networth <= 1000000)
        $size = 1.145;
    elseif ($networth <= 10000000)
        $size = 1.294;
    elseif ($networth <= 100000000)
        $size = 1.454;
    else
        $size = 1.674;
    return $size;
}

tl:dr:  it's entirely possible to get different amounts each turn, esp if you started with low health or crossed a networth  mark 

If you still feel something is amiss post a few screenshots next time it happens
Cheers
A Goldfish has an attention span of 3 seconds...  so do I
~ In the beginning there was nothing, which exploded ~
There are only 10 types of people in the world: Those who understand binary, and those who don't

Briar

Must have crossed a NW mark.  I'll take a look next spell run.  Thanks.
At the risk of ruining Briar's career by disparaging her find of the famous Sackaleaderer horse...

Quote from: Ungatt Trunn II
Yes. I wear high heels Krowdon. Any tips on how I should do my hair?