have #jump cast "jumping"
Requested during beta testing: if hero can't jump, have #jump command attempt to cast the jumping spell. This is similar to how #unturn and ^T cast spells when used while lacking the innate ability.
This commit is contained in:
@@ -69,6 +69,8 @@ naming Sting or Orcrist now breaks illiterate conduct
|
||||
different feedback for reading a scroll of mail created by writing with marker
|
||||
wizard mode #wizintrinsic
|
||||
reading non-cursed scroll of enchant weapon uncurses welded tin opener
|
||||
if hero has no jumping ability but knows the jumping spell, the #jump command
|
||||
will attempt to cast the spell
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
13
src/apply.c
13
src/apply.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 apply.c $NHDT-Date: 1450573880 2015/12/20 01:11:20 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.216 $ */
|
||||
/* NetHack 3.6 apply.c $NHDT-Date: 1450582748 2015/12/20 03:39:08 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.217 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1502,6 +1502,17 @@ int magic; /* 0=Physical, otherwise skill level */
|
||||
{
|
||||
coord cc;
|
||||
|
||||
/* attempt "jumping" spell if hero has no innate jumping ability */
|
||||
if (!magic && !Jumping) {
|
||||
int sp_no;
|
||||
|
||||
for (sp_no = 0; sp_no < MAXSPELL; ++sp_no)
|
||||
if (spl_book[sp_no].sp_id == NO_SPELL)
|
||||
break;
|
||||
else if (spl_book[sp_no].sp_id == SPE_JUMPING)
|
||||
return spelleffects(sp_no, FALSE);
|
||||
}
|
||||
|
||||
if (!magic && (nolimbs(youmonst.data) || slithy(youmonst.data))) {
|
||||
/* normally (nolimbs || slithy) implies !Jumping,
|
||||
but that isn't necessarily the case for knights */
|
||||
|
||||
Reference in New Issue
Block a user