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:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1546038393 2018/12/28 23:06:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.323 $ */
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1546565813 2019/01/04 01:36:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.324 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -4408,8 +4408,8 @@ int NDECL((*cmd_func));
|
||||
|| cmd_func == doloot
|
||||
/* travel: pop up a menu of interesting targets in view */
|
||||
|| cmd_func == dotravel
|
||||
/* wizard mode ^V */
|
||||
|| cmd_func == wiz_level_tele
|
||||
/* wizard mode ^V and ^T */
|
||||
|| cmd_func == wiz_level_tele || cmd_func == dotelecmd
|
||||
/* 'm' prefix allowed for some extended commands */
|
||||
|| cmd_func == doextcmd || cmd_func == doextlist)
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user