Fixed new medit stats menu so that it uses the the Advanced/Standard cedit toggle

This commit is contained in:
JamDog
2009-02-25 15:11:36 +00:00
parent ac7b71c4ca
commit 2f47416576
2 changed files with 78 additions and 26 deletions

View File

@@ -35,6 +35,8 @@ export (QQ's a zone into a tarball)t
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist) Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
(lots of major bugfixes too) (lots of major bugfixes too)
tbaMUD 3.59 tbaMUD 3.59
[Feb 25 2009] - Jamdog
Fixed new medit stats menu so that it uses the the Advanced/Standard cedit toggle
[Feb 24 2009] - Jamdog [Feb 24 2009] - Jamdog
Bug-Fix: Fixed levels command, so it only shows immortal level if it's in the specified range Bug-Fix: Fixed levels command, so it only shows immortal level if it's in the specified range
Bug-Fix: write_mobile_espec now saves CON and CHA values for mobiles in world files Bug-Fix: write_mobile_espec now saves CON and CHA values for mobiles in world files

View File

@@ -467,6 +467,7 @@ static void medit_disp_stats_menu(struct descriptor_data *d)
cyn, nrm, cyn, yel, GET_GOLD(mob), cyn, nrm cyn, nrm, cyn, yel, GET_GOLD(mob), cyn, nrm
); );
if (CONFIG_MEDIT_ADVANCED) {
/* Bottom section - non-standard stats, togglable in cedit */ /* Bottom section - non-standard stats, togglable in cedit */
write_to_output(d, write_to_output(d,
"(%sF%s) Str: %s[%s%2d/%3d%s]%s Saving Throws\r\n" "(%sF%s) Str: %s[%s%2d/%3d%s]%s Saving Throws\r\n"
@@ -482,6 +483,7 @@ static void medit_disp_stats_menu(struct descriptor_data *d)
cyn, nrm, cyn, yel, GET_CON(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_BREATH), cyn, nrm, cyn, nrm, cyn, yel, GET_CON(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_BREATH), cyn, nrm,
cyn, nrm, cyn, yel, GET_CHA(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_SPELL), cyn, nrm cyn, nrm, cyn, yel, GET_CHA(mob), cyn, nrm, cyn, nrm, cyn, yel, GET_SAVE(mob, SAVING_SPELL), cyn, nrm
); );
}
/* Quit to previous menu option */ /* Quit to previous menu option */
write_to_output(d, "(%sQ%s) Quit to main menu\r\nEnter choice : ", cyn, nrm); write_to_output(d, "(%sQ%s) Quit to main menu\r\nEnter choice : ", cyn, nrm);
@@ -695,56 +697,100 @@ void medit_parse(struct descriptor_data *d, char *arg)
break; break;
case 'f': case 'f':
case 'F': case 'F':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_STR; OLC_MODE(d) = MEDIT_STR;
i++; i++;
break; break;
case 'g': case 'g':
case 'G': case 'G':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_INT; OLC_MODE(d) = MEDIT_INT;
i++; i++;
break; break;
case 'h': case 'h':
case 'H': case 'H':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_WIS; OLC_MODE(d) = MEDIT_WIS;
i++; i++;
break; break;
case 'i': case 'i':
case 'I': case 'I':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_DEX; OLC_MODE(d) = MEDIT_DEX;
i++; i++;
break; break;
case 'j': case 'j':
case 'J': case 'J':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_CON; OLC_MODE(d) = MEDIT_CON;
i++; i++;
break; break;
case 'k': case 'k':
case 'K': case 'K':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_CHA; OLC_MODE(d) = MEDIT_CHA;
i++; i++;
break; break;
case 'l': case 'l':
case 'L': case 'L':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_PARA; OLC_MODE(d) = MEDIT_PARA;
i++; i++;
break; break;
case 'm': case 'm':
case 'M': case 'M':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_ROD; OLC_MODE(d) = MEDIT_ROD;
i++; i++;
break; break;
case 'n': case 'n':
case 'N': case 'N':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_PETRI; OLC_MODE(d) = MEDIT_PETRI;
i++; i++;
break; break;
case 'o': case 'o':
case 'O': case 'O':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_BREATH; OLC_MODE(d) = MEDIT_BREATH;
i++; i++;
break; break;
case 'p': case 'p':
case 'P': case 'P':
if (!CONFIG_MEDIT_ADVANCED) {
write_to_output(d, "Invalid Choice!\r\nEnter Choice : ");
return;
}
OLC_MODE(d) = MEDIT_SPELL; OLC_MODE(d) = MEDIT_SPELL;
i++; i++;
break; break;
@@ -1049,6 +1095,8 @@ void medit_autoroll_stats(struct descriptor_data *d)
GET_GOLD(OLC_MOB(d)) = (mob_lev*10); GET_GOLD(OLC_MOB(d)) = (mob_lev*10);
GET_AC(OLC_MOB(d)) = (100-(mob_lev*6)); /* AC 94 to -80 */ GET_AC(OLC_MOB(d)) = (100-(mob_lev*6)); /* AC 94 to -80 */
/* 'Advanced' stats are only rolled if advanced options are enabled */
if (CONFIG_MEDIT_ADVANCED) {
GET_STR(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18); /* 2/3 level in range 11 to 18 */ GET_STR(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18); /* 2/3 level in range 11 to 18 */
GET_INT(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18); GET_INT(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18);
GET_WIS(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18); GET_WIS(OLC_MOB(d)) = LIMIT((mob_lev*2)/3, 11, 18);
@@ -1062,3 +1110,5 @@ void medit_autoroll_stats(struct descriptor_data *d)
GET_SAVE(OLC_MOB(d), SAVING_BREATH) = mob_lev / 4; GET_SAVE(OLC_MOB(d), SAVING_BREATH) = mob_lev / 4;
GET_SAVE(OLC_MOB(d), SAVING_SPELL) = mob_lev / 4; GET_SAVE(OLC_MOB(d), SAVING_SPELL) = mob_lev / 4;
} }
}