-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
PatR
committed
Feb 26, 2022
1 parent
f8cb7ae
commit 020d3f7
Showing
2 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters