gcsim
gcsim copied to clipboard
sim handles dendro + hydro application within the same frame incorrectly
viewer link: https://gcsim.app/v3/viewer/share/de85789c-0c9a-41dd-aeb0-c6f1b2e94215
at frame 709
A bit of a known issue. Result from being able to handle "srp" properly:
https://github.com/genshinsim/gcsim/blob/26e4bbf8aa0974152a316e2ea1dfe837eac67c53/pkg/core/combat/attack.go#L69-L83
Here I had to delay the damage and attachment of any aura until the end of the current frame. However, as a result if 2 attacks occur at the same time, the attachment is delayed so no reaction check happens. Hence you get Hydro + Dendro attached.
Off the top of my head, I guess the only/best solution I can come up with is at the beginning of reaction ticks here:
https://github.com/genshinsim/gcsim/blob/26e4bbf8aa0974152a316e2ea1dfe837eac67c53/pkg/reactable/reactable.go#L291-L293
We can add a check to see if there are any modifiers that cannot possibly coexist together (i.e. Dendro + Hydro) and force them to react. This would result in a delayed reaction possibly by 1 frame.
However, the problem with this is with stuff like Vaporize or Melt which now is not linked to any attack and therefore would just kinda disappear.
Need to think more about this...
related to #390