Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.
To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.
While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.
[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
After they had been broken in 21e866fcf0
Author / patch by: @lairkers
Troubleshooting / comments by @elexis @Freagarach
Fixes#6831
This was SVN commit r27937.
Who says only players should be able to conduct diplomacy?
Also separation of concerns, more maintainable files.
Differential revision: https://code.wildfiregames.com/D4921
Comments by: @elexis, @Stan
Refs. #5894
This was SVN commit r27722.
Avoid duplication by moving the function to Transform.js.
Add tests to Transform.js
Add tests to TurretHolder.js
Optimize slightly Trainer.js by removing some useless
Engine.QueryInterface calls.
Refs #6784 (symptoms in TriggerHelper.js are fixed underlying cause not)
`SkirmishReplacer` is called before the Modifier Manager so it does not
suffer the same fate.
Entities using `ChangeEntityTemplate` function are still affected.
Maps calling Engine.AddEntity directly are still affected.
Ideally this should be handled by hotloading components instead of
creating new entities each time. See =>
https://code.wildfiregames.com/D4991
Tested using:
908dd631d9
Differential Revision: https://code.wildfiregames.com/D4984
This was SVN commit r27636.
Follows d86148defc.
Resetting the wonder time when an ally to the wonder-owner is defeated
seems like double-punishment, and should not happen.
Resetting on explicit diplomacy change remains in Allied victory mode.
Fixes#6527
Reported by: Langbart
Differential Revision: https://code.wildfiregames.com/D4661
This was SVN commit r26914.
Correctly fetch the civ from the player's Identity.
Also remove the notions of the CivChanged message, since it was
effectively deleted already.
Differential revision: https://code.wildfiregames.com/D4486
Reviewed by: @wraitii
Comments by: @bb, @Silier, @smiley, @Stan, @vladislavbelov
Fixes#6444
This was SVN commit r26872.
The function was redundant for a long time, but made an error in
73f741d266.
Reported by: @marder
Differential revision: https://code.wildfiregames.com/D4541
Tested by: @marder
Fixes#6458
This was SVN commit r26656.
59d0885d68 made formation take "formation", not "name". This broke
TriggerHelper.
Reported by: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D3873
This was SVN commit r25293.
The "GARRISONED"-state was quite strange, for entities being garrisoned
can just as well perform other tasks (see e.g. turrets).
Also, the need for keeping a "garrison" order on the stack is removed.
Fixes: #6022
Differential revision: D3656
Refs. #6081
This was SVN commit r25069.
Foundations were originally made conquest critical in 722578fdcd.
However, it remains rather frustrating that a player can evade defeat by
placing an unbuilt, uncommitted foundation. While allies can revive a
player with only a foundation, that cannot happen in 1v1, where it is
simply undue frustration, and the inconvenience seems greater than the
feature.
This thus removes them again from the conquest critical list.
Patch By: nephele
Differential Revision: https://code.wildfiregames.com/D2674
This was SVN commit r24624.
Since relics ought to be undestroyable, a health component makes no
sense. This makes that the Invulnerability-flag can be removed and
relics can be captured again (after 0f91c5ac61#inline-5236).
Differential Revision: D1268
Original patch by: @temple
Reviewed by: @wraitii
Comments by: @bb, @elexis
Fixes#5007, #5847, 0f91c5ac61#inline-5236
This was SVN commit r24327.
This moves most of what was in the Damage system component to a helper,
and renames that component DelayedDamage.
It also introduces a new global script with all possible attack effects.
Comments Taken From: Freagarach, Stan, bb
Differential Revision: https://code.wildfiregames.com/D2092
This was SVN commit r22754.
This allows heroes to be upgraded
Patch By: smiley
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1694
This was SVN commit r22019.
As demonstrated by Dizaka, it allowed players to win a game by deleting
all buildings, sending one unit across the map and having the enemy get
defeated by the double gaia count.
It also means that players that still have buildings but no CCs/Wonders
are targetted by elephants.
This was SVN commit r21777.
This also reduces the attackercount slightly, because gaia is now
excluded when counting players.
PlayerManager.GetActivePlayers helper function.
This was SVN commit r21730.
Excluding the changes to scenario and skirmisch maps
Transform gameType string to victoryCondition array in load/replaymenu
Adapt the gamesetup to use checkboxes for every victory condition and an
array for storing them
Allow multiple queries in conquestCommon
Remove conquest from regicide, wonder and capture the relic
Move the endless gamedescription from settings to gamedescription
Fixing wrong tabulation from a8a29271ce
This commit will break all scenario and skirmisch maps, their "Gametype"
string needs to be transformed in a "VictoryCondition" array as is done
in the tutorial map (counting endless as an empty array). This counts
for mods too!
Old svn replays and savegame will throw warnings/errors as they are
incompatible after this commit. So svn users will need to delete all
those.
Comments on ai and autostart games By: mimo
Comments on Atlas By: Vladislav
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1240fixes: #4014
This was SVN commit r21474.
Removes repetitive RangeManager and Identity component querying from
triggerscripts.
It means that mostly map specific logic remains in the triggerscript.
This should bring TriggerScript coding a bit closer to map authors who
aren't exactly software developers.
Call the RangeManager entity getters on Danubius and Survival multiple
times on init to further simplify code, as these microseconds on init
are irrelevant.
This was SVN commit r21459.
Simplify that function by tracking entities using Sets instead of
Arrays, even though it costs two Set-to-Array conversions.
This was SVN commit r21457.
Eases implementation of new maps with diverse scripted attackers, refs
#5040, D11 and map difficulties, refs #4963, D1189.
Replaces hardcoded templatenames with calls to a new TriggerHelper
function to query template names, given Classes, Civ, Rank or Packed
state.
Removes the duplicated template counting logic, that was intertwined
with map specific unit classes balancing logic, refs #4805.
Use mimos garrison function from e29dfb7000 / D1146 to support
doubleclicking on garrisoned gaia heroes on Danubius, fixing the bug
described in comment:10 of #4291.
Fix wrong (Trigger) prototype reference in ce65af8dcb.
This was SVN commit r21445.
Create a getNonGaia function
Reset counters on playerDefeat
MarkPlayersAsWon function
Rename MarkPlayerAsWon to MarkPlayerAndAlliesAsWon
Stop letting winningplayers in relic depend on PlayerID
Comments By and Discussion With: elexis
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D972fixes#4648
This was SVN commit r21441.
Do not check for system components,
Do not inline in loops for performance
Use QueryPlayerIDInterface instead of querying the playerEnt
Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1137
This was SVN commit r20652.
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.
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.