summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-16 05:20:47 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-16 05:20:47 +0000
commit123b89f4285862a89c54d944b08c4ae43433000e (patch)
treed693eb6af0bbebd5cd03d527e6c80fad2a931afa /crawl-ref/source/player.cc
parent0d4f396c1c1b9a3aacbd5f2bb80c0ec00146e8c1 (diff)
downloadcrawl-ref-123b89f4285862a89c54d944b08c4ae43433000e.tar.gz
crawl-ref-123b89f4285862a89c54d944b08c4ae43433000e.zip
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
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc10
1 files changed, 5 insertions, 5 deletions
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)