From 2316c9fea080e7dacef5f03e56e1367a3b199acd Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 22 Nov 2006 09:51:44 +0000 Subject: [1600189] Mummy restoration doesn't use mp or turn when it does nothing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@456 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/abl-show.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/abl-show.cc') diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index c2fdb422a3..8202fa0e55 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -481,10 +481,24 @@ bool activate_ability(void) switch (abil.ability) { case ABIL_MUMMY_RESTORATION: + { mpr( "You infuse your body with magical energy." ); - restore_stat( STAT_ALL, false ); + bool did_restore = restore_stat( STAT_ALL, false ); + + const int oldhpmax = you.hp_max; unrot_hp( 100 ); + if (you.hp_max > oldhpmax) + did_restore = true; + + // If nothing happened, don't take one max MP, don't use a turn. + if (!did_restore) + { + canned_msg(MSG_NOTHING_HAPPENS); + return (false); + } + break; + } case ABIL_DELAYED_FIREBALL: // Note: power level of ball calculated at release -- bwr -- cgit v1.2.3-54-g00ecf