Redwall: Warlords

Discussion => Help / Bugs => Topic started by: Sharktooth on August 11, 2013, 08:30:14 PM

Title: Bluefish
Post by: Sharktooth on August 11, 2013, 08:30:14 PM
How did he get 4,000,000,000,000,000 net?! Is this a bug/glitch?
Title: Re: Bluefish
Post by: Peace Alliance on August 11, 2013, 08:53:34 PM
Four quadrillion, nine hundred ninety-two trillion, five hundred two billion, two hundred  million, four hundred eighty thousand networth.
Title: Re: Bluefish
Post by: Sharktooth on August 11, 2013, 08:58:57 PM
$77,152,656
Title: Re: Bluefish
Post by: windhound on August 11, 2013, 09:00:53 PM
Glitch. 
Apparently I overlooked something in the attack code

You can see his full last run here - http://redwallwarlords.com/turbo/buttout/Bluefish(%2320)_11_08_2013_output.html
Relevant bit is:
Your Army is shamed by your attack on such a weak opponent. 7.9% desert!
After a failing struggle, your army is repelled by Land Farm (Free Land)'s defenses. In the attempt, you lost:
-1,250,529,970,757,828,608 Rats
In their defense, Land Farm (Free Land) lost:


It overflowed.

I reset Bluefish's rats, removed that absurd amount he had pending to the market, and nuked most of his cash.
Bluefish bought some mercs so he's got some decent troops, but I'll just leave as is.  He'll equalize in a couple days.

Edit:  Just to be clear, the bots run a slightly modified version of the attack code.
The normal version has all kinds of input verifications and double checking, I implemented some of that but not all.  Something happened just wrong to make this happen, I've got ~20 bots running on the test server and they've never done this afaik
Title: Re: Bluefish
Post by: Sharktooth on August 11, 2013, 09:04:12 PM
"Out of Food, CAN'T FIX :( screw it, we're pwned" haha, lol
Title: Re: Bluefish
Post by: windhound on August 11, 2013, 09:07:30 PM
(http://i.imgur.com/8TVgMjN.png)

Title: Re: Bluefish
Post by: Shadow on August 11, 2013, 09:22:21 PM
how could it overflow? the datatype is more than enough for typical rwl numbers, no? also failing on the landfarm... iuno. seems odd. I feel like there's something wierd here..
Title: Re: Bluefish
Post by: windhound on August 11, 2013, 09:44:18 PM
Not entirely sure. 
Overflow goes both ways though, you can go too high or too low.  This appears to have gone too low, like putting a car with the olde style odometer in reverse when it has 0 miles and suddenly it shows 99,999 miles.

At least the log makes it fairly plain what happened, I'll look it over later...  might be tuesday.  I very much doubt it'll happen again, but hey.  Who knows.
Title: Re: Bluefish
Post by: Shadow on August 11, 2013, 09:58:12 PM
I see the problem: he had negative health. must not check that enough health remains for the attack.
Title: Re: Bluefish
Post by: windhound on August 12, 2013, 07:16:52 AM
Ah, quite possible.
Prior to this they were limited to 5 attacks

Neat.  Will fix later unless you'd like to get it Shadow
Title: Re: Bluefish
Post by: Shadow on August 12, 2013, 08:04:32 AM
I am away from my machine atm, so I can't for a few days
Title: Re: Bluefish
Post by: Kilkenne on August 14, 2013, 07:43:00 AM
Bluefish managed to lose every rat ever born and every rat that will ever be born for the next few hundred million years.
Title: Re: Bluefish
Post by: The Obliterator on August 15, 2013, 07:59:33 AM
I dunno mabey every rat ever created on redwall might come somewhere close to that amount
Title: Re: Bluefish
Post by: taekwondokid42 on August 15, 2013, 09:51:27 AM
A quadrillion is a lot.

If 100 massed 1 billion rats 50 runs every round, that's 5 trillion rats per round.

So if, for the entire history of redwall, redwall managed to average 1 billion rats per run with 100 people and 50 runs per round, we might be close to the Bluefish precedent.
Title: Re: Bluefish
Post by: The Obliterator on August 15, 2013, 09:56:00 AM
Ok so mabey not then......

Still it was a nice thought while it lasted
Title: Re: Bluefish
Post by: Raggon on August 17, 2013, 04:41:49 PM
That doesn't include Reg, though.