diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-21 21:23:21 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-21 21:23:21 +0000 |
commit | 109b00ddba65e56db1a90a374115df69070bca71 (patch) | |
tree | 0d22819524e8d7a5179e7ee280a4b16b16d6ded2 /crawl-ref/source/libutil.h | |
parent | 101ce9277219b6925dc9e7c70692984c6544c5cd (diff) | |
download | crawl-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/libutil.h')
-rw-r--r-- | crawl-ref/source/libutil.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h index 6baf428aa0..4e5db549b3 100644 --- a/crawl-ref/source/libutil.h +++ b/crawl-ref/source/libutil.h @@ -100,7 +100,8 @@ std::string comma_separated_line(Z start, Z end, { if (i != start) { - if (i + 1 != end) + Z tmp = i; + if (++tmp != end) text += comma; else text += andc; |