mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-16 16:41:44 +01:00
Added hitroll and damroll fields to DG, and made Triggers attached to players show on stat
This commit is contained in:
@@ -931,8 +931,6 @@ void do_stat_character(struct char_data *ch, struct char_data *k)
|
||||
send_to_char(ch, "%sPOOFOUT: %s%s disappears in a puff of smoke.%s\r\n", QYEL, QCYN, GET_NAME(k), QNRM);
|
||||
}
|
||||
|
||||
/* check mobiles for a script */
|
||||
if (IS_NPC(k)) {
|
||||
do_sstat_character(ch, k);
|
||||
if (SCRIPT_MEM(k)) {
|
||||
struct script_memory *mem = SCRIPT_MEM(k);
|
||||
@@ -950,7 +948,8 @@ void do_stat_character(struct char_data *ch, struct char_data *k)
|
||||
mem = mem->next;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!(IS_NPC(k))) {
|
||||
/* this is a PC, display their global variables */
|
||||
if (k->script && k->script->global_vars) {
|
||||
struct trig_var_data *tv;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user