64bit conversions (including the long ones) are not safe, because not
every number can be converted to the 2^53 JS numbers and pretending to
do so is asking for bugs.
Explicitly use the double type in the Replay menu, because std::time_t
is unspecified and some platforms like Ubuntu yakkety:i386 fail to
build, looking for long.
Double should work for the next 285 million years, becomes consistent
with SavedGame.cpp, is tested by test_ScriptConversions.cpp and doesn't
pretend to cover all 64bit numbers.
Patch By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D205
Refs #3848 D84 D112
This was SVN commit r19367.
Summary:
PerformAttack uses an automatic aiming logic for ranged attacks.
Splitting it would allow to fix some issues with that function, to test
it individually, make it usable as a globalscript for other logic (or
even to disable the automatic aiming based on template).
That patch is just about the splitting, I didn't change it.
Also use only the max range and not the elevation adapted one to scale
the spread (which makes more sense and also avoid computation).
Test Plan: send a javelin?
Reviewers: O2 JS Simulation, wraitii, elexis
Reviewed By: O2 JS Simulation, wraitii, elexis
Subscribers: Vulcan, elexis, leper
Differential Revision: https://code.wildfiregames.com/D272
This was SVN commit r19366.
Rename the special wolf template that reacts to UnitAI attack orders to
fauna_wolf_snow_attack, so that the name becomes agnostic of the way how
it achieves that.
Differential Revision: https://code.wildfiregames.com/D257
Reviewed By: fatherbushido
This was SVN commit r19361.
Exponential attacker increase to prevent boring endless games.
Add a gaia hero per player at later stages of the game (if the previous
one isn't alive anymore).
Remove hardcoded template array and include gimmick templates (gaia),
most notably the fireraiser which we never saw before and the siege
tower.
Remove treasure picker female after defeat to prevent confusion with
treasure on the minimap.
Add flag to the spawnpoints, so that new players know where the enemies
actually come from, as proposed by bbleft and Hannibal Barca.
Move all balancing constants to the top of the file.
Actively chose attacker composition instead of having it relate to the
number of templates that exist.
Add debug output option, so that we can replay games and see which enemy
wave composition attacked at which time.
Add dry run, so that we can test the balancing effects from a non-visual
replay instead of having to play some game.
Remove many unused variables and some pointless tile classes from the
mapgen.
Whitespace and various code style cleanup, moving code to shorter, more
readable functions.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D145
This was SVN commit r19359.
New tech to increase the cost for other players to bribe your units (by
50%).
Move the spy tech and this new one to the cicil center.
Decrease the spy cost to 500 metal.
Include the patch from D173 because of conflicts.
Reviewed By: elexis, Gallaecio
Differential Revision: https://code.wildfiregames.com/D179
This was SVN commit r19357.
Add optional probability to randBool to receive true and use where
applicable.
Patch By: bb
Differential Revision: https://code.wildfiregames.com/D235
Refs #4326 D121
This was SVN commit r19355.
The dialog is resized automatically and can be opened with a new hotkey.
Patch By: s0600204
Differential Revision: https://code.wildfiregames.com/D88Fixes#4366
Refs #3934
This was SVN commit r19354.
Replace the unexplained orange and red colorization and replace it with
the greyout equal to the replay menu,
as the difference between compatibility types is explained when trying
to load the game.
Rename the ambiguous generateLabel to generateSavegameLabel.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D246
This was SVN commit r19351.
Prevent Iberian players from covering their entire territory with the
attack bonus giving monument as proposed by mimo.
Indirect aura range indication with the build restrictions for the trade
bonus yielding mauryan pillar.
Disable capturing of mauryan pillar equally to the iberian one following
60a2af2988 (so that the entire territory doesn't switch ownership
quickly).
Add the missing name for the mauryan pillar, so that the aura bonus
tooltip shows up, as reported by Grugnas.
Differential Revision: https://code.wildfiregames.com/D196
Reviewed By: Grugnas
Fixes#4412
This was SVN commit r19348.
Add a test for the GetNonGaiaEntities function of the RangeManager
broken by that commit that was fixed by f3e4e619bc.
Don't call one script function from another, but directly call into the
Selection helper like the others.
Don't make a loop around that RangeManager function for all players but
call the function once for all players.
The pointless virtual keywords were removed by 8827db201a.
Differential Revision: https://code.wildfiregames.com/D166
Reviewed By: leper
This was SVN commit r19344.
Use std::set's logarithmic find instead of a linear loop.
Early return and some whitespace for getParabolicRangeForm.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D260
This was SVN commit r19342.
Could possibly fix a compilation failure with some compilers in
36330732fa.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D250
This was SVN commit r19341.
Differential Revision: https://code.wildfiregames.com/D188
Reviewed By: wraitii, Enrique
Also valuable input from Sandarac and bb
This was SVN commit r19334.
Elephant now a VisibleClass so that players know which of the heroes the
elephant one is.
Differential Revision: https://code.wildfiregames.com/D251
Reviewed By: fatherbushido
This was SVN commit r19333.
Limit them to 50 because they have no pop cost attached.
Their use was nerfed a bit too much in 13b229d503.
Patch By: Grugnas
Differential Revision: https://code.wildfiregames.com/D234
Reviewed By: fatherbushido, borg-
This was SVN commit r19331.
This was the last building with this capturing bug.
Differential Revision: https://code.wildfiregames.com/D255
Reviewed By: fatherbushido, Grugnas
This was SVN commit r19330.
Thus prevent template editors from adding that tag to female military
units and
allow modders to add a Female class for wider purposes.
Remove the FemaleCitizen training restriction category that was added
for debug purposes but forgotton to be removed in 7e21db08d5.
Differential Revision: https://code.wildfiregames.com/D244
Reviewed By: fatherbushido
Refs: #1432#4490
This was SVN commit r19329.
The originally intended approach to support move-orders independent of
the Identity classes can be discussed in an independent proposal.
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D176
This was SVN commit r19323.
Differential Revision: https://code.wildfiregames.com/D243
Reviewed By: fatherbushido
Idea by borg-, numbers confirmed by Hannibal Barca, floating point
number format confirmed by wraitii.
This was SVN commit r19322.
Remove the support of saving the rotation of camera position nodes,
because that should be rewritten to use a custom spline.
Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D124
Refs #3814
This was SVN commit r19317.