Redwall: Warlords

  • October 16, 2018, 06:36:13 PM
  • 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 280 times)

0 Members and 1 Guest are viewing this topic.

Briar

  • Otterpop Empress
  • Permanent Resident
  • *******
  • Posts: 1,207
  • 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,060
  • 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,207
  • 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: code golf is trying to write a program to do a task in the smallest possible number of characters
    October 04, 2018, 06:24:10 PM
  • Shadow: I don't do that, code golf is silly. But robots are serious business.
    October 04, 2018, 06:24:23 PM
  • Shadow: Actually though, this robot thing has taken off ^_^
    October 05, 2018, 10:38:48 AM
  • windhound: rowbutts
    October 05, 2018, 05:51:27 PM
  • windhound: that is p. entertaining
    October 05, 2018, 05:51:40 PM
  • Shadow: Yea it's good times. Check out original HatamariBot, he broke the game.
    October 06, 2018, 06:39:12 AM
  • Fatalyti611: hi ?
    October 08, 2018, 03:09:11 PM
  • Fatalyti611: Hi
    October 08, 2018, 03:09:23 PM
  • windhound: Hello there!
    October 08, 2018, 05:11:24 PM
  • austfit: How are you ,fatalyti?
    October 09, 2018, 08:10:06 AM
  • Krowdon: I dont wanna work I wanna lurk on RWL all day
    October 09, 2018, 11:37:14 AM
  • Shadow: I usually do both
    October 09, 2018, 11:38:56 AM
  • Krowdon: Lucky :c
    October 09, 2018, 11:42:49 AM
  • Flitchaye Warrior: You must live up to the quote in your signature
    October 09, 2018, 08:45:11 PM
  • Krowdon: I am always too busy to be on the phone at work :(
    October 09, 2018, 10:15:08 PM
  • Krowdon: Also it is a good quote in my signature. I hope Ashyra is doing well.
    October 09, 2018, 10:15:40 PM
  • Flitchaye Warrior: I hope she is as well (and everyone else who hasn't be on in forever : P)
    October 12, 2018, 10:30:27 AM
  • Jathulum: What do you guys think of the new Redwall videogame?
    October 12, 2018, 12:36:02 PM
  • Krowdon: I have it but I still need to play it
    October 12, 2018, 12:41:38 PM
  • Krowdon: My computer doesn’t run games well
    October 12, 2018, 12:41:45 PM