I edited this code a little to give a little more options. This is for use with my new custom rule, ExtraLevelCap. But, the rule could easily be replaced with MaxLevel and it would work with the current rule system.
Basically, the adjustments for calculating max stats is for servers that have a level cap over level 70. This will let them keep getting 5 stats per level no matter how high they set the level cap to.
Changing the base to 330 isn't really necessary, but in most cases this setting would probably only get used by GMs that set their level to be above the level cap rule(s) on the server. Really, this could just stay 280, but it depends on what you want your GMs over max level to have as their stat caps.
The only real important thing in this submission is that the Chaotic Potential fix gets added in. There should be nothing holding this part up from making it into the source. This fix has HP calculated considerably more accurate for players with this AA. It is usually only off by 1 or 2 hps, which isn't the fault of this code. I think that is another issue all together with HP calculations. Here is the Chaotic Potential Fix that goes in the client_mods.cpp:
Code:
base += GetAA(aaChaoticPotential) * 5; //added by spider661 - Chaotic Potential Fix
And, here is the fully edited code from Spider661 with a little tweaking from me:
client_mods.cpp:
Code:
#include "../common/ruletypes.h"
Code:
sint16 Client::GetMaxStat() const {
int level = GetLevel();
int lvlcap = RuleI(Character, ExtraLevelCap) + 1; //Trevius - added to work with new rule when deciding the stat caps per level for 61+
sint16 base = 0;
if (level < 61) {
base = 255;
}
else if (level < lvlcap) { //Trevius - Previously Set to 71
base = 255 + 5 * (level - 60);
}
else {
base = 330; //spider661 - edited from 280 to 330
}
base += GetAA(aaPlanarPower) * 5;
base += GetAA(aaChaoticPotential) * 5; //added by spider661 - Chaotic Potential Fix
return(base);
}
I have tried this and I am not sure why it isn't compiling properly. I get warnings about RuleI, Character and ExtraLevelCap not being defined or something. I will have to mess with it some more. It may have been because I was just doing a make again without doing a make clean first...
All I want it to do is make "lvlcap" equal whatever ExtraLevelCap is set to in the rules + 1. So, if it is set to 75 in the rules, lvlcap would equal 76.
I will try this out tonight and see how it goes.