Merge remote-tracking branch 'origin/NetHack-3.6.0'
This commit is contained in:
@@ -20,6 +20,7 @@ Debug-Mode Quick Reference:
|
|||||||
#timeout == look at timeout queue
|
#timeout == look at timeout queue
|
||||||
#vision == show vision array
|
#vision == show vision array
|
||||||
#vanquished == disclose counts of dead monsters
|
#vanquished == disclose counts of dead monsters
|
||||||
|
#wizmakemap == recreate the current level
|
||||||
#wizsmell == smell a monster
|
#wizsmell == smell a monster
|
||||||
#wizintrinsic == set selected intrinsic timeouts
|
#wizintrinsic == set selected intrinsic timeouts
|
||||||
#wizrumorcheck == validate first and last rumor for true and false set
|
#wizrumorcheck == validate first and last rumor for true and false set
|
||||||
|
|||||||
+15
-3
@@ -2910,6 +2910,14 @@ The
|
|||||||
option is also used with
|
option is also used with
|
||||||
the `/m', `/M', `/o', and `/O' sub-commands of `/',
|
the `/m', `/M', `/o', and `/O' sub-commands of `/',
|
||||||
where the `none' setting is overridden with `map'.
|
where the `none' setting is overridden with `map'.
|
||||||
|
.lp whatis_inview
|
||||||
|
When getting a location on the map, and using the keys to cycle through
|
||||||
|
next and previous targets, limit the possible targets to those in view.
|
||||||
|
(default off)
|
||||||
|
.lp whatis_menu
|
||||||
|
When getting a location on the map, and using a key to cycle through
|
||||||
|
next and previous targets, use a menu instead to pick a target.
|
||||||
|
(default off)
|
||||||
.lp windowtype
|
.lp windowtype
|
||||||
Select which windowing system to use, such as ``tty'' or ``X11''
|
Select which windowing system to use, such as ``tty'' or ``X11''
|
||||||
(default depends on version).
|
(default depends on version).
|
||||||
@@ -3201,6 +3209,10 @@ When asked for a direction, the key to target yourself. Default is '.'.
|
|||||||
When asked for a direction, the key to target yourself. Default is 's'.
|
When asked for a direction, the key to target yourself. Default is 's'.
|
||||||
.lp getpos.autodescribe
|
.lp getpos.autodescribe
|
||||||
When asked for a location, the key to toggle autodescribe. Default is '#'.
|
When asked for a location, the key to toggle autodescribe. Default is '#'.
|
||||||
|
.lp getpos.all.next
|
||||||
|
When asked for a location, the key to go to next closest interesting thing. Default is 'a'.
|
||||||
|
.lp getpos.all.prev
|
||||||
|
When asked for a location, the key to go to previous closest interesting thing. Default is 'A'.
|
||||||
.lp getpos.door.next
|
.lp getpos.door.next
|
||||||
When asked for a location, the key to go to next closest door or doorway. Default is 'd'.
|
When asked for a location, the key to go to next closest door or doorway. Default is 'd'.
|
||||||
.lp getpos.door.prev
|
.lp getpos.door.prev
|
||||||
@@ -3216,9 +3228,9 @@ When asked for a location, the key to go to next closest object. Default is 'o'.
|
|||||||
.lp getpos.obj.prev
|
.lp getpos.obj.prev
|
||||||
When asked for a location, the key to go to previous closest object. Default is 'O'.
|
When asked for a location, the key to go to previous closest object. Default is 'O'.
|
||||||
.lp getpos.menu
|
.lp getpos.menu
|
||||||
When asked for a location, show a menu of all interesting targets. Default is 'A'.
|
When asked for a location, and using one of the next or previous keys to cycle through targets, toggle showing a menu instead. Default is '!'.
|
||||||
.lp getpos.menu.cansee
|
.lp getpos.inview
|
||||||
When asked for a location, show a menu of interesting targets in view. Default is 'a'.
|
When asked for a location, and using one of the next or previous keys to cycle through targets, toggle limiting possible targets to those in view only. Default is '"'.
|
||||||
.lp getpos.pick
|
.lp getpos.pick
|
||||||
When asked for a location, the key to choose the location, and possibly ask for more info. Default is '.'.
|
When asked for a location, the key to choose the location, and possibly ask for more info. Default is '.'.
|
||||||
.lp getpos.pick.once
|
.lp getpos.pick.once
|
||||||
|
|||||||
+18
-3
@@ -3543,6 +3543,15 @@ the `{\tt /m}', `{\tt /M}', `{\tt /o}', and `{\tt /O}' sub-commands
|
|||||||
of `{\tt /}',
|
of `{\tt /}',
|
||||||
where the `{\it none\/}' setting is overridden with `{\it map}'.
|
where the `{\it none\/}' setting is overridden with `{\it map}'.
|
||||||
%.lp
|
%.lp
|
||||||
|
\item[\ib{whatis\verb+_+inview}]
|
||||||
|
When getting a location on the map, and using the keys to cycle through
|
||||||
|
next and previous targets, limit the possible targets to those in view.
|
||||||
|
(default off)
|
||||||
|
\item[\ib{whatis\verb+_+menu}]
|
||||||
|
When getting a location on the map, and using a key to cycle through
|
||||||
|
next and previous targets, use a menu instead to pick a target.
|
||||||
|
(default off)
|
||||||
|
%.lp
|
||||||
\item[\ib{windowtype}]
|
\item[\ib{windowtype}]
|
||||||
Select which windowing system to use, such as ``{\tt tty}'' or ``{\tt X11}''
|
Select which windowing system to use, such as ``{\tt tty}'' or ``{\tt X11}''
|
||||||
(default depends on version).
|
(default depends on version).
|
||||||
@@ -3917,6 +3926,12 @@ When asked for a direction, the key to target yourself. Default is ``{\tt s}''.
|
|||||||
\item{\bb{getpos.autodescribe}}
|
\item{\bb{getpos.autodescribe}}
|
||||||
When asked for a location, the key to toggle {\it autodescribe\/}. Default is ``{\tt \#}''.
|
When asked for a location, the key to toggle {\it autodescribe\/}. Default is ``{\tt \#}''.
|
||||||
%.lp
|
%.lp
|
||||||
|
\item{\bb{getpos.all.next}}
|
||||||
|
When asked for a location, the key to go to next closest interesting thing. Default is ``{\tt a}''.
|
||||||
|
%.lp
|
||||||
|
\item{\bb{getpos.all.prev}}
|
||||||
|
When asked for a location, the key to go to previous closest interesting thing. Default is ``{\tt A}''.
|
||||||
|
%.lp
|
||||||
\item{\bb{getpos.door.next}}
|
\item{\bb{getpos.door.next}}
|
||||||
When asked for a location, the key to go to next closest door or doorway. Default is ``{\tt d}''.
|
When asked for a location, the key to go to next closest door or doorway. Default is ``{\tt d}''.
|
||||||
%.lp
|
%.lp
|
||||||
@@ -3939,10 +3954,10 @@ When asked for a location, the key to go to next closest object. Default is ``{\
|
|||||||
When asked for a location, the key to go to previous closest object. Default is ``{\tt O}''.
|
When asked for a location, the key to go to previous closest object. Default is ``{\tt O}''.
|
||||||
%.lp
|
%.lp
|
||||||
\item{\bb{getpos.menu}}
|
\item{\bb{getpos.menu}}
|
||||||
When asked for a location, show a menu of all interesting targets. Default is '{\tt A}'.
|
When asked for a location, and using one of the next or previous keys to cycle through targets, toggle showing a menu instead. Default is '{\tt !}'.
|
||||||
%.lp
|
%.lp
|
||||||
\item{\bb{getpos.menu.cansee}}
|
\item{\bb{getpos.inview}}
|
||||||
When asked for a location, show a menu of interesting targets in view. Default is '{\tt a}'.
|
When asked for a location, and using one of the next or previous keys to cycle through targets, toggle limiting possible targets to those in view only. Default is '{\tt "}'.
|
||||||
%.lp
|
%.lp
|
||||||
\item{\bb{getpos.pick}}
|
\item{\bb{getpos.pick}}
|
||||||
When asked for a location, the key to choose the location, and possibly ask for more info. Default is ``{\tt .}''.
|
When asked for a location, the key to choose the location, and possibly ask for more info. Default is ``{\tt .}''.
|
||||||
|
|||||||
@@ -348,6 +348,13 @@ give quest guardians some equipment
|
|||||||
hero polyed into ghoul can only eat non-veggy corpses or eggs
|
hero polyed into ghoul can only eat non-veggy corpses or eggs
|
||||||
kicking activates statue traps
|
kicking activates statue traps
|
||||||
pets start with apport equal to your charisma
|
pets start with apport equal to your charisma
|
||||||
|
sometimes generate the random mazes with wide corridors, thick walls,
|
||||||
|
or with dead ends changed to loops
|
||||||
|
put throne room gold in the chest
|
||||||
|
wielding Trollsbane prevents trolls from reviving
|
||||||
|
wielding Demonbane prevents demons summoning friends
|
||||||
|
Elbereth must now be on a square by itself to function
|
||||||
|
Elbereth now erodes based on attacks by the player, not monsters scared
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
|
||||||
@@ -502,6 +509,7 @@ random horses have a tiny chance of being generated saddled
|
|||||||
give feedback just before timed levitation runs out
|
give feedback just before timed levitation runs out
|
||||||
travel accepts 'm' (request menu) prefix
|
travel accepts 'm' (request menu) prefix
|
||||||
pressing a or A when cursor positioning shows menu of "interesting" features
|
pressing a or A when cursor positioning shows menu of "interesting" features
|
||||||
|
wizard-mode command #wizmakemap to recreate the current level
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
+9
-7
@@ -7,14 +7,16 @@
|
|||||||
#ifndef ATTRIB_H
|
#ifndef ATTRIB_H
|
||||||
#define ATTRIB_H
|
#define ATTRIB_H
|
||||||
|
|
||||||
#define A_STR 0
|
enum attrib_types {
|
||||||
#define A_INT 1
|
A_STR = 0,
|
||||||
#define A_WIS 2
|
A_INT,
|
||||||
#define A_DEX 3
|
A_WIS,
|
||||||
#define A_CON 4
|
A_DEX,
|
||||||
#define A_CHA 5
|
A_CON,
|
||||||
|
A_CHA,
|
||||||
|
|
||||||
#define A_MAX 6 /* used in rn2() selection of attrib */
|
A_MAX /* used in rn2() selection of attrib */
|
||||||
|
};
|
||||||
|
|
||||||
#define ABASE(x) (u.acurr.a[x])
|
#define ABASE(x) (u.acurr.a[x])
|
||||||
#define ABON(x) (u.abon.a[x])
|
#define ABON(x) (u.abon.a[x])
|
||||||
|
|||||||
+9
-7
@@ -35,13 +35,15 @@ typedef struct stairway { /* basic stairway identifier */
|
|||||||
} stairway;
|
} stairway;
|
||||||
|
|
||||||
/* level region types */
|
/* level region types */
|
||||||
#define LR_DOWNSTAIR 0
|
enum level_region_types {
|
||||||
#define LR_UPSTAIR 1
|
LR_DOWNSTAIR = 0,
|
||||||
#define LR_PORTAL 2
|
LR_UPSTAIR,
|
||||||
#define LR_BRANCH 3
|
LR_PORTAL,
|
||||||
#define LR_TELE 4
|
LR_BRANCH,
|
||||||
#define LR_UPTELE 5
|
LR_TELE,
|
||||||
#define LR_DOWNTELE 6
|
LR_UPTELE,
|
||||||
|
LR_DOWNTELE
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct dest_area { /* non-stairway level change identifier */
|
typedef struct dest_area { /* non-stairway level change identifier */
|
||||||
xchar lx, ly; /* "lower" left corner (near [0,0]) */
|
xchar lx, ly; /* "lower" left corner (near [0,0]) */
|
||||||
|
|||||||
+3
-3
@@ -379,7 +379,7 @@ E void NDECL(heal_legs);
|
|||||||
/* ### do_name.c ### */
|
/* ### do_name.c ### */
|
||||||
|
|
||||||
E char *FDECL(coord_desc, (int, int, char *, CHAR_P));
|
E char *FDECL(coord_desc, (int, int, char *, CHAR_P));
|
||||||
E boolean FDECL(getpos_menu, (coord *, BOOLEAN_P));
|
E boolean FDECL(getpos_menu, (coord *, BOOLEAN_P, int));
|
||||||
E int FDECL(getpos, (coord *, BOOLEAN_P, const char *));
|
E int FDECL(getpos, (coord *, BOOLEAN_P, const char *));
|
||||||
E void FDECL(getpos_sethilite, (void (*f)(int)));
|
E void FDECL(getpos_sethilite, (void (*f)(int)));
|
||||||
E void FDECL(new_mname, (struct monst *, int));
|
E void FDECL(new_mname, (struct monst *, int));
|
||||||
@@ -1358,8 +1358,8 @@ E void FDECL(mnexto, (struct monst *));
|
|||||||
E void FDECL(maybe_mnexto, (struct monst *));
|
E void FDECL(maybe_mnexto, (struct monst *));
|
||||||
E boolean FDECL(mnearto, (struct monst *, XCHAR_P, XCHAR_P, BOOLEAN_P));
|
E boolean FDECL(mnearto, (struct monst *, XCHAR_P, XCHAR_P, BOOLEAN_P));
|
||||||
E void FDECL(m_respond, (struct monst *));
|
E void FDECL(m_respond, (struct monst *));
|
||||||
E void FDECL(setmangry, (struct monst *));
|
E void FDECL(setmangry, (struct monst *, boolean));
|
||||||
E void FDECL(wakeup, (struct monst *));
|
E void FDECL(wakeup, (struct monst *, boolean));
|
||||||
E void NDECL(wake_nearby);
|
E void NDECL(wake_nearby);
|
||||||
E void FDECL(wake_nearto, (int, int, int));
|
E void FDECL(wake_nearto, (int, int, int));
|
||||||
E void FDECL(seemimic, (struct monst *));
|
E void FDECL(seemimic, (struct monst *));
|
||||||
|
|||||||
+37
-19
@@ -194,6 +194,8 @@ struct instance_flags {
|
|||||||
#define TER_MON 0x08
|
#define TER_MON 0x08
|
||||||
#define TER_DETECT 0x10 /* detect_foo magic rather than #terrain */
|
#define TER_DETECT 0x10 /* detect_foo magic rather than #terrain */
|
||||||
boolean getloc_travelmode;
|
boolean getloc_travelmode;
|
||||||
|
boolean getloc_limitview;
|
||||||
|
boolean getloc_usemenu;
|
||||||
coord travelcc; /* coordinates for travel_cache */
|
coord travelcc; /* coordinates for travel_cache */
|
||||||
boolean window_inited; /* true if init_nhwindows() completed */
|
boolean window_inited; /* true if init_nhwindows() completed */
|
||||||
boolean vision_inited; /* true if vision is ready */
|
boolean vision_inited; /* true if vision is ready */
|
||||||
@@ -378,26 +380,30 @@ extern NEARDATA struct sysflag sysflags;
|
|||||||
#endif
|
#endif
|
||||||
extern NEARDATA struct instance_flags iflags;
|
extern NEARDATA struct instance_flags iflags;
|
||||||
|
|
||||||
/* last_msg values */
|
/* last_msg values
|
||||||
#define PLNMSG_UNKNOWN 0 /* arbitrary */
|
* Usage:
|
||||||
#define PLNMSG_ONE_ITEM_HERE 1 /* "you see <single item> here" */
|
* pline("some message");
|
||||||
#define PLNMSG_TOWER_OF_FLAME 2 /* scroll of fire */
|
* pline: vsprintf + putstr + iflags.last_msg = PLNMSG_UNKNOWN;
|
||||||
#define PLNMSG_CAUGHT_IN_EXPLOSION 3 /* explode() feedback */
|
* iflags.last_msg = PLNMSG_some_message;
|
||||||
#define PLNMSG_OBJ_GLOWS 4 /* "the <obj> glows <color>" */
|
* and subsequent code can adjust the next message if it is affected
|
||||||
#define PLNMSG_OBJNAM_ONLY 5 /* xname/doname only, for #tip */
|
* by some_message. The next message will clear iflags.last_msg.
|
||||||
/* Usage:
|
*/
|
||||||
* pline("some message");
|
enum plnmsg_types {
|
||||||
* pline: vsprintf + putstr + iflags.last_msg = PLNMSG_UNKNOWN;
|
PLNMSG_UNKNOWN = 0, /* arbitrary */
|
||||||
* iflags.last_msg = PLNMSG_some_message;
|
PLNMSG_ONE_ITEM_HERE, /* "you see <single item> here" */
|
||||||
* and subsequent code can adjust the next message if it is affected
|
PLNMSG_TOWER_OF_FLAME, /* scroll of fire */
|
||||||
* by some_message. The next message will clear iflags.last_msg.
|
PLNMSG_CAUGHT_IN_EXPLOSION, /* explode() feedback */
|
||||||
*/
|
PLNMSG_OBJ_GLOWS, /* "the <obj> glows <color>" */
|
||||||
|
PLNMSG_OBJNAM_ONLY /* xname/doname only, for #tip */
|
||||||
|
};
|
||||||
|
|
||||||
/* runmode options */
|
/* runmode options */
|
||||||
#define RUN_TPORT 0 /* don't update display until movement stops */
|
enum runmode_types {
|
||||||
#define RUN_LEAP 1 /* update display every 7 steps */
|
RUN_TPORT = 0, /* don't update display until movement stops */
|
||||||
#define RUN_STEP 2 /* update display every single step */
|
RUN_LEAP, /* update display every 7 steps */
|
||||||
#define RUN_CRAWL 3 /* walk w/ extra delay after each update */
|
RUN_STEP, /* update display every single step */
|
||||||
|
RUN_CRAWL /* walk w/ extra delay after each update */
|
||||||
|
};
|
||||||
|
|
||||||
/* paranoid confirmation prompting */
|
/* paranoid confirmation prompting */
|
||||||
/* any yes confirmations also require explicit no (or ESC) to reject */
|
/* any yes confirmations also require explicit no (or ESC) to reject */
|
||||||
@@ -467,13 +473,25 @@ enum nh_keyfunc {
|
|||||||
NHKF_GETPOS_DOOR_PREV,
|
NHKF_GETPOS_DOOR_PREV,
|
||||||
NHKF_GETPOS_UNEX_NEXT,
|
NHKF_GETPOS_UNEX_NEXT,
|
||||||
NHKF_GETPOS_UNEX_PREV,
|
NHKF_GETPOS_UNEX_PREV,
|
||||||
|
NHKF_GETPOS_INTERESTING_NEXT,
|
||||||
|
NHKF_GETPOS_INTERESTING_PREV,
|
||||||
NHKF_GETPOS_HELP,
|
NHKF_GETPOS_HELP,
|
||||||
NHKF_GETPOS_MENU,
|
NHKF_GETPOS_MENU,
|
||||||
NHKF_GETPOS_MENU_FOV,
|
NHKF_GETPOS_LIMITVIEW,
|
||||||
|
|
||||||
NUM_NHKF
|
NUM_NHKF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum gloctypes {
|
||||||
|
GLOC_MONS = 0,
|
||||||
|
GLOC_OBJS,
|
||||||
|
GLOC_DOOR,
|
||||||
|
GLOC_EXPLORE,
|
||||||
|
GLOC_INTERESTING,
|
||||||
|
|
||||||
|
NUM_GLOCS
|
||||||
|
};
|
||||||
|
|
||||||
/* commands[] is used to directly access cmdlist[] instead of looping
|
/* commands[] is used to directly access cmdlist[] instead of looping
|
||||||
through it to find the entry for a given input character;
|
through it to find the entry for a given input character;
|
||||||
move_X is the character used for moving one step in direction X;
|
move_X is the character used for moving one step in direction X;
|
||||||
|
|||||||
+110
-92
@@ -22,24 +22,28 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* symbolic names for capacity levels */
|
/* symbolic names for capacity levels */
|
||||||
#define UNENCUMBERED 0
|
enum encumbrance_types {
|
||||||
#define SLT_ENCUMBER 1 /* Burdened */
|
UNENCUMBERED = 0,
|
||||||
#define MOD_ENCUMBER 2 /* Stressed */
|
SLT_ENCUMBER, /* Burdened */
|
||||||
#define HVY_ENCUMBER 3 /* Strained */
|
MOD_ENCUMBER, /* Stressed */
|
||||||
#define EXT_ENCUMBER 4 /* Overtaxed */
|
HVY_ENCUMBER, /* Strained */
|
||||||
#define OVERLOADED 5 /* Overloaded */
|
EXT_ENCUMBER, /* Overtaxed */
|
||||||
|
OVERLOADED /* Overloaded */
|
||||||
|
};
|
||||||
|
|
||||||
/* weight increment of heavy iron ball */
|
/* weight increment of heavy iron ball */
|
||||||
#define IRON_BALL_W_INCR 160
|
#define IRON_BALL_W_INCR 160
|
||||||
|
|
||||||
/* hunger states - see hu_stat in eat.c */
|
/* hunger states - see hu_stat in eat.c */
|
||||||
#define SATIATED 0
|
enum hunger_state_types {
|
||||||
#define NOT_HUNGRY 1
|
SATIATED = 0,
|
||||||
#define HUNGRY 2
|
NOT_HUNGRY,
|
||||||
#define WEAK 3
|
HUNGRY,
|
||||||
#define FAINTING 4
|
WEAK,
|
||||||
#define FAINTED 5
|
FAINTING,
|
||||||
#define STARVED 6
|
FAINTED,
|
||||||
|
STARVED
|
||||||
|
};
|
||||||
|
|
||||||
/* Macros for how a rumor was delivered in outrumor() */
|
/* Macros for how a rumor was delivered in outrumor() */
|
||||||
#define BY_ORACLE 0
|
#define BY_ORACLE 0
|
||||||
@@ -48,13 +52,15 @@
|
|||||||
#define BY_OTHER 9
|
#define BY_OTHER 9
|
||||||
|
|
||||||
/* Macros for why you are no longer riding */
|
/* Macros for why you are no longer riding */
|
||||||
#define DISMOUNT_GENERIC 0
|
enum dismount_types {
|
||||||
#define DISMOUNT_FELL 1
|
DISMOUNT_GENERIC = 0,
|
||||||
#define DISMOUNT_THROWN 2
|
DISMOUNT_FELL,
|
||||||
#define DISMOUNT_POLY 3
|
DISMOUNT_THROWN,
|
||||||
#define DISMOUNT_ENGULFED 4
|
DISMOUNT_POLY,
|
||||||
#define DISMOUNT_BONES 5
|
DISMOUNT_ENGULFED,
|
||||||
#define DISMOUNT_BYCHOICE 6
|
DISMOUNT_BONES,
|
||||||
|
DISMOUNT_BYCHOICE
|
||||||
|
};
|
||||||
|
|
||||||
/* Special returns from mapglyph() */
|
/* Special returns from mapglyph() */
|
||||||
#define MG_CORPSE 0x01
|
#define MG_CORPSE 0x01
|
||||||
@@ -73,25 +79,27 @@
|
|||||||
#define SELL_DONTSELL (2)
|
#define SELL_DONTSELL (2)
|
||||||
|
|
||||||
/* alteration types--keep in synch with costly_alteration(mkobj.c) */
|
/* alteration types--keep in synch with costly_alteration(mkobj.c) */
|
||||||
#define COST_CANCEL 0 /* standard cancellation */
|
enum cost_alteration_types {
|
||||||
#define COST_DRAIN 1 /* drain life upon an object */
|
COST_CANCEL = 0, /* standard cancellation */
|
||||||
#define COST_UNCHRG 2 /* cursed charging */
|
COST_DRAIN, /* drain life upon an object */
|
||||||
#define COST_UNBLSS 3 /* unbless (devalues holy water) */
|
COST_UNCHRG, /* cursed charging */
|
||||||
#define COST_UNCURS 4 /* uncurse (devalues unholy water) */
|
COST_UNBLSS, /* unbless (devalues holy water) */
|
||||||
#define COST_DECHNT 5 /* disenchant weapons or armor */
|
COST_UNCURS, /* uncurse (devalues unholy water) */
|
||||||
#define COST_DEGRD 6 /* removal of rustproofing, dulling via engraving */
|
COST_DECHNT, /* disenchant weapons or armor */
|
||||||
#define COST_DILUTE 7 /* potion dilution */
|
COST_DEGRD, /* removal of rustproofing, dulling via engraving */
|
||||||
#define COST_ERASE 8 /* scroll or spellbook blanking */
|
COST_DILUTE, /* potion dilution */
|
||||||
#define COST_BURN 9 /* dipped into flaming oil */
|
COST_ERASE, /* scroll or spellbook blanking */
|
||||||
#define COST_NUTRLZ 10 /* neutralized via unicorn horn */
|
COST_BURN, /* dipped into flaming oil */
|
||||||
#define COST_DSTROY 11 /* wand breaking (bill first, useup later) */
|
COST_NUTRLZ, /* neutralized via unicorn horn */
|
||||||
#define COST_SPLAT 12 /* cream pie to own face (ditto) */
|
COST_DSTROY, /* wand breaking (bill first, useup later) */
|
||||||
#define COST_BITE 13 /* start eating food */
|
COST_SPLAT, /* cream pie to own face (ditto) */
|
||||||
#define COST_OPEN 14 /* open tin */
|
COST_BITE, /* start eating food */
|
||||||
#define COST_BRKLCK 15 /* break box/chest's lock */
|
COST_OPEN, /* open tin */
|
||||||
#define COST_RUST 16 /* rust damage */
|
COST_BRKLCK, /* break box/chest's lock */
|
||||||
#define COST_ROT 17 /* rotting attack */
|
COST_RUST, /* rust damage */
|
||||||
#define COST_CORRODE 18 /* acid damage */
|
COST_ROT, /* rotting attack */
|
||||||
|
COST_CORRODE /* acid damage */
|
||||||
|
};
|
||||||
|
|
||||||
/* bitmask flags for corpse_xname();
|
/* bitmask flags for corpse_xname();
|
||||||
PFX_THE takes precedence over ARTICLE, NO_PFX takes precedence over both */
|
PFX_THE takes precedence over ARTICLE, NO_PFX takes precedence over both */
|
||||||
@@ -115,22 +123,24 @@ enum getpos_retval {
|
|||||||
* in end.c and topten.c will need to be changed. Some parts of the
|
* in end.c and topten.c will need to be changed. Some parts of the
|
||||||
* code assume that PANIC separates the deaths from the non-deaths.
|
* code assume that PANIC separates the deaths from the non-deaths.
|
||||||
*/
|
*/
|
||||||
#define DIED 0
|
enum game_end_types {
|
||||||
#define CHOKING 1
|
DIED = 0,
|
||||||
#define POISONING 2
|
CHOKING,
|
||||||
#define STARVING 3
|
POISONING,
|
||||||
#define DROWNING 4
|
STARVING,
|
||||||
#define BURNING 5
|
DROWNING,
|
||||||
#define DISSOLVED 6
|
BURNING,
|
||||||
#define CRUSHING 7
|
DISSOLVED,
|
||||||
#define STONING 8
|
CRUSHING,
|
||||||
#define TURNED_SLIME 9
|
STONING,
|
||||||
#define GENOCIDED 10
|
TURNED_SLIME,
|
||||||
#define PANICKED 11
|
GENOCIDED,
|
||||||
#define TRICKED 12
|
PANICKED,
|
||||||
#define QUIT 13
|
TRICKED,
|
||||||
#define ESCAPED 14
|
QUIT,
|
||||||
#define ASCENDED 15
|
ESCAPED,
|
||||||
|
ASCENDED
|
||||||
|
};
|
||||||
|
|
||||||
#include "align.h"
|
#include "align.h"
|
||||||
#include "dungeon.h"
|
#include "dungeon.h"
|
||||||
@@ -146,18 +156,22 @@ enum getpos_retval {
|
|||||||
NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
||||||
|
|
||||||
/* types of calls to bhit() */
|
/* types of calls to bhit() */
|
||||||
#define ZAPPED_WAND 0
|
enum bhit_call_types {
|
||||||
#define THROWN_WEAPON 1
|
ZAPPED_WAND = 0,
|
||||||
#define KICKED_WEAPON 2
|
THROWN_WEAPON,
|
||||||
#define FLASHED_LIGHT 3
|
KICKED_WEAPON,
|
||||||
#define INVIS_BEAM 4
|
FLASHED_LIGHT,
|
||||||
|
INVIS_BEAM
|
||||||
|
};
|
||||||
|
|
||||||
/* attack mode for hmon() */
|
/* attack mode for hmon() */
|
||||||
#define HMON_MELEE 0 /* hand-to-hand */
|
enum hmon_atkmode_types {
|
||||||
#define HMON_THROWN 1 /* normal ranged (or spitting while poly'd) */
|
HMON_MELEE = 0, /* hand-to-hand */
|
||||||
#define HMON_KICKED 2 /* alternate ranged */
|
HMON_THROWN, /* normal ranged (or spitting while poly'd) */
|
||||||
#define HMON_APPLIED 3 /* polearm, treated as ranged */
|
HMON_KICKED, /* alternate ranged */
|
||||||
#define HMON_DRAGGED 4 /* attached iron ball, pulled into mon */
|
HMON_APPLIED, /* polearm, treated as ranged */
|
||||||
|
HMON_DRAGGED /* attached iron ball, pulled into mon */
|
||||||
|
};
|
||||||
|
|
||||||
#define MATCH_WARN_OF_MON(mon) \
|
#define MATCH_WARN_OF_MON(mon) \
|
||||||
(Warn_of_mon && ((context.warntype.obj \
|
(Warn_of_mon && ((context.warntype.obj \
|
||||||
@@ -315,14 +329,16 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
|||||||
#define LAUNCH_KNOWN 0x80 /* the hero caused this by explicit action */
|
#define LAUNCH_KNOWN 0x80 /* the hero caused this by explicit action */
|
||||||
|
|
||||||
/* Macros for explosion types */
|
/* Macros for explosion types */
|
||||||
#define EXPL_DARK 0
|
enum explosion_types {
|
||||||
#define EXPL_NOXIOUS 1
|
EXPL_DARK = 0,
|
||||||
#define EXPL_MUDDY 2
|
EXPL_NOXIOUS,
|
||||||
#define EXPL_WET 3
|
EXPL_MUDDY,
|
||||||
#define EXPL_MAGICAL 4
|
EXPL_WET,
|
||||||
#define EXPL_FIERY 5
|
EXPL_MAGICAL,
|
||||||
#define EXPL_FROSTY 6
|
EXPL_FIERY,
|
||||||
#define EXPL_MAX 7
|
EXPL_FROSTY,
|
||||||
|
EXPL_MAX
|
||||||
|
};
|
||||||
|
|
||||||
/* enlightenment control flags */
|
/* enlightenment control flags */
|
||||||
#define BASICENLIGHTENMENT 1 /* show mundane stuff */
|
#define BASICENLIGHTENMENT 1 /* show mundane stuff */
|
||||||
@@ -344,25 +360,27 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
|||||||
#define XKILL_NOCONDUCT 4
|
#define XKILL_NOCONDUCT 4
|
||||||
|
|
||||||
/* Macros for messages referring to hands, eyes, feet, etc... */
|
/* Macros for messages referring to hands, eyes, feet, etc... */
|
||||||
#define ARM 0
|
enum bodypart_types {
|
||||||
#define EYE 1
|
ARM = 0,
|
||||||
#define FACE 2
|
EYE,
|
||||||
#define FINGER 3
|
FACE,
|
||||||
#define FINGERTIP 4
|
FINGER,
|
||||||
#define FOOT 5
|
FINGERTIP,
|
||||||
#define HAND 6
|
FOOT,
|
||||||
#define HANDED 7
|
HAND,
|
||||||
#define HEAD 8
|
HANDED,
|
||||||
#define LEG 9
|
HEAD,
|
||||||
#define LIGHT_HEADED 10
|
LEG,
|
||||||
#define NECK 11
|
LIGHT_HEADED,
|
||||||
#define SPINE 12
|
NECK,
|
||||||
#define TOE 13
|
SPINE,
|
||||||
#define HAIR 14
|
TOE,
|
||||||
#define BLOOD 15
|
HAIR,
|
||||||
#define LUNG 16
|
BLOOD,
|
||||||
#define NOSE 17
|
LUNG,
|
||||||
#define STOMACH 18
|
NOSE,
|
||||||
|
STOMACH
|
||||||
|
};
|
||||||
|
|
||||||
/* indices for some special tin types */
|
/* indices for some special tin types */
|
||||||
#define ROTTEN_TIN 0
|
#define ROTTEN_TIN 0
|
||||||
|
|||||||
+10
-8
@@ -144,14 +144,16 @@ struct emin {
|
|||||||
** formerly edog.h -- pet extension
|
** formerly edog.h -- pet extension
|
||||||
*/
|
*/
|
||||||
/* various types of pet food, the lower, the better liked */
|
/* various types of pet food, the lower, the better liked */
|
||||||
#define DOGFOOD 0
|
enum dogfood_types {
|
||||||
#define CADAVER 1
|
DOGFOOD = 0,
|
||||||
#define ACCFOOD 2
|
CADAVER,
|
||||||
#define MANFOOD 3
|
ACCFOOD,
|
||||||
#define APPORT 4
|
MANFOOD,
|
||||||
#define POISON 5
|
APPORT,
|
||||||
#define UNDEF 6
|
POISON,
|
||||||
#define TABU 7
|
UNDEF,
|
||||||
|
TABU
|
||||||
|
};
|
||||||
|
|
||||||
struct edog {
|
struct edog {
|
||||||
long droptime; /* moment dog dropped object */
|
long droptime; /* moment dog dropped object */
|
||||||
|
|||||||
+30
-27
@@ -51,33 +51,36 @@ extern struct mkroom *dnstairs_room, *upstairs_room, *sstairs_room;
|
|||||||
extern NEARDATA coord doors[DOORMAX];
|
extern NEARDATA coord doors[DOORMAX];
|
||||||
|
|
||||||
/* values for rtype in the room definition structure */
|
/* values for rtype in the room definition structure */
|
||||||
#define OROOM 0 /* ordinary room */
|
enum roomtype_types {
|
||||||
#define COURT 2 /* contains a throne */
|
OROOM = 0, /* ordinary room */
|
||||||
#define SWAMP 3 /* contains pools */
|
COURT = 2, /* contains a throne */
|
||||||
#define VAULT 4 /* contains piles of gold */
|
SWAMP, /* contains pools */
|
||||||
#define BEEHIVE 5 /* contains killer bees and royal jelly */
|
VAULT, /* contains piles of gold */
|
||||||
#define MORGUE 6 /* contains corpses, undead and ghosts */
|
BEEHIVE, /* contains killer bees and royal jelly */
|
||||||
#define BARRACKS 7 /* contains soldiers and their gear */
|
MORGUE, /* contains corpses, undead and ghosts */
|
||||||
#define ZOO 8 /* floor covered with treasure and monsters */
|
BARRACKS, /* contains soldiers and their gear */
|
||||||
#define DELPHI 9 /* contains Oracle and peripherals */
|
ZOO, /* floor covered with treasure and monsters */
|
||||||
#define TEMPLE 10 /* contains a shrine */
|
DELPHI, /* contains Oracle and peripherals */
|
||||||
#define LEPREHALL 11 /* leprechaun hall (Tom Proudfoot) */
|
TEMPLE, /* contains a shrine */
|
||||||
#define COCKNEST 12 /* cockatrice nest (Tom Proudfoot) */
|
LEPREHALL, /* leprechaun hall (Tom Proudfoot) */
|
||||||
#define ANTHOLE 13 /* ants (Tom Proudfoot) */
|
COCKNEST, /* cockatrice nest (Tom Proudfoot) */
|
||||||
#define SHOPBASE 14 /* everything above this is a shop */
|
ANTHOLE, /* ants (Tom Proudfoot) */
|
||||||
#define ARMORSHOP 15 /* specific shop defines for level compiler */
|
SHOPBASE, /* everything above this is a shop */
|
||||||
#define SCROLLSHOP 16
|
ARMORSHOP, /* specific shop defines for level compiler */
|
||||||
#define POTIONSHOP 17
|
SCROLLSHOP,
|
||||||
#define WEAPONSHOP 18
|
POTIONSHOP,
|
||||||
#define FOODSHOP 19
|
WEAPONSHOP,
|
||||||
#define RINGSHOP 20
|
FOODSHOP,
|
||||||
#define WANDSHOP 21
|
RINGSHOP,
|
||||||
#define TOOLSHOP 22
|
WANDSHOP,
|
||||||
#define BOOKSHOP 23
|
TOOLSHOP,
|
||||||
#define FODDERSHOP 24 /* health food store */
|
BOOKSHOP,
|
||||||
#define UNIQUESHOP 25 /* shops here & below not randomly gen'd. */
|
FODDERSHOP, /* health food store */
|
||||||
#define CANDLESHOP 25
|
CANDLESHOP
|
||||||
#define MAXRTYPE 25 /* maximum valid room type */
|
};
|
||||||
|
|
||||||
|
#define MAXRTYPE (CANDLESHOP) /* maximum valid room type */
|
||||||
|
#define UNIQUESHOP (CANDLESHOP) /* shops here & above not randomly gen'd. */
|
||||||
|
|
||||||
/* Special type for search_special() */
|
/* Special type for search_special() */
|
||||||
#define ANY_TYPE (-1)
|
#define ANY_TYPE (-1)
|
||||||
|
|||||||
+63
-63
@@ -10,71 +10,71 @@
|
|||||||
* them. Monster class 0 is not used or defined so we can use it as a
|
* them. Monster class 0 is not used or defined so we can use it as a
|
||||||
* NULL character.
|
* NULL character.
|
||||||
*/
|
*/
|
||||||
/* clang-format off */
|
enum mon_class_types {
|
||||||
#define S_ANT 1
|
S_ANT = 1,
|
||||||
#define S_BLOB 2
|
S_BLOB,
|
||||||
#define S_COCKATRICE 3
|
S_COCKATRICE,
|
||||||
#define S_DOG 4
|
S_DOG,
|
||||||
#define S_EYE 5
|
S_EYE,
|
||||||
#define S_FELINE 6
|
S_FELINE,
|
||||||
#define S_GREMLIN 7
|
S_GREMLIN,
|
||||||
#define S_HUMANOID 8
|
S_HUMANOID,
|
||||||
#define S_IMP 9
|
S_IMP,
|
||||||
#define S_JELLY 10
|
S_JELLY,
|
||||||
#define S_KOBOLD 11
|
S_KOBOLD,
|
||||||
#define S_LEPRECHAUN 12
|
S_LEPRECHAUN,
|
||||||
#define S_MIMIC 13
|
S_MIMIC,
|
||||||
#define S_NYMPH 14
|
S_NYMPH,
|
||||||
#define S_ORC 15
|
S_ORC,
|
||||||
#define S_PIERCER 16
|
S_PIERCER,
|
||||||
#define S_QUADRUPED 17
|
S_QUADRUPED,
|
||||||
#define S_RODENT 18
|
S_RODENT,
|
||||||
#define S_SPIDER 19
|
S_SPIDER,
|
||||||
#define S_TRAPPER 20
|
S_TRAPPER,
|
||||||
#define S_UNICORN 21
|
S_UNICORN,
|
||||||
#define S_VORTEX 22
|
S_VORTEX,
|
||||||
#define S_WORM 23
|
S_WORM,
|
||||||
#define S_XAN 24
|
S_XAN,
|
||||||
#define S_LIGHT 25
|
S_LIGHT,
|
||||||
#define S_ZRUTY 26
|
S_ZRUTY,
|
||||||
#define S_ANGEL 27
|
S_ANGEL,
|
||||||
#define S_BAT 28
|
S_BAT,
|
||||||
#define S_CENTAUR 29
|
S_CENTAUR,
|
||||||
#define S_DRAGON 30
|
S_DRAGON,
|
||||||
#define S_ELEMENTAL 31
|
S_ELEMENTAL,
|
||||||
#define S_FUNGUS 32
|
S_FUNGUS,
|
||||||
#define S_GNOME 33
|
S_GNOME,
|
||||||
#define S_GIANT 34
|
S_GIANT,
|
||||||
#define S_invisible 35 /* non-class present in def_monsyms[] */
|
S_invisible, /* non-class present in def_monsyms[] */
|
||||||
#define S_JABBERWOCK 36
|
S_JABBERWOCK,
|
||||||
#define S_KOP 37
|
S_KOP,
|
||||||
#define S_LICH 38
|
S_LICH,
|
||||||
#define S_MUMMY 39
|
S_MUMMY,
|
||||||
#define S_NAGA 40
|
S_NAGA,
|
||||||
#define S_OGRE 41
|
S_OGRE,
|
||||||
#define S_PUDDING 42
|
S_PUDDING,
|
||||||
#define S_QUANTMECH 43
|
S_QUANTMECH,
|
||||||
#define S_RUSTMONST 44
|
S_RUSTMONST,
|
||||||
#define S_SNAKE 45
|
S_SNAKE,
|
||||||
#define S_TROLL 46
|
S_TROLL,
|
||||||
#define S_UMBER 47
|
S_UMBER,
|
||||||
#define S_VAMPIRE 48
|
S_VAMPIRE,
|
||||||
#define S_WRAITH 49
|
S_WRAITH,
|
||||||
#define S_XORN 50
|
S_XORN,
|
||||||
#define S_YETI 51
|
S_YETI,
|
||||||
#define S_ZOMBIE 52
|
S_ZOMBIE,
|
||||||
#define S_HUMAN 53
|
S_HUMAN,
|
||||||
#define S_GHOST 54
|
S_GHOST,
|
||||||
#define S_GOLEM 55
|
S_GOLEM,
|
||||||
#define S_DEMON 56
|
S_DEMON,
|
||||||
#define S_EEL 57
|
S_EEL,
|
||||||
#define S_LIZARD 58
|
S_LIZARD,
|
||||||
|
|
||||||
#define S_WORM_TAIL 59
|
S_WORM_TAIL,
|
||||||
#define S_MIMIC_DEF 60
|
S_MIMIC_DEF,
|
||||||
/* clang-format on */
|
|
||||||
|
|
||||||
#define MAXMCLASSES 61 /* number of monster classes */
|
MAXMCLASSES /* number of monster classes */
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default characters for monsters. These correspond to the monster classes
|
* Default characters for monsters. These correspond to the monster classes
|
||||||
|
|||||||
+22
-19
@@ -131,25 +131,28 @@ extern NEARDATA struct objdescr obj_descr[];
|
|||||||
* All objects have a class. Make sure that all classes have a corresponding
|
* All objects have a class. Make sure that all classes have a corresponding
|
||||||
* symbol below.
|
* symbol below.
|
||||||
*/
|
*/
|
||||||
#define RANDOM_CLASS 0 /* used for generating random objects */
|
enum obj_class_types {
|
||||||
#define ILLOBJ_CLASS 1
|
RANDOM_CLASS = 0, /* used for generating random objects */
|
||||||
#define WEAPON_CLASS 2
|
ILLOBJ_CLASS,
|
||||||
#define ARMOR_CLASS 3
|
WEAPON_CLASS,
|
||||||
#define RING_CLASS 4
|
ARMOR_CLASS,
|
||||||
#define AMULET_CLASS 5
|
RING_CLASS,
|
||||||
#define TOOL_CLASS 6
|
AMULET_CLASS,
|
||||||
#define FOOD_CLASS 7
|
TOOL_CLASS,
|
||||||
#define POTION_CLASS 8
|
FOOD_CLASS,
|
||||||
#define SCROLL_CLASS 9
|
POTION_CLASS,
|
||||||
#define SPBOOK_CLASS 10 /* actually SPELL-book */
|
SCROLL_CLASS,
|
||||||
#define WAND_CLASS 11
|
SPBOOK_CLASS, /* actually SPELL-book */
|
||||||
#define COIN_CLASS 12
|
WAND_CLASS,
|
||||||
#define GEM_CLASS 13
|
COIN_CLASS,
|
||||||
#define ROCK_CLASS 14
|
GEM_CLASS,
|
||||||
#define BALL_CLASS 15
|
ROCK_CLASS,
|
||||||
#define CHAIN_CLASS 16
|
BALL_CLASS,
|
||||||
#define VENOM_CLASS 17
|
CHAIN_CLASS,
|
||||||
#define MAXOCLASSES 18
|
VENOM_CLASS,
|
||||||
|
|
||||||
|
MAXOCLASSES
|
||||||
|
};
|
||||||
|
|
||||||
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
|
#define ALLOW_COUNT (MAXOCLASSES + 1) /* Can be used in the object class */
|
||||||
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
|
#define ALL_CLASSES (MAXOCLASSES + 2) /* input to getobj(). */
|
||||||
|
|||||||
+143
-139
@@ -34,45 +34,47 @@
|
|||||||
defines array type_names[] which contains an entry for each of
|
defines array type_names[] which contains an entry for each of
|
||||||
these, so needs to be kept in sync if any new types are added
|
these, so needs to be kept in sync if any new types are added
|
||||||
or existing ones renumbered.] */
|
or existing ones renumbered.] */
|
||||||
#define STONE 0
|
enum levl_typ_types {
|
||||||
#define VWALL 1
|
STONE = 0,
|
||||||
#define HWALL 2
|
VWALL,
|
||||||
#define TLCORNER 3
|
HWALL,
|
||||||
#define TRCORNER 4
|
TLCORNER,
|
||||||
#define BLCORNER 5
|
TRCORNER,
|
||||||
#define BRCORNER 6
|
BLCORNER,
|
||||||
#define CROSSWALL 7 /* For pretty mazes and special levels */
|
BRCORNER,
|
||||||
#define TUWALL 8
|
CROSSWALL, /* For pretty mazes and special levels */
|
||||||
#define TDWALL 9
|
TUWALL,
|
||||||
#define TLWALL 10
|
TDWALL,
|
||||||
#define TRWALL 11
|
TLWALL,
|
||||||
#define DBWALL 12
|
TRWALL,
|
||||||
#define TREE 13 /* KMH */
|
DBWALL,
|
||||||
#define SDOOR 14
|
TREE, /* KMH */
|
||||||
#define SCORR 15
|
SDOOR,
|
||||||
#define POOL 16
|
SCORR,
|
||||||
#define MOAT 17 /* pool that doesn't boil, adjust messages */
|
POOL,
|
||||||
#define WATER 18
|
MOAT, /* pool that doesn't boil, adjust messages */
|
||||||
#define DRAWBRIDGE_UP 19
|
WATER,
|
||||||
#define LAVAPOOL 20
|
DRAWBRIDGE_UP,
|
||||||
#define IRONBARS 21 /* KMH */
|
LAVAPOOL,
|
||||||
#define DOOR 22
|
IRONBARS, /* KMH */
|
||||||
#define CORR 23
|
DOOR,
|
||||||
#define ROOM 24
|
CORR,
|
||||||
#define STAIRS 25
|
ROOM,
|
||||||
#define LADDER 26
|
STAIRS,
|
||||||
#define FOUNTAIN 27
|
LADDER,
|
||||||
#define THRONE 28
|
FOUNTAIN,
|
||||||
#define SINK 29
|
THRONE,
|
||||||
#define GRAVE 30
|
SINK,
|
||||||
#define ALTAR 31
|
GRAVE,
|
||||||
#define ICE 32
|
ALTAR,
|
||||||
#define DRAWBRIDGE_DOWN 33
|
ICE,
|
||||||
#define AIR 34
|
DRAWBRIDGE_DOWN,
|
||||||
#define CLOUD 35
|
AIR,
|
||||||
|
CLOUD,
|
||||||
|
|
||||||
#define MAX_TYPE 36
|
MAX_TYPE,
|
||||||
#define INVALID_TYPE 127
|
INVALID_TYPE = 127
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Avoid using the level types in inequalities:
|
* Avoid using the level types in inequalities:
|
||||||
@@ -109,120 +111,122 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* begin dungeon characters */
|
/* begin dungeon characters */
|
||||||
|
enum screen_symbols {
|
||||||
#define S_stone 0
|
S_stone = 0,
|
||||||
#define S_vwall 1
|
S_vwall,
|
||||||
#define S_hwall 2
|
S_hwall,
|
||||||
#define S_tlcorn 3
|
S_tlcorn,
|
||||||
#define S_trcorn 4
|
S_trcorn,
|
||||||
#define S_blcorn 5
|
S_blcorn,
|
||||||
#define S_brcorn 6
|
S_brcorn,
|
||||||
#define S_crwall 7
|
S_crwall,
|
||||||
#define S_tuwall 8
|
S_tuwall,
|
||||||
#define S_tdwall 9
|
S_tdwall,
|
||||||
#define S_tlwall 10
|
S_tlwall,
|
||||||
#define S_trwall 11
|
S_trwall,
|
||||||
#define S_ndoor 12
|
S_ndoor,
|
||||||
#define S_vodoor 13
|
S_vodoor,
|
||||||
#define S_hodoor 14
|
S_hodoor,
|
||||||
#define S_vcdoor 15 /* closed door, vertical wall */
|
S_vcdoor, /* closed door, vertical wall */
|
||||||
#define S_hcdoor 16 /* closed door, horizontal wall */
|
S_hcdoor, /* closed door, horizontal wall */
|
||||||
#define S_bars 17 /* KMH -- iron bars */
|
S_bars, /* KMH -- iron bars */
|
||||||
#define S_tree 18 /* KMH */
|
S_tree, /* KMH */
|
||||||
#define S_room 19
|
S_room,
|
||||||
#define S_darkroom 20
|
S_darkroom,
|
||||||
#define S_corr 21
|
S_corr,
|
||||||
#define S_litcorr 22
|
S_litcorr,
|
||||||
#define S_upstair 23
|
S_upstair,
|
||||||
#define S_dnstair 24
|
S_dnstair,
|
||||||
#define S_upladder 25
|
S_upladder,
|
||||||
#define S_dnladder 26
|
S_dnladder,
|
||||||
#define S_altar 27
|
S_altar,
|
||||||
#define S_grave 28
|
S_grave,
|
||||||
#define S_throne 29
|
S_throne,
|
||||||
#define S_sink 30
|
S_sink,
|
||||||
#define S_fountain 31
|
S_fountain,
|
||||||
#define S_pool 32
|
S_pool,
|
||||||
#define S_ice 33
|
S_ice,
|
||||||
#define S_lava 34
|
S_lava,
|
||||||
#define S_vodbridge 35
|
S_vodbridge,
|
||||||
#define S_hodbridge 36
|
S_hodbridge,
|
||||||
#define S_vcdbridge 37 /* closed drawbridge, vertical wall */
|
S_vcdbridge, /* closed drawbridge, vertical wall */
|
||||||
#define S_hcdbridge 38 /* closed drawbridge, horizontal wall */
|
S_hcdbridge, /* closed drawbridge, horizontal wall */
|
||||||
#define S_air 39
|
S_air,
|
||||||
#define S_cloud 40
|
S_cloud,
|
||||||
#define S_water 41
|
S_water,
|
||||||
|
|
||||||
/* end dungeon characters, begin traps */
|
/* end dungeon characters, begin traps */
|
||||||
|
|
||||||
#define S_arrow_trap 42
|
S_arrow_trap,
|
||||||
#define S_dart_trap 43
|
S_dart_trap,
|
||||||
#define S_falling_rock_trap 44
|
S_falling_rock_trap,
|
||||||
#define S_squeaky_board 45
|
S_squeaky_board,
|
||||||
#define S_bear_trap 46
|
S_bear_trap,
|
||||||
#define S_land_mine 47
|
S_land_mine,
|
||||||
#define S_rolling_boulder_trap 48
|
S_rolling_boulder_trap,
|
||||||
#define S_sleeping_gas_trap 49
|
S_sleeping_gas_trap,
|
||||||
#define S_rust_trap 50
|
S_rust_trap,
|
||||||
#define S_fire_trap 51
|
S_fire_trap,
|
||||||
#define S_pit 52
|
S_pit,
|
||||||
#define S_spiked_pit 53
|
S_spiked_pit,
|
||||||
#define S_hole 54
|
S_hole,
|
||||||
#define S_trap_door 55
|
S_trap_door,
|
||||||
#define S_teleportation_trap 56
|
S_teleportation_trap,
|
||||||
#define S_level_teleporter 57
|
S_level_teleporter,
|
||||||
#define S_magic_portal 58
|
S_magic_portal,
|
||||||
#define S_web 59
|
S_web,
|
||||||
#define S_statue_trap 60
|
S_statue_trap,
|
||||||
#define S_magic_trap 61
|
S_magic_trap,
|
||||||
#define S_anti_magic_trap 62
|
S_anti_magic_trap,
|
||||||
#define S_polymorph_trap 63
|
S_polymorph_trap,
|
||||||
#define S_vibrating_square 64
|
S_vibrating_square,
|
||||||
|
|
||||||
/* end traps, begin special effects */
|
/* end traps, begin special effects */
|
||||||
|
|
||||||
#define S_vbeam 65 /* The 4 zap beam symbols. Do NOT separate. */
|
S_vbeam, /* The 4 zap beam symbols. Do NOT separate. */
|
||||||
#define S_hbeam 66 /* To change order or add, see function */
|
S_hbeam, /* To change order or add, see function */
|
||||||
#define S_lslant 67 /* zapdir_to_glyph() in display.c. */
|
S_lslant, /* zapdir_to_glyph() in display.c. */
|
||||||
#define S_rslant 68
|
S_rslant,
|
||||||
#define S_digbeam 69 /* dig beam symbol */
|
S_digbeam, /* dig beam symbol */
|
||||||
#define S_flashbeam 70 /* camera flash symbol */
|
S_flashbeam, /* camera flash symbol */
|
||||||
#define S_boomleft 71 /* thrown boomerang, open left, e.g ')' */
|
S_boomleft, /* thrown boomerang, open left, e.g ')' */
|
||||||
#define S_boomright 72 /* thrown boomerang, open right, e.g. '(' */
|
S_boomright, /* thrown boomerang, open right, e.g. '(' */
|
||||||
#define S_ss1 73 /* 4 magic shield glyphs */
|
S_ss1, /* 4 magic shield glyphs */
|
||||||
#define S_ss2 74
|
S_ss2,
|
||||||
#define S_ss3 75
|
S_ss3,
|
||||||
#define S_ss4 76
|
S_ss4,
|
||||||
#define S_poisoncloud 77
|
S_poisoncloud,
|
||||||
#define S_goodpos 78 /* valid position for targeting */
|
S_goodpos, /* valid position for targeting */
|
||||||
|
|
||||||
/* The 8 swallow symbols. Do NOT separate. To change order or add, see */
|
/* The 8 swallow symbols. Do NOT separate. To change order or add, see */
|
||||||
/* the function swallow_to_glyph() in display.c. */
|
/* the function swallow_to_glyph() in display.c. */
|
||||||
#define S_sw_tl 79 /* swallow top left [1] */
|
S_sw_tl, /* swallow top left [1] */
|
||||||
#define S_sw_tc 80 /* swallow top center [2] Order: */
|
S_sw_tc, /* swallow top center [2] Order: */
|
||||||
#define S_sw_tr 81 /* swallow top right [3] */
|
S_sw_tr, /* swallow top right [3] */
|
||||||
#define S_sw_ml 82 /* swallow middle left [4] 1 2 3 */
|
S_sw_ml, /* swallow middle left [4] 1 2 3 */
|
||||||
#define S_sw_mr 83 /* swallow middle right [6] 4 5 6 */
|
S_sw_mr, /* swallow middle right [6] 4 5 6 */
|
||||||
#define S_sw_bl 84 /* swallow bottom left [7] 7 8 9 */
|
S_sw_bl, /* swallow bottom left [7] 7 8 9 */
|
||||||
#define S_sw_bc 85 /* swallow bottom center [8] */
|
S_sw_bc, /* swallow bottom center [8] */
|
||||||
#define S_sw_br 86 /* swallow bottom right [9] */
|
S_sw_br, /* swallow bottom right [9] */
|
||||||
|
|
||||||
#define S_explode1 87 /* explosion top left */
|
S_explode1, /* explosion top left */
|
||||||
#define S_explode2 88 /* explosion top center */
|
S_explode2, /* explosion top center */
|
||||||
#define S_explode3 89 /* explosion top right Ex. */
|
S_explode3, /* explosion top right Ex. */
|
||||||
#define S_explode4 90 /* explosion middle left */
|
S_explode4, /* explosion middle left */
|
||||||
#define S_explode5 91 /* explosion middle center /-\ */
|
S_explode5, /* explosion middle center /-\ */
|
||||||
#define S_explode6 92 /* explosion middle right |@| */
|
S_explode6, /* explosion middle right |@| */
|
||||||
#define S_explode7 93 /* explosion bottom left \-/ */
|
S_explode7, /* explosion bottom left \-/ */
|
||||||
#define S_explode8 94 /* explosion bottom center */
|
S_explode8, /* explosion bottom center */
|
||||||
#define S_explode9 95 /* explosion bottom right */
|
S_explode9, /* explosion bottom right */
|
||||||
|
|
||||||
/* end effects */
|
/* end effects */
|
||||||
|
|
||||||
#define MAXPCHARS 96 /* maximum number of mapped characters */
|
MAXPCHARS /* maximum number of mapped characters */
|
||||||
#define MAXDCHARS 42 /* maximum of mapped dungeon characters */
|
};
|
||||||
#define MAXTCHARS 22 /* maximum of mapped trap characters */
|
|
||||||
#define MAXECHARS 31 /* maximum of mapped effects characters */
|
#define MAXDCHARS (S_water - S_stone + 1) /* maximum of mapped dungeon characters */
|
||||||
|
#define MAXTCHARS (S_vibrating_square - S_arrow_trap + 1) /* maximum of mapped trap characters */
|
||||||
|
#define MAXECHARS (S_explode9 - S_vbeam + 1) /* maximum of mapped effects characters */
|
||||||
#define MAXEXPCHARS 9 /* number of explosion characters */
|
#define MAXEXPCHARS 9 /* number of explosion characters */
|
||||||
|
|
||||||
#define DARKROOMSYM (Is_rogue_level(&u.uz) ? S_stone : S_darkroom)
|
#define DARKROOMSYM (Is_rogue_level(&u.uz) ? S_stone : S_darkroom)
|
||||||
|
|||||||
+7
-5
@@ -35,11 +35,13 @@
|
|||||||
#define FLAG_CONWAY 0x00002000L /* avoid confusion with the value of CONWAY */
|
#define FLAG_CONWAY 0x00002000L /* avoid confusion with the value of CONWAY */
|
||||||
|
|
||||||
/* different level layout initializers */
|
/* different level layout initializers */
|
||||||
#define LVLINIT_NONE 0
|
enum lvlinit_types {
|
||||||
#define LVLINIT_SOLIDFILL 1
|
LVLINIT_NONE = 0,
|
||||||
#define LVLINIT_MAZEGRID 2
|
LVLINIT_SOLIDFILL,
|
||||||
#define LVLINIT_MINES 3
|
LVLINIT_MAZEGRID,
|
||||||
#define LVLINIT_ROGUE 4
|
LVLINIT_MINES,
|
||||||
|
LVLINIT_ROGUE
|
||||||
|
};
|
||||||
|
|
||||||
/* max. layers of object containment */
|
/* max. layers of object containment */
|
||||||
#define MAX_CONTAINMENT 10
|
#define MAX_CONTAINMENT 10
|
||||||
|
|||||||
+17
-12
@@ -9,10 +9,12 @@
|
|||||||
typedef void FDECL((*timeout_proc), (ANY_P *, long));
|
typedef void FDECL((*timeout_proc), (ANY_P *, long));
|
||||||
|
|
||||||
/* kind of timer */
|
/* kind of timer */
|
||||||
#define TIMER_LEVEL 0 /* event specific to level */
|
enum timer_type {
|
||||||
#define TIMER_GLOBAL 1 /* event follows current play */
|
TIMER_LEVEL = 0, /* event specific to level */
|
||||||
#define TIMER_OBJECT 2 /* event follows a object */
|
TIMER_GLOBAL, /* event follows current play */
|
||||||
#define TIMER_MONSTER 3 /* event follows a monster */
|
TIMER_OBJECT, /* event follows a object */
|
||||||
|
TIMER_MONSTER /* event follows a monster */
|
||||||
|
};
|
||||||
|
|
||||||
/* save/restore timer ranges */
|
/* save/restore timer ranges */
|
||||||
#define RANGE_LEVEL 0 /* save/restore timers staying on level */
|
#define RANGE_LEVEL 0 /* save/restore timers staying on level */
|
||||||
@@ -22,14 +24,17 @@ typedef void FDECL((*timeout_proc), (ANY_P *, long));
|
|||||||
* Timeout functions. Add a define here, then put it in the table
|
* Timeout functions. Add a define here, then put it in the table
|
||||||
* in timeout.c. "One more level of indirection will fix everything."
|
* in timeout.c. "One more level of indirection will fix everything."
|
||||||
*/
|
*/
|
||||||
#define ROT_ORGANIC 0 /* for buried organics */
|
enum timeout_types {
|
||||||
#define ROT_CORPSE 1
|
ROT_ORGANIC = 0, /* for buried organics */
|
||||||
#define REVIVE_MON 2
|
ROT_CORPSE,
|
||||||
#define BURN_OBJECT 3
|
REVIVE_MON,
|
||||||
#define HATCH_EGG 4
|
BURN_OBJECT,
|
||||||
#define FIG_TRANSFORM 5
|
HATCH_EGG,
|
||||||
#define MELT_ICE_AWAY 6
|
FIG_TRANSFORM,
|
||||||
#define NUM_TIME_FUNCS 7
|
MELT_ICE_AWAY,
|
||||||
|
|
||||||
|
NUM_TIME_FUNCS
|
||||||
|
};
|
||||||
|
|
||||||
/* used in timeout.c */
|
/* used in timeout.c */
|
||||||
typedef struct fe {
|
typedef struct fe {
|
||||||
|
|||||||
+28
-25
@@ -53,30 +53,33 @@ extern struct trap *ftrap;
|
|||||||
/* Note: if adding/removing a trap, adjust trap_engravings[] in mklev.c */
|
/* Note: if adding/removing a trap, adjust trap_engravings[] in mklev.c */
|
||||||
|
|
||||||
/* unconditional traps */
|
/* unconditional traps */
|
||||||
#define NO_TRAP 0
|
enum trap_types {
|
||||||
#define ARROW_TRAP 1
|
NO_TRAP = 0,
|
||||||
#define DART_TRAP 2
|
ARROW_TRAP,
|
||||||
#define ROCKTRAP 3
|
DART_TRAP,
|
||||||
#define SQKY_BOARD 4
|
ROCKTRAP,
|
||||||
#define BEAR_TRAP 5
|
SQKY_BOARD,
|
||||||
#define LANDMINE 6
|
BEAR_TRAP,
|
||||||
#define ROLLING_BOULDER_TRAP 7
|
LANDMINE,
|
||||||
#define SLP_GAS_TRAP 8
|
ROLLING_BOULDER_TRAP,
|
||||||
#define RUST_TRAP 9
|
SLP_GAS_TRAP,
|
||||||
#define FIRE_TRAP 10
|
RUST_TRAP,
|
||||||
#define PIT 11
|
FIRE_TRAP,
|
||||||
#define SPIKED_PIT 12
|
PIT,
|
||||||
#define HOLE 13
|
SPIKED_PIT,
|
||||||
#define TRAPDOOR 14
|
HOLE,
|
||||||
#define TELEP_TRAP 15
|
TRAPDOOR,
|
||||||
#define LEVEL_TELEP 16
|
TELEP_TRAP,
|
||||||
#define MAGIC_PORTAL 17
|
LEVEL_TELEP,
|
||||||
#define WEB 18
|
MAGIC_PORTAL,
|
||||||
#define STATUE_TRAP 19
|
WEB,
|
||||||
#define MAGIC_TRAP 20
|
STATUE_TRAP,
|
||||||
#define ANTI_MAGIC 21
|
MAGIC_TRAP,
|
||||||
#define POLY_TRAP 22
|
ANTI_MAGIC,
|
||||||
#define VIBRATING_SQUARE 23
|
POLY_TRAP,
|
||||||
#define TRAPNUM 24
|
VIBRATING_SQUARE,
|
||||||
|
|
||||||
|
TRAPNUM
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* TRAP_H */
|
#endif /* TRAP_H */
|
||||||
|
|||||||
+18
-18
@@ -29,24 +29,24 @@ typedef union any {
|
|||||||
/* (buggy old Ultrix compiler) */
|
/* (buggy old Ultrix compiler) */
|
||||||
|
|
||||||
/* symbolic names for the data types housed in anything */
|
/* symbolic names for the data types housed in anything */
|
||||||
/* clang-format off */
|
enum any_types {
|
||||||
#define ANY_VOID 1
|
ANY_VOID = 1,
|
||||||
#define ANY_OBJ 2 /* struct obj */
|
ANY_OBJ, /* struct obj */
|
||||||
#define ANY_MONST 3 /* struct monst (not used) */
|
ANY_MONST, /* struct monst (not used) */
|
||||||
#define ANY_INT 4 /* int */
|
ANY_INT, /* int */
|
||||||
#define ANY_CHAR 5 /* char */
|
ANY_CHAR, /* char */
|
||||||
#define ANY_UCHAR 6 /* unsigned char */
|
ANY_UCHAR, /* unsigned char */
|
||||||
#define ANY_SCHAR 7 /* signed char */
|
ANY_SCHAR, /* signed char */
|
||||||
#define ANY_UINT 8 /* unsigned int */
|
ANY_UINT, /* unsigned int */
|
||||||
#define ANY_LONG 9 /* long */
|
ANY_LONG, /* long */
|
||||||
#define ANY_ULONG 10 /* unsigned long */
|
ANY_ULONG, /* unsigned long */
|
||||||
#define ANY_IPTR 11 /* pointer to int */
|
ANY_IPTR, /* pointer to int */
|
||||||
#define ANY_UPTR 12 /* pointer to unsigned int */
|
ANY_UPTR, /* pointer to unsigned int */
|
||||||
#define ANY_LPTR 13 /* pointer to long */
|
ANY_LPTR, /* pointer to long */
|
||||||
#define ANY_ULPTR 14 /* pointer to unsigned long */
|
ANY_ULPTR, /* pointer to unsigned long */
|
||||||
#define ANY_STR 15 /* pointer to null-terminated char string */
|
ANY_STR, /* pointer to null-terminated char string */
|
||||||
#define ANY_MASK32 16 /* 32-bit mask (stored as unsigned long) */
|
ANY_MASK32 /* 32-bit mask (stored as unsigned long) */
|
||||||
/* clang-format on */
|
};
|
||||||
|
|
||||||
/* menu return list */
|
/* menu return list */
|
||||||
typedef struct mi {
|
typedef struct mi {
|
||||||
|
|||||||
+4
-4
@@ -2695,7 +2695,7 @@ struct obj *obj;
|
|||||||
pline1(msg_slipsfree);
|
pline1(msg_slipsfree);
|
||||||
}
|
}
|
||||||
if (mtmp)
|
if (mtmp)
|
||||||
wakeup(mtmp);
|
wakeup(mtmp, TRUE);
|
||||||
} else
|
} else
|
||||||
pline1(msg_snap);
|
pline1(msg_snap);
|
||||||
|
|
||||||
@@ -2789,7 +2789,7 @@ struct obj *obj;
|
|||||||
} else {
|
} else {
|
||||||
pline1(msg_slipsfree);
|
pline1(msg_slipsfree);
|
||||||
}
|
}
|
||||||
wakeup(mtmp);
|
wakeup(mtmp, TRUE);
|
||||||
} else {
|
} else {
|
||||||
if (mtmp->m_ap_type && !Protection_from_shape_changers
|
if (mtmp->m_ap_type && !Protection_from_shape_changers
|
||||||
&& !sensemon(mtmp))
|
&& !sensemon(mtmp))
|
||||||
@@ -3210,8 +3210,8 @@ struct obj *obj;
|
|||||||
You("don't have the strength to break %s!", yname(obj));
|
You("don't have the strength to break %s!", yname(obj));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pline("Raising %s high above your %s, you break it in two!", yname(obj),
|
pline("Raising %s high above your %s, you %s it in two!", yname(obj),
|
||||||
body_part(HEAD));
|
body_part(HEAD), is_fragile ? "snap" : "break");
|
||||||
|
|
||||||
/* [ALI] Do this first so that wand is removed from bill. Otherwise,
|
/* [ALI] Do this first so that wand is removed from bill. Otherwise,
|
||||||
* the freeinv() below also hides it from setpaid() which causes problems.
|
* the freeinv() below also hides it from setpaid() which causes problems.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
|
#include "lev.h"
|
||||||
#include "func_tab.h"
|
#include "func_tab.h"
|
||||||
|
|
||||||
#ifdef ALTMETA
|
#ifdef ALTMETA
|
||||||
@@ -123,6 +124,7 @@ STATIC_PTR int NDECL(wiz_wish);
|
|||||||
STATIC_PTR int NDECL(wiz_identify);
|
STATIC_PTR int NDECL(wiz_identify);
|
||||||
STATIC_PTR int NDECL(wiz_intrinsic);
|
STATIC_PTR int NDECL(wiz_intrinsic);
|
||||||
STATIC_PTR int NDECL(wiz_map);
|
STATIC_PTR int NDECL(wiz_map);
|
||||||
|
STATIC_PTR int NDECL(wiz_makemap);
|
||||||
STATIC_PTR int NDECL(wiz_genesis);
|
STATIC_PTR int NDECL(wiz_genesis);
|
||||||
STATIC_PTR int NDECL(wiz_where);
|
STATIC_PTR int NDECL(wiz_where);
|
||||||
STATIC_PTR int NDECL(wiz_detect);
|
STATIC_PTR int NDECL(wiz_detect);
|
||||||
@@ -327,8 +329,9 @@ doextcmd(VOID_ARGS)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (iflags.menu_requested && !accept_menu_prefix(func)) {
|
if (iflags.menu_requested && !accept_menu_prefix(func)) {
|
||||||
pline("'%s' prefix has no effect for this command.",
|
pline("'%s' prefix has no effect for the %s command.",
|
||||||
visctrl(Cmd.spkeys[NHKF_REQMENU]));
|
visctrl(Cmd.spkeys[NHKF_REQMENU]),
|
||||||
|
extcmdlist[idx].ef_txt);
|
||||||
iflags.menu_requested = FALSE;
|
iflags.menu_requested = FALSE;
|
||||||
}
|
}
|
||||||
retval = (*func)();
|
retval = (*func)();
|
||||||
@@ -344,13 +347,18 @@ doextlist(VOID_ARGS)
|
|||||||
register const struct ext_func_tab *efp;
|
register const struct ext_func_tab *efp;
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
winid datawin;
|
winid datawin;
|
||||||
|
char ch = cmd_from_func(doextcmd);
|
||||||
|
|
||||||
datawin = create_nhwindow(NHW_TEXT);
|
datawin = create_nhwindow(NHW_TEXT);
|
||||||
putstr(datawin, 0, "");
|
putstr(datawin, 0, "");
|
||||||
putstr(datawin, 0, " Extended Commands List");
|
putstr(datawin, 0, " Extended Commands List");
|
||||||
putstr(datawin, 0, "");
|
putstr(datawin, 0, "");
|
||||||
putstr(datawin, 0, " Press '#', then type:");
|
if (ch) {
|
||||||
putstr(datawin, 0, "");
|
Sprintf(buf, " Press '%s', then type:",
|
||||||
|
visctrl(ch));
|
||||||
|
putstr(datawin, 0, buf);
|
||||||
|
putstr(datawin, 0, "");
|
||||||
|
}
|
||||||
|
|
||||||
for (efp = extcmdlist; efp->ef_txt; efp++) {
|
for (efp = extcmdlist; efp->ef_txt; efp++) {
|
||||||
if (!wizard && (efp->flags & WIZMODECMD))
|
if (!wizard && (efp->flags & WIZMODECMD))
|
||||||
@@ -610,6 +618,22 @@ wiz_identify(VOID_ARGS)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC_PTR int
|
||||||
|
wiz_makemap(VOID_ARGS)
|
||||||
|
{
|
||||||
|
if (wizard) {
|
||||||
|
savelev(-1, ledger_no(&u.uz), FREE_SAVE);
|
||||||
|
mklev();
|
||||||
|
reglyph_darkroom();
|
||||||
|
vision_reset();
|
||||||
|
vision_full_recalc = 1;
|
||||||
|
(void) safe_teleds(TRUE);
|
||||||
|
docrt();
|
||||||
|
flush_screen(1);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* ^F command - reveal the level map and any traps on it */
|
/* ^F command - reveal the level map and any traps on it */
|
||||||
STATIC_PTR int
|
STATIC_PTR int
|
||||||
wiz_map(VOID_ARGS)
|
wiz_map(VOID_ARGS)
|
||||||
@@ -2812,6 +2836,7 @@ struct ext_func_tab extcmdlist[] = {
|
|||||||
{ C('i'), "wizidentify", "identify all items in inventory", wiz_identify, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
{ C('i'), "wizidentify", "identify all items in inventory", wiz_identify, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||||
{ '\0', "wizintrinsic", "set intrinsic", wiz_intrinsic, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
{ '\0', "wizintrinsic", "set intrinsic", wiz_intrinsic, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||||
{ C('v'), "wizlevelport", "teleport to another level", wiz_level_tele, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
{ C('v'), "wizlevelport", "teleport to another level", wiz_level_tele, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||||
|
{ '\0', "wizmakemap", "recreate the current level", wiz_makemap, IFBURIED|WIZMODECMD },
|
||||||
{ C('f'), "wizmap", "map the level", wiz_map, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
{ C('f'), "wizmap", "map the level", wiz_map, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||||
{ '\0', "wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
{ '\0', "wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||||
{ '\0', "wizsmell", "smell monster", wiz_smell, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
{ '\0', "wizsmell", "smell monster", wiz_smell, IFBURIED|AUTOCOMPLETE|WIZMODECMD },
|
||||||
@@ -3519,9 +3544,11 @@ struct {
|
|||||||
{ NHKF_GETPOS_DOOR_PREV, 'D', "getpos.door.prev" },
|
{ NHKF_GETPOS_DOOR_PREV, 'D', "getpos.door.prev" },
|
||||||
{ NHKF_GETPOS_UNEX_NEXT, 'x', "getpos.unexplored.next" },
|
{ NHKF_GETPOS_UNEX_NEXT, 'x', "getpos.unexplored.next" },
|
||||||
{ NHKF_GETPOS_UNEX_PREV, 'X', "getpos.unexplored.prev" },
|
{ NHKF_GETPOS_UNEX_PREV, 'X', "getpos.unexplored.prev" },
|
||||||
|
{ NHKF_GETPOS_INTERESTING_NEXT, 'a', "getpos.all.next" },
|
||||||
|
{ NHKF_GETPOS_INTERESTING_PREV, 'A', "getpos.all.prev" },
|
||||||
{ NHKF_GETPOS_HELP, '?', "getpos.help" },
|
{ NHKF_GETPOS_HELP, '?', "getpos.help" },
|
||||||
{ NHKF_GETPOS_MENU, 'A', "getpos.menu" },
|
{ NHKF_GETPOS_LIMITVIEW, '"', "getpos.inview" },
|
||||||
{ NHKF_GETPOS_MENU_FOV, 'a', "getpos.menu.cansee" }
|
{ NHKF_GETPOS_MENU, '!', "getpos.menu" }
|
||||||
};
|
};
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
@@ -4702,7 +4729,7 @@ dotravel(VOID_ARGS)
|
|||||||
}
|
}
|
||||||
iflags.getloc_travelmode = TRUE;
|
iflags.getloc_travelmode = TRUE;
|
||||||
if (iflags.menu_requested) {
|
if (iflags.menu_requested) {
|
||||||
if (!getpos_menu(&cc, TRUE)) {
|
if (!getpos_menu(&cc, TRUE, GLOC_INTERESTING)) {
|
||||||
iflags.getloc_travelmode = FALSE;
|
iflags.getloc_travelmode = FALSE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2008,7 +2008,7 @@ struct monst *mtmp;
|
|||||||
}
|
}
|
||||||
|
|
||||||
mtmp->mburied = TRUE;
|
mtmp->mburied = TRUE;
|
||||||
wakeup(mtmp); /* at least give it a chance :-) */
|
wakeup(mtmp, FALSE); /* at least give it a chance :-) */
|
||||||
newsym(mtmp->mx, mtmp->my);
|
newsym(mtmp->mx, mtmp->my);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+104
-57
@@ -44,6 +44,35 @@ void FDECL((*f), (int));
|
|||||||
getpos_hilitefunc = f;
|
getpos_hilitefunc = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *const gloc_descr[NUM_GLOCS][4] = {
|
||||||
|
{ "any monsters", "monster", "next monster", "monsters" },
|
||||||
|
{ "any items", "item", "next object", "objects" },
|
||||||
|
{ "any doors", "door", "next door or doorway", "doors or doorways" },
|
||||||
|
{ "any unexplored areas", "unexplored area", "unexplored location",
|
||||||
|
"unexplored locations" },
|
||||||
|
{ "anything interesting", "interesting thing", "anything interesting",
|
||||||
|
"anything interesting" }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
getpos_help_keyxhelp(tmpwin, k1, k2, gloc)
|
||||||
|
winid tmpwin;
|
||||||
|
const char *k1;
|
||||||
|
const char *k2;
|
||||||
|
int gloc;
|
||||||
|
{
|
||||||
|
char sbuf[BUFSZ];
|
||||||
|
|
||||||
|
Sprintf(sbuf, "Use '%s' or '%s' to %s%s%s.",
|
||||||
|
k1, k2,
|
||||||
|
iflags.getloc_usemenu ? "get a menu of "
|
||||||
|
: "move the cursor to ",
|
||||||
|
gloc_descr[gloc][2 + iflags.getloc_usemenu],
|
||||||
|
iflags.getloc_limitview ? " in view" : "");
|
||||||
|
putstr(tmpwin, 0, sbuf);
|
||||||
|
}
|
||||||
|
|
||||||
/* the response for '?' help request in getpos() */
|
/* the response for '?' help request in getpos() */
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
getpos_help(force, goal)
|
getpos_help(force, goal)
|
||||||
@@ -54,46 +83,51 @@ const char *goal;
|
|||||||
boolean doing_what_is;
|
boolean doing_what_is;
|
||||||
winid tmpwin = create_nhwindow(NHW_MENU);
|
winid tmpwin = create_nhwindow(NHW_MENU);
|
||||||
|
|
||||||
Sprintf(sbuf, "Use '%c', '%c', '%c', '%c' to move the cursor to %s.", /* hjkl */
|
Sprintf(sbuf,
|
||||||
|
"Use '%c', '%c', '%c', '%c' to move the cursor to %s.", /* hjkl */
|
||||||
Cmd.move_W, Cmd.move_S, Cmd.move_N, Cmd.move_E, goal);
|
Cmd.move_W, Cmd.move_S, Cmd.move_N, Cmd.move_E, goal);
|
||||||
putstr(tmpwin, 0, sbuf);
|
putstr(tmpwin, 0, sbuf);
|
||||||
putstr(tmpwin, 0, "Use 'H', 'J', 'K', 'L' to move the cursor 8 units at a time.");
|
putstr(tmpwin, 0,
|
||||||
|
"Use 'H', 'J', 'K', 'L' to move the cursor 8 units at a time.");
|
||||||
putstr(tmpwin, 0, "Or enter a background symbol (ex. '<').");
|
putstr(tmpwin, 0, "Or enter a background symbol (ex. '<').");
|
||||||
Sprintf(sbuf, "Use '%s' to move the cursor on yourself.",
|
Sprintf(sbuf, "Use '%s' to move the cursor on yourself.",
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_SELF]));
|
visctrl(Cmd.spkeys[NHKF_GETPOS_SELF]));
|
||||||
putstr(tmpwin, 0, sbuf);
|
putstr(tmpwin, 0, sbuf);
|
||||||
if (!iflags.terrainmode || (iflags.terrainmode & TER_MON) != 0) {
|
if (!iflags.terrainmode || (iflags.terrainmode & TER_MON) != 0) {
|
||||||
Sprintf(sbuf, "Use '%s' or '%s' to move the cursor to next monster.",
|
getpos_help_keyxhelp(tmpwin,
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_MON_NEXT]),
|
visctrl(Cmd.spkeys[NHKF_GETPOS_MON_NEXT]),
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_MON_PREV]));
|
visctrl(Cmd.spkeys[NHKF_GETPOS_MON_PREV]),
|
||||||
putstr(tmpwin, 0, sbuf);
|
GLOC_MONS);
|
||||||
}
|
}
|
||||||
if (!iflags.terrainmode || (iflags.terrainmode & TER_OBJ) != 0) {
|
if (!iflags.terrainmode || (iflags.terrainmode & TER_OBJ) != 0) {
|
||||||
Sprintf(sbuf, "Use '%s' or '%s' to move the cursor to next object.",
|
getpos_help_keyxhelp(tmpwin,
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_OBJ_NEXT]),
|
visctrl(Cmd.spkeys[NHKF_GETPOS_OBJ_NEXT]),
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_OBJ_PREV]));
|
visctrl(Cmd.spkeys[NHKF_GETPOS_OBJ_PREV]),
|
||||||
putstr(tmpwin, 0, sbuf);
|
GLOC_OBJS);
|
||||||
}
|
}
|
||||||
if (!iflags.terrainmode || (iflags.terrainmode & TER_MAP) != 0) {
|
if (!iflags.terrainmode || (iflags.terrainmode & TER_MAP) != 0) {
|
||||||
/* both of these are primarily useful when choosing a travel
|
/* these are primarily useful when choosing a travel
|
||||||
destination for the '_' command */
|
destination for the '_' command */
|
||||||
Sprintf(sbuf,
|
getpos_help_keyxhelp(tmpwin,
|
||||||
"Use '%s' or '%s' to move the cursor to next door or doorway.",
|
visctrl(Cmd.spkeys[NHKF_GETPOS_DOOR_NEXT]),
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_DOOR_NEXT]),
|
visctrl(Cmd.spkeys[NHKF_GETPOS_DOOR_PREV]),
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_DOOR_PREV]));
|
GLOC_DOOR);
|
||||||
putstr(tmpwin, 0, sbuf);
|
getpos_help_keyxhelp(tmpwin,
|
||||||
Sprintf(sbuf,
|
visctrl(Cmd.spkeys[NHKF_GETPOS_UNEX_NEXT]),
|
||||||
"Use '%s' or '%s' to move the cursor to unexplored location.",
|
visctrl(Cmd.spkeys[NHKF_GETPOS_UNEX_PREV]),
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_UNEX_NEXT]),
|
GLOC_EXPLORE);
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_UNEX_PREV]));
|
getpos_help_keyxhelp(tmpwin,
|
||||||
putstr(tmpwin, 0, sbuf);
|
visctrl(Cmd.spkeys[NHKF_GETPOS_INTERESTING_NEXT]),
|
||||||
|
visctrl(Cmd.spkeys[NHKF_GETPOS_INTERESTING_PREV]),
|
||||||
|
GLOC_INTERESTING);
|
||||||
}
|
}
|
||||||
Sprintf(sbuf, "Use '%s' for a menu of interesting targets in view.",
|
Sprintf(sbuf, "Use '%s' to toggle menu listing for possible targets.",
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_MENU_FOV]));
|
|
||||||
putstr(tmpwin, 0, sbuf);
|
|
||||||
Sprintf(sbuf, "Use '%s' for a menu of all interesting targets.",
|
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_MENU]));
|
visctrl(Cmd.spkeys[NHKF_GETPOS_MENU]));
|
||||||
putstr(tmpwin, 0, sbuf);
|
putstr(tmpwin, 0, sbuf);
|
||||||
|
Sprintf(sbuf,
|
||||||
|
"Use '%s' to toggle limiting possible targets to in view only.",
|
||||||
|
visctrl(Cmd.spkeys[NHKF_GETPOS_LIMITVIEW]));
|
||||||
|
putstr(tmpwin, 0, sbuf);
|
||||||
if (!iflags.terrainmode) {
|
if (!iflags.terrainmode) {
|
||||||
char kbuf[BUFSZ];
|
char kbuf[BUFSZ];
|
||||||
if (getpos_hilitefunc) {
|
if (getpos_hilitefunc) {
|
||||||
@@ -127,7 +161,7 @@ const char *goal;
|
|||||||
putstr(tmpwin, 0, sbuf);
|
putstr(tmpwin, 0, sbuf);
|
||||||
if (doing_what_is) {
|
if (doing_what_is) {
|
||||||
Sprintf(sbuf,
|
Sprintf(sbuf,
|
||||||
" '%s' describe current spot, show 'more info', move to another spot.",
|
" '%s' describe current spot, show 'more info', move to another spot.",
|
||||||
visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_V]));
|
visctrl(Cmd.spkeys[NHKF_GETPOS_PICK_V]));
|
||||||
putstr(tmpwin, 0, sbuf);
|
putstr(tmpwin, 0, sbuf);
|
||||||
Sprintf(sbuf,
|
Sprintf(sbuf,
|
||||||
@@ -174,19 +208,6 @@ const void *b;
|
|||||||
return dist_1 - dist_2;
|
return dist_1 - dist_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum gloctypes {
|
|
||||||
GLOC_MONS = 0,
|
|
||||||
GLOC_OBJS,
|
|
||||||
GLOC_DOOR,
|
|
||||||
GLOC_EXPLORE,
|
|
||||||
|
|
||||||
NUM_GLOCS,
|
|
||||||
|
|
||||||
GLOC_INTERESTING,
|
|
||||||
GLOC_INTERESTING_FOV
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#define IS_UNEXPLORED_LOC(x,y) \
|
#define IS_UNEXPLORED_LOC(x,y) \
|
||||||
(isok((x), (y)) \
|
(isok((x), (y)) \
|
||||||
&& glyph_is_cmap(levl[(x)][(y)].glyph) \
|
&& glyph_is_cmap(levl[(x)][(y)].glyph) \
|
||||||
@@ -202,6 +223,9 @@ int x,y, gloc;
|
|||||||
*/
|
*/
|
||||||
int glyph = glyph_at(x, y);
|
int glyph = glyph_at(x, y);
|
||||||
|
|
||||||
|
if (iflags.getloc_limitview && !cansee(x,y))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
switch (gloc) {
|
switch (gloc) {
|
||||||
default:
|
default:
|
||||||
case GLOC_MONS:
|
case GLOC_MONS:
|
||||||
@@ -231,9 +255,6 @@ int x,y, gloc;
|
|||||||
|| IS_UNEXPLORED_LOC(x - 1, y)
|
|| IS_UNEXPLORED_LOC(x - 1, y)
|
||||||
|| IS_UNEXPLORED_LOC(x, y + 1)
|
|| IS_UNEXPLORED_LOC(x, y + 1)
|
||||||
|| IS_UNEXPLORED_LOC(x, y - 1)));
|
|| IS_UNEXPLORED_LOC(x, y - 1)));
|
||||||
case GLOC_INTERESTING_FOV:
|
|
||||||
if (!cansee(x,y))
|
|
||||||
return FALSE;
|
|
||||||
case GLOC_INTERESTING:
|
case GLOC_INTERESTING:
|
||||||
return gather_locs_interesting(x,y, GLOC_DOOR)
|
return gather_locs_interesting(x,y, GLOC_DOOR)
|
||||||
|| !(glyph_is_cmap(glyph)
|
|| !(glyph_is_cmap(glyph)
|
||||||
@@ -400,9 +421,10 @@ int cx, cy;
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
getpos_menu(ccp, fovonly)
|
getpos_menu(ccp, fovonly, gloc)
|
||||||
coord *ccp;
|
coord *ccp;
|
||||||
boolean fovonly;
|
boolean fovonly;
|
||||||
|
int gloc;
|
||||||
{
|
{
|
||||||
coord *garr = DUMMY;
|
coord *garr = DUMMY;
|
||||||
int gcount = 0;
|
int gcount = 0;
|
||||||
@@ -412,10 +434,12 @@ boolean fovonly;
|
|||||||
menu_item *picks = (menu_item *) 0;
|
menu_item *picks = (menu_item *) 0;
|
||||||
char tmpbuf[BUFSZ];
|
char tmpbuf[BUFSZ];
|
||||||
|
|
||||||
gather_locs(&garr, &gcount,
|
gather_locs(&garr, &gcount, gloc);
|
||||||
fovonly ? GLOC_INTERESTING_FOV : GLOC_INTERESTING);
|
|
||||||
if (gcount < 2) { /* gcount always includes the hero */
|
if (gcount < 2) { /* gcount always includes the hero */
|
||||||
You("cannot %s anything interesting.", fovonly ? "see" : "detect");
|
free((genericptr_t) garr);
|
||||||
|
You("cannot %s %s.",
|
||||||
|
fovonly ? "see" : "detect", gloc_descr[gloc][0]);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,7 +447,8 @@ boolean fovonly;
|
|||||||
start_menu(tmpwin);
|
start_menu(tmpwin);
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
|
|
||||||
for (i = 0; i < gcount; i++) {
|
/* gather_locs returns array[0] == you. skip it. */
|
||||||
|
for (i = 1; i < gcount; i++) {
|
||||||
char fullbuf[BUFSZ];
|
char fullbuf[BUFSZ];
|
||||||
coord tmpcc;
|
coord tmpcc;
|
||||||
const char *firstmatch = "unknown";
|
const char *firstmatch = "unknown";
|
||||||
@@ -439,8 +464,8 @@ boolean fovonly;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Sprintf(tmpbuf, "Pick a target%s%s",
|
Sprintf(tmpbuf, "Pick a target %s%s%s",
|
||||||
fovonly ? " in view" : "",
|
gloc_descr[gloc][1], fovonly ? " in view" : "",
|
||||||
iflags.getloc_travelmode ? " for travel" : "");
|
iflags.getloc_travelmode ? " for travel" : "");
|
||||||
end_menu(tmpwin, tmpbuf);
|
end_menu(tmpwin, tmpbuf);
|
||||||
pick_cnt = select_menu(tmpwin, PICK_ONE, &picks);
|
pick_cnt = select_menu(tmpwin, PICK_ONE, &picks);
|
||||||
@@ -477,10 +502,12 @@ const char *goal;
|
|||||||
NHKF_GETPOS_DOOR_NEXT,
|
NHKF_GETPOS_DOOR_NEXT,
|
||||||
NHKF_GETPOS_DOOR_PREV,
|
NHKF_GETPOS_DOOR_PREV,
|
||||||
NHKF_GETPOS_UNEX_NEXT,
|
NHKF_GETPOS_UNEX_NEXT,
|
||||||
NHKF_GETPOS_UNEX_PREV
|
NHKF_GETPOS_UNEX_PREV,
|
||||||
|
NHKF_GETPOS_INTERESTING_NEXT,
|
||||||
|
NHKF_GETPOS_INTERESTING_PREV
|
||||||
};
|
};
|
||||||
char pick_chars[6];
|
char pick_chars[6];
|
||||||
char mMoOdDxX[9];
|
char mMoOdDxX[11];
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int cx, cy, i, c;
|
int cx, cy, i, c;
|
||||||
int sidx, tx, ty;
|
int sidx, tx, ty;
|
||||||
@@ -617,13 +644,24 @@ const char *goal;
|
|||||||
show_goal_msg = TRUE;
|
show_goal_msg = TRUE;
|
||||||
msg_given = TRUE;
|
msg_given = TRUE;
|
||||||
goto nxtc;
|
goto nxtc;
|
||||||
} else if (c == Cmd.spkeys[NHKF_GETPOS_MENU]
|
} else if (c == Cmd.spkeys[NHKF_GETPOS_LIMITVIEW]) {
|
||||||
|| c == Cmd.spkeys[NHKF_GETPOS_MENU_FOV]) {
|
iflags.getloc_limitview = !iflags.getloc_limitview;
|
||||||
coord tmpcrd;
|
for (i = 0; i < NUM_GLOCS; i++) {
|
||||||
if (getpos_menu(&tmpcrd, (c == Cmd.spkeys[NHKF_GETPOS_MENU_FOV]))) {
|
if (garr[i]) {
|
||||||
cx = tmpcrd.x;
|
free((genericptr_t) garr[i]);
|
||||||
cy = tmpcrd.y;
|
garr[i] = NULL;
|
||||||
|
}
|
||||||
|
gidx[i] = gcount[i] = 0;
|
||||||
}
|
}
|
||||||
|
pline("%s possible targets to those in sight only.",
|
||||||
|
iflags.getloc_limitview ? "Limiting" : "Not limiting");
|
||||||
|
msg_given = TRUE;
|
||||||
|
goto nxtc;
|
||||||
|
} else if (c == Cmd.spkeys[NHKF_GETPOS_MENU]) {
|
||||||
|
iflags.getloc_usemenu = !iflags.getloc_usemenu;
|
||||||
|
pline("%s a menu to show possible targets.",
|
||||||
|
iflags.getloc_usemenu ? "Using" : "Not using");
|
||||||
|
msg_given = TRUE;
|
||||||
goto nxtc;
|
goto nxtc;
|
||||||
} else if (c == Cmd.spkeys[NHKF_GETPOS_SELF]) {
|
} else if (c == Cmd.spkeys[NHKF_GETPOS_SELF]) {
|
||||||
/* reset 'm&M', 'o&O', &c; otherwise, there's no way for player
|
/* reset 'm&M', 'o&O', &c; otherwise, there's no way for player
|
||||||
@@ -638,6 +676,15 @@ const char *goal;
|
|||||||
int gtmp = (int) (cp - mMoOdDxX), /* 0..7 */
|
int gtmp = (int) (cp - mMoOdDxX), /* 0..7 */
|
||||||
gloc = gtmp >> 1; /* 0..3 */
|
gloc = gtmp >> 1; /* 0..3 */
|
||||||
|
|
||||||
|
if (iflags.getloc_usemenu) {
|
||||||
|
coord tmpcrd;
|
||||||
|
if (getpos_menu(&tmpcrd, iflags.getloc_limitview, gloc)) {
|
||||||
|
cx = tmpcrd.x;
|
||||||
|
cy = tmpcrd.y;
|
||||||
|
}
|
||||||
|
goto nxtc;
|
||||||
|
}
|
||||||
|
|
||||||
if (!garr[gloc]) {
|
if (!garr[gloc]) {
|
||||||
gather_locs(&garr[gloc], &gcount[gloc], gloc);
|
gather_locs(&garr[gloc], &gcount[gloc], gloc);
|
||||||
gidx[gloc] = 0; /* garr[][0] is hero's spot */
|
gidx[gloc] = 0; /* garr[][0] is hero's spot */
|
||||||
|
|||||||
+3
-3
@@ -156,7 +156,7 @@ xchar x, y;
|
|||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
/* anger target even if wild miss will occur */
|
/* anger target even if wild miss will occur */
|
||||||
setmangry(mon);
|
setmangry(mon, TRUE);
|
||||||
|
|
||||||
if (Levitation && !rn2(3) && verysmall(mon->data)
|
if (Levitation && !rn2(3) && verysmall(mon->data)
|
||||||
&& !is_flyer(mon->data)) {
|
&& !is_flyer(mon->data)) {
|
||||||
@@ -298,7 +298,7 @@ register struct obj *gold;
|
|||||||
|
|
||||||
if (!likes_gold(mtmp->data) && !mtmp->isshk && !mtmp->ispriest
|
if (!likes_gold(mtmp->data) && !mtmp->isshk && !mtmp->ispriest
|
||||||
&& !mtmp->isgd && !is_mercenary(mtmp->data)) {
|
&& !mtmp->isgd && !is_mercenary(mtmp->data)) {
|
||||||
wakeup(mtmp);
|
wakeup(mtmp, TRUE);
|
||||||
} else if (!mtmp->mcanmove) {
|
} else if (!mtmp->mcanmove) {
|
||||||
/* too light to do real damage */
|
/* too light to do real damage */
|
||||||
if (canseemon(mtmp)) {
|
if (canseemon(mtmp)) {
|
||||||
@@ -312,7 +312,7 @@ register struct obj *gold;
|
|||||||
mtmp->msleeping = 0;
|
mtmp->msleeping = 0;
|
||||||
finish_meating(mtmp);
|
finish_meating(mtmp);
|
||||||
if (!mtmp->isgd && !rn2(4)) /* not always pleasing */
|
if (!mtmp->isgd && !rn2(4)) /* not always pleasing */
|
||||||
setmangry(mtmp);
|
setmangry(mtmp, TRUE);
|
||||||
/* greedy monsters catch gold */
|
/* greedy monsters catch gold */
|
||||||
if (cansee(mtmp->mx, mtmp->my))
|
if (cansee(mtmp->mx, mtmp->my))
|
||||||
pline("%s catches the gold.", Monnam(mtmp));
|
pline("%s catches the gold.", Monnam(mtmp));
|
||||||
|
|||||||
+7
-5
@@ -608,7 +608,8 @@ int x, y;
|
|||||||
|
|
||||||
if ((mon = m_at(x, y)) != 0) {
|
if ((mon = m_at(x, y)) != 0) {
|
||||||
You("bump into %s.", a_monnam(mon));
|
You("bump into %s.", a_monnam(mon));
|
||||||
wakeup(mon);
|
wakeup(mon, FALSE);
|
||||||
|
setmangry(mon, FALSE);
|
||||||
wake_nearto(x,y, 10);
|
wake_nearto(x,y, 10);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1346,7 +1347,7 @@ boolean maybe_wakeup;
|
|||||||
else
|
else
|
||||||
miss(missile, mon);
|
miss(missile, mon);
|
||||||
if (maybe_wakeup && !rn2(3))
|
if (maybe_wakeup && !rn2(3))
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1448,7 +1449,8 @@ register struct obj *obj; /* thrownobj or kickedobj or uwep */
|
|||||||
at leader... (kicked artifact is ok too; HMON_APPLIED could
|
at leader... (kicked artifact is ok too; HMON_APPLIED could
|
||||||
occur if quest artifact polearm or grapnel ever gets added) */
|
occur if quest artifact polearm or grapnel ever gets added) */
|
||||||
if (hmode != HMON_APPLIED && quest_arti_hits_leader(obj, mon)) {
|
if (hmode != HMON_APPLIED && quest_arti_hits_leader(obj, mon)) {
|
||||||
/* not wakeup(), which angers non-tame monsters */
|
/* AIS: changes to wakeup() means that it's now less inappropriate here
|
||||||
|
than it used to be, but the manual version works just as well */
|
||||||
mon->msleeping = 0;
|
mon->msleeping = 0;
|
||||||
mon->mstrategy &= ~STRAT_WAITMASK;
|
mon->mstrategy &= ~STRAT_WAITMASK;
|
||||||
|
|
||||||
@@ -1562,7 +1564,7 @@ register struct obj *obj; /* thrownobj or kickedobj or uwep */
|
|||||||
} else {
|
} else {
|
||||||
tmiss(obj, mon, TRUE);
|
tmiss(obj, mon, TRUE);
|
||||||
if (hmode == HMON_APPLIED)
|
if (hmode == HMON_APPLIED)
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (otyp == HEAVY_IRON_BALL) {
|
} else if (otyp == HEAVY_IRON_BALL) {
|
||||||
@@ -1610,7 +1612,7 @@ register struct obj *obj; /* thrownobj or kickedobj or uwep */
|
|||||||
}
|
}
|
||||||
} else if (guaranteed_hit) {
|
} else if (guaranteed_hit) {
|
||||||
/* this assumes that guaranteed_hit is due to swallowing */
|
/* this assumes that guaranteed_hit is due to swallowing */
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
if (obj->otyp == CORPSE && touch_petrifies(&mons[obj->corpsenm])) {
|
if (obj->otyp == CORPSE && touch_petrifies(&mons[obj->corpsenm])) {
|
||||||
if (is_animal(u.ustuck->data)) {
|
if (is_animal(u.ustuck->data)) {
|
||||||
minstapetrify(u.ustuck, TRUE);
|
minstapetrify(u.ustuck, TRUE);
|
||||||
|
|||||||
+42
-17
@@ -62,6 +62,7 @@ STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P,
|
|||||||
STATIC_DCL mapseen *FDECL(load_mapseen, (int));
|
STATIC_DCL mapseen *FDECL(load_mapseen, (int));
|
||||||
STATIC_DCL void FDECL(save_mapseen, (int, mapseen *));
|
STATIC_DCL void FDECL(save_mapseen, (int, mapseen *));
|
||||||
STATIC_DCL mapseen *FDECL(find_mapseen, (d_level *));
|
STATIC_DCL mapseen *FDECL(find_mapseen, (d_level *));
|
||||||
|
STATIC_DCL mapseen *FDECL(find_mapseen_by_str, (const char *));
|
||||||
STATIC_DCL void FDECL(print_mapseen, (winid, mapseen *, int, int, BOOLEAN_P));
|
STATIC_DCL void FDECL(print_mapseen, (winid, mapseen *, int, int, BOOLEAN_P));
|
||||||
STATIC_DCL boolean FDECL(interest_mapseen, (mapseen *));
|
STATIC_DCL boolean FDECL(interest_mapseen, (mapseen *));
|
||||||
STATIC_DCL void FDECL(traverse_mapseenchn, (BOOLEAN_P, winid,
|
STATIC_DCL void FDECL(traverse_mapseenchn, (BOOLEAN_P, winid,
|
||||||
@@ -1642,25 +1643,35 @@ const char *nam;
|
|||||||
const char *p;
|
const char *p;
|
||||||
int idx, idxtoo;
|
int idx, idxtoo;
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
|
mapseen *mseen;
|
||||||
|
|
||||||
/* allow strings like "the oracle level" to find "oracle" */
|
/* look at the player's custom level annotations first */
|
||||||
if (!strncmpi(nam, "the ", 4))
|
if ((mseen = find_mapseen_by_str(nam)) != 0) {
|
||||||
nam += 4;
|
dlev = mseen->lev;
|
||||||
if ((p = strstri(nam, " level")) != 0 && p == eos((char *) nam) - 6) {
|
} else {
|
||||||
nam = strcpy(buf, nam);
|
/* no matching annotation, check whether they used a name we know */
|
||||||
*(eos(buf) - 6) = '\0';
|
|
||||||
}
|
/* allow strings like "the oracle level" to find "oracle" */
|
||||||
/* hell is the old name, and wouldn't match; gehennom would match its
|
if (!strncmpi(nam, "the ", 4))
|
||||||
branch, yielding the castle level instead of the valley of the dead */
|
nam += 4;
|
||||||
if (!strcmpi(nam, "gehennom") || !strcmpi(nam, "hell")) {
|
if ((p = strstri(nam, " level")) != 0 && p == eos((char *) nam) - 6) {
|
||||||
if (In_V_tower(&u.uz))
|
nam = strcpy(buf, nam);
|
||||||
nam = " to Vlad's tower"; /* branch to... */
|
*(eos(buf) - 6) = '\0';
|
||||||
else
|
}
|
||||||
nam = "valley";
|
/* hell is the old name, and wouldn't match; gehennom would match its
|
||||||
|
branch, yielding the castle level instead of the valley of the dead */
|
||||||
|
if (!strcmpi(nam, "gehennom") || !strcmpi(nam, "hell")) {
|
||||||
|
if (In_V_tower(&u.uz))
|
||||||
|
nam = " to Vlad's tower"; /* branch to... */
|
||||||
|
else
|
||||||
|
nam = "valley";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((slev = find_level(nam)) != 0)
|
||||||
|
dlev = slev->dlevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((slev = find_level(nam)) != 0) {
|
if (mseen || slev) {
|
||||||
dlev = slev->dlevel;
|
|
||||||
idx = ledger_no(&dlev);
|
idx = ledger_no(&dlev);
|
||||||
if ((dlev.dnum == u.uz.dnum
|
if ((dlev.dnum == u.uz.dnum
|
||||||
/* within same branch, or else main dungeon <-> gehennom */
|
/* within same branch, or else main dungeon <-> gehennom */
|
||||||
@@ -1672,7 +1683,7 @@ const char *nam;
|
|||||||
wizard
|
wizard
|
||||||
|| (level_info[idx].flags & (FORGOTTEN | VISITED))
|
|| (level_info[idx].flags & (FORGOTTEN | VISITED))
|
||||||
== VISITED)) {
|
== VISITED)) {
|
||||||
lev = depth(&slev->dlevel);
|
lev = depth(&dlev);
|
||||||
}
|
}
|
||||||
} else { /* not a specific level; try branch names */
|
} else { /* not a specific level; try branch names */
|
||||||
idx = find_branch(nam, (struct proto_dungeon *) 0);
|
idx = find_branch(nam, (struct proto_dungeon *) 0);
|
||||||
@@ -2055,6 +2066,20 @@ d_level *lev;
|
|||||||
return mptr;
|
return mptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC_OVL mapseen *
|
||||||
|
find_mapseen_by_str(s)
|
||||||
|
const char *s;
|
||||||
|
{
|
||||||
|
mapseen *mptr;
|
||||||
|
|
||||||
|
for (mptr = mapseenchn; mptr; mptr = mptr->next)
|
||||||
|
if (mptr->custom && !strcmpi(s, mptr->custom))
|
||||||
|
break;
|
||||||
|
|
||||||
|
return mptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
forget_mapseen(ledger_num)
|
forget_mapseen(ledger_num)
|
||||||
int ledger_num;
|
int ledger_num;
|
||||||
|
|||||||
+3
-3
@@ -257,8 +257,7 @@ xchar x, y;
|
|||||||
* Ignore headstones, in case the player names herself "Elbereth".
|
* Ignore headstones, in case the player names herself "Elbereth".
|
||||||
*
|
*
|
||||||
* If strict checking is requested, the word is only considered to be
|
* If strict checking is requested, the word is only considered to be
|
||||||
* present if it is intact and is the first word in the engraving.
|
* present if it is intact and is the entire content of the engraving.
|
||||||
* ("Elbereth burrito" matches; "o Elbereth" does not.)
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sengr_at(s, x, y, strict)
|
sengr_at(s, x, y, strict)
|
||||||
@@ -269,9 +268,10 @@ boolean strict;
|
|||||||
register struct engr *ep = engr_at(x, y);
|
register struct engr *ep = engr_at(x, y);
|
||||||
|
|
||||||
if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) {
|
if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) {
|
||||||
return strict ? (strncmpi(ep->engr_txt, s, strlen(s)) == 0)
|
return strict ? (fuzzymatch(ep->engr_txt, s, "", TRUE))
|
||||||
: (strstri(ep->engr_txt, s) != 0);
|
: (strstri(ep->engr_txt, s) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -433,7 +433,7 @@ int expltype;
|
|||||||
monkilled(mtmp, "", (int) adtyp);
|
monkilled(mtmp, "", (int) adtyp);
|
||||||
} else if (!context.mon_moving) {
|
} else if (!context.mon_moving) {
|
||||||
/* all affected monsters, even if mdef is set */
|
/* all affected monsters, even if mdef is set */
|
||||||
setmangry(mtmp);
|
setmangry(mtmp, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,13 @@ struct monst *mon;
|
|||||||
|
|
||||||
if (mon) {
|
if (mon) {
|
||||||
ptr = mon->data;
|
ptr = mon->data;
|
||||||
|
|
||||||
|
if (uwep && uwep->oartifact == ART_DEMONBANE && is_demon(ptr)) {
|
||||||
|
if (canseemon(mon))
|
||||||
|
pline("%s looks puzzled for a moment.", Monnam(mon));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
atyp = mon->ispriest ? EPRI(mon)->shralign
|
atyp = mon->ispriest ? EPRI(mon)->shralign
|
||||||
: mon->isminion ? EMIN(mon)->min_align
|
: mon->isminion ? EMIN(mon)->min_align
|
||||||
: (ptr->maligntyp == A_NONE)
|
: (ptr->maligntyp == A_NONE)
|
||||||
|
|||||||
+159
-19
@@ -629,6 +629,153 @@ fixup_special()
|
|||||||
num_lregions = 0;
|
num_lregions = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean
|
||||||
|
maze_inbounds(x, y)
|
||||||
|
int x, y;
|
||||||
|
{
|
||||||
|
return (x >= 2 && y >= 2
|
||||||
|
&& x < x_maze_max && y < y_maze_max && isok(x, y));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
maze_remove_deadends(typ)
|
||||||
|
xchar typ;
|
||||||
|
{
|
||||||
|
char dirok[4];
|
||||||
|
int x, y, dir, idx, idx2, dx, dy, dx2, dy2;
|
||||||
|
|
||||||
|
dirok[0] = 0; /* lint suppression */
|
||||||
|
for (x = 2; x < x_maze_max; x++)
|
||||||
|
for (y = 2; y < y_maze_max; y++)
|
||||||
|
if (ACCESSIBLE(levl[x][y].typ) && (x % 2) && (y % 2)) {
|
||||||
|
idx = idx2 = 0;
|
||||||
|
for (dir = 0; dir < 4; dir++) {
|
||||||
|
/* note: mz_move() is a macro which modifies
|
||||||
|
one of its first two parameters */
|
||||||
|
dx = dx2 = x;
|
||||||
|
dy = dy2 = y;
|
||||||
|
mz_move(dx, dy, dir);
|
||||||
|
if (!maze_inbounds(dx, dy)) {
|
||||||
|
idx2++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
mz_move(dx2, dy2, dir);
|
||||||
|
mz_move(dx2, dy2, dir);
|
||||||
|
if (!maze_inbounds(dx2, dy2)) {
|
||||||
|
idx2++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!ACCESSIBLE(levl[dx][dy].typ)
|
||||||
|
&& ACCESSIBLE(levl[dx2][dy2].typ)) {
|
||||||
|
dirok[idx++] = dir;
|
||||||
|
idx2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (idx2 >= 3 && idx > 0) {
|
||||||
|
dx = x;
|
||||||
|
dy = y;
|
||||||
|
dir = dirok[rn2(idx)];
|
||||||
|
mz_move(dx, dy, dir);
|
||||||
|
levl[dx][dy].typ = typ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create a maze with specified corridor width and wall thickness
|
||||||
|
* TODO: rewrite walkfrom so it works on temp space, not levl
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
create_maze(corrwid, wallthick)
|
||||||
|
int corrwid;
|
||||||
|
int wallthick;
|
||||||
|
{
|
||||||
|
int x,y;
|
||||||
|
coord mm;
|
||||||
|
int tmp_xmax = x_maze_max;
|
||||||
|
int tmp_ymax = y_maze_max;
|
||||||
|
int rdx = 0;
|
||||||
|
int rdy = 0;
|
||||||
|
int scale;
|
||||||
|
|
||||||
|
if (wallthick < 1)
|
||||||
|
wallthick = 1;
|
||||||
|
else if (wallthick > 5)
|
||||||
|
wallthick = 5;
|
||||||
|
|
||||||
|
if (corrwid < 1)
|
||||||
|
corrwid = 1;
|
||||||
|
else if (corrwid > 5)
|
||||||
|
corrwid = 5;
|
||||||
|
|
||||||
|
scale = corrwid + wallthick;
|
||||||
|
rdx = (x_maze_max / scale);
|
||||||
|
rdy = (y_maze_max / scale);
|
||||||
|
|
||||||
|
if (level.flags.corrmaze)
|
||||||
|
for (x = 2; x < (rdx * 2); x++)
|
||||||
|
for (y = 2; y < (rdy * 2); y++)
|
||||||
|
levl[x][y].typ = STONE;
|
||||||
|
else
|
||||||
|
for (x = 2; x <= (rdx * 2); x++)
|
||||||
|
for (y = 2; y <= (rdy * 2); y++)
|
||||||
|
levl[x][y].typ = ((x % 2) && (y % 2)) ? STONE : HWALL;
|
||||||
|
|
||||||
|
/* set upper bounds for maze0xy and walkfrom */
|
||||||
|
x_maze_max = (rdx * 2);
|
||||||
|
y_maze_max = (rdy * 2);
|
||||||
|
|
||||||
|
/* create maze */
|
||||||
|
maze0xy(&mm);
|
||||||
|
walkfrom((int) mm.x, (int) mm.y, 0);
|
||||||
|
|
||||||
|
if (!rn2(5))
|
||||||
|
maze_remove_deadends((level.flags.corrmaze) ? CORR : ROOM);
|
||||||
|
|
||||||
|
/* restore bounds */
|
||||||
|
x_maze_max = tmp_xmax;
|
||||||
|
y_maze_max = tmp_ymax;
|
||||||
|
|
||||||
|
/* scale maze up if needed */
|
||||||
|
if (scale > 2) {
|
||||||
|
char tmpmap[COLNO][ROWNO];
|
||||||
|
int rx = 1, ry = 1;
|
||||||
|
|
||||||
|
/* back up the existing smaller maze */
|
||||||
|
for (x = 1; x < x_maze_max; x++)
|
||||||
|
for (y = 1; y < y_maze_max; y++) {
|
||||||
|
tmpmap[x][y] = levl[x][y].typ;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* do the scaling */
|
||||||
|
rx = x = 2;
|
||||||
|
while (rx < x_maze_max) {
|
||||||
|
int mx = (x % 2) ? corrwid
|
||||||
|
: ((x == 2 || x == (rdx * 2)) ? 1
|
||||||
|
: wallthick);
|
||||||
|
ry = y = 2;
|
||||||
|
while (ry < y_maze_max) {
|
||||||
|
int dx = 0, dy = 0;
|
||||||
|
int my = (y % 2) ? corrwid
|
||||||
|
: ((y == 2 || y == (rdy * 2)) ? 1
|
||||||
|
: wallthick);
|
||||||
|
for (dx = 0; dx < mx; dx++)
|
||||||
|
for (dy = 0; dy < my; dy++) {
|
||||||
|
if (rx+dx >= x_maze_max
|
||||||
|
|| ry+dy >= y_maze_max)
|
||||||
|
break;
|
||||||
|
levl[rx + dx][ry + dy].typ = tmpmap[x][y];
|
||||||
|
}
|
||||||
|
ry += my;
|
||||||
|
y++;
|
||||||
|
}
|
||||||
|
rx += mx;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
makemaz(s)
|
makemaz(s)
|
||||||
const char *s;
|
const char *s;
|
||||||
@@ -697,19 +844,12 @@ const char *s;
|
|||||||
level.flags.is_maze_lev = TRUE;
|
level.flags.is_maze_lev = TRUE;
|
||||||
level.flags.corrmaze = !rn2(3);
|
level.flags.corrmaze = !rn2(3);
|
||||||
|
|
||||||
if (level.flags.corrmaze)
|
if (!Invocation_lev(&u.uz) && rn2(2)) {
|
||||||
for (x = 2; x < x_maze_max; x++)
|
int corrscale = rnd(4);
|
||||||
for (y = 2; y < y_maze_max; y++)
|
create_maze(corrscale,rnd(4)-corrscale);
|
||||||
levl[x][y].typ = STONE;
|
} else {
|
||||||
else
|
create_maze(1,1);
|
||||||
for (x = 2; x <= x_maze_max; x++)
|
}
|
||||||
for (y = 2; y <= y_maze_max; y++)
|
|
||||||
levl[x][y].typ = ((x % 2) && (y % 2)) ? STONE : HWALL;
|
|
||||||
|
|
||||||
maze0xy(&mm);
|
|
||||||
walkfrom((int) mm.x, (int) mm.y, 0);
|
|
||||||
/* put a boulder at the maze center */
|
|
||||||
(void) mksobj_at(BOULDER, (int) mm.x, (int) mm.y, TRUE, FALSE);
|
|
||||||
|
|
||||||
if (!level.flags.corrmaze)
|
if (!level.flags.corrmaze)
|
||||||
wallification(2, 2, x_maze_max, y_maze_max);
|
wallification(2, 2, x_maze_max, y_maze_max);
|
||||||
@@ -891,8 +1031,8 @@ coord *cc;
|
|||||||
int cpt = 0;
|
int cpt = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
cc->x = 3 + 2 * rn2((x_maze_max >> 1) - 1);
|
cc->x = 1 + rn2(x_maze_max);
|
||||||
cc->y = 3 + 2 * rn2((y_maze_max >> 1) - 1);
|
cc->y = 1 + rn2(y_maze_max);
|
||||||
cpt++;
|
cpt++;
|
||||||
} while (cpt < 100
|
} while (cpt < 100
|
||||||
&& levl[cc->x][cc->y].typ
|
&& levl[cc->x][cc->y].typ
|
||||||
@@ -901,10 +1041,10 @@ coord *cc;
|
|||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
/* last try */
|
/* last try */
|
||||||
for (x = 0; x < (x_maze_max >> 1) - 1; x++)
|
for (x = 1; x < x_maze_max; x++)
|
||||||
for (y = 0; y < (y_maze_max >> 1) - 1; y++) {
|
for (y = 1; y < y_maze_max; y++) {
|
||||||
cc->x = 3 + 2 * x;
|
cc->x = x;
|
||||||
cc->y = 3 + 2 * y;
|
cc->y = y;
|
||||||
if (levl[cc->x][cc->y].typ
|
if (levl[cc->x][cc->y].typ
|
||||||
== (level.flags.corrmaze ? CORR : ROOM))
|
== (level.flags.corrmaze ? CORR : ROOM))
|
||||||
return;
|
return;
|
||||||
|
|||||||
+6
-2
@@ -380,12 +380,16 @@ struct mkroom *sroom;
|
|||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case COURT: {
|
case COURT: {
|
||||||
struct obj *chest;
|
struct obj *chest, *gold;
|
||||||
levl[tx][ty].typ = THRONE;
|
levl[tx][ty].typ = THRONE;
|
||||||
(void) somexy(sroom, &mm);
|
(void) somexy(sroom, &mm);
|
||||||
(void) mkgold((long) rn1(50 * level_difficulty(), 10), mm.x, mm.y);
|
gold = mksobj(GOLD_PIECE, TRUE, FALSE);
|
||||||
|
gold->quan = (long) rn1(50 * level_difficulty(), 10);
|
||||||
|
gold->owt = weight(gold);
|
||||||
/* the royal coffers */
|
/* the royal coffers */
|
||||||
chest = mksobj_at(CHEST, mm.x, mm.y, TRUE, FALSE);
|
chest = mksobj_at(CHEST, mm.x, mm.y, TRUE, FALSE);
|
||||||
|
add_to_container(chest, gold);
|
||||||
|
chest->owt = weight(chest);
|
||||||
chest->spe = 2; /* so it can be found later */
|
chest->spe = 2; /* so it can be found later */
|
||||||
level.flags.has_court = 1;
|
level.flags.has_court = 1;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2583,10 +2583,33 @@ struct monst *mtmp;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Called whenever the player attacks mtmp; also called in other situations
|
||||||
|
where mtmp gets annoyed at the player. Handles mtmp getting annoyed at the
|
||||||
|
attack and any ramifications that might have. Useful also in situations where
|
||||||
|
mtmp was already hostile; it checks for situations where the player shouldn't
|
||||||
|
be attacking and any ramifications /that/ might have. */
|
||||||
void
|
void
|
||||||
setmangry(mtmp)
|
setmangry(mtmp, via_attack)
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
boolean via_attack;
|
||||||
{
|
{
|
||||||
|
if (via_attack && sengr_at("Elbereth", u.ux, u.uy, TRUE)) {
|
||||||
|
You_feel("like a hypocrite.");
|
||||||
|
/* AIS: Yes, I know alignment penalties and bonuses aren't balanced at
|
||||||
|
the moment. This is about correct relative to other "small"
|
||||||
|
penalties; it should be fairly large, as attacking while standing on
|
||||||
|
an Elbereth means that you're requesting peace and then violating
|
||||||
|
your own request. I know 5 isn't actually large, but it's
|
||||||
|
intentionally larger than the 1s and 2s that are normally given for
|
||||||
|
this sort of thing. */
|
||||||
|
adjalign(-5);
|
||||||
|
|
||||||
|
if (!Blind)
|
||||||
|
pline("The engraving beneath you fades.");
|
||||||
|
del_engr_at(u.ux, u.uy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* AIS: Should this be in both places, or just in wakeup()? */
|
||||||
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
mtmp->mstrategy &= ~STRAT_WAITMASK;
|
||||||
if (!mtmp->mpeaceful)
|
if (!mtmp->mpeaceful)
|
||||||
return;
|
return;
|
||||||
@@ -2681,14 +2704,16 @@ struct monst *mtmp;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wake up a monster, usually making it angry in the process */
|
/* wake up a monster, possibly making it angry in the process */
|
||||||
void
|
void
|
||||||
wakeup(mtmp)
|
wakeup(mtmp, via_attack)
|
||||||
register struct monst *mtmp;
|
register struct monst *mtmp;
|
||||||
|
boolean via_attack;
|
||||||
{
|
{
|
||||||
mtmp->msleeping = 0;
|
mtmp->msleeping = 0;
|
||||||
finish_meating(mtmp);
|
finish_meating(mtmp);
|
||||||
setmangry(mtmp);
|
if (via_attack)
|
||||||
|
setmangry(mtmp, TRUE);
|
||||||
if (mtmp->m_ap_type) {
|
if (mtmp->m_ap_type) {
|
||||||
seemimic(mtmp);
|
seemimic(mtmp);
|
||||||
} else if (context.forcefight && !context.mon_moving
|
} else if (context.forcefight && !context.mon_moving
|
||||||
|
|||||||
@@ -320,12 +320,6 @@ int *inrange, *nearby, *scared;
|
|||||||
|| (!mtmp->mpeaceful && in_your_sanctuary(mtmp, 0, 0)))) {
|
|| (!mtmp->mpeaceful && in_your_sanctuary(mtmp, 0, 0)))) {
|
||||||
*scared = 1;
|
*scared = 1;
|
||||||
monflee(mtmp, rnd(rn2(7) ? 10 : 100), TRUE, TRUE);
|
monflee(mtmp, rnd(rn2(7) ? 10 : 100), TRUE, TRUE);
|
||||||
|
|
||||||
/* magical protection won't last forever, so there'll be a
|
|
||||||
* chance of the magic being used up regardless of type */
|
|
||||||
if (sawscary) {
|
|
||||||
wipe_engr_at(seescaryx, seescaryy, 1, TRUE);
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
*scared = 0;
|
*scared = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -263,7 +263,7 @@ int force;
|
|||||||
for (x = start_x; x <= end_x; x++)
|
for (x = start_x; x <= end_x; x++)
|
||||||
for (y = start_y; y <= end_y; y++) {
|
for (y = start_y; y <= end_y; y++) {
|
||||||
if ((mtmp = m_at(x, y)) != 0) {
|
if ((mtmp = m_at(x, y)) != 0) {
|
||||||
wakeup(mtmp); /* peaceful monster will become hostile */
|
wakeup(mtmp, TRUE); /* peaceful monster will become hostile */
|
||||||
if (mtmp->mundetected && is_hider(mtmp->data)) {
|
if (mtmp->mundetected && is_hider(mtmp->data)) {
|
||||||
mtmp->mundetected = 0;
|
mtmp->mundetected = 0;
|
||||||
if (cansee(x, y))
|
if (cansee(x, y))
|
||||||
|
|||||||
@@ -230,6 +230,8 @@ static struct Bool_Opt {
|
|||||||
#else
|
#else
|
||||||
{ "vt_tiledata", (boolean *) 0, FALSE, SET_IN_FILE },
|
{ "vt_tiledata", (boolean *) 0, FALSE, SET_IN_FILE },
|
||||||
#endif
|
#endif
|
||||||
|
{ "whatis_menu", &iflags.getloc_usemenu, FALSE, SET_IN_GAME },
|
||||||
|
{ "whatis_inview", &iflags.getloc_limitview, FALSE, SET_IN_GAME },
|
||||||
{ "wizweight", &iflags.wizweight, FALSE, SET_IN_WIZGAME },
|
{ "wizweight", &iflags.wizweight, FALSE, SET_IN_WIZGAME },
|
||||||
{ "wraptext", &iflags.wc2_wraptext, FALSE, SET_IN_GAME },
|
{ "wraptext", &iflags.wc2_wraptext, FALSE, SET_IN_GAME },
|
||||||
#ifdef ZEROCOMP
|
#ifdef ZEROCOMP
|
||||||
|
|||||||
+1
-1
@@ -1310,8 +1310,8 @@ dogaze()
|
|||||||
mon_nam(mtmp));
|
mon_nam(mtmp));
|
||||||
if (yn(qbuf) != 'y')
|
if (yn(qbuf) != 'y')
|
||||||
continue;
|
continue;
|
||||||
setmangry(mtmp);
|
|
||||||
}
|
}
|
||||||
|
setmangry(mtmp, TRUE);
|
||||||
if (!mtmp->mcanmove || mtmp->mstun || mtmp->msleeping
|
if (!mtmp->mcanmove || mtmp->mstun || mtmp->msleeping
|
||||||
|| !mtmp->mcansee || !haseyes(mtmp->data)) {
|
|| !mtmp->mcansee || !haseyes(mtmp->data)) {
|
||||||
looked--;
|
looked--;
|
||||||
|
|||||||
+1
-1
@@ -1488,7 +1488,7 @@ boolean your_fault;
|
|||||||
/* target might have been killed */
|
/* target might have been killed */
|
||||||
if (mon->mhp > 0) {
|
if (mon->mhp > 0) {
|
||||||
if (angermon)
|
if (angermon)
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
else
|
else
|
||||||
mon->msleeping = 0;
|
mon->msleeping = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -795,7 +795,8 @@ angry_priest()
|
|||||||
if ((priest = findpriest(temple_occupied(u.urooms))) != 0) {
|
if ((priest = findpriest(temple_occupied(u.urooms))) != 0) {
|
||||||
struct epri *eprip = EPRI(priest);
|
struct epri *eprip = EPRI(priest);
|
||||||
|
|
||||||
wakeup(priest);
|
wakeup(priest, FALSE);
|
||||||
|
setmangry(priest, FALSE);
|
||||||
/*
|
/*
|
||||||
* If the altar has been destroyed or converted, let the
|
* If the altar has been destroyed or converted, let the
|
||||||
* priest run loose.
|
* priest run loose.
|
||||||
|
|||||||
+1
-1
@@ -901,7 +901,7 @@ struct obj *sobj;
|
|||||||
unsigned was_peaceful = mtmp->mpeaceful;
|
unsigned was_peaceful = mtmp->mpeaceful;
|
||||||
|
|
||||||
if (sobj->cursed) {
|
if (sobj->cursed) {
|
||||||
setmangry(mtmp);
|
setmangry(mtmp, FALSE);
|
||||||
if (was_peaceful && !mtmp->mpeaceful)
|
if (was_peaceful && !mtmp->mpeaceful)
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -974,7 +974,7 @@ genericptr_t p2;
|
|||||||
if (cansee(mtmp->mx, mtmp->my))
|
if (cansee(mtmp->mx, mtmp->my))
|
||||||
pline("%s coughs!", Monnam(mtmp));
|
pline("%s coughs!", Monnam(mtmp));
|
||||||
if (heros_fault(reg))
|
if (heros_fault(reg))
|
||||||
setmangry(mtmp);
|
setmangry(mtmp, TRUE);
|
||||||
if (haseyes(mtmp->data) && mtmp->mcansee) {
|
if (haseyes(mtmp->data) && mtmp->mcansee) {
|
||||||
mtmp->mblinded = 1;
|
mtmp->mblinded = 1;
|
||||||
mtmp->mcansee = 0;
|
mtmp->mcansee = 0;
|
||||||
|
|||||||
+2
-2
@@ -609,9 +609,9 @@ level_tele()
|
|||||||
do {
|
do {
|
||||||
if (++trycnt == 2) {
|
if (++trycnt == 2) {
|
||||||
if (wizard)
|
if (wizard)
|
||||||
Strcat(qbuf, " [type a number or ? for a menu]");
|
Strcat(qbuf, " [type a number, name, or ? for a menu]");
|
||||||
else
|
else
|
||||||
Strcat(qbuf, " [type a number]");
|
Strcat(qbuf, " [type a number or name]");
|
||||||
}
|
}
|
||||||
getlin(qbuf, buf);
|
getlin(qbuf, buf);
|
||||||
if (!strcmp(buf, "\033")) { /* cancelled */
|
if (!strcmp(buf, "\033")) { /* cancelled */
|
||||||
|
|||||||
+2
-2
@@ -2119,7 +2119,7 @@ register struct monst *mtmp;
|
|||||||
Recognizing who made the trap isn't completely
|
Recognizing who made the trap isn't completely
|
||||||
unreasonable; everybody has their own style. */
|
unreasonable; everybody has their own style. */
|
||||||
if (trap->madeby_u && rnl(5))
|
if (trap->madeby_u && rnl(5))
|
||||||
setmangry(mtmp);
|
setmangry(mtmp, TRUE);
|
||||||
|
|
||||||
in_sight = canseemon(mtmp);
|
in_sight = canseemon(mtmp);
|
||||||
see_it = cansee(mtmp->mx, mtmp->my);
|
see_it = cansee(mtmp->mx, mtmp->my);
|
||||||
@@ -4541,7 +4541,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */
|
|||||||
or if you sense the monster who becomes trapped */
|
or if you sense the monster who becomes trapped */
|
||||||
*noticed = cansee(t->tx, t->ty) || canspotmon(mon);
|
*noticed = cansee(t->tx, t->ty) || canspotmon(mon);
|
||||||
/* monster will be angered; mintrap doesn't handle that */
|
/* monster will be angered; mintrap doesn't handle that */
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
++force_mintrap;
|
++force_mintrap;
|
||||||
result = (mintrap(mon) != 0);
|
result = (mintrap(mon) != 0);
|
||||||
--force_mintrap;
|
--force_mintrap;
|
||||||
|
|||||||
+12
-12
@@ -145,7 +145,7 @@ struct obj *wep; /* uwep for attack(), null for kick_monster() */
|
|||||||
if (!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data, AD_STCK))
|
if (!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data, AD_STCK))
|
||||||
u.ustuck = mtmp;
|
u.ustuck = mtmp;
|
||||||
}
|
}
|
||||||
wakeup(mtmp); /* always necessary; also un-mimics mimics */
|
wakeup(mtmp, TRUE); /* always necessary; also un-mimics mimics */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ struct obj *wep; /* uwep for attack(), null for kick_monster() */
|
|||||||
*/
|
*/
|
||||||
if ((mtmp->mundetected || mtmp->m_ap_type) && sensemon(mtmp)) {
|
if ((mtmp->mundetected || mtmp->m_ap_type) && sensemon(mtmp)) {
|
||||||
mtmp->mundetected = 0;
|
mtmp->mundetected = 0;
|
||||||
wakeup(mtmp);
|
wakeup(mtmp, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags.confirm && mtmp->mpeaceful && !Confusion && !Hallucination
|
if (flags.confirm && mtmp->mpeaceful && !Confusion && !Hallucination
|
||||||
@@ -573,7 +573,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
unconventional[0] = '\0';
|
unconventional[0] = '\0';
|
||||||
saved_oname[0] = '\0';
|
saved_oname[0] = '\0';
|
||||||
|
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
if (!obj) { /* attack with bare hands */
|
if (!obj) { /* attack with bare hands */
|
||||||
if (mdat == &mons[PM_SHADE])
|
if (mdat == &mons[PM_SHADE])
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
@@ -894,7 +894,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
pline("%s %s over %s!", what,
|
pline("%s %s over %s!", what,
|
||||||
vtense(what, "splash"), whom);
|
vtense(what, "splash"), whom);
|
||||||
}
|
}
|
||||||
setmangry(mon);
|
setmangry(mon, TRUE);
|
||||||
mon->mcansee = 0;
|
mon->mcansee = 0;
|
||||||
tmp = rn1(25, 21);
|
tmp = rn1(25, 21);
|
||||||
if (((int) mon->mblinded + tmp) > 127)
|
if (((int) mon->mblinded + tmp) > 127)
|
||||||
@@ -903,7 +903,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
mon->mblinded += tmp;
|
mon->mblinded += tmp;
|
||||||
} else {
|
} else {
|
||||||
pline(obj->otyp == CREAM_PIE ? "Splat!" : "Splash!");
|
pline(obj->otyp == CREAM_PIE ? "Splat!" : "Splash!");
|
||||||
setmangry(mon);
|
setmangry(mon, TRUE);
|
||||||
}
|
}
|
||||||
if (thrown)
|
if (thrown)
|
||||||
obfree(obj, (struct obj *) 0);
|
obfree(obj, (struct obj *) 0);
|
||||||
@@ -2097,7 +2097,7 @@ boolean wouldhavehit;
|
|||||||
else
|
else
|
||||||
You("miss it.");
|
You("miss it.");
|
||||||
if (!mdef->msleeping && mdef->mcanmove)
|
if (!mdef->msleeping && mdef->mcanmove)
|
||||||
wakeup(mdef);
|
wakeup(mdef, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* attack monster as a monster. */
|
/* attack monster as a monster. */
|
||||||
@@ -2178,7 +2178,7 @@ register struct monst *mon;
|
|||||||
sum[i] = damageum(mon, mattk);
|
sum[i] = damageum(mon, mattk);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
/* maybe this check should be in damageum()? */
|
/* maybe this check should be in damageum()? */
|
||||||
if (mon->data == &mons[PM_SHADE]
|
if (mon->data == &mons[PM_SHADE]
|
||||||
&& !(mattk->aatyp == AT_KICK && uarmf
|
&& !(mattk->aatyp == AT_KICK && uarmf
|
||||||
@@ -2212,7 +2212,7 @@ register struct monst *mon;
|
|||||||
* already grabbed in a previous attack
|
* already grabbed in a previous attack
|
||||||
*/
|
*/
|
||||||
dhit = 1;
|
dhit = 1;
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
if (mon->data == &mons[PM_SHADE])
|
if (mon->data == &mons[PM_SHADE])
|
||||||
Your("hug passes harmlessly through %s.", mon_nam(mon));
|
Your("hug passes harmlessly through %s.", mon_nam(mon));
|
||||||
else if (!sticks(mon->data) && !u.uswallow) {
|
else if (!sticks(mon->data) && !u.uswallow) {
|
||||||
@@ -2230,7 +2230,7 @@ register struct monst *mon;
|
|||||||
|
|
||||||
case AT_EXPL: /* automatic hit if next to */
|
case AT_EXPL: /* automatic hit if next to */
|
||||||
dhit = -1;
|
dhit = -1;
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
sum[i] = explum(mon, mattk);
|
sum[i] = explum(mon, mattk);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2238,7 +2238,7 @@ register struct monst *mon;
|
|||||||
tmp = find_roll_to_hit(mon, mattk->aatyp, (struct obj *) 0,
|
tmp = find_roll_to_hit(mon, mattk->aatyp, (struct obj *) 0,
|
||||||
&attknum, &armorpenalty);
|
&attknum, &armorpenalty);
|
||||||
if ((dhit = (tmp > rnd(20 + i)))) {
|
if ((dhit = (tmp > rnd(20 + i)))) {
|
||||||
wakeup(mon);
|
wakeup(mon, TRUE);
|
||||||
if (mon->data == &mons[PM_SHADE])
|
if (mon->data == &mons[PM_SHADE])
|
||||||
Your("attempt to surround %s is harmless.", mon_nam(mon));
|
Your("attempt to surround %s is harmless.", mon_nam(mon));
|
||||||
else {
|
else {
|
||||||
@@ -2637,7 +2637,7 @@ struct monst *mtmp;
|
|||||||
if (what)
|
if (what)
|
||||||
pline(fmt, what);
|
pline(fmt, what);
|
||||||
|
|
||||||
wakeup(mtmp); /* clears mimicking */
|
wakeup(mtmp, FALSE); /* clears mimicking */
|
||||||
/* if hero is blind, wakeup() won't display the monster even though
|
/* if hero is blind, wakeup() won't display the monster even though
|
||||||
it's no longer concealed */
|
it's no longer concealed */
|
||||||
if (!canspotmon(mtmp)
|
if (!canspotmon(mtmp)
|
||||||
@@ -2695,7 +2695,7 @@ struct obj *otmp; /* source of flash */
|
|||||||
}
|
}
|
||||||
if (mtmp->mhp > 0) {
|
if (mtmp->mhp > 0) {
|
||||||
if (!context.mon_moving)
|
if (!context.mon_moving)
|
||||||
setmangry(mtmp);
|
setmangry(mtmp, TRUE);
|
||||||
if (tmp < 9 && !mtmp->isshk && rn2(4))
|
if (tmp < 9 && !mtmp->isshk && rn2(4))
|
||||||
monflee(mtmp, rn2(4) ? rnd(100) : 0, FALSE, TRUE);
|
monflee(mtmp, rn2(4) ? rnd(100) : 0, FALSE, TRUE);
|
||||||
mtmp->mcansee = 0;
|
mtmp->mcansee = 0;
|
||||||
|
|||||||
+1
-1
@@ -400,7 +400,7 @@ invault()
|
|||||||
}
|
}
|
||||||
mongone(guard);
|
mongone(guard);
|
||||||
} else {
|
} else {
|
||||||
setmangry(guard);
|
setmangry(guard, FALSE);
|
||||||
if (Deaf) {
|
if (Deaf) {
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline("%s mouths something and looks very angry!",
|
pline("%s mouths something and looks very angry!",
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ struct obj *otmp;
|
|||||||
}
|
}
|
||||||
if (wake) {
|
if (wake) {
|
||||||
if (mtmp->mhp > 0) {
|
if (mtmp->mhp > 0) {
|
||||||
wakeup(mtmp);
|
wakeup(mtmp, TRUE);
|
||||||
m_respond(mtmp);
|
m_respond(mtmp);
|
||||||
if (mtmp->isshk && !*u.ushops)
|
if (mtmp->isshk && !*u.ushops)
|
||||||
hot_pursuit(mtmp);
|
hot_pursuit(mtmp);
|
||||||
@@ -748,7 +748,9 @@ boolean by_hero;
|
|||||||
x = xy.x, y = xy.y;
|
x = xy.x, y = xy.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mons[montype].mlet == S_EEL && !IS_POOL(levl[x][y].typ)) {
|
if ((mons[montype].mlet == S_EEL && !IS_POOL(levl[x][y].typ))
|
||||||
|
|| (mons[montype].mlet == S_TROLL
|
||||||
|
&& uwep && uwep->oartifact == ART_TROLLSBANE)) {
|
||||||
if (by_hero && cansee(x,y))
|
if (by_hero && cansee(x,y))
|
||||||
pline("%s twitches feebly.",
|
pline("%s twitches feebly.",
|
||||||
upstart(corpse_xname(corpse, (const char *) 0, CXN_PFX_THE)));
|
upstart(corpse_xname(corpse, (const char *) 0, CXN_PFX_THE)));
|
||||||
@@ -4533,12 +4535,9 @@ short exploding_wand_typ;
|
|||||||
You("%s of smoke.", !Blind ? "see a puff" : "smell a whiff");
|
You("%s of smoke.", !Blind ? "see a puff" : "smell a whiff");
|
||||||
}
|
}
|
||||||
if ((mon = m_at(x, y)) != 0) {
|
if ((mon = m_at(x, y)) != 0) {
|
||||||
/* Cannot use wakeup() which also angers the monster */
|
wakeup(mon, FALSE);
|
||||||
mon->msleeping = 0;
|
|
||||||
if (mon->m_ap_type)
|
|
||||||
seemimic(mon);
|
|
||||||
if (type >= 0) {
|
if (type >= 0) {
|
||||||
setmangry(mon);
|
setmangry(mon, TRUE);
|
||||||
if (mon->ispriest && *in_rooms(mon->mx, mon->my, TEMPLE))
|
if (mon->ispriest && *in_rooms(mon->mx, mon->my, TEMPLE))
|
||||||
ghod_hitsu(mon);
|
ghod_hitsu(mon);
|
||||||
if (mon->isshk && !*u.ushops)
|
if (mon->isshk && !*u.ushops)
|
||||||
|
|||||||
@@ -50,7 +50,13 @@ nhtiles.bmp: ../util/tile2bmp ../win/share/monsters.txt \
|
|||||||
../util/tile2bmp $@
|
../util/tile2bmp $@
|
||||||
|
|
||||||
NetHack.ad: ../win/X11/NetHack.ad
|
NetHack.ad: ../win/X11/NetHack.ad
|
||||||
cp ../win/X11/NetHack.ad NetHack.ad
|
# handle "#define foo bar" -lines
|
||||||
|
grep ^#define ../win/X11/NetHack.ad | \
|
||||||
|
sed -e 's/^#define/s/g' -e 's/ */ /g' \
|
||||||
|
-e 's/$$/ g/g' > NetHack.ad.tmp
|
||||||
|
grep -v ^#define ../win/X11/NetHack.ad | \
|
||||||
|
sed -f NetHack.ad.tmp > NetHack.ad
|
||||||
|
-rm -f NetHack.ad.tmp
|
||||||
|
|
||||||
pet_mark.xbm: ../win/X11/pet_mark.xbm
|
pet_mark.xbm: ../win/X11/pet_mark.xbm
|
||||||
cp ../win/X11/pet_mark.xbm pet_mark.xbm
|
cp ../win/X11/pet_mark.xbm pet_mark.xbm
|
||||||
|
|||||||
+1
-1
@@ -732,7 +732,7 @@ int ec_indx; /* might be greater than extended_cmd_selected */
|
|||||||
float s_min, s_max;
|
float s_min, s_max;
|
||||||
Dimension h, hh, wh, vh; /* widget and viewport heights */
|
Dimension h, hh, wh, vh; /* widget and viewport heights */
|
||||||
Dimension border_width;
|
Dimension border_width;
|
||||||
int distance;
|
int distance = 0;
|
||||||
boolean force_top = (ec_indx < 0);
|
boolean force_top = (ec_indx < 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user