Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X2TargetingMethod_ArcWave doesn't validate its AdditionalTargets it gets as parameter #1408

Open
furudee opened this issue Nov 14, 2024 · 0 comments

Comments

@furudee
Copy link

furudee commented Nov 14, 2024

The game assigns any additional targets an ability might hit, I believe in class X2AbilityMultiTargetStyle, native function GetMultiTargetOptions.

The issue is that it seems to incorrectly assign these additional targets when using an ability that uses class X2TargetingMethod_ArcWave as its Targeting Method.
In a function GetAdditionalTargets, X2TargetingMethod_ArcWave only adds more targets and validates them, but doesn't validate the existing ones in the function parameter it's given.
Other targeting methods that make use of the function seem to validate the targets.

I suggest adding a validation loop in ArcWave targeting method, that checks all targets being hit are also on the tiles being hit.
I attempted to use an existing native function that other targeting methods use for validation, but it returned incorrect results.

I'm not aware of any other bug/ability that makes an ability hit more/less targets than intended, so I think just adding a validation is enough in this case

Untitled5
Example: ability has been assigned 2 additional targets instead of the intended amount of 1. This seems to be dependent on the position where the unit initiates the ability. Initiating from left or right and doing a 90 degree attack gives wrong amount of targets, but a straight on attack gives correct amount.

furudee added a commit to furudee/X2WOTCCommunityHighlander that referenced this issue Nov 14, 2024
furudee added a commit to furudee/X2WOTCCommunityHighlander that referenced this issue Nov 14, 2024
furudee added a commit to furudee/X2WOTCCommunityHighlander that referenced this issue Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant