git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2963 c06c8d41-db1a-0410-9941-cceddc491573
IFUVP76NTBEAK2WA5HC4QWPQ2DUBVL2TKFKG5EIMEXARGVPUHOIQC
default: //return 14000 * (lev - 11);
level = 20000 * (lev - 11) + ((lev - 11) * (lev - 11) * (lev - 11)) * 130;
break;
#endif
// This is a better behaved function than the above. The above looks
// really ugly when you consider the second derivative, its not smooth
// and has a horrible bump at level 12 followed by comparitively easy
// teen levels. This tries to sort out those issues.
//
}
static void experience_card(int power, deck_rarity_type rarity)
{
const int power_level = get_power_level(power, rarity);
if ( you.experience_level < 27 )
{
mpr("You feel more experienced.");
const unsigned long xp_cap = 1 + exp_needed(2 + you.experience_level);
// power_level 2 means automatic level gain
if ( power_level == 2 )
you.experience = xp_cap;
else
{
// Likely to give a level gain (power of ~500 is reasonable
// at high levels even for non-Nemelexites, so 50,000 XP.)
// But not guaranteed.
// Overrides archmagi effect, like potions of experience.
you.experience += power * 100;
if ( you.experience > xp_cap )
you.experience = xp_cap;
}
}
else
mpr("You feel knowledgeable.");
// Put some free XP into pool; power_level 2 means fill pool
you.exp_available += power * 50;
if ( power_level >= 2 || you.exp_available > 20000)
you.exp_available = 20000;
level_change();