Each case contains fields that start with the case letter as their first letter.
ie.
Code:
case 'd':
if (!str_cmp(field, "damroll")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_DAMROLL(c) = MAX(1, GET_DAMROLL(c) + addition);
}
snprintf(str, slen, "%d", GET_DAMROLL(c));
} else if (!str_cmp(field, "dex")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
int max = (IS_NPC(c) || GET_LEVEL(c) >= LVL_GRGOD) ? 25 : 18;
GET_DEX(c) += addition;
if (GET_DEX(c) > max) GET_DEX(c) = max;
if (GET_DEX(c) < 3) GET_DEX(c) = 3;
}
snprintf(str, slen, "%d", GET_DEX(c));
}
else if (!str_cmp(field, "drunk")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_COND(c, DRUNK) = MAX(-1, MIN(addition, 24));
}
snprintf(str, slen, "%d", GET_COND(c, DRUNK));
}
break;
luck goes in
case 'l':
will in
case 'w':
reflex in
case 'r':
Not sure if I'm a fan of increasing luck by the listed amount though.
ie. it could be coded so that:
nop %actor.luck(3)% sets the actors luck to 3, or increases it by 3, not sure which most people'd consider to be more intuitive, both ways allow you to set and raise in scripts though, it's just that whichever isn't the default will require a workaround.
for example, if I wanted to set luck TO 18 with the current setup I'd do this:
Code:
eval luckgain 18 - %actor.luck%
nop %actor.luck(%luckgain%)%