crawl / crawl

Dungeon Crawl: Stone Soup official repository
https://crawl.develz.org/
Other
2.27k stars 1.23k forks source link

Kraken Tentacles move at ~2/3 speed and attack at normal speed while the head is paralyzed #3540

Open Monkooky opened 5 months ago

Monkooky commented 5 months ago

Kraken tentacles do not use the regular movement rules; ignoring energy and instead moving when the head calls move_child_tentacles().

This is called 3ish times during handle_monster_move- firstly, line 1693

    if (!disabled && mons_is_tentacle_head(mons_base_type(*mons)))
        move_child_tentacles(mons);

This checks if the head is disabled; if so this movement is skipped.

Secondly, line 2039-

if (mons_is_tentacle_head(mons_base_type(*mons)))
    {
        move_child_tentacles(mons);

        mons->move_spurt += (old_energy - mons->speed_increment)
                             * _tentacle_move_speed(mons_base_type(*mons));
        ASSERT(mons->move_spurt > 0);
        while (mons->move_spurt >= 100)
        {
            move_child_tentacles(mons);
            mons->move_spurt -= 100;
        }
    }

This disregards whether the head is disabled, and moves the tentacles 2? times.

The tentacle attacks, conversely, operate entirely independantly of the head.

While there are multiple behaviours which could be considered correct here, this inconsistent nonsense certainly doesn't qualify

Monkooky commented 5 months ago

Having reread how disabled is set, I am no longer confident I've correctly diagnosed this issue.