Commit Graph

2750 Commits

Author SHA1 Message Date
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
nethack.allison
e004822da3 treat statues and containers alike in follow-up 2004-12-17 13:27:29 +00:00
nethack.allison
78a24e8553 more follow-up for container flags
Set cknown and lknown when identifying possessions at game end.
Clear cknown and lknown when creating bones.
2004-12-17 13:18:04 +00:00
nethack.allison
0a2eec1e6c statue trap triggered by Blind searching
<Someone> wrote:
> Blind, s)earching unknown territory...
>
>   "You find something posing as a statue."
>
> Shouldn't this map_invisible()?
2004-12-17 01:53:35 +00:00
nethack.allison
1c326a95e1 monster order rules
<Someone> wrote:
> From the mkclass() comments:
>
> /*      Assumption #2:  monsters of a given class are presented in ascending
> *                      order of strength.
> */
>
> And monst.c:
>
>  *      Rule #2:        monsters of a given class are presented in ascending
>  *                      order of strength.
>
>  *      Rule #4:        monster subclasses (e.g. giants) should be kept
>  *                      together, unless it violates Rule 2.  NOGEN monsters
>  *                      won't violate Rule 2.
>
> Inspecting my monster-difficulty spoiler, I see the following places
> that these precepts are violated: do they cause potential problems?
> (Insofar as occasionally incorrectly miscalculating the probabilities
> for monster generation is a "problem", that is...)
>
> SPECIES                DIF
> ~~~~~~~~~~~~~~~~~~~~~~ ~~~
> d                  dog   5
> d            large dog   7
> d                dingo   5
>
> d                 warg   8
> d      winter wolf cub   7
> d          winter wolf   9
>
> u        white unicorn   6
> u         gray unicorn   6
> u        black unicorn   6
> u                 pony   4
>
> H          frost giant  13
> H          storm giant  19
> H                ettin  13
>
> P        black pudding  12
> P          green slime   8
>
> S            pit viper   9
> S               python   8
> S                cobra  10
>
> Z         giant zombie   9
> Z                ghoul   5
>
> @                nurse  13
> @              soldier   8
> @             sergeant  10
>
> &         horned devil   9
> &             succubus   8
>
> &               balrog  20
> &            sandestin  15
>
> (I've just realised that these may have already been fixed, and
> waiting on a file-compatibility-breaking release; if so, ignore me :-)
2004-12-17 01:32:59 +00:00
nethack.allison
0843550e37 coaligned unicorn in bones
<Someone> wrote:
>> If the previous character was non-neutral, the unicorn would have
>> started off as hostile.  When a bones file is loaded, I don't think
>> hostiles are made non-hostile, although the reverse is certainly true
>> (pets of the deceased are usually hostile).
>
>  In the general case, they are, or rather their hostility is
>  re-evaluated with respect to the new character; see the peace_minded()
>  call in getlev(). However, co-aligned unicorns always being created
>  peaceful is a special case in makemon(), _not_ part of peace_minded(),
>  so they'd just have the usual chance of being made peaceful or not
>  depending on alignment strength, as for any other co-aligned monster
>  not explicitly declared always peaceful or always hostile.
2004-12-17 00:56:35 +00:00
nethack.allison
422a6f8145 Master of Thieves
<Someone>  wrote:
> The "/* Fix up the quest nemesis */" code in role_init()
> adds M3_WAITFORU but _doesn't_ remove M3_CLOSE;
> since the Master of Thieves as the Rogue Quest Leader is
> defined with that flag, he keeps it when acting as the Tourist
> Quest Nemesis. Thus, when STRAT_WAITFORU
> is cleared by your actions, STRAT_CLOSE may stay in
> place making him stay meditating when another Nemesis
> wouldn't.
2004-12-17 00:33:05 +00:00
nethack.allison
5a893fbe20 another follow-up bit 2004-12-16 10:54:00 +00:00
nethack.allison
6ecd84f031 shrieking monster failed to wake others
<email deleted> wrote on Friday, December 10, 2004:
> I was in a barracks with the soldiers sleeping.  I started fighting one soldier
> and threw a potion of acid on him.  I got the "The soldier shrieks in pain!"
> message, but none of the other soldiers in the barracks woke up.
2004-12-16 01:58:20 +00:00
nethack.allison
46fa48686b follow-up bit 2004-12-16 01:41:27 +00:00
nethack.allison
28a1a41668 shadowed declaration warning
<Someone> complained that his compiler was giving these
warnings:
cmd.c:2119: warning: declaration of `expl' shadows a global declaration
dungeon.c:292: warning: declaration of `rand' shadows a global declaration
exper.c💯 warning: declaration of `exp' shadows a global declaration
files.c:278: warning: declaration of `basename' shadows a global declaration
hack.c:1102: warning: declaration of `expl' shadows a global declaration
pickup.c:2081: warning: declaration of `select' shadows a global declaration
role.c:1060: warning: declaration of `conj' shadows a global declaration
2004-12-16 00:20:54 +00:00
nethack.allison
9bc23ab484 static placement warning
<Someone> complained that his compiler was giving these
two warnings:

weapon.c:835: warning: `static' is not at beginning of declaration
version.c:132: warning: `static' is not at beginning of declaration
2004-12-16 00:08:41 +00:00
nethack.allison
5a433fe0e0 new container flags
[Attention: This patch increments EDITLEVEL in patchlevel.h, rendering all
 previous save and bones files obsolete.]

Here's the first cut at the two recommended flags lknown and cknown.
I've attempted to stay close to Pat's recommendations:
   "Containers ought to have two new flags:  lknown for lock status known,
    and cknown for contents known (ie, `secret').  Formatted box and chest
    descriptions should include locked/unlocked/broken when that is known
    and empty/nonempty (or something like "holds N items") when contents
    are known. The contents indicator would also apply to nonlockable
    containers."

