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
|
different feedback for reading a scroll of mail created by writing with marker
|
||||||
wizard mode #wizintrinsic
|
wizard mode #wizintrinsic
|
||||||
reading non-cursed scroll of enchant weapon uncurses welded tin opener
|
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
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
+12
-1
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1502,6 +1502,17 @@ int magic; /* 0=Physical, otherwise skill level */
|
|||||||
{
|
{
|
||||||
coord cc;
|
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))) {
|
if (!magic && (nolimbs(youmonst.data) || slithy(youmonst.data))) {
|
||||||
/* normally (nolimbs || slithy) implies !Jumping,
|
/* normally (nolimbs || slithy) implies !Jumping,
|
||||||
but that isn't necessarily the case for knights */
|
but that isn't necessarily the case for knights */
|
||||||
|
|||||||
Reference in New Issue
Block a user