Commit Graph

252 Commits

Author SHA1 Message Date
nethack.rankin
137bd330e4 fix B14021 - inconsistent menu styles
Menu styles `partial' and `full' will let you remove any type of
item from the three weapon slots via the 'A' command, but `traditional'
and `combination' would only do that for the primary weapon slot.  For
the alternate weapon and quiver slots, the item in question had to be
one which can normally be wielded or worn, otherwise when choosing the
object class letter you'd be told that it was "Not applicable."  And
for wearable items, you needed to be really wearing one of that class
(besides the quivered one) or else you'd get "not wearing any amulet"
or similar.
2002-12-14 11:53:22 +00:00
nethack.rankin
b90f50075d fire attack messages
Make sure the three instances of special fire effects stay
synchronized in the future by moving the relevant code into its own
routine.

     Shouldn't fire vortices and fire elementals also yield "already
on fire"?  How about ice vortices "melting"?
2002-12-10 10:21:28 +00:00
cohrs
2492ed0de1 comment bit
mtrapped comment didn't mention webs
2002-11-28 19:13:01 +00:00
nethack.rankin
7b9f2f6e3e stealing heaven
Fix the reported problem of getting impossible warnings for unpaid
inventory items during final disclosure if you level teleport out of
the dungeon while holding shop goods.  The fix makes you trigger a shop
robbery first; that required a minor end of game change to prevent the
shopkeeper from seeming to tag along (shk would take your possessions
as if you'd died on the shop level).
2002-11-21 00:47:12 +00:00
nethack.allison
abd3df2871 get_adjacent_loc()
use get_adjacent_loc() rather than getdir() directly for some things where
you want to ensure valid adjacent coordinates are returned

<email deleted> wrote:
>>> [...]
>>> I've noticed that the loot adjacent spot code doesn't have any
>>> isok(x,y) test, so will risk crashing if used at the edge of
>>> the screen (whether deliberately, or accidentally due to being
>>> confused or stunned when picking the direction).

>> Would this not be a problem elsewhere, such as use_leash() too?

> Yes, that looks like the same risk. getdir() doesn't validate
> that the <u.ux+u.dx, u.uy,u.dy> is safe and neither does m_at(),
> so their callers need to.
>
> I did manage to provoke a crash with #loot on the plane of earth,
> although an accidental case would be a lot less likely to happen.
2002-11-17 18:43:45 +00:00
nethack.rankin
e639c09f58 fix B14012 - polymorph of monster possessions
Forwarded from the newsgroup:  when a monster gets hit by wand or
spell of polymorph, any armor that fell off was protected from being
hit by that same zap, but a dropped weapon wasn't.  Nor was the whole
dropped inventory in the case where the monster is killed by system
shock rather than transformed.  Protect its entire inventory.
2002-11-08 12:45:58 +00:00
cohrs
ff8512b36b is_lminion should only match lawful minions
When Angels were introduced, they were always lawful.  Somewhere along the
line, non-lawful angels were added, but is_lminion and uses of it was never
updated to address this change.  Among other things, this resulted in
non-lawful angels delivering messages via #chat that are only appropriate
for lawful angels.  That is addressed simply by changing the definition of
is_lminion, which must take a struct monst, not a permonst, to return valid
results.  Also, non-lawful angels should summon appropriate monsters, not
lawful minions.
2002-10-24 04:13:56 +00:00
nethack.rankin
7411e1daf5 fix U100 - vampire stoning buf
Fix the reported bug of a vampire that is wearing gloves being
able to bite a cockatrice without becoming petrified.
2002-10-18 06:49:34 +00:00
nethack.rankin
2f6d82dcc6 fix B14002 - Stinking clouds in bonefiles
More region fixes.  The region restore code wasn't updating monster
ID numbers for bones data, so monsters already inside stinking clouds
might or might not be affected by them depending on arbitrary mon->mid
assignments across the old and new games.

     This also flags stinking clouds in a way that lets the game keep
track of whether they were created by the player, and clears that state
for bones data so that the current player doesn't get credit or blame
for clouds left by the former one.  File compatibility with 3.4.0 is
retained; if/when that eventually changes, this code can be simplified.

     Testing with current development code has been limited but seems
to be working correctly; testing with actual 3.4.0 files has not been
attempted.
2002-10-16 22:20:30 +00:00
cohrs
cb38d0882d B14001 - Stinking clouds in bonesfiles
Incorporate a fix from <Someone> that resets the timestamp on
stinking clouds left in bones files.  This does allow the cloud's ttl to
restart.  Extended it to reset the player_inside flag.

Then noticed that the only placed that called in_out_region was domove().
Added calls when changing levels (which causes player_inside to be set
correctly if the cloud covers the location where the player starts on the
bones level), teleporting, and inside hurtle_step.  There are still other
places that fail to call in_out_region, which others may choose to tackle.

I split out the remaining stinking cloud bug reported in the same e-mail
into a separate betabug.  That one probably cannot be addressed without
changing the level file format to track the creator.
2002-10-16 06:30:36 +00:00
nethack.rankin
2c3964e619 #dipping from steed
Fix the reported bug of an unskilled rider who is unable to pick
items off the floor while mounted still being able to dip into water.
There might be other actions which need similar checking; this one only
handles the dip into pool/moat case.
2002-10-11 00:46:37 +00:00
nethack.rankin
a0067f97e2 luck artifact dependencies
Instead of adding a new artifact.h to pray.c, remove the existing
ones from attrib.c, invent.c, and mkobj.c.  This also updates the Unix
and VMS editions of Makefile.src; having stale dependencies in those
for other ports could cause unnecessary recompilation but can't break
anything in this case.
2002-10-09 07:06:08 +00:00
nethack.rankin
cd62daa465 fix U88 - invisible hero didn't sense self via ESP
If the character was invisible without being able to see invisible,
his location on the map showed any object there or underlying topology
instead of the hero even when monsters could be seen with infravision,
ESP, or sustained monster detection.  The ESP case required an amulet
or helm or quest artifact to be noticeable because being blind overrides
being unable to see invisible, so the more common form of telepathy
didn't exhibit this behavior.
2002-10-04 02:46:02 +00:00
nethack.allison
183e450b1b B12004 polymorphing into minotaur
Polymorphing into creature with horns such as a minotaur,
will cause your helmet to fall off if it is made of a hard material.

Only minotaurs pass the has_horns() test in include/mondata.h
because the complaint specifically referred to them, but that
should perhaps be reviewed at some point by someone who is
certain which creatures have horns growing from their
head (some demons?)
2002-09-22 15:59:46 +00:00
nethack.rankin
a6e3791170 fix B11001 - fruit name quibbling
> OK, it's "grape juice" now, but it's still "bunch of grapes farm".
2002-09-10 09:10:23 +00:00
nethack.rankin
ce71bfb593 cursed levitation prayers
Noticed while testing something recently:  if you're wearing
a non-cursed ring of levitation but can't remove it because of
some other cursed item, you'll never get the high priority result
of TROUBLE_LEVITATION when praying.  This remedies that.
2002-09-10 08:01:18 +00:00
nethack.rankin
0ef3240077 more monster intrinsics
Provide more control over message handling for monsters' use
of equipment.  This fixes the statue revival problem (inappropriate
feedback when monster puts on speed boots) mentioned in the earlier
"intrinsics of dead monsters" patch.
2002-09-09 09:24:38 +00:00
warwick
00671608d6 Fix scattering - the splitting code doesn't look right - it will
leave avg 1/2 the object's quantity on the scatter point.
Return count of how many objects actually left the scatter point.
2002-09-09 05:44:32 +00:00
nethack.allison
9ac2c2c576 <email deleted>
> I'm working on a Nethack port, and one of the header files a
> library uses has a structure with a member named "red". Since
> includes/decl.h #defines red to something, this totally loses.
>
> Attached is a patch which fixes the color defines.
2002-09-06 00:12:44 +00:00
nethack.allison
3c9a181629 extern.h bit 2002-09-04 01:28:12 +00:00
nethack.allison
6bebdbb135 win32 USER_SOUNDS
This uses pmatch() as a default pattern matcher,
and #defines USER_SOUNDS_REGEX for Qt
to enable the code for regular expressions.

This is enabled for win32tty and win32gui.
2002-09-02 23:28:54 +00:00
nethack.allison
46b88235a1 Borland bits (from Yitzhak) 2002-09-02 14:29:57 +00:00
nethack.allison
47f4cf21aa doomed quest
Your quest leader would tell you to return later, even after you
were converted, which would be futile, and could mislead new
players.

This patch:
1. Causes the quest leader to banish you the first time you
encounter him/her following a conversion, since you cannot ever
complete the quest anyway in the current game.
2. Adds a new general QT_BANISHED message to be delivered, in
which you are told that you won't be able to get the Amulet without
the Bell now.

This helps resolve the complaint about not knowing that your game
cannot be won.
2002-08-31 20:14:17 +00:00
cohrs
081edea253 improperly terminated quest message
Add a missing check to makedefs so it prints a warning about misplaced %Es.
Fix a couple places in quest.txt pointed out by the new warning.
There's no visible effect on play, since the code that actually reads the
message keeps reading until the next %C.
2002-08-27 03:56:28 +00:00
nethack.allison
d1da0e7398 bones file diagnostics
Pat added some error information to create_levelfile.
This does the same for create_bonesfile, but the
only place it is logged is in the paniclog, unless
you're in wizard mode.  If bones file creation is
silently failing for someone and they aren't getting
bones files, this provides a way to diagnose why.
2002-08-24 23:25:40 +00:00
nethack.rankin
b00a9dcd4a level file handling and trickery feedback
1) consolidate all core usage of `errno' in files.c;
2) give more feedback for any failure by create_levelfile or open_levelfile,
   similar to what was being done for problems during level change;
3) include trickery info in paniclog (many instances of "trickery" seem to
   be due to disk or quota problems rather than user misbehavior...).

The create_levelfile call in pcmain probably ought to be changed to use
error feedback, but in the meantime this should continue working.

Perhaps error() should be modified to update paniclog too, but I didn't
want to go through all its port-specific incarnations making changes.
2002-08-23 14:52:25 +00:00
nethack.allison
2ce6152d63 B08021 scroll_amount wincap option
> - I'd like to see another option added: scroll_amount. In
>   combination with scroll_margin, this would control the amount
>   of squares the screen is scrolled when the scroll_margin is
>   reached (currently, this amount is 1, but if I recall
>   correctly, it used to be more). For example, if both were 5,
>   when you came within 5 spaces of the left screen border, the
>   screen would shift 5 spaces to the right).
2002-08-23 01:03:59 +00:00
cohrs
5d492abf6f R1049 - various wand of digging bugs
- 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.
2002-08-21 23:06:58 +00:00
nethack.allison
2697615bd3 win32: hold .0 file open exclusively
-prevents problems with internal recover
if second copy of game is started up with
the same player name.
2002-08-21 15:21:56 +00:00
nethack.allison
3515dcf1f1 SELF_RECOVER for win32
- define SELF_RECOVER for win32
- add code to perform a recover operation from
  within NetHack itself when SELF_RECOVER is defined
2002-08-21 03:30:19 +00:00
nethack.allison
fc319a4be0 string constants
<Someone> wrote:
> Linux, Redhat 7.1 nethack 3.4.0
>
>Please see attached patch file.
>
>I'm attempting to move more stuff into the "read-only" area, in
>preparation for a port to another OS.
2002-08-20 08:05:20 +00:00
nethack.rankin
9a9259cf36 B08017 - piece of cheese juice
Implement <Someone>'s request that fruit name "foo of bar" yield
juice messages referring to "bar juice" instead of "foo of bar juice".
2002-08-19 07:33:13 +00:00
warwick
22e65c3e9e Support for 2 tile sizes ("zooming"). Still needs rc file support.
Make non-rest-on-space space and Enter do the sam as clicking on
current location. On handhelds, this is the button on thumbpad.
2002-08-14 06:12:37 +00:00
warwick
8285ca28c6 Allow arrowkeys to move player, including diagonals by pressing multiple
keys before releasing. Works well on handheld's thumbpad, perhaps less
useful on a fullsize keyboard.
Also some Qtopia-only fixes for Qt windowport.
2002-08-14 05:01:56 +00:00
nethack.allison
b4dffbcc48 B07001 healed, undetected mimic
> [Cast a healing spell in a shop where no mimic was visible] So,
> "The small mimic looks better.". However, my picture still looks
> the same. Either the mimic should be shown, *or* I shouldn't get
> any message about the mimic healing. Both solutions seem equally
> valid to me.

If the mimic was mimicing the "strange object", then the healing causes
them to start mimicing something else with no message (the observant
player could notice however).

If the mimic was already mimicing a real object, a message similar
to this one results:
"The crude dagger seems a more vivid black than before."
2002-08-12 01:57:02 +00:00
cohrs
b4b5a0fe52 B02001 - trees and monster
<Someone> noticed that the change to require axes for trees (and allow them for
doors) did not extend to monsters.  Now it does.
- added 2 new weapon check flags to handle the new cases
- added some detailed digging flags to mfndpos, based on ALLOW_DIG, and
  moved some common logic regarding that flag into mfndpos
- made the ARMS check consistent for 2-handed weapons
I also noticed that simply carrying a pick was enough to allow a monster to
dig a door; wielding wasn't required.  This is fixed as well.
2002-08-11 17:32:47 +00:00
nethack.allison
8631cba725 newbie in-game assistance with Guidebook notation
Provide some command assistance for newbies, but
suppress it with !cmdassist in the config file.

If someone misinterprets the Guidebook ^D, ^T
type command notation, this will pop up some
further information to possibly assist them and
explain the notation.
2002-08-04 16:48:15 +00:00
nethack.allison
a849315988 no message 2002-07-29 17:57:57 +00:00
warwick
fb4f19662b Honour more WINCAP flags. 2002-07-29 05:19:49 +00:00
nethack.allison
46721b5a91 flag changes
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.
2002-07-28 16:03:00 +00:00
nethack.rankin
aedd6947d4 runmode option
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.]
2002-07-28 10:45:46 +00:00
keni
bca0aca579 <email deleted> Thu Jul 25 13:59:29 2002
<email deleted>
 <email deleted>
 Subject: patch: missing amiga bits

Hi,

here are some missing bits from the amigafiles.

Current source compiles fine, seems to work ok (launches, runs, opens windows
and quits as usual). I haven't had much time to test it rigorously (or play
at all), but I don't remember there having been any major changes that would've
affected the amigaport, so it probably should be okay as it is.

-jhsa
2002-07-26 10:47:34 +00:00
nethack.allison
c6f7560bdd credit updates 2002-07-23 05:10:37 +00:00
nethack.allison
c6c17bc00f more Windows CE 2002-07-23 04:52:48 +00:00
warwick
7b5618e03c Enclose savefile format change by STORE_PLNAME_IN_FILE macro. 2002-07-22 09:13:04 +00:00
warwick
7174e31024 Some non-enabled perminv code in Qt windowport. (missed in previous patch) 2002-07-22 09:10:13 +00:00
warwick
16b7d4a099 Store plname in save files (and restore it).
Move get_saved_games() functionality to files.c
Use moved get_saved_games() functionality in Qt windowport.
[also some non-enabled perminv code in Qt windowport]
2002-07-22 06:25:52 +00:00
nethack.allison
0cc5b698d5 Windows CE port addition 2002-07-22 03:20:52 +00:00
nethack.rankin
4c4c99b889 build fix 2002-07-21 10:11:32 +00:00
nethack.allison
03cc2afa2e WIN32: file naming
Allow single character variations in player names
to remain unique in file names by encoding rather
than substituting.
"plnam one", "plnam_one", and "plnam~one" at the
"Who are you?" prompt get unique filenames after this patch.
2002-07-21 04:07:32 +00:00