From 2772e5117bba390bc735af3dd9e0853f93a8306d Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 6 Mar 2009 14:35:34 +0000 Subject: 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 --- crawl-ref/source/skills2.h | 60 ++++------------------------------------------ 1 file changed, 5 insertions(+), 55 deletions(-) (limited to 'crawl-ref/source/skills2.h') diff --git a/crawl-ref/source/skills2.h b/crawl-ref/source/skills2.h index 97ac2d92a1..93e3464ec7 100644 --- a/crawl-ref/source/skills2.h +++ b/crawl-ref/source/skills2.h @@ -10,80 +10,30 @@ #ifndef SKILLS2_H #define SKILLS2_H -#define MAX_SKILL_ORDER 100 +const int MAX_SKILL_ORDER = 100; #include "enum.h" -// last_updated 24may2000 {dlb} -/* *********************************************************************** - * called from: chardump - it_use3 - itemname - skills - * *********************************************************************** */ const char *skill_name(int which_skill); int str_to_skill(const std::string &skill); -// last_updated 24may2000 {dlb} -/* *********************************************************************** - * called from: describe - * *********************************************************************** */ std::string skill_title( unsigned char best_skill, unsigned char skill_lev, // these used for ghosts and hiscores: int species = -1, int str = -1, int dex = -1, int god = -1 ); -// last_updated Sept 20 -- bwr -/* *********************************************************************** - * called from: acr - chardump - player - skills - stuff - * *********************************************************************** */ -std::string player_title( void ); - +std::string player_title(); skill_type best_skill(int min_skill, int max_skill, int excl_skill = -1); +void init_skill_order(); -void init_skill_order( void ); - - -// last_updated 24may2000 {dlb} -/* *********************************************************************** - * called from: acr - it_use2 - item_use - newgame - ouch - player - skills - * *********************************************************************** */ -int calc_mp(bool real_mp = false); - +void calc_mp(); +void calc_hp(); -// last_updated 24may2000 {dlb} -/* *********************************************************************** - * called from: ability - acr - food - it_use2 - misc - mutation - - * newgame - ouch - player - skills - spells1 - transfor - * *********************************************************************** */ -int calc_hp(bool real_hp = false); - - -// last_updated 24may2000 {dlb} -/* *********************************************************************** - * called from: newgame - skills - skills2 - * *********************************************************************** */ int species_skills(int skill, species_type species); - - -// last_updated 24may2000 {dlb} -/* *********************************************************************** - * called from: newgame - skills - skills2 - * *********************************************************************** */ unsigned int skill_exp_needed(int lev); - - -// last_updated 24may2000 {dlb} -/* *********************************************************************** - * called from: acr - * *********************************************************************** */ void show_skills(); - - -// last_updated 14jan2001 {gdl} -/* *********************************************************************** - * called from: item_use - * *********************************************************************** */ void wield_warning(bool newWeapon = true); - bool is_invalid_skill(int skill); #endif -- cgit v1.2.3-54-g00ecf