monsters moving other monsters (trunk only)
For now, the code is conditional on BARGETHROUGH being defined, while it gets tested further. While behavior is different with and without BARGETHROUGH defined, savefiles are the same either way. After this patch is applied, only the riders have the M3_DISPLACES bit set, but the Wizard and Vlad probably should too. Any others?
This commit is contained in:
@@ -335,6 +335,7 @@ typedef unsigned char uchar;
|
||||
#if !defined(MAC)
|
||||
# define CLIPPING /* allow smaller screens -- ERS */
|
||||
#endif
|
||||
#define BARGETHROUGH /* allow some monster to move others out of their way */
|
||||
|
||||
#ifdef REDO
|
||||
# define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */
|
||||
|
||||
@@ -463,6 +463,9 @@ E void FDECL(switch_graphics, (int));
|
||||
#ifdef REINCARNATION
|
||||
E void FDECL(assign_rogue_graphics, (BOOLEAN_P));
|
||||
#endif
|
||||
#ifdef BARGETHROUGH
|
||||
E boolean FDECL(cursed_object_at, (int, int));
|
||||
#endif
|
||||
|
||||
/* ### dungeon.c ### */
|
||||
|
||||
@@ -966,6 +969,9 @@ E int FDECL(buzzmu, (struct monst *,struct attack *));
|
||||
|
||||
E int FDECL(fightm, (struct monst *));
|
||||
E int FDECL(mattackm, (struct monst *,struct monst *));
|
||||
#ifdef BARGETHROUGH
|
||||
E int FDECL(mdisplacem, (struct monst *,struct monst *,BOOLEAN_P));
|
||||
#endif
|
||||
E int FDECL(noattacks, (struct permonst *));
|
||||
E int FDECL(sleep_monst, (struct monst *,int,int));
|
||||
E void FDECL(slept_monst, (struct monst *));
|
||||
@@ -1216,6 +1222,11 @@ E boolean FDECL(closed_door, (int,int));
|
||||
E boolean FDECL(accessible, (int,int));
|
||||
E void FDECL(set_apparxy, (struct monst *));
|
||||
E boolean FDECL(can_ooze, (struct monst *));
|
||||
#ifdef BARGETHROUGH
|
||||
E boolean FDECL(should_displace, (struct monst *,coord *,long *,int,
|
||||
XCHAR_P,XCHAR_P));
|
||||
E boolean FDECL(undesirable_disp, (struct monst *,XCHAR_P,XCHAR_P));
|
||||
#endif
|
||||
|
||||
/* ### monst.c ### */
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#ifndef MFNDPOS_H
|
||||
#define MFNDPOS_H
|
||||
|
||||
#ifdef BARGETHROUGH
|
||||
#define ALLOW_MDISP 0x00001000L /* can displace a monster out of its way */
|
||||
#endif
|
||||
#define ALLOW_TRAPS 0x00020000L /* can enter traps */
|
||||
#define ALLOW_U 0x00040000L /* can attack you */
|
||||
#define ALLOW_M 0x00080000L /* can attack other monsters */
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
#define is_covetous(ptr) ((ptr->mflags3 & M3_COVETOUS))
|
||||
#define infravision(ptr) ((ptr->mflags3 & M3_INFRAVISION))
|
||||
#define infravisible(ptr) ((ptr->mflags3 & M3_INFRAVISIBLE))
|
||||
#ifdef BARGETHROUGH
|
||||
#define is_displacer(ptr) (((ptr)->mflags3 & M3_DISPLACES) != 0L)
|
||||
#endif
|
||||
#define is_mplayer(ptr) (((ptr) >= &mons[PM_ARCHEOLOGIST]) && \
|
||||
((ptr) <= &mons[PM_WIZARD]))
|
||||
#define is_rider(ptr) ((ptr) == &mons[PM_DEATH] || \
|
||||
|
||||
@@ -160,6 +160,9 @@
|
||||
#define M3_INFRAVISION 0x0100 /* has infravision */
|
||||
#define M3_INFRAVISIBLE 0x0200 /* visible by infravision */
|
||||
|
||||
/* define the bit even if BARGETHROUGH is not defined for savefile compat. */
|
||||
#define M3_DISPLACES 0x0400 /* moves monsters out of its way */
|
||||
|
||||
#define MZ_TINY 0 /* < 2' */
|
||||
#define MZ_SMALL 1 /* 2-4' */
|
||||
#define MZ_MEDIUM 2 /* 4-7' */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 7
|
||||
#define EDITLEVEL 8
|
||||
|
||||
#define COPYRIGHT_BANNER_A \
|
||||
"NetHack, Copyright 1985-2003"
|
||||
|
||||
Reference in New Issue
Block a user