Rename move to stamina

This commit is contained in:
kinther 2025-12-29 08:20:07 -08:00
parent 5d4d724e73
commit d4a7ccea5d
26 changed files with 171 additions and 170 deletions

View file

@ -1155,10 +1155,10 @@ ACMD(do_score)
"====================[ Score ]====================\r\n");
send_to_char(ch,
"HP: %d/%d Mana: %d/%d Move: %d/%d\r\n",
"HP: %d/%d Mana: %d/%d Stamina: %d/%d\r\n",
GET_HIT(ch), GET_MAX_HIT(ch),
GET_MANA(ch), GET_MAX_MANA(ch),
GET_MOVE(ch), GET_MAX_MOVE(ch));
GET_STAMINA(ch), GET_MAX_STAMINA(ch));
/* Abilities and 5e modifiers */
send_to_char(ch,
@ -2329,7 +2329,7 @@ ACMD(do_toggle)
" Brief: %-3s "
" Summonable: %-3s\r\n"
" Move Display: %-3s "
" Stamina Display: %-3s "
" Compact: %-3s "
" Quest: %-3s\r\n"
@ -2358,7 +2358,7 @@ ACMD(do_toggle)
ONOFF(PRF_FLAGGED(ch, PRF_BRIEF)),
ONOFF(PRF_FLAGGED(ch, PRF_SUMMONABLE)),
ONOFF(PRF_FLAGGED(ch, PRF_DISPMOVE)),
ONOFF(PRF_FLAGGED(ch, PRF_DISPSTAMINA)),
ONOFF(PRF_FLAGGED(ch, PRF_COMPACT)),
ONOFF(PRF_FLAGGED(ch, PRF_QUEST)),

View file

@ -2165,7 +2165,7 @@ ACMD(do_forage)
prof_bonus = GET_PROFICIENCY(GET_SKILL(ch, SKILL_SURVIVAL));
cost = MAX(1, 10 - prof_bonus);
if (!IS_NPC(ch) && GET_MOVE(ch) < cost) {
if (!IS_NPC(ch) && GET_STAMINA(ch) < cost) {
send_to_char(ch, "You are too exhausted to forage.\r\n");
return;
}
@ -2174,7 +2174,7 @@ ACMD(do_forage)
WAIT_STATE(ch, delay_seconds * PASSES_PER_SEC);
if (!IS_NPC(ch))
GET_MOVE(ch) = MAX(0, GET_MOVE(ch) - cost);
GET_STAMINA(ch) = MAX(0, GET_STAMINA(ch) - cost);
total = roll_skill_check(ch, SKILL_SURVIVAL, 0, NULL);

View file

@ -290,7 +290,7 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
room_rnum was_in = IN_ROOM(ch);
/* ... and the room the character will move into. */
room_rnum going_to = EXIT(ch, dir)->to_room;
/* How many movement points are required to travel from was_in to going_to.
/* How many stamina points are required to travel from was_in to going_to.
* We redefine this later when we need it. */
int need_movement = 0;
/* Contains the "leave" message to display to the was_in room. */
@ -400,13 +400,13 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
}
/* All checks passed, nothing will prevent movement now other than lack of
* move points. */
/* move points needed is avg. move loss for src and destination sect type */
* stamina points. */
/* stamina points needed is avg. move loss for src and destination sect type */
need_movement = (movement_loss[SECT(was_in)] +
movement_loss[SECT(going_to)]) / 2;
/* Move Point Requirement Check */
if (GET_MOVE(ch) < need_movement && !IS_NPC(ch))
if (GET_STAMINA(ch) < need_movement && !IS_NPC(ch))
{
if (need_specials_check && ch->master)
send_to_char(ch, "You are too exhausted to follow.\r\n");
@ -424,7 +424,7 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
/*---------------------------------------------------------------------*/
/* If applicable, subtract movement cost. */
if (GET_LEVEL(ch) < LVL_IMMORT && !IS_NPC(ch))
GET_MOVE(ch) -= need_movement;
GET_STAMINA(ch) -= need_movement;
/* Generate the leave message and display to others in the was_in room. */
if (AFF_FLAGGED(ch, AFF_SNEAK)) {

View file

@ -557,7 +557,7 @@ ACMD(do_sneak)
if (total < dc) {
gain_skill(ch, "stealth", FALSE);
WAIT_STATE(ch, PULSE_VIOLENCE / 2);
GET_MOVE(ch) -= 10;
GET_STAMINA(ch) -= 10;
return;
}
@ -576,7 +576,7 @@ ACMD(do_sneak)
SET_STEALTH_CHECK(ch, MAX(GET_STEALTH_CHECK(ch), total));
gain_skill(ch, "stealth", TRUE);
GET_MOVE(ch) -= 10;
GET_STAMINA(ch) -= 10;
}
ACMD(do_hide)
@ -612,7 +612,7 @@ ACMD(do_hide)
/* Failure */
gain_skill(ch, "stealth", FALSE);
WAIT_STATE(ch, PULSE_VIOLENCE / 2);
GET_MOVE(ch) -= 10;
GET_STAMINA(ch) -= 10;
return;
}
@ -623,7 +623,7 @@ ACMD(do_hide)
send_to_char(ch, "You hide yourself as best you can.\r\n");
gain_skill(ch, "stealth", TRUE);
WAIT_STATE(ch, PULSE_VIOLENCE / 2);
GET_MOVE(ch) -= 10;
GET_STAMINA(ch) -= 10;
}
static void remember_scan_target(struct char_data *ch, struct char_data *tch)
@ -929,7 +929,7 @@ ACMD(do_scan)
act("$n studies $s surroundings with a wary gaze.", TRUE, ch, 0, 0, TO_ROOM);
WAIT_STATE(ch, PULSE_VIOLENCE / 2);
GET_MOVE(ch) -= 10;
GET_STAMINA(ch) -= 10;
}
ACMD(do_listen)
@ -959,7 +959,7 @@ ACMD(do_listen)
send_to_char(ch, "You focus entirely on every whisper and distant sound.\r\n");
WAIT_STATE(ch, PULSE_VIOLENCE / 2);
GET_MOVE(ch) -= 10;
GET_STAMINA(ch) -= 10;
}
ACMD(do_palm)
@ -1307,7 +1307,7 @@ static void print_group(struct char_data *ch)
GROUP_LEADER(GROUP(ch)) == k ? CBGRN(ch, C_NRM) : CCGRN(ch, C_NRM),
GET_HIT(k), GET_MAX_HIT(k),
GET_MANA(k), GET_MAX_MANA(k),
GET_MOVE(k), GET_MAX_MOVE(k),
GET_STAMINA(k), GET_MAX_STAMINA(k),
CCNRM(ch, C_NRM));
}
@ -1464,7 +1464,7 @@ ACMD(do_report)
GET_NAME(ch),
GET_HIT(ch), GET_MAX_HIT(ch),
GET_MANA(ch), GET_MAX_MANA(ch),
GET_MOVE(ch), GET_MAX_MOVE(ch));
GET_STAMINA(ch), GET_MAX_STAMINA(ch));
}
ACMD(do_split)
@ -1600,7 +1600,7 @@ ACMD(do_display)
skip_spaces(&argument);
if (!*argument) {
send_to_char(ch, "Usage: prompt { { H | M | V } | all | auto | none }\r\n");
send_to_char(ch, "Usage: prompt { { H | M | S } | all | auto | none }\r\n");
return;
}
@ -1613,15 +1613,15 @@ ACMD(do_display)
if (!str_cmp(argument, "on") || !str_cmp(argument, "all")) {
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP);
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPSTAMINA);
} else if (!str_cmp(argument, "off") || !str_cmp(argument, "none")) {
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP);
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPSTAMINA);
} else {
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP);
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
REMOVE_BIT_AR(PRF_FLAGS(ch), PRF_DISPSTAMINA);
for (i = 0; i < strlen(argument); i++) {
switch (LOWER(argument[i])) {
@ -1631,11 +1631,12 @@ ACMD(do_display)
case 'm':
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
break;
case 's':
case 'v':
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPSTAMINA);
break;
default:
send_to_char(ch, "Usage: prompt { { H | M | V } | all | auto | none }\r\n");
send_to_char(ch, "Usage: prompt { { H | M | S } | all | auto | none }\r\n");
return;
}
}

