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.
This commit is contained in:
PatR
2019-01-03 17:37:00 -08:00
parent b2ad4651f3
commit 600261d81f
5 changed files with 230 additions and 51 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.221 $ $NHDT-Date: 1546467443 2019/01/02 22:17:23 $
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.222 $ $NHDT-Date: 1546565812 2019/01/04 01:36:52 $
This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -322,6 +322,11 @@ since knives became stackable in 3.6.0, fake player monsters could be given
using 'O' to attempt to set bouldersym to a monster letter or warning digit
while it still had its default value would override the display value
for it to be <NUL> ('\0') after 'badoption' feedback
when ^T resorted to the teleport-away spell if hero didn't have intrinsic
telepotation, it used different hunger/strength/energy requirements
than casting with 'Z'; ^T also required that the corresponding book
be known even though knowing and casting a spell should be (and is
with 'Z') possible after forgetting the spellbook due to amnesia
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
@@ -493,6 +498,8 @@ when sortloot is enabled, gems are grouped in subsets (1) unseen gems and
(4) identified glass, (5) unseen stones (includes unseen rocks),
(6) seen but unidentified gray stones, (7) identified gray stones,
and (8) seen rocks (IDed/unIDed not applicable)
in wizard mode, ^T can be preceded by 'm' prefix in order to test teleporting
without having wizard mode override various restrictions
NetHack Community Patches (or Variation) Included