don't impact player stats with wizard mode ^T

This commit is contained in:
nhmall
2018-09-25 23:08:09 -04:00
parent 64ebb9ceba
commit 039ad51660
6 changed files with 25 additions and 13 deletions
+2
View File
@@ -146,6 +146,8 @@ poly'd hero and monsters could eat through iron bars in areas where walls
were flagged as non-diggable were flagged as non-diggable
Samurai seeing items at a distance could have them be described by their Samurai seeing items at a distance could have them be described by their
ordinary names rather than by their Japanese names ordinary names rather than by their Japanese names
wizard mode ^T shouldn't have been diminishing player power but it was
and hilite_status:power settings really drew attention to that
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
+2 -1
View File
@@ -2359,7 +2359,8 @@ E boolean FDECL(safe_teleds, (BOOLEAN_P));
E boolean FDECL(teleport_pet, (struct monst *, BOOLEAN_P)); E boolean FDECL(teleport_pet, (struct monst *, BOOLEAN_P));
E void NDECL(tele); E void NDECL(tele);
E boolean FDECL(scrolltele, (struct obj *)); E boolean FDECL(scrolltele, (struct obj *));
E int NDECL(dotele); E int NDECL(dotelecmd);
E int FDECL(dotele, (BOOLEAN_P));
E void NDECL(level_tele); E void NDECL(level_tele);
E void FDECL(domagicportal, (struct trap *)); E void FDECL(domagicportal, (struct trap *));
E void FDECL(tele_trap, (struct trap *)); E void FDECL(tele_trap, (struct trap *));
+2 -2
View File
@@ -116,7 +116,7 @@ extern int NDECL(dosit); /**/
extern int NDECL(dotalk); /**/ extern int NDECL(dotalk); /**/
extern int NDECL(docast); /**/ extern int NDECL(docast); /**/
extern int NDECL(dovspell); /**/ extern int NDECL(dovspell); /**/
extern int NDECL(dotele); /**/ extern int NDECL(dotelecmd); /**/
extern int NDECL(dountrap); /**/ extern int NDECL(dountrap); /**/
extern int NDECL(doversion); /**/ extern int NDECL(doversion); /**/
extern int NDECL(doextversion); /**/ extern int NDECL(doextversion); /**/
@@ -3133,7 +3133,7 @@ struct ext_func_tab extcmdlist[] = {
{ 'x', "swap", "swap wielded and secondary weapons", doswapweapon }, { 'x', "swap", "swap wielded and secondary weapons", doswapweapon },
{ 'T', "takeoff", "take off one piece of armor", dotakeoff }, { 'T', "takeoff", "take off one piece of armor", dotakeoff },
{ 'A', "takeoffall", "remove all armor", doddoremarm }, { 'A', "takeoffall", "remove all armor", doddoremarm },
{ C('t'), "teleport", "teleport around the level", dotele, IFBURIED }, { C('t'), "teleport", "teleport around the level", dotelecmd, IFBURIED },
{ '\0', "terrain", "show map without obstructions", { '\0', "terrain", "show map without obstructions",
doterrain, IFBURIED | AUTOCOMPLETE }, doterrain, IFBURIED | AUTOCOMPLETE },
{ '\0', "therecmdmenu", { '\0', "therecmdmenu",
+1 -1
View File
@@ -2086,7 +2086,7 @@ escape_tomb()
if ((Teleportation || can_teleport(youmonst.data)) if ((Teleportation || can_teleport(youmonst.data))
&& (Teleport_control || rn2(3) < Luck+2)) { && (Teleport_control || rn2(3) < Luck+2)) {
You("attempt a teleport spell."); You("attempt a teleport spell.");
(void) dotele(); /* calls unearth_you() */ (void) dotele(FALSE); /* calls unearth_you() */
} else if (u.uburied) { /* still buried after 'port attempt */ } else if (u.uburied) { /* still buried after 'port attempt */
boolean good; boolean good;
+16 -7
View File
@@ -492,7 +492,14 @@ struct obj *scroll;
} }
int int
dotele() dotelecmd()
{
return dotele((wizard) ? TRUE : FALSE);
}
int
dotele(break_the_rules)
boolean break_the_rules;
{ {
struct trap *trap; struct trap *trap;
boolean trap_once = FALSE; boolean trap_once = FALSE;
@@ -529,7 +536,7 @@ dotele()
castit = TRUE; castit = TRUE;
break; break;
} }
if (!wizard) { if (!break_the_rules) {
if (!castit) { if (!castit) {
if (!Teleportation) if (!Teleportation)
You("don't know that spell."); You("don't know that spell.");
@@ -541,7 +548,7 @@ dotele()
} }
if (u.uhunger <= 100 || ACURR(A_STR) < 6) { if (u.uhunger <= 100 || ACURR(A_STR) < 6) {
if (!wizard) { if (!break_the_rules) {
You("lack the strength %s.", You("lack the strength %s.",
castit ? "for a teleport spell" : "to teleport"); castit ? "for a teleport spell" : "to teleport");
return 1; return 1;
@@ -550,7 +557,7 @@ dotele()
energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2; energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2;
if (u.uen <= energy) { if (u.uen <= energy) {
if (wizard) if (break_the_rules)
energy = u.uen; energy = u.uen;
else { else {
You("lack the energy %s.", You("lack the energy %s.",
@@ -567,11 +574,13 @@ dotele()
exercise(A_WIS, TRUE); exercise(A_WIS, TRUE);
if (spelleffects(sp_no, TRUE)) if (spelleffects(sp_no, TRUE))
return 1; return 1;
else if (!wizard) else if (!break_the_rules)
return 0; return 0;
} else { } else {
u.uen -= energy; if (!break_the_rules) {
context.botl = 1; u.uen -= energy;
context.botl = 1;
}
} }
} }
+1 -1
View File
@@ -3693,7 +3693,7 @@ drown()
&& (Teleport_control || rn2(3) < Luck + 2)) { && (Teleport_control || rn2(3) < Luck + 2)) {
You("attempt a teleport spell."); /* utcsri!carroll */ You("attempt a teleport spell."); /* utcsri!carroll */
if (!level.flags.noteleport) { if (!level.flags.noteleport) {
(void) dotele(); (void) dotele(FALSE);
if (!is_pool(u.ux, u.uy)) if (!is_pool(u.ux, u.uy))
return TRUE; return TRUE;
} else } else