summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/defines.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-21 21:23:21 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-21 21:23:21 +0000
commit109b00ddba65e56db1a90a374115df69070bca71 (patch)
tree0d22819524e8d7a5179e7ee280a4b16b16d6ded2 /crawl-ref/source/defines.h
parent101ce9277219b6925dc9e7c70692984c6544c5cd (diff)
downloadcrawl-ref-109b00ddba65e56db1a90a374115df69070bca71.tar.gz
crawl-ref-109b00ddba65e56db1a90a374115df69070bca71.zip
Cleaned up monster enchantments. Instead of the old enum abuse (ENCH_ABJ_I, II,
etc.), enchantment is stored as a struct (ENCH_which, degree, whose_enchantment). This allows us to do such things as award experience for monsters poisoned by friends, or confused monsters bashing themselves or falling into lava (not implemented, but could be :-)). Doing monster_die() correctly is a little tricky for friendly-enchantment-deaths because the original monster may not be around to answer questions, so we fake the killer's stats for indirect friendly kills (which means that some gods may not award piety for minion-cast enchantments, f'r'instance). I think we can live with that for now. Breaks save file compatibility as usual. Clouds could also use similar treatment - poison clouds created by a friendly are not correctly tracked yet. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1075 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/defines.h')
-rw-r--r--crawl-ref/source/defines.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h
index 9f1a642503..2a9c8d5aca 100644
--- a/crawl-ref/source/defines.h
+++ b/crawl-ref/source/defines.h
@@ -140,6 +140,9 @@
// lowest grid value which can be seen through
#define MINSEE 11
+// Can be passed to monster_die to indicate that a friendly did the killing.
+#define ANON_FRIENDLY_MONSTER -1
+
// This value is used to make test_hit checks always succeed
#define AUTOMATIC_HIT 1500