Get rid of force_mintrap, allow passing flags to mintrap
It uses the same flags as dotrap, so simulate force_mintrap by passing FORCETRAP flag.
This commit is contained in:
@@ -1203,8 +1203,6 @@ struct instance_globals {
|
||||
winid toptenwin;
|
||||
|
||||
/* trap.c */
|
||||
int force_mintrap; /* mintrap() should take a flags argument, but for time
|
||||
being we use this */
|
||||
/* context for water_damage(), managed by water_damage_chain();
|
||||
when more than one stack of potions of acid explode while processing
|
||||
a chain of objects, use alternate phrasing after the first message */
|
||||
|
||||
@@ -2692,7 +2692,7 @@ extern void reset_utrap(boolean);
|
||||
extern void dotrap(struct trap *, unsigned);
|
||||
extern void seetrap(struct trap *);
|
||||
extern void feeltrap(struct trap *);
|
||||
extern int mintrap(struct monst *);
|
||||
extern int mintrap(struct monst *, long);
|
||||
extern void instapetrify(const char *);
|
||||
extern void minstapetrify(struct monst *, boolean);
|
||||
extern void selftouch(const char *);
|
||||
|
||||
@@ -381,14 +381,15 @@ typedef struct sortloot_item Loot;
|
||||
#define PICK_RANDOM 0
|
||||
#define PICK_RIGID 1
|
||||
|
||||
/* Flags to control dotrap() in trap.c */
|
||||
#define FORCETRAP 0x01 /* triggering not left to chance */
|
||||
#define NOWEBMSG 0x02 /* suppress stumble into web message */
|
||||
#define FORCEBUNGLE 0x04 /* adjustments appropriate for bungling */
|
||||
/* Flags to control dotrap() and mintrap() in trap.c */
|
||||
#define NO_TRAP_FLAGS 0
|
||||
#define FORCETRAP 0x01 /* triggering not left to chance */
|
||||
#define NOWEBMSG 0x02 /* suppress stumble into web message */
|
||||
#define FORCEBUNGLE 0x04 /* adjustments appropriate for bungling */
|
||||
#define RECURSIVETRAP 0x08 /* trap changed into another type this same turn */
|
||||
#define TOOKPLUNGE 0x10 /* used '>' to enter pit below you */
|
||||
#define VIASITTING 0x20 /* #sit while at trap location (affects message) */
|
||||
#define FAILEDUNTRAP 0x40 /* trap activated by failed untrap attempt */
|
||||
#define TOOKPLUNGE 0x10 /* used '>' to enter pit below you */
|
||||
#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 */
|
||||
#define DO_MOVE 0 /* really doing the move */
|
||||
|
||||
Reference in New Issue
Block a user