X2CommunityCore / X2WOTCCommunityHighlander

https://steamcommunity.com/workshop/filedetails/?id=1134256495
MIT License
60 stars 68 forks source link

Abilities do not apply ammo effects to multi targets #1329

Closed Iridar closed 4 months ago

Iridar commented 4 months ago

The TypicalAbility_BuildGameState() handles ammo effects only to the ability's primary target, which doesn't really make sense for abilities like Saturation Fire.

MrNice's Weapon Fixes mod fixes it by wrapping the BuildGameStateFn delegates by relevant abilities.

Iridar commented 4 months ago

More specifically, the issue is as follows:

  1. Faceoff applies bonus weapon effects and ammo effects, but does not visualize applying them.
  2. Abilities that use TypicalAbility_BuildGameState and TypicalAbility_BuildVisualization do not apply bonus weapon effects and ammo effects to multi targets, only to the primary target.

Saturation Fire is one such ability. According to its description:

Saturation Fire will take a standard shot at every enemy in the cone, and will damage or destroy random cover elements in the cone.

Logically should apply ammo effects and bonus weapon effects to its targets, but doesn't.

This issue is fixed in MrNice's Weapon Fixes mod, which fixes visualization for Faceoff, toggles bonus weapon and ammo effects for Saturation fire, and fixes game state application and visualization for Saturation Fire and any other similar ability using a heuristic approach.