Skip to content

Commit

Permalink
Expand the passtune range by 1
Browse files Browse the repository at this point in the history
Another small quality of life feature. Some players will probably get
peace of mind not having to stand right next to the highly dangerous
drawbridge to activate it.

A few implications, most of which make the Castle slightly easier but
not significantly:
- You no longer have to go in range of the eels/sharks to play the tune.
- You can create a more complex setup to trap monsters and activate it
  from farther out.
- There's a little less risk with accidentally stepping onto the open
  drawbridge right as someone zaps striking at you. (For players who
  don't use paranoid water, it also means less risk of typoing into the
  moat).
  • Loading branch information
copperwater committed May 17, 2022
1 parent b0a20a4 commit 25e6962
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions doc/xnh-changelog-8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ changes:
of it as well, similar to wielding Grayswandir.
- The Castle drawbridge may fail to close 20% of the time when using the
passtune.
- The Castle drawbridge responds to passtune attempts 2 squares away from
either of the two drawbridge squares, instead of only directly adjacent
squares.

### Interface changes

Expand Down
8 changes: 4 additions & 4 deletions src/music.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,8 @@ do_play_instrument(struct obj* instr)
exercise(A_WIS, TRUE); /* just for trying */
if (!strcmp(buf, g.tune)) {
/* Search for the drawbridge */
for (y = u.uy - 1; y <= u.uy + 1; y++)
for (x = u.ux - 1; x <= u.ux + 1; x++)
for (y = u.uy - 2; y <= u.uy + 2; y++)
for (x = u.ux - 2; x <= u.ux + 2; x++)
if (isok(x, y))
if (find_drawbridge(&x, &y)) {
/* tune now fully known */
Expand Down Expand Up @@ -780,8 +780,8 @@ do_play_instrument(struct obj* instr)
* we can give the player some hints like in the
* Mastermind game */
ok = FALSE;
for (y = u.uy - 1; y <= u.uy + 1 && !ok; y++)
for (x = u.ux - 1; x <= u.ux + 1 && !ok; x++)
for (y = u.uy - 2; y <= u.uy + 2 && !ok; y++)
for (x = u.ux - 2; x <= u.ux + 2 && !ok; x++)
if (isok(x, y))
if (IS_DRAWBRIDGE(levl[x][y].typ)
|| is_drawbridge_wall(x, y) >= 0)
Expand Down

0 comments on commit 25e6962

Please sign in to comment.