I probably overlooked a place where a flag should be adjusted, but this
should give us a good starting point.

I wasn't sure what to do with the case of the auditory feedback for
magical locking "Click" and "Clunk". The question that came to my mind
was: Should those reveal the locked or unlocked status of a box?
I suppose if you knew the type of wand you were zapping or the spell
you were casting, you could argue that they should.

In the end, I opted for setting lknown right off the zap/cast effect
for anyone playing a Wizard role, and not setting it for anyone else,
thus advancing class differentiation a little bit too.

I haven't checked the cknown results under all flags.menu_style options
at this point, only MENU_FULL.
2004-12-15 23:50:18 +00:00
nethack.allison
10b227e242 upper case correction
Fix for first issue reported in this bug report:

<email deleted>
Sent: Thursday, December 09, 2004 7:13 AM
Subject: Two wrong messages

I would like to report two cosmetic issues:

1. "its gaze is reflected by the invisible [pet]'s shield."
Wrong capitalization.

2. The message given when decapicating an ettin {,zombie} with the Vorpal
Blade fails to mention the second head.  This could be pretty tricky to
fix, but, per <Someone>'s suggestion, the easiest explanation would be
to say that the blade's wielder cuts off both heads at once.
The patch would look similar to:
                         *dmgptr = 2 * mdef->mhp + FATAL_DAMAGE_MODIFIER;
>                        if(mdef->data==&mons[PM_ETTIN]
>                          ||mdef->data==&mons[PM_ETTIN_ZOMBIE)
>                                pline("%s goes through both necks of %s at once like butter!",
>                                      wepdesc, mon_nam(mdef));
>                        else
                         pline(behead_msg[rn2(SIZE(behead_msg))],
                               wepdesc, mon_nam(mdef));
                         otmp->dknown = TRUE;
(and the same for youdefend)
2004-12-09 15:47:45 +00:00
nethack.rankin
39f3bba86d stinking cloud feedback
Add the extra feedback suggested by <Someone> so that being blinded
by moving into a stinking cloud is explicitly pointed out to the user.  It
makes things more verbose but seems reasonable.  You get blinded for 1 turn
with every step, so the message gets repeated each time too, but since you
also get a choking or coughing message on each step it's only a modest
increase in the overall verbosity.
2004-12-04 02:54:02 +00:00
nethack.rankin
b4be660c0a avoid hallucinatory effect on black light as it explodes
From a bug report:  when a black light explodes and triggers
hallucination, its own monster symbol--or warning marker for same--could
be seen changing.  Since nothing is left after it explodes, you shouldn't
hallucinate anything at its location.  Fix by killing it off (so removing
it from the map) before initiating Hallucination.
2004-11-30 04:32:01 +00:00
cohrs
8215976fdb remove an unused variable
gcc w/warnings whined
2004-11-29 22:50:36 +00:00
cohrs
2abfb12144 U1182 - Can drink from sink while engulfed
The same occurred for fountains and drinking surrounding water while
underwater.
I also added a !Levitation check for sinks, like already exists for
fountains.  I cannot believe sinks are taller than an altar, and if you
can't pick up stuff from an alter while levitation, it stands to reason you
cannot drink from a sink then either.
2004-11-29 19:01:31 +00:00
nethack.rankin
384628da9a fix steed eating feedback
<Someone> reported that riding a steed into a magic portal can
give "steed is still eating" message, feedback normally used to explain why
you can't go down stairs.  Rather than preventing portals from activating
in that situation, just force the meal to be finished in order to suppress
the message.  Proper fix is probably to prevent all steed movement while
eating, but that would most likely result in no one ever riding again.
2004-11-27 03:06:21 +00:00
nethack.rankin
00dcc2ae4c fix #U1206 - Quest artifact in WIZKIT file aborts program
Fix the wizard mode crash From a bug report.  Move the WIZKIT
message suppression to a lower level instead of trying to guard against
present and future pline() calls in the wishing code.  The way that was
being handling wasn't suitable for dealing with quest feedback.

     This also includes a couple of additional wishing synonyms.
2004-11-24 02:50:32 +00:00