Commit graph

11 commits

Author SHA1 Message Date
Ralph Sennhauser
b80c222b96
Fix eslint rule 'prefer-const' in components/[C-F]*
eslint --no-config-lookup --fix --rule '"prefer-const": 1' \
    binaries/data/mods/public/simulation/components/C* \
    binaries/data/mods/public/simulation/components/D* \
    binaries/data/mods/public/simulation/components/E* \
    binaries/data/mods/public/simulation/components/F*

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-11 14:27:12 +02:00
Freagarach
4329dd90ce Rename Attacking.js-helper to Attack.js and its global to AttackHelper.
16b452cf91#inline-4026

Differential revision: https://code.wildfiregames.com/D3858
Comment by: @wraitii
This was SVN commit r25275.
2021-04-16 06:55:23 +00:00
Freagarach
8acc3b049f Combine attack times in a single node.
Reduces duplication, allows all attack types to cause splash damage.
While at it, makes delay and minimal range optional (for obvious
defaults are available).

Split from D368, so basically a patch by @bb.

Note that it may seem like one can arbitrarily name an attack now, but
that is not true.

Differential revision: D2002
Comments by: @bb, @Nescio, @Stan, @wraitii
This was SVN commit r25233.
2021-04-12 06:17:13 +00:00
Freagarach
b4fd4ab655 Combine attacker data in "data"-object in attack-related code.
Allowing for easier introduction of new parameters.
Split from D781, (D368).

Differential revision: D2269
Comments by: @Angen, @Stan, @wraitii
Idea accepted by: @wraitii
This was SVN commit r25013.
2021-03-05 06:32:44 +00:00
Freagarach
e98fce58a6 Move some position-related functions to PositionHelper.
Renames helper Entity.js to Position.js and moves to there:
- `EntitiesNearPoint` (from Attacking.js).
- `InterpolatedLocation` (from Attacking.js).
- `TestCollision` (from Attacking.js).
- `PredictTimeToTarget` (from Attack.js).

Also adds a test for the helper.

Differential Revision: D2940
Reviewed By: @wraitii
Comments by: @Stan, @vladislavbelov
This was SVN commit r24128.
2020-11-04 18:56:45 +00:00
bb
5e6a2322e7 Damage parent of mirage instead of trying to damage the mirage
Reviewed By: Freagarach
Differential Revision: D2979
This was SVN commit r24005.
2020-08-28 18:05:33 +00:00
Freagarach
0f91c5ac61 Rename Armour to Resistance and change the way it is processed.
- Renames Armour-node to Resistance.
- Support resistance against Capture.
- Puts resistance against effects in separate nodes.
- Some cleaning.

Differential Revision: D2229
Reviewed by: @bb (accepted), @wraitii.
Comments by: @Stan, @Nescio.
This was SVN commit r24001.
2020-08-27 10:24:59 +00:00
wraitii
441f17cbeb Fix EntitiesNearPoint range query
Use a fixed range delta around the missile hit-location for neighboring
entities to damage.
Use a common query for GAIA and non-GAIA entities.
Do not presume attackable entities have Health.
Fix an issue where gaia entities were returned twice.

This fixes concerns reported by elexis at 38b2e37a61 and by Freagarach
at 16b452cf91.

Differential Revision: https://code.wildfiregames.com/D2738
This was SVN commit r23680.
2020-05-20 17:03:33 +00:00
Angen
be38792477 Support friendly fire for projectile attacks.
Allow templates to define if friendlyfire is enabled for projectiles.

Differential Revision: https://code.wildfiregames.com/D1973
Patch by: Freagarach
Reviewed by: wraitii, Angen
This was SVN commit r23519.
2020-03-07 10:39:05 +00:00
wraitii
524422c7d8 Move "PlayersToDamage" from calling functions to "CauseDamageOverArea" and replace it with FriendlyFire.
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2064
This was SVN commit r22864.
2019-09-07 13:48:11 +00:00
wraitii
16b452cf91 Generalise Attack effects. All attacks, including death damage and splash, can deal any number of attack effects (damaging, capture, giving status effects.)
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.
2019-08-22 18:00:33 +00:00