HerculesWS / Hercules

Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.
http://herc.ws
GNU General Public License v3.0
900 stars 758 forks source link

SCB_MODE implementation. #647

Open AnisotropicDefixation opened 9 years ago

AnisotropicDefixation commented 9 years ago
//Out of range...
if (!(mode&MD_CANMOVE) || (!can_move && DIFF_TICK(tick, md->ud.canmove_tick) > 0)) {
    //Can't chase. Immobile and trapped mobs should unlock target and use an idle skill.
    if (md->ud.attacktimer == INVALID_TIMER)
    { //Only unlock target if no more attack delay left
        //This handles triggering idle/walk skill.
        mob->unlocktarget(md,tick);
    }
    return true;
}

This is the current implementation, which causes an issue with SC statuses that stop movement.

When a passive monster gets affected by statuses like SC_STOP, SC_FALLENEMPIRE or SC_WHITEIMPRISON, anything that stops movement, after the status ends, they remain idle instead of resuming their attack/chase towards the aggressor.

Playtester commented 8 years ago

This is official behavior. Tested with Ankle Snare, if you trap a passive mob, it will turn idle and not resume attack after trap expires.

Edit: Doesn't work with White Imprison because the damage when it ends makes it re-aggro.

Edit2: Works fine for Fallen Empire. Passive mobs go idle.

Conclusion: Only White Imprison needs to be fixed so that it first ends the stop effect and then deals damage.

Keep in mind going idle is important because it makes monsters spam their idle skills. Some monsters like Bio 3 monsters are designed to spam skills when trapped/stopped.

Edit3: White Imprison is already working on rAthena, not sure about Herc.

AnisotropicDefixation commented 8 years ago

I'm 99,9% positive SC_STOP (Spiral Pierce) and SC_FALLENEMPIRE, should not cause this.

Playtester commented 8 years ago

Not sure about Spiral Pierce, but Fallen Empire works. I tested yesterday to make sure.

AnisotropicDefixation commented 8 years ago

That's probably and oversight then since Spiral Pierce doesn't cause this and the effects are similar.

Playtester commented 8 years ago

SC_STOP is pretty much a custom effect we use to simulate stop behavior, but it might not actually be a status change. It could be that the skill simply gives higher walk delay.

I'll try around with Spiral Pierce when I get the opportunity to see if it really behaves different to other "traps".

Playtester commented 8 years ago

Tested Spiral Pierce: There doesn't seem to be any perceivable stop effect other than the normal dMotion hitlock and monster stays aggressive.