summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/zotdef.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-05-01 11:11:01 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-05-09 05:30:28 +0100
commit618655495125eecf034a657fa79057517dc326ce (patch)
tree39a77f690c54ed07580b347e6ae5904bcb49fd4e /crawl-ref/source/zotdef.cc
parentc4feebf056305ad7265cc2f27934d6e002759622 (diff)
downloadcrawl-ref-618655495125eecf034a657fa79057517dc326ce.tar.gz
crawl-ref-618655495125eecf034a657fa79057517dc326ce.zip
Remove the Sage effect
Since the card was removed and it only remained as a Zotdef effect.
Diffstat (limited to 'crawl-ref/source/zotdef.cc')
-rw-r--r--crawl-ref/source/zotdef.cc44
1 files changed, 0 insertions, 44 deletions
diff --git a/crawl-ref/source/zotdef.cc b/crawl-ref/source/zotdef.cc
index f8aceb37d6..85839d41f6 100644
--- a/crawl-ref/source/zotdef.cc
+++ b/crawl-ref/source/zotdef.cc
@@ -1006,50 +1006,6 @@ bool create_zotdef_ally(monster_type mtyp, const char *successmsg)
return true;
}
-void zotdef_sage(int power)
-{
- // how much to weight your skills
- const int c = random2(10) + 1;
-
- // FIXME: yet another reproduction of random_choose_weighted
- // Ah for Python:
- // skill = random_choice([x*(40-x)*c/10 for x in skill_levels])
- int totalweight = 0;
- skill_type result = SK_NONE;
- for (int i = SK_FIRST_SKILL; i < NUM_SKILLS; ++i)
- {
- skill_type s = static_cast<skill_type>(i);
- if (skill_name(s) == NULL || is_useless_skill(s))
- continue;
-
- if (you.skills[s] < MAX_SKILL_LEVEL)
- {
- // Choosing a skill is likelier if you are somewhat skilled in it.
- const int curweight = 1 + you.skills[s] * (40 - you.skills[s]) * c;
- totalweight += curweight;
- if (x_chance_in_y(curweight, totalweight))
- result = s;
- }
- }
-
- if (result == SK_NONE)
- mpr("You feel omnipotent."); // All skills maxed.
- else
- {
- int xp = exp_needed(min<int>(you.max_level, 27) + 1)
- - exp_needed(min<int>(you.max_level, 27));
- xp = xp / 10 + random2(xp / 4);
-
- // There may be concurrent sages for the same skill, with different
- // bonus multipliers.
- you.sage_skills.push_back(result);
- you.sage_xp.push_back(xp);
- you.sage_bonus.push_back(power / 25);
- mprf(MSGCH_PLAIN, "You feel studious about %s.", skill_name(result));
- dprf("Will redirect %d xp, bonus = %d%%\n", xp, (power / 25) * 2);
- }
-}
-
void zotdef_create_pond(const coord_def& center, int radius)
{
for (radius_iterator ri(center, radius, C_ROUND, LOS_DEFAULT); ri; ++ri)