FAForever / fa

Lua code for FAF
221 stars 228 forks source link

Generalize Projectile behavior for `DamageToShields` #6107

Closed lL1l1 closed 4 weeks ago

lL1l1 commented 2 months ago

Description of the proposed changes

Fixes "New shield disruptor does not damage personal shields" (Discord). Fixes Absolver damaging shields that are down, which makes no sense and prevents them from recharging.

Makes DamageToShields work on direct damage and AoE weapons straight from the blueprint (not DoT though).

Testing done on the proposed changes

Shoot both Pulsar and Absolver at Harbinger (personal shield), and ED5 (static shield). They should take increased damage until the shield goes down.

Checklist

Garanas commented 2 months ago

Fixes Absolver damaging shields that are down, which makes no sense and prevents them from recharging.

I'm not sure if this is a bug; I noticed it years ago too and back then it was coined a feature. I'm not able to retrieve the conversation about it however; it is somewhere in Discord 😃

lL1l1 commented 1 month ago

@Garanas What do you think is the best way to implement this? It doesn't feel right to apply it to every single weapon/projectile, so I was thinking of making it a weapon type + projectile type, a weapon type that modifies the projectile's script, or a component version of the two options.