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/enum.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/enum.h')
-rw-r--r-- | crawl-ref/source/enum.h | 76 |
1 files changed, 19 insertions, 57 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index d85a07b8ef..38c65184d6 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1174,64 +1174,25 @@ enum enchant_type { ENCH_NONE = 0, // 0 ENCH_SLOW, - ENCH_HASTE, // 2 - ENCH_FEAR = 4, // 4 - ENCH_CONFUSION, // 5 - ENCH_INVIS, - ENCH_YOUR_POISON_I, - ENCH_YOUR_POISON_II, - ENCH_YOUR_POISON_III, - ENCH_YOUR_POISON_IV, // 10 - ENCH_BERSERK_I, - ENCH_BERSERK_II, - ENCH_BERSERK_III, - ENCH_BERSERK_IV, - ENCH_YOUR_ROT_I, // 15 //jmf: rotting effect for monsters - ENCH_YOUR_ROT_II, - ENCH_YOUR_ROT_III, - ENCH_YOUR_ROT_IV, - ENCH_SUMMON = 19, // 19 - ENCH_ABJ_I, // 20 - ENCH_ABJ_II, - ENCH_ABJ_III, - ENCH_ABJ_IV, - ENCH_ABJ_V, - ENCH_ABJ_VI, // 25 - ENCH_BACKLIGHT_I, //jmf: backlight for Corona spell - ENCH_BACKLIGHT_II, - ENCH_BACKLIGHT_III, - ENCH_BACKLIGHT_IV, - ENCH_CHARM = 30, // 30 - ENCH_YOUR_STICKY_FLAME_I, - ENCH_YOUR_STICKY_FLAME_II, - ENCH_YOUR_STICKY_FLAME_III, - ENCH_YOUR_STICKY_FLAME_IV, // 34 - ENCH_GLOWING_SHAPESHIFTER = 38, // 38 - ENCH_SHAPESHIFTER, - ENCH_TP_I, // 40 - ENCH_TP_II, - ENCH_TP_III, - ENCH_TP_IV, // 43 - ENCH_POISON_I = 57, // 57 - ENCH_POISON_II, - ENCH_POISON_III, - ENCH_POISON_IV, // 60 - ENCH_STICKY_FLAME_I, - ENCH_STICKY_FLAME_II, - ENCH_STICKY_FLAME_III, - ENCH_STICKY_FLAME_IV, - ENCH_FRIEND_ABJ_I, // no longer used - ENCH_FRIEND_ABJ_II, // no longer used - ENCH_FRIEND_ABJ_III, // no longer used - ENCH_FRIEND_ABJ_IV, // no longer used - ENCH_FRIEND_ABJ_V, // no longer used - ENCH_FRIEND_ABJ_VI, // no longer used - ENCH_CREATED_FRIENDLY, // no longer used + ENCH_HASTE, + ENCH_FEAR, + ENCH_CONFUSION, + ENCH_INVIS, // 5 + ENCH_POISON, + ENCH_BERSERK, + ENCH_ROT, + ENCH_SUMMON, + ENCH_ABJ, // 10 + ENCH_BACKLIGHT, + ENCH_CHARM, + ENCH_STICKY_FLAME, + ENCH_GLOWING_SHAPESHIFTER, + ENCH_SHAPESHIFTER, // 15 + ENCH_TP, ENCH_SLEEP_WARY, - ENCH_SUBMERGED, // 73 (includes air elementals in air) - ENCH_SHORT_LIVED, // 74 for ball lightning - - ENCH_PARALYSIS, + ENCH_SUBMERGED, + ENCH_SHORT_LIVED, + ENCH_PARALYSIS, // 20 NUM_ENCHANTMENTS }; @@ -1652,6 +1613,7 @@ enum kill_method_type NUM_KILLBY }; +// This order is *critical*. Don't mess with it (see mon_enchant) enum kill_category { KC_YOU, |