Commit Graph

17719 Commits

Author SHA1 Message Date
fatherbushido 2beea46de7 Revert a naked fanatic armor nerf done in 2e5138bad9. It has now the same armor as other champions but don't have the armor bonus of spearmen. Requested by Feldfeld, borg-, Grugnas.
This was SVN commit r20314.
2017-10-19 18:04:07 +00:00
LordGood b389c9f846 whoops! coulda sworn i had these checked. missing .dae files restored
This was SVN commit r20313.
2017-10-18 19:32:39 +00:00
LordGood fe1401ec3d Last of the Spartan buildings, wow's normal fix, and Stan's archery range
This was SVN commit r20312.
2017-10-18 18:34:11 +00:00
mimo a37d8807f6 petra: some performance optimizations
This was SVN commit r20311.
2017-10-18 17:45:04 +00:00
mimo dc40f711db ai: remove some unused filter stuff + cleanup
This was SVN commit r20310.
2017-10-18 17:00:38 +00:00
elexis 99066df0c5 Unify beyond ridiculous Snowflake Searocks duplication gore, refs a9b963c3a5.
The island generation code was copied once for
 * the small mapsize and 2 players
 * the small mapsize and 3 players
 * the small mapsize and 4 players
 * the small mapsize and more than 4 players
 * the medium mapsize and up to 4 players
 * the medium mapsize and more than 4 players
 * the normal mapsize and up to 5 players
 * the normal mapsize and up to 7 players
 * the normal mapsize and 8 players
 * the large mapsize and up to 5 players
 * the large mapsize and more than 5 players

Within each of these copies there were three copies of the island
createArea+placer+painters call and
about 10 unreadable island connection setter copies.

Support mapgenerations with only one player.
Cleanup createAreas calls as in 376d8b3d1e and broken indentation.
Fix missing forests due to a missing parentheses in the forest count of
that commit.

This was SVN commit r20308.
2017-10-17 10:23:54 +00:00
elexis d79fdd75df Unify duplicate Corsica & Sardinia island generation, refs 9016b8d866.
The code for the other island was copied in a varying order with only
the values changed to 1 - x.
Unite the island, subisland, creeks, beaches, main relief, first
plateau, second plateau and passagess code under a single loop to
display the logical relation
instead of scattering many paragraphs and executing unrelated (starting
base) code in between.

Cleanup affected createArea calls as in 376d8b3d1e.

This was SVN commit r20306.
2017-10-17 00:21:38 +00:00
bb 5b72870745 Enlarge default sidebar size, so everything is visible by default
Accepted By: elexis
Differential Revision: https://code.wildfiregames.com/D855
This was SVN commit r20305.
2017-10-16 13:07:07 +00:00
LordGood 442e9a9184 corral and possible theatron fix?
This was SVN commit r20303.
2017-10-16 02:14:00 +00:00
elexis dd03ec801f Fix wrong forest type replacement in the prior commit (376d8b3d1e).
Just for the record (as all of that is going to be deleted soon), add
the missing variable declarations that were hoisted from an unrelated
loop prior to 45bb3d2a43.

