summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 01:04:43 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 01:04:43 +0000
commitc9280b209b895d9ce902114acd2ba527b002049c (patch)
treec1f3313afb08df45f86551df9c9009c19a530cd6 /crawl-ref/source/beam.cc
parent6130fccaade80830ca14374b7803a5aa0ef6dfe5 (diff)
downloadcrawl-ref-c9280b209b895d9ce902114acd2ba527b002049c.tar.gz
crawl-ref-c9280b209b895d9ce902114acd2ba527b002049c.zip
Add the flaming corpse monster, as specified in FR [1746720], with
several tweaks: its resistances are the inverse of the freezing wraith's, but with sticky flame resistance added, and its console character is a lightred 'z'. As specified, it uses a sticky flame melee attack: AF_NAPALM. Note that it needs a tile. Also, expand the list of servants that Yredelemnul can send, as specified by Lemuel awhile ago (including the flaming corpse). This expansion allows the sending of more than one creature per instance, currently only used for Yred's flying skulls. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6873 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r--crawl-ref/source/beam.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 88ce887423..15cc03ae90 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -80,7 +80,6 @@
static FixedArray < bool, 19, 19 > explode_map;
// Helper functions (some of these should probably be public).
-static void _sticky_flame_monster(int mn, kill_category who, int hurt_final);
static bool _affects_wall(const bolt &beam, int wall_feature);
static bool _isBouncy(bolt &beam, unsigned char gridtype);
static int _beam_source(const bolt &beam);
@@ -2774,8 +2773,14 @@ bool poison_monster( monsters *monster,
return (new_pois.degree > old_pois.degree);
}
-// Actually napalms a monster (w/ message).
-void _sticky_flame_monster(int mn, kill_category who, int levels)
+// Actually napalms the player.
+void sticky_flame_player()
+{
+ you.duration[DUR_LIQUID_FLAMES] += random2avg(7, 3) + 1;
+}
+
+// Actually napalms a monster (with message).
+void sticky_flame_monster(int mn, kill_category who, int levels)
{
monsters *monster = &menv[mn];
@@ -4237,13 +4242,11 @@ static int _affect_player( bolt &beam, item_def *item )
}
// Sticky flame.
- if (beam.name == "sticky flame"
- && (you.species != SP_MOTTLED_DRACONIAN
- || you.experience_level < 6))
+ if (beam.name == "sticky flame")
{
- if (!player_equip(EQ_BODY_ARMOUR, ARM_MOTTLED_DRAGON_ARMOUR))
+ if (!player_res_sticky_flame())
{
- you.duration[DUR_LIQUID_FLAMES] += random2avg(7, 3) + 1;
+ sticky_flame_player();
was_affected = true;
}
}
@@ -4790,7 +4793,7 @@ static int _affect_monster(bolt &beam, monsters *mon, item_def *item)
{
int levels = std::min(4, 1 + random2(hurt_final) / 2);
- _sticky_flame_monster(tid, _whose_kill(beam), levels);
+ sticky_flame_monster(tid, _whose_kill(beam), levels);
}
// Handle missile effects.