View Single Post
  #9  
Old 09-16-2015, 10:57 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

client.cpp - Client::CheckIncreaseSkill

Defensive skills get a chance to increase with every swing an enemy takes at you. Offensive skills get a chance to increase with every swing you take at an enemy.

If you have 2 enemies attacking, you, you'll get twice as many opportunities to skill up defensive skills as offensive skills.

I don't see anything in the skillup code that would affect chances of skillups as you get closer to max for a level. This is basically it:

Code:
// Make sure we're not already at skill cap
	if (skillval < maxskill)
	{
		// the higher your current skill level, the harder it is
		int32 Chance = 10 + chancemodi + ((252 - skillval) / 20);

		Chance = (Chance * RuleI(Character, SkillUpModifier) / 100);

		Chance = mod_increase_skill_chance(Chance, against_who);

		if(Chance < 1)
			Chance = 1; // Make it always possible

		if(zone->random.Real(0, 99) < Chance)
		{
			SetSkill(skillid, GetRawSkill(skillid) + 1);
			Log.Out(Logs::Detail, Logs::Skills, "Skill %d at value %d successfully gain with %d%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
			return true;
		} else {
			Log.Out(Logs::Detail, Logs::Skills, "Skill %d at value %d failed to gain with %d%%chance (mod %d)", skillid, skillval, Chance, chancemodi);
		}
	} else {
		Log.Out(Logs::Detail, Logs::Skills, "Skill %d at value %d cannot increase due to maxmum %d", skillid, skillval, maxskill);
	}
Reply With Quote