Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-12-21 23:38:12 -05:00
4 changed files with 49 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mon.c $NHDT-Date: 1545259929 2018/12/19 22:52:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.275 $ */
/* NetHack 3.6 mon.c $NHDT-Date: 1545430257 2018/12/21 22:10:57 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.276 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -541,6 +541,12 @@ register struct monst *mtmp;
* themselves --ALI
*/
if (!is_clinger(mtmp->data) && !likes_lava(mtmp->data)) {
/* not fair...? hero doesn't automatically teleport away
from lava, just from water */
if (can_teleport(mtmp->data) && !tele_restrict(mtmp)) {
if (rloc(mtmp, TRUE))
return 0;
}
if (!resists_fire(mtmp)) {
if (cansee(mtmp->mx, mtmp->my)) {
struct attack *dummy = &mtmp->data->mattk[0];
@@ -551,7 +557,14 @@ register struct monst *mtmp;
: !strcmp(how, "melting") ? "melts away"
: "burns to a crisp");
}
mondead(mtmp);
/* unlike fire -> melt ice -> pool, there's no way for the
hero to create lava beneath a monster, so the !mon_moving
case is not expected to happen (and we haven't made a
player-against-monster variation of the message above) */
if (context.mon_moving)
mondead(mtmp);
else
xkilled(mtmp, XKILL_NOMSG);
} else {
mtmp->mhp -= 1;
if (DEADMONSTER(mtmp)) {
@@ -576,16 +589,29 @@ register struct monst *mtmp;
*/
if (!is_clinger(mtmp->data) && !is_swimmer(mtmp->data)
&& !amphibious(mtmp->data)) {
/* like hero with teleport intrinsic or spell, teleport away
if possible */
if (can_teleport(mtmp->data) && !tele_restrict(mtmp)) {
if (rloc(mtmp, TRUE))
return 0;
}
if (cansee(mtmp->mx, mtmp->my)) {
pline("%s drowns.", Monnam(mtmp));
if (context.mon_moving)
pline("%s drowns.", Monnam(mtmp));
else
/* hero used fire to melt ice that monster was on */
You("drown %s.", mon_nam(mtmp));
}
if (u.ustuck && u.uswallow && u.ustuck == mtmp) {
/* This can happen after a purple worm plucks you off a
flying steed while you are over water. */
flying steed while you are over water. */
pline("%s sinks as %s rushes in and flushes you out.",
Monnam(mtmp), hliquid("water"));
}
mondead(mtmp);
if (context.mon_moving)
mondead(mtmp);
else
xkilled(mtmp, XKILL_NOMSG);
if (!DEADMONSTER(mtmp)) {
water_damage_chain(mtmp->minvent, FALSE);
(void) rloc(mtmp, FALSE);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 steed.c $NHDT-Date: 1544666049 2018/12/13 01:54:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.61 $ */
/* NetHack 3.6 steed.c $NHDT-Date: 1545441042 2018/12/22 01:10:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.62 $ */
/* Copyright (c) Kevin Hugo, 1998-1999. */
/* NetHack may be freely redistributed. See license for details. */
@@ -366,7 +366,7 @@ exercise_steed()
return;
/* It takes many turns of riding to exercise skill */
if (u.urideturns++ >= 100) {
if (++u.urideturns >= 100) {
u.urideturns = 0;
use_skill(P_RIDING, 1);
}

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 zap.c $NHDT-Date: 1544442714 2018/12/10 11:51:54 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.302 $ */
/* NetHack 3.6 zap.c $NHDT-Date: 1545431660 2018/12/21 22:34:20 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -4040,8 +4040,12 @@ boolean say; /* Announce out of sight hit/miss events if true */
/* hit() and miss() need bhitpos to match the target */
bhitpos.x = sx, bhitpos.y = sy;
/* Fireballs only damage when they explode */
if (type != ZT_SPELL(ZT_FIRE))
if (type != ZT_SPELL(ZT_FIRE)) {
range += zap_over_floor(sx, sy, type, &shopdamage, 0);
/* zap with fire -> melt ice -> drown monster, so monster
found and cached above might not be here any more */
mon = m_at(sx, sy);
}
if (mon) {
if (type == ZT_SPELL(ZT_FIRE))
@@ -4244,6 +4248,7 @@ const char *msg;
{
struct rm *lev = &levl[x][y];
struct obj *otmp;
struct monst *mtmp;
if (!msg)
msg = "The ice crackles and melts.";
@@ -4281,6 +4286,8 @@ const char *msg;
}
if (x == u.ux && y == u.uy)
spoteffects(TRUE); /* possibly drown, notice objects */
else if (is_pool(x, y) && (mtmp = m_at(x, y)) != 0)
(void) minliquid(mtmp);
}
#define MIN_ICE_TIME 50
@@ -4327,11 +4334,15 @@ long timeout UNUSED;
{
xchar x, y;
long where = arg->a_long;
boolean save_mon_moving = context.mon_moving; /* will be False */
/* melt_ice -> minliquid -> mondead|xkilled shouldn't credit/blame hero */
context.mon_moving = TRUE; /* hero isn't causing this ice to melt */
y = (xchar) (where & 0xFFFF);
x = (xchar) ((where >> 16) & 0xFFFF);
/* melt_ice does newsym when appropriate */
melt_ice(x, y, "Some ice melts away.");
context.mon_moving = save_mon_moving;
}
/* Burn floor scrolls, evaporate pools, etc... in a single square.