crystal balls and '~'

<Someone> wrote:
- You currently appear to be able to specify '~' and have it try
  to detect monsters (though it won't detect any long worms)

Show the entire worm when specifying either '~' or 'w' now.
This commit is contained in:
nethack.allison
2003-10-19 19:07:33 +00:00
parent b2ffe64968
commit db2620d481
4 changed files with 34 additions and 3 deletions

View File

@@ -450,6 +450,30 @@ see_wsegs(worm)
}
}
/*
* detect_wsegs()
*
* Display all of the segments of the given worm for detection.
*/
void
detect_wsegs(worm, use_detection_glyph)
struct monst *worm;
boolean use_detection_glyph;
{
int num;
struct wseg *curr = wtails[worm->wormno];
/* if (!mtmp->wormno) return; bullet proofing */
while (curr != wheads[worm->wormno]) {
num = use_detection_glyph ?
detected_monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL)) :
monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL));
show_glyph(curr->wx,curr->wy,num);
curr = curr->nseg;
}
}
/*
* save_worm()