From 668448092029d63176dc0b56ee47ebbef1355736 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 26 Feb 2009 18:12:30 +0000 Subject: Properly differentiate between blasts and bursts of hellfire in the beam name, to avoid getting "killed with a hellfire" death messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9232 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 8964d0c3a1..999d0b58b3 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3901,7 +3901,7 @@ void bolt::affect_player() if (affects_items) { // Simple cases for scroll burns. - if (flavour == BEAM_LAVA || name == "hellfire") + if (flavour == BEAM_LAVA || name.find("hellfire") != std::string::npos) expose_player_to_element(BEAM_LAVA, burn_power); // More complex (geez..) @@ -4978,7 +4978,7 @@ int bolt::range_used_on_hit(const actor* victim) const else if (is_enchantment()) used = (flavour == BEAM_DIGGING ? 0 : BEAM_STOP); // Hellfire stops for nobody! - else if (name == "hellfire") + else if (name.find("hellfire") != std::string::npos) used = 0; // Generic explosion. else if (is_explosion || is_big_cloud) @@ -5038,7 +5038,7 @@ void bolt::refine_for_explosion() type = dchar_glyph(DCHAR_FIRED_BURST); } - if (name == "hellfire") + if (name.find("hellfire") != std::string::npos) { seeMsg = "The hellfire explodes!"; hearMsg = "You hear a strangely unpleasant explosion."; -- cgit v1.2.3-54-g00ecf