View file

@ -1836,10 +1836,10 @@ static void do_stat_character(struct char_data *ch, struct char_data *k)
get_save_mod(k, ABIL_CHA));
stat_table_row_fmt(ch, "Vitals",
"HP %d/%d (+%d) | Mana %d/%d (+%d) | Move %d/%d (+%d)",
"HP %d/%d (+%d) | Mana %d/%d (+%d) | Stamina %d/%d (+%d)",
GET_HIT(k), GET_MAX_HIT(k), hit_gain(k),
GET_MANA(k), GET_MAX_MANA(k), mana_gain(k),
GET_MOVE(k), GET_MAX_MOVE(k), move_gain(k));
GET_STAMINA(k), GET_MAX_STAMINA(k), move_gain(k));
stat_table_row_fmt(ch, "Currency", "Coins %d, Bank %d (Total %d)",
GET_COINS(k), GET_BANK_COINS(k), GET_COINS(k) + GET_BANK_COINS(k));
@ -2542,7 +2542,7 @@ ACMD(do_restore)
GET_HIT(vict) = GET_MAX_HIT(vict);
GET_MANA(vict) = GET_MAX_MANA(vict);
GET_MOVE(vict) = GET_MAX_MOVE(vict);
GET_STAMINA(vict) = GET_MAX_STAMINA(vict);
update_pos(vict);
send_to_char(ch, "%s has been fully healed.\r\n", GET_NAME(vict));
@ -2558,7 +2558,7 @@ ACMD(do_restore)
GET_HIT(vict) = GET_MAX_HIT(vict);
GET_MANA(vict) = GET_MAX_MANA(vict);
GET_MOVE(vict) = GET_MAX_MOVE(vict);
GET_STAMINA(vict) = GET_MAX_STAMINA(vict);
if (!IS_NPC(vict) && GET_LEVEL(ch) >= LVL_GRGOD) {
if (GET_LEVEL(vict) >= LVL_IMMORT)
@ -3783,31 +3783,31 @@ static struct set_struct {
{ "mana", LVL_BUILDER, BOTH, NUMBER },
{ "maxhit", LVL_BUILDER, BOTH, NUMBER },
{ "maxmana", LVL_BUILDER, BOTH, NUMBER },
{ "maxmove", LVL_BUILDER, BOTH, NUMBER }, /* 30 */
{ "move", LVL_BUILDER, BOTH, NUMBER },
{ "maxstam", LVL_BUILDER, BOTH, NUMBER }, /* 28 */
{ "name", LVL_IMMORT, PC, MISC },
{ "nodelete", LVL_GOD, PC, BINARY },
{ "nohassle", LVL_GOD, PC, BINARY },
{ "nosummon", LVL_BUILDER, PC, BINARY }, /* 35 */
{ "nosummon", LVL_BUILDER, PC, BINARY },
{ "nowizlist", LVL_GRGOD, PC, BINARY },
{ "olc", LVL_GRGOD, PC, MISC },
{ "password", LVL_GRGOD, PC, MISC },
{ "poofin", LVL_IMMORT, PC, MISC },
{ "poofout", LVL_IMMORT, PC, MISC }, /* 40 */
{ "poofout", LVL_IMMORT, PC, MISC },
{ "quest", LVL_GOD, PC, BINARY },
{ "room", LVL_BUILDER, BOTH, NUMBER },
{ "screenwidth", LVL_GOD, PC, NUMBER },
{ "screenwidth", LVL_GOD, PC, NUMBER }, /* 40 */
{ "sex", LVL_GOD, BOTH, MISC },
{ "showvnums", LVL_BUILDER, PC, BINARY }, /* 45 */
{ "showvnums", LVL_BUILDER, PC, BINARY },
{ "siteok", LVL_GOD, PC, BINARY },
{ "skill", LVL_GOD, BOTH, NUMBER },
{ "stam", LVL_BUILDER, BOTH, NUMBER }, /* 45 */
{ "str", LVL_BUILDER, BOTH, NUMBER },
{ "unused1", LVL_GOD, PC, BINARY },
{ "thirst", LVL_BUILDER, BOTH, MISC }, /* 50 */
{ "unused1", LVL_GOD, PC, BINARY },
{ "thirst", LVL_BUILDER, BOTH, MISC },
{ "variable", LVL_GRGOD, PC, MISC },
{ "weight", LVL_BUILDER, BOTH, NUMBER },
{ "wis", LVL_BUILDER, BOTH, NUMBER },
{ "questpoints", LVL_GOD, PC, NUMBER },
{ "questpoints", LVL_GOD, PC, NUMBER }, /* 52 */
{ "questhistory", LVL_GOD, PC, NUMBER },
{ "species", LVL_BUILDER, BOTH, MISC },
{ "\n", 0, BOTH, MISC }
@ -4060,15 +4060,11 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
vict->points.max_mana = RANGE(1, 5000);
affect_total(vict);
break;
case 28: /* maxmove */
vict->points.max_move = RANGE(1, 5000);
case 28: /* maxstam */
vict->points.max_stamina = RANGE(1, 5000);
affect_total(vict);
break;
case 29: /* move */
vict->points.move = RANGE(0, vict->points.max_move);
affect_total(vict);
break;
case 30: /* name */
case 29: /* name */
if (ch != vict && GET_LEVEL(ch) < LVL_IMPL) {
send_to_char(ch, "Only Imps can change the name of other players.\r\n");
return (0);
@ -4078,24 +4074,24 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
return (0);
}
break;
case 31: /* nodelete */
case 30: /* nodelete */
SET_OR_REMOVE(PLR_FLAGS(vict), PLR_NODELETE);
break;
case 32: /* nohassle */
case 31: /* nohassle */
if (GET_LEVEL(ch) < LVL_GOD && ch != vict) {
send_to_char(ch, "You aren't godly enough for that!\r\n");
return (0);
}
SET_OR_REMOVE(PRF_FLAGS(vict), PRF_NOHASSLE);
break;
case 33: /* nosummon */
case 32: /* nosummon */
SET_OR_REMOVE(PRF_FLAGS(vict), PRF_SUMMONABLE);
send_to_char(ch, "Nosummon %s for %s.\r\n", ONOFF(!on), GET_NAME(vict));
break;
case 34: /* nowiz */
case 33: /* nowiz */
SET_OR_REMOVE(PLR_FLAGS(vict), PLR_NOWIZLIST);
break;
case 35: /* olc */
case 34: /* olc */
if (is_abbrev(val_arg, "socials") || is_abbrev(val_arg, "actions") || is_abbrev(val_arg, "aedit"))
GET_OLC_ZONE(vict) = AEDIT_PERMISSION;
else if (is_abbrev(val_arg, "hedit") || is_abbrev(val_arg, "help"))
@ -4110,7 +4106,7 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
} else
GET_OLC_ZONE(vict) = atoi(val_arg);
break;
case 36: /* password */
case 35: /* password */
if (GET_LEVEL(vict) >= LVL_GRGOD) {
send_to_char(ch, "You cannot change that.\r\n");
return (0);
@ -4119,7 +4115,7 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
*(GET_PASSWD(vict) + MAX_PWD_LENGTH) = '\0';
send_to_char(ch, "Password changed to '%s'.\r\n", val_arg);
break;
case 37: /* poofin */
case 36: /* poofin */
if ((vict == ch) || (GET_LEVEL(ch) == LVL_IMPL)) {
skip_spaces(&val_arg);
parse_at(val_arg);
@ -4133,7 +4129,7 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
POOFIN(vict) = strdup(val_arg);
}
break;
case 38: /* poofout */
case 37: /* poofout */
if ((vict == ch) || (GET_LEVEL(ch) == LVL_IMPL)) {
skip_spaces(&val_arg);
parse_at(val_arg);
@ -4147,10 +4143,10 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
POOFOUT(vict) = strdup(val_arg);
}
break;
case 39: /* quest */
case 38: /* quest */
SET_OR_REMOVE(PRF_FLAGS(vict), PRF_QUEST);
break;
case 40: /* room */
case 39: /* room */
if ((rnum = real_room(value)) == NOWHERE) {
send_to_char(ch, "No room exists with that number.\r\n");
return (0);
@ -4159,23 +4155,23 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
char_from_room(vict);
char_to_room(vict, rnum);
break;
case 41: /* screenwidth */
case 40: /* screenwidth */
GET_SCREEN_WIDTH(vict) = RANGE(40, 200);
break;
case 42: /* sex */
case 41: /* sex */
if ((i = search_block(val_arg, genders, FALSE)) < 0) {
send_to_char(ch, "Must be 'male', 'female', or 'neutral'.\r\n");
return (0);
}
GET_SEX(vict) = i;
break;
case 43: /* showvnums */
case 42: /* showvnums */
SET_OR_REMOVE(PRF_FLAGS(vict), PRF_SHOWVNUMS);
break;
case 44: /* siteok */
case 43: /* siteok */
SET_OR_REMOVE(PLR_FLAGS(vict), PLR_SITEOK);
break;
case 45: /* skills/spells */
case 44: /* skills/spells */
{
char local_buf[MAX_INPUT_LENGTH], *value_arg, *name_end;
char skill_name[MAX_INPUT_LENGTH];
@ -4260,6 +4256,11 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
}
break;
case 45: /* stam */
vict->points.stamina = RANGE(0, vict->points.max_stamina);
affect_total(vict);
break;
case 46: /* str */
if (IS_NPC(vict) || GET_LEVEL(vict) >= LVL_GRGOD)
RANGE(3, 25);
@ -4615,7 +4616,7 @@ static struct zcheck_affs {
{APPLY_CHAR_HEIGHT,-50, 50, "character height"},
{APPLY_MANA, -50, 50, "mana"},
{APPLY_HIT, -50, 50, "hit points"},
{APPLY_MOVE, -50, 50, "movement"},
{APPLY_STAMINA, -50, 50, "stamina"},
{APPLY_COINS, 0, 0, "coins"},
{APPLY_EXP, 0, 0, "experience"},
{APPLY_AC, -10, 10, "magical AC"},

View file

@ -591,7 +591,7 @@ void do_start(struct char_data *ch)
GET_MAX_HIT(ch) = 90;
GET_MAX_MANA(ch) = 100;
GET_MAX_MOVE(ch) = 90;
GET_MAX_STAMINA(ch) = 90;
grant_class_skills(ch, TRUE);
grant_species_skills(ch);
@ -600,7 +600,7 @@ void do_start(struct char_data *ch)
GET_HIT(ch) = GET_MAX_HIT(ch);
GET_MANA(ch) = GET_MAX_MANA(ch);
GET_MOVE(ch) = GET_MAX_MOVE(ch);
GET_STAMINA(ch) = GET_MAX_STAMINA(ch);
GET_COND(ch, THIRST) = 24;
GET_COND(ch, HUNGER) = 24;
@ -610,7 +610,7 @@ void do_start(struct char_data *ch)
SET_BIT_AR(PLR_FLAGS(ch), PLR_SITEOK);
}
/* This function controls the change to maxmove, maxmana, and maxhp for each
/* This function controls the change to maxstamina, maxmana, and maxhp for each
* class every time they gain a level. */
void advance_level(struct char_data *ch)
{
@ -674,7 +674,7 @@ void advance_level(struct char_data *ch)
}
ch->points.max_hit += MAX(1, add_hp);
ch->points.max_move += MAX(1, add_move);
ch->points.max_stamina += MAX(1, add_move);
if (GET_LEVEL(ch) > 1)
ch->points.max_mana += add_mana;

View file

@ -1145,8 +1145,8 @@ static char *make_prompt(struct descriptor_data *d)
if (count >= 0)
len += count;
}
if (GET_MOVE(ch) << 2 < GET_MAX_MOVE(ch) && len < sizeof(prompt)) {
count = snprintf(prompt + len, sizeof(prompt) - len, "%dV ", GET_MOVE(ch));
if (GET_STAMINA(ch) << 2 < GET_MAX_STAMINA(ch) && len < sizeof(prompt)) {
count = snprintf(prompt + len, sizeof(prompt) - len, "%dS ", GET_STAMINA(ch));
if (count >= 0)
len += count;
}
@ -1163,8 +1163,8 @@ static char *make_prompt(struct descriptor_data *d)
len += count;
}
if (PRF_FLAGGED(d->character, PRF_DISPMOVE) && len < sizeof(prompt)) {
count = snprintf(prompt + len, sizeof(prompt) - len, "%dV ", GET_MOVE(d->character));
if (PRF_FLAGGED(d->character, PRF_DISPSTAMINA) && len < sizeof(prompt)) {
count = snprintf(prompt + len, sizeof(prompt) - len, "%dS ", GET_STAMINA(d->character));
if (count >= 0)
len += count;
}
@ -2795,8 +2795,8 @@ static void msdp_update( void )
MSDPSetNumber( d, eMSDP_MANA_MAX, GET_MAX_MANA(ch) );
MSDPSetNumber( d, eMSDP_WIMPY, GET_WIMP_LEV(ch) );
MSDPSetNumber( d, eMSDP_MONEY, GET_COINS(ch) );
MSDPSetNumber( d, eMSDP_MOVEMENT, GET_MOVE(ch) );
MSDPSetNumber( d, eMSDP_MOVEMENT_MAX, GET_MAX_MOVE(ch) );
MSDPSetNumber( d, eMSDP_MOVEMENT, GET_STAMINA(ch) );
MSDPSetNumber( d, eMSDP_MOVEMENT_MAX, GET_MAX_STAMINA(ch) );
MSDPSetNumber( d, eMSDP_AC, compute_armor_class(ch) );
/* This would be better moved elsewhere */

View file

@ -253,7 +253,7 @@ const char *preference_bits[] = {
"NO_TELL",
"D_HP",
"D_MANA",
"D_MOVE",
"D_STAMINA",
"AUTOEX",
"NO_HASS",
"QUEST",
@ -511,7 +511,7 @@ const char *apply_types[] = {
"CHAR_HEIGHT",
"MAXMANA",
"MAXHIT",
"MAXMOVE",
"MAXSTAMINA",
"COINS",
"EXP",
"ARMOR",

View file

@ -1602,10 +1602,10 @@ static void parse_simple_mob(FILE *mob_f, int i, int nr)
GET_MAX_HIT(mob_proto + i) = 0;
GET_HIT(mob_proto + i) = t[1];
GET_MANA(mob_proto + i) = t[2];
GET_MOVE(mob_proto + i) = t[3];
GET_STAMINA(mob_proto + i) = t[3];
GET_MAX_MANA(mob_proto + i) = 10;
GET_MAX_MOVE(mob_proto + i) = 50;
GET_MAX_STAMINA(mob_proto + i) = 50;
if (!get_line(mob_f, line)) {
log("SYSERR: Format error in last line of mob #%d\n"
@ -2736,13 +2736,13 @@ struct char_data *read_mobile(mob_vnum nr, int type) /* and mob_rnum */
if (!mob->points.max_hit) {
mob->points.max_hit = dice(mob->points.hit, mob->points.mana) +
mob->points.move;
mob->points.stamina;
} else
mob->points.max_hit = rand_number(mob->points.hit, mob->points.mana);
mob->points.hit = mob->points.max_hit;
mob->points.mana = mob->points.max_mana;
mob->points.move = mob->points.max_move;
mob->points.stamina = mob->points.max_stamina;
mob->player.time.birth = time(0);
mob->player.time.played = 0;
@ -3757,8 +3757,8 @@ void reset_char(struct char_data *ch)
if (GET_HIT(ch) <= 0)
GET_HIT(ch) = 1;
if (GET_MOVE(ch) <= 0)
GET_MOVE(ch) = 1;
if (GET_STAMINA(ch) <= 0)
GET_STAMINA(ch) = 1;
if (GET_MANA(ch) <= 0)
GET_MANA(ch) = 1;
@ -3815,10 +3815,10 @@ void init_char(struct char_data *ch)
/* The implementor never goes through do_start(). */
GET_MAX_HIT(ch) = 500;
GET_MAX_MANA(ch) = 100;
GET_MAX_MOVE(ch) = 82;
GET_MAX_STAMINA(ch) = 82;
GET_HIT(ch) = GET_MAX_HIT(ch);
GET_MANA(ch) = GET_MAX_MANA(ch);
GET_MOVE(ch) = GET_MAX_MOVE(ch);
GET_STAMINA(ch) = GET_MAX_STAMINA(ch);
}
ch->player.short_descr = NULL;
@ -3891,7 +3891,7 @@ void init_char(struct char_data *ch)
}
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPHP);
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMANA);
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPMOVE);
SET_BIT_AR(PRF_FLAGS(ch), PRF_DISPSTAMINA);
}
/* returns the real number of the room with given virtual number */

View file

@ -843,19 +843,19 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
}
snprintf(str, slen, "%d", GET_MAX_MANA(c));
}
else if (!str_cmp(field, "maxmove")) {
else if (!str_cmp(field, "maxmove") || !str_cmp(field, "maxstamina")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_MAX_MOVE(c) = MAX(GET_MAX_MOVE(c) + addition, 1);
GET_MAX_STAMINA(c) = MAX(GET_MAX_STAMINA(c) + addition, 1);
}
snprintf(str, slen, "%d", GET_MAX_MOVE(c));
snprintf(str, slen, "%d", GET_MAX_STAMINA(c));
}
else if (!str_cmp(field, "move")) {
else if (!str_cmp(field, "move") || !str_cmp(field, "stamina")) {
if (subfield && *subfield) {
int addition = atoi(subfield);
GET_MOVE(c) += addition;
GET_STAMINA(c) += addition;
}
snprintf(str, slen, "%d", GET_MOVE(c));
snprintf(str, slen, "%d", GET_STAMINA(c));
}
break;
case 'n':

View file

@ -451,7 +451,7 @@ int write_mobile_record(mob_vnum mvnum, struct char_data *mob, FILE *fd)
GET_LEVEL(mob),
GET_HIT(mob),
GET_MANA(mob),
GET_MOVE(mob));
GET_STAMINA(mob));
/* --- Position / default position / sex --- */
fprintf(fd, "%d %d %d\n",

View file

@ -629,7 +629,7 @@ static int export_mobile_record(mob_vnum mvnum, struct char_data *mob, FILE *fd)
AFF_FLAGS(mob)[2], AFF_FLAGS(mob)[3],
GET_ALIGNMENT(mob),
GET_LEVEL(mob), GET_HIT(mob),
GET_MANA(mob), GET_MOVE(mob));
GET_MANA(mob), GET_STAMINA(mob));
fprintf(fd, "%d %d %d\n",
GET_POS(mob), GET_DEFAULT_POS(mob), GET_SEX(mob)

View file

@ -148,7 +148,7 @@ static void aff_apply_modify(struct char_data *ch, byte loc, sbyte mod, char *ms
case APPLY_CHAR_HEIGHT: GET_HEIGHT(ch) += mod; break;
case APPLY_MANA: GET_MAX_MANA(ch) += mod; break;
case APPLY_HIT: GET_MAX_HIT(ch) += mod; break;
case APPLY_MOVE: GET_MAX_MOVE(ch) += mod; break;
case APPLY_STAMINA: GET_MAX_STAMINA(ch) += mod; break;
case APPLY_COINS: break;
case APPLY_EXP: break;

View file

@ -142,7 +142,7 @@ int hit_gain(struct char_data *ch)
return (gain);
}
/* move gain pr. game hour */
/* stamina gain pr. game hour */
int move_gain(struct char_data *ch)
{
int gain;
@ -417,7 +417,7 @@ void point_update(void)
if (GET_POS(i) >= POS_STUNNED) {
GET_HIT(i) = MIN(GET_HIT(i) + hit_gain(i), GET_MAX_HIT(i));
GET_MANA(i) = MIN(GET_MANA(i) + mana_gain(i), GET_MAX_MANA(i));
GET_MOVE(i) = MIN(GET_MOVE(i) + move_gain(i), GET_MAX_MOVE(i));
GET_STAMINA(i) = MIN(GET_STAMINA(i) + move_gain(i), GET_MAX_STAMINA(i));
if (AFF_FLAGGED(i, AFF_POISON))
if (damage(i, i, 2, SPELL_POISON) == -1)
continue; /* Oops, they died. -gg 6/24/98 */

View file

@ -819,7 +819,7 @@ void mag_points(int level, struct char_data *ch, struct char_data *victim,
break;
}
GET_HIT(victim) = MIN(GET_MAX_HIT(victim), GET_HIT(victim) + healing);
GET_MOVE(victim) = MIN(GET_MAX_MOVE(victim), GET_MOVE(victim) + move);
GET_STAMINA(victim) = MIN(GET_MAX_STAMINA(victim), GET_STAMINA(victim) + move);
update_pos(victim);
}

View file

@ -238,7 +238,7 @@ static void init_mobile(struct char_data *mob)
clear_char(mob);
GET_HIT(mob) = GET_MANA(mob) = 1;
GET_MAX_MANA(mob) = GET_MAX_MOVE(mob) = 100;
GET_MAX_MANA(mob) = GET_MAX_STAMINA(mob) = 100;
GET_WEIGHT(mob) = 200;
GET_HEIGHT(mob) = 198;
@ -580,8 +580,8 @@ static void medit_disp_stats_menu(struct descriptor_data *d)
clear_screen(d);
/* Color codes have to be used here, for count_color_codes to work */
sprintf(buf, "(range \ty%d\tn to \ty%d\tn)", GET_HIT(mob) + GET_MOVE(mob),
(GET_HIT(mob) * GET_MANA(mob)) + GET_MOVE(mob));
sprintf(buf, "(range \ty%d\tn to \ty%d\tn)", GET_HIT(mob) + GET_STAMINA(mob),
(GET_HIT(mob) * GET_MANA(mob)) + GET_STAMINA(mob));
/* Top section - standard stats */
write_to_output(d,
@ -595,7 +595,7 @@ static void medit_disp_stats_menu(struct descriptor_data *d)
cyn, nrm, cyn, nrm,
cyn, nrm, cyn, yel, GET_HIT(mob), cyn, nrm,
cyn, nrm, cyn, yel, GET_MANA(mob), cyn, nrm,
cyn, nrm, cyn, yel, GET_MOVE(mob), cyn, nrm
cyn, nrm, cyn, yel, GET_STAMINA(mob), cyn, nrm
);
if (CONFIG_MEDIT_ADVANCED) {
@ -1321,7 +1321,7 @@ void medit_parse(struct descriptor_data *d, char *arg)
return;
case MEDIT_ADD_HP:
GET_MOVE(OLC_MOB(d)) = LIMIT(i, 0, 30000);
GET_STAMINA(OLC_MOB(d)) = LIMIT(i, 0, 30000);
OLC_VAL(d) = TRUE;
medit_disp_stats_menu(d);
return;
@ -1540,7 +1540,7 @@ void medit_autoroll_stats(struct descriptor_data *d)
if (mob_lev < 1)
mob_lev = 1;
GET_MOVE(OLC_MOB(d)) = mob_lev * 10; /* hit point bonus (mobs don't use movement points) */
GET_STAMINA(OLC_MOB(d)) = mob_lev * 10; /* hit point bonus (mobs don't use stamina points) */
GET_HIT(OLC_MOB(d)) = mob_lev / 5; /* number of hitpoint dice */
GET_MANA(OLC_MOB(d)) = mob_lev / 5; /* size of hitpoint dice */

View file

@ -44,8 +44,8 @@
#define PFDEF_MAXHIT 0
#define PFDEF_MANA 0
#define PFDEF_MAXMANA 0
#define PFDEF_MOVE 0
#define PFDEF_MAXMOVE 0
#define PFDEF_STAMINA 0
#define PFDEF_MAXSTAMINA 0
#define PFDEF_HUNGER 0
#define PFDEF_THIRST 0
#define PFDEF_DRUNK 0

View file

@ -25,7 +25,7 @@
#define LOAD_HIT 0
#define LOAD_MANA 1
#define LOAD_MOVE 2
#define LOAD_STAMINA 2
#define LOAD_STRENGTH 3
#define PT_PNAME(i) (player_table[(i)].name)
@ -232,6 +232,7 @@ int load_char(const char *name, struct char_data *ch)
char filename[40];
char buf[128], buf2[128], line[MAX_INPUT_LENGTH + 1], tag[6];
char f1[128], f2[128], f3[128], f4[128];
bool loaded_stamina = FALSE;
trig_data *t = NULL;
trig_rnum t_rnum = NOTHING;
@ -284,8 +285,8 @@ int load_char(const char *name, struct char_data *ch)
GET_MAX_HIT(ch) = PFDEF_MAXHIT;
GET_MANA(ch) = PFDEF_MANA;
GET_MAX_MANA(ch) = PFDEF_MAXMANA;
GET_MOVE(ch) = PFDEF_MOVE;
GET_MAX_MOVE(ch) = PFDEF_MAXMOVE;
GET_STAMINA(ch) = PFDEF_STAMINA;
GET_MAX_STAMINA(ch) = PFDEF_MAXSTAMINA;
GET_OLC_ZONE(ch) = PFDEF_OLC;
GET_PAGE_LENGTH(ch) = PFDEF_PAGELENGTH;
GET_SCREEN_WIDTH(ch) = PFDEF_SCREENWIDTH;
@ -397,7 +398,7 @@ int load_char(const char *name, struct char_data *ch)
case 'M':
if (!strcmp(tag, "Mana")) load_HMVS(ch, line, LOAD_MANA);
else if (!strcmp(tag, "Move")) load_HMVS(ch, line, LOAD_MOVE);
else if (!strcmp(tag, "Move") && !loaded_stamina) load_HMVS(ch, line, LOAD_STAMINA);
break;
case 'N':
@ -444,6 +445,10 @@ int load_char(const char *name, struct char_data *ch)
val = SPECIES_UNDEFINED;
GET_SPECIES(ch) = val;
}
else if (!strcmp(tag, "Stam")) {
load_HMVS(ch, line, LOAD_STAMINA);
loaded_stamina = TRUE;
}
else if (!strcmp(tag, "Sex ")) GET_SEX(ch) = atoi(line);
else if (!strcmp(tag, "Sdsc")) {
/* Clear any existing sdesc to avoid leaks */
@ -677,7 +682,7 @@ void save_char(struct char_data * ch)
if (GET_HIT(ch) != PFDEF_HIT || GET_MAX_HIT(ch) != PFDEF_MAXHIT) fprintf(fl, "Hit : %d/%d\n", GET_HIT(ch), GET_MAX_HIT(ch));
if (GET_MANA(ch) != PFDEF_MANA || GET_MAX_MANA(ch) != PFDEF_MAXMANA) fprintf(fl, "Mana: %d/%d\n", GET_MANA(ch), GET_MAX_MANA(ch));
if (GET_MOVE(ch) != PFDEF_MOVE || GET_MAX_MOVE(ch) != PFDEF_MAXMOVE) fprintf(fl, "Move: %d/%d\n", GET_MOVE(ch), GET_MAX_MOVE(ch));
if (GET_STAMINA(ch) != PFDEF_STAMINA || GET_MAX_STAMINA(ch) != PFDEF_MAXSTAMINA) fprintf(fl, "Stam: %d/%d\n", GET_STAMINA(ch), GET_MAX_STAMINA(ch));
if (GET_STR(ch) != PFDEF_STR) fprintf(fl, "Str : %d\n", GET_STR(ch));
if (GET_INT(ch) != PFDEF_INT) fprintf(fl, "Int : %d\n", GET_INT(ch));
@ -954,9 +959,9 @@ static void load_HMVS(struct char_data *ch, const char *line, int mode)
GET_MAX_MANA(ch) = num2;
break;
case LOAD_MOVE:
GET_MOVE(ch) = num;
GET_MAX_MOVE(ch) = num2;
case LOAD_STAMINA:
GET_STAMINA(ch) = num;
GET_MAX_STAMINA(ch) = num2;
break;
case LOAD_STRENGTH:

View file

@ -104,7 +104,7 @@ static void prefedit_disp_main_menu(struct descriptor_data *d)
vict = PREFEDIT_GET_CHAR;
sprintf(prompt_string, "%s%s%s", PREFEDIT_FLAGGED(PRF_DISPHP) ? "H" : "", PREFEDIT_FLAGGED(PRF_DISPMANA) ? "M" : "",
PREFEDIT_FLAGGED(PRF_DISPMOVE) ? "V" : "" );
PREFEDIT_FLAGGED(PRF_DISPSTAMINA) ? "S" : "" );
sprintf(color_string, "%s", multi_types[(PREFEDIT_FLAGGED(PRF_COLOR_1) ? 1 : 0) + (PREFEDIT_FLAGGED(PRF_COLOR_2) ? 2 : 0)]);
@ -292,12 +292,12 @@ static void prefedit_disp_prompt_menu(struct descriptor_data *d)
sprintf(prompt_string, "<Auto>");
else
sprintf(prompt_string, "%s%s%s", PREFEDIT_FLAGGED(PRF_DISPHP) ? "H" : "", PREFEDIT_FLAGGED(PRF_DISPMANA) ? "M" : "",
PREFEDIT_FLAGGED(PRF_DISPMOVE) ? "V" : "");
PREFEDIT_FLAGGED(PRF_DISPSTAMINA) ? "S" : "");
send_to_char(d->character, "%sPrompt Settings\r\n"
"%s1%s) Toggle HP\r\n"
"%s2%s) Toggle Mana\r\n"
"%s3%s) Toggle Moves\r\n"
"%s3%s) Toggle Stamina\r\n"
"%s4%s) Toggle auto flag\r\n\r\n"
"%sCurrent Prompt: %s%s%s\r\n\r\n"
"%s0%s) Quit (to main menu)\r\n",
@ -730,10 +730,10 @@ void prefedit_parse(struct descriptor_data * d, char *arg)
}
else if (number == 3)
{
if (PREFEDIT_FLAGGED(PRF_DISPMOVE))
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_DISPMOVE);
if (PREFEDIT_FLAGGED(PRF_DISPSTAMINA))
REMOVE_BIT_AR(PREFEDIT_GET_FLAGS, PRF_DISPSTAMINA);
else
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_DISPMOVE);
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_DISPSTAMINA);
}
else if (number == 4)
{
@ -784,9 +784,9 @@ void prefedit_Restore_Defaults(struct descriptor_data *d)
if (!PREFEDIT_FLAGGED(PRF_DISPMANA))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_DISPMANA);
/* PRF_DISPMOVE - On */
if (!PREFEDIT_FLAGGED(PRF_DISPMOVE))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_DISPMOVE);
/* PRF_DISPSTAMINA - On */
if (!PREFEDIT_FLAGGED(PRF_DISPSTAMINA))
SET_BIT_AR(PREFEDIT_GET_FLAGS, PRF_DISPSTAMINA);
/* PRF_AUTOEXIT - On */
if (!PREFEDIT_FLAGGED(PRF_AUTOEXIT))

