Redwall: Warlords

  • February 25, 2018, 02:43:59 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

RWL Home Page
Are your Leaders dancing in the rain? Try out the Ferret race on Turbo!

Author Topic: Goldmine Bug  (Read 138 times)

0 Members and 1 Guest are viewing this topic.

Briar

  • Otterpop Empress
  • Permanent Resident
  • *******
  • Posts: 1,197
  • I'm a archaeoholic
    • View Profile
    • Email
Goldmine Bug
« on: November 14, 2017, 03:51:08 PM »

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?
Logged
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

  • Fish Are Loyal
  • Administrator
  • Permanent Resident
  • ******
  • Posts: 4,956
  • omnomnom
    • MSN Messenger - windhound96@yahoo.com
    • AOL Instant Messenger - windhound96
    • Yahoo Instant Messenger - windhound96
    • View Profile
Re: Goldmine Bug
« Reply #1 on: November 14, 2017, 05:45:59 PM »

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
Logged
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

  • Otterpop Empress
  • Permanent Resident
  • *******
  • Posts: 1,197
  • I'm a archaeoholic
    • View Profile
    • Email
Re: Goldmine Bug
« Reply #2 on: November 15, 2017, 09:34:24 AM »

Must have crossed a NW mark.  I'll take a look next spell run.  Thanks.
Logged
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?
 


* Shoutbox

Refresh History
  • Uiblis: Merry Christmas/happy holidays everyone
    December 26, 2017, 10:33:52 AM
  • Briar: Shads, were you able to code out the market for next round?
    December 28, 2017, 10:04:56 AM
  • Shadow: No, sorry. Not yet anyway, just too much going on this holiday season. I'll look into figuring out how to do it again. Not sure I even still have server access.
    December 28, 2017, 11:54:37 AM
  • Briar: Dang. Understandable. Too bad you can't just hide the button or something.....
    December 28, 2017, 05:12:54 PM
  • Shadow: surprised it isn't already
    December 29, 2017, 07:32:37 PM
  • windhound: If you guys want a no-market round I can probably make that work, no mercs is already coded
    December 29, 2017, 08:25:43 PM
  • Shadow: <3
    December 30, 2017, 12:54:48 PM
  • windhound: Server reset; will open signups in a bit, gotta do a code thing and make food
    December 31, 2017, 06:08:53 PM
  • windhound: Happy New Year btw
    December 31, 2017, 06:09:23 PM
  • windhound: and we're up
    December 31, 2017, 07:31:49 PM
  • Gen. Volkov: Sweet
    December 31, 2017, 10:09:45 PM
  • Gen. Volkov: Happy new year RWL
    December 31, 2017, 10:09:55 PM
  • Shadow: thanks wondy
    January 01, 2018, 08:57:42 AM
  • Firetooth: Field Rat-Stro the MVP of RWL names
    February 20, 2018, 02:52:19 PM
  • Firetooth: *fidel rat-stro
    February 20, 2018, 02:54:26 PM
  • Juska: Field Rat-Stro seems fitting though
    February 23, 2018, 07:40:34 PM
  • Juska: Also does anyone else find the inclusion of a horse in Redwall but no other books out of place?
    February 23, 2018, 07:41:58 PM
  • Shadow: HE WAS STILL FIGURING IT OUT THEN YOU CAN'T EXPECT THE PERFECTION OF THE WHILE SERIES IN THE FIRST ATTEMPT
    February 23, 2018, 10:10:52 PM
  • Briar: Shadow is passionate about this subject apparently.
    February 24, 2018, 02:37:19 PM
  • Shadow: I( mean sorry, caps
    February 24, 2018, 04:52:27 PM