Page 1 of 1

10% army spawn bonus

PostPosted: Sun Oct 09, 2011 12:21 am
by gladoscc
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?

Re: 10% army spawn bonus

PostPosted: Sun Oct 09, 2011 2:22 am
by techgump
var spawns:int = Math.floor(largestCOnnectedLand() * 1.1)

Re: 10% army spawn bonus

PostPosted: Sun Oct 09, 2011 9:27 am
by Lopdo
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