transhumandesign / kag-base

King Arthur's Gold base folder.
257 stars 117 forks source link

Buffered slash after being stunned #1361

Open mugg91 opened 2 years ago

mugg91 commented 2 years ago

Description

I observe from time to time that my knight does a slash right after being stunned. Slash being an action that must be charged, this should not be happening.

Reproduction

The probable cause of this is that a knight wants to slash but is getting interrupted by a stun. After the stun ends, the slash is executed anyway. Requires testing.

eps0003 commented 1 year ago

Is this what some players call an instaslash? It's not.

mugg91 commented 1 year ago

When you get interrupted between your first and second slash of doubleslash, and you are holding Action 1 at the time you get stunned, then you will do the 2nd slash right after your stun ends.

You can place this in KnightLogic.as in onTick() to reproduce the behavior.

    if (knight.swordTimer == 10 && knight.state == 10)
    {
        setKnocked(this, 30);
    }

Video - https://www.youtube.com/watch?v=mjUYr2SkSWc The bug happens with the very last doubleslash in the video.

It seems to happen only when getting stunned on that one tick where the swordTimer is 10. In offline, the 2nd slash will hit stuff, in online it won't.

mugg91 commented 1 year ago

Someone said this bug was only graphical. But this is not true. It has a lot of impact on gameplay and needs addressing.

For one thing, the buffered slash has to end before the game recognizes held buttons again. So a new slash will only charge after the buffered slash is over.

It can be canceled by a new button press, although it seems only slash/jab works. Shield button doesn't work during the buffered slash.

mugg91 commented 4 months ago

Have had this happen after landing stun

mugg91 commented 3 months ago

This bug still happens in the current build. A fix for this exists since January 2024 here.