This allows replacing the common code with a library call in only one or
two hunks each.
On Archipelago move the random resources closer to the playerbase to
make the map more enjoyable.
Use default/skirmish templates for the docks on Islands/Migration and
the market on Polar Sea while at it.
Abort map generation if the dock placement failed.
Remove clForest dummy variable on Polar Sea following the removal of
references to map defined tileclasses in the library following
822e37f70c.
This was SVN commit r20476.
Stop listening to OnTrainingFinished and OnStructureBuild messages but
use OnOwnershipChanged messages. This fixes the defeat when only
promoted/upgrades/regi-hero units remain.
Add foundations to the conquest lists and make them visible on the
minimap.
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1022
This was SVN commit r20471.
Use the rotateAround function from eb96b61954, refs #4845.
Freely randomize the river angle on Corinthian Isthmus following
4256744e26 and eb96b61954, refs #4855.
This was SVN commit r20469.
Remove the rmgen rotateCoordinates helper function from 4256744e26 and
clean the implementation of that commit, refs #4845, #4804.
Deepfreeze mapCenter vector from 5256d8497e used here to prevent
accidental overwrites with the mutating Vector2D functions, refs #4854.
This was SVN commit r20468.
In the Edge Seas variant, fix a wrong horizontal/vertical negation and
the direction of the riversize randomization.
Fix the wrong river location translation in that variant in e596ef6011,
refs #4851.
Prevent resource collisions on Unknown maps by adding back the large
territory marking (after the small territory marking prior to the
terrain generation).
Slightly improve river painting performance by not generating the
meandering of the second shoreline if that is outside of the map
boundary.
This was SVN commit r20465.
Replace complicated starting unit code with a call to
placeStartingEntities equal to df14c914e6.
Use distributePointsOnCircle to remove sin/cos/distance computations.
Add map center getter for rmgen code, refs #4854.
This was SVN commit r20463.
Rename tower techs to tower_{tech}
Remove duplication in tower templates
Create tower parent, with sentry, stone and outpost as childs
Move all outpost as child of tower
Add a sentry tower default building
refs #4849
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D914
This was SVN commit r20459.
Change wrong civs in ptol and sele walls
Let Persian trireme units depend on there land counterparts
Make the buildtime consistent with the land counterparts by decreasing
with 3
Nuke duplication for rome infantry champ
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1033
This was SVN commit r20451.
* Move selection_panels.js helper functions into a separate file
* Move unit_action helper functions from input.js into unit_actions.js
* Rearrange some functions, to better represent the execution flow
* Make batch training use `g_NumberOfBatches` instead of
`g_BatchTrainingCount` so remember the number of batches instead of the
number of units to train (needed for finishing P60)
* Simplify the batch training code a bit
* Also cleanup the moved functions a bit
Reviewed by: bb, Commented by elexis
Differential Revision: https://code.wildfiregames.com/D753
This was SVN commit r20447.
This new hotkey, by default assigned to alt, makes it so that only one
unit receives the order.
This can be used to easily order a group of units to build different
buildings at the same time, or attack different enemies.
It's intended to make the usual "select a unit, order, select another
unit, order" micro much faster.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D308
This was SVN commit r20441.
Remove retryPlacing args helperobject by making use of the hoisting
effect.
Remove the deprecation warning in retryPlacing and equally and the
unused behaveDeprecated argument from createAreas and
createAreasInAreas, refs #4294, a639050a41, D249.
Rename randomizePlacerCoordinates to randomizeCoordinates and placer to
group in the four createObjectGroups functions following 6052716a78,
because Groups aren't Placers (as established in f6c2ea6b0e), just share
the randomizable x/z properties.
Fix randomizeCoordinates on square maps offering entity locations
outside of the passable map area that are only rejected later in the
codeflow, missed first in ca0575e422, but also d30ee0292b and
3a1c5669f8, refs #4012, #4814.
Clarify randomizeCoordinates by passing a boolean stating whether to
include the impassable map border instead of a varying halfMapSize.
Remove the unused halfMapSize argument from the
randomizePlacerCoordinatesFromAreas call in createAreasInAreas.
This was SVN commit r20439.
Completes an existing TODO. This is a large speedup in some cases for
those test functions, particularly the "sunken ship lag" issue.
Patch By: temple
Reviewed By: elexis, mimo, bb, wraitii
Accepted By: bb, wraitii
Trac Tickets: #4713
Differential Revision: https://code.wildfiregames.com/D850
This was SVN commit r20438.
Create global constants for the elevation modes and make that Placer
more versatile by adding the mode argument.
Improves the performance of these functions by not repeating the mode,
createTerrain and getTileClass lookups every tile.
Move the functions to library.js, refs #4804.
This was SVN commit r20437.
Refer to the normalized river vector instead of the river vector divided
by the length of the river.
Rename mag to magnitude.
This was SVN commit r20435.
and so making that function much more general by using MatchesClassList.
Some suggestion and checking by leper
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1020
This was SVN commit r20432.
Reverse engineer and cleanup obfuscated Rivers map code, refs
a9b963c3a5.
Use vector algebra to replace magic equations and express geometric
intend.
Fix seed typo by removing river curve duplicate.
On the Rivers map, use areAllies directly instead of copying the
diplomacies to a 2D array called isRiver.
Use modulo operator instead of an if-statement with duplication to
determine the neighbor of the last player, refs 9272153ee7.
This was SVN commit r20429.