Commit Graph

16954 Commits

Author SHA1 Message Date
1e07787e76 Revert 64bit number conversions added in c0ca70efd2, don't add the previous long and unsigned long conversions back and use double in the Replay menu.
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.
2017-04-01 21:06:55 +00:00
c664fb7b6d Split the automatic aiming function of PerfomAttack for ranged attacks.
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.
2017-04-01 07:16:46 +00:00
173a7dc214 Change clearance of large land units from 4 to 3, clearance of large ships from 12 to 10. This makes these units far more usable.
Reviewed by Elexis and Fatherbushido.
Differential Revision: https://code.wildfiregames.com/D253
This was SVN commit r19365.
2017-03-31 14:50:04 +00:00
38a30ea563 Remove useless TemplateManager existence check and extend the related test
Summary: cf c9b0db7f5f

Test Plan: -

Reviewers: vladislavbelov, elexis

Reviewed By: vladislavbelov, elexis
Subscribers: Vulcan

Differential Revision: https://code.wildfiregames.com/D279
This was SVN commit r19363.
2017-03-30 19:53:25 +00:00
dcecda399f Remove some cost leftover in civ specific templates. Patch by Grugnas.
Differential Revision: https://code.wildfiregames.com/D197
This was SVN commit r19362.
2017-03-30 17:05:23 +00:00
4f3891fa3a Merge the wolf with the snow wolf template.
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.
2017-03-30 11:59:46 +00:00
96f5edf32d Minimum attack range tooltip.
Differential Revision: https://code.wildfiregames.com/D267
Reviewed By: Gallaecio
Refs #4421 D111

This was SVN commit r19360.
2017-03-29 21:40:56 +00:00
18e7d8a518 Survival Of The Fittest Overhaul
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.
2017-03-29 16:06:11 +00:00
f7a2c3d02c Fix a934dfad5f, add an early return when pressing the massbarter hotkey in observermode.
Differential Revision: https://code.wildfiregames.com/D273
Reviewed By: user1
This was SVN commit r19358.
2017-03-28 23:36:55 +00:00
d0f6489526 counter espionage
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.
2017-03-28 21:37:53 +00:00
5dcc52f46a Petra: Initial Capture The Relic support
Patch by Sandarac
Differential Revision: https://code.wildfiregames.com/D236
This was SVN commit r19356.
2017-03-28 18:51:10 +00:00
da2b89583a Replace many deprecated randInt calls with randBool.
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.
2017-03-28 04:28:55 +00:00
a934dfad5f Add barter buttons to the trade window for quicker access and to support mods with more than four resource types.
The dialog is resized automatically and can be opened with a new hotkey.

Patch By: s0600204
Differential Revision: https://code.wildfiregames.com/D88
Fixes #4366
Refs #3934

This was SVN commit r19354.
2017-03-28 02:34:32 +00:00
dbd56403b9 Allow hiding of list columns via XML or JS.
Differential Revision: https://code.wildfiregames.com/D228
Reviewed By: Vladislav
This was SVN commit r19353.
2017-03-28 00:25:17 +00:00
bc3ed4f474 Keep RELAX NG compact syntax file describing the GUI properties in sync with the RELAX NG XML schema counterpart following b8fce56821.
Difference reproducible with trang.

Reviewed By: Vladislav
Refs #2405

This was SVN commit r19352.
2017-03-28 00:12:05 +00:00
10b49f9c18 Add sortable columns to the loading screen and a compatibility filter for saved games.
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.
2017-03-27 12:55:43 +00:00
cedf7a33aa Unit tests for JS Pack component
Summary: Unit tests.

Test Plan: Irrelevant.

Reviewers: O2 JS Simulation, Itms, wraitii

Reviewed By: O2 JS Simulation, wraitii
Subscribers: O8 JS GUI, O14 Maps, O6 AI, Sandarac, Vulcan

Differential Revision: https://code.wildfiregames.com/D240
This was SVN commit r19350.
2017-03-27 12:40:49 +00:00
32655c0e38 Pillar / Monument cleanup.
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.
2017-03-26 01:09:21 +00:00
4523c50850 Fix a vertex shader data pielup in the actor editor. It was reloading the shaders far too often.
Patch by Echotangoecho.
Differential Revision: https://code.wildfiregames.com/D93
This was SVN commit r19346.
2017-03-25 07:44:31 +00:00
35377c51a7 Capture The Relic gamemode.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D152
This was SVN commit r19345.
2017-03-25 07:01:07 +00:00
27f37ccd21 Cleanup the rest of the mess introduced with the NonGaiaEntities functions in 8c7b6dceaa.
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.
2017-03-25 02:42:51 +00:00
b9441a6a8d Ensure m_Territory in cmpTerriotryManager.IsTerritoryBlinking. Fixes #4466.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D261
This was SVN commit r19343.
2017-03-25 01:43:14 +00:00
e69e10ef5f Small RangeManager cleanup.
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.
2017-03-25 00:11:08 +00:00
9e6571c461 Some cinema path cleanup.
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.
2017-03-24 22:49:06 +00:00
9f50bf3f1e Only dereference cmpWaterManager if it is non-null.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D259
This was SVN commit r19340.
2017-03-24 21:32:49 +00:00
3648ba448d Some const for scriptinterface.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D155
This was SVN commit r19339.
2017-03-24 18:47:03 +00:00
9cf84c6800 Fix documentation of non system component.
Summary: -

