From 1ada454fbe4bd9c799a0d505d825953dc0d1db9a Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 29 Jul 2021 10:25:18 -0700 Subject: [PATCH] wizard mode ^T Noticed while testing the stair labeling, knowing the teleport away spell (and without innate teleport ability--not sure whether that's a factor), using ^T always attempted to cast the spell, even if you used m^T to explicitly request wizard mode telport on demand. Since my samurai had no chance to cast such a high level spell, I couldn't use ^T any more. With a different character, I ended up with 15(2) energy after a ^T attempt failed. I've put in a fix for this but after the other one I don't think it matters. --- doc/fixes37.0 | 2 ++ src/teleport.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index b40f69fb0..c84c3a7b5 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -578,6 +578,8 @@ monsters that drowned would never leave a corpse (holdover from decades ago give alternate message if hero is blind when throne gives "your vision clears" monster wearing an alchemy smock was only getting poison resistance from it, not acid resistance; give both properties, just like for hero +in wizard mode, knowing teleport away spell resulted in ^T always attempting + the spell instead of teleporting on demand Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/teleport.c b/src/teleport.c index f79ddd147..27e94290f 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -697,7 +697,7 @@ dotele( } else trap = 0; } - if (!trap) { + if (!trap && !break_the_rules) { boolean castit = FALSE; register int sp_no = 0, energy = 0; @@ -737,7 +737,7 @@ dotele( the extra energy is spent even if that results in not having enough to cast (which also uses the move) */ else if (u.uen < energy) - u.uen = energy; + energy = u.uen; } else if (u.uhunger <= 10) { cantdoit = "are too weak from hunger"; } else if (ACURR(A_STR) < 4) {