summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/delay.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-27 01:35:41 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-10-27 02:32:06 +0100
commit928479a2ce6674d27d6ef03d7a06f81803ccdfae (patch)
treef9c1a9ddd869efe1e725e870519cfc83b0259f75 /crawl-ref/source/delay.cc
parent2c33ddb4c83370db12567cdddaa7f4fe696481c9 (diff)
downloadcrawl-ref-928479a2ce6674d27d6ef03d7a06f81803ccdfae.tar.gz
crawl-ref-928479a2ce6674d27d6ef03d7a06f81803ccdfae.zip
Convert some ints to monster_type.
There's a whole lot of places that pass monster_type as int, often with varying meanings for the value -1. This moves some of these to monster_type, introducing MONS_NO_MONSTER and MONS_PLAYER as new invalid special values. Also improve on the autoexclude descriptions.
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r--crawl-ref/source/delay.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 2fe59e8f2c..8e19ddbeb5 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -468,12 +468,12 @@ void stop_delay( bool stop_stair_travel )
item_def &item = (delay.parm1 ? you.inv[delay.parm2]
: mitm[delay.parm2]);
-
- const bool was_orc = (mons_species(item.plus) == MONS_ORC);
+ monster_type montype = static_cast<monster_type>(item.plus);
+ const bool was_orc = (mons_species(montype) == MONS_ORC);
mpr("All blood oozes out of the corpse!");
- bleed_onto_floor(you.pos(), item.plus, delay.duration, false);
+ bleed_onto_floor(you.pos(), montype, delay.duration, false);
if (mons_skeleton(item.plus) && one_chance_in(3))
turn_corpse_into_skeleton(item);