diff options
author | Neil Moore <neil@s-z.org> | 2014-03-05 22:10:34 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-03-05 22:21:28 -0500 |
commit | 1142d7902410e40d25851fc0494ead18427c7374 (patch) | |
tree | 73a25a833c451dae2aed0e178a85025ef17843d0 /crawl-ref/source/skills2.h | |
parent | e6c7711a3a7595050e1ed2b14c1c5440ca674e44 (diff) | |
download | crawl-ref-1142d7902410e40d25851fc0494ead18427c7374.tar.gz crawl-ref-1142d7902410e40d25851fc0494ead18427c7374.zip |
Show * crosstrain marker more often (floatingatoll, #8235)
If the crosstraining-enhanced skill was displayed in the menu for being
trainable, but had less than 1.0 skill levels, the crosstrain-granting
skill would not get the '*' marker (unless the menu was set to show
all). Now show the marker whenever the menu shows the enhanced skill.
Doing that without duplicating the menu logic from _show_skill in
crosstrain_other required moving crosstrain_other into skill_menu.cc
(which was the only thing that called it). It could be made static
then, but several utility functions (and a constant) in skills2.cc had
to be made non-static, so perhaps it's a wash.
Also make the same adjustment to antitrain_other, even though currently
that is irrelevant: you must have at least 1.0 skill for antitraining to
have an effect.
Diffstat (limited to 'crawl-ref/source/skills2.h')
-rw-r--r-- | crawl-ref/source/skills2.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/skills2.h b/crawl-ref/source/skills2.h index 5b31ecd016..9982b0920a 100644 --- a/crawl-ref/source/skills2.h +++ b/crawl-ref/source/skills2.h @@ -11,6 +11,9 @@ const int MAX_SKILL_ORDER = 100; #include "enum.h" #include "player.h" +// This threshold is in tenths of a skill point. +const int CROSSTRAIN_THRESHOLD = 1; + struct skill_state { FixedBitVector<NUM_SKILLS> can_train; @@ -68,10 +71,12 @@ float species_apt_factor(skill_type sk, species_type sp = you.species); unsigned int skill_exp_needed(int lev, skill_type sk, species_type sp = you.species); +skill_type opposite_skill(skill_type sk); +bool compare_skills(skill_type sk1, skill_type sk2); +vector<skill_type> get_crosstrain_skills(skill_type sk); + float crosstrain_bonus(skill_type sk); -bool crosstrain_other(skill_type sk, bool show_zero); bool is_antitrained(skill_type sk); -bool antitrain_other(skill_type sk, bool show_zero); int elemental_preference(spell_type spell, int scale = 1); |