Test Plan: -

Reviewers: Itms, leper

Reviewed By: leper
Subscribers: Vulcan, O1 C++ Simulation

Differential Revision: https://code.wildfiregames.com/D221
This was SVN commit r19337.
2017-03-24 07:09:28 +00:00
d7b32a5c25 Farming tech icon update
This was SVN commit r19336.
2017-03-23 23:11:01 +00:00
71f3fdd859 Whale should not break naval gameplay by blocking ships in the middle of an improtant battle.
Differential Revision: https://code.wildfiregames.com/D188
Reviewed By: wraitii, Enrique
Also valuable input from Sandarac and bb

This was SVN commit r19334.
2017-03-23 22:44:43 +00:00
c279283d82 Large passability class for hero elephants.
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.
2017-03-23 22:14:38 +00:00
e8ae384eb6 Updates + cleanup tech icons
This was SVN commit r19332.
2017-03-23 21:56:01 +00:00
ba86a79c44 Buff war dogs slightly and make them slower to train.
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.
2017-03-23 21:43:52 +00:00
46320a5447 Only britons should be able to train war dogs from captured kennels.
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.
2017-03-23 21:37:34 +00:00
ad17e320be Rename the Female identity class to FemaleCitizen, because it is intended for female support units only.
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.
2017-03-23 17:54:36 +00:00
9f018c48e0 Revert the addition of the Female identity class to the Boudica heroine from 83680b0dee, because that tag is only intended for female support citizens.
Differential Revision: https://code.wildfiregames.com/D242
Reviewed By: fatherbushido
This was SVN commit r19328.
2017-03-23 17:44:27 +00:00
676a9ccb40 Move catafalque actor to global (as it is not civ specific).
As recommended by Enrique and Pureon.

This was SVN commit r19327.
2017-03-23 03:50:02 +00:00
159ae93beb A few icon updates
This was SVN commit r19326.
2017-03-22 23:24:17 +00:00
ff452de1f7 Mark GetAnimationName as const
Differential Revision: https://code.wildfiregames.com/D248
Reviewed By: leper
This was SVN commit r19325.
2017-03-22 23:07:01 +00:00
0c68147e1a Fix a broken string in the User Report panel of the main menu.
Differential Revision: https://code.wildfiregames.com/D239
Reviewed By: Gallaecio
This was SVN commit r19324.
2017-03-22 22:51:42 +00:00
cd6c31e76e Revert UnitAI changes of 79fb493da3 (besides the patrol comment) and use an exotic template instead.
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.
2017-03-22 22:38:22 +00:00
19f9fa17fa Resource trickle for wonders, highlighting their trait of being the most magnificent building.
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.
2017-03-22 15:01:26 +00:00
fdda57565b Display which clients are still in the loading screen
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D120
Fixes #4375

This was SVN commit r19320.
2017-03-21 18:50:29 +00:00
a3ea45509b Cinematic path demo map
Patch By: Vladislav
Refs #3301 #3814

This was SVN commit r19319.
2017-03-21 00:33:44 +00:00
b675a0154a Fix a warning in 655ce95468 when opening the leaderboard in the lobby and returning without having a player selected.
Reported by: Vladislav
Patch By: fpre
This was SVN commit r19318.
2017-03-20 23:55:02 +00:00
36330732fa Allow Cinematic Path nodes that only specify a camera position or direction and group them by deltatime.
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.
2017-03-20 15:26:34 +00:00
76c7731076 Catafalque wagon unit
This was SVN commit r19316.
2017-03-20 13:16:15 +00:00
9b28ce3463 Enable late observers by default.
Differential Revision: https://code.wildfiregames.com/D217
Reviewed By: scythetwirler, Imarok, bb, echotangoecho, Hannibal_Barca,
fpre

This was SVN commit r19314.
2017-03-19 22:56:13 +00:00
a4c9fd193a Petra: Let getBestBase optionally check for fully-constructed bases
Patch by Sandarac
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D237
This was SVN commit r19313.
2017-03-19 10:35:22 +00:00
19c828f050 New victory + defeat icons. Fertilizer tech icon
This was SVN commit r19312.
2017-03-19 00:08:46 +00:00
33a0af2e57 Display the formations panel if and only if the selected units can enter a formation (instead of hiding it if any domestic animal is part of the selection).
Differential Revision: https://code.wildfiregames.com/D191
Reviewed By: mimo
This was SVN commit r19311.
2017-03-17 22:46:42 +00:00