Merge branch 'NetHack-3.6.2'
This commit is contained in:
13
src/mon.c
13
src/mon.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1543100460 2018/11/24 23:01:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.271 $ */
|
||||
/* NetHack 3.6 mon.c $NHDT-Date: 1543455827 2018/11/29 01:43:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.272 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -483,13 +483,18 @@ register struct monst *mtmp;
|
||||
|
||||
/* [what about ceiling clingers?] */
|
||||
inpool = (is_pool(mtmp->mx, mtmp->my)
|
||||
&& !(is_flyer(mtmp->data) || is_floater(mtmp->data)));
|
||||
&& (!(is_flyer(mtmp->data) || is_floater(mtmp->data))
|
||||
/* there's no "above the surface" on the plane of water */
|
||||
|| Is_waterlevel(&u.uz)));
|
||||
inlava = (is_lava(mtmp->mx, mtmp->my)
|
||||
&& !(is_flyer(mtmp->data) || is_floater(mtmp->data)));
|
||||
infountain = IS_FOUNTAIN(levl[mtmp->mx][mtmp->my].typ);
|
||||
|
||||
/* Flying and levitation keeps our steed out of the liquid */
|
||||
/* (but not water-walking or swimming) */
|
||||
/* Flying and levitation keeps our steed out of the liquid
|
||||
(but not water-walking or swimming; note: if hero is in a
|
||||
water location on the Plane of Water, flight and levitating
|
||||
are blocked so this (Flying || Levitation) test fails there
|
||||
and steed will be subject to water effects, as intended) */
|
||||
if (mtmp == u.usteed && (Flying || Levitation))
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mondata.c $NHDT-Date: 1539938825 2018/10/19 08:47:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.67 $ */
|
||||
/* NetHack 3.6 mondata.c $NHDT-Date: 1543545188 2018/11/30 02:33:08 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.69 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -739,6 +739,10 @@ const char *in_str;
|
||||
/* Outdated names */
|
||||
{ "invisible stalker", PM_STALKER },
|
||||
{ "high-elf", PM_ELVENKING }, /* PM_HIGH_ELF is obsolete */
|
||||
/* other misspellings or incorrect words */
|
||||
{ "wood-elf", PM_WOODLAND_ELF },
|
||||
{ "wood elf", PM_WOODLAND_ELF },
|
||||
{ "woodland nymph", PM_WOOD_NYMPH },
|
||||
{ "halfling", PM_HOBBIT }, /* potential guess for polyself */
|
||||
{ "genie", PM_DJINNI }, /* potential guess for ^G/#wizgenesis */
|
||||
/* Hyphenated names -- it would be nice to handle these via
|
||||
|
||||
10
src/objnam.c
10
src/objnam.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1539938837 2018/10/19 08:47:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.214 $ */
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1543544340 2018/11/30 02:19:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.226 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1154,11 +1154,11 @@ unsigned doname_flags;
|
||||
(obj->otyp == AKLYS) ? "tethered " : "", hand_s);
|
||||
|
||||
if (warn_obj_cnt && obj == uwep && (EWarn_of_mon & W_WEP) != 0L) {
|
||||
/* presumably can be felt when blind */
|
||||
Strcat(bp, " (glowing");
|
||||
/* this used to be "(glowing <color>)" when sighted or
|
||||
"(glowing)" when blind (via feeling warmth), but it
|
||||
isn't a light source so describe something fainter */
|
||||
if (!Blind)
|
||||
Sprintf(eos(bp), " %s", glow_color(obj->oartifact));
|
||||
Strcat(bp, ")");
|
||||
Sprintf(eos(bp), " (%s aura)", glow_color(obj->oartifact));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
src/region.c
15
src/region.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 region.c $NHDT-Date: 1542765361 2018/11/21 01:56:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.42 $ */
|
||||
/* NetHack 3.6 region.c $NHDT-Date: 1543455828 2018/11/29 01:43:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.43 $ */
|
||||
/* Copyright (c) 1996 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -947,10 +947,16 @@ genericptr_t p2;
|
||||
struct monst *mtmp;
|
||||
int dam;
|
||||
|
||||
/*
|
||||
* Gas clouds can't be targetted at water locations, but they can
|
||||
* start next to water and spread over it.
|
||||
*/
|
||||
|
||||
reg = (NhRegion *) p1;
|
||||
dam = reg->arg.a_int;
|
||||
if (p2 == (genericptr_t) 0) { /* This means *YOU* Bozo! */
|
||||
if (u.uinvulnerable || nonliving(youmonst.data) || Breathless)
|
||||
if (u.uinvulnerable || nonliving(youmonst.data) || Breathless
|
||||
|| Underwater)
|
||||
return FALSE;
|
||||
if (!Blind) {
|
||||
Your("%s sting.", makeplural(body_part(EYE)));
|
||||
@@ -973,6 +979,11 @@ genericptr_t p2;
|
||||
adult green dragon is not affected by gas cloud, baby one is */
|
||||
if (!(nonliving(mtmp->data) || is_vampshifter(mtmp))
|
||||
&& !breathless(mtmp->data)
|
||||
/* not is_swimmer(); assume that non-fish are swimming on
|
||||
the surface and breathing the air above it periodically
|
||||
unless located at water spot on plane of water */
|
||||
&& !((mtmp->data->mlet == S_EEL || Is_waterlevel(&u.uz))
|
||||
&& is_pool(mtmp->mx, mtmp->my))
|
||||
/* exclude monsters with poison gas breath attack:
|
||||
adult green dragon and Chromatic Dragon (and iron golem,
|
||||
but nonliving() and breathless() tests also catch that) */
|
||||
|
||||
89
src/steed.c
89
src/steed.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 steed.c $NHDT-Date: 1542765364 2018/11/21 01:56:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.57 $ */
|
||||
/* NetHack 3.6 steed.c $NHDT-Date: 1543543362 2018/11/30 02:02:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.59 $ */
|
||||
/* Copyright (c) Kevin Hugo, 1998-1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -481,7 +481,7 @@ int reason; /* Player was thrown off etc. */
|
||||
{
|
||||
struct monst *mtmp;
|
||||
struct obj *otmp;
|
||||
coord cc;
|
||||
coord cc, steedcc;
|
||||
const char *verb = "fall";
|
||||
boolean repair_leg_damage = (Wounded_legs != 0L);
|
||||
unsigned save_utrap = u.utrap;
|
||||
@@ -548,19 +548,55 @@ int reason; /* Player was thrown off etc. */
|
||||
/* Release the steed and saddle */
|
||||
u.usteed = 0;
|
||||
u.ugallop = 0L;
|
||||
|
||||
/* Set player and steed's position. Try moving the player first
|
||||
unless we're in the midst of creating a bones file. */
|
||||
if (reason == DISMOUNT_BONES) {
|
||||
/* move the steed to an adjacent square */
|
||||
if (enexto(&cc, u.ux, u.uy, mtmp->data))
|
||||
rloc_to(mtmp, cc.x, cc.y);
|
||||
else /* evidently no room nearby; move steed elsewhere */
|
||||
(void) rloc(mtmp, FALSE);
|
||||
return;
|
||||
/*
|
||||
* rloc(), rloc_to(), and monkilled()->mondead()->m_detach() all
|
||||
* expect mtmp to be on the map or else have mtmp->mx be 0, but
|
||||
* setting the latter to 0 here would interfere with dropping
|
||||
* the saddle. Prior to 3.6.2, being off the map didn't matter.
|
||||
*
|
||||
* place_monster() expects mtmp to be alive and not be u.usteed.
|
||||
*
|
||||
* Unfortunately, <u.ux,u.uy> (former steed's implicit location)
|
||||
* might now be occupied by an engulfer, so we can't just put mtmp
|
||||
* at that spot. An engulfer's previous spot will be unoccupied
|
||||
* but we don't know where that was and even if we did, it might
|
||||
* be hostile terrain.
|
||||
*/
|
||||
steedcc.x = u.ux, steedcc.y = u.uy;
|
||||
if (m_at(u.ux, u.uy)) {
|
||||
/* hero's spot has a monster in it; hero must have been plucked
|
||||
from saddle as engulfer moved into his spot--other dismounts
|
||||
shouldn't run into this situation; find nearest viable spot */
|
||||
if (!enexto(&steedcc, u.ux, u.uy, mtmp->data)
|
||||
/* no spot? must have been engulfed by a lurker-above over
|
||||
water or lava; try requesting a location for a flyer */
|
||||
&& !enexto(&steedcc, u.ux, u.uy, &mons[PM_BAT]))
|
||||
/* still no spot; last resort is any spot within bounds */
|
||||
(void) enexto(&steedcc, u.ux, u.uy, &mons[PM_GHOST]);
|
||||
}
|
||||
if (!m_at(steedcc.x, steedcc.y)) {
|
||||
if (mtmp->mhp < 1)
|
||||
mtmp->mhp = 0; /* make sure it isn't negative */
|
||||
mtmp->mhp++; /* force at least one hit point, possibly resurrecting */
|
||||
place_monster(mtmp, steedcc.x, steedcc.y);
|
||||
mtmp->mhp--; /* take the extra hit point away: cancel resurrection */
|
||||
} else {
|
||||
impossible("Dismounting: can't place former steed on map.");
|
||||
}
|
||||
|
||||
if (!DEADMONSTER(mtmp)) {
|
||||
place_monster(mtmp, u.ux, u.uy);
|
||||
/* if for bones, there's no reason to place the hero;
|
||||
we want to make room for potential ghost, so move steed */
|
||||
if (reason == DISMOUNT_BONES) {
|
||||
/* move the steed to an adjacent square */
|
||||
if (enexto(&cc, u.ux, u.uy, mtmp->data))
|
||||
rloc_to(mtmp, cc.x, cc.y);
|
||||
else /* evidently no room nearby; move steed elsewhere */
|
||||
(void) rloc(mtmp, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set hero's and/or steed's positions. Try moving the hero first. */
|
||||
if (!u.uswallow && !u.ustuck && have_spot) {
|
||||
struct permonst *mdat = mtmp->data;
|
||||
|
||||
@@ -614,20 +650,29 @@ int reason; /* Player was thrown off etc. */
|
||||
if (save_utrap)
|
||||
(void) mintrap(mtmp);
|
||||
}
|
||||
/* Couldn't... try placing the steed */
|
||||
|
||||
/* Couldn't move hero... try moving the steed. */
|
||||
} else if (enexto(&cc, u.ux, u.uy, mtmp->data)) {
|
||||
/* Keep player here, move the steed to cc */
|
||||
rloc_to(mtmp, cc.x, cc.y);
|
||||
/* Player stays put */
|
||||
/* Otherwise, kill the steed */
|
||||
} else {
|
||||
killed(mtmp);
|
||||
adjalign(-1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return the player to the floor */
|
||||
if (reason != DISMOUNT_ENGULFED) {
|
||||
/* Otherwise, kill the steed. */
|
||||
} else {
|
||||
if (reason == DISMOUNT_BYCHOICE) {
|
||||
/* [un]#ride: hero gets credit/blame for killing steed */
|
||||
killed(mtmp);
|
||||
adjalign(-1);
|
||||
} else {
|
||||
/* other dismount: kill former steed with no penalty;
|
||||
damage type is just "neither AD_DGST nor -AD_RBRE" */
|
||||
monkilled(mtmp, "", -AD_PHYS);
|
||||
}
|
||||
}
|
||||
} /* !DEADMONST(mtmp) */
|
||||
|
||||
/* usually return the hero to the surface */
|
||||
if (reason != DISMOUNT_ENGULFED && reason != DISMOUNT_BONES) {
|
||||
in_steed_dismounting = TRUE;
|
||||
(void) float_down(0L, W_SADDLE);
|
||||
in_steed_dismounting = FALSE;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1543100476 2018/11/24 23:01:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.311 $ */
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1543515862 2018/11/29 18:24:22 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.312 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1185,6 +1185,7 @@ unsigned trflags;
|
||||
if (!Sokoban) {
|
||||
char verbbuf[BUFSZ];
|
||||
|
||||
*verbbuf = '\0';
|
||||
if (u.usteed) {
|
||||
if ((trflags & RECURSIVETRAP) != 0)
|
||||
Sprintf(verbbuf, "and %s fall",
|
||||
@@ -1202,8 +1203,9 @@ unsigned trflags;
|
||||
} else {
|
||||
Strcpy(verbbuf,
|
||||
!plunged ? "fall" : (Flying ? "dive" : "plunge"));
|
||||
You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]);
|
||||
}
|
||||
if (*verbbuf)
|
||||
You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]);
|
||||
}
|
||||
/* wumpus reference */
|
||||
if (Role_if(PM_RANGER) && !trap->madeby_u && !trap->once
|
||||
|
||||
11
src/wield.c
11
src/wield.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 wield.c $NHDT-Date: 1525012623 2018/04/29 14:37:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.56 $ */
|
||||
/* NetHack 3.6 wield.c $NHDT-Date: 1543492132 2018/11/29 11:48:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.58 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2009. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -575,8 +575,13 @@ const char *verb; /* "rub",&c */
|
||||
} else {
|
||||
struct obj *oldwep = uwep;
|
||||
|
||||
You("now wield %s.", doname(obj));
|
||||
setuwep(obj);
|
||||
if (will_weld(obj)) {
|
||||
/* hope none of ready_weapon()'s early returns apply here... */
|
||||
(void) ready_weapon(obj);
|
||||
} else {
|
||||
You("now wield %s.", doname(obj));
|
||||
setuwep(obj);
|
||||
}
|
||||
if (flags.pushweapon && oldwep && uwep != oldwep)
|
||||
setuswapwep(oldwep);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user