View file

@ -106,7 +106,7 @@ static const char s_Button5[] = "\005\002Inventory\002inventory\006";
static const char s_Gauge1[] = "\005\002Health\002red\002HEALTH\002HEALTH_MAX\006";
static const char s_Gauge2[] = "\005\002Mana\002blue\002MANA\002MANA_MAX\006";
static const char s_Gauge3[] = "\005\002Movement\002green\002MOVEMENT\002MOVEMENT_MAX\006";
static const char s_Gauge3[] = "\005\002Stamina\002green\002MOVEMENT\002MOVEMENT_MAX\006";
static const char s_Gauge4[] = "\005\002Exp TNL\002yellow\002EXPERIENCE\002EXPERIENCE_MAX\006";
static const char s_Gauge5[] = "\005\002Opponent\002darkred\002OPPONENT_HEALTH\002OPPONENT_HEALTH_MAX\006";

View file

@ -1,15 +1,10 @@
/**
* @file roomsave.c
* Numeric and string contants used by the MUD.
*
* An addition to the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
* Room file loading/saving and utility routines.
*
* This set of code was not originally part of the circlemud distribution.
*/
#include "conf.h"
#include "sysdep.h"

View file

@ -1,14 +1,10 @@
/**
* @file roomsave.h
* Core structures used within the core mud code.
*
* An addition to the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
* Room file loading/saving and utility headers.
*
* This set of code was not originally part of the circlemud distribution.
*/
#ifndef ROOMSAVE_H_
#define ROOMSAVE_H_

