mirror of
https://github.com/tbamud/tbamud.git
synced 2026-03-21 19:56:33 +01:00
Remove str_add since we are using 5e-like stats
This commit is contained in:
parent
d0708b4472
commit
0e44eaf319
14 changed files with 25 additions and 85 deletions
|
|
@ -1216,9 +1216,9 @@ static void do_stat_character(struct char_data *ch, struct char_data *k)
|
|||
}
|
||||
send_to_char(ch, "\r\n");
|
||||
}
|
||||
send_to_char(ch, "Str: [%s%d/%d%s] Int: [%s%d%s] Wis: [%s%d%s] "
|
||||
send_to_char(ch, "Str: [%s%d%s] Int: [%s%d%s] Wis: [%s%d%s] "
|
||||
"Dex: [%s%d%s] Con: [%s%d%s] Cha: [%s%d%s]\r\n",
|
||||
CCCYN(ch, C_NRM), GET_STR(k), GET_ADD(k), CCNRM(ch, C_NRM),
|
||||
CCCYN(ch, C_NRM), GET_STR(k), CCNRM(ch, C_NRM),
|
||||
CCCYN(ch, C_NRM), GET_INT(k), CCNRM(ch, C_NRM),
|
||||
CCCYN(ch, C_NRM), GET_WIS(k), CCNRM(ch, C_NRM),
|
||||
CCCYN(ch, C_NRM), GET_DEX(k), CCNRM(ch, C_NRM),
|
||||
|
|
@ -2021,7 +2021,6 @@ ACMD(do_restore)
|
|||
SET_SKILL(vict, i, 100);
|
||||
|
||||
if (GET_LEVEL(vict) >= LVL_GRGOD) {
|
||||
vict->real_abils.str_add = 100;
|
||||
vict->real_abils.intel = 25;
|
||||
vict->real_abils.wis = 25;
|
||||
vict->real_abils.dex = 25;
|
||||
|
|
@ -2755,8 +2754,8 @@ ACMD(do_wizutil)
|
|||
send_to_char(ch, "Rerolled...\r\n");
|
||||
roll_real_abils(vict);
|
||||
log("(GC) %s has rerolled %s.", GET_NAME(ch), GET_NAME(vict));
|
||||
send_to_char(ch, "New stats: Str %d/%d, Int %d, Wis %d, Dex %d, Con %d, Cha %d\r\n",
|
||||
GET_STR(vict), GET_ADD(vict), GET_INT(vict), GET_WIS(vict),
|
||||
send_to_char(ch, "New stats: Str %d, Int %d, Wis %d, Dex %d, Con %d, Cha %d\r\n",
|
||||
GET_STR(vict), GET_INT(vict), GET_WIS(vict),
|
||||
GET_DEX(vict), GET_CON(vict), GET_CHA(vict));
|
||||
break;
|
||||
case SCMD_PARDON:
|
||||
|
|
@ -3283,14 +3282,13 @@ static struct set_struct {
|
|||
{ "siteok", LVL_GOD, PC, BINARY },
|
||||
{ "skill", LVL_GOD, BOTH, NUMBER },
|
||||
{ "str", LVL_BUILDER, BOTH, NUMBER },
|
||||
{ "stradd", LVL_BUILDER, BOTH, NUMBER },
|
||||
{ "thief", LVL_GOD, PC, BINARY }, /* 50 */
|
||||
{ "thirst", LVL_BUILDER, BOTH, MISC },
|
||||
{ "thief", LVL_GOD, PC, BINARY },
|
||||
{ "thirst", LVL_BUILDER, BOTH, MISC }, /* 50 */
|
||||
{ "title", LVL_GOD, PC, MISC },
|
||||
{ "variable", LVL_GRGOD, PC, MISC },
|
||||
{ "weight", LVL_BUILDER, BOTH, NUMBER },
|
||||
{ "wis", LVL_BUILDER, BOTH, NUMBER }, /* 55 */
|
||||
{ "questpoints", LVL_GOD, PC, NUMBER },
|
||||
{ "wis", LVL_BUILDER, BOTH, NUMBER },
|
||||
{ "questpoints", LVL_GOD, PC, NUMBER }, /* 55 */
|
||||
{ "questhistory", LVL_GOD, PC, NUMBER },
|
||||
{ "\n", 0, BOTH, MISC }
|
||||
};
|
||||
|
|
@ -3715,19 +3713,12 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
|
|||
else
|
||||
RANGE(3, 18);
|
||||
vict->real_abils.str = value;
|
||||
vict->real_abils.str_add = 0;
|
||||
affect_total(vict);
|
||||
break;
|
||||
case 47: /* stradd */
|
||||
vict->real_abils.str_add = RANGE(0, 100);
|
||||
if (value > 0)
|
||||
vict->real_abils.str = 18;
|
||||
affect_total(vict);
|
||||
break;
|
||||
case 48: /* thief */
|
||||
case 47: /* thief */
|
||||
SET_OR_REMOVE(PLR_FLAGS(vict), PLR_THIEF);
|
||||
break;
|
||||
case 49: /* thirst */
|
||||
case 48: /* thirst */
|
||||
if (!str_cmp(val_arg, "off")) {
|
||||
GET_COND(vict, THIRST) = -1;
|
||||
send_to_char(ch, "%s's thirst is now off.\r\n", GET_NAME(vict));
|
||||
|
|
@ -3741,17 +3732,17 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
|
|||
return (0);
|
||||
}
|
||||
break;
|
||||
case 50: /* title */
|
||||
case 49: /* title */
|
||||
set_title(vict, val_arg);
|
||||
send_to_char(ch, "%s's title is now: %s\r\n", GET_NAME(vict), GET_TITLE(vict));
|
||||
break;
|
||||
case 51: /* variable */
|
||||
case 50: /* variable */
|
||||
return perform_set_dg_var(ch, vict, val_arg);
|
||||
case 52: /* weight */
|
||||
case 51: /* weight */
|
||||
GET_WEIGHT(vict) = value;
|
||||
affect_total(vict);
|
||||
break;
|
||||
case 53: /* wis */
|
||||
case 52: /* wis */
|
||||
if (IS_NPC(vict) || GET_LEVEL(vict) >= LVL_GRGOD)
|
||||
RANGE(3, 25);
|
||||
else
|
||||
|
|
@ -3759,10 +3750,10 @@ static int perform_set(struct char_data *ch, struct char_data *vict, int mode, c
|
|||
vict->real_abils.wis = value;
|
||||
affect_total(vict);
|
||||
break;
|
||||
case 54: /* questpoints */
|
||||
case 53: /* questpoints */
|
||||
GET_QUESTPOINTS(vict) = RANGE(0, 100000000);
|
||||
break;
|
||||
case 55: /* questhistory */
|
||||
case 54: /* questhistory */
|
||||
qvnum = atoi(val_arg);
|
||||
if (real_quest(qvnum) == NOTHING) {
|
||||
send_to_char(ch, "That quest doesn't exist.\r\n");
|
||||
|
|
|
|||
|
|
@ -200,8 +200,6 @@ void roll_real_abils(struct char_data *ch)
|
|||
}
|
||||
}
|
||||
|
||||
ch->real_abils.str_add = 0;
|
||||
|
||||
switch (GET_CLASS(ch)) {
|
||||
case CLASS_SORCEROR:
|
||||
ch->real_abils.intel = table[0];
|
||||
|
|
@ -234,9 +232,6 @@ void roll_real_abils(struct char_data *ch)
|
|||
ch->real_abils.wis = table[3];
|
||||
ch->real_abils.intel = table[4];
|
||||
ch->real_abils.cha = table[5];
|
||||
if (ch->real_abils.str == 18)
|
||||
ch->real_abils.str_add = rand_number(0, 100);
|
||||
break;
|
||||
case CLASS_BARBARIAN:
|
||||
ch->real_abils.dex = table[0];
|
||||
ch->real_abils.str = table[1];
|
||||
|
|
|
|||
6
src/db.c
6
src/db.c
|
|
@ -1628,11 +1628,6 @@ static void interpret_espec(const char *keyword, const char *value, int i, int n
|
|||
mob_proto[i].real_abils.str = num_arg;
|
||||
}
|
||||
|
||||
CASE("StrAdd") {
|
||||
RANGE(0, 100);
|
||||
mob_proto[i].real_abils.str_add = num_arg;
|
||||
}
|
||||
|
||||
CASE("Int") {
|
||||
RANGE(3, 25);
|
||||
mob_proto[i].real_abils.intel = num_arg;
|
||||
|
|
@ -3689,7 +3684,6 @@ void init_char(struct char_data *ch)
|
|||
ch->real_abils.wis = 25;
|
||||
ch->real_abils.dex = 25;
|
||||
ch->real_abils.str = 25;
|
||||
ch->real_abils.str_add = 100;
|
||||
ch->real_abils.con = 25;
|
||||
ch->real_abils.cha = 25;
|
||||
|
||||
|
|
|
|||
|
|
@ -1032,18 +1032,6 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
}
|
||||
snprintf(str, slen, "%d", GET_STR(c));
|
||||
}
|
||||
else if (!str_cmp(field, "stradd")) {
|
||||
if (GET_STR(c) >= 18) {
|
||||
if (subfield && *subfield) {
|
||||
int addition = atoi(subfield);
|
||||
c->real_abils.str_add += addition;
|
||||
if (c->real_abils.str_add > 100) c->real_abils.str_add = 100;
|
||||
if (c->real_abils.str_add < 0) c->real_abils.str_add = 0;
|
||||
affect_total(c);
|
||||
}
|
||||
snprintf(str, slen, "%d", GET_ADD(c));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
if (!str_cmp(field, "thirst")) {
|
||||
|
|
|
|||
|
|
@ -331,8 +331,6 @@ int write_mobile_espec(mob_vnum mvnum, struct char_data *mob, FILE *fd)
|
|||
fprintf(fd, "BareHandAttack: %d\n", GET_ATTACK(mob));
|
||||
if (GET_STR(mob) != 11)
|
||||
fprintf(fd, "Str: %d\n", GET_STR(mob));
|
||||
if (GET_ADD(mob) != 0)
|
||||
fprintf(fd, "StrAdd: %d\n", GET_ADD(mob));
|
||||
if (GET_DEX(mob) != 11)
|
||||
fprintf(fd, "Dex: %d\n", GET_DEX(mob));
|
||||
if (GET_INT(mob) != 11)
|
||||
|
|
|
|||
|
|
@ -231,13 +231,7 @@ void affect_total(struct char_data *ch)
|
|||
|
||||
if (IS_NPC(ch) || GET_LEVEL(ch) >= LVL_GRGOD) {
|
||||
GET_STR(ch) = MIN(GET_STR(ch), i);
|
||||
} else {
|
||||
if (GET_STR(ch) > 18) {
|
||||
i = GET_ADD(ch) + ((GET_STR(ch) - 18) * 10);
|
||||
GET_ADD(ch) = MIN(i, 100);
|
||||
GET_STR(ch) = 18;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Insert an affect_type in a char_data structure. Automatically sets
|
||||
|
|
|
|||
|
|
@ -492,8 +492,6 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
|
|||
break;
|
||||
|
||||
case SPELL_STRENGTH:
|
||||
if (GET_ADD(victim) == 100)
|
||||
return;
|
||||
|
||||
af[0].location = APPLY_STR;
|
||||
af[0].duration = (GET_LEVEL(ch) / 2) + 4;
|
||||
|
|
|
|||
|
|
@ -490,14 +490,14 @@ static void medit_disp_stats_menu(struct descriptor_data *d)
|
|||
/* Bottom section - non-standard stats, togglable in cedit */
|
||||
write_to_output(d,
|
||||
" %sAttributes%s %sSaving Throws%s\r\n"
|
||||
"(%sF%s) Str: %s[%s%2d/%3d%s]%s (%sR%s) Save STR %s[%s%3d%s]%s\r\n"
|
||||
"(%sF%s) Str: %s[%s%2d%s]%s (%sR%s) Save STR %s[%s%3d%s]%s\r\n"
|
||||
"(%sG%s) Int: %s[%s%3d%s]%s (%sS%s) Save DEX %s[%s%3d%s]%s\r\n"
|
||||
"(%sH%s) Wis: %s[%s%3d%s]%s (%sT%s) Save CON %s[%s%3d%s]%s\r\n"
|
||||
"(%sI%s) Dex: %s[%s%3d%s]%s (%sU%s) Save INT %s[%s%3d%s]%s\r\n"
|
||||
"(%sJ%s) Con: %s[%s%3d%s]%s (%sV%s) Save WIS %s[%s%3d%s]%s\r\n"
|
||||
"(%sK%s) Cha: %s[%s%3d%s]%s (%sW%s) Save CHA %s[%s%3d%s]%s\r\n\r\n",
|
||||
nrm, cyn, nrm, cyn,
|
||||
cyn, nrm, cyn, yel, GET_STR(mob), GET_ADD(mob), cyn, nrm,
|
||||
cyn, nrm, cyn, yel, GET_STR(mob), cyn, nrm,
|
||||
cyn, nrm, cyn, yel, GET_SAVE(mob, ABIL_STR), cyn, nrm,
|
||||
|
||||
cyn, nrm, cyn, yel, GET_INT(mob), cyn, nrm,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
#define PFDEF_EXP 0
|
||||
#define PFDEF_AC 0
|
||||
#define PFDEF_STR 0
|
||||
#define PFDEF_STRADD 0
|
||||
#define PFDEF_DEX 0
|
||||
#define PFDEF_INT 0
|
||||
#define PFDEF_WIS 0
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ int load_char(const char *name, struct char_data *ch)
|
|||
GET_EXP(ch) = PFDEF_EXP;
|
||||
GET_AC(ch) = PFDEF_AC;
|
||||
ch->real_abils.str = PFDEF_STR;
|
||||
ch->real_abils.str_add = PFDEF_STRADD;
|
||||
ch->real_abils.dex = PFDEF_DEX;
|
||||
ch->real_abils.intel = PFDEF_INT;
|
||||
ch->real_abils.wis = PFDEF_WIS;
|
||||
|
|
@ -634,9 +633,7 @@ void save_char(struct char_data * 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_STR(ch) != PFDEF_STR || GET_ADD(ch) != PFDEF_STRADD) fprintf(fl, "Str : %d/%d\n", GET_STR(ch), GET_ADD(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));
|
||||
if (GET_WIS(ch) != PFDEF_WIS) fprintf(fl, "Wis : %d\n", GET_WIS(ch));
|
||||
if (GET_DEX(ch) != PFDEF_DEX) fprintf(fl, "Dex : %d\n", GET_DEX(ch));
|
||||
|
|
@ -913,7 +910,6 @@ static void load_HMVS(struct char_data *ch, const char *line, int mode)
|
|||
|
||||
case LOAD_STRENGTH:
|
||||
ch->real_abils.str = num;
|
||||
ch->real_abils.str_add = num2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -373,9 +373,9 @@ ASPELL(spell_identify)
|
|||
send_to_char(ch, "Height %d cm, Weight %d pounds\r\n", GET_HEIGHT(victim), GET_WEIGHT(victim));
|
||||
send_to_char(ch, "Level: %d, Hits: %d, Mana: %d\r\n", GET_LEVEL(victim), GET_HIT(victim), GET_MANA(victim));
|
||||
send_to_char(ch, "AC: %d\r\n", compute_armor_class(victim));
|
||||
send_to_char(ch, "Str: %d/%d, Int: %d, Wis: %d, Dex: %d, Con: %d, Cha: %d\r\n",
|
||||
GET_STR(victim), GET_ADD(victim), GET_INT(victim),
|
||||
GET_WIS(victim), GET_DEX(victim), GET_CON(victim), GET_CHA(victim));
|
||||
send_to_char(ch, "Str: %d, Int: %d, Wis: %d, Dex: %d, Con: %d, Cha: %d\r\n",
|
||||
GET_STR(victim), GET_INT(victim), GET_WIS(victim),
|
||||
GET_DEX(victim), GET_CON(victim), GET_CHA(victim));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -894,7 +894,6 @@ struct char_player_data
|
|||
struct char_ability_data
|
||||
{
|
||||
sbyte str; /**< Strength. */
|
||||
sbyte str_add; /**< Strength multiplier if str = 18. Usually from 0 to 100 */
|
||||
sbyte intel; /**< Intelligence */
|
||||
sbyte wis; /**< Wisdom */
|
||||
sbyte dex; /**< Dexterity */
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
/* Char's abilities. Used in char_file_u *DO*NOT*CHANGE* */
|
||||
struct char_ability_data_plrtoascii {
|
||||
sbyte str;
|
||||
sbyte str_add; /* 000 - 100 if strength 18 */
|
||||
sbyte intel;
|
||||
sbyte wis;
|
||||
sbyte dex;
|
||||
|
|
@ -272,8 +271,8 @@ void convert(char *filename)
|
|||
|
||||
/* char_ability_data */
|
||||
cad = &(player.abilities);
|
||||
if (cad->str != PFDEF_STR || cad->str_add != PFDEF_STRADD)
|
||||
fprintf(outfile, "Str : %d/%d\n", cad->str, cad->str_add);
|
||||
if (cad->str != PFDEF_STR)
|
||||
fprintf(outfile, "Str : %d/\n", cad->str);
|
||||
if (cad->intel != PFDEF_INT)
|
||||
fprintf(outfile, "Int : %d\n", cad->intel);
|
||||
if (cad->wis != PFDEF_WIS)
|
||||
|
|
|
|||
11
src/utils.h
11
src/utils.h
|
|
@ -537,8 +537,6 @@ do \
|
|||
|
||||
/** Current strength of ch. */
|
||||
#define GET_STR(ch) ((ch)->aff_abils.str)
|
||||
/** Current strength modifer of ch. */
|
||||
#define GET_ADD(ch) ((ch)->aff_abils.str_add)
|
||||
/** Current dexterity of ch. */
|
||||
#define GET_DEX(ch) ((ch)->aff_abils.dex)
|
||||
/** Current intelligence of ch. */
|
||||
|
|
@ -688,15 +686,6 @@ do \
|
|||
/** Return the memory of ch. */
|
||||
#define MEMORY(ch) ((ch)->mob_specials.memory)
|
||||
|
||||
/** Return the equivalent strength of ch if ch has level 18 strength. */
|
||||
#define STRENGTH_APPLY_INDEX(ch) \
|
||||
( ((GET_ADD(ch) ==0) || (GET_STR(ch) != 18)) ? GET_STR(ch) :\
|
||||
(GET_ADD(ch) <= 50) ? 26 :( \
|
||||
(GET_ADD(ch) <= 75) ? 27 :( \
|
||||
(GET_ADD(ch) <= 90) ? 28 :( \
|
||||
(GET_ADD(ch) <= 99) ? 29 : 30 ) ) ) \
|
||||
)
|
||||
|
||||
/** Return how much weight ch can carry (5e rule: Str × 15 lb). */
|
||||
#define CAN_CARRY_W(ch) (GET_STR(ch) * 15)
|
||||
/** Return how many items ch can carry (5e has no item count, so base it on Strength too).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue