summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 17:43:28 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 17:43:28 +0000
commit7859ec7d106b545be9ea1488408ef9a8b286dfa3 (patch)
treed19c50ab4276120994fb079fa18f408e1e00607f /crawl-ref
parent9343efdd70ffadb2c1eeeb40bec21cfc2e0f7448 (diff)
downloadcrawl-ref-7859ec7d106b545be9ea1488408ef9a8b286dfa3.tar.gz
crawl-ref-7859ec7d106b545be9ea1488408ef9a8b286dfa3.zip
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10720 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/externs.h1
-rw-r--r--crawl-ref/source/mgrow.cc5
-rw-r--r--crawl-ref/source/mon-util.cc8
3 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index b2738753b5..6c289d5727 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1366,6 +1366,7 @@ public:
void pandemon_init();
void uglything_init();
void uglything_mutate();
+ void uglything_upgrade();
void destroy_inventory();
void load_spells(mon_spellbook_type spellbook);
diff --git a/crawl-ref/source/mgrow.cc b/crawl-ref/source/mgrow.cc
index c707f49ad8..e2a2548c8a 100644
--- a/crawl-ref/source/mgrow.cc
+++ b/crawl-ref/source/mgrow.cc
@@ -143,10 +143,7 @@ void monsters::upgrade_type(monster_type after, bool adjust_hd,
// An ugly thing is the only ghost demon monster that can level up.
// If one has leveled up to a very ugly thing, upgrade it properly.
if (type == MONS_VERY_UGLY_THING)
- {
- ghost->ugly_thing_to_very_ugly_thing();
- uglything_init();
- }
+ uglything_upgrade();
}
bool monsters::level_up_change()
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 20c92c8fa7..e9c0348f4f 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -6352,11 +6352,16 @@ void monsters::uglything_init()
void monsters::uglything_mutate()
{
- simple_monster_message(this, " mutates!");
ghost->init_ugly_thing(type == MONS_VERY_UGLY_THING, true);
uglything_init();
}
+void monsters::uglything_upgrade()
+{
+ ghost->ugly_thing_to_very_ugly_thing();
+ uglything_init();
+}
+
bool monsters::check_set_valid_home(const coord_def &place,
coord_def &chosen,
int &nvalid) const
@@ -7950,6 +7955,7 @@ bool monsters::mutate()
// into a different (very) ugly thing.
if (type == MONS_UGLY_THING || type == MONS_VERY_UGLY_THING)
{
+ simple_monster_message(this, " mutates!");
uglything_mutate();
return (true);
}