Revised North America Map, added lakes and rivers, some manual edits
around the northern coasts to preserve the jagged fjordness, added ~53
bots to the json, to fill in all the empty space (makes for a very fun
solo run, may need to reduce somewhat once the players get a chance to
try it).
Added 50 US state flags to the resources folder.
**Can now Nuke Santa.**
More costly (start at 1.5M), increase cost cap (4.5M), biggest timeout
(5s->10s), much lower chance to stop hydrogen (70%->10%), triple
construction time (10s->30s) otherwise it's trivial to build a SAM right
before a nuke hits
Slightly decrease flat land advantage (in certain cases it feels almost
instataneous otherwise)
To calculate speed bonus use 4*attackTroops instead of 5 (people keep
complaining than small numbers of troops take crazy amount of lands
veryn quick)
Slightly increase minimum multiplier for attacker loss, to make
snowballing a little bit slower.
I only slightly modified numbers because the meta is fun it's just too
quick on certain cases.
We previously had a system where lobbyLifetime = gameCreationRate * 2
It was to always have one lobby ready.
With dynamic timer (start if enough player or timer's over) we cannot
rely on this system (which used setInterval) so we have one lobby and
check every 100ms if we need to create another lobby.
Might add 100ms+time of creating a lobby ms latency. Which is fine I
guess.
- **improve and fix dynamic lobby**
- **Revert "Change BorderTiles from Array to Set (#230)"**
I'm obviously forced to include the revert patch otherwise I can't
compile. but you should first merge PR dedicated to revert before tthis
> There were 4 separate implementations of getting neighboring
coordinates for a given x,y pair, 3 completely unique implementations.
These were found in neighbors(), processOcean(), processDistToLand(),
and getArea(), with processOcean() and processDistToLand() having
essentially identical implementations. Created new function
getNeighborCoords() with implementation closely resembling that found in
neighbors().
Revised aforementioned functions to utilize the new getNeighborCoords()
instead, with revised implementations being much more consistent across
the impacted functions.
> Revised getArea() to correctly assess the area, was previously likely
to overestimate the area as it included all coordinates it check
regardless of their terrainType. getArea() now also explicitely
implements the Coord[] interface, allowing for standardized
implementation syntax in all functions which call getArea().
Also removed the parameter targetType as all calls to getArea()
targetted the same TerrainType as was present at the passed x, y
position. getArea() will now assess targetType based on the passed x, y
values.
Reordered the parameters of getArea() so that it conformed with the
ordering used elsewhere in the script (x, y, map, visited). Updated all
calling locations accordingly.
> Revised processOcean() to make use of getArea() instead of using its
own reimplementation of area checking. This coupled with the use of the
new getNeighborCoords() significantly reduced the size of processOcean
and improved comprehensibility.
Also removed unnecessary check of waterBody.size that would always
return TRUE in that context.
> Removed checks against and setting of Terrain.ocean values in the
removeSmallIslands() and removeSmallLakes() functions as these functions
are called prior to processOcean() making the checking
redundant/unncessary, and the setting potentially problematic.
Revised Terrain class to default ocean to false, to address compiler
warning, and since processOcean() handles setting this property to true
explicitly.
Reduced total lines from 417 to 372.
If the port of destination and of source have same owner it means a
player captures port of another player, we cease all trade that happens
inside same country.
Also added a check in the canTrade code to be more reliable and correct
even outside of the specific case of capturing a port.