diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 09:51:44 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 09:51:44 +0000 |
commit | 2316c9fea080e7dacef5f03e56e1367a3b199acd (patch) | |
tree | 99a49a72181b35043c7ba4c3e4660b37b83624c0 | |
parent | a640078f8a44d88f47559c3cf4cc883b11d4d70c (diff) | |
download | crawl-ref-2316c9fea080e7dacef5f03e56e1367a3b199acd.tar.gz crawl-ref-2316c9fea080e7dacef5f03e56e1367a3b199acd.zip |
[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
-rw-r--r-- | crawl-ref/source/abl-show.cc | 16 |
1 files changed, 15 insertions, 1 deletions
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 |