summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-poly.cc
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-07-13 15:38:23 -0700
committerNicholas Feinberg <pleasingfung@gmail.com>2014-07-13 17:19:02 -0700
commitd22ebac678fa1c1d0a60048a72ba445e3ed190d1 (patch)
treea63ccd59b4bb01408be9fc5843c20f2f878e2cd2 /crawl-ref/source/mon-poly.cc
parent5562ea36cc1ba917da155a9dd93e6bf71d022771 (diff)
downloadcrawl-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-poly.cc')
-rw-r--r--crawl-ref/source/mon-poly.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-poly.cc b/crawl-ref/source/mon-poly.cc
index 6409519a71..5db33b41dd 100644
--- a/crawl-ref/source/mon-poly.cc
+++ b/crawl-ref/source/mon-poly.cc
@@ -450,7 +450,7 @@ bool monster_polymorph(monster* mons, monster_type targetc,
// for the monster class. By using the current hit dice
// the player gets the opportunity to use draining more
// effectively against shapeshifters. - bwr
- source_power = mons->hit_dice;
+ source_power = mons->get_hit_dice();
source_tier = mons_demon_tier(mons->type);
// There's not a single valid target on the '&' demon tier, so unless we
@@ -498,7 +498,7 @@ bool monster_polymorph(monster* mons, monster_type targetc,
for (int mc = 0; mc < NUM_MONSTERS; ++mc)
{
const monsterentry *me = get_monster_data((monster_type) mc);
- int delta = (int) me->hpdice[0] - mons->hit_dice;
+ int delta = (int) me->hpdice[0] - mons->get_hit_dice();
if (delta != 1)
continue;
if (!_valid_morph(mons, (monster_type) mc))
@@ -592,7 +592,7 @@ void slimify_monster(monster* mon, bool hostile)
{
monster_type target = MONS_JELLY;
- const int x = mon->hit_dice + (coinflip() ? 1 : -1) * random2(5);
+ const int x = mon->get_hit_dice() + (coinflip() ? 1 : -1) * random2(5);
if (x < 3)
target = MONS_OOZE;
@@ -695,7 +695,8 @@ void seen_monster(monster* mons)
&& !mons_class_flag(mons->type, M_NO_EXP_GAIN)
&& !crawl_state.game_is_arena())
{
- did_god_conduct(DID_SEE_MONSTER, mons->hit_dice, true, mons);
+ did_god_conduct(DID_SEE_MONSTER, mons->get_experience_level(),
+ true, mons);
}
mons->flags |= MF_TSO_SEEN;
}