1
Curses / Bug in game.cpp for stats
« on: August 26, 2008, 10:23:32 pm »
Was looking through the files and I saw a bug on game.cpp
The function
440 long creaturest::attval(short a,char usejuice)
On many (if not all) of the attributes the age benifits are unable to be realized
525 case ATTRIBUTE_CHARISMA:
526 ret-=disfigs;
527
528 if(age<11)ret+=2; // yayay kids
529 else if(age<16)ret-=1; // barf teenagers
530 else if(age>35)ret+=1;
531 else if(age>52)ret+=2;
532 else if(age>70)ret+=3;
533 break;
While 528 being true will prevent a double hit of line 529,
you can never get a true statement on line 531 or 532 because 52 is always greater than 35.
Also is the desired boost for a 71 year old 3 or 6?
With the += this logic would imply that a 71 year old should get a +6 total to the stat.
Just thought you might want to know.
The function
440 long creaturest::attval(short a,char usejuice)
On many (if not all) of the attributes the age benifits are unable to be realized
525 case ATTRIBUTE_CHARISMA:
526 ret-=disfigs;
527
528 if(age<11)ret+=2; // yayay kids
529 else if(age<16)ret-=1; // barf teenagers
530 else if(age>35)ret+=1;
531 else if(age>52)ret+=2;
532 else if(age>70)ret+=3;
533 break;
While 528 being true will prevent a double hit of line 529,
you can never get a true statement on line 531 or 532 because 52 is always greater than 35.
Also is the desired boost for a 71 year old 3 or 6?
With the += this logic would imply that a 71 year old should get a +6 total to the stat.
Just thought you might want to know.