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

sim handles dendro + hydro application within the same frame incorrectly #986

Open
t3201v opened this issue Oct 4, 2022 · 2 comments
Open
Labels
area: pkg Related to core logic kind: design limitation Constraints of the existing architecture prevent this from being fixed

Comments

@t3201v
Copy link
Contributor

t3201v commented Oct 4, 2022

viewer link: https://gcsim.app/v3/viewer/share/de85789c-0c9a-41dd-aeb0-c6f1b2e94215
at frame 709
alt image

@srliao srliao added the kind: bug Existing code is bugged label Oct 4, 2022
@srliao
Copy link
Contributor

srliao commented Oct 4, 2022

A bit of a known issue. Result from being able to handle "srp" properly:

h.Tasks.Add(func() {
//apply the damage
t.ApplyDamage(&cpy, dmg)
h.Events.Emit(event.OnDamage, t, &cpy, dmg, crit)
//callbacks
cb := AttackCB{
Target: t,
AttackEvent: &cpy,
Damage: dmg,
IsCrit: crit,
}
for _, f := range cpy.Callbacks {
f(cb)
}
}, 0)

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:

func (r *Reactable) Tick() {

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...

@k0l11 k0l11 added area: pkg Related to core logic kind: design limitation Constraints of the existing architecture prevent this from being fixed and removed kind: bug Existing code is bugged labels Dec 6, 2022
@k0l11
Copy link
Collaborator

k0l11 commented Jan 6, 2023

related to #390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: pkg Related to core logic kind: design limitation Constraints of the existing architecture prevent this from being fixed
Projects
None yet
Development

No branches or pull requests

3 participants