Commit Graph

3469 Commits

Author SHA1 Message Date
nethack.rankin
2886b276ea wishing tweaks
When a wish request for "<foo> armor" fails to match anything, check
whether it matches "<foo> mail" before resorting to selecting a random piece
of armor.  Most of the suits are named "mail", and while I don't think many
people will ask for "ring armor", I do think that "crystal plate armor" and
"gray dragon scale armor" are sometimes tried.

     This also greatly simplifies the handling for spelling variant "armour"
by rewriting it to "armor".  Unfortunately "grey" vs "gray" can't be handled
the same way since both spellings are used by the program.
2005-02-01 05:35:34 +00:00
nethack.rankin
191db348ec stop occupation during problem countdown
A user recently complained that he started an activity such as
searching and specified a repeat count, right after getting--and not
realizing the significance of--the first message in the countdown
sequence for turning into stone.  He suggested that subsequent messages
interrupt multi-turn activity so that the player has a chance to do
something to prevent imminent death.  This implements that, with the
added wrinkle that it won't interrupt if the activity is something that
might save the character's life:  attempting to eat a tin that is either
sure to help (if ID'd as food that cures stoning) or a desparate gamble
(if unID'd).  Some hooks for similar behavior for other conditions like
turning into slime are included, although no tins can help for anything
other than petrification so far.

     Shouldn't fatal illness have an end-is-near countdown too?
2005-02-01 03:46:31 +00:00
nethack.rankin
9b27216b2a minor build fix
same_race() recently added to mondata.c (trunk only) exposed an old
inconsistency in mondata.h (trunk and branch).
2005-02-01 02:35:47 +00:00
nethack.rankin
d1732e1e8c intelligent pets vs cannibalism (trunk only)
Implement a user suggestion that tame humanoids should avoid eating
corpses of their own species.  Prevent them--except for kobolds, orcs, and
ogres--from doing so unless starving.  Arbitrary:  tame elves won't eat
other elves even when starving.  A polymorphed character will incur the
effects of cannibalism when eating either his/her underlying race _or_
the current one (player orcs and cavemen aren't affected though).
2005-01-30 04:19:01 +00:00
cohrs
ce1bf539ac U1270 - monster evading kick produces a teleport message in Sokoban
This time, it was just the message that was incorrect.  Added a
!level.flags.noteleport check before displaying "teleports".
2005-01-27 17:21:33 +00:00
nethack.allison
4527baa259 use of NULL (trunk only)
There were 2 files where NULL had crept into the sources,
even though we are not using it anywhere else.
2005-01-23 19:59:21 +00:00
nethack.allison
6177f4b871 win32 and wince
Remove the email address which is no longer valid from
several NetHack source files.
2005-01-23 19:39:01 +00:00
nethack.allison
d040170713 djgpp zlib support
Tested the djgpp MSDOS build with zlib support.
2005-01-23 16:29:16 +00:00
nethack.allison
fd205fc1db followup to compression changes 2005-01-23 14:34:29 +00:00
nethack.allison
fab2b1655f bones follow-up
include the savefile info in bones files
2005-01-22 18:58:02 +00:00
nethack.allison
4bfba9b24f config.h follow-up
I had uncommented ZLIB_COMP for testing in config.h, but it should
have been commented when the diff was cut.
2005-01-22 18:42:16 +00:00
nethack.allison
3322b8cfa6 increment patchlevel 2005-01-22 15:48:42 +00:00
nethack.allison
ab1872b928 zlib support; also internal compression changes
o Add support for zlib compression via ZLIB_COMP in config.h (ZLIB_COMP
  and COMPRESS are mutually exclusive).
o rlecomp and zerocomp are run time options available if RLECOMP and
  ZEROCOMP are defined, but not turned on by default if either COMPRESS
  or ZLIB_COMP are defined.
o Add information to the save file about internal compression options
  used when writing the save file, particularly rlecomp and zerocomp
  support.
o Automatically adjust rlecomp and zerocomp (if support compiled in)
  when reading in an existing savefile that was saved with those options
  turned on.  Still allows writing out of savefile in preferred format.
o In order to support zlib and not conflict with compress and uncompress
  routines there, the NetHack internal functions were changed to
  nh_uncompress and nh_compress as done in the zlib contribution received
  in 1999 from <Someone>.

I tagged the sources NETHACK_3_5_0_PREZLIB prior to applying these
changes.
2005-01-22 15:28:15 +00:00
cohrs
c40d876c3b U1258 - removing ring of levitation while riding a flying steed
As reported, you'd get the "float gently to the ground" message even while
riding a flying steed.  Rearranged the code and added a new case for this.
I found it odd that Hallucination protected you from falling out of the
saddle due to the Sokoban air currents.  The message implied otherwise, so
I've made the sokoban_trap code apply in both cases.
2005-01-21 22:27:19 +00:00
cohrs
c90746c670 polymorphing into a flyer while in a pit
<Someone> reported that if you polymorph into a flying monster while in a
pit, you must take u.utrap turns to first climb out before you can fly.  Of
course, once you're out, you can swoop down into the pit to pick things up
w/o delay.  Rather that have you automatically fly out (e.g. like quaffing
a potion of levitation), I thought it was better to take a turn to fly out,
so that's what I've implemented.

The code to deal with exiting a pit is moved to a new climb_pit function
and the "up" command now lets you climb from a pit too (something I've
found non-intuitive in the past).

Finally, I noticed that non-moving monsters could still go up/down even
though they couldn't move around.  Added non-moving checks in doup/dodown.
2005-01-18 16:17:27 +00:00
cohrs
c9b11cf989 U1231 - messages ordering when displacing a pet into a trap
move the message so it's before the mintrap test.  newsym's are needed
to ensure the display is correct if a --More-- prompt results.  I left the
"frighten" message alone, except for tense.  As per Pat's suggestion, I
changed the wording to future-proof the message.
2005-01-18 15:23:47 +00:00
cohrs
d0a1a6e5b6 experience calculation
fix the bug <Someone> noticed WRT experience calculation for nonphysical damage.
2005-01-18 15:01:10 +00:00
cohrs
a1ce203b40 comment isqrt
Help code divers to understand why isqrt is not a complicated function.
2005-01-17 22:24:00 +00:00
nethack.allison
9fe716c8db Guidebook update 2005-01-16 03:57:39 +00:00
nethack.allison
4c3a3d1d0c fixes35.0 update 2005-01-15 14:12:23 +00:00
nethack.allison
7b83a76bff win32tty: prevent early messages from flashing by unseen 2005-01-15 14:04:03 +00:00
nethack.allison
b064510a9b customize role, race, gender, align choices (trunk only)
Support negation syntax to restrict unwanted race, role, gender, align
options:
        OPTIONS=role:!knight, role:!tourist, race:!orc
prevents them from being picked randomly or
appearing in the pick lists at the start of the game.
2005-01-15 14:01:47 +00:00
cohrs
4a7c9490fe startup problems on Unix
I found I was no longer able to start "nethack", I think due to the change
in the save file structure.  But, it looks like the Unix-specific check in
bufon() was never quite correct.  I'd have to guess we've been lucky up
until now.
2005-01-13 01:36:40 +00:00
cohrs
521c9203a5 files.c fixup
With recent files.c changes, code required for Qt compilation on Unix no
longer worked.
2005-01-13 00:39:38 +00:00
cohrs
546add5359 missing copyright
<Someone>, I think, noticed there was no copyright on the window.doc.
Add one.  I don't recall when I originally wrote it, but I last changed
it in 2003, so that's the year I'm putting in.  Anyone else that wants to
share the blame, please add your name and update the year as needed.
2005-01-13 00:34:35 +00:00
cohrs
e9285c9fe2 followup: drinking from sinks while levitating
This is a followup to the patch I made a couple months ago.  It replaces
the "!Levitation && !u.uswallow" checks with can_reach_floor(), which
makes a more complete set of checks and is more consistent.  I applied
this to fountains too.  I doubt that fountains hit the ceiling, and the
checks also seem reasonable for heights in between (e.g. while mounted).
2005-01-11 19:47:37 +00:00
nethack.allison
d957558be4 yet another bit 2005-01-10 01:13:03 +00:00
nethack.allison
ee7064746f AltGr-4 and alternate tiles in menus - trunk only (from <Someone>)
On Mon, 03 Jan 2005 12:04:29 +0000, <email deleted> wrote:
> Dear NetHack win32 developers,
>
> This bug does not affect the win32 binaries that you distribute but it
> does affect NetHack 3.4.3 if I build it from source. The difference may
> be due to different compilers or whatever. I'm using mingw32-gcc v3.2
>
> I don't quite understand what's going on (I never was much good at
> win32 programming), but it appears that the WM_KEYDOWN message for
> AltGr-4 is being translated into a WM_CHAR message with a wParam of
> 128. I don't understand why that should be, but anyway. The problem
> then occurs when NetHack casts wParam to char which, since char is
> signed, gives -128. onListChar() then passes -128 to isdigit() which
> causes the crash. The fix appears to be to simply drop the cast:

Also
> <email deleted>
> Newsgroups: rec.games.roguelike.nethack
> Subject: Changing tile set for item list?
> Date: 1 Jan 2005 20:03:08 -0800
> <email deleted>
>
> I'm using the windows interface for Nethack 3.4, and I've successfully
> changed the tileset used by changing defaults.nh.  The only problem is,
> the item list (i.e. The list that comes up when I press "i") still uses
> the old tiles.  Is there any way to change the list so it uses the new
> tiles?  I've searched the guidebook to no avail.  I'm debating if it is
> even possible.
>
> Thanks for the help,
> -Zmann

trunk patch:
- menu: display custom tiles if map is not ASCII
- menu: display '-'/'+'/'#' in place of a tile if map is ASCII
- fix isdigit() crash on AltGr-4 with mingw


It looks kinda weird with huge tiles (e.g. absurd96) but that could
be just me. Comments/suggestions are welcome.

-<Someone>
2005-01-09 23:35:52 +00:00
nethack.allison
64fe2e5af4 selectsaved follow-up bit (trunk only)
fix a cut-and-paste error that I didn't catch earlier.
2005-01-09 23:25:40 +00:00
nethack.allison
055781aaf2 selectsaved follow-up bit (trunk only) 2005-01-09 21:58:43 +00:00
nethack.allison
15ae774a78 selectsaved option (trunk only)
- always write plname into save file, no longer conditional
- add 'selectsaved' wincap option to control the display of
  a menu of save files for ports/platforms that support it.
- add support for win32 tty using normal nethack menus.
- the win/tty/wintty code is generalized enough that any
  tty port could support the option if the appropriate port-specific
  code hooks for wildcard file lookups are added to src/file.c
  specifically in the get_saved_games() routine. There is posix
  code in there from Warwick already, and there is findfirst/findnext
  code in there from win32. Warwick has the posix code only
  enabled for Qt at present, but with wintty support, that could be expanded
  to other Unix environments quite easily I would think.

Here is what the tty support looks like:

    NetHack, Copyright 1985-2005
         By Stichting Mathematisch Centrum and M. Stephenson.
         See license for details.

    Select one of your saved games
    a - Bob
    b - Fred
    c - June
    d - mine3
    e - Sirius
    f - Start a new character
    (end)

The following files existed in the NetHack SAVEDIR directory
at the time:
    ALLISONMI-Bob.NetHack-saved-game
    ALLISONMI-Fred.NetHack-saved-game
    ALLISONMI-June.NetHack-saved-game
    ALLISONMI-mine3.NetHack-saved-game
    ALLISONMI-Sirius.NetHack-saved-game
Note that despite the file names, the actual character name
is drawn from the savefile.

The WIN32CON support passes
    USER-*.NetHack-saved-game
to findfirst/findnext where USER is your login name of course.
2005-01-09 21:40:24 +00:00
nethack.allison
9a3022800b filled trap doors on castle can be re-dug 2005-01-08 14:37:36 +00:00
nethack.allison
f8ea481ea1 extern.h bit 2005-01-06 04:36:30 +00:00
nethack.allison
ed4044107d no message 2005-01-04 02:32:22 +00:00
nethack.allison
e7b25a1900 more trunk 3.5 2005-01-02 20:55:41 +00:00
nethack.allison
e9b022d579 housekeeping: mark trunk sources 3.5 (misc) 2005-01-02 17:21:18 +00:00
nethack.allison
66cdbb6f0d housekeeping: mark trunk sources 3.5 (doc) 2005-01-02 17:10:47 +00:00
nethack.allison
e5a3d7ebf5 housekeeping: mark trunk sources 3.5 (dat) 2005-01-02 16:54:29 +00:00
nethack.allison
c146fe012d housekeeping: mark trunk sources 3.5 (include) 2005-01-02 16:50:12 +00:00
nethack.allison
5fa8f73af8 housekeeping: mark trunk sources 3.5 (src) 2005-01-02 16:44:46 +00:00
nethack.allison
1ea5274c10 new year 2005-01-02 13:13:17 +00:00
nethack.allison
10e8c11c0a region player_flags follow-up correction [trunk only] 2005-01-02 13:04:56 +00:00
nethack.allison
a5e12a3519 region boolean field [trunk only]
Since the trunk breaks savefile compatibility anyway,
remove some code that was inappropriately loading a boolean
with multiple values in order to preserve savefile compatibility in 3.4.x

[Note: this patch increments EDITLEVEL rendering existing bones
and save files obsolete]
2004-12-30 15:54:42 +00:00
nethack.allison
019868fd52 minor doorganize() addition
This is a minor addition to Pat's doorganize() patch.

This just allows you to press '?' in the midst of an #adjust command
to see what letters are already in use. It is a PICK_NONE menu for
viewing only, because your actual response to the #adjust must not
be limited to the letters already used. It helps to be able to see
what's already consumed without having to terminate the command,
inventory, then start it again.
2004-12-24 23:30:31 +00:00
nethack.allison
c3f2bbf5e5 add May 2004 trunk patch to the branch
Bug Report:
>> Status of the doppelganger (neutral): Level 13 HP 1433(1433) AC 5.
>> [See the HPs!! ]

Michael:
> I used a debugger and traced this massive hit point growth
> to this line in mon.c, function newcham(). (I watched the mhp
> jump from 58 to 567 with this one calculation!
>> Ah, I see that this problem is fixed in the trunk but still present in
>> the branch. This seems serious/abusive enough to warrant the fix to be
>> applied to the branch too, doesn't it?

Pat:
>      I don't think it's all that important but you're welcome to
> extract and adapt the patch if you like.
2004-12-24 23:18:51 +00:00
nethack.allison
6596b69111 obj->quan bits 2004-12-21 16:40:14 +00:00
nethack.allison
ec5060dc56 spelling bit
...on the word "grammatical" no less.
2004-12-21 15:57:59 +00:00
cohrs
2a2323bab4 replacement meaningless_code patch
I moved the "else" into the comment rather than the suggested removal of
the comment.
2004-12-21 06:27:24 +00:00
nethack.rankin
3f2aa875bb fix monster summoning message
From a bug report:
> If the Summon Nasties monster spell gates in two minions instead of one,
> the message still says "A monster appears from nowhere!"

The code wasn't counting any summoned monsters who had an opposite alignment
to the summoner.  It also assumed that the 10% chance for demon summoning
in Gehennom always yielded exactly one monster even though that can produce
zero or more than one.
2004-12-21 04:27:34 +00:00
nethack.allison
38f9ba9a91 candelabrum wording
On Sat, 18 Dec 2004 14:07:14 +1300, <email deleted> wrote:
> Adding one of several candles to a candelabrum which already has six
> gives an ungrammatical message.
2004-12-20 23:57:02 +00:00