using a whistle underwater
A long time ago, a message to the list suggested that whistles should not work underwater. I did some google research and this does appear to be true for most whistles. However, magic whistles are magical, so I left them alone (also, I did find one high-tech whistle in my research that claimed to work underwater). Since being underwater affects pitch, adjusted the magic whistle message slightly for that case.
This commit is contained in:
@@ -54,6 +54,7 @@ grammar fixes for applying stethoscope to corpses and statues
|
|||||||
player polymorphed as a ceiling hider cannot reach the floor, but
|
player polymorphed as a ceiling hider cannot reach the floor, but
|
||||||
automatically unhide on #sit
|
automatically unhide on #sit
|
||||||
trappers do not hide on the ceiling
|
trappers do not hide on the ceiling
|
||||||
|
non-magical whistles do not work underwater
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
15
src/apply.c
15
src/apply.c
@@ -389,8 +389,12 @@ STATIC_OVL void
|
|||||||
use_whistle(obj)
|
use_whistle(obj)
|
||||||
struct obj *obj;
|
struct obj *obj;
|
||||||
{
|
{
|
||||||
You(whistle_str, obj->cursed ? "shrill" : "high");
|
if(Underwater) {
|
||||||
wake_nearby();
|
You("blow bubbles through %s.", yname(obj));
|
||||||
|
} else {
|
||||||
|
You(whistle_str, obj->cursed ? "shrill" : "high");
|
||||||
|
wake_nearby();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
@@ -399,12 +403,15 @@ struct obj *obj;
|
|||||||
{
|
{
|
||||||
register struct monst *mtmp, *nextmon;
|
register struct monst *mtmp, *nextmon;
|
||||||
|
|
||||||
|
/* it's magic! it works underwater too (at a higher pitch) */
|
||||||
if(obj->cursed && !rn2(2)) {
|
if(obj->cursed && !rn2(2)) {
|
||||||
You("produce a high-pitched humming noise.");
|
You("produce a %shigh-pitched humming noise.",
|
||||||
|
Underwater ? "very " : "");
|
||||||
wake_nearby();
|
wake_nearby();
|
||||||
} else {
|
} else {
|
||||||
int pet_cnt = 0;
|
int pet_cnt = 0;
|
||||||
You(whistle_str, Hallucination ? "normal" : "strange");
|
You(whistle_str, Hallucination ? "normal" :
|
||||||
|
Underwater ? "strange, high-pitched" : "strange");
|
||||||
for(mtmp = fmon; mtmp; mtmp = nextmon) {
|
for(mtmp = fmon; mtmp; mtmp = nextmon) {
|
||||||
nextmon = mtmp->nmon; /* trap might kill mon */
|
nextmon = mtmp->nmon; /* trap might kill mon */
|
||||||
if (DEADMONSTER(mtmp)) continue;
|
if (DEADMONSTER(mtmp)) continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user