Merge branch 'master' into win32-x64-working
This commit is contained in:
+6
-5
@@ -2770,7 +2770,7 @@ The pattern should be a POSIX extended regular expression.
|
|||||||
.hn 2
|
.hn 2
|
||||||
Configuring Status Hilites
|
Configuring Status Hilites
|
||||||
.pg
|
.pg
|
||||||
Your copy of NetHack may have been compiled with support for {\tStatus Hilites}.
|
Your copy of NetHack may have been compiled with support for ``Status Hilites''.
|
||||||
If so, you can customize your game display by setting thresholds to
|
If so, you can customize your game display by setting thresholds to
|
||||||
change the color or appearance of fields in the status display.
|
change the color or appearance of fields in the status display.
|
||||||
.pg
|
.pg
|
||||||
@@ -2778,14 +2778,15 @@ For example, the following line in your config file will cause
|
|||||||
the hitpoints field to display in the color red if your hitpoints
|
the hitpoints field to display in the color red if your hitpoints
|
||||||
drop to or below a threshold of 30%:
|
drop to or below a threshold of 30%:
|
||||||
.si
|
.si
|
||||||
.lp OPTION=hilite_status: hitpoints/30%/red/normal
|
.lp "OPTION=hilite_status: hitpoints/30%/red/normal"
|
||||||
.ei
|
.ei
|
||||||
.pg
|
.pg
|
||||||
For another example, the following line in your config file will cause
|
For another example, the following line in your config file will cause
|
||||||
wisdom to be displayed red if it drops and green if it rises.
|
wisdom to be displayed red if it drops and green if it rises.
|
||||||
.si
|
.si
|
||||||
.lp OPTION=hilite_status: wisdom/updown/red/green
|
.lp "OPTION=hilite_status: wisdom/updown/red/green"
|
||||||
.ei
|
.ei
|
||||||
|
.pg
|
||||||
You can adjust the display of the following status fields:
|
You can adjust the display of the following status fields:
|
||||||
.TS S
|
.TS S
|
||||||
center;
|
center;
|
||||||
@@ -2810,10 +2811,10 @@ Note that the platform used may interpret the attributes any way it
|
|||||||
wants.
|
wants.
|
||||||
.lp ""
|
.lp ""
|
||||||
Behaviours can occur based on percentage thresholds, updown, or absolute values.
|
Behaviours can occur based on percentage thresholds, updown, or absolute values.
|
||||||
The in-game options menu can help you determine the correct syntax for a
|
The in-game options menu can help you determine the correct syntax for a
|
||||||
config file.
|
config file.
|
||||||
.lp ""
|
.lp ""
|
||||||
The whole feature can be disable by setting option statushilites off.
|
The whole feature can be disabled by setting option statushilites off.
|
||||||
.pg
|
.pg
|
||||||
.hn 2
|
.hn 2
|
||||||
Modifying NetHack Symbols
|
Modifying NetHack Symbols
|
||||||
|
|||||||
+5
-5
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 youprop.h $NHDT-Date: 1432512778 2015/05/25 00:12:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.22 $ */
|
/* NetHack 3.6 youprop.h $NHDT-Date: 1433291407 2015/06/03 00:30:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.23 $ */
|
||||||
/* Copyright (c) 1989 Mike Threepoint */
|
/* Copyright (c) 1989 Mike Threepoint */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -91,10 +91,10 @@
|
|||||||
&& !(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD))
|
&& !(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD))
|
||||||
/* ...the Eyes operate even when you really are blind
|
/* ...the Eyes operate even when you really are blind
|
||||||
or don't have any eyes */
|
or don't have any eyes */
|
||||||
#define Blindfolded_only \
|
#define Blindfolded_only \
|
||||||
(!Blinded && haseyes(youmonst.data) && Blindfolded \
|
(Blindfolded && ublindf->oartifact != ART_EYES_OF_THE_OVERWORLD \
|
||||||
&& !(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD))
|
&& !u.uroleplay.blind && !Blinded && haseyes(youmonst.data))
|
||||||
/* blind because of a blindfold, and *only* that */
|
/* ...blind because of a blindfold, and *only* that */
|
||||||
|
|
||||||
#define Sick u.uprops[SICK].intrinsic
|
#define Sick u.uprops[SICK].intrinsic
|
||||||
#define Stoned u.uprops[STONED].intrinsic
|
#define Stoned u.uprops[STONED].intrinsic
|
||||||
|
|||||||
+12
-11
@@ -285,17 +285,6 @@ char *buf;
|
|||||||
#ifdef STATUS_VIA_WINDOWPORT
|
#ifdef STATUS_VIA_WINDOWPORT
|
||||||
/* =======================================================================*/
|
/* =======================================================================*/
|
||||||
|
|
||||||
STATIC_DCL void NDECL(init_blstats);
|
|
||||||
STATIC_DCL char *FDECL(anything_to_s, (char *, anything *, int));
|
|
||||||
STATIC_DCL void FDECL(s_to_anything, (anything *, char *, int));
|
|
||||||
STATIC_OVL int FDECL(percentage, (struct istat_s *, struct istat_s *));
|
|
||||||
STATIC_OVL int FDECL(compare_blstats, (struct istat_s *, struct istat_s *));
|
|
||||||
|
|
||||||
#ifdef STATUS_HILITES
|
|
||||||
STATIC_DCL boolean FDECL(assign_hilite, (char *, char *, char *, char *, BOOLEAN_P));
|
|
||||||
STATIC_DCL const char *FDECL(clridx_to_s, (char *, int));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* structure that tracks the status details in the core */
|
/* structure that tracks the status details in the core */
|
||||||
struct istat_s {
|
struct istat_s {
|
||||||
long time;
|
long time;
|
||||||
@@ -307,6 +296,18 @@ struct istat_s {
|
|||||||
enum statusfields fld;
|
enum statusfields fld;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
STATIC_DCL void NDECL(init_blstats);
|
||||||
|
STATIC_DCL char *FDECL(anything_to_s, (char *, anything *, int));
|
||||||
|
STATIC_DCL void FDECL(s_to_anything, (anything *, char *, int));
|
||||||
|
STATIC_OVL int FDECL(percentage, (struct istat_s *, struct istat_s *));
|
||||||
|
STATIC_OVL int FDECL(compare_blstats, (struct istat_s *, struct istat_s *));
|
||||||
|
|
||||||
|
#ifdef STATUS_HILITES
|
||||||
|
STATIC_DCL boolean FDECL(assign_hilite, (char *, char *, char *, char *, BOOLEAN_P));
|
||||||
|
STATIC_DCL const char *FDECL(clridx_to_s, (char *, int));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If entries are added to this, botl.h will require updating too */
|
/* If entries are added to this, botl.h will require updating too */
|
||||||
STATIC_DCL struct istat_s initblstats[MAXBLSTATS] = {
|
STATIC_DCL struct istat_s initblstats[MAXBLSTATS] = {
|
||||||
{ 0L, ANY_STR, {(genericptr_t)0L}, (char *)0, 80, 0, BL_TITLE},
|
{ 0L, ANY_STR, {(genericptr_t)0L}, (char *)0, 80, 0, BL_TITLE},
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1433050877 2015/05/31 05:41:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.193 $ */
|
/* NetHack 3.6 cmd.c $NHDT-Date: 1433291955 2015/06/03 00:39:15 $ $NHDT-Branch: master $:$NHDT-Revision: 1.194 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1604,11 +1604,10 @@ int final;
|
|||||||
int cap;
|
int cap;
|
||||||
char buf[BUFSZ], youtoo[BUFSZ];
|
char buf[BUFSZ], youtoo[BUFSZ];
|
||||||
boolean Riding = (u.usteed
|
boolean Riding = (u.usteed
|
||||||
&&
|
|
||||||
/* if hero dies while dismounting, u.usteed will still
|
/* if hero dies while dismounting, u.usteed will still
|
||||||
be set; we want to ignore steed in that situation */
|
be set; we want to ignore steed in that situation */
|
||||||
!(final == ENL_GAMEOVERDEAD
|
&& !(final == ENL_GAMEOVERDEAD
|
||||||
&& !strcmp(killer.name, "riding accident")));
|
&& !strcmp(killer.name, "riding accident")));
|
||||||
const char *steedname =
|
const char *steedname =
|
||||||
!Riding
|
!Riding
|
||||||
? (char *) 0
|
? (char *) 0
|
||||||
@@ -1650,13 +1649,10 @@ int final;
|
|||||||
you_are(Swimming ? "swimming" : "in water", from_what(SWIMMING));
|
you_are(Swimming ? "swimming" : "in water", from_what(SWIMMING));
|
||||||
} else if (walking_on_water()) {
|
} else if (walking_on_water()) {
|
||||||
/* show active Wwalking here, potential Wwalking elsewhere */
|
/* show active Wwalking here, potential Wwalking elsewhere */
|
||||||
Sprintf(
|
Sprintf(buf, "walking on %s",
|
||||||
buf, "walking on %s",
|
is_pool(u.ux, u.uy) ? "water"
|
||||||
is_pool(u.ux, u.uy)
|
: is_lava(u.ux, u.uy) ? "lava"
|
||||||
? "water"
|
: surface(u.ux, u.uy)); /* catchall; shouldn't happen */
|
||||||
: is_lava(u.ux, u.uy)
|
|
||||||
? "lava"
|
|
||||||
: surface(u.ux, u.uy)); /* catchall; shouldn't happen */
|
|
||||||
you_are(buf, from_what(WWALKING));
|
you_are(buf, from_what(WWALKING));
|
||||||
}
|
}
|
||||||
if (Upolyd && (u.uundetected || youmonst.m_ap_type != M_AP_NOTHING))
|
if (Upolyd && (u.uundetected || youmonst.m_ap_type != M_AP_NOTHING))
|
||||||
@@ -1692,8 +1688,21 @@ int final;
|
|||||||
you_are("confused", "");
|
you_are("confused", "");
|
||||||
if (Hallucination)
|
if (Hallucination)
|
||||||
you_are("hallucinating", "");
|
you_are("hallucinating", "");
|
||||||
if (Blind)
|
if (Blind) {
|
||||||
you_are("blind", from_what(BLINDED));
|
/* from_what() (currently wizard-mode only) checks !haseyes()
|
||||||
|
before u.uroleplay.blind, so we should too */
|
||||||
|
Sprintf(buf, "%s blind",
|
||||||
|
!haseyes(youmonst.data) ? "innately"
|
||||||
|
: u.uroleplay.blind ? "permanently"
|
||||||
|
/* better phrasing desparately wanted... */
|
||||||
|
: Blindfolded_only ? "deliberately"
|
||||||
|
: "temporarily");
|
||||||
|
if (wizard && (Blinded & TIMEOUT) != 0L
|
||||||
|
&& !u.uroleplay.blind && haseyes(youmonst.data))
|
||||||
|
Sprintf(eos(buf), " (%ld)", (Blinded & TIMEOUT));
|
||||||
|
/* !haseyes: avoid "you are innately blind innately" */
|
||||||
|
you_are(buf, !haseyes(youmonst.data) ? "" : from_what(BLINDED));
|
||||||
|
}
|
||||||
if (Deaf)
|
if (Deaf)
|
||||||
you_are("deaf", from_what(DEAF));
|
you_are("deaf", from_what(DEAF));
|
||||||
|
|
||||||
@@ -1823,26 +1832,27 @@ int final;
|
|||||||
(cap < OVERLOADED) ? " slowed" : "");
|
(cap < OVERLOADED) ? " slowed" : "");
|
||||||
you_are(buf, "");
|
you_are(buf, "");
|
||||||
} else {
|
} else {
|
||||||
/* last resort entry, guarantees Status section is non-empty */
|
/* last resort entry, guarantees Status section is non-empty
|
||||||
|
(no longer needed for that purpose since weapon status added;
|
||||||
|
still useful though) */
|
||||||
you_are("unencumbered", "");
|
you_are("unencumbered", "");
|
||||||
}
|
}
|
||||||
/* report being weaponless; distinguish whether gloves are worn */
|
/* report being weaponless; distinguish whether gloves are worn */
|
||||||
if (!uwep)
|
if (!uwep) {
|
||||||
you_are(uarmg ? "empty handed" : /* gloves imply hands */
|
you_are(uarmg ? "empty handed" /* gloves imply hands */
|
||||||
/* no weapon and no gloves */
|
/* no weapon and no gloves */
|
||||||
humanoid(youmonst.data)
|
: humanoid(youmonst.data)
|
||||||
? "bare handed"
|
? "bare handed"
|
||||||
:
|
/* alternate phrasing for paws or lack of hands */
|
||||||
/* alternate phrasing for paws or lack of hands */
|
: "not wielding anything",
|
||||||
"not wielding anything",
|
|
||||||
"");
|
"");
|
||||||
/* two-weaponing implies a weapon (not other odd stuff) in each hand */
|
/* two-weaponing implies a weapon (not other odd stuff) in each hand */
|
||||||
else if (u.twoweap)
|
} else if (u.twoweap) {
|
||||||
you_are("wielding two weapons at once", "");
|
you_are("wielding two weapons at once", "");
|
||||||
/* report most weapons by their skill class (so a katana will be
|
/* report most weapons by their skill class (so a katana will be
|
||||||
described as a long sword, for instance; mattock and hook are
|
described as a long sword, for instance; mattock and hook are
|
||||||
exceptions), or wielded non-weapon item by its object class */
|
exceptions), or wielded non-weapon item by its object class */
|
||||||
else {
|
} else {
|
||||||
const char *what = weapon_descr(uwep);
|
const char *what = weapon_descr(uwep);
|
||||||
|
|
||||||
if (!strcmpi(what, "armor") || !strcmpi(what, "food")
|
if (!strcmpi(what, "armor") || !strcmpi(what, "food")
|
||||||
@@ -1853,6 +1863,13 @@ int final;
|
|||||||
(uwep->quan == 1L) ? an(what) : makeplural(what));
|
(uwep->quan == 1L) ? an(what) : makeplural(what));
|
||||||
you_are(buf, "");
|
you_are(buf, "");
|
||||||
}
|
}
|
||||||
|
/* report 'nudity' */
|
||||||
|
if (!uarm && !uarmu && !uarmc && !uarmg && !uarmf && !uarmh) {
|
||||||
|
if (u.uroleplay.nudist)
|
||||||
|
enl_msg(You_, "do", "did", " not wear any armor", "");
|
||||||
|
else
|
||||||
|
you_are("not wearing any armor", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* attributes: intrinsics and the like, other non-obvious capabilities */
|
/* attributes: intrinsics and the like, other non-obvious capabilities */
|
||||||
|
|||||||
+2
-1
@@ -637,7 +637,8 @@ int mclass; /* monster class, 0 for all */
|
|||||||
show_glyph(mtmp->mx, mtmp->my,
|
show_glyph(mtmp->mx, mtmp->my,
|
||||||
detected_mon_to_glyph(mtmp));
|
detected_mon_to_glyph(mtmp));
|
||||||
else
|
else
|
||||||
show_glyph(mtmp->mx, mtmp->my, mon_to_glyph(mtmp));
|
show_glyph(mtmp->mx, mtmp->my,
|
||||||
|
mtmp->mtame ? pet_to_glyph(mtmp) : mon_to_glyph(mtmp));
|
||||||
/* don't be stingy - display entire worm */
|
/* don't be stingy - display entire worm */
|
||||||
if (mtmp->data == &mons[PM_LONG_WORM])
|
if (mtmp->data == &mons[PM_LONG_WORM])
|
||||||
detect_wsegs(mtmp, 0);
|
detect_wsegs(mtmp, 0);
|
||||||
|
|||||||
+13
-5
@@ -431,7 +431,7 @@ register xchar worm_tail; /* mon is actually a worm tail */
|
|||||||
/* [ALI] Only use detected glyphs when monster wouldn't be
|
/* [ALI] Only use detected glyphs when monster wouldn't be
|
||||||
* visible by any other means.
|
* visible by any other means.
|
||||||
*/
|
*/
|
||||||
if (sightflags == DETECTED) {
|
if (sightflags == DETECTED && !mon->mtame) {
|
||||||
if (worm_tail)
|
if (worm_tail)
|
||||||
num = detected_monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL));
|
num = detected_monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL));
|
||||||
else
|
else
|
||||||
@@ -577,7 +577,7 @@ xchar x, y;
|
|||||||
if (lev->typ != ROOM && lev->seenv) {
|
if (lev->typ != ROOM && lev->seenv) {
|
||||||
map_background(x, y, 1);
|
map_background(x, y, 1);
|
||||||
} else {
|
} else {
|
||||||
lev->glyph = flags.dark_room
|
lev->glyph = (flags.dark_room && !Is_rogue_level(&u.uz))
|
||||||
? cmap_to_glyph(S_darkroom)
|
? cmap_to_glyph(S_darkroom)
|
||||||
: (lev->waslit ? cmap_to_glyph(S_room)
|
: (lev->waslit ? cmap_to_glyph(S_room)
|
||||||
: cmap_to_glyph(S_stone));
|
: cmap_to_glyph(S_stone));
|
||||||
@@ -586,7 +586,7 @@ xchar x, y;
|
|||||||
} else if ((lev->glyph >= cmap_to_glyph(S_stone)
|
} else if ((lev->glyph >= cmap_to_glyph(S_stone)
|
||||||
&& lev->glyph < cmap_to_glyph(S_darkroom))
|
&& lev->glyph < cmap_to_glyph(S_darkroom))
|
||||||
|| glyph_is_invisible(levl[x][y].glyph)) {
|
|| glyph_is_invisible(levl[x][y].glyph)) {
|
||||||
lev->glyph = flags.dark_room
|
lev->glyph = (flags.dark_room && !Is_rogue_level(&u.uz))
|
||||||
? cmap_to_glyph(S_darkroom)
|
? cmap_to_glyph(S_darkroom)
|
||||||
: (lev->waslit ? cmap_to_glyph(S_room)
|
: (lev->waslit ? cmap_to_glyph(S_room)
|
||||||
: cmap_to_glyph(S_stone));
|
: cmap_to_glyph(S_stone));
|
||||||
@@ -768,10 +768,10 @@ register int x, y;
|
|||||||
&& ((see_it =
|
&& ((see_it =
|
||||||
(tp_sensemon(mon) || MATCH_WARN_OF_MON(mon)
|
(tp_sensemon(mon) || MATCH_WARN_OF_MON(mon)
|
||||||
|| (see_with_infrared(mon) && mon_visible(mon))))
|
|| (see_with_infrared(mon) && mon_visible(mon))))
|
||||||
|| Detect_monsters) && !is_worm_tail(mon)) {
|
|| Detect_monsters)) {
|
||||||
/* Monsters are printed every time. */
|
/* Monsters are printed every time. */
|
||||||
/* This also gets rid of any invisibility glyph */
|
/* This also gets rid of any invisibility glyph */
|
||||||
display_monster(x, y, mon, see_it ? 0 : DETECTED, 0);
|
display_monster(x, y, mon, see_it ? 0 : DETECTED, is_worm_tail(mon) ? TRUE : FALSE);
|
||||||
} else if ((mon = m_at(x, y)) && mon_warning(mon)
|
} else if ((mon = m_at(x, y)) && mon_warning(mon)
|
||||||
&& !is_worm_tail(mon)) {
|
&& !is_worm_tail(mon)) {
|
||||||
display_warning(mon);
|
display_warning(mon);
|
||||||
@@ -799,6 +799,14 @@ register int x, y;
|
|||||||
* These checks and changes must be here and not in back_to_glyph().
|
* These checks and changes must be here and not in back_to_glyph().
|
||||||
* They are dependent on the position being out of sight.
|
* They are dependent on the position being out of sight.
|
||||||
*/
|
*/
|
||||||
|
else if (Is_rogue_level(&u.uz)) {
|
||||||
|
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
|
||||||
|
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
|
||||||
|
else if (lev->glyph == cmap_to_glyph(S_room) && lev->typ == ROOM && !lev->waslit)
|
||||||
|
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_stone));
|
||||||
|
else
|
||||||
|
goto show_mem;
|
||||||
|
}
|
||||||
else if (!lev->waslit || (flags.dark_room && iflags.use_color)) {
|
else if (!lev->waslit || (flags.dark_room && iflags.use_color)) {
|
||||||
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
|
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
|
||||||
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
|
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
|
||||||
|
|||||||
+9
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do_wear.c $NHDT-Date: 1432512763 2015/05/25 00:12:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.81 $ */
|
/* NetHack 3.6 do_wear.c $NHDT-Date: 1433289458 2015/06/02 23:57:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.82 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1084,7 +1084,14 @@ register struct obj *otmp;
|
|||||||
} else if (already_blind && !Blind) {
|
} else if (already_blind && !Blind) {
|
||||||
changed = TRUE;
|
changed = TRUE;
|
||||||
/* "You are now wearing the Eyes of the Overworld." */
|
/* "You are now wearing the Eyes of the Overworld." */
|
||||||
You("can see!");
|
if (u.uroleplay.blind) {
|
||||||
|
/* this can only happen by putting on the Eyes of the Overworld;
|
||||||
|
that shouldn't actually produce a permanent cure, but we
|
||||||
|
can't let the "blind from birth" conduct remain intact */
|
||||||
|
pline("For the first time in your life, you can see!");
|
||||||
|
u.uroleplay.blind = FALSE;
|
||||||
|
} else
|
||||||
|
You("can see!");
|
||||||
}
|
}
|
||||||
if (changed) {
|
if (changed) {
|
||||||
/* blindness has just been toggled */
|
/* blindness has just been toggled */
|
||||||
|
|||||||
+9
-14
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 makemon.c $NHDT-Date: 1432685497 2015/05/27 00:11:37 $ $NHDT-Branch: master $:$NHDT-Revision: 1.89 $ */
|
/* NetHack 3.6 makemon.c $NHDT-Date: 1433457069 2015/06/04 22:31:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.92 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ register struct monst *mtmp;
|
|||||||
if (rn2(2))
|
if (rn2(2))
|
||||||
(void) mongets(mtmp, DWARVISH_MATTOCK);
|
(void) mongets(mtmp, DWARVISH_MATTOCK);
|
||||||
else {
|
else {
|
||||||
(void) mongets(mtmp, AXE);
|
(void) mongets(mtmp, rn2(2) ? AXE : DWARVISH_SPEAR);
|
||||||
(void) mongets(mtmp, DWARVISH_ROUNDSHIELD);
|
(void) mongets(mtmp, DWARVISH_ROUNDSHIELD);
|
||||||
}
|
}
|
||||||
(void) mongets(mtmp, DWARVISH_IRON_HELM);
|
(void) mongets(mtmp, DWARVISH_IRON_HELM);
|
||||||
@@ -1134,23 +1134,18 @@ register int mmflags;
|
|||||||
mtmp->cham = NON_PM; /* default is "not a shapechanger" */
|
mtmp->cham = NON_PM; /* default is "not a shapechanger" */
|
||||||
if ((mcham = pm_to_cham(mndx)) != NON_PM) {
|
if ((mcham = pm_to_cham(mndx)) != NON_PM) {
|
||||||
/* this is a shapechanger after all */
|
/* this is a shapechanger after all */
|
||||||
if (Protection_from_shape_changers) {
|
if (Protection_from_shape_changers
|
||||||
|
|| mtmp->cham == PM_VLAD_THE_IMPALER) {
|
||||||
; /* stuck in its natural form (NON_PM) */
|
; /* stuck in its natural form (NON_PM) */
|
||||||
} else {
|
} else {
|
||||||
/* Note: shapechanger's initial form used to be
|
/* Note: shapechanger's initial form used to be
|
||||||
chosen with rndmonst(), yielding a monster
|
chosen here with rndmonst(), yielding a monster
|
||||||
which was approriate to the level's difficulty
|
which was approriate to the level's difficulty
|
||||||
but ignored the changer's usual type selection
|
but ignored the changer's usual type selection
|
||||||
so would be inppropriate for vampshifters. */
|
so would be inppropriate for vampshifters.
|
||||||
mtmp->cham = mcham; /* remember base form */
|
Let newcham() pick the shape. */
|
||||||
if (mcham != PM_VLAD_THE_IMPALER &&
|
if (newcham(mtmp, (struct permonst *) 0, FALSE, FALSE))
|
||||||
/* select initial shape */
|
allow_minvent = FALSE;
|
||||||
(mcham = select_newcham_form(mtmp)) != NON_PM) {
|
|
||||||
/* take on initial shape; if successful,
|
|
||||||
avoid giving that shape's usual inventory */
|
|
||||||
if (newcham(mtmp, &mons[mcham], FALSE, FALSE))
|
|
||||||
allow_minvent = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (mndx == PM_WIZARD_OF_YENDOR) {
|
} else if (mndx == PM_WIZARD_OF_YENDOR) {
|
||||||
mtmp->iswiz = TRUE;
|
mtmp->iswiz = TRUE;
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1432512771 2015/05/25 00:12:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.101 $ */
|
/* NetHack 3.6 mkobj.c $NHDT-Date: 1433500549 2015/06/05 10:35:49 $ $NHDT-Branch: master $:$NHDT-Revision: 1.102 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -520,6 +520,7 @@ register struct obj *otmp;
|
|||||||
free_omid(dummy); /* only one association with m_id*/
|
free_omid(dummy); /* only one association with m_id*/
|
||||||
if (Is_candle(dummy))
|
if (Is_candle(dummy))
|
||||||
dummy->lamplit = 0;
|
dummy->lamplit = 0;
|
||||||
|
dummy->owornmask = 0L; /* dummy object is not worn */
|
||||||
addtobill(dummy, FALSE, TRUE, TRUE);
|
addtobill(dummy, FALSE, TRUE, TRUE);
|
||||||
if (cost)
|
if (cost)
|
||||||
alter_cost(dummy, -cost);
|
alter_cost(dummy, -cost);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mon.c $NHDT-Date: 1432512774 2015/05/25 00:12:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.177 $ */
|
/* NetHack 3.6 mon.c $NHDT-Date: 1433457072 2015/06/04 22:31:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.178 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2667,10 +2667,18 @@ boolean construct;
|
|||||||
STATIC_OVL int
|
STATIC_OVL int
|
||||||
pick_animal()
|
pick_animal()
|
||||||
{
|
{
|
||||||
|
int res;
|
||||||
|
|
||||||
if (!animal_list)
|
if (!animal_list)
|
||||||
mon_animal_list(TRUE);
|
mon_animal_list(TRUE);
|
||||||
|
|
||||||
return animal_list[rn2(animal_list_count)];
|
res = animal_list[rn2(animal_list_count)];
|
||||||
|
/* rogue level should use monsters represented by uppercase letters
|
||||||
|
only, but since chameleons aren't generated there (not uppercase!)
|
||||||
|
we don't perform a lot of retries */
|
||||||
|
if (Is_rogue_level(&u.uz) && !isupper((uchar) mons[res].mlet))
|
||||||
|
res = animal_list[rn2(animal_list_count)];
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -2710,6 +2718,9 @@ pickvampshape(mon)
|
|||||||
struct monst *mon;
|
struct monst *mon;
|
||||||
{
|
{
|
||||||
int mndx = mon->cham;
|
int mndx = mon->cham;
|
||||||
|
/* avoid picking monsters with lowercase display symbols ('d' for wolf
|
||||||
|
and 'v' for fog cloud) on rogue level*/
|
||||||
|
boolean uppercase_only = Is_rogue_level(&u.uz);
|
||||||
|
|
||||||
switch (mndx) {
|
switch (mndx) {
|
||||||
case PM_VLAD_THE_IMPALER:
|
case PM_VLAD_THE_IMPALER:
|
||||||
@@ -2718,13 +2729,13 @@ struct monst *mon;
|
|||||||
break; /* leave mndx as is */
|
break; /* leave mndx as is */
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_VAMPIRE_LORD: /* vampire lord or Vlad can become wolf */
|
case PM_VAMPIRE_LORD: /* vampire lord or Vlad can become wolf */
|
||||||
if (!rn2(10)) {
|
if (!rn2(10) && !uppercase_only) {
|
||||||
mndx = PM_WOLF;
|
mndx = PM_WOLF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case PM_VAMPIRE: /* any vampire can become fog or bat */
|
case PM_VAMPIRE: /* any vampire can become fog or bat */
|
||||||
mndx = !rn2(4) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
|
mndx = (!rn2(4) && !uppercase_only) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return mndx;
|
return mndx;
|
||||||
@@ -2786,7 +2797,8 @@ int *mndx_p, monclass;
|
|||||||
*mndx_p = PM_VLAD_THE_IMPALER;
|
*mndx_p = PM_VLAD_THE_IMPALER;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
/* basic vampires can't become wolves; any can become fog or bat */
|
/* basic vampires can't become wolves; any can become fog or bat
|
||||||
|
(we don't enforce upper-case only for rogue level here) */
|
||||||
if (*mndx_p == PM_WOLF)
|
if (*mndx_p == PM_WOLF)
|
||||||
return (mon->cham != PM_VAMPIRE);
|
return (mon->cham != PM_VAMPIRE);
|
||||||
if (*mndx_p == PM_FOG_CLOUD || *mndx_p == PM_VAMPIRE_BAT)
|
if (*mndx_p == PM_FOG_CLOUD || *mndx_p == PM_VAMPIRE_BAT)
|
||||||
@@ -2916,7 +2928,10 @@ struct monst *mon;
|
|||||||
tryct = 50;
|
tryct = 50;
|
||||||
do {
|
do {
|
||||||
mndx = rn1(SPECIAL_PM - LOW_PM, LOW_PM);
|
mndx = rn1(SPECIAL_PM - LOW_PM, LOW_PM);
|
||||||
} while (--tryct > 0 && !validspecmon(mon, mndx));
|
} while (--tryct > 0 && !validspecmon(mon, mndx)
|
||||||
|
/* try harder to select uppercase monster on rogue level */
|
||||||
|
&& (tryct > 40 && Is_rogue_level(&u.uz)
|
||||||
|
&& !isupper((uchar) mons[mndx].mlet)));
|
||||||
}
|
}
|
||||||
return mndx;
|
return mndx;
|
||||||
}
|
}
|
||||||
@@ -2995,6 +3010,11 @@ boolean msg; /* "The oldmon turns into a newmon!" */
|
|||||||
do {
|
do {
|
||||||
mndx = select_newcham_form(mtmp);
|
mndx = select_newcham_form(mtmp);
|
||||||
mdat = accept_newcham_form(mndx);
|
mdat = accept_newcham_form(mndx);
|
||||||
|
/* for the first several tries we require upper-case on
|
||||||
|
the rogue level (after that, we take whatever we get) */
|
||||||
|
if (tryct > 15 && Is_rogue_level(&u.uz)
|
||||||
|
&& !isupper((uchar) mdat->mlet))
|
||||||
|
mdat = 0;
|
||||||
if (mdat)
|
if (mdat)
|
||||||
break;
|
break;
|
||||||
} while (--tryct > 0);
|
} while (--tryct > 0);
|
||||||
|
|||||||
+1
-1
@@ -524,7 +524,7 @@ reglyph_darkroom()
|
|||||||
for (y = 0; y < ROWNO; y++) {
|
for (y = 0; y < ROWNO; y++) {
|
||||||
struct rm *lev = &levl[x][y];
|
struct rm *lev = &levl[x][y];
|
||||||
|
|
||||||
if (!flags.dark_room) {
|
if (!flags.dark_room || Is_rogue_level(&u.uz)) {
|
||||||
if (lev->glyph == cmap_to_glyph(S_darkroom))
|
if (lev->glyph == cmap_to_glyph(S_darkroom))
|
||||||
lev->glyph = lev->waslit ? cmap_to_glyph(S_room)
|
lev->glyph = lev->waslit ? cmap_to_glyph(S_room)
|
||||||
: cmap_to_glyph(S_stone);
|
: cmap_to_glyph(S_stone);
|
||||||
|
|||||||
+17
-15
@@ -544,6 +544,22 @@ const char **firstmatch;
|
|||||||
* When all have been checked then the string is printed.
|
* When all have been checked then the string is printed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Special case: if identifying from the screen, and we're swallowed,
|
||||||
|
* and looking at something other than our own symbol, then just say
|
||||||
|
* "the interior of a monster".
|
||||||
|
*/
|
||||||
|
if (u.uswallow && (looked) && (is_swallow_sym(sym) || (int)showsyms[S_stone] == sym)) {
|
||||||
|
if (!found) {
|
||||||
|
Sprintf(out_str, "%s%s", prefix, mon_interior);
|
||||||
|
*firstmatch = mon_interior;
|
||||||
|
} else {
|
||||||
|
found += append_str(out_str, mon_interior);
|
||||||
|
}
|
||||||
|
need_to_look = TRUE;
|
||||||
|
goto didlook;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check for monsters */
|
/* Check for monsters */
|
||||||
for (i = 0; i < MAXMCLASSES; i++) {
|
for (i = 0; i < MAXMCLASSES; i++) {
|
||||||
if (sym == ((looked) ? showsyms[i + SYM_OFF_M] : def_monsyms[i].sym)
|
if (sym == ((looked) ? showsyms[i + SYM_OFF_M] : def_monsyms[i].sym)
|
||||||
@@ -567,21 +583,6 @@ const char **firstmatch;
|
|||||||
&& !(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd)
|
&& !(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd)
|
||||||
found += append_str(out_str, "you"); /* tack on "or you" */
|
found += append_str(out_str, "you"); /* tack on "or you" */
|
||||||
|
|
||||||
/*
|
|
||||||
* Special case: if identifying from the screen, and we're swallowed,
|
|
||||||
* and looking at something other than our own symbol, then just say
|
|
||||||
* "the interior of a monster".
|
|
||||||
*/
|
|
||||||
if (u.uswallow && (looked) && is_swallow_sym(sym)) {
|
|
||||||
if (!found) {
|
|
||||||
Sprintf(out_str, "%s%s", prefix, mon_interior);
|
|
||||||
*firstmatch = mon_interior;
|
|
||||||
} else {
|
|
||||||
found += append_str(out_str, mon_interior);
|
|
||||||
}
|
|
||||||
need_to_look = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now check for objects */
|
/* Now check for objects */
|
||||||
for (i = 1; i < MAXOCLASSES; i++) {
|
for (i = 1; i < MAXOCLASSES; i++) {
|
||||||
if (sym
|
if (sym
|
||||||
@@ -696,6 +697,7 @@ 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.
|
||||||
*/
|
*/
|
||||||
|
didlook:
|
||||||
if (looked) {
|
if (looked) {
|
||||||
if (found > 1 || need_to_look) {
|
if (found > 1 || need_to_look) {
|
||||||
char monbuf[BUFSZ];
|
char monbuf[BUFSZ];
|
||||||
|
|||||||
+2
-2
@@ -76,8 +76,8 @@ register xchar omx, omy, gx, gy;
|
|||||||
allowflags |= ALLOW_DIG;
|
allowflags |= ALLOW_DIG;
|
||||||
if (!nohands(mtmp->data) && !verysmall(mtmp->data)) {
|
if (!nohands(mtmp->data) && !verysmall(mtmp->data)) {
|
||||||
allowflags |= OPENDOOR;
|
allowflags |= OPENDOOR;
|
||||||
if (m_carrying(mtmp, SKELETON_KEY))
|
if (monhaskey(mtmp, TRUE))
|
||||||
allowflags |= BUSTDOOR;
|
allowflags |= UNLOCKDOOR;
|
||||||
}
|
}
|
||||||
if (is_giant(mtmp->data))
|
if (is_giant(mtmp->data))
|
||||||
allowflags |= BUSTDOOR;
|
allowflags |= BUSTDOOR;
|
||||||
|
|||||||
+13
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 wizard.c $NHDT-Date: 1432512766 2015/05/25 00:12:46 $ $NHDT-Branch: master $:$NHDT-Revision: 1.37 $ */
|
/* NetHack 3.6 wizard.c $NHDT-Date: 1433457074 2015/06/04 22:31:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.38 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -428,9 +428,19 @@ clonewiz()
|
|||||||
int
|
int
|
||||||
pick_nasty()
|
pick_nasty()
|
||||||
{
|
{
|
||||||
|
int res = nasties[rn2(SIZE(nasties))];
|
||||||
|
|
||||||
/* To do? Possibly should filter for appropriate forms when
|
/* To do? Possibly should filter for appropriate forms when
|
||||||
in the elemental planes or surrounded by water or lava. */
|
* in the elemental planes or surrounded by water or lava.
|
||||||
return nasties[rn2(SIZE(nasties))];
|
*
|
||||||
|
* We want monsters represented by uppercase on rogue level,
|
||||||
|
* but we don't try very hard.
|
||||||
|
*/
|
||||||
|
if (Is_rogue_level(&u.uz)
|
||||||
|
&& !('A' <= mons[res].mlet && mons[res].mlet <= 'Z'))
|
||||||
|
res = nasties[rn2(SIZE(nasties))];
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create some nasty monsters, aligned or neutral with the caster */
|
/* create some nasty monsters, aligned or neutral with the caster */
|
||||||
|
|||||||
+4
-2
@@ -465,8 +465,10 @@ boolean use_detection_glyph;
|
|||||||
|
|
||||||
while (curr != wheads[worm->wormno]) {
|
while (curr != wheads[worm->wormno]) {
|
||||||
num = use_detection_glyph
|
num = use_detection_glyph
|
||||||
? detected_monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL))
|
? detected_monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL))
|
||||||
: monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL));
|
: (worm->mtame
|
||||||
|
? petnum_to_glyph(what_mon(PM_LONG_WORM_TAIL))
|
||||||
|
: monnum_to_glyph(what_mon(PM_LONG_WORM_TAIL)));
|
||||||
show_glyph(curr->wx, curr->wy, num);
|
show_glyph(curr->wx, curr->wy, num);
|
||||||
curr = curr->nseg;
|
curr = curr->nseg;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user