summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills2.h
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2011-07-22 16:01:41 +0000
committerRaphael Langella <raphael.langella@gmail.com>2011-07-22 20:55:41 +0200
commit8c8ee438aedcbcbea89e4536890cd3b41fbd2238 (patch)
tree495c5102ea007aa5141961960aff9ba05144bed6 /crawl-ref/source/skills2.h
parent106bcb2be92df400d83c994ffc7ec9cd02021152 (diff)
downloadcrawl-ref-8c8ee438aedcbcbea89e4536890cd3b41fbd2238.tar.gz
crawl-ref-8c8ee438aedcbcbea89e4536890cd3b41fbd2238.zip
Allow choosing skills to train after using a card/potion of experience.
The skill menu is shown and the player can toggle skills and use focus. The level reached by each skill is showned. This is to prevent players from having to adjust skills before quaff iding or drawing from wonders in case of experience.
Diffstat (limited to 'crawl-ref/source/skills2.h')
-rw-r--r--crawl-ref/source/skills2.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/crawl-ref/source/skills2.h b/crawl-ref/source/skills2.h
index e6d67aa913..2b8f9c4db0 100644
--- a/crawl-ref/source/skills2.h
+++ b/crawl-ref/source/skills2.h
@@ -12,6 +12,26 @@ const int MAX_SKILL_ORDER = 100;
#include "enum.h"
#include "player.h"
+struct skill_state
+{
+ FixedVector<uint8_t, NUM_SKILLS> skills;
+ FixedVector<uint8_t, NUM_SKILLS> changed_skills;
+ FixedVector<char, NUM_SKILLS> train;
+ FixedVector<unsigned int, NUM_SKILLS> training;
+ FixedVector<unsigned int, NUM_SKILLS> skill_points;
+ FixedVector<unsigned int, NUM_SKILLS> ct_skill_points;
+ FixedVector<uint8_t, NUM_SKILLS> skill_order;
+ int skill_cost_level;
+ int total_skill_points;
+ bool auto_training;
+ int exp_available;
+ int manual_charges;
+
+ void save();
+ void restore_levels();
+ void restore_training();
+};
+
int get_skill_percentage(const skill_type x);
const char *skill_name(skill_type which_skill);
skill_type str_to_skill(const std::string &skill);
@@ -48,7 +68,7 @@ bool crosstrain_other(skill_type sk, bool show_zero);
bool is_antitrained(skill_type sk);
bool antitrain_other(skill_type sk, bool show_zero);
-void skill_menu(bool reskilling = false);
+void skill_menu(int flag = 0, int exp = 0);
bool is_invalid_skill(skill_type skill);
void dump_skills(std::string &text);
int skill_transfer_amount(skill_type sk);