Select in that order to account for players that occur in multiple
games.
Patch By: fpre (a.k.a. ffffffff)
Feature design reviewed by: scythetwirler
Differential Revision: https://code.wildfiregames.com/D208
This was SVN commit r19287.
Summary: This further improves Petra's handling of citizen-soldier
guards, so that it does not repeatedly add guards when there are few
available workers.
Patch by Sandarac, follow up of aadf9d70f6 (D165)
Differential Revision: https://code.wildfiregames.com/D202
This was SVN commit r19281.
Patch By: bb
Differential Revision: D121
Refs: #4326
Removes the Random.js simulation helper and randomFloat function of the
random map scripts library.
Adds randomIntInclusive and randomIntExclusive to make the calls more
readable and fix and prevent off-by-one mistakes.
Adds randBool and use it in an AI occurance. It will be used in many
places by the random map scripts.
Use the pickRandom function introduced in 3c56638e8b in more applicable
occurances.
Replace remaining occurances of Math.random() with the new functions to
easily test completeness.
Cleanup of the random map script functions will come in a separate
commit.
This was SVN commit r19270.
Use an array instead of string concatenation to avoid duplication and to
enforce newlines on the syntax layer.
Move closeDiplomacy and toggleDiplomacy to openDiplomacy.
Differential Revision: https://code.wildfiregames.com/D183
Reviewed By: bb
This was SVN commit r19268.
Remove duplication and use ES6 startsWith instead of substr.
Differential Revision: https://code.wildfiregames.com/D110
Reviewed By: s0600204
This was SVN commit r19265.
Start the first wave minute 5 instead of 3 so that players have more
time to invest their initial wood.
Add two missing semicolons.
Differential Revision: https://code.wildfiregames.com/D184
Reviewed By: Hannibal_Barca
This was SVN commit r19263.
Summary:
Petra will not add guards when it has a low population, and will remove
any citizen-soldier guards so they can be used for other tasks.
Petra will also use a healer queue for training healer guards, and this
is done mainly so that Petra doesn't clog the villager queue with
healers, as villages should always have a higher priority. Also this
queue could be used in the future for training healer units for other
purposes.
Patch by Sandarac
Differential Revision: https://code.wildfiregames.com/D165
This was SVN commit r19262.
use it to fix an oversight in 1022619d98 (the diplomacy dialog wasn't
updated).
Differential Revision: https://code.wildfiregames.com/D181
Reviewed By: mimo
This was SVN commit r19260.
Summary: Following d9d1f1bbeb the diplomacy window is updated on each
tick, so we can remove the old updateDiplomacy function which now only
updates the player data, and rename updateDiplomacyPanel to
updateDiplomacy for consistency with other windows.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D172
This was SVN commit r19257.
Based on map by Hannibal Baraq.
Differential Revision: https://code.wildfiregames.com/D156
Map generation reviewed by FeXoR
Trigger Script and UnitAI change reviewed by Sandarac
Environment settings reviewed by niektb and wowgetoffyourcellphone
This was SVN commit r19254.
Displays a chat notification for all lobby clients if a client is kicked
or banned, pop up a message box for the affected one, including the kick
reason.
Clean the player- and gamelist upon disconnect and disable the control
elements.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D116
This was SVN commit r19250.
Summary:
With c2d0327af9 we can now add spying into the game: you have first to
research a tech (available in phase 3, espionage), and then you can
bribe a random unit (defined as Bribable in its template) from a chosen
player and share its vision during 15s.
There is also an option in the gamesetup to disable this feature,
analoguous to the treasure disabling option.
In the current version, only traders (land and naval ones) are
bribables.
Reviewed By: Itms, elexis
Differential Revision: https://code.wildfiregames.com/D117
This was SVN commit r19247.
Get the required information by returning it in the proper places.
Also clean up some pointless modulo operations.
This code is pulled out of the Silk Road code (refs #4314).
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D161
This was SVN commit r19243.
Summary:
Petra will assign military units as guards to the hero in the regicide
victory condition, preferring any available Champion units.
Also this diff fixes a broken loop through a Map in D140/a443bcfa65 that
was introduced when switching `criticalEnts.guards` from a Set to a Map.
Patch by Sandarac
Differential Revision: https://code.wildfiregames.com/D157
This was SVN commit r19241.
Slight cleanup while moving the affected code.
Differential Revision: https://code.wildfiregames.com/D108
Reviewed By: shookes
This was SVN commit r19238.
Add a new options panel for the chat notifications (attack, barter,
tribute), so that players and observers can disable them if they appear
too noisy.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D106
This was SVN commit r19237.
The code paints far below the waterheight and the potential shallow
generation on that central river variation is done by the passageMaker
call some lines above.
Reviewed By: bb
(on #0ad-dev today)
Also add a declaration forgotton in 6036b48c1d.
This was SVN commit r19236.