new makemon() flag
add a flag to makemon() to allow monster to be created adjacent to the supplied coordinates if there is already a monster at the target location
This commit is contained in:
@@ -106,6 +106,8 @@ never display I symbol on the mounted hero/steed location
|
||||
pit digging is no longer stopped by a sleeping monster next to you
|
||||
ensure mksobj() always attaches timer to corpse, even if called with init FALSE
|
||||
only charge for eating one stacked tin, not all at once
|
||||
add flag to makemon() to allow monster to be created adjacent to the supplied
|
||||
coordinates if there is already a monster at the target location
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -140,6 +140,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
||||
#define MM_NONAME 0x20 /* monster is not christened */
|
||||
#define MM_NOCOUNTBIRTH 0x40 /* don't increment born counter (for revival) */
|
||||
#define MM_IGNOREWATER 0x80 /* ignore water when positioning */
|
||||
#define MM_ADJACENTOK 0x100 /* its acceptable to use adjacent coordinates */
|
||||
|
||||
/* flags for special ggetobj status returns */
|
||||
#define ALL_FINISHED 0x01 /* called routine already finished the job */
|
||||
|
||||
@@ -790,9 +790,18 @@ register int mmflags;
|
||||
return((struct monst *)0);
|
||||
}
|
||||
|
||||
/* if a monster already exists at the position, return */
|
||||
if(MON_AT(x, y))
|
||||
return((struct monst *) 0);
|
||||
/* Does monster already exist at the position? */
|
||||
if(MON_AT(x, y)) {
|
||||
if ((mmflags & MM_ADJACENTOK) != 0) {
|
||||
coord bypos;
|
||||
if(enexto_core(&bypos, x, y, ptr, gpflags)) {
|
||||
x = bypos.x;
|
||||
y = bypos.y;
|
||||
} else
|
||||
return((struct monst *) 0);
|
||||
} else
|
||||
return((struct monst *) 0);
|
||||
}
|
||||
|
||||
if(ptr){
|
||||
mndx = monsndx(ptr);
|
||||
|
||||
Reference in New Issue
Block a user