fix #7470 - Sting vs webs
When trapped in a web, trying to move while wielding Sting gives the message "Sting cuts through the web." In 3.6.1 and earler, that also released you from the trap, but with 3.6.2-beta nothing happens. It had nothing to do with the recent web spinning patch. My change to have being trapped block levitating and flying included replacing a lot of direct manipulations of u.utrap with set_utrap() and reset_utrap() in order to keep the lev/fly blocking and unblocking localized. Unfortunately, the old 'u.utrap = 0' when wielding Sting while stuck in web was deleted in error at that time.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 hack.c $NHDT-Date: 1518861490 2018/02/17 09:58:10 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.182 $ */
|
||||
/* NetHack 3.6 hack.c $NHDT-Date: 1540591769 2018/10/26 22:09:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.194 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1213,8 +1213,10 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
|
||||
break;
|
||||
case TT_WEB:
|
||||
if (uwep && uwep->oartifact == ART_STING) {
|
||||
/* escape trap but don't move and don't destroy it */
|
||||
u.utrap = 0; /* caller will call reset_utrap() */
|
||||
pline("Sting cuts through the web!");
|
||||
break; /* escape trap but don't move */
|
||||
break;
|
||||
}
|
||||
if (--u.utrap) {
|
||||
if (flags.verbose) {
|
||||
|
||||
Reference in New Issue
Block a user