Commit graph

14 commits

Author SHA1 Message Date
Ralph Sennhauser
8b98a7a27c
Enable eslint rule 'no-extra-boolean-cast'
Enable https://eslint.org/docs/latest/rules/no-extra-boolean-cast

Ref: #8068
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-14 12:03:06 +02:00
Ralph Sennhauser
9d791de2eb
Fix eslint rule 'prefer-const' in components/[R-S]*
eslint --no-config-lookup --fix --rule '"prefer-const": 1' \
    binaries/data/mods/public/simulation/components/[R-S]*

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-12 08:02:53 +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
wraitii
4718690f71 Make attacker data explicitly optional in status effects.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3633
This was SVN commit r25015.
2021-03-05 09:40:23 +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
876b035336 Allow resistances to StatusEffects.
Differential Revision: D2908
Reviewed by: @wraitii
Comments by: @bb.
This was SVN commit r24162.
2020-11-11 20:07:30 +00:00
Freagarach
221d5d4062 Fix applying StatusEffects after 0f91c5ac61.
Fixes the ordering of arguments in HandleAttackEffects by StatusEffects.
Fixes wrongly written effectType.

Differential Revision: D2977
Reviewed by: @bb.
This was SVN commit r24004.
2020-08-28 12:42:32 +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
bb
3ff65b451f Fix jsDocs object => Object
This was SVN commit r23991.
2020-08-24 11:01:25 +00:00
wraitii
ea67b79667 Handle stacking status effects, modifiers, some related fixes.
Continuation of work on status effects, following 82a5ab6d19.

Allow techs to modify properties.
Enable different behaviour when status effects would stack, such as
extending the duration or stacking the effects.
Fix GUI issue with more than 5 status effects.
Improve tooltips.
Let status effects show a different tooltip for the attacker and the
receiver.

Patch by: Freagarach
Reviewed By: wraitii, Angen (on an older differential).
Differential Revision: https://code.wildfiregames.com/D2296
This was SVN commit r23757.
2020-06-09 11:47:16 +00:00
Angen
82a5ab6d19 Allow status effect to apply modifiers and fix 2333b1814e
Status effect can apply modifier to the entity (armour strength, walking
speed, ...)
This is also hiding status effect icons by default in selection detail.
Fixing smaller related bugs.

Differential Revision: https://code.wildfiregames.com/D2281
Patch by: @Freagarach
Comments by: Stan, wraitii
This was SVN commit r23448.
2020-01-27 16:51:25 +00:00
wraitii
2333b1814e GUI support for Status Effects and extend their functionality to all attack effects following 16b452cf91
This fixes status effects following 16b452cf91 where the GiveStatus name
change broke them.

This lets status effects deal all types of damage, capture, or inflict
other status effects, like any attack.
This further adds some basic GUI spport to status effects, by showing up
to 5 icons in the top-right of the portrait, and including status
effects in the tooltips.

Status effects can specify a custom icon.

Differential Revision: https://code.wildfiregames.com/D2218
This was SVN commit r22901.
2019-09-15 09:24:52 +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
wraitii
f504c643a0 Allow entities to be affected by Status Effects from ranged attacks.
This implements a status effects receiver component (in a similar
fashion to the damage receiver component). The plan is to further extend
this component notably to handle graphical indication of status effects,
and a variety of other effects.

Currently implemented: ranged attacks can inflict status effects that
reduce HP over time.
This can be resisted by armour.

No units currently utilise this in-game but with proper graphics support
that could be changed.

Patch By: Mate-86
Reviewed By: wraitii
References #1912

Differential Revision: https://code.wildfiregames.com/D1252
This was SVN commit r22304.
2019-05-26 12:44:46 +00:00