From ebce0ae5a24d6af41ebb888c50cb14b770d22f89 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Wed, 4 Nov 2009 17:29:34 -0800 Subject: Sound overhaul: sound where spell hits Directed spells now do noise where they hit a monster/player, rather than where they're cast (enchantment spells have 0 noise when they hit); casting these spells generates a noise of loudness 1 where the spell caster is. The noise level is hard-coded in beam.cc's zap_data array (and setup by zapping()), and is constant regardless of the amount of damage done or the beam's power. Beam-ish spells generates a seperate sound event for each target hit. Spells which miss generate no noise. --- crawl-ref/source/beam.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crawl-ref/source/beam.h') diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h index 8b976c3492..ccb4d0fb10 100644 --- a/crawl-ref/source/beam.h +++ b/crawl-ref/source/beam.h @@ -88,6 +88,9 @@ struct bolt // something. If not set, will use // "engulfs" if an explosion or cloud // and "hits" otherwise. + int loudness; // Noise level on hitting or exploding. + std::string noise_msg; // Message to give player if the hit + // or explosion isn't in view. bool is_beam; // beam? (can hit multiple targets?) bool is_explosion; bool is_big_cloud; // expands into big_cloud at endpoint @@ -117,6 +120,7 @@ struct bolt bool obvious_effect; // did an 'obvious' effect happen? bool seen; // Has player seen the beam? + bool heard; // Has the player heard the beam? std::vector path_taken; // Path beam took. -- cgit v1.2.3-54-g00ecf