This was SVN commit r20302.
2017-10-15 19:27:24 +00:00
elexis 376d8b3d1e Cleanup most createArea and some createObjectGroup calls in random map scripts.
Inline the placer, terrainPainter, elevationPainter, group and sizes
helper variables that are used only once.
Thus do not hoist variable declarations from unrelated scopes.
Remove few dozens of painters that are overpainted by the
paintBasedOnTerrainHeight call afterwards.
Remove 334 noisy misaligned code comments (// terrains // widths //
blend radius and // some variation).
Label the createArea calls so that the reader knows what they do.
Remove unbenefitial Math.PI/8 grass min/max angle limitation.
Use height variables for the SmoothElevationPainter calls so that levels
can be modified more easily.
Use Math prototype functions instead of the unfortunate rmgen proxies.
Does not touch starting base code, Unknown maps, Snowflake Searocks and
Corsica & Sardinia which need special treatment.

This was SVN commit r20301.
2017-10-15 17:53:12 +00:00
mimo e396ff170e No need to create aura's rangequery when the aura is not applied
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D963
This was SVN commit r20300.
2017-10-15 15:14:11 +00:00
mimo 2cf88d79a4 Ranged auras not enabled (because of a tech requirement for example) should not be visualized
Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D962
This was SVN commit r20299.
2017-10-15 09:28:18 +00:00
LordGood 3242d5dae7 Spartan buildings
This was SVN commit r20298.
2017-10-15 04:00:27 +00:00
elexis 8062b7fa6d Unify Cycladic Archipelago Island duplication in a helper function createCycladicArchipelagoIsland, refs #4805, ac4e25e17f.
Do not place starting resources but random resources on non-player
islands.

This was SVN commit r20297.
2017-10-15 01:18:59 +00:00
elexis 6273d111fe Corsica & Sardinia cleanup.
Unify clCorsica, clSardinia to clIsland and the duplicate resource
placement calls using that.
Move and simplify the logic determining which texture to paint depending
on height and slope to a function getCosricaSardiniaTerrain.
Inline the createTerrain to greatly increase readability while possibly
reducing performance slightly.
Fix whitespace of createObjectGroup calls.

This was SVN commit r20296.
2017-10-14 21:04:29 +00:00
elexis 4256744e26 Replace hardcoded trigonometry magic numbers on Corinthian Isthmus with a rotateCoordinates computation, allowing to change the river angle arbitrarily.
The new math library file will contain five more math helpers used by
random maps, refs #4804.
These functions are agnostic of random map vocabulary, so could possibly
be moved to or unified with globalscripts.

Cleanup and label obscure createArea calls in this map, unify duplicate
magic numbers, refs #4805.
Remove three useless LayeredPainter calls that are overwritten by the
paintTerrainBasedOnHeight tShore and tWater calls afterwards.

This was SVN commit r20295.
2017-10-14 15:55:04 +00:00
elexis 6656ec6de6 Remove about 360 unused variables in random map scripts, refs #4805.
Remove unused hasTextureInRadius from 9016b8d866.

This was SVN commit r20294.
2017-10-14 14:25:53 +00:00
elexis 8dc6ed427d Fix string format of the JS test assertion failure following 7c2e9027c2 (cxxtest expects a char* instead of a std::wstring, so newlines were printed as \n characters).
Differential Revision: https://code.wildfiregames.com/D952
Fixes #4807

This was SVN commit r20292.
2017-10-13 21:56:45 +00:00
mimo b8e9dbca0c petra: tune requirements when building defenses
This was SVN commit r20291.
2017-10-13 17:59:30 +00:00
elexis dcc7b1b056 Fix collisions of random forests and mines with starting resources on Cycladic Archipelago and the Lion's Den. Refs #4600.
This was SVN commit r20290.
2017-10-13 14:56:44 +00:00
Imarok c965a7c723 Only close the diplomacy window on succesfull bribe
Reviewed by: bb
Differential Revision: https://code.wildfiregames.com/D171
This was SVN commit r20289.
2017-10-13 10:58:29 +00:00
mimo 3c285a5c54 Wrong FSM state when a unit is captured while unpacking during an attack
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D954
This was SVN commit r20287.
2017-10-11 16:33:31 +00:00
elexis b7bf55f054 Fix incorrectly replaced unrelated magic number in 3a1c5669f8, refs #4814.
This was SVN commit r20286.
2017-10-11 15:04:22 +00:00
elexis 024d0e8f34 Fix rmgen2 bug in 6d52a71d4a revealed by the 1* removal in a1949d0b86.
Do not return a string in getRandomDeviation when we need a floating
point number.
Simplify the equation and do not round arbitrarily.

This was SVN commit r20285.
2017-10-11 14:42:56 +00:00
elexis 3a1c5669f8 Fix rmgen2 SimpleObject and RandomObject ignoring the 3 invalid map border tiles.
Let validT take the responsability to account for the actually valid
region of map tiles instead of each caller.

Fixes #4814, refs #4636, #4796

This was SVN commit r20283.
2017-10-11 01:48:12 +00:00
mimo 13b2858259 petra: remove a useless arbitrary historical classes separation
This was SVN commit r20282.
2017-10-10 17:35:40 +00:00
elexis a1949d0b86 Remove rmgen2 defautls that are and should always be given (that could have been inlined in the function header).
Remove 1 * x multiplication, replace scaleByMapSize(x, x) with x.

This was SVN commit r20281.
2017-10-10 10:43:19 +00:00
elexis 0517c34bc8 Delete an unneeded initForestFloor found by leper in 9e931b6fbe.
Delete the function altogether and create that simple array that is only
used in addForests just there.
Delete addForests calls from Ngorngoro that don't do anything.

This was SVN commit r20280.
2017-10-10 10:32:02 +00:00
elexis 9e931b6fbe Remove confusing rmgen2 g_MapInfo and initMapSettings, fixes #4813.
Rename initBiome to initForestFloor, getTeams to getTeamsArray.
Unifying duplicate coordinate computation and inlining unneeded
createArea helper variables in Lions Den.

This was SVN commit r20278.
2017-10-09 21:21:35 +00:00
LordGood 87ff880445 fixed a few errors and complaints regarding new spartan structures
This was SVN commit r20277.
2017-10-09 19:42:10 +00:00
mimo 6db2590858 Cache a list of TerritoryDecay components in the TerritoryDecayManager instead of retrieving it each time
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D951
This was SVN commit r20276.
2017-10-09 19:38:56 +00:00
fatherbushido 49b7d6fb95 Test integer validation.
Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D947
This was SVN commit r20274.
2017-10-09 07:00:31 +00:00
LordGood e63a938529 first commit for Spartan buildings
This was SVN commit r20273.
2017-10-08 17:06:31 +00:00
elexis e18598cd62 Fix Vector.js rotate oversight in 7778a7b436 (this.x may not be modified before reading again and sin/cos should not be computed twice).
Extend the tests of rotate in 99494251a1 to reveal the bug.
Add non-static clone functions for vectors (as the static ones were
incorrectly removed in e95f4e9744).
Math.pow performance is investigated separately, refs P85.

Checks and balances by mimo, leper, FeXoR and fatherbushido

This was SVN commit r20272.
2017-10-08 15:25:21 +00:00
Imarok 8bbe94c926 Add spies to the summary screen
Patch by: mmoains
Fixes: #4498
Differential Revision: https://code.wildfiregames.com/D567
This was SVN commit r20271.
2017-10-08 11:35:55 +00:00
mimo 9885cc5b79 petra: tune the proportion of support workers
This was SVN commit r20269.
2017-10-07 08:50:31 +00:00
mimo b5e3b83c9e Add a TerritoryDecayManager component to update territoryMap with the blinking state when territories are recomputed. That's needed by the AI which was up to now not aware of blinking cells.
Differential Revision: https://code.wildfiregames.com/D910
This was SVN commit r20268.
2017-10-07 08:42:39 +00:00
bb af9c25f879 Fix option page tabs xml style.
Following dd7f38e370 and 3312a83f82

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D949
This was SVN commit r20266.
2017-10-06 20:50:00 +00:00
elexis 1fcdc3d7f4 Deepfreeze the map settings object (created from g_GameAttributes.settings by the gamesetup extending the map JSON data) to prevent random map scripts from unintentionally modifying that, refs #4257.
This was SVN commit r20265.
2017-10-06 18:53:24 +00:00
elexis a8b8a33c8e Remove unneeded waterheight init loop from River Archipelago (refs #4354, D467).
Remove unneeded waterheight init loop (with awkward 1 tile sized bump)
that is redundant with the SmoothElevationPainter above from Corinthian
Isthmus (since introduction in 33cb23afa5).

This was SVN commit r20264.
2017-10-06 18:49:09 +00:00
elexis 7778a7b436 Readability improvements of globalscripts vector.js.
In compareLength, use Math.sign to replace a ternary + isNaN check.
In distanceToSquared, Use Math.pow(distance, 2) to avoid repetition of
the distance, inline its value to remove the then unneeded variables.

This was SVN commit r20263.
2017-10-06 18:20:57 +00:00
elexis 99494251a1 Add test for globalscripts vector, refs #4427.
This was SVN commit r20262.
2017-10-06 18:15:09 +00:00
mimo 2f24006afb petra: rework the management of siege units in attacks, to remove some civ hardcodings + some cleanup
This was SVN commit r20260.
2017-10-04 16:29:25 +00:00
mimo 862fd197d9 some cleanups of ai and petra
This was SVN commit r20257.
2017-10-02 17:49:27 +00:00
mimo 35af7390c0 Fix Hierarchical Pathfinder out of bounds bug
Patch by temple

Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D926
This was SVN commit r20256.
2017-10-02 17:44:23 +00:00
bb 10277d4ee6 Equal siege status bar sizes
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D942
This was SVN commit r20254.
2017-10-01 16:50:08 +00:00
mimo 365dea222d petra: try to make a better use of ranged siege units
This was SVN commit r20253.
2017-10-01 09:26:07 +00:00
fatherbushido fca5022f9b Tweak the decay special filter: decay time is set in the rubble template. Refs D938.
This was SVN commit r20252.
2017-10-01 05:38:45 +00:00
Imarok 0da0eaea3b Fix repair hotkey and remove build command
Fix f7ff71e8d5
Ack by elexis
Differential Revision: https://code.wildfiregames.com/D358
This was SVN commit r20250.
2017-09-30 22:04:24 +00:00