Diseased Corpses..

Fastphoenix

Chieftain
Joined
Apr 25, 2007
Messages
3
Location
UK
Ok, I'm playing as Hyborem and I'm going to go and sit on Basium for a while with my somewhat small army. I got into a fight with some angels on the way and one of my diseased corpses got hurt.. surely this is a bug? its going to take 2 BILLION turns for it to heal?? :confused:

Spoiler :
2_billion_turns.JPG
 
May as well take 2 billion turns because the diseased corpse has a healing rate of 0% outside of your own territory because it is diseased (-10% healing anywhere).
 
http://primes.utm.edu/curios/page.php/2147483647.html

diseased zombies like large prime numbers.... :)

well, the real reason is probably due to overflow or something to do with the integer value that holds how many turns it's supposed to take. i'm guessing that this has something to do with mixing signed and unsigned int types, where maybe the number of turns for the zombie was set to -1, which results in the bit pattern that gives you the big number from above, with the sign bit being 0 somehow.
 
I had a unit display some rediculous large number for healing. Next turn it said 2 or 3... I can't remember what happened, though.
 
Ok, I'm playing as Hyborem and I'm going to go and sit on Basium for a while with my somewhat small army. I got into a fight with some angels on the way and one of my diseased corpses got hurt.. surely this is a bug? its going to take 2 BILLION turns for it to heal?? :confused:

Spoiler :
2_billion_turns.JPG

-so basically, it's capped at some arbitrary integer which is the maximum value that it can hold
-it takes a moment to load, which makes me think the computer is doing all that math with addition.
-now with division, that would result in an error :dance:<infinity>:dance:
-this would all go away if the minimum heal rate was capped at 1&#37; or so.
 
http://primes.utm.edu/curios/page.php/2147483647.html

diseased zombies like large prime numbers.... :)

well, the real reason is probably due to overflow or something to do with the integer value that holds how many turns it's supposed to take. i'm guessing that this has something to do with mixing signed and unsigned int types, where maybe the number of turns for the zombie was set to -1, which results in the bit pattern that gives you the big number from above, with the sign bit being 0 somehow.

Hah, nice find. What made you think it'd be a prime number... unless you've memorized all the prime numbers up to that point and recognized it instantly! :run:
 
If anyone's interested, the number's the max value for a signed 32bit integer:

(2^31)-1

... or as close to +Infinity as you can represent in an int.
 
haha..just googled the number.

i did recognize the number though...it's something you see all the time when dealing with integers. well...the 2.1 billion at least, not the other trailing digits
 
That reminded me of one time when I was playing around with the effects of various civics. I accidentally found that when I didn't put any number in the free xp slot (which normally contained a 0) for one civic that it granted (2^31)-1 free xp to every unit. Everyone loved tribalism in that game.
 
Thanks for the replies.. shamefully though, that unit of diseased corpses lasted about 10 more turns before Basium came and pounced on him.. I must say though.. Hyborem does eat Basium for breakfast doesnt he?
 
Back
Top Bottom