summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 03:16:00 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 03:16:00 +0000
commit7923d4e2c0ed63fbb6f60040682411a0dc104fc4 (patch)
treef329a323f86601874c525944d7b535f5061cfad8 /crawl-ref/source/beam.cc
parent50e0fa5f27ed86ac2ce0b2dc3afcb656baef4d5a (diff)
downloadcrawl-ref-7923d4e2c0ed63fbb6f60040682411a0dc104fc4.tar.gz
crawl-ref-7923d4e2c0ed63fbb6f60040682411a0dc104fc4.zip
In mons_adjust_flavoured(), check for hellfire with BEAM_HELLFIRE, not
the string "hellfire", and add a similar flavour adjustment for BEAM_HELLFROST. If the player uses BEAM_HELLFIRE or BEAM_HELLFROST it's considered an unholy act. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7702 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc53
1 files changed, 48 insertions, 5 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 9ef30e22da..b6195fb054 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -1707,6 +1707,23 @@ void fire_beam(bolt &pbolt, item_def *item, bool drop_item)
if (!pbolt.is_tracer)
set_buffering(oldValue);
#endif
+
+ if (!pbolt.is_tracer)
+ {
+ switch(pbolt.flavour)
+ {
+ case BEAM_HELLFIRE:
+ case BEAM_HELLFROST:
+ if (YOU_KILL(pbolt.thrower))
+ {
+ did_god_conduct(DID_UNHOLY, 2 + random2(3),
+ pbolt.effect_known);
+ }
+ break;
+ default:
+ break;
+ }
+ }
}
@@ -1976,12 +1993,8 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted,
}
}
break;
- default:
- break;
- }
- if (pbolt.name == "hellfire")
- {
+ case BEAM_HELLFIRE:
resist = mons_res_fire(monster);
if (resist > 2)
{
@@ -2013,6 +2026,36 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted,
hurted *= 12; // hellfire
hurted /= 10;
}
+ break;
+
+ case BEAM_HELLFROST:
+ resist = mons_res_cold(monster);
+ if (resist > 2)
+ {
+ if (doFlavouredEffects)
+ simple_monster_message(monster, " appears unharmed.");
+
+ hurted = 0;
+ }
+ else if (resist > 0)
+ {
+ if (doFlavouredEffects)
+ simple_monster_message(monster, " partially resists.");
+
+ hurted /= 2;
+ }
+ else if (resist < 0)
+ {
+ if (doFlavouredEffects)
+ simple_monster_message(monster, " is frozen!");
+
+ hurted *= 12; // hellfrost
+ hurted /= 10;
+ }
+ break;
+
+ default:
+ break;
}
return (hurted);