untrap downwards while over trap
Force trap to activate during failed untrap attempt if done while already at the trap's location, to match the recent change in behavior when failed attempt occurs while adjacent to the trap. Most noticeable while flying over bear traps, but affects all failed untrap attempts.
This commit is contained in:
@@ -333,6 +333,7 @@ typedef struct sortloot_item Loot;
|
|||||||
#define RECURSIVETRAP 0x08 /* trap changed into another type this same turn */
|
#define RECURSIVETRAP 0x08 /* trap changed into another type this same turn */
|
||||||
#define TOOKPLUNGE 0x10 /* used '>' to enter pit below you */
|
#define TOOKPLUNGE 0x10 /* used '>' to enter pit below you */
|
||||||
#define VIASITTING 0x20 /* #sit while at trap location (affects message) */
|
#define VIASITTING 0x20 /* #sit while at trap location (affects message) */
|
||||||
|
#define FAILEDUNTRAP 0x40 /* trap activated by failed untrap attempt */
|
||||||
|
|
||||||
/* Flags to control test_move in hack.c */
|
/* Flags to control test_move in hack.c */
|
||||||
#define DO_MOVE 0 /* really doing the move */
|
#define DO_MOVE 0 /* really doing the move */
|
||||||
|
|||||||
+1
-1
@@ -2058,7 +2058,7 @@ boolean pick;
|
|||||||
|
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
struct trap *trap = t_at(u.ux, u.uy);
|
struct trap *trap = t_at(u.ux, u.uy);
|
||||||
int trapflag = iflags.failing_untrap ? FORCETRAP : 0;
|
int trapflag = iflags.failing_untrap ? FAILEDUNTRAP : 0;
|
||||||
|
|
||||||
/* prevent recursion from affecting the hero all over again
|
/* prevent recursion from affecting the hero all over again
|
||||||
[hero poly'd to iron golem enters water here, drown() inflicts
|
[hero poly'd to iron golem enters water here, drown() inflicts
|
||||||
|
|||||||
+5
-3
@@ -894,7 +894,8 @@ unsigned trflags;
|
|||||||
register int ttype = trap->ttyp;
|
register int ttype = trap->ttyp;
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
boolean already_seen = trap->tseen,
|
boolean already_seen = trap->tseen,
|
||||||
forcetrap = (trflags & FORCETRAP) != 0,
|
forcetrap = ((trflags & FORCETRAP) != 0
|
||||||
|
|| (trflags & FAILEDUNTRAP) != 0),
|
||||||
webmsgok = (trflags & NOWEBMSG) == 0,
|
webmsgok = (trflags & NOWEBMSG) == 0,
|
||||||
forcebungle = (trflags & FORCEBUNGLE) != 0,
|
forcebungle = (trflags & FORCEBUNGLE) != 0,
|
||||||
plunged = (trflags & TOOKPLUNGE) != 0,
|
plunged = (trflags & TOOKPLUNGE) != 0,
|
||||||
@@ -3989,7 +3990,7 @@ struct trap *ttmp;
|
|||||||
there are objects covering this trap */
|
there are objects covering this trap */
|
||||||
ttmp->tseen = 0; /* hack for check_here() */
|
ttmp->tseen = 0; /* hack for check_here() */
|
||||||
/* trigger the trap */
|
/* trigger the trap */
|
||||||
iflags.failing_untrap++; /* spoteffects() -> dotrap(,FORCETRAP) */
|
iflags.failing_untrap++; /* spoteffects() -> dotrap(,FAILEDUNTRAP) */
|
||||||
spoteffects(TRUE); /* pickup() + dotrap() */
|
spoteffects(TRUE); /* pickup() + dotrap() */
|
||||||
iflags.failing_untrap--;
|
iflags.failing_untrap--;
|
||||||
/* this should no longer be necessary; before the failing_untrap
|
/* this should no longer be necessary; before the failing_untrap
|
||||||
@@ -4074,7 +4075,8 @@ boolean force_failure;
|
|||||||
pline("%s remains entangled.", Monnam(mtmp));
|
pline("%s remains entangled.", Monnam(mtmp));
|
||||||
}
|
}
|
||||||
} else if (under_u) {
|
} else if (under_u) {
|
||||||
dotrap(ttmp, 0);
|
/* [don't need the iflags.failing_untrap hack here] */
|
||||||
|
dotrap(ttmp, FAILEDUNTRAP);
|
||||||
} else {
|
} else {
|
||||||
move_into_trap(ttmp);
|
move_into_trap(ttmp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user