Added hitroll and damroll fields to DG, and made Triggers attached to players show on stat

This commit is contained in:
Fizban
2011-07-18 03:12:29 +00:00
parent bc95dfe20e
commit 19766c1be6
2 changed files with 17 additions and 4 deletions

View File

@@ -632,7 +632,14 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
}
break;
case 'd':
if (!str_cmp(field, "dex")) {
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) || IS_ADMIN(c, ADMLVL_GRGOD)) ? 25 : 18;
@@ -731,6 +738,13 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
}
snprintf(str, slen, "%d", GET_HIT(c));
}
else if (!str_cmp(field, "hitroll")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_HITROLL(c) = MAX(1, GET_HITROLL(c) + addition);
}
snprintf(str, slen, "%d", GET_HITROLL(c));
}
else if (!str_cmp(field, "hunger")) {
if (subfield && *subfield) {
int addition = atoi(subfield);