Redwall: Warlords

  • October 21, 2019, 11:23:19 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

RWL Home Page
redwall.org is back! Go check it out and spread the news!

Author Topic: Goldmine Bug  (Read 616 times)

0 Members and 1 Guest are viewing this topic.

Briar

  • Otterpop Empress
  • Permanent Resident
  • *******
  • Posts: 1,209
  • 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: 5,086
  • 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,209
  • 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
  • Shadow: I did my first solo flight!
    May 06, 2019, 08:25:42 AM
  • Shadow: Smoothest landing I've done yet, that was so satisfying
    May 06, 2019, 08:25:58 AM
  • Uiblis: I miss y'all and the glory days
    May 17, 2019, 09:18:44 PM
  • Uiblis: grats shadow! what kind of plane are you learning to fly?
    May 17, 2019, 09:20:45 PM
  • Shadow: Cessna 172 so far
    May 19, 2019, 02:30:06 PM
  • Disl: Reset pls?
    May 31, 2019, 09:48:24 PM
  • windhound: Posted the results earlier then got distracted, done!
    June 01, 2019, 07:26:15 PM
  • Shadow: flight training videos if you guys are interested: [link]
    June 04, 2019, 09:05:18 PM
  • windhound: oo, neat!
    June 18, 2019, 11:38:56 AM
  • Krowdon: Reset?
    July 02, 2019, 11:12:33 AM
  • windhound: whoops, done!
    July 04, 2019, 07:01:18 PM
  • Ian2424: Hey guys! I'm surprised this place is still up
    July 26, 2019, 06:25:59 AM
  • Shadow: oh hi
    July 26, 2019, 09:56:32 AM
  • Shadow: oh hi
    July 26, 2019, 09:56:46 AM
  • Durza: Hello
    July 26, 2019, 11:05:06 PM
  • Durza: Hello
    July 26, 2019, 11:05:14 PM
  • windhound: Hello There!
    July 29, 2019, 11:32:13 AM
  • Gier: Another reset? :-)
    July 31, 2019, 10:15:15 PM
  • windhound: YepYep
    August 01, 2019, 05:29:04 AM
  • Ungatt Trunn II: Greetings from like two months in the future
    October 18, 2019, 10:12:54 AM