Skill adept issue

Posted by Zeno on Sat 02 Jul 2005 01:22 AM — 4 posts, 14,743 views.

USA #0
One of our items causes this:
Affects parry by -25.


So he has 2 on, that's -50. The max for the skill is 85. If it's at 35 (the limit), it'll still raise. If he saves, it'll go back to 35. This makes him able to max the skill over and over for bonus exp everytime. Does anyone have any ideas how to fix this? Here is the adept code:
sh_int skill_adept( CHAR_DATA *ch, int sn)
{
  sh_int max = 0;

  if (skill_table[(sn)]->skill_level[ch->class] <=  LEVEL_HERO)
   max = skill_table[(sn)]->skill_adept[(ch)->class];

  if (skill_table[sn]->race_level[ch->race] <= LEVEL_HERO)
   max = UMAX( max, skill_table[sn]->race_adept[ch->race]);

   return max;
}


This is a stock bug I think.
Canada #1
Are you saying, for example, person has 100%, equips two, now at 50%, gets skill back up to 100%, removes items, now at 150%? If so, I found the best way to correct it is to add a check in where the bonus is added/removed based on the affect. Have it set the skills back to original, but check if its over 100%, if so, max it at 100%. Assuming thats what your talking about, of course. If not, I'm confused.
USA #2
In a way yes. It will not go past the max adept of the skill (85%), but it will go past the limited max (35%). When it hits 85% again, they gain the exp bonus. If they save, it'll revert to 35%. But then will increase until they save.
USA #3
Every time the game saves a character, it removes and re-equips all their equipment. That could be the culprit for this problem. I had something similar when I added scabbards to the game: sheathed weapons were considered 'worn' in a scabbard wearloc, and if the weapon had any effects they were applied every time the character saved.