diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-13 15:38:23 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-13 17:19:02 -0700 |
commit | d22ebac678fa1c1d0a60048a72ba445e3ed190d1 (patch) | |
tree | a63ccd59b4bb01408be9fc5843c20f2f878e2cd2 /crawl-ref/source/mon-gear.cc | |
parent | 5562ea36cc1ba917da155a9dd93e6bf71d022771 (diff) | |
download | crawl-ref-d22ebac678fa1c1d0a60048a72ba445e3ed190d1.tar.gz crawl-ref-d22ebac678fa1c1d0a60048a72ba445e3ed190d1.zip |
Separate 'permanent' and 'temporary' monster hit dice
As part of a wider scheme to make draining temporary.
Diffstat (limited to 'crawl-ref/source/mon-gear.cc')
-rw-r--r-- | crawl-ref/source/mon-gear.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index 2d0ad745e6..a487a0f9cb 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -146,8 +146,9 @@ static void _give_wand(monster* mon, int level) // Don't give top-tier wands before 5 HD, except to Ijyb and not in sprint. const bool no_high_tier = - (mon->hit_dice < 5 || mons_class_flag(mon->type, M_NO_HT_WAND)) - && (mon->type != MONS_IJYB || crawl_state.game_is_sprint()); + (mon->get_experience_level() < 5 + || mons_class_flag(mon->type, M_NO_HT_WAND)) + && (mon->type != MONS_IJYB || crawl_state.game_is_sprint()); while (1) { @@ -1519,7 +1520,7 @@ static void _give_weapon(monster* mon, int level, bool melee_only = false, if (!force_item && mons_is_unique(mon->type)) { - if (x_chance_in_y(10 + mon->hit_dice, 100)) + if (x_chance_in_y(10 + mon->get_experience_level(), 100)) level = MAKE_GOOD_ITEM; else if (level != MAKE_GOOD_ITEM) level += 5; @@ -2449,7 +2450,7 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs, bool merc) if (!force_item && mons_is_unique(mon->type) && level != MAKE_GOOD_ITEM) { - if (x_chance_in_y(9 + mon->hit_dice, 100)) + if (x_chance_in_y(9 + mon->get_experience_level(), 100)) level = MAKE_GOOD_ITEM; else level = level * 2 + 5; |