View file

@ -277,7 +277,7 @@
#define PRF_NOTELL 3 /**< Can't receive tells */
#define PRF_DISPHP 4 /**< Display hit points in prompt */
#define PRF_DISPMANA 5 /**< Display mana points in prompt */
#define PRF_DISPMOVE 6 /**< Display move points in prompt */
#define PRF_DISPSTAMINA 6 /**< Display stamina points in prompt */
#define PRF_AUTOEXIT 7 /**< Display exits in a room */
#define PRF_NOHASSLE 8 /**< Aggr mobs won't attack */
#define PRF_QUEST 9 /**< On quest */
@ -506,7 +506,7 @@
#define APPLY_CHAR_HEIGHT 11 /**< Apply to height */
#define APPLY_MANA 12 /**< Apply to max mana */
#define APPLY_HIT 13 /**< Apply to max hit points */
#define APPLY_MOVE 14 /**< Apply to max move points */
#define APPLY_STAMINA 14 /**< Apply to max stamina points */
#define APPLY_COINS 15 /**< Reserved */
#define APPLY_EXP 16 /**< Reserved */
#define APPLY_AC 17 /**< Apply to Armor Class */
@ -980,8 +980,8 @@ struct char_point_data
sh_int max_mana; /**< Max mana level */
sh_int hit; /**< Curent hit point, or health, level */
sh_int max_hit; /**< Max hit point, or health, level */
sh_int move; /**< Current move point, or stamina, level */
sh_int max_move; /**< Max move point, or stamina, level */
sh_int stamina; /**< Current stamina level */
sh_int max_stamina; /**< Max stamina level */
/** Current armor class. Internal use goes from -100 (totally armored) to
* 100 (totally naked). Externally expressed as -10 (totally armored) to

View file

@ -39,8 +39,8 @@ struct char_point_data_plrtoascii {
sh_int max_mana; /* Max mana for PC/NPC */
sh_int hit;
sh_int max_hit; /* Max hit for PC/NPC */
sh_int move;
sh_int max_move; /* Max move for PC/NPC */
sh_int stamina;
sh_int max_stamina; /* Max stamina for PC/NPC */
sh_int armor; /* Internal -100..100, external -10..10 AC */
int coins; /* Money carried */
@ -285,8 +285,8 @@ void convert(char *filename)
fprintf(outfile, "Hit : %d/%d\n", cpd->hit, cpd->max_hit);
if (cpd->mana != PFDEF_MANA || cpd->max_mana != PFDEF_MAXMANA)
fprintf(outfile, "Mana: %d/%d\n", cpd->mana, cpd->max_mana);
if (cpd->move != PFDEF_MOVE || cpd->max_move != PFDEF_MAXMOVE)
fprintf(outfile, "Move: %d/%d\n", cpd->move, cpd->max_move);
if (cpd->stamina != PFDEF_STAMINA || cpd->max_stamina != PFDEF_MAXSTAMINA)
fprintf(outfile, "Stam: %d/%d\n", cpd->stamina, cpd->max_stamina);
if (cpd->armor != PFDEF_AC)
fprintf(outfile, "Ac : %d\n", cpd->armor);
if (cpd->coins != PFDEF_COINS)

View file

@ -598,10 +598,10 @@ do \
#define GET_HIT(ch) ((ch)->points.hit)
/** Maximum hit points of ch. */
#define GET_MAX_HIT(ch) ((ch)->points.max_hit)
/** Current move points (stamina) of ch. */
#define GET_MOVE(ch) ((ch)->points.move)
/** Maximum move points (stamina) of ch. */
#define GET_MAX_MOVE(ch) ((ch)->points.max_move)
/** Current stamina points of ch. */
#define GET_STAMINA(ch) ((ch)->points.stamina)
/** Maximum stamina points of ch. */
#define GET_MAX_STAMINA(ch) ((ch)->points.max_stamina)
/** Current mana points (magic) of ch. */
#define GET_MANA(ch) ((ch)->points.mana)
/** Maximum mana points (magic) of ch. */