Rewrite choose_stairs(). Use of '&& !builds_up()' was a no-op in normal branches and forced picking the down stairs/ladder in Vlad's Tower (or Sokoban) rather than reversing the usual up/down choice. Also, the logic used was backwards: Kops always surrounded the up stairs instead of the down stairs as intended. Non-Kops picked the opposite direction of what the arguments asked for but since they based their choice of up versus down on hidden mon->m_id, the reversal wasn't noticeable. Extend the choosing so that if nothing in the requested direction can be found, it tries the opposite direction. Otherwise when Vlad's m_id happens to force the direction to be 'up', he has nowhere to teleport to now that being in his Tower doesn't force 'down' anymore. He goes to down ladder when on the top level but if you level teleport to the next level down and he accompanies you, he might go to either the down ladder or the up ladder when he tries to get away from you to heal.
107 KiB
107 KiB