diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-29 12:22:09 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-29 12:22:09 +0000 |
commit | e5713cc0c97db9275c105a0a5a9e76c738fd0d25 (patch) | |
tree | 26dab312f32d76708d1f0c5a32ce23ea75bd6b0c /crawl-ref/source/it_use2.cc | |
parent | 04b6d88224536e1b577c7baf29e6c8e70cf19cac (diff) | |
download | crawl-ref-e5713cc0c97db9275c105a0a5a9e76c738fd0d25.tar.gz crawl-ref-e5713cc0c97db9275c105a0a5a9e76c738fd0d25.zip |
Potion of magic changed to restore all MP and rarely boost maximum MP.
Fixes [2544129].
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8845 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/it_use2.cc')
-rw-r--r-- | crawl-ref/source/it_use2.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index 2f61b26f41..3be9292bcb 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -302,20 +302,21 @@ bool potion_effect( potion_type pot_eff, int pow, bool was_known ) break; // I'll let this slip past robe of archmagi case POT_MAGIC: - { - mpr( "You feel magical!" ); - int new_value = 5 + random2avg(19, 2); + // Restore all MP + you.magic_points = you.max_magic_points; - // increase intrinsic MP points - if (you.magic_points + new_value > you.max_magic_points) + // Sometimes boost max + if (one_chance_in(3)) { - new_value = (you.max_magic_points - you.magic_points) - + (you.magic_points + new_value - you.max_magic_points)/4 + 1; + mpr("You feel extremely magical!"); + inc_mp(1, true); + } + else + { + mpr("You feel magical!"); } - - inc_mp( new_value, true ); break; - } + case POT_RESTORE_ABILITIES: { bool nothing_happens = true; |