Merge remote-tracking branch 'origin/NetHack-3.6.0'

This commit is contained in:
keni
2016-10-02 15:26:11 -04:00
15 changed files with 686 additions and 307 deletions
+174
View File
@@ -386,6 +386,180 @@ start: NHAccess
S_explode9: \047 S_explode9: \047
finish finish
# All symbols are spaces
start: Blank
Description: Completely blank symbols
S_air: \032
S_altar: \032
S_amulet: \032
S_angel: \032
S_ant: \032
S_anti_magic_trap: \032
S_armor: \032
S_armour: \032
S_arrow_trap: \032
S_ball: \032
S_bars: \032
S_bat: \032
S_bear_trap: \032
S_blcorn: \032
S_blob: \032
S_book: \032
S_boomleft: \032
S_boomright: \032
S_boulder: \032
S_brcorn: \032
S_centaur: \032
S_chain: \032
S_cloud: \032
S_cockatrice: \032
S_coin: \032
S_corr: \032
S_crwall: \032
S_darkroom: \032
S_dart_trap: \032
S_demon: \032
S_digbeam: \032
S_dnladder: \032
S_dnstair: \032
S_dog: \032
S_dragon: \032
S_eel: \032
S_elemental: \032
S_explode1: \032
S_explode2: \032
S_explode3: \032
S_explode4: \032
S_explode5: \032
S_explode6: \032
S_explode7: \032
S_explode8: \032
S_explode9: \032
S_eye: \032
S_falling_rock_trap: \032
S_feline: \032
S_fire_trap: \032
S_flashbeam: \032
S_food: \032
S_fountain: \032
S_fungus: \032
S_gem: \032
S_ghost: \032
S_giant: \032
S_gnome: \032
S_golem: \032
S_grave: \032
S_gremlin: \032
S_hbeam: \032
S_hcdbridge: \032
S_hcdoor: \032
S_hodoor: \032
S_hole: \032
S_human: \032
S_humanoid: \032
S_hwall: \032
S_imp: \032
S_invisible: \032
S_jabberwock: \032
S_jelly: \032
S_kobold: \032
S_kop: \032
S_land_mine: \032
S_lava: \032
S_leprechaun: \032
S_level_teleporter: \032
S_lich: \032
S_light: \032
S_litcorr: \032
S_lizard: \032
S_lslant: \032
S_magic_portal: \032
S_magic_trap: \032
S_mimic: \032
S_mimic_def: \032
S_mummy: \032
S_naga: \032
S_ndoor: \032
S_nymph: \032
S_ogre: \032
S_orc: \032
S_piercer: \032
S_pit: \032
S_poisoncloud: \032
S_polymorph_trap: \032
S_pool: \032
S_potion: \032
S_pudding: \032
S_quadruped: \032
S_quantmech: \032
S_ring: \032
S_rock: \032
S_rodent: \032
S_rolling_boulder_trap: \032
S_room: \032
S_rslant: \032
S_rust_trap: \032
S_rustmonst: \032
S_scroll: \032
S_sink: \032
S_sleeping_gas_trap: \032
S_snake: \032
S_spider: \032
S_spiked_pit: \032
S_squeaky_board: \032
S_ss1: \032
S_ss2: \032
S_ss3: \032
S_ss4: \032
S_statue_trap: \032
S_stone: \032
S_sw_bc: \032
S_sw_bl: \032
S_sw_br: \032
S_sw_ml: \032
S_sw_mr: \032
S_sw_tc: \032
S_sw_tl: \032
S_sw_tr: \032
S_tdwall: \032
S_teleportation_trap: \032
S_throne: \032
S_tlcorn: \032
S_tlwall: \032
S_tool: \032
S_trap_door: \032
S_trapper: \032
S_trcorn: \032
S_tree: \032
S_troll: \032
S_trwall: \032
S_tuwall: \032
S_umber: \032
S_unicorn: \032
S_upladder: \032
S_upstair: \032
S_vampire: \032
S_vbeam: \032
S_vcdbridge: \032
S_vcdoor: \032
S_vibrating_square: \032
S_vodoor: \032
S_vortex: \032
S_vwall: \032
S_wand: \032
S_water: \032
S_weapon: \032
S_web: \032
S_worm: \032
S_worm_tail: \032
S_wraith: \032
S_xan: \032
S_xorn: \032
S_yeti: \032
S_zombie: \032
S_zruty: \032
finish
start: plain start: plain
Description: Same as Default symbols, except '+' for corner walls Description: Same as Default symbols, except '+' for corner walls
S_tlcorn: '+' S_tlcorn: '+'
+2
View File
@@ -2698,6 +2698,7 @@ The possible settings are:
.sd .sd
.si .si
.CC c "compass ('east' or '3s' or '2n,4w');" .CC c "compass ('east' or '3s' or '2n,4w');"
.CC f "full compass ('east' or '3south' or '2north,4west');"
.CC m "map <x,y> (map column x=0 is not used);" .CC m "map <x,y> (map column x=0 is not used);"
.CC s "screen [row,column] (row is offset to match tty usage);" .CC s "screen [row,column] (row is offset to match tty usage);"
.CC n "none (no coordinates shown) [default]." .CC n "none (no coordinates shown) [default]."
@@ -3186,6 +3187,7 @@ c S_cockatrice (cockatrice)
$ S_coin (pile of coins) $ S_coin (pile of coins)
# S_corr (corridor) # S_corr (corridor)
- S_crwall (wall) - S_crwall (wall)
# S_darkroom (dark room)
^ S_dart_trap (dart trap) ^ S_dart_trap (dart trap)
& S_demon (major demon) & S_demon (major demon)
* S_digbeam (dig beam) * S_digbeam (dig beam)
+2
View File
@@ -3230,6 +3230,7 @@ The possible settings are:
%.sd %.sd
%.si %.si
{\tt c} --- \verb#compass ('east' or '3s' or '2n,4w')#;\\ {\tt c} --- \verb#compass ('east' or '3s' or '2n,4w')#;\\
{\tt f} --- \verb#full compass ('east' or '3south' or '2north,4west')#;\\
{\tt m} --- \verb#map <x,y> (map column x=0 is not used)#;\\ {\tt m} --- \verb#map <x,y> (map column x=0 is not used)#;\\
{\tt s} --- \verb#screen [row,column] (row is offset to match tty usage)#;\\ {\tt s} --- \verb#screen [row,column] (row is offset to match tty usage)#;\\
{\tt n} --- \verb#none (no coordinates shown) [default]#. {\tt n} --- \verb#none (no coordinates shown) [default]#.
@@ -3827,6 +3828,7 @@ Default & Symbol Name & Description\\
\verb@$@ & S\verb+_+coin & (pile of coins)\\ \verb@$@ & S\verb+_+coin & (pile of coins)\\
\verb@#@ & S\verb+_+corr & (corridor)\\ \verb@#@ & S\verb+_+corr & (corridor)\\
\verb@-@ & S\verb+_+crwall & (wall)\\ \verb@-@ & S\verb+_+crwall & (wall)\\
\verb@-@ & S\verb+_+darkroom & (dark room)\\
\verb@^@ & S\verb+_+dart\verb+_+trap & (dart trap)\\ \verb@^@ & S\verb+_+dart\verb+_+trap & (dart trap)\\
\verb@&@ & S\verb+_+demon & (major demon)\\ \verb@&@ & S\verb+_+demon & (major demon)\\
\verb@*@ & S\verb+_+digbeam & (dig beam)\\ \verb@*@ & S\verb+_+digbeam & (dig beam)\\
+9
View File
@@ -339,6 +339,11 @@ change ing_suffix() to not double final 'w' when adding 'ing' ('t=' yielded
using 'D' to drop when not carrying anything finished (after doing nothing) using 'D' to drop when not carrying anything finished (after doing nothing)
without giving any feedback for menustyles "full" and "partial" without giving any feedback for menustyles "full" and "partial"
"you hear a distant <musical note> squeak" might actually be nearby "you hear a distant <musical note> squeak" might actually be nearby
differentiate symset and roguesymset option menu prompts
don't show monster vs. monster attack message, if the message refers to
a monster that cannot be sensed by the hero
umber hulk gazing at hidden mimic forces mimic to unhide
show some timed hero properties in wizard-mode #timeout
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
@@ -488,6 +493,9 @@ prevent diagonal jumping through open doorways
different liquids when hallucinating different liquids when hallucinating
when moving a cursor for travel target, show if there is no known travel when moving a cursor for travel target, show if there is no known travel
path to that location, if "autodescribe" is on path to that location, if "autodescribe" is on
show the reason why travel was interrupted if mention_walls is on
random horses have a tiny chance of being generated saddled
give feedback just before timed levitation runs out
Platform- and/or Interface-Specific New Features Platform- and/or Interface-Specific New Features
@@ -505,6 +513,7 @@ X11: NetHack*extcmd_height_delta resource can be used to adjust initial size
X11: status display split into three columns to accomodate Stone/Deaf/Lev/&c; X11: status display split into three columns to accomodate Stone/Deaf/Lev/&c;
NetHack*status_condition.foreground, .background, and .showGrip NetHack*status_condition.foreground, .background, and .showGrip
resources replaced by status_condition[1-3].* resources replaced by status_condition[1-3].*
X11: more terminal-like default resources
NetHack Community Patches (or Variation) Included NetHack Community Patches (or Variation) Included
+1
View File
@@ -173,6 +173,7 @@ struct sysflag {
#define GPCOORDS_NONE 'n' #define GPCOORDS_NONE 'n'
#define GPCOORDS_MAP 'm' #define GPCOORDS_MAP 'm'
#define GPCOORDS_COMPASS 'c' #define GPCOORDS_COMPASS 'c'
#define GPCOORDS_COMFULL 'f'
#define GPCOORDS_SCREEN 's' #define GPCOORDS_SCREEN 's'
struct instance_flags { struct instance_flags {
+8
View File
@@ -102,6 +102,14 @@
#define CXN_ARTICLE 8 /* include a/an/the prefix */ #define CXN_ARTICLE 8 /* include a/an/the prefix */
#define CXN_NOCORPSE 16 /* suppress " corpse" suffix */ #define CXN_NOCORPSE 16 /* suppress " corpse" suffix */
/* getpos() return values */
enum getpos_retval {
LOOK_TRADITIONAL = 0, /* '.' -- ask about "more info?" */
LOOK_QUICK, /* ',' -- skip "more info?" */
LOOK_ONCE, /* ';' -- skip and stop looping */
LOOK_VERBOSE /* ':' -- show more info w/o asking */
};
/* /*
* This is the way the game ends. If these are rearranged, the arrays * This is the way the game ends. If these are rearranged, the arrays
* 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
+11 -2
View File
@@ -3747,6 +3747,16 @@ char c;
return (boolean) (c == C('r') || (Cmd.num_pad && c == C('l'))); return (boolean) (c == C('r') || (Cmd.num_pad && c == C('l')));
} }
boolean
prefix_cmd(c)
char c;
{
return (boolean) (c == 'g' || c == 'G'
|| c == 'm' || c == 'M'
|| c == 'F'
|| (Cmd.num_pad && (c == '5' || c == '-')));
}
/* /*
* uses getdir() but unlike getdir() it specifically * uses getdir() but unlike getdir() it specifically
* produces coordinates using the direction from getdir() * produces coordinates using the direction from getdir()
@@ -4193,8 +4203,7 @@ parse()
in_line[0] = foo; in_line[0] = foo;
in_line[1] = '\0'; in_line[1] = '\0';
if (foo == 'g' || foo == 'G' || foo == 'm' || foo == 'M' || foo == 'F' if (prefix_cmd(foo)) {
|| (Cmd.num_pad && (foo == '5' || foo == '-'))) {
foo = readchar(); foo = readchar();
savech((char) foo); savech((char) foo);
in_line[1] = foo; in_line[1] = foo;
+31 -24
View File
@@ -54,28 +54,28 @@ 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 [HJKL] 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. '<').");
putstr(tmpwin, 0, "Use @ to move the cursor on yourself."); putstr(tmpwin, 0, "Use '@' to move the cursor on yourself.");
if (!iflags.terrainmode || (iflags.terrainmode & TER_MON) != 0) if (!iflags.terrainmode || (iflags.terrainmode & TER_MON) != 0)
putstr(tmpwin, 0, "Use m or M to move the cursor to next monster."); putstr(tmpwin, 0, "Use 'm' or 'M' to move the cursor to next monster.");
if (!iflags.terrainmode || (iflags.terrainmode & TER_OBJ) != 0) if (!iflags.terrainmode || (iflags.terrainmode & TER_OBJ) != 0)
putstr(tmpwin, 0, "Use o or O to move the cursor to next object."); putstr(tmpwin, 0, "Use 'o' or 'O' to move the cursor to next object.");
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 /* both of these are primarily useful when choosing a travel
destination for the '_' command */ destination for the '_' command */
putstr(tmpwin, 0, putstr(tmpwin, 0,
"Use d or D to move the cursor to next door or doorway."); "Use 'd' or 'D' to move the cursor to next door or doorway.");
putstr(tmpwin, 0, putstr(tmpwin, 0,
"Use x or X to move the cursor to unexplored location."); "Use 'x' or 'X' to move the cursor to unexplored location.");
} }
if (!iflags.terrainmode) { if (!iflags.terrainmode) {
if (getpos_hilitefunc) if (getpos_hilitefunc)
putstr(tmpwin, 0, "Use $ to display valid locations."); putstr(tmpwin, 0, "Use '$' to display valid locations.");
putstr(tmpwin, 0, "Use # to toggle automatic description."); putstr(tmpwin, 0, "Use '#' to toggle automatic description.");
if (iflags.cmdassist) /* assisting the '/' command, I suppose... */ if (iflags.cmdassist) /* assisting the '/' command, I suppose... */
putstr(tmpwin, 0, putstr(tmpwin, 0,
(iflags.getpos_coords == GPCOORDS_NONE) (iflags.getpos_coords == GPCOORDS_NONE)
@@ -84,20 +84,20 @@ const char *goal;
/* disgusting hack; the alternate selection characters work for any /* disgusting hack; the alternate selection characters work for any
getpos call, but only matter for dowhatis (and doquickwhatis) */ getpos call, but only matter for dowhatis (and doquickwhatis) */
doing_what_is = (goal == what_is_an_unknown_object); doing_what_is = (goal == what_is_an_unknown_object);
Sprintf(sbuf, "Type a .%s when you are at the right place.", Sprintf(sbuf, "Type a '.'%s when you are at the right place.",
doing_what_is ? " or , or ; or :" : ""); doing_what_is ? " or ',' or ';' or ':'" : "");
putstr(tmpwin, 0, sbuf); putstr(tmpwin, 0, sbuf);
if (doing_what_is) { if (doing_what_is) {
putstr(tmpwin, 0, putstr(tmpwin, 0,
" : describe current spot, show 'more info', move to another spot."); " ':' describe current spot, show 'more info', move to another spot.");
Sprintf(sbuf, Sprintf(sbuf,
" . describe current spot,%s move to another spot;", " '.' describe current spot,%s move to another spot;",
flags.help ? " prompt if 'more info'," : ""); flags.help ? " prompt if 'more info'," : "");
putstr(tmpwin, 0, sbuf); putstr(tmpwin, 0, sbuf);
putstr(tmpwin, 0, putstr(tmpwin, 0,
" , describe current spot, move to another spot;"); " ',' describe current spot, move to another spot;");
putstr(tmpwin, 0, putstr(tmpwin, 0,
" ; describe current spot, stop looking at things;"); " ';' describe current spot, stop looking at things;");
} }
} }
if (!force) if (!force)
@@ -232,11 +232,11 @@ int gloc;
} }
char * char *
dxdy_to_dist_descr(dx, dy) dxdy_to_dist_descr(dx, dy, fulldir)
int dx, dy; int dx, dy;
boolean fulldir;
{ {
/* [12] suffices, but guard against long translation for direction-name */ static char buf[30];
static char buf[20];
int dst; int dst;
if (!dx && !dy) { if (!dx && !dy) {
@@ -245,18 +245,23 @@ int dx, dy;
/* explicit direction; 'one step' is implicit */ /* explicit direction; 'one step' is implicit */
Sprintf(buf, "%s", directionname(dst)); Sprintf(buf, "%s", directionname(dst));
} else { } else {
const char *dirnames[4][2] = {
{ "n", "north" },
{ "s", "south" },
{ "w", "west" },
{ "e", "east" } };
buf[0] = '\0'; buf[0] = '\0';
/* 9999: protect buf[] against overflow caused by invalid values */ /* 9999: protect buf[] against overflow caused by invalid values */
if (dy) { if (dy) {
if (abs(dy) > 9999) if (abs(dy) > 9999)
dy = sgn(dy) * 9999; dy = sgn(dy) * 9999;
Sprintf(eos(buf), "%d%c%s", abs(dy), (dy > 0) ? 's' : 'n', Sprintf(eos(buf), "%d%s%s", abs(dy), dirnames[(dy > 0)][fulldir],
dx ? "," : ""); dx ? "," : "");
} }
if (dx) { if (dx) {
if (abs(dx) > 9999) if (abs(dx) > 9999)
dx = sgn(dx) * 9999; dx = sgn(dx) * 9999;
Sprintf(eos(buf), "%d%c", abs(dx), (dx > 0) ? 'e' : 'w'); Sprintf(eos(buf), "%d%s", abs(dx), dirnames[2 + (dx > 0)][fulldir]);
} }
} }
return buf; return buf;
@@ -275,11 +280,13 @@ char *outbuf, cmode;
switch (cmode) { switch (cmode) {
default: default:
break; break;
case GPCOORDS_COMFULL:
case GPCOORDS_COMPASS: case GPCOORDS_COMPASS:
/* "east", "3s", "2n,4w" */ /* "east", "3s", "2n,4w" */
dx = x - u.ux; dx = x - u.ux;
dy = y - u.uy; dy = y - u.uy;
Sprintf(outbuf, "(%s)", dxdy_to_dist_descr(dx, dy)); Sprintf(outbuf, "(%s)",
dxdy_to_dist_descr(dx, dy, cmode == GPCOORDS_COMFULL));
break; break;
case GPCOORDS_MAP: /* x,y */ case GPCOORDS_MAP: /* x,y */
/* upper left corner of map is <1,0>; /* upper left corner of map is <1,0>;
@@ -346,7 +353,7 @@ const char *goal;
if (!goal) if (!goal)
goal = "desired location"; goal = "desired location";
if (flags.verbose) { if (flags.verbose) {
pline("(For instructions type a ?)"); pline("(For instructions type a '?')");
msg_given = TRUE; msg_given = TRUE;
} }
cx = ccp->x; cx = ccp->x;
@@ -561,7 +568,7 @@ const char *goal;
if (!force) if (!force)
Strcpy(note, "aborted"); Strcpy(note, "aborted");
else else
Sprintf(note, "use %c%c%c%c or .", /* hjkl */ Sprintf(note, "use '%c', '%c', '%c', '%c' or '.'", /* hjkl */
Cmd.move_W, Cmd.move_S, Cmd.move_N, Cmd.move_W, Cmd.move_S, Cmd.move_N,
Cmd.move_E); Cmd.move_E);
pline("Unknown direction: '%s' (%s).", visctrl((char) c), pline("Unknown direction: '%s' (%s).", visctrl((char) c),
+4 -4
View File
@@ -498,7 +498,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
} else if (mdef == &youmonst) { } else if (mdef == &youmonst) {
Your("brain is eaten!"); Your("brain is eaten!");
} else { /* monster against monster */ } else { /* monster against monster */
if (visflag) if (visflag && canspotmon(mdef))
pline("%s brain is eaten!", s_suffix(Monnam(mdef))); pline("%s brain is eaten!", s_suffix(Monnam(mdef)));
} }
@@ -512,7 +512,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
} else { } else {
/* no need to check for poly_when_stoned or Stone_resistance; /* no need to check for poly_when_stoned or Stone_resistance;
mind flayers don't have those capabilities */ mind flayers don't have those capabilities */
if (visflag) if (visflag && canseemon(magr))
pline("%s turns to stone!", Monnam(magr)); pline("%s turns to stone!", Monnam(magr));
monstone(magr); monstone(magr);
if (magr->mhp > 0) { if (magr->mhp > 0) {
@@ -597,7 +597,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
* monster mind flayer is eating another monster's brain * monster mind flayer is eating another monster's brain
*/ */
if (mindless(pd)) { if (mindless(pd)) {
if (visflag) if (visflag && canspotmon(mdef))
pline("%s doesn't notice.", Monnam(mdef)); pline("%s doesn't notice.", Monnam(mdef));
return MM_MISS; return MM_MISS;
} else if (is_rider(pd)) { } else if (is_rider(pd)) {
@@ -609,7 +609,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
} else { } else {
*dmg_p += xtra_dmg; *dmg_p += xtra_dmg;
give_nutrit = TRUE; give_nutrit = TRUE;
if (*dmg_p >= mdef->mhp && visflag) if (*dmg_p >= mdef->mhp && visflag && canspotmon(mdef))
pline("%s last thought fades away...", pline("%s last thought fades away...",
s_suffix(Monnam(mdef))); s_suffix(Monnam(mdef)));
} }
+7
View File
@@ -1302,6 +1302,13 @@ int mmflags;
m_initweap(mtmp); /* equip with weapons / armor */ m_initweap(mtmp); /* equip with weapons / armor */
m_initinv(mtmp); /* add on a few special items incl. more armor */ m_initinv(mtmp); /* add on a few special items incl. more armor */
m_dowear(mtmp, TRUE); m_dowear(mtmp, TRUE);
if (!rn2(100) && is_domestic(ptr)
&& can_saddle(mtmp) && !which_armor(mtmp, W_SADDLE)) {
struct obj *otmp = mksobj(SADDLE, TRUE, FALSE);
put_saddle_on_mon(otmp, mtmp);
}
} else { } else {
/* no initial inventory is allowed */ /* no initial inventory is allowed */
if (mtmp->minvent) if (mtmp->minvent)
+50 -41
View File
@@ -410,7 +410,7 @@ register struct monst *magr, *mdef;
&& mdef->mhp > 1 && mdef->mhp > 1
&& !mdef->mcan) { && !mdef->mcan) {
if (clone_mon(mdef, 0, 0)) { if (clone_mon(mdef, 0, 0)) {
if (vis) { if (vis && canspotmon(mdef)) {
char buf[BUFSZ]; char buf[BUFSZ];
Strcpy(buf, Monnam(mdef)); Strcpy(buf, Monnam(mdef));
@@ -587,13 +587,17 @@ struct attack *mattk;
char buf[BUFSZ]; char buf[BUFSZ];
if (vis) { if (vis) {
if (mdef->data->mlet == S_MIMIC
&& mdef->m_ap_type != M_AP_NOTHING)
seemimic(mdef);
Sprintf(buf, "%s gazes at", Monnam(magr)); Sprintf(buf, "%s gazes at", Monnam(magr));
pline("%s %s...", buf, mon_nam(mdef)); pline("%s %s...", buf,
canspotmon(mdef) ? mon_nam(mdef) : "something");
} }
if (magr->mcan || !magr->mcansee || !mdef->mcansee if (magr->mcan || !magr->mcansee || !mdef->mcansee
|| (magr->minvis && !perceives(mdef->data)) || mdef->msleeping) { || (magr->minvis && !perceives(mdef->data)) || mdef->msleeping) {
if (vis) if (vis && canspotmon(mdef))
pline("but nothing happens."); pline("but nothing happens.");
return MM_MISS; return MM_MISS;
} }
@@ -689,8 +693,10 @@ register struct attack *mattk;
if (vis) { if (vis) {
/* 'it' -- previous form is no longer available and /* 'it' -- previous form is no longer available and
using that would be excessively verbose */ using that would be excessively verbose */
pline("%s expels it.", Monnam(magr)); pline("%s expels %s.", Monnam(magr),
pline("It turns into %s.", a_monnam(mdef)); canspotmon(mdef) ? "it" : something);
if (canspotmon(mdef))
pline("It turns into %s.", a_monnam(mdef));
} }
return MM_HIT; /* bypass mdamagem() */ return MM_HIT; /* bypass mdamagem() */
} }
@@ -806,7 +812,7 @@ register struct attack *mattk;
mon_to_stone(magr); mon_to_stone(magr);
return MM_HIT; /* no damage during the polymorph */ return MM_HIT; /* no damage during the polymorph */
} }
if (vis) if (vis && canspotmon(magr))
pline("%s turns to stone!", Monnam(magr)); pline("%s turns to stone!", Monnam(magr));
monstone(magr); monstone(magr);
if (magr->mhp > 0) if (magr->mhp > 0)
@@ -825,7 +831,7 @@ register struct attack *mattk;
case AD_DGST: case AD_DGST:
/* eating a Rider or its corpse is fatal */ /* eating a Rider or its corpse is fatal */
if (is_rider(pd)) { if (is_rider(pd)) {
if (vis) if (vis && canseemon(magr))
pline("%s %s!", Monnam(magr), pline("%s %s!", Monnam(magr),
(pd == &mons[PM_FAMINE]) (pd == &mons[PM_FAMINE])
? "belches feebly, shrivels up and dies" ? "belches feebly, shrivels up and dies"
@@ -921,10 +927,10 @@ register struct attack *mattk;
tmp = 0; tmp = 0;
break; break;
} }
if (vis) if (vis && canseemon(mdef))
pline("%s is %s!", Monnam(mdef), on_fire(pd, mattk)); pline("%s is %s!", Monnam(mdef), on_fire(pd, mattk));
if (pd == &mons[PM_STRAW_GOLEM] || pd == &mons[PM_PAPER_GOLEM]) { if (pd == &mons[PM_STRAW_GOLEM] || pd == &mons[PM_PAPER_GOLEM]) {
if (vis) if (vis && canseemon(mdef))
pline("%s burns completely!", Monnam(mdef)); pline("%s burns completely!", Monnam(mdef));
mondied(mdef); mondied(mdef);
if (mdef->mhp > 0) if (mdef->mhp > 0)
@@ -936,7 +942,7 @@ register struct attack *mattk;
tmp += destroy_mitem(mdef, SCROLL_CLASS, AD_FIRE); tmp += destroy_mitem(mdef, SCROLL_CLASS, AD_FIRE);
tmp += destroy_mitem(mdef, SPBOOK_CLASS, AD_FIRE); tmp += destroy_mitem(mdef, SPBOOK_CLASS, AD_FIRE);
if (resists_fire(mdef)) { if (resists_fire(mdef)) {
if (vis) if (vis && canseemon(mdef))
pline_The("fire doesn't seem to burn %s!", mon_nam(mdef)); pline_The("fire doesn't seem to burn %s!", mon_nam(mdef));
shieldeff(mdef->mx, mdef->my); shieldeff(mdef->mx, mdef->my);
golemeffects(mdef, AD_FIRE, tmp); golemeffects(mdef, AD_FIRE, tmp);
@@ -950,10 +956,10 @@ register struct attack *mattk;
tmp = 0; tmp = 0;
break; break;
} }
if (vis) if (vis && canseemon(mdef))
pline("%s is covered in frost!", Monnam(mdef)); pline("%s is covered in frost!", Monnam(mdef));
if (resists_cold(mdef)) { if (resists_cold(mdef)) {
if (vis) if (vis && canseemon(mdef))
pline_The("frost doesn't seem to chill %s!", mon_nam(mdef)); pline_The("frost doesn't seem to chill %s!", mon_nam(mdef));
shieldeff(mdef->mx, mdef->my); shieldeff(mdef->mx, mdef->my);
golemeffects(mdef, AD_COLD, tmp); golemeffects(mdef, AD_COLD, tmp);
@@ -966,11 +972,11 @@ register struct attack *mattk;
tmp = 0; tmp = 0;
break; break;
} }
if (vis) if (vis && canseemon(mdef))
pline("%s gets zapped!", Monnam(mdef)); pline("%s gets zapped!", Monnam(mdef));
tmp += destroy_mitem(mdef, WAND_CLASS, AD_ELEC); tmp += destroy_mitem(mdef, WAND_CLASS, AD_ELEC);
if (resists_elec(mdef)) { if (resists_elec(mdef)) {
if (vis) if (vis && canseemon(mdef))
pline_The("zap doesn't shock %s!", mon_nam(mdef)); pline_The("zap doesn't shock %s!", mon_nam(mdef));
shieldeff(mdef->mx, mdef->my); shieldeff(mdef->mx, mdef->my);
golemeffects(mdef, AD_ELEC, tmp); golemeffects(mdef, AD_ELEC, tmp);
@@ -985,11 +991,11 @@ register struct attack *mattk;
break; break;
} }
if (resists_acid(mdef)) { if (resists_acid(mdef)) {
if (vis) if (vis && canseemon(mdef))
pline("%s is covered in %s, but it seems harmless.", pline("%s is covered in %s, but it seems harmless.",
Monnam(mdef), hliquid("acid")); Monnam(mdef), hliquid("acid"));
tmp = 0; tmp = 0;
} else if (vis) { } else if (vis && canseemon(mdef)) {
pline("%s is covered in %s!", Monnam(mdef), hliquid("acid")); pline("%s is covered in %s!", Monnam(mdef), hliquid("acid"));
pline("It burns %s!", mon_nam(mdef)); pline("It burns %s!", mon_nam(mdef));
} }
@@ -1002,7 +1008,7 @@ register struct attack *mattk;
if (magr->mcan) if (magr->mcan)
break; break;
if (pd == &mons[PM_IRON_GOLEM]) { if (pd == &mons[PM_IRON_GOLEM]) {
if (vis) if (vis && canseemon(mdef))
pline("%s falls to pieces!", Monnam(mdef)); pline("%s falls to pieces!", Monnam(mdef));
mondied(mdef); mondied(mdef);
if (mdef->mhp > 0) if (mdef->mhp > 0)
@@ -1026,7 +1032,7 @@ register struct attack *mattk;
if (magr->mcan) if (magr->mcan)
break; break;
if (pd == &mons[PM_WOOD_GOLEM] || pd == &mons[PM_LEATHER_GOLEM]) { if (pd == &mons[PM_WOOD_GOLEM] || pd == &mons[PM_LEATHER_GOLEM]) {
if (vis) if (vis && canseemon(mdef))
pline("%s falls to pieces!", Monnam(mdef)); pline("%s falls to pieces!", Monnam(mdef));
mondied(mdef); mondied(mdef);
if (mdef->mhp > 0) if (mdef->mhp > 0)
@@ -1052,7 +1058,7 @@ register struct attack *mattk;
break; break;
} }
if (!resists_ston(mdef)) { if (!resists_ston(mdef)) {
if (vis) if (vis && canseemon(mdef))
pline("%s turns to stone!", Monnam(mdef)); pline("%s turns to stone!", Monnam(mdef));
monstone(mdef); monstone(mdef);
post_stone: post_stone:
@@ -1067,20 +1073,21 @@ register struct attack *mattk;
case AD_TLPT: case AD_TLPT:
if (!cancelled && tmp < mdef->mhp && !tele_restrict(mdef)) { if (!cancelled && tmp < mdef->mhp && !tele_restrict(mdef)) {
char mdef_Monnam[BUFSZ]; char mdef_Monnam[BUFSZ];
boolean wasseen = canspotmon(mdef);
/* save the name before monster teleports, otherwise /* save the name before monster teleports, otherwise
we'll get "it" in the suddenly disappears message */ we'll get "it" in the suddenly disappears message */
if (vis) if (vis && wasseen)
Strcpy(mdef_Monnam, Monnam(mdef)); Strcpy(mdef_Monnam, Monnam(mdef));
mdef->mstrategy &= ~STRAT_WAITFORU; mdef->mstrategy &= ~STRAT_WAITFORU;
(void) rloc(mdef, TRUE); (void) rloc(mdef, TRUE);
if (vis && !canspotmon(mdef) && mdef != u.usteed) if (vis && wasseen && !canspotmon(mdef) && mdef != u.usteed)
pline("%s suddenly disappears!", mdef_Monnam); pline("%s suddenly disappears!", mdef_Monnam);
} }
break; break;
case AD_SLEE: case AD_SLEE:
if (!cancelled && !mdef->msleeping if (!cancelled && !mdef->msleeping
&& sleep_monst(mdef, rnd(10), -1)) { && sleep_monst(mdef, rnd(10), -1)) {
if (vis) { if (vis && canspotmon(mdef)) {
Strcpy(buf, Monnam(mdef)); Strcpy(buf, Monnam(mdef));
pline("%s is put to sleep by %s.", buf, mon_nam(magr)); pline("%s is put to sleep by %s.", buf, mon_nam(magr));
} }
@@ -1090,7 +1097,7 @@ register struct attack *mattk;
break; break;
case AD_PLYS: case AD_PLYS:
if (!cancelled && mdef->mcanmove) { if (!cancelled && mdef->mcanmove) {
if (vis) { if (vis && canspotmon(mdef)) {
Strcpy(buf, Monnam(mdef)); Strcpy(buf, Monnam(mdef));
pline("%s is frozen by %s.", buf, mon_nam(magr)); pline("%s is frozen by %s.", buf, mon_nam(magr));
} }
@@ -1103,7 +1110,7 @@ register struct attack *mattk;
mon_adjust_speed(mdef, -1, (struct obj *) 0); mon_adjust_speed(mdef, -1, (struct obj *) 0);
mdef->mstrategy &= ~STRAT_WAITFORU; mdef->mstrategy &= ~STRAT_WAITFORU;
if (mdef->mspeed != oldspeed && vis) if (mdef->mspeed != oldspeed && vis && canspotmon(mdef))
pline("%s slows down.", Monnam(mdef)); pline("%s slows down.", Monnam(mdef));
} }
break; break;
@@ -1113,7 +1120,7 @@ register struct attack *mattk;
* we still should check for it). * we still should check for it).
*/ */
if (!magr->mcan && !mdef->mconf && !magr->mspec_used) { if (!magr->mcan && !mdef->mconf && !magr->mspec_used) {
if (vis) if (vis && canseemon(mdef))
pline("%s looks confused.", Monnam(mdef)); pline("%s looks confused.", Monnam(mdef));
mdef->mconf = 1; mdef->mconf = 1;
mdef->mstrategy &= ~STRAT_WAITFORU; mdef->mstrategy &= ~STRAT_WAITFORU;
@@ -1123,7 +1130,7 @@ register struct attack *mattk;
if (can_blnd(magr, mdef, mattk->aatyp, (struct obj *) 0)) { if (can_blnd(magr, mdef, mattk->aatyp, (struct obj *) 0)) {
register unsigned rnd_tmp; register unsigned rnd_tmp;
if (vis && mdef->mcansee) if (vis && mdef->mcansee && canspotmon(mdef))
pline("%s is blinded.", Monnam(mdef)); pline("%s is blinded.", Monnam(mdef));
rnd_tmp = d((int) mattk->damn, (int) mattk->damd); rnd_tmp = d((int) mattk->damn, (int) mattk->damd);
if ((rnd_tmp += mdef->mblinded) > 127) if ((rnd_tmp += mdef->mblinded) > 127)
@@ -1136,7 +1143,7 @@ register struct attack *mattk;
break; break;
case AD_HALU: case AD_HALU:
if (!magr->mcan && haseyes(pd) && mdef->mcansee) { if (!magr->mcan && haseyes(pd) && mdef->mcansee) {
if (vis) if (vis && canseemon(mdef))
pline("%s looks %sconfused.", Monnam(mdef), pline("%s looks %sconfused.", Monnam(mdef),
mdef->mconf ? "more " : ""); mdef->mconf ? "more " : "");
mdef->mconf = 1; mdef->mconf = 1;
@@ -1153,7 +1160,7 @@ register struct attack *mattk;
if (is_were(pd) && pd->mlet != S_HUMAN) if (is_were(pd) && pd->mlet != S_HUMAN)
were_change(mdef); were_change(mdef);
if (pd == &mons[PM_CLAY_GOLEM]) { if (pd == &mons[PM_CLAY_GOLEM]) {
if (vis) { if (vis && canseemon(mdef)) {
pline("Some writing vanishes from %s head!", pline("Some writing vanishes from %s head!",
s_suffix(mon_nam(mdef))); s_suffix(mon_nam(mdef)));
pline("%s is destroyed!", Monnam(mdef)); pline("%s is destroyed!", Monnam(mdef));
@@ -1169,7 +1176,7 @@ register struct attack *mattk;
if (!Deaf) { if (!Deaf) {
if (!vis) if (!vis)
You_hear("laughter."); You_hear("laughter.");
else else if (canseemon(magr))
pline("%s chuckles.", Monnam(magr)); pline("%s chuckles.", Monnam(magr));
} }
} }
@@ -1190,20 +1197,21 @@ register struct attack *mattk;
add_to_minv(magr, gold); add_to_minv(magr, gold);
} }
mdef->mstrategy &= ~STRAT_WAITFORU; mdef->mstrategy &= ~STRAT_WAITFORU;
if (vis) { if (vis && canseemon(mdef)) {
Strcpy(buf, Monnam(magr)); Strcpy(buf, Monnam(magr));
pline("%s steals some gold from %s.", buf, mon_nam(mdef)); pline("%s steals some gold from %s.", buf, mon_nam(mdef));
} }
if (!tele_restrict(magr)) { if (!tele_restrict(magr)) {
boolean couldspot = canspotmon(magr);
(void) rloc(magr, TRUE); (void) rloc(magr, TRUE);
if (vis && !canspotmon(magr)) if (vis && couldspot && !canspotmon(magr))
pline("%s suddenly disappears!", buf); pline("%s suddenly disappears!", buf);
} }
break; break;
case AD_DRLI: case AD_DRLI:
if (!cancelled && !rn2(3) && !resists_drli(mdef)) { if (!cancelled && !rn2(3) && !resists_drli(mdef)) {
tmp = d(2, 6); tmp = d(2, 6);
if (vis) if (vis && canspotmon(mdef))
pline("%s suddenly seems weaker!", Monnam(mdef)); pline("%s suddenly seems weaker!", Monnam(mdef));
mdef->mhpmax -= tmp; mdef->mhpmax -= tmp;
if (mdef->m_lev == 0) if (mdef->m_lev == 0)
@@ -1247,7 +1255,7 @@ register struct attack *mattk;
if (vis) if (vis)
Strcpy(onambuf, doname(otmp)); Strcpy(onambuf, doname(otmp));
(void) add_to_minv(magr, otmp); (void) add_to_minv(magr, otmp);
if (vis) { if (vis && canseemon(mdef)) {
Strcpy(buf, Monnam(magr)); Strcpy(buf, Monnam(magr));
pline("%s steals %s from %s!", buf, onambuf, mdefnambuf); pline("%s steals %s from %s!", buf, onambuf, mdefnambuf);
} }
@@ -1258,8 +1266,9 @@ register struct attack *mattk;
return (MM_DEF_DIED return (MM_DEF_DIED
| (grow_up(magr, mdef) ? 0 : MM_AGR_DIED)); | (grow_up(magr, mdef) ? 0 : MM_AGR_DIED));
if (pa->mlet == S_NYMPH && !tele_restrict(magr)) { if (pa->mlet == S_NYMPH && !tele_restrict(magr)) {
boolean couldspot = canspotmon(magr);
(void) rloc(magr, TRUE); (void) rloc(magr, TRUE);
if (vis && !canspotmon(magr)) if (vis && couldspot && !canspotmon(magr))
pline("%s suddenly disappears!", buf); pline("%s suddenly disappears!", buf);
} }
} }
@@ -1267,25 +1276,25 @@ register struct attack *mattk;
break; break;
case AD_DREN: case AD_DREN:
if (!cancelled && !rn2(4)) if (!cancelled && !rn2(4))
xdrainenergym(mdef, vis && mattk->aatyp != AT_ENGL); xdrainenergym(mdef, vis && canspotmon(mdef) && mattk->aatyp != AT_ENGL);
tmp = 0; tmp = 0;
break; break;
case AD_DRST: case AD_DRST:
case AD_DRDX: case AD_DRDX:
case AD_DRCO: case AD_DRCO:
if (!cancelled && !rn2(8)) { if (!cancelled && !rn2(8)) {
if (vis) if (vis && canspotmon(magr))
pline("%s %s was poisoned!", s_suffix(Monnam(magr)), pline("%s %s was poisoned!", s_suffix(Monnam(magr)),
mpoisons_subj(magr, mattk)); mpoisons_subj(magr, mattk));
if (resists_poison(mdef)) { if (resists_poison(mdef)) {
if (vis) if (vis && canspotmon(mdef) && canspotmon(magr))
pline_The("poison doesn't seem to affect %s.", pline_The("poison doesn't seem to affect %s.",
mon_nam(mdef)); mon_nam(mdef));
} else { } else {
if (rn2(10)) if (rn2(10))
tmp += rn1(10, 6); tmp += rn1(10, 6);
else { else {
if (vis) if (vis && canspotmon(mdef))
pline_The("poison was deadly..."); pline_The("poison was deadly...");
tmp = mdef->mhp; tmp = mdef->mhp;
} }
@@ -1294,14 +1303,14 @@ register struct attack *mattk;
break; break;
case AD_DRIN: case AD_DRIN:
if (notonhead || !has_head(pd)) { if (notonhead || !has_head(pd)) {
if (vis) if (vis && canspotmon(mdef))
pline("%s doesn't seem harmed.", Monnam(mdef)); pline("%s doesn't seem harmed.", Monnam(mdef));
/* Not clear what to do for green slimes */ /* Not clear what to do for green slimes */
tmp = 0; tmp = 0;
break; break;
} }
if ((mdef->misc_worn_check & W_ARMH) && rn2(8)) { if ((mdef->misc_worn_check & W_ARMH) && rn2(8)) {
if (vis) { if (vis && canspotmon(magr) && canseemon(mdef)) {
Strcpy(buf, s_suffix(Monnam(mdef))); Strcpy(buf, s_suffix(Monnam(mdef)));
pline("%s helmet blocks %s attack to %s head.", buf, pline("%s helmet blocks %s attack to %s head.", buf,
s_suffix(mon_nam(magr)), mhis(mdef)); s_suffix(mon_nam(magr)), mhis(mdef));
@@ -1315,7 +1324,7 @@ register struct attack *mattk;
break; /* physical damage only */ break; /* physical damage only */
if (!rn2(4) && !slimeproof(pd)) { if (!rn2(4) && !slimeproof(pd)) {
if (!munslime(mdef, FALSE) && mdef->mhp > 0) { if (!munslime(mdef, FALSE) && mdef->mhp > 0) {
if (newcham(mdef, &mons[PM_GREEN_SLIME], FALSE, vis)) if (newcham(mdef, &mons[PM_GREEN_SLIME], FALSE, vis && canseemon(mdef)))
pd = mdef->data; pd = mdef->data;
mdef->mstrategy &= ~STRAT_WAITFORU; mdef->mstrategy &= ~STRAT_WAITFORU;
res = MM_HIT; res = MM_HIT;
+27 -14
View File
@@ -1768,6 +1768,23 @@ char **opp;
return FALSE; return FALSE;
} }
/* Check if character c is illegal as a menu command key */
boolean
illegal_menu_cmd_key(c)
char c;
{
if (c == 0 || c == '\r' || c == '\n' || c == '\033'
|| c == ' ' || digit(c) || (letter(c) && c != '@'))
return TRUE;
else { /* reject default object class symbols */
int j;
for (j = 1; j < MAXOCLASSES; j++)
if (c == def_oc_syms[j].sym)
return TRUE;
}
return FALSE;
}
void void
parseoptions(opts, tinitial, tfrom_file) parseoptions(opts, tinitial, tfrom_file)
register char *opts; register char *opts;
@@ -2362,7 +2379,8 @@ boolean tinitial, tfrom_file;
return; return;
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) { } else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
static char gpcoords[] = { GPCOORDS_NONE, GPCOORDS_COMPASS, static char gpcoords[] = { GPCOORDS_NONE, GPCOORDS_COMPASS,
GPCOORDS_MAP, GPCOORDS_SCREEN, '\0' }; GPCOORDS_COMFULL, GPCOORDS_MAP,
GPCOORDS_SCREEN, '\0' };
char c = lowc(*op); char c = lowc(*op);
if (c && index(gpcoords, c)) if (c && index(gpcoords, c))
@@ -3225,22 +3243,11 @@ boolean tinitial, tfrom_file;
} else if ((op = string_for_opt(opts, FALSE)) != 0) { } else if ((op = string_for_opt(opts, FALSE)) != 0) {
int j; int j;
char c, op_buf[BUFSZ]; char c, op_buf[BUFSZ];
boolean isbad = FALSE;
escapes(op, op_buf); escapes(op, op_buf);
c = *op_buf; c = *op_buf;
if (c == 0 || c == '\r' || c == '\n' || c == '\033' if (illegal_menu_cmd_key(c))
|| c == ' ' || digit(c) || (letter(c) && c != '@'))
isbad = TRUE;
else /* reject default object class symbols */
for (j = 1; j < MAXOCLASSES; j++)
if (c == def_oc_syms[i].sym) {
isbad = TRUE;
break;
}
if (isbad)
badoption(opts); badoption(opts);
else else
add_menu_cmd_alias(c, default_menu_cmd_info[i].cmd); add_menu_cmd_alias(c, default_menu_cmd_info[i].cmd);
@@ -4104,6 +4111,10 @@ boolean setinitial, setfromfile;
add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_COMPASS, add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_COMPASS,
0, ATR_NONE, "compass ('east' or '3s' or '2n,4w')", 0, ATR_NONE, "compass ('east' or '3s' or '2n,4w')",
(gp == GPCOORDS_COMPASS) ? MENU_SELECTED : MENU_UNSELECTED); (gp == GPCOORDS_COMPASS) ? MENU_SELECTED : MENU_UNSELECTED);
any.a_char = GPCOORDS_COMFULL;
add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_COMFULL,
0, ATR_NONE, "full compass ('east' or '3south' or '2north,4west')",
(gp == GPCOORDS_COMFULL) ? MENU_SELECTED : MENU_UNSELECTED);
any.a_char = GPCOORDS_MAP; any.a_char = GPCOORDS_MAP;
add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_MAP, add_menu(tmpwin, NO_GLYPH, &any, GPCOORDS_MAP,
0, ATR_NONE, "map <x,y>", 0, ATR_NONE, "map <x,y>",
@@ -4561,7 +4572,8 @@ boolean setinitial, setfromfile;
} }
sl = sl->next; sl = sl->next;
} }
end_menu(tmpwin, "Select symbol set:"); Sprintf(buf, "Select %ssymbol set:", rogueflag ? "rogue level " : "");
end_menu(tmpwin, buf);
if (select_menu(tmpwin, PICK_ONE, &symset_pick) > 0) { if (select_menu(tmpwin, PICK_ONE, &symset_pick) > 0) {
chosen = symset_pick->item.a_int - 2; chosen = symset_pick->item.a_int - 2;
free((genericptr_t) symset_pick); free((genericptr_t) symset_pick);
@@ -4916,6 +4928,7 @@ char *buf;
Sprintf(buf, "%s", Sprintf(buf, "%s",
(iflags.getpos_coords == GPCOORDS_MAP) ? "map" (iflags.getpos_coords == GPCOORDS_MAP) ? "map"
: (iflags.getpos_coords == GPCOORDS_COMPASS) ? "compass" : (iflags.getpos_coords == GPCOORDS_COMPASS) ? "compass"
: (iflags.getpos_coords == GPCOORDS_COMFULL) ? "full compass"
: (iflags.getpos_coords == GPCOORDS_SCREEN) ? "screen" : (iflags.getpos_coords == GPCOORDS_SCREEN) ? "screen"
: "none"); : "none");
} else if (!strcmp(optname, "scores")) { } else if (!strcmp(optname, "scores")) {
+125 -115
View File
@@ -18,8 +18,17 @@ STATIC_DCL void FDECL(checkfile, (char *, struct permonst *,
BOOLEAN_P, BOOLEAN_P)); BOOLEAN_P, BOOLEAN_P));
STATIC_DCL void FDECL(look_all, (BOOLEAN_P,BOOLEAN_P)); STATIC_DCL void FDECL(look_all, (BOOLEAN_P,BOOLEAN_P));
STATIC_DCL void NDECL(whatdoes_help); STATIC_DCL void NDECL(whatdoes_help);
STATIC_DCL boolean FDECL(help_menu, (int *));
STATIC_DCL void NDECL(docontact); STATIC_DCL void NDECL(docontact);
STATIC_DCL void NDECL(dispfile_help);
STATIC_DCL void NDECL(dispfile_shelp);
STATIC_DCL void NDECL(dispfile_optionfile);
STATIC_DCL void NDECL(dispfile_license);
STATIC_DCL void NDECL(dispfile_debughelp);
STATIC_DCL void NDECL(hmenu_doextversion);
STATIC_DCL void NDECL(hmenu_dohistory);
STATIC_DCL void NDECL(hmenu_dowhatis);
STATIC_DCL void NDECL(hmenu_dowhatdoes);
STATIC_DCL void NDECL(hmenu_doextlist);
#ifdef PORT_HELP #ifdef PORT_HELP
extern void NDECL(port_help); extern void NDECL(port_help);
#endif #endif
@@ -53,6 +62,8 @@ const char *new_str;
return 0; return 0;
space_left = BUFSZ - strlen(buf) - 1; space_left = BUFSZ - strlen(buf) - 1;
if (space_left < 1)
return 0;
(void) strncat(buf, " or ", space_left); (void) strncat(buf, " or ", space_left);
(void) strncat(buf, new_str, space_left - 4); (void) strncat(buf, new_str, space_left - 4);
return 1; return 1;
@@ -918,6 +929,10 @@ const char **firstmatch;
* If we are looking at the screen, follow multiple possibilities or * If we are looking at the screen, follow multiple possibilities or
* an ambiguous explanation by something more detailed. * an ambiguous explanation by something more detailed.
*/ */
if (found > 4)
Sprintf(out_str, "%s", "That can be many things");
didlook: didlook:
if (looked) { if (looked) {
if (found > 1 || need_to_look) { if (found > 1 || need_to_look) {
@@ -943,12 +958,6 @@ const char **firstmatch;
return found; return found;
} }
/* getpos() return values */
#define LOOK_TRADITIONAL 0 /* '.' -- ask about "more info?" */
#define LOOK_QUICK 1 /* ',' -- skip "more info?" */
#define LOOK_ONCE 2 /* ';' -- skip and stop looping */
#define LOOK_VERBOSE 3 /* ':' -- show more info w/o asking */
/* also used by getpos hack in do_name.c */ /* also used by getpos hack in do_name.c */
const char what_is_an_unknown_object[] = "an unknown object"; const char what_is_an_unknown_object[] = "an unknown object";
@@ -1636,123 +1645,124 @@ docontact()
destroy_nhwindow(cwin); destroy_nhwindow(cwin);
} }
/* data for help_menu() */ void
static const char *help_menu_items[] = { dispfile_help()
/* 0*/ "About NetHack (version information).",
/* 1*/ "Long description of the game and commands.",
/* 2*/ "List of game commands.",
/* 3*/ "Concise history of NetHack.",
/* 4*/ "Info on a character in the game display.",
/* 5*/ "Info on what a given key does.",
/* 6*/ "List of game options.",
/* 7*/ "Longer explanation of game options.",
/* 8*/ "List of extended commands.",
/* 9*/ "The NetHack license.",
/* 10*/ "Support information.",
#ifdef PORT_HELP
"%s-specific help and commands.",
#define PORT_HELP_ID 100
#define WIZHLP_SLOT 12
#else
#define WIZHLP_SLOT 11
#endif
"List of wizard-mode commands.", "", (char *) 0
};
STATIC_OVL boolean
help_menu(sel)
int *sel;
{ {
winid tmpwin = create_nhwindow(NHW_MENU); display_file(HELP, TRUE);
#ifdef PORT_HELP
char helpbuf[QBUFSZ];
#endif
int i, n;
menu_item *selected;
anything any;
any = zeroany; /* zero all bits */
start_menu(tmpwin);
if (!wizard)
help_menu_items[WIZHLP_SLOT] = "",
help_menu_items[WIZHLP_SLOT + 1] = (char *) 0;
for (i = 0; help_menu_items[i]; i++)
#ifdef PORT_HELP
/* port-specific line has a %s in it for the PORT_ID */
if (help_menu_items[i][0] == '%') {
Sprintf(helpbuf, help_menu_items[i], PORT_ID);
any.a_int = PORT_HELP_ID + 1;
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, helpbuf,
MENU_UNSELECTED);
} else
#endif
{
any.a_int = (*help_menu_items[i]) ? i + 1 : 0;
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE,
help_menu_items[i], MENU_UNSELECTED);
}
end_menu(tmpwin, "Select one item:");
n = select_menu(tmpwin, PICK_ONE, &selected);
destroy_nhwindow(tmpwin);
if (n > 0) {
*sel = selected[0].item.a_int - 1;
free((genericptr_t) selected);
return TRUE;
}
return FALSE;
} }
void
dispfile_shelp()
{
display_file(SHELP, TRUE);
}
void
dispfile_optionfile()
{
display_file(OPTIONFILE, TRUE);
}
void
dispfile_license()
{
display_file(LICENSE, TRUE);
}
void
dispfile_debughelp()
{
display_file(DEBUGHELP, TRUE);
}
void
hmenu_doextversion()
{
(void) doextversion();
}
void
hmenu_dohistory()
{
(void) dohistory();
}
void
hmenu_dowhatis()
{
(void) dowhatis();
}
void
hmenu_dowhatdoes()
{
(void) dowhatdoes();
}
void
hmenu_doextlist()
{
(void) doextlist();
}
/* data for dohelp() */
static struct {
void (*f)();
const char *text;
} help_menu_items[] = {
{ hmenu_doextversion, "About NetHack (version information)." },
{ dispfile_help, "Long description of the game and commands." },
{ dispfile_shelp, "List of game commands." },
{ hmenu_dohistory, "Concise history of NetHack." },
{ hmenu_dowhatis, "Info on a character in the game display." },
{ hmenu_dowhatdoes, "Info on what a given key does." },
{ option_help, "List of game options." },
{ dispfile_optionfile, "Longer explanation of game options." },
{ hmenu_doextlist, "List of extended commands." },
{ dispfile_license, "The NetHack license." },
{ docontact, "Support information." },
#ifdef PORT_HELP
{ port_help, "%s-specific help and commands." },
#endif
{ dispfile_debughelp, "List of wizard-mode commands." },
{ NULL, (char *) 0 }
};
/* the '?' command */ /* the '?' command */
int int
dohelp() dohelp()
{ {
int sel = 0; winid tmpwin = create_nhwindow(NHW_MENU);
char helpbuf[QBUFSZ];
int i, n;
menu_item *selected;
anything any;
int sel;
char *bufptr;
if (help_menu(&sel)) { any = zeroany; /* zero all bits */
switch (sel) { start_menu(tmpwin);
case 0:
(void) doextversion(); for (i = 0; help_menu_items[i].text; i++) {
break; if (!wizard && help_menu_items[i].f == dispfile_debughelp)
case 1: continue;
display_file(HELP, TRUE); if (help_menu_items[i].text[0] == '%') {
break; Sprintf(helpbuf, help_menu_items[i].text, PORT_ID);
case 2: bufptr = helpbuf;
display_file(SHELP, TRUE); } else {
break; bufptr = (char *)help_menu_items[i].text;
case 3:
(void) dohistory();
break;
case 4:
(void) dowhatis();
break;
case 5:
(void) dowhatdoes();
break;
case 6:
option_help();
break;
case 7:
display_file(OPTIONFILE, TRUE);
break;
case 8:
(void) doextlist();
break;
case 9:
display_file(LICENSE, TRUE);
break;
case 10:
(void) docontact();
break;
#ifdef PORT_HELP
case PORT_HELP_ID:
port_help();
break;
#endif
default:
/* handle slot 11 or 12 */
display_file(DEBUGHELP, TRUE);
break;
} }
any.a_int = i + 1;
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE,
bufptr, MENU_UNSELECTED);
}
end_menu(tmpwin, "Select one item:");
n = select_menu(tmpwin, PICK_ONE, &selected);
destroy_nhwindow(tmpwin);
if (n > 0) {
sel = selected[0].item.a_int - 1;
free((genericptr_t) selected);
(void)(*help_menu_items[sel].f)();
} }
return 0; return 0;
} }
+67 -3
View File
@@ -8,6 +8,7 @@
STATIC_DCL void NDECL(stoned_dialogue); STATIC_DCL void NDECL(stoned_dialogue);
STATIC_DCL void NDECL(vomiting_dialogue); STATIC_DCL void NDECL(vomiting_dialogue);
STATIC_DCL void NDECL(choke_dialogue); STATIC_DCL void NDECL(choke_dialogue);
STATIC_DCL void NDECL(levitation_dialogue);
STATIC_DCL void NDECL(slime_dialogue); STATIC_DCL void NDECL(slime_dialogue);
STATIC_DCL void NDECL(slip_or_trip); STATIC_DCL void NDECL(slip_or_trip);
STATIC_DCL void FDECL(see_lamp_flicker, (struct obj *, const char *)); STATIC_DCL void FDECL(see_lamp_flicker, (struct obj *, const char *));
@@ -122,14 +123,18 @@ vomiting_dialogue()
} }
static NEARDATA const char *const choke_texts[] = { static NEARDATA const char *const choke_texts[] = {
"You find it hard to breathe.", "You're gasping for air.", "You find it hard to breathe.",
"You can no longer breathe.", "You're turning %s.", "You suffocate." "You're gasping for air.",
"You can no longer breathe.",
"You're turning %s.",
"You suffocate."
}; };
static NEARDATA const char *const choke_texts2[] = { static NEARDATA const char *const choke_texts2[] = {
"Your %s is becoming constricted.", "Your %s is becoming constricted.",
"Your blood is having trouble reaching your brain.", "Your blood is having trouble reaching your brain.",
"The pressure on your %s increases.", "Your consciousness is fading.", "The pressure on your %s increases.",
"Your consciousness is fading.",
"You suffocate." "You suffocate."
}; };
@@ -153,6 +158,36 @@ choke_dialogue()
exercise(A_STR, FALSE); exercise(A_STR, FALSE);
} }
static NEARDATA const char *const levi_texts[] = {
"You float slightly lower.",
"You wobble unsteadily %s the %s."
};
STATIC_OVL void
levitation_dialogue()
{
/* -1 because the last message comes via float_down() */
long i = (((HLevitation & TIMEOUT) - 1L) / 2L);
if (ELevitation)
return;
if (!ACCESSIBLE(levl[u.ux][u.uy].typ)
&& !is_pool_or_lava(u.ux,u.uy))
return;
if (((HLevitation & TIMEOUT) % 2L) && i > 0L && i <= SIZE(levi_texts)) {
const char *s = levi_texts[SIZE(levi_texts) - i];
if (index(s, '%')) {
boolean danger = is_pool_or_lava(u.ux, u.uy)
&& !Is_waterlevel(&u.uz);
pline(s, danger ? "over" : "in",
danger ? surface(u.ux, u.uy) : "air");
} else
pline1(s);
}
}
static NEARDATA const char *const slime_texts[] = { static NEARDATA const char *const slime_texts[] = {
"You are turning a little %s.", /* 5 */ "You are turning a little %s.", /* 5 */
"Your limbs are getting oozy.", /* 4 */ "Your limbs are getting oozy.", /* 4 */
@@ -238,6 +273,8 @@ nh_timeout()
vomiting_dialogue(); vomiting_dialogue();
if (Strangled) if (Strangled)
choke_dialogue(); choke_dialogue();
if (Levitation)
levitation_dialogue();
if (u.mtimedone && !--u.mtimedone) { if (u.mtimedone && !--u.mtimedone) {
if (Unchanging) if (Unchanging)
u.mtimedone = rnd(100 * youmonst.data->mlevel + 1); u.mtimedone = rnd(100 * youmonst.data->mlevel + 1);
@@ -1453,6 +1490,26 @@ timer_element *base;
} }
} }
static boolean print_prop_header = TRUE;
void
print_prop(win, text, prop)
winid win;
const char *text;
long prop;
{
char buf[BUFSZ];
if (prop & TIMEOUT) {
if (print_prop_header) {
putstr(win, 0, "");
putstr(win, 0, "Properties:");
putstr(win, 0, "");
print_prop_header = FALSE;
}
Sprintf(buf, " %10s: %ld", text, (prop & TIMEOUT));
putstr(win, 0, buf);
}
}
int int
wiz_timeout_queue() wiz_timeout_queue()
{ {
@@ -1470,6 +1527,13 @@ wiz_timeout_queue()
putstr(win, 0, ""); putstr(win, 0, "");
print_queue(win, timer_base); print_queue(win, timer_base);
print_prop_header = TRUE;
print_prop(win, "Levitation", HLevitation);
print_prop(win, "Stoned", Stoned);
print_prop(win, "Vomiting", Vomiting);
print_prop(win, "Strangled", Strangled);
print_prop(win, "Slimed", Slimed);
display_nhwindow(win, FALSE); display_nhwindow(win, FALSE);
destroy_nhwindow(win); destroy_nhwindow(win);
+168 -104
View File
@@ -1,17 +1,28 @@
! $NHDT-Date: 1457079198 2016/03/04 08:13:18 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.11 $ ! $NHDT-Date: 1457079198 2016/03/04 08:13:18 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.11 $
#define NETHACK_FONT -*-fixed-medium-*-*-*-15-*-*-*-*-*-*-*
#define NETHACK_CLR_FG grey
#define NETHACK_CLR_BG black
#define NETHACK_CLR_QUIT red
#define NETHACK_CLR_RANDOM green
#define NETHACK_CLR_HELP green
#define NETHACK_BTN_SHAPE roundedRectangle
#define NETHACK_BTN_ROUND 20
#define NETHACK_CMD_BORDER 0
! The display_file, tombstone, and menu windows are all formatted assuming ! The display_file, tombstone, and menu windows are all formatted assuming
! a fixed width font. Text windows may or may not be formatted as above. ! a fixed width font. Text windows may or may not be formatted as above.
! The rip window applies if the GRAPHIC_TOMBSTONE option is turned on, and ! The rip window applies if the GRAPHIC_TOMBSTONE option is turned on, and
! requires a 12 pixel font for correct appearance. ! requires a 12 pixel font for correct appearance.
! !
NetHack*font: variable NetHack*font: NETHACK_FONT
NetHack*display_file*font: fixed NetHack*display_file*font: NETHACK_FONT
NetHack*tombstone*font: fixed NetHack*map*font: NETHACK_FONT
NetHack*text*rip*font: -*-times-medium-r-*-*-12-*-*-*-*-*-*-* NetHack*text*font: NETHACK_FONT
NetHack*menu*font: fixed NetHack*menu*font: NETHACK_FONT
NetHack*text*font: fixed NetHack*tombstone*font: NETHACK_FONT
NetHack*map*font: nh10 NetHack*text*rip*font: -*-times-medium-r-*-*-12-*-*-*-*-*-*-*
NetHack*text*borderWidth: 0
! tile_file names a file containing full-color tiles for the map. ! tile_file names a file containing full-color tiles for the map.
! If you use a 100dpi (or greater) monitor you may wish to double the ! If you use a 100dpi (or greater) monitor you may wish to double the
@@ -35,7 +46,7 @@ NetHack.tile_file: x11tiles
! The image file ! The image file
!NetHack.tombstone: rip.xpm !NetHack.tombstone: rip.xpm
! Text starts at (tombtext_x, tombtext_y) and subsequent lines ! Text starts at (tombtext_x, tombtext_y) and subsequent lines
! are displaced by (tombtext_dx, tombtext_dy) pixels. If you ! are displaced by (tombtext_dx, tombtext_dy) pixels.
!NetHack.tombtext_x: 155 !NetHack.tombtext_x: 155
!NetHack.tombtext_y: 78 !NetHack.tombtext_y: 78
!NetHack.tombtext_dx: 0 !NetHack.tombtext_dx: 0
@@ -73,7 +84,7 @@ NetHack*slow: True
! as part of the map when no prompt is active, then invert foreground and ! as part of the map when no prompt is active, then invert foreground and
! background to stand out when a prompt is issued and waiting for a response. ! background to stand out when a prompt is issued and waiting for a response.
! If 'slow' is False, 'highlight_prompt' will have no effect. ! If 'slow' is False, 'highlight_prompt' will have no effect.
NetHack*highlight_prompt: True NetHack*highlight_prompt: False
! The number of lines the message window will show without scrolling. ! The number of lines the message window will show without scrolling.
!NetHack*message_lines: 12 !NetHack*message_lines: 12
@@ -92,103 +103,105 @@ NetHack*highlight_prompt: True
!NetHack*map*rows: 21 !NetHack*map*rows: 21
!NetHack*map*columns: 80 !NetHack*map*columns: 80
! Parts of the fancy status display. NetHack*background: NETHACK_CLR_BG
! NetHack*foreground: NETHACK_CLR_FG
NetHack*status_condition1.borderWidth: 0
NetHack*status_condition2.borderWidth: 0
NetHack*status_condition3.borderWidth: 0
NetHack*status_leftover.borderWidth: 0
NetHack*status_info*borderWidth: 0
! Sample color screen entries. NetHack*yn_prompt*borderWidth: 0
!
NetHack*nethack.background: wheat
NetHack*map*yellow: gold
NetHack*map*brown: tan
NetHack*map*gray: grey85
NetHack*map*foreground: wheat
NetHack*map*background: grey40
NetHack*fancy_status.skipAdjust: True NetHack*Scrollbar*foreground: gray40
NetHack*fancy_status.background: wheat NetHack*Scrollbar*background: gray10
NetHack*status_info*foreground: Sienna
NetHack*status_info*background: wheat
NetHack*status_info.background: wheat
NetHack*status_attributes*foreground: black
NetHack*status_attributes*background: white
NetHack*status_condition1*foreground: red
NetHack*status_condition1*background: wheat
NetHack*status_condition2*foreground: black
NetHack*status_condition2*background: wheat
NetHack*status_condition3*foreground: black
NetHack*status_condition3*background: wheat
NetHack*Scrollbar*foreground: Sienna
NetHack*Scrollbar*background: wheat
NetHack*status_info*showGrip: False
NetHack*status_attributes*showGrip: False
NetHack*status_condition1*showGrip: False
NetHack*status_condition2*showGrip: False
NetHack*status_condition3*showGrip: False
NetHack*player_selection*random.borderColor: blue NetHack*fancy_status*background: NETHACK_CLR_BG
NetHack*player_selection*random.borderWidth: 2 NetHack*fancy_status*foreground: NETHACK_CLR_FG
NetHack*player_selection*random.foreground: blue NetHack*fancy_status.skipAdjust: True
NetHack*player_selection*random.accelerators: #override\n\
<Key>Return: set() notify() unset()
NetHack*player_selection*quit.borderColor: blue
NetHack*player_selection*quit.foreground: blue
NetHack*player_selection*Command.borderColor: red
NetHack*player_selection*Command.foreground: red
NetHack*player_selection*quit.accelerators: #override\n\
<Key>Escape: set() notify() unset()
NetHack*race_selection*random.borderColor: blue NetHack*showGrip: False
NetHack*race_selection*random.borderWidth: 2
NetHack*race_selection*random.foreground: blue
NetHack*race_selection*random.accelerators: #override\n\
<Key>Return: set() notify() unset()
NetHack*race_selection*quit.borderColor: blue
NetHack*race_selection*quit.foreground: blue
NetHack*race_selection*Command.borderColor: red
NetHack*race_selection*Command.foreground: red
NetHack*race_selection*quit.accelerators: #override\n\
<Key>Escape: set() notify() unset()
NetHack*gender_selection*random.borderColor: blue ! text input prompt window
NetHack*gender_selection*random.borderWidth: 2 NetHack*response*textSink*background: red
NetHack*gender_selection*random.foreground: blue NetHack*response*foreground: NETHACK_CLR_FG
NetHack*gender_selection*random.accelerators: #override\n\ NetHack*response*background: NETHACK_CLR_BG
<Key>Return: set() notify() unset() NetHack*response*borderColor: NETHACK_CLR_FG
NetHack*gender_selection*quit.borderColor: blue NetHack*response*borderWidth: 1
NetHack*gender_selection*quit.foreground: blue
NetHack*gender_selection*Command.borderColor: red
NetHack*gender_selection*Command.foreground: red
NetHack*gender_selection*quit.accelerators: #override\n\
<Key>Escape: set() notify() unset()
NetHack*alignment_selection*random.borderColor: blue ! role selection window
NetHack*alignment_selection*random.borderWidth: 2 NetHack*player_selection*random.foreground: NETHACK_CLR_RANDOM
NetHack*alignment_selection*random.foreground: blue NetHack*player_selection*random.background: black
NetHack*alignment_selection*random.accelerators: #override\n\ NetHack*player_selection*random.borderColor: NETHACK_CLR_RANDOM
<Key>Return: set() notify() unset() NetHack*player_selection*random.borderWidth: 1
NetHack*alignment_selection*quit.borderColor: blue NetHack*player_selection*random.shapeStyle: NETHACK_BTN_SHAPE
NetHack*alignment_selection*quit.foreground: blue NetHack*player_selection*random.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*alignment_selection*Command.borderColor: red NetHack*player_selection*quit.foreground: NETHACK_CLR_QUIT
NetHack*alignment_selection*Command.foreground: red NetHack*player_selection*quit.borderColor: NETHACK_CLR_QUIT
NetHack*alignment_selection*quit.accelerators: #override\n\ NetHack*player_selection*quit.borderWidth: 1
<Key>Escape: set() notify() unset() NetHack*player_selection*quit.shapeStyle: NETHACK_BTN_SHAPE
NetHack*player_selection*quit.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*player_selection*Command.foreground: NETHACK_CLR_FG
NetHack*player_selection*Command.borderColor: NETHACK_CLR_FG
NetHack*player_selection*Command.borderWidth: NETHACK_CMD_BORDER
NetHack*extended_commands*dismiss.borderColor: blue ! race selection window
NetHack*extended_commands*dismiss.foreground: blue NetHack*race_selection*random.foreground: NETHACK_CLR_RANDOM
NetHack*extended_commands*help.borderColor: blue NetHack*race_selection*random.background: black
NetHack*extended_commands*help.foreground: blue NetHack*race_selection*random.borderColor: NETHACK_CLR_RANDOM
NetHack*extended_commands*Command.borderColor: red NetHack*race_selection*random.borderWidth: 1
NetHack*extended_commands*Command.foreground: red NetHack*race_selection*random.shapeStyle: NETHACK_BTN_SHAPE
NetHack*extended_commands*help.accelerators: #override\n\ NetHack*race_selection*random.cornerRoundPercent: NETHACK_BTN_ROUND
:<Key>?: set() notify() unset() NetHack*race_selection*quit.foreground: NETHACK_CLR_QUIT
NetHack*extended_commands*dismiss.accelerators: #override\n\ NetHack*race_selection*quit.borderColor: NETHACK_CLR_QUIT
<Key>Escape: set() notify() unset() NetHack*race_selection*quit.borderWidth: 1
! NetHack*race_selection*quit.shapeStyle: NETHACK_BTN_SHAPE
NetHack*race_selection*quit.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*race_selection*Command.foreground: NETHACK_CLR_FG
NetHack*race_selection*Command.borderColor: NETHACK_CLR_FG
NetHack*race_selection*Command.borderWidth: NETHACK_CMD_BORDER
! gender selection window
NetHack*gender_selection*random.foreground: NETHACK_CLR_RANDOM
NetHack*gender_selection*random.background: black
NetHack*gender_selection*random.borderColor: NETHACK_CLR_RANDOM
NetHack*gender_selection*random.borderWidth: 1
NetHack*gender_selection*random.shapeStyle: NETHACK_BTN_SHAPE
NetHack*gender_selection*random.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*gender_selection*quit.foreground: NETHACK_CLR_QUIT
NetHack*gender_selection*quit.borderColor: NETHACK_CLR_QUIT
NetHack*gender_selection*quit.borderWidth: 1
NetHack*gender_selection*quit.shapeStyle: NETHACK_BTN_SHAPE
NetHack*gender_selection*quit.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*gender_selection*Command.foreground: NETHACK_CLR_FG
NetHack*gender_selection*Command.borderColor: NETHACK_CLR_FG
NetHack*gender_selection*Command.borderWidth: NETHACK_CMD_BORDER
! alignment selection window
NetHack*alignment_selection*random.foreground: NETHACK_CLR_RANDOM
NetHack*alignment_selection*random.background: black
NetHack*alignment_selection*random.borderColor: NETHACK_CLR_RANDOM
NetHack*alignment_selection*random.borderWidth: 1
NetHack*alignment_selection*random.shapeStyle: NETHACK_BTN_SHAPE
NetHack*alignment_selection*random.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*alignment_selection*quit.foreground: NETHACK_CLR_QUIT
NetHack*alignment_selection*quit.borderColor: NETHACK_CLR_QUIT
NetHack*alignment_selection*quit.borderWidth: 1
NetHack*alignment_selection*quit.shapeStyle: NETHACK_BTN_SHAPE
NetHack*alignment_selection*quit.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*alignment_selection*Command.foreground: NETHACK_CLR_FG
NetHack*alignment_selection*Command.borderColor: NETHACK_CLR_FG
NetHack*alignment_selection*Command.borderWidth: NETHACK_CMD_BORDER
! extended commands window
NetHack*extended_commands*dismiss.foreground: NETHACK_CLR_QUIT
NetHack*extended_commands*dismiss.borderColor: NETHACK_CLR_QUIT
NetHack*extended_commands*dismiss.borderWidth: 1
NetHack*extended_commands*dismiss.shapeStyle: NETHACK_BTN_SHAPE
NetHack*extended_commands*dismiss.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*extended_commands*help.foreground: NETHACK_CLR_HELP
NetHack*extended_commands*help.borderColor: NETHACK_CLR_HELP
NetHack*extended_commands*help.borderWidth: 1
NetHack*extended_commands*help.shapeStyle: NETHACK_BTN_SHAPE
NetHack*extended_commands*help.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*extended_commands*Command.foreground: NETHACK_CLR_FG
NetHack*extended_commands*Command.borderColor: NETHACK_CLR_FG
NetHack*extended_commands*Command.borderWidth: NETHACK_CMD_BORDER
! The extended command menu may be too big to fit on the screen so need ! The extended command menu may be too big to fit on the screen so need
! a vertical scroll bar. When truncated, its height will be as tall as ! a vertical scroll bar. When truncated, its height will be as tall as
! possible unless height_delta is non-zero, in which case there will be ! possible unless height_delta is non-zero, in which case there will be
@@ -197,13 +210,64 @@ NetHack*extended_commands*dismiss.accelerators: #override\n\
! obscuring the bottom of the menu. ! obscuring the bottom of the menu.
NetHack*extcmd_height_delta: 75 NetHack*extcmd_height_delta: 75
! ! menu buttons
NetHack*OK.foreground: green
NetHack*OK.borderColor: green
NetHack*OK.shapeStyle: NETHACK_BTN_SHAPE
NetHack*OK.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*okay.foreground: green
NetHack*okay.borderColor: green
NetHack*okay.shapeStyle: NETHACK_BTN_SHAPE
NetHack*okay.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*cancel.foreground: red
NetHack*cancel.borderColor: red
NetHack*cancel.shapeStyle: NETHACK_BTN_SHAPE
NetHack*cancel.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*all.foreground: green
NetHack*all.borderColor: green
NetHack*all.shapeStyle: NETHACK_BTN_SHAPE
NetHack*all.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*none.foreground: green
NetHack*none.borderColor: green
NetHack*none.shapeStyle: NETHACK_BTN_SHAPE
NetHack*none.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*invert.foreground: green
NetHack*invert.borderColor: green
NetHack*invert.shapeStyle: NETHACK_BTN_SHAPE
NetHack*invert.cornerRoundPercent: NETHACK_BTN_ROUND
NetHack*search.foreground: green
NetHack*search.borderColor: green
NetHack*search.shapeStyle: NETHACK_BTN_SHAPE
NetHack*search.cornerRoundPercent: NETHACK_BTN_ROUND
! map colors
! The foreground color is used as "no color".
NetHack*map*foreground: NETHACK_CLR_FG
NetHack*map*background: NETHACK_CLR_BG
NetHack*map*black: grey15
NetHack*map*red: red3
NetHack*map*green: green3
NetHack*map*brown: DarkOrange3
NetHack*map*blue: blue3
NetHack*map*magenta: magenta3
NetHack*map*cyan: cyan3
NetHack*map*gray: gray50
NetHack*map*orange: yellow
NetHack*map*bright_green: green
NetHack*map*yellow: yellow
NetHack*map*bright_blue: blue
NetHack*map*bright_magenta: magenta
NetHack*map*bright_cyan: cyan
NetHack*map*white: white
! !
! The following are the default 15 colors that the nethack map uses. ! The following are the default 15 colors that the nethack map uses.
! If they don't look good on your screen, change them.
!
! The foreground color is used as "no color".
!
!NetHack*map*black: black !NetHack*map*black: black
!NetHack*map*red: red !NetHack*map*red: red
!NetHack*map*green: pale green !NetHack*map*green: pale green