diff --git a/doc/fixes36.2 b/doc/fixes36.2 index c719349ac..e08f5de5c 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -302,6 +302,7 @@ when fire converts an ice location into a water location, dunk any monster on training riding skill had an off-by-one bug when counting turns riding message sequencing when vampire shifts to fog cloud to pass under closed door: when in sight, give form change message before moving to door spot +limit carrying heavy loads from water to land Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/hack.c b/src/hack.c index 362a4c78a..0e3f3f6f2 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 hack.c $NHDT-Date: 1544401269 2018/12/10 00:21:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.201 $ */ +/* NetHack 3.6 hack.c $NHDT-Date: 1545530973 2018/12/23 02:09:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.202 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1429,6 +1429,19 @@ domove() } x = u.ux + u.dx; y = u.uy + u.dy; + + /* are we trying to move out of water while carrying too much? */ + if (isok(x, y) && !is_pool(x, y) && !Is_waterlevel(&u.uz) + && wtcap > (Swimming ? MOD_ENCUMBER : SLT_ENCUMBER)) { + /* when escaping from drowning you need to be unencumbered + in order to crawl out of water, but when not drowning, + doing so while encumbered is feasible; if in an aquatic + form, stressed or less is allowed; otherwise (magical + breathing), only burdened is allowed */ + You("are carrying too much to climb out of the water."); + nomul(0); + return; + } } if (!isok(x, y)) { nomul(0); @@ -1441,6 +1454,7 @@ domove() if (iflags.mention_walls) { if (trap && trap->tseen) { int tt = what_trap(trap->ttyp); + You("stop in front of %s.", an(defsyms[trap_to_defsym(tt)].explanation)); } else if (is_pool_or_lava(x,y) && levl[x][y].seenv) {