]> granicus.if.org Git - nethack/commit
BARGETHROUGH tweaks (trunk only)
authornethack.rankin <nethack.rankin>
Tue, 3 Apr 2007 03:46:14 +0000 (03:46 +0000)
committernethack.rankin <nethack.rankin>
Tue, 3 Apr 2007 03:46:14 +0000 (03:46 +0000)
commit5f0ab027737da308fbabe4a05539bb541369780c
tree10d0c1600fe0d49683da716336b583977f400428
parenta7c73768954e448cb5864e6995e044b8cc62def4
BARGETHROUGH tweaks (trunk only)

     Prevent monster with barge-through capability--currently only the
astral Riders--from swapping places with another monster which has that
same capability.  Otherwise, if the target one moves after the barger,
it might just repeat the maneuver, undoing the first swap.  If there's
no room to move anywhere else--maybe they've barged through a crowd into
a narrow spot--they could get stuck swapping and re-swapping every turn.

     I've also allowed swapping with baby long worms and with adult ones
which lack a tail.  When testing that, something strange happened and
the displacer was drawn on the map as a long worm tail.  mdisplacem()'s
place_worm_seg() must have been responsible, but I don't understand how
the bit of code involved could kick in for a worm without tail segments.
I've reorganized mdisplacem() to avoid this occurrence, I hope....

     Also, barge-through swapping with a mimic exposes it as a mimic;
swapping with an eating pet causes the meal to end.  No fixes entries;
this is post-3.4.3 code.
src/mhitm.c
src/mon.c