ins_fencepost
};
#endif
+
+enum sound_effect_entries {
+ se_faint_splashing = 1,
+ se_crackling_of_hellfire = 2,
+ se_heart_beat = 3,
+ se_typing_noise = 4,
+ se_hollow_sound = 5,
+ se_rustling_paper = 6,
+ se_crushing_sound = 7,
+ se_splash = 8,
+ se_chains_rattling_gears_turning = 9,
+ se_smashing_and_crushing = 10,
+ se_gears_turning_chains_rattling = 11,
+ se_loud_splash = 12,
+ se_lound_crash = 13,
+ se_crashing_rock = 14,
+ se_sizzling = 15,
+ se_crashing_boulder = 16,
+ se_boulder_drop = 17,
+ se_item_tumble_downwards = 18,
+ se_drain_noises = 19,
+ se_ring_in_drain = 20,
+ se_groans_and_moans = 21,
+ se_scratching = 22,
+ se_glass_shattering = 23,
+ se_egg_cracking = 24,
+ se_gushing_sound = 25,
+ se_glass_crashing = 26,
+ se_egg_splatting = 27,
+ se_sinister_laughter = 28,
+ se_blast = 29,
+ se_stone_breaking = 30,
+ se_stone_crumbling = 31,
+ se_snakes_hissing = 32,
+ se_loud_pop = 33,
+ se_clanking_pipe = 34,
+ se_sewer_song = 35,
+ se_monster_behind_boulder = 36,
+ se_wailing_of_the_banshee = 37,
+ se_swoosh = 38,
+ se_explosion = 39,
+ se_crashing_sound = 40,
+ se_someone_summoning = 41,
+ se_rushing_wind_noise = 42,
+ se_splat_from_engulf = 43,
+ se_faint_sloshing = 44,
+ se_crunching_sound = 45,
+ se_slurping_sound = 46,
+ se_masticating_sound = 47,
+ se_distant_thunder = 48,
+ se_applause = 49,
+ se_shrill_whistle = 50,
+ se_someone_yells = 51,
+ se_door_unlock_and_open = 52,
+ se_door_open = 53,
+ se_door_crash_open = 54,
+ se_dry_throat_rattle = 55,
+ se_cough = 56,
+ se_angry_snakes = 57,
+ se_zap_then_explosion = 58,
+ se_zap = 59,
+ se_horn_being_played = 60,
+ se_mon_chugging_potion = 61,
+ se_bugle_playing_reveille = 62,
+ se_crash_through_floor = 63,
+ se_thump = 64,
+ se_scream = 65,
+ se_tumbler_click = 66,
+ se_gear_turn = 67,
+ se_divine_music = 68,
+ se_thunderclap = 69,
+ se_sad_wailing = 70,
+ se_maniacal_laughter = 71,
+ se_rumbling_of_earth = 72,
+ se_clanging_sound = 73,
+ se_mutter_imprecations = 74,
+ se_mutter_incantation = 75,
+ se_angry_voice = 76,
+ se_sceptor_pounding = 77,
+ se_courtly_conversation = 78,
+ se_low_buzzing = 79,
+ se_angry_drone = 80,
+ se_bees = 81,
+ se_someone_searching = 82,
+ se_guards_footsteps = 83,
+ se_faint_chime = 84,
+ se_loud_click = 85,
+ se_soft_click = 86,
+ se_squeak = 87,
+ se_squeak_C = 88,
+ se_squeak_D_flat = 89,
+ se_squeak_D = 90,
+ se_squeak_E_flat = 91,
+ se_squeak_E = 92,
+ se_squeak_F = 93,
+ se_squeak_F_sharp = 94,
+ se_squeak_G = 95,
+ se_squeak_G_sharp = 96,
+ se_squeak_A = 97,
+ se_squeak_B_flat = 98,
+ se_squeak_B = 99,
+ se_someone_bowling = 100,
+ se_rumbling = 101,
+ se_loud_crash = 102,
+ se_deafening_roar_atmospheric = 103,
+ se_low_hum = 104,
+ se_laughter = 105,
+ se_cockatrice_hiss = 106,
+ se_chant = 107,
+ se_cracking_sound = 108,
+ se_ripping_sound = 109,
+ se_thud = 110,
+ se_clank = 111,
+ se_crumbling_sound = 112,
+ se_soft_crackling = 113,
+ se_crackling = 114,
+ se_sharp_crack = 115,
+ se_wall_of_force = 116,
+ se_alarm = 117,
+ se_kick_door_it_shatters = 118,
+ se_kick_door_it_crashes_open = 119,
+ se_bubble_rising = 120,
+ se_bolt_of_lightning = 121,
+ se_board_squeak = 122,
+ se_board_squeaks_loudly = 123,
+ se_boing = 124,
+ se_crashed_ceiling = 125,
+ se_clash = 126,
+ se_crash_door = 127,
+ se_crash = 128,
+ se_crash_throne_destroyed = 129,
+ se_crash_something_broke = 130,
+ se_kadoom_boulder_falls_in = 131,
+ se_klunk_pipe = 132,
+ se_kerplunk_boulder_gone = 133,
+ se_klunk = 134,
+ se_klick = 135,
+ se_kaboom_door_explodes = 136,
+ se_kaboom_boom_boom = 137,
+ se_kaablamm_of_mine = 138,
+ se_kaboom = 139,
+ se_splat_egg = 140,
+ se_destroy_web = 141,
+ se_iron_ball_dragging_you = 142,
+ se_iron_ball_hits_you = 143,
+ se_lid_slams_open_falls_shut = 144,
+ se_chain_shatters = 145,
+ se_furious_bubbling = 146,
+ se_air_crackles = 147,
+ se_potion_crash_and_break = 148,
+ se_hiss = 149,
+ se_growl = 150,
+ se_canine_bark = 151,
+ se_canine_growl = 152,
+ se_canine_whine = 153,
+ se_canine_yip = 154,
+ se_canine_howl = 155,
+ se_feline_yowl = 156,
+ se_feline_meow = 157,
+ se_feline_purr = 158,
+ se_feline_yip = 159,
+ se_feline_mew = 160,
+ se_roar = 161,
+ se_snarl = 162,
+ se_buzz = 163,
+ se_squeek = 164,
+ se_squawk = 165,
+ se_squeal = 166,
+ se_screech = 167,
+ se_equine_neigh = 168,
+ se_equine_whinny = 169,
+ se_equine_whicker = 170,
+ se_bovine_moo = 171,
+ se_bovine_bellow = 172,
+ se_wail = 173,
+ se_groan = 174,
+ se_grunt = 175,
+ se_gurgle = 176,
+ se_elephant_trumpet = 177,
+ se_snake_rattle = 178,
+ se_hallu_growl = 179,
+};
+
+#if defined(SND_LIB_QTSOUND) || defined(SND_LIB_PORTAUDIO) \
+ || defined(SND_LIB_OPENAL) || defined(SND_LIB_SDL_MIXER) \
+ || defined(SND_LIB_MINIAUDIO) || defined(SND_LIB_FMOD) \
+ || defined(SND_LIB_SOUND_ESCCODES) || defined(SND_LIB_VISSOUND) \
+ || defined(SND_LIB_WINDSOUND)
+
+#define Soundeffect(seid, vol) \
+ do { \
+ if (!Deaf && soundprocs.sound_soundeffect \
+ && ((soundprocs.sndcap & SNDCAP_SOUNDEFFECTS) != 0)) \
+ (*soundprocs.sound_soundeffect)(emptystr, (seid), (vol)); \
+ } while(0)
+
+#else
+#define Soundeffect(seid, vol)
+#endif
+
#endif /* SNDPROCS_H */
mstatusline(u.ustuck);
return res;
} else if (u.dz) {
- if (Underwater)
+ if (Underwater) {
+ Soundeffect(se_faint_splashing, 35);
You_hear("faint splashing.");
- else if (u.dz < 0 || !can_reach_floor(TRUE))
+ } else if (u.dz < 0 || !can_reach_floor(TRUE)) {
cant_reach_floor(u.ux, u.uy, (u.dz < 0), TRUE);
- else if (its_dead(u.ux, u.uy, &res))
+ } else if (its_dead(u.ux, u.uy, &res)) {
; /* message already given */
- else if (Is_stronghold(&u.uz))
+ } else if (Is_stronghold(&u.uz)) {
+ Soundeffect(se_crackling_of_hellfire, 35);
You_hear("the crackling of hellfire.");
- else
+ } else {
pline_The("%s seems healthy enough.", surface(u.ux, u.uy));
+ }
return res;
} else if (obj->cursed && !rn2(2)) {
+ Soundeffect(se_heart_beat, 100);
You_hear("your heart beat.");
return res;
}
rx = u.ux + u.dx;
ry = u.uy + u.dy;
if (!isok(rx, ry)) {
+ Soundeffect(se_typing_noise, 100);
You_hear("a faint typing noise.");
return ECMD_OK;
}
lev = &levl[rx][ry];
switch (lev->typ) {
case SDOOR:
+ Soundeffect(se_hollow_sound, 100);
You_hear(hollow_str, "door");
cvt_sdoor_to_door(lev); /* ->typ = DOOR */
feel_newsym(rx, ry);
goto discard_broken_wand;
case WAN_STRIKING:
/* we want this before the explosion instead of at the very end */
+ Soundeffect(se_wall_of_force, 65);
pline("A wall of force smashes down around you!");
dmg = d(1 + obj->spe, 6); /* normally 2d12 */
/*FALLTHRU*/
You("flip through the pages of %s.", thesimpleoname(obj));
if (obj->otyp == SPE_BOOK_OF_THE_DEAD) {
- if (!Deaf)
+ if (!Deaf) {
+ if (!Hallucination)
+ Soundeffect(se_rustling_paper, 50);
You_hear("the pages make an unpleasant %s sound.",
Hallucination ? "chuckling"
: "rustling");
- else if (!Blind)
+ } else if (!Blind) {
You_see("the pages glow faintly %s.", hcolor(NH_RED));
- else
+ } else {
You_feel("the pages tremble.");
+ }
} else if (Blind) {
pline("The pages feel %s.",
Hallucination ? "freshly picked"
break;
case TT_WEB:
pline(pullmsg, "web");
+ Soundeffect(se_destroy_web, 30);
pline_The("web is destroyed!");
deltrap(t_at(u.ux, u.uy));
break;
}
} else {
if (rn2(2)) {
+ Soundeffect(se_iron_ball_hits_you, 25);
pline_The("iron ball smacks into you!");
losehp(Maybe_Half_Phys(rnd(20)), "iron ball collision",
KILLED_BY_AN);
relocates = TRUE;
debugpline0("Jump succeeds!");
} else {
- if (e_inview)
+ if (e_inview) {
pline("%s crushed by the falling portcullis!",
E_phrase(etmp, "are"));
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_crushing_sound, 100);
You_hear("a crushing sound.");
+ }
e_died(etmp,
XKILL_NOCORPSE | (e_inview ? XKILL_GIVEMSG
: XKILL_NOMSG),
} else {
debugpline1("%s on drawbridge square", E_phrase(etmp, "are"));
if (is_pool(etmp->ex, etmp->ey) && !e_inview)
- if (!Deaf)
+ if (!Deaf) {
+ Soundeffect(se_splash, 100);
You_hear("a splash.");
+ }
if (e_survives_at(etmp, etmp->ex, etmp->ey)) {
if (e_inview && !is_flyer(etmp->edata)
&& !is_floater(etmp->edata))
x2 = x;
y2 = y;
get_wall_for_db(&x2, &y2);
- if (cansee(x, y) || cansee(x2, y2))
+ if (cansee(x, y) || cansee(x2, y2)) {
You_see("a drawbridge %s up!",
(((u.ux == x || u.uy == y) && !Underwater)
|| distu(x2, y2) < distu(x, y))
? "coming"
: "going");
- else /* "5 gears turn" for castle drawbridge tune */
+ } else { /* "5 gears turn" for castle drawbridge tune */
+ Soundeffect(se_chains_rattling_gears_turning, 75);
You_hear("chains rattling and gears turning.");
+ }
lev1->typ = DRAWBRIDGE_UP;
lev2 = &levl[x2][y2];
lev2->typ = DBWALL;
do_entity(&(go.occupants[0])); /* Do set_entity after first */
set_entity(x2, y2, &(go.occupants[1])); /* do_entity for worm tail */
do_entity(&(go.occupants[1]));
- if (OBJ_AT(x, y) && !Deaf)
+ if (OBJ_AT(x, y) && !Deaf) {
+ Soundeffect(se_smashing_and_crushing, 75);
You_hear("smashing and crushing.");
+ }
(void) revive_nasty(x, y, (char *) 0);
(void) revive_nasty(x2, y2, (char *) 0);
delallobj(x, y);
x2 = x;
y2 = y;
get_wall_for_db(&x2, &y2);
- if (cansee(x, y) || cansee(x2, y2))
+ if (cansee(x, y) || cansee(x2, y2)) {
You_see("a drawbridge %s down!",
(distu(x2, y2) < distu(x, y)) ? "going" : "coming");
- else /* "5 gears turn" for castle drawbridge tune */
+ } else { /* "5 gears turn" for castle drawbridge tune */
+ Soundeffect(se_gears_turning_chains_rattling, 100);
You_hear("gears turning and chains rattling.");
+ }
lev1->typ = DRAWBRIDGE_DOWN;
lev2 = &levl[x2][y2];
lev2->typ = DOOR;
boolean lava = (lev1->drawbridgemask & DB_UNDER) == DB_LAVA;
if (lev1->typ == DRAWBRIDGE_UP) {
- if (cansee(x2, y2))
+ if (cansee(x2, y2)) {
pline_The("portcullis of the drawbridge falls into the %s!",
lava ? hliquid("lava") : "moat");
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_loud_splash, 100);
You_hear("a loud *SPLASH*!");
+ }
} else {
- if (cansee(x, y))
+ if (cansee(x, y)) {
pline_The("drawbridge collapses into the %s!",
lava ? hliquid("lava") : "moat");
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_loud_splash, 100);
You_hear("a loud *SPLASH*!");
+ }
}
lev1->typ = lava ? LAVAPOOL : MOAT;
lev1->drawbridgemask = 0;
(void) flooreffects(otmp2, x, y, "fall");
}
} else {
- if (cansee(x, y))
+ if (cansee(x, y)) {
pline_The("drawbridge disintegrates!");
- else
+ } else {
+ Soundeffect(se_lound_crash, 100);
You_hear("a loud *CRASH*!");
+ }
lev1->typ = ((lev1->drawbridgemask & DB_ICE) ? ICE : ROOM);
lev1->icedpool = ((lev1->drawbridgemask & DB_ICE) ? ICED_MOAT : 0);
}
E_phrase(etmp1, "are"));
} else {
if (!Deaf && !is_u(etmp1) && !is_pool(x, y)) {
+ Soundeffect(se_crushing_sound, 75);
You_hear("a crushing sound.");
} else {
debugpline1("%s from shrapnel", E_phrase(etmp1, "die"));
register coordxy i;
register boolean waslit = rm_waslit();
- if (rockit)
+ if (rockit) {
+ Soundeffect(se_crashing_rock, 100);
pline("Crash! The ceiling collapses around you!");
- else
+ } else {
pline("A mysterious force %s cave around you!",
(levl[u.ux][u.uy].typ == CORR) ? "creates a" : "extends the");
+ }
display_nhwindow(WIN_MESSAGE, TRUE);
for (dist = 1; dist <= 2; dist++) {
* digging makes a hole, but the boulder immediately
* fills it. Final outcome: no hole, no boulder.
*/
+ Soundeffect(se_kadoom_boulder_falls_in, 60);
pline("KADOOM! The boulder falls in!");
wake_nearby();
(void) delfloortrap(ttmp);
rx = u.ux + u.dx;
ry = u.uy + u.dy;
if (!isok(rx, ry)) {
+ Soundeffect(se_clash, 40);
pline("Clash!");
return ECMD_TIME;
}
if (IS_WALL(here->typ)) {
/* KMH -- Okay on arboreal levels (room walls are still stone) */
- if (Verbose(0, mdig_tunnel2) && !rn2(5))
+ if (Verbose(0, mdig_tunnel2) && !rn2(5)) {
+ Soundeffect(se_crashing_rock, 75);
You_hear("crashing rock.");
+ }
if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE))
add_damage(mtmp->mx, mtmp->my, 0L);
if (gl.level.flags.is_maze_lev) {
the(xname(otmp)), fills_up ? "fills" : "falls into",
what);
} else if (!Deaf) {
+ if (lava)
+ Soundeffect(se_sizzling, 100);
+ else
+ Soundeffect(se_splash, 100);
You_hear("a%s splash.", lava ? " sizzling" : "");
}
wake_nearto(rx, ry, 40);
}
if (*verb) {
if (Blind && u_at(x, y)) {
+ Soundeffect(se_crashing_boulder, 100);
You_hear("a CRASH! beneath you.");
} else if (!Blind && cansee(x, y)) {
pline_The("boulder %s%s.",
: (ttyp == HOLE) ? "plugs a hole"
: "fills a pit");
} else {
+ Soundeffect(se_boulder_drop, 100);
You_hear("a boulder %s.", verb);
}
}
} else if (u_at(x, y) && (t = t_at(x, y)) != 0
&& (uteetering_at_seen_pit(t) || uescaped_shaft(t))) {
if (is_pit(t->ttyp)) {
- if (Blind && !Deaf)
+ if (Blind && !Deaf) {
+ Soundeffect(se_item_tumble_downwards, 50);
You_hear("%s tumble downwards.", the(xname(obj)));
- else
+ } else {
pline("%s into %s pit.", Tobjnam(obj, "tumble"),
the_your[t->madeby_u]);
+ }
} else if (ship_object(obj, x, y, FALSE)) {
/* ship_object will print an appropriate "the item falls
* through the hole" message, so no need to do it here. */
pline("Static electricity surrounds the sink.");
break;
case RIN_CONFLICT:
+ Soundeffect(se_drain_noises, 50);
You_hear("loud noises coming from the drain.");
break;
case RIN_SUSTAIN_ABILITY: /* KMH */
break;
}
}
- if (ideed)
+ if (ideed) {
trycall(obj);
- else if (!nosink)
+ } else if (!nosink) {
+ Soundeffect(se_ring_in_drain, 50);
You_hear("the ring bouncing down the drainpipe.");
-
+ }
if (!rn2(20) && !nosink) {
pline_The("sink backs up, leaving %s.", doname(obj));
obj->in_use = FALSE;
#ifdef MICRO
display_nhwindow(WIN_MESSAGE, FALSE);
#endif
+ Soundeffect(se_groans_and_moans, 25);
You_hear("groans and moans everywhere.");
}
/* alarm stops working once Croesus has died */
if (new || !gm.mvitals[PM_CROESUS].died) {
You("have penetrated a high security area!");
+ Soundeffect(se_alarm, 100);
pline("An alarm sounds!");
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (DEADMONSTER(mtmp))
pline("%s claws itself out of the ground!",
canspotmon(mtmp) ? Amonnam(mtmp) : Something);
newsym(mtmp->mx, mtmp->my);
- } else if (mdistu(mtmp) < 5*5)
+ } else if (mdistu(mtmp) < 5*5) {
+ Soundeffect(se_scratching, 50);
You_hear("scratching noises.");
+ }
break;
}
/*FALLTHRU*/
* but it's always exactly 1 that breaks */
if (otmp->otyp == EGG && otmp->spe && otmp->corpsenm >= LOW_PM)
change_luck(-1);
+ if (otmp->otyp == EGG) {
+ Soundeffect(se_egg_cracking, 25);
+ } else {
+ Soundeffect(se_glass_shattering, 25);
+ }
You_hear("a muffled %s.", result);
if (costly) {
if (frominv && !otmp->unpaid)
if (gm.maploc->typ == SDOOR) {
if (!Levitation && rn2(30) < avrg_attrib) {
cvt_sdoor_to_door(gm.maploc); /* ->typ = DOOR */
+ Soundeffect(se_crash_door, 40);
pline("Crash! %s a secret door!",
/* don't "kick open" when it's locked
unless it also happens to be trapped */
}
if (gm.maploc->typ == SCORR) {
if (!Levitation && rn2(30) < avrg_attrib) {
+ Soundeffect(se_crash_door, 40);
pline("Crash! You kick open a secret passage!");
exercise(A_DEX, TRUE);
gm.maploc->typ = CORR;
gm.maploc->looted = 0; /* don't leave loose ends.. */
gm.maploc->typ = ROOM;
(void) mkgold((long) rnd(200), x, y);
+ Soundeffect(se_crash_throne_destroyed, 60);
if (Blind)
pline("CRASH! You destroy it.");
else {
return ECMD_TIME;
}
if (rn2(5)) {
+ Soundeffect(se_klunk_pipe, 60);
if (!Deaf)
pline("Klunk! The pipes vibrate noisily.");
else
return ECMD_TIME;
} else if (!(gm.maploc->looted & S_LPUDDING) && !rn2(3)
&& !(gm.mvitals[PM_BLACK_PUDDING].mvflags & G_GONE)) {
- if (Blind)
+ if (Blind) {
+ if (!Deaf)
+ Soundeffect(se_gushing_sound, 100);
You_hear("a gushing sound.");
- else
+ } else {
pline("A %s ooze gushes up from the drain!",
hcolor(NH_BLACK));
+ }
(void) makemon(&mons[PM_BLACK_PUDDING], x, y, MM_NOMSG);
exercise(A_DEX, TRUE);
newsym(x, y);
gm.maploc->doormask = D_NODOOR;
b_trapped("door", FOOT);
} else if (ACURR(A_STR) > 18 && !rn2(5) && !shopdoor) {
+ Soundeffect(se_kick_door_it_shatters, 50);
pline("As you kick the door, it shatters to pieces!");
exercise(A_STR, TRUE);
gm.maploc->doormask = D_NODOOR;
} else {
+ Soundeffect(se_kick_door_it_crashes_open, 50);
pline("As you kick the door, it crashes open!");
exercise(A_STR, TRUE);
gm.maploc->doormask = D_BROKEN;
change_luck((schar) -min(otmp->quan, 5L));
result = "splat";
}
+ if (otmp->otyp == EGG) {
+ Soundeffect(se_egg_splatting, 25);
+ } else {
+ Soundeffect(se_glass_crashing, 25);
+ }
You_hear("a muffled %s.", result);
obj_extract_self(otmp);
obfree(otmp, (struct obj *) 0);
/* Snow White; 'poisoned' applies to [a subset of] weapons,
not food, so we substitute cursed; fortunately our hero
won't have to wait for a prince to be rescued/revived */
- if (Race_if(PM_DWARF) && Hallucination)
+ if (Race_if(PM_DWARF) && Hallucination) {
verbalize("Heigh-ho, ho-hum, I think I'll skip work today.");
- else if (Deaf || !flags.acoustics)
+ } else if (Deaf || !flags.acoustics) {
You("fall asleep.");
- else
+ } else {
+ Soundeffect(se_sinister_laughter, 100);
You_hear("sinister laughter as you fall asleep...");
+ }
fall_asleep(-rn1(11, 20), TRUE);
}
break;
generic = TRUE;
}
if (!Deaf && olet != SCROLL_CLASS) {
+ Soundeffect(se_blast, 75);
You_hear("a blast.");
didmsg = TRUE;
}
while ((otmp = (individual_object ? obj : gl.level.objects[sx][sy])) != 0) {
if (otmp == uball || otmp == uchain) {
boolean waschain = (otmp == uchain);
+
+ Soundeffect(se_chain_shatters, 25);
pline_The("chain shatters!");
unpunish();
if (waschain)
&& (otmp->otyp == BOULDER || otmp->otyp == STATUE)
&& rn2(10)) {
if (otmp->otyp == BOULDER) {
- if (cansee(sx, sy))
+ if (cansee(sx, sy)) {
pline("%s apart.", Tobjnam(otmp, "break"));
- else
+ } else {
+ Soundeffect(se_stone_breaking, 100);
You_hear("stone breaking.");
+ }
fracture_rock(otmp);
place_object(otmp, sx, sy);
if ((otmp = sobj_at(BOULDER, sx, sy)) != 0) {
if ((trap = t_at(sx, sy)) && trap->ttyp == STATUE_TRAP)
deltrap(trap);
- if (cansee(sx, sy))
+ if (cansee(sx, sy)) {
pline("%s.", Tobjnam(otmp, "crumble"));
- else
+ } else {
+ Soundeffect(se_stone_crumbling, 100);
You_hear("stone crumbling.");
+ }
(void) break_statue(otmp);
place_object(otmp, sx, sy); /* put fragments on floor */
}
struct monst *mtmp;
if (!(gm.mvitals[PM_WATER_MOCCASIN].mvflags & G_GONE)) {
- if (!Blind)
+ if (!Blind) {
pline("An endless stream of %s pours forth!",
Hallucination ? makeplural(rndmonnam(NULL)) : "snakes");
- else
+ } else {
+ Soundeffect(se_snakes_hissing, 75);
You_hear("%s hissing!", something);
+ }
while (num-- > 0)
if ((mtmp = makemon(&mons[PM_WATER_MOCCASIN], u.ux, u.uy,
MM_NOMSG)) != 0
&& t_at(mtmp->mx, mtmp->my))
(void) mintrap(mtmp, NO_TRAP_FLAGS);
- } else
+ } else {
+ Soundeffect(se_furious_bubbling, 20);
pline_The("fountain bubbles furiously for a moment, then calms.");
+ }
}
/* Water demon */
} else if (t_at(mtmp->mx, mtmp->my))
(void) mintrap(mtmp, NO_TRAP_FLAGS);
}
- } else
+ } else {
+ Soundeffect(se_furious_bubbling, 20);
pline_The("fountain bubbles furiously for a moment, then calms.");
+ }
}
/* Water Nymph */
mtmp->msleeping = 0;
if (t_at(mtmp->mx, mtmp->my))
(void) mintrap(mtmp, NO_TRAP_FLAGS);
- } else if (!Blind)
+ } else if (!Blind) {
+ Soundeffect(se_bubble_rising, 50);
+ Soundeffect(se_loud_pop, 50);
pline("A large bubble rises to the surface and pops.");
- else
+ } else {
+ Soundeffect(se_loud_pop, 50);
You_hear("a loud pop.");
+ }
}
/* Gushing forth along LOS from (u.ux, u.uy) */
break;
/* more odd messages --JJB */
case 11:
+ Soundeffect(se_clanking_pipe, 50);
You_hear("clanking from the pipes...");
break;
case 12:
+ Soundeffect(se_sewer_song, 100);
You_hear("snatches of song from among the sewers...");
break;
case 13:
pline("There's %s on the other side.", a_monnam(mtmp));
deliver_part1 = TRUE;
} else {
+ Soundeffect(se_monster_behind_boulder, 50);
You_hear("a monster behind %s.", the(xname(otmp)));
if (!Deaf)
deliver_part1 = TRUE;
goto moverock_done;
case HOLE:
case TRAPDOOR:
+ Soundeffect(se_kerplunk_boulder_gone, 40);
if (Blind)
pline("Kerplunk! You no longer feel %s.",
the(xname(otmp)));
who);
}
} else {
+ Soundeffect(se_wailing_of_the_banshee, 75);
You_hear(u.uhp == 1 ? "the wailing of the Banshee..."
: "the howling of the CwnAnnwn...");
}
case WAN_LOCKING:
case SPE_WIZARD_LOCK:
if (!obj->olocked) { /* lock it; fix if broken */
+ Soundeffect(se_klunk, 50);
pline("Klunk!");
obj->olocked = 1;
obj->obroken = 0;
case WAN_OPENING:
case SPE_KNOCK:
if (obj->olocked) { /* unlock; couldn't be broken */
+ pline("Klick!");
pline("Klick!");
obj->olocked = 0;
res = 1;
boolean vis = cansee(x, y);
/* Can't have real locking in Rogue, so just hide doorway */
- if (vis)
+ if (vis) {
pline("%s springs up in the older, more primitive doorway.",
dustcloud);
- else
+ } else {
+ Soundeffect(se_swoosh, 25);
You_hear("a swoosh.");
+ }
if (obstructed(x, y, mysterywand)) {
if (vis)
pline_The("cloud %s.", quickly_dissipates);
/* for mtmp, mb_trapped() does is own wake_nearto() */
loudness = 40;
if (Verbose(1, doorlock1)) {
- if ((sawit || seeit) && !Unaware)
+ Soundeffect(se_kaboom_door_explodes, 75);
+ if ((sawit || seeit) && !Unaware) {
pline("KABOOM!! You see a door explode.");
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_explosion, 75);
You_hear("a %s explosion.",
(distu(x, y) > 7 * 7) ? "distant"
: "nearby");
+ }
}
}
break;
seeit = cansee(x, y);
newsym(x, y);
if (Verbose(1, doorlock2)) {
- if ((sawit || seeit) && !Unaware)
+ if ((sawit || seeit) && !Unaware) {
pline_The("door crashes open!");
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_crashing_sound, 100);
You_hear("a crashing sound.");
+ }
}
/* force vision recalc before printing more messages */
if (gv.vision_full_recalc)
nomul(0);
if (rn2(ml * 10) < (mtmp->mconf ? 100 : 20)) { /* fumbled attack */
+ Soundeffect(se_air_crackles, 60);
if (canseemon(mtmp) && !Deaf)
pline_The("air crackles around %s.", mon_nam(mtmp));
return MM_MISS;
case CLC_LIGHTNING: {
boolean reflects;
+ Soundeffect(se_bolt_of_lightning, 80);
pline("A bolt of lightning strikes down at you from above!");
reflects = ureflects("It bounces off your %s%s.", "");
if (reflects || Shock_resistance) {
/* unseen caster summoned seen critter(s) */
arg = (newseen == oldseen + 1) ? an(makesingular(what))
: whatbuf;
- if (!Deaf)
+ if (!Deaf) {
+ Soundeffect(se_someone_summoning, 100);
You_hear("someone summoning something, and %s %s.", arg,
vtense(arg, "appear"));
- else
+ } else {
pline("%s %s.", upstart(arg), vtense(arg, "appear"));
+ }
}
/* seen caster, possibly producing unseen--or just one--critters;
} else if (digests(mtmp->data)) {
pline("%s gulps some air!", Monnam(mtmp));
} else {
- if (youseeit)
+ if (youseeit) {
pline("%s lunges forward and recoils!", Monnam(mtmp));
- else
+ } else {
+ if (is_whirly(mtmp->data)) {
+ Soundeffect(se_rushing_wind_noise, 60);
+ }
You_hear("a %s nearby.",
is_whirly(mtmp->data) ? "rushing noise"
: "splat");
+ }
}
}
break;
const char *from_nowhere;
if (!Deaf) {
- pline("%s %s!", Something, makeplural(growl_sound(mtmp)));
+ pline("%s %s!", Something,
+ makeplural(growl_sound(mtmp)));
from_nowhere = "";
} else {
from_nowhere = " from nowhere";
inpack ? " inside your pack" : "");
}
} else {
+ Soundeffect(se_faint_sloshing, 25);
You_hear("a faint sloshing sound.");
}
}
if (Verbose(1, meatmetal3))
pline("%s eats %s!", Monnam(mtmp), otmpname);
} else {
- if (Verbose(1, meatmetal4))
+ if (Verbose(1, meatmetal4)) {
+ Soundeffect(se_crunching_sound, 50);
You_hear("a crunching sound.");
+ }
}
mtmp->meating = otmp->owt / 2 + 1;
/* Heal up to the object's weight in hp */
if (otmp->otyp == CORPSE)
mon_givit(mtmp, &mons[otmp->corpsenm]);
} else {
+ Soundeffect(se_slurping_sound, 30);
if (Verbose(2, meatobj2))
You_hear("a slurping sound.");
}
if (Verbose(2, meatcorpse1))
pline("%s eats %s!", Monnam(mtmp), otmpname);
} else {
+ Soundeffect(se_masticating_sound, 50);
if (Verbose(2, meatcorpse2))
You_hear("a masticating sound.");
}
} else if (mtmp->mtame) {
adjalign(-15); /* bad!! */
/* your god is mighty displeased... */
- if (!Hallucination)
+ if (!Hallucination) {
+ Soundeffect(se_distant_thunder, 40);
You_hear("the rumble of distant thunder...");
- else
+ } else {
+ Soundeffect(se_applause, 40);
You_hear("the studio audience applaud!");
+ }
if (!unique_corpstat(mdat)) {
boolean mname = has_mgivenname(mtmp);
buf, vtense(buf, "are"));
} else {
Strcpy(buf, (ct == 1) ? "a guard's" : "guards'");
+ Soundeffect(se_shrill_whistle, 100);
You_hear("the shrill sound of %s whistle%s.", buf, plur(ct));
}
}
nolimbs(mon->data) ? mbodypart(mon, HEAD)
: makeplural(mbodypart(mon, ARM)));
} else {
- if (canspotmon(mon))
+ if (canspotmon(mon)) {
pline("%s yells:", Amonnam(mon));
- else
+ } else {
+ Soundeffect(se_someone_yells, 75);
You_hear("someone yell:");
+ }
verbalize1(shout);
}
}
return MMOVE_DIED;
} else {
if (Verbose(2, m_move2)) {
- if (canseeit && canspotmon(mtmp))
+ if (canseeit && canspotmon(mtmp)) {
pline("%s unlocks and opens a door.",
Monnam(mtmp));
- else if (canseeit)
+ } else if (canseeit) {
You_see("a door unlock and open.");
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_door_unlock_and_open, 50);
You_hear("a door unlock and open.");
+ }
}
}
} else if (here->doormask == D_CLOSED && can_open) {
return MMOVE_DIED;
} else {
if (Verbose(2, m_move3)) {
- if (canseeit && canspotmon(mtmp))
+ if (canseeit && canspotmon(mtmp)) {
pline("%s opens a door.", Monnam(mtmp));
- else if (canseeit)
+ } else if (canseeit) {
You_see("a door open.");
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_door_open, 100);
You_hear("a door open.");
+ }
}
}
} else if (here->doormask & (D_LOCKED | D_CLOSED)) {
return MMOVE_DIED;
} else {
if (Verbose(2, m_move4)) {
- if (canseeit && canspotmon(mtmp))
+ if (canseeit && canspotmon(mtmp)) {
pline("%s smashes down a door.",
Monnam(mtmp));
- else if (canseeit)
+ } else if (canseeit) {
You_see("a door crash open.");
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_door_crash_open, 50);
You_hear("a door crash open.");
+ }
}
}
/* if it's a shop door, schedule repair */
if (ismimic)
seemimic(mtmp);
mtmp->msleeping = 0;
+ Soundeffect(se_splat_egg, 35);
if (vis) {
if (otmp->otyp == EGG) {
pline("Splat! %s is hit with %s egg!", Monnam(mtmp),
pline("A dry rattle comes from %s throat.",
s_suffix(mon_nam(mtmp)));
} else {
+ Soundeffect(se_dry_throat_rattle, 50);
You_hear("a dry rattle nearby.");
}
}
if (m_lined_up(mtarg, mtmp)) {
if (mtmp->mcan) {
if (!Deaf) {
- if (canseemon(mtmp))
+ if (canseemon(mtmp)) {
pline("%s coughs.", Monnam(mtmp));
- else
+ } else {
+ Soundeffect(se_cough, 100);
You_hear("a cough.");
+ }
}
return MM_MISS;
}
*objp = 0; /* object is now gone */
/* breakage makes its own noises */
if (obj_type == POT_ACID) {
- if (cansee(barsx, barsy) && !nodissolve)
+ if (cansee(barsx, barsy) && !nodissolve) {
pline_The("iron bars are dissolved!");
- else
+ } else {
+ Soundeffect(se_angry_snakes, 100);
You_hear(Hallucination ? "angry snakes!"
: "a hissing noise.");
+ }
if (!nodissolve)
dissolve_bars(barsx, barsy);
}
int range = couldsee(mon->mx, mon->my) /* 9 or 5 */
? (BOLT_LIM + 1) : (BOLT_LIM - 3);
+ Soundeffect(se_zap_then_explosion, 100);
You_hear("a zap and an explosion %s.",
(mdistu(mon) <= range * range)
? "nearby" : "in the distance");
int range = couldsee(mtmp->mx, mtmp->my) /* 9 or 5 */
? (BOLT_LIM + 1) : (BOLT_LIM - 3);
+ Soundeffect(se_zap, 100);
You_hear("a %s zap.", (mdistu(mtmp) <= range * range)
? "nearby" : "distant");
unknow_object(otmp); /* hero loses info when unseen obj is used */
int range = couldsee(mtmp->mx, mtmp->my) /* 9 or 5 */
? (BOLT_LIM + 1) : (BOLT_LIM - 3);
+ Soundeffect(se_horn_being_played, 50);
You_hear("a horn being played %s.",
(mdistu(mtmp) <= range * range)
? "nearby" : "in the distance");
otmp->dknown = 1;
pline("%s drinks %s!", Monnam(mtmp), singular(otmp, doname));
} else if (!Deaf) {
+ Soundeffect(se_mon_chugging_potion, 25);
You_hear("a chugging sound.");
}
}
impossible("No need for unicorn horn?");
return 2;
case MUSE_BUGLE:
- if (vismon)
+ if (vismon) {
pline("%s plays %s!", Monnam(mtmp), doname(otmp));
- else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_bugle_playing_reveille, 100);
You_hear("a bugle playing reveille!");
+ }
awaken_soldiers(mtmp);
return 2;
case MUSE_WAN_TELEPORTATION_SELF:
surface(mtmp->mx, mtmp->my));
pline("%s %s through...", Monnam(mtmp),
is_flyer(mtmp->data) ? "dives" : "falls");
- } else if (!Deaf)
+ } else if (!Deaf) {
+ Soundeffect(se_crash_through_floor, 100);
You_hear("%s crash through the %s.", something,
surface(mtmp->mx, mtmp->my));
+ }
/* we made sure that there is a level for mtmp to go to */
migrate_to_level(mtmp, ledger_no(&u.uz) + 1, MIGR_RANDOM,
(coord *) 0);
if (hits_you) {
if (Antimagic) {
shieldeff(u.ux, u.uy);
+ Soundeffect(se_boing, 40);
pline("Boing!");
} else if (rnd(20) < 10 + u.uac) {
pline_The("wand hits you!");
nomul(0);
} else if (resists_magm(mtmp)) {
shieldeff(mtmp->mx, mtmp->my);
+ Soundeffect(se_boing, 40);
pline("Boing!");
} else if (rnd(20) < 10 + find_mac(mtmp)) {
tmp = d(2, 12);
mtmp->mundetected = 0;
newsym(x, y);
if (ceiling_hider(mtmp->data)) {
- if (cansee(x, y))
+ if (cansee(x, y)) {
pline("%s is shaken loose from the ceiling!",
Amonnam(mtmp));
- else if (!is_flyer(mtmp->data))
+ } else if (!is_flyer(mtmp->data)) {
+ Soundeffect(se_thump, 50);
You_hear("a thump.");
+ }
}
}
if (M_AP_TYPE(mtmp) != M_AP_NOTHING
mtmp->mtrapped = 1;
if (!m_already_trapped) { /* suppress messages */
- if (cansee(x, y))
+ if (cansee(x, y)) {
pline("%s falls into a chasm!", Monnam(mtmp));
- else if (humanoid(mtmp->data))
+ } else if (humanoid(mtmp->data)) {
+ Soundeffect(se_scream, 50);
You_hear("a scream!");
+ }
}
/* Falling is okay for falling down
within a pit from jostling too */
}
}
if (tumblers) {
- if (gears)
+ if (gears) {
+ Soundeffect(se_tumbler_click, 50);
+ Soundeffect(se_gear_turn, 50);
You_hear("%d tumbler%s click and %d gear%s turn.",
tumblers, plur(tumblers), gears,
plur(gears));
- else
+ } else {
+ Soundeffect(se_tumbler_click, 50);
You_hear("%d tumbler%s click.", tumblers,
plur(tumblers));
+ }
} else if (gears) {
You_hear("%d gear%s turn.", gears, plur(gears));
/* could only get `gears == 5' by playing five
hit_saddle = TRUE;
distance = distu(tx, ty);
if (!cansee(tx, ty)) {
+ Soundeffect(se_potion_crash_and_break, 60);
pline("Crash!");
} else {
char *mnam = mon_nam(mon);
} else {
Strcpy(buf, mnam);
}
+ Soundeffect(se_potion_crash_and_break, 60);
pline_The("%s crashes on %s and breaks into shards.", botlnam,
buf);
}
u.uevent.uheard_tune++;
break;
} else if (u.uevent.uheard_tune < 2) {
+ Soundeffect(se_divine_music, 50);
You_hear("a divine music...");
pline("It sounds like: \"%s\".", gt.tune);
u.uevent.uheard_tune++;
offer_too_soon(altaralign);
return ECMD_TIME;
}
+ Soundeffect(se_thunderclap, 100);
You_hear("a nearby thunderclap.");
if (!otmp->known) {
You("realize you have made a %s.",
ct++; /* pets don't laugh at you */
}
}
- if (otyp == SCR_SCARE_MONSTER || !ct)
+ if (otyp == SCR_SCARE_MONSTER || !ct) {
+ if (confused || scursed)
+ Soundeffect(se_sad_wailing, 50);
+ else
+ Soundeffect(se_sad_wailing, 50);
You_hear("%s %s.", (confused || scursed) ? "sad wailing"
: "maniacal laughter",
!ct ? "in the distance" : "close by");
+ }
}
static void
if (!shkp)
return;
+ Soundeffect(se_alarm, 80);
if (!Deaf)
pline("An alarm sounds!");
pline_The("atmosphere at %s %s seems unwelcoming.",
s_suffix(shkname(shkp)), shtypes[rt - SHOPBASE].name);
} else if (eshkp->robbed) {
- if (!Deaf)
+ if (!Deaf) {
+ Soundeffect(se_mutter_imprecations, 50);
pline("%s mutters imprecations against shoplifters.",
Shknam(shkp));
- else
+ } else {
pline("%s is combing through %s inventory list.",
Shknam(shkp), noit_mhis(shkp));
+ }
} else {
if (!Deaf && !muteshk(shkp))
verbalize("%s, %s! Welcome%s to %s %s!", Hello(shkp), gp.plname,
shk_closeby = (mdistu(shkp) <= (BOLT_LIM / 2) * (BOLT_LIM / 2));
- if (canseemon(shkp))
+ if (canseemon(shkp)) {
pline("%s whispers %s.", Shknam(shkp),
shk_closeby ? "an incantation" : "something");
- else if (!Deaf && shk_closeby)
+ } else if (!Deaf && shk_closeby) {
+ Soundeffect(se_mutter_incantation, 100);
You_hear("someone muttering an incantation.");
+ }
(void) repair_damage(shkp, dam, FALSE);
if (MON_AT(x, y)) {
if (!animal) {
if (!Deaf && !muteshk(shkp)) {
+ Soundeffect(se_angry_voice, 75);
You_hear("an angry voice:");
verbalize("Out of my way, scum!");
}
};
int which = rn2(3) + (Hallucination ? 1 : 0);
- if (which != 2)
+ if (which != 2) {
+ if (which == 0) {
+ Soundeffect(se_courtly_conversation, 30);
+ } else if (which == 1) {
+ Soundeffect(se_sceptor_pounding, 100);
+ }
You_hear1(throne_msg[which]);
- else {
+ } else {
DISABLE_WARNING_FORMAT_NONLITERAL
pline(throne_msg[2], uhis());
RESTORE_WARNING_FORMAT_NONLITERAL
switch (rn2(2) + hallu) {
case 0:
+ Soundeffect(se_low_buzzing, 30);
You_hear("a low buzzing.");
break;
case 1:
+ Soundeffect(se_angry_drone, 100);
You_hear("an angry drone.");
break;
case 2:
+ Soundeffect(se_bees, 100);
You_hear("bees in your %sbonnet!",
uarmh ? "" : "(nonexistent) ");
break;
gold_in_vault = TRUE;
if (vault_occupied(u.urooms)
!= (ROOM_INDEX(sroom) + ROOMOFFSET)) {
- if (gold_in_vault)
+ if (gold_in_vault) {
You_hear(!hallu
? "someone counting gold coins."
: "the quarterback calling the play.");
- else
+ } else {
+ Soundeffect(se_someone_searching, 30);
You_hear("someone searching.");
+ }
break;
}
}
/*FALLTHRU*/
case 0:
+ Soundeffect(se_guards_footsteps, 30);
You_hear("the footsteps of a guard on patrol.");
break;
case 2:
if (!u.uhave.bell || !u.uhave.menorah) {
pline("A chill runs down your %s.", body_part(SPINE));
- if (!u.uhave.bell)
+ if (!u.uhave.bell) {
+ Soundeffect(se_faint_chime, 30);
You_hear("a faint chime...");
+ }
if (!u.uhave.menorah)
pline("Vlad's doppelganger is amused.");
return;
if (levl[u.ux][u.uy].typ == CLOUD) {
/* Inside a cloud during a thunder storm is deafening. */
/* Even if already deaf, we sense the thunder's vibrations. */
+ Soundeffect(se_kaboom_boom_boom, 80);
pline("Kaboom!!! Boom!! Boom!!");
incr_itimeout(&HDeaf, rn1(20, 30));
gc.context.botl = TRUE;
if (mtmp == &gy.youmonst) {
if (trap->once && trap->tseen && !rn2(15)) {
+ Soundeffect(se_loud_click, 100);
You_hear("a loud click!");
deltrap(trap);
newsym(u.ux, u.uy);
int oldumort = u.umortality;
if (trap->once && trap->tseen && !rn2(15)) {
+ Soundeffect(se_soft_click, 30);
You_hear("a soft click.");
deltrap(trap);
newsym(u.ux, u.uy);
struct trap *trap,
unsigned trflags)
{
+ enum sound_effect_entries tsnds[] = {
+ se_squeak_C, se_squeak_D_flat, se_squeak_D,
+ se_squeak_E_flat, se_squeak_E, se_squeak_F,
+ se_squeak_F_sharp, se_squeak_G, se_squeak_G_sharp,
+ se_squeak_A, se_squeak_B_flat, se_squeak_B,
+ };
boolean forcetrap = ((trflags & FORCETRAP) != 0
|| (trflags & FAILEDUNTRAP) != 0);
}
} else {
seetrap(trap);
+ if (trap->tnote >= 0 && trap->tnote < SIZE(tsnds)) {
+ Soundeffect(tsnds[trap->tnote], 50);
+ }
pline("A board beneath you %s%s%s.",
Deaf ? "vibrates" : "squeaks ",
Deaf ? "" : trapnote(trap, FALSE),
/* stepped on a squeaky board */
if (in_sight) {
if (!Deaf) {
+ if (trap->tnote >= 0 && trap->tnote < SIZE(tsnds)) {
+ Soundeffect(tsnds[trap->tnote], 50);
+ }
pline("A board beneath %s squeaks %s loudly.",
mon_nam(mtmp), trapnote(trap, FALSE));
seetrap(trap);
int range = couldsee(mtmp->mx, mtmp->my) /* 9 or 5 */
? (BOLT_LIM + 1) : (BOLT_LIM - 3);
+ if (trap->tnote >= 0 && trap->tnote < SIZE(tsnds)) {
+ Soundeffect(tsnds[trap->tnote],
+ ((mdistu(mtmp) <= range * range)
+ ? 40 : 20));
+ }
You_hear("%s squeak %s.", trapnote(trap, FALSE),
(mdistu(mtmp) <= range * range)
? "nearby" : "in the distance");
seetrap(trap);
} else {
if (mptr == &mons[PM_OWLBEAR]
- || mptr == &mons[PM_BUGBEAR])
+ || mptr == &mons[PM_BUGBEAR]) {
+ Soundeffect(se_roar, 100);
You_hear("the roaring of an angry bear!");
+ }
}
} else if (forcetrap) {
if (in_sight) {
case PM_OWLBEAR: /* Eric Backus */
case PM_BUGBEAR:
if (!in_sight) {
+ Soundeffect(se_roar, 60);
You_hear("the roaring of a confused bear!");
mtmp->mtrapped = 1;
break;
trap->madeby_u ? "the trigger of your mine" : "a trigger");
if (already_seen && rn2(3))
return Trap_Effect_Finished;
+ Soundeffect(se_kaablamm_of_mine, 80);
pline("KAABLAMM!!! %s %s%s off!",
forcebungle ? "Your inept attempt sets"
: "The air currents set",
if (cansee(x1, y1)) {
You_see("%s start to roll.", an(xname(singleobj)));
} else if (Hallucination) {
+ Soundeffect(se_someone_bowling, 60);
You_hear("someone bowling.");
} else {
+ Soundeffect(se_rumbling, 60);
You_hear("rumbling %s.", (distu(x1, y1) <= 4 * 4) ? "nearby"
: "in the distance");
}
-
}
style &= ~LAUNCH_UNSEEN;
goto roll;
|| IS_ROCK(levl[gb.bhitpos.x + dx][gb.bhitpos.y + dy].typ))
bmsg = " as one boulder hits another";
+ Soundeffect(se_loud_crash, 80);
You_hear("a loud crash%s!",
cansee(gb.bhitpos.x, gb.bhitpos.y) ? bmsg : "");
obj_extract_self(otmp2);
/* deafness effects */
if (!Deaf) {
+ Soundeffect(se_deafening_roar_atmospheric, 100);
You_hear("a deafening roar!");
incr_itimeout(&HDeaf, rn1(20, 30));
gc.context.botl = TRUE;
/* sometimes nothing happens */
break;
case 11: /* toggle intrinsic invisibility */
+ Soundeffect(se_low_hum, 100);
You_hear("a low hum.");
if (!Invis) {
if (!Blind)
int lvl = level_difficulty(),
dmg = rnd(5 + (lvl < 5 ? lvl : 2 + lvl / 2));
+ Soundeffect(se_kaboom, 80);
pline("KABOOM!! %s was booby-trapped!", The(item));
wake_nearby();
losehp(Maybe_Half_Phys(dmg), "explosion", KILLED_BY_AN);
return;
if (!magr->mcan && !rn2(10)) {
if (!Deaf) {
- if (Blind)
+ Soundeffect(se_laughter, 40);
+ if (Blind) {
You_hear("laughter.");
- else
+ } else {
pline("%s chuckles.", Monnam(magr));
+ }
}
if (u.umonnum == PM_CLAY_GOLEM) {
pline("Some writing vanishes from your head!");
You_hear("a cough from %s!", mon_nam(magr));
} else {
if (Hallucination && !Blind) {
+ Soundeffect(se_cockatrice_hiss, 50);
You_hear("hissing."); /* You_hear() deals with Deaf */
pline("%s appears to be blowing you a kiss...",
Monnam(magr));
howler = (char *) 0;
break;
}
- if (howler)
+ if (howler) {
+ Soundeffect(se_canine_howl, 50);
You_hear("a %s howling at the moon.", howler);
+ }
}
}
} else if (!rn2(30) || Protection_from_shape_changers) {
if (breakarm(mdat)) {
if ((otmp = which_armor(mon, W_ARM)) != 0) {
if ((Is_dragon_scales(otmp) && mdat == Dragon_scales_to_pm(otmp))
- || (Is_dragon_mail(otmp) && mdat == Dragon_mail_to_pm(otmp)))
+ || (Is_dragon_mail(otmp) && mdat == Dragon_mail_to_pm(otmp))) {
; /* no message here;
"the dragon merges with his scaly armor" is odd
and the monster's previous form is already gone */
- else if (vis)
- pline("%s breaks out of %s armor!", Monnam(mon), ppronoun);
- else
- You_hear("a cracking sound.");
+ } else {
+ Soundeffect(se_cracking_sound, 100);
+ if (vis)
+ pline("%s breaks out of %s armor!", Monnam(mon), ppronoun);
+ else
+ You_hear("a cracking sound.");
+ }
m_useup(mon, otmp);
}
if ((otmp = which_armor(mon, W_ARMC)) != 0
bypass_obj(otmp);
m_lose_armor(mon, otmp);
} else {
+ Soundeffect(se_ripping_sound, 100);
if (vis)
pline("%s %s tears apart!", s_suffix(Monnam(mon)),
cloak_simple_name(otmp));
boolean passes_thru_clothes = !(mdat->msize <= MZ_SMALL);
if ((otmp = which_armor(mon, W_ARM)) != 0) {
+ Soundeffect(se_thud, 50);
if (vis)
pline("%s armor falls around %s!", s_suffix(Monnam(mon)),
pronoun);
m_lose_armor(mon, otmp);
}
if ((otmp = which_armor(mon, W_ARMS)) != 0) {
+ Soundeffect(se_clank, 50);
if (vis)
pline("%s can no longer hold %s shield!", Monnam(mon),
ppronoun);
(the sound could be implicit) */
maybelearnit = cansee(obj->ox, obj->oy) || !Deaf;
if (obj->otyp == BOULDER) {
+ Soundeffect(se_crumbling_sound, 75);
if (cansee(obj->ox, obj->oy))
pline_The("boulder falls apart.");
else
if (IS_WATERWALL(lev->typ)) {
/* For now, don't let WATER freeze. */
+ Soundeffect(se_soft_crackling, 100);
if (see_it)
pline_The("%s freezes for a moment.", hliquid("water"));
else
lev->typ = lava ? ROOM : ICE;
}
bury_objs(x, y);
+ if (!lava)
+ Soundeffect(se_soft_crackling, 30);
if (see_it) {
if (lava)
Norep("The %s cools and solidifies.",
else
Norep("The %s freezes.", hliquid("water"));
newsym(x, y);
- } else if (!lava)
+ } else if (!lava) {
You_hear("a crackling sound.");
-
+ }
if (u_at(x, y)) {
if (u.uinwater) { /* not just `if (Underwater)' */
/* leave the no longer existent water */