summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.h
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-06 14:35:34 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-06 14:35:34 +0000
commit2772e5117bba390bc735af3dd9e0853f93a8306d (patch)
tree042d40988bfd467f0aa8b730c48ba7c1c5215dc0 /crawl-ref/source/player.h
parent3d14b002a1cf073450422eead92a4da28a53358f (diff)
downloadcrawl-ref-2772e5117bba390bc735af3dd9e0853f93a8306d.tar.gz
crawl-ref-2772e5117bba390bc735af3dd9e0853f93a8306d.zip
Fix permanent-MP abilities being usable when only temporary MP (e.g.
from a ring of magical power) is available. [2664906] This does not apply to HP costs because there's no way to abuse that. In theory it might still be possible to get negative real MP with the high/low magic mutations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9347 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.h')
-rw-r--r--crawl-ref/source/player.h51
1 files changed, 5 insertions, 46 deletions
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index bdc557bc09..bc214b322a 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -348,45 +348,18 @@ bool player_wearing_slot( int eq );
bool you_tran_can_wear(const item_def &item);
bool you_tran_can_wear( int eq, bool check_mutation = false );
-/* ***********************************************************************
- * called from: ability - effects - fight - it_use3 - ouch - spell -
- * spells - spells2 - spells3 - spells4
- * *********************************************************************** */
-void dec_hp(int hp_loss, bool fatal, const char *aux = NULL);
-
-
-/* ***********************************************************************
- * called from: ability - it_use3 - spell - spells3
- * *********************************************************************** */
-bool enough_hp (int minimum, bool suppress_msg);
-
+bool enough_hp(int minimum, bool suppress_msg);
+bool enough_mp(int minimum, bool suppress_msg, bool include_items = true);
-/* ***********************************************************************
- * called from: ability - it_use3
- * *********************************************************************** */
-bool enough_mp (int minimum, bool suppress_msg);
-
-
-/* ***********************************************************************
- * called from: ability - fight - it_use3 - monstuff - ouch - spell
- * *********************************************************************** */
+void dec_hp(int hp_loss, bool fatal, const char *aux = NULL);
void dec_mp(int mp_loss);
-
-/* ***********************************************************************
- * called from: ability - acr - fight - it_use2 - it_use3 - spells3
- * *********************************************************************** */
void inc_mp(int mp_gain, bool max_too);
-
-
-/* ***********************************************************************
- * called from: acr - fight - food - spells1 - spells2
- * *********************************************************************** */
void inc_hp(int hp_gain, bool max_too);
void rot_hp( int hp_loss );
void unrot_hp( int hp_recovered );
-int player_rotted( void );
+int player_rotted();
void rot_mp( int mp_loss );
void inc_max_hp( int hp_gain );
@@ -395,28 +368,14 @@ void dec_max_hp( int hp_loss );
void inc_max_mp( int mp_gain );
void dec_max_mp( int mp_loss );
-/* ***********************************************************************
- * called from: acr - misc - religion - skills2 - spells1 - transfor
- * *********************************************************************** */
void deflate_hp(int new_level, bool floor);
-
-
-/* ***********************************************************************
- * called from: acr - it_use2 - newgame - ouch - religion - spell - spells1
- * *********************************************************************** */
void set_hp(int new_amount, bool max_too);
int get_real_hp(bool trans, bool rotted = false);
+int get_real_mp(bool include_items);
-/* ***********************************************************************
- * called from: it_use3 - newgame
- * *********************************************************************** */
void set_mp(int new_amount, bool max_too);
-// last updated 19apr2001 {gdl}
-/* ***********************************************************************
- * called from:
- * *********************************************************************** */
void contaminate_player(int change, bool controlled = false,
bool status_only = false);