]> granicus.if.org Git - nethack/commit
fix github #172 - ^T inconsistencies; add m^T
authorPatR <rankin@nethack.org>
Fri, 4 Jan 2019 01:37:00 +0000 (17:37 -0800)
committerPatR <rankin@nethack.org>
Fri, 4 Jan 2019 01:37:00 +0000 (17:37 -0800)
commit600261d81f14bdc256373bc8a7c20a62414e6a4a
treee599788bbd21a0f8747b93adf09a40c765fca9e1
parentb2ad4651f34a29c29fa46fddb94eef1b775351e3
fix github #172 - ^T inconsistencies; add m^T

Fixes #172

Casting teleport-away via ^T used different requirements for energy,
strength, and hunger than casting it via 'Z'.  The strength and hunger
requirements were more stringent, the energy one more lenient.  When
it rejected a cast attempt due to any of those, it used up the move,
but 'Z' didn't.

When testing my fix, I wanted an easier way than a debugger to control
how ^T interacts with wizard mode, so finally got around to a first
cut at being able to invoke it via wizard mode but not override those
energy/strength/hunger requirements.  It uses the 'm' prefix to ask
for a menu.  'm^T' gives four options about how to teleport.  (There
are other permutations which aren't handled.)

Also noticed while testing:  ^T wouldn't attempt to cast teleport-away
if you didn't know the corresponding spellbook.  'Z' will attempt that
because it is possible to forget a book and still know its spell.
doc/fixes36.2
include/extern.h
src/cmd.c
src/spell.c
src/teleport.c