From 7859ec7d106b545be9ea1488408ef9a8b286dfa3 Mon Sep 17 00:00:00 2001 From: dolorous Date: Fri, 18 Sep 2009 17:43:28 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10720 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/externs.h | 1 + crawl-ref/source/mgrow.cc | 5 +---- crawl-ref/source/mon-util.cc | 8 +++++++- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'crawl-ref') 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); } -- cgit v1.2.3-54-g00ecf