10% army spawn bonus

Debate tactics, organize matches, ask questions...

10% army spawn bonus

Postby gladoscc » Sun Oct 09, 2011 12:21 am

lopdo, did you throw in a Math.floor()? Or not?

var spawns:int = largestConnectedLand() * 1.1 will round it up, so if you have 5 lands, it will be 6.

But if lopdo did this

var spawns:int = Math.floor(largestCOnnectedLand() * 1.1) then it only takes effect when you have 10.

what did lopdo do?
gladoscc

 
Posts: 50
Joined: Sat Oct 08, 2011 7:04 am

Re: 10% army spawn bonus

Postby techgump » Sun Oct 09, 2011 2:22 am

var spawns:int = Math.floor(largestCOnnectedLand() * 1.1)
User avatar
techgump

 
Posts: 1689
Joined: Sat Jul 09, 2011 12:36 am
Location: 3rd planet from a G2V star within the inner rim of the Milky Way galaxy's Orion Arm's Gould Belt

Re: 10% army spawn bonus

Postby Lopdo » Sun Oct 09, 2011 9:27 am

return strength * modifier;

it doesn't round up, return value is of type int so it floors it down automatically. This is C#, not as3
Quis custodiet ipsos custodes?

- Feel free to correct all my grammar mistakes -
User avatar
Lopdo
Site Admin
 
Posts: 2691
Joined: Sat May 28, 2011 3:14 pm


Return to General discussion

Who is online

Users browsing this forum: No registered users and 82 guests