Undo the change to test_move and instead, don't even test moving in diagonals.
This opens the possibility for approximating the diagonal while polymorphed
into a grid bug in the future.
This is derived from the proposed patch and feedback to it. This applies
the last-position cache behavior without an option, making the behavior
more like it is for interfaces with a mouse, where holding the mouse still
acts the same way as the travel cache. The code is not #ifdef'd either.
Noticed when investigating one of the killer reason bugs recently
reported: a land mine explosion shouldn't create a concealed pit trap;
make a revealed pit instead. And while testing that, I noticed that the
"Kaboom" message given when pushing a boulder onto a land mine was given
while the map still showed the boulder at its original location even
though it had actually been moved already. It's a little odd that you
get hit by shrapnel at your original position--as if you're shoving the
boulder ahead of you and then pausing a moment before stepping into its
former location--but that's trickier to fix; sometimes you won't advance
due to there being multiple boulders present (in that case you evidently
do shove the boulder instead of performing a steady push, so maybe the
current behavior is fine as it is).
As suggested in the newsgroup, re-factor the calculation of carrcap
so that any change in strength or constitution affects your capacity.
The integer division was rounding off the result.
Prevent burying a ball from ending your punishment.
When you bury the ball, internally NetHack Punishment
ceases, but a new trap type of TT_BURIEDBALL immediately
kicks in (acting similar to TT_INFLOOR in some ways).
You can eventually work the ball free (or teleport, etc.),
but that will just return you back to normal Punishment.
- Version change from 3.4.x
- timed_delay feature ignore in makedefs
- several flags from iflags to flags
- use offsets from mons array entries in save file rather than storing
the ptr and calculating the distance from beginning of array
>More worrying is the fact that applying a figurine over water lets
>the monster wait until its next move before it drowns (giving
>you time to teleport it to safety, or whatever) [...]
>Should there be a minliquid() check as part of make_familiar()?
Applying at the water location next to you was easy. But
applying it at your own location (triggering BY_YOU) could
end up placing the figurine at the far side of the level if
there was lots of water.
Correcting that required the ability to pass a flag from
make_familiar to makemon() telling it to not rule out
water locations as good positions. The flag had to
be passed on down to goodpos() and enexto().
The bulk of this patch is just adding an additional
argument to goodpos() in all of the callers.
Building with an old version of gcc with various warnings enabled
generated a lot of noise. Most of it was due to not guarding string
literals with `const', but there were a couple of actual problems too.
Soft "helmets" don't protect against falling rocks, but did protect against
piercers. Update the checks so only hard (metallic) helmets provide this
protection. The same report quibbled about using the word "helmet" for
soft head coverings. This patch does not address that quibble.
Some newsgroup discussion has reminded me something I've meant
to do for a long time. Stop running when you get the special message
about the floor vibrating under your feet. Also vary it when you're
not actually stepping on the ground.
I was about to add a message referring to your steed and discovered
that the name handling for that is somewhat messy. Simplify it by using
the pet name handling routine.
- Breaking wand of digging dug through rock which should be undiggable.
Checks assumed pits would never show up in solid rock.
- Breaking wand of digging near shop walls wouldn't anger the shopkeeper
Checks assumed pits would never show up in walls, also, added a special
case to pay_for_damage to handle the case where you're falling thru and
can't be asked to pay.
- Shop walls wouldn't be restored if there are pits in the way.
Checks assumed pits would never show up in walls.
- If there was a hole outside the shop, you could kick stuff out of the
door into the hole without shopkeeper noticing. Added the missing check.
- when testing travel locations, don't treat diagonal moves thru closed
doors as possible, unless player can go/dig thru door
- treat closed doors and boulders as expensive for travel, preferring open paths
- In various places, cutting down a tree would result in a corridor symbol
showing up, although trees are generally found in room-like areas. Added
the missing checks.
- Trees were diggable except on mazelike levels. Added the missing check.
- In a cavernous town like minetn-6, digging a wall would result in a
corridor symbol being displayed instead of a doorway. This looked strange,
especially in the town. Added a check for this, making use of the new
meaning of in_town(); non-town parts of this level still do CORR
replacement as expected.
The problem was caused by a test that was added to test_move() to test the
move as a regular move if it was the next step. This case affected
boulders and closed doors, both of which are handled in later in do_move().
Remove the check. I think this was something I thought was needed for an
intermediary version of the travel command fix, but turned out to be
detrimental in the current version.
Several flags added since 3.4.0 were destined for flags
(to be saved with the game) but were placed in iflags for
savefile compatibility. These include:
boolean lootabc; /* use "a/b/c" rather than "o/i/b" when looting */
boolean showrace; /* show hero glyph by race rather than by role */
boolean travelcmd; /* allow travel command */
int runmode; /* update screen display during run moves */
This patch has no effect unless you define this in your port's
XXconf.h file.
#define SAVEFILE_340_CONVERT /* allow moving of some iflags fields to flags
without destroying savefile compatibility */
Without it, the new flags remain in "iflags." With it, the flags are moved to
"flags" and the structures are converted when the save file is read. There
is no reverse compatibility. If you save the game after conversion, you
can't load the savefile on 3.4.0, only 3.4.1.
Provide user control over screen updating for multi-step movement
(run via shift, control, &c and also travel). [See cvs history for
fixes34.1 for more details.]
Pat forwarded a message from the newsgroup in March that the town guards
enforce rules even outside the town proper. Fix: On room-based town levels,
check if the location is in a room containing subrooms (roomno will often
have a subroom id instead). On the other levels (e.g. minetn-5), there are
no subrooms, so the whole level is fair game. Currently, this is valid.
If fancier towns are added in the future, more flags or use of regions may
be required to tell where the town border actually is. These checks are done
in a new in_town function.
Reported that player polymorphed into an exploding monster does not explode
when attacking thin air. Also noticed that if player is Unchanging, they
wouldn't die after exploding in the existing code. Set u.mh = -1 to ensure
they won't still be around after exploding.
If you first pushed an undiscovered boulder while blind with ESP and
there's a monster behind it, you'd get a message referring to the boulder
but the boulder wasn't displayed. Move the feel_location test.
Also, improved the grammar of the message a bit.
Addresses reports R718, R772.1, <Someone> P's extra move bug
- when there is a previously seen path or a straight path, always take it
- incorporate fix to ensure no extra "." turn at the end of traveling, but
still avoid stepping into traps/pools, et al
- include a general "G"-command (and travel) fix to avoid stepping in
known pools/lava while blind
- when there is no such path, "guess" at a path by finding an intermediate
location that the hero couldsee that is closest to the actual goal, the
intermediate goal is re-determined at each step
- when Blind, don't use couldsee for determining straight paths, just direction
- do not consider doors or most boulders obstacles for picking travel
paths, test_move has a new mode to differentiate this case from the regular
test case
- don't include known trap locations in the travel path, avoids unnecessary
stops along the way, and usually doesn't affect the path length
- reformatted the code a bit so I could follow it
Can't push boulders through iron bars; traps can't roll such through either;
likewise for objects thrown by monsters.
Thrown objects susceptible to breaking might do so when they hit iron bars.
Assorted monsters can pass through iron bars; ditto for polymorphed character.
Attempting to dig iron bars will wake nearby monsters instead of yielding
"you swing your pick-axe through thin air".
Autodig won't accept iron bars as candidate location.
Fixing some iron ball/teleds stuff:
-- If the player can pass through walls, ignore all checks for walls, or else
things will behave weirdly.
-- Instead of using the kludge "if the distance is >2 it must be a teleport",
pass a parameter indicating whether they crawled or teleported onto the new
space. This fixes a special case, where the player moved one space and the
ball didn't move, but the chain moved through solid rock. This is acceptable
if teleporting and unacceptable if dragging.
This also required some rearrangement of teleds() so that u.ux,u.uy
are set after placing the ball, not before. I'm still not sure the pit
filling line is in the right place; anyone know?
-- add some comments so I can look at the code in a month and still know what
I did.
Most of this patch is just adding the new parameter.
Fix the reported problem of incorrect conditional logic
making it impossible to bump into closed doors when moving while
impaired for the #if STEED configuration.
- a case missed by the earlier lava patch, if you enter the lava while
mounted, your steed would be unaffected if you were lifesaved
- fix by making more code shared with the is_pool case
Add absent prototypes to some core routines.
Also add some port function() to function(void) in some win32 routines.
Also updates the Borland C Makefile for win32.
Turns lots of duplicated "flags.move = 0; nomul(0);" code into
a single instance, fixing the ones that weren't complete.
Doesn't feel_locations when only testing.
Make pushing a boulder onto a landmine share code with the trap case,
resulting in pits, waking sleepers, et al.
Don't leave a boulder suspended over the new pit, fill it.
Make sure any remaining boulder is placed on top of the pile.
If player sets off landmine, monsters killed are credited to/blamed on player.
This patch, based on code sent to us by <Someone> well over a year ago, addresses
bugs recently resurfaced. Namely, that lava does not generally do anything
to monsters or objects that land in java. Newly renamed minliquid() handles
both water and lava, and new fire_damage() is used similar to water_damage().
Patch from <Someone> to the list on 10/01/2001. The changes cause riding a steed
into water to result in a dismount, and, if the steed can't survive in
water, the death of the steed, with the usual pet-death penalties.