Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-11-11 10:35:08 -05:00
13 changed files with 162 additions and 63 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1541631031 2018/11/07 22:50:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.299 $ */
/* NetHack 3.6 cmd.c $NHDT-Date: 1541902950 2018/11/11 02:22:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.301 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1423,7 +1423,19 @@ wiz_intrinsic(VOID_ARGS)
make_vomiting(newtimeout, FALSE);
pline1(buf);
break;
case WARN_OF_MON:
if (!Warn_of_mon) {
context.warntype.speciesidx = PM_GRID_BUG;
context.warntype.species
= &mons[context.warntype.speciesidx];
}
goto def_feedback;
case LEVITATION:
case FLYING:
float_vs_flight();
/*FALLTHRU*/
default:
def_feedback:
pline("Timeout for %s %s %d.", propertynames[i].prop_name,
oldtimeout ? "increased by" : "set to", amt);
incr_itimeout(&u.uprops[p].intrinsic, amt);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 end.c $NHDT-Date: 1540767809 2018/10/28 23:03:29 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.148 $ */
/* NetHack 3.6 end.c $NHDT-Date: 1541902951 2018/11/11 02:22:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.150 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2009,10 +2009,10 @@ const char *killername;
{
struct kinfo *k = find_delayed_killer(id);
if (k == (struct kinfo *) 0) {
if (!k) {
/* no match, add a new delayed killer to the list */
k = (struct kinfo *) alloc(sizeof(struct kinfo));
(void) memset((genericptr_t)k, 0, sizeof(struct kinfo));
k = (struct kinfo *) alloc(sizeof (struct kinfo));
(void) memset((genericptr_t) k, 0, sizeof (struct kinfo));
k->id = id;
k->next = killer.next;
killer.next = k;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 timeout.c $NHDT-Date: 1505214876 2017/09/12 11:14:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.75 $ */
/* NetHack 3.6 timeout.c $NHDT-Date: 1541902953 2018/11/11 02:22:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.84 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2018. */
/* NetHack may be freely redistributed. See license for details. */
@@ -45,7 +45,7 @@ const struct propname {
{ SEE_INVIS, "see invisible" },
{ INVIS, "invisible" },
/* properties beyond here don't have timed values during normal play,
so there's no much point in trying to order them sensibly;
so there's not much point in trying to order them sensibly;
they're either on or off based on equipment, role, actions, &c */
{ FIRE_RES, "fire resistance" },
{ COLD_RES, "cold resistance" },
@@ -367,6 +367,7 @@ nh_timeout()
{
register struct prop *upp;
struct kinfo *kptr;
boolean was_flying;
int sleeptime;
int m_idx;
int baseluck = (flags.moonphase == FULL_MOON) ? 1 : 0;
@@ -431,6 +432,7 @@ nh_timeout()
pline("%s stops galloping.", Monnam(u.usteed));
}
was_flying = Flying;
for (upp = u.uprops; upp < u.uprops + SIZE(u.uprops); upp++)
if ((upp->intrinsic & TIMEOUT) && !(--upp->intrinsic & TIMEOUT)) {
kptr = find_delayed_killer((int) (upp - u.uprops));
@@ -554,6 +556,25 @@ nh_timeout()
case LEVITATION:
(void) float_down(I_SPECIAL | TIMEOUT, 0L);
break;
case FLYING:
/* timed Flying is via #wizintrinsic only */
if (was_flying && !Flying) {
context.botl = 1;
You("land.");
spoteffects(TRUE);
}
break;
case WARN_OF_MON:
/* timed Warn_of_mon is via #wizintrinsic only */
if (!Warn_of_mon) {
context.warntype.speciesidx = NON_PM;
if (context.warntype.species) {
You("are no longer warned about %s.",
makeplural(context.warntype.species->mname));
context.warntype.species = (struct permonst *) 0;
}
}
break;
case PASSES_WALLS:
if (!Passes_walls) {
if (stuck_in_wall())