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

Add eligible targets list for certain event(s) #283

Open
kdovtdc opened this issue Sep 21, 2024 · 2 comments
Open

Add eligible targets list for certain event(s) #283

kdovtdc opened this issue Sep 21, 2024 · 2 comments

Comments

@kdovtdc
Copy link
Collaborator

kdovtdc commented Sep 21, 2024

The game uses a certain parameter to identify the intended target of an action (= a list of eligible(?) targets). This list should be given to the relevant event emit. Known examples for this are:

  • Messenger 4p ("When the wearer uses their Ultimate on an ally, [...]"): needs to compare the targets list with the list containing all allies (intersection needs to be NOT nil) when ActionStart happens
  • Hanya Burden ("For every 2 Basic ATKs, Skills, or Ultimates allies use on an enemy with Burden, [...]"): needs to compare Burden owner to targets list of the current action when ActionStart happens
@kdovtdc
Copy link
Collaborator Author

kdovtdc commented Jan 13, 2025

Further explanation: As of currently, a primaryTarget is evaluated inside ExecuteAction and passed to the method (Attack, Skill), but the returned executable that is used for event emits and further logic doesn't hold the information of that primaryTarget, nor the "targeting type" of the attack to potentially determine the other targets. Instead, the targets list for AttackEnd event and ActionEnd event is built with the information from running the method (implementation) that was passed to the executable's Execute field.

@kdovtdc
Copy link
Collaborator Author

kdovtdc commented Jan 14, 2025

[copied from discussion in srsim channel]

idea: the stuff that needs to be done for getting the correct Targets field for ActionStart and ActionEnd are:

  • ExecutableAction struct needs to provide the evaluated primaryTarget so that it can provide that target for further logic, or, do the logic first and directly provide all correct Targets
  • some logic to take this target and add all other necessary targets (in case of Blast, AoE...) to the Targets field. this would also mean...
  • ... Skill, Ult etc. need a way to let ActionStart or ExecutableAction know what kind of targeting this action has (some sort of model.TargetingType?)
  • put clearActionTargets somewhere else (or even remove it?)
  • determine whether current ActionEnd's Targets field (which is a map with a bool) should/can be retained or changed to a simple slice

for AttackEnd:

  • reuse what is done with ActionTargets field (technically this is AttackOrHealTargets, right?) or make new logic to track all attacked targets

additional thoughts:

  • what Targets does AttackStart need to be filled with? do bounce attacks consider targets in AttackStart even if they possibly never hit them? there doesn't seem to be anything to make a scenario with bounce and OnBeforeAttack with target being relevant I think
  • need to do some stuff for heals as well
  • need to do some stuff for inserts as well

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