From 123b89f4285862a89c54d944b08c4ae43433000e Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 16 May 2009 05:20:47 +0000 Subject: Make Elyvilon's Divine Vigour temporarily increase MP as well as HP. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9780 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 2aac34031c..85cafca2e2 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4771,8 +4771,7 @@ void dec_mp(int mp_loss) you.magic_points -= mp_loss; - if (you.magic_points < 0) - you.magic_points = 0; + you.magic_points = std::max(0, you.magic_points); if (Options.magic_point_warning && you.magic_points < (you.max_magic_points @@ -4845,7 +4844,7 @@ void inc_mp(int mp_gain, bool max_too) you.magic_points += mp_gain; if (max_too) - inc_max_mp( mp_gain ); + inc_max_mp(mp_gain); if (you.magic_points > you.max_magic_points) you.magic_points = you.max_magic_points; @@ -5091,8 +5090,9 @@ int get_real_mp(bool include_items) enp += player_magical_power(); // Analogous to ROBUST/FRAIL - enp *= (10 + player_mutation_level(MUT_HIGH_MAGIC) - - player_mutation_level(MUT_LOW_MAGIC)); + enp *= 10 + player_mutation_level(MUT_HIGH_MAGIC) + + you.attribute[ATTR_DIVINE_VIGOUR] + - player_mutation_level(MUT_LOW_MAGIC); enp /= 10; if (enp > 50) -- cgit v1.2.3-54-g00ecf