Some things you can do:
- Make sure you use "MIN(.., 18)".
- Whereever you add to strength, make sure you add to the str_add if you get over 18:
Example from one race, adjust to fit the others:
Code:
case RACE_HALF_GIANT:
ch->real_abils.dex = MIN(ch->real_abils.dex + 2, 18);
ch->real_abils.con = MIN(real_abils.con + 2, 18);
ch->real_abils.intel -= 3;
ch->real_abils.wis -= 3;
ch->real_abils.cha -= 3;
ch->real_abils.str += 3;
break;
// before returning
if (ch->real_abils.str >= 18 && ch->real_abils.str_add == 0)
ch->real_abils.str_add = rand_number(0, 100);
while (ch->real_abils.str > 18) {
ch->real_abils.str--;
ch->real_abils.str_add = MIN(ch->real_abils.str_add + 10, 100);
}