]> granicus.if.org Git - nethack/log
nethack
21 years agomore status_via_windowport (trunk only)
nethack.allison [Tue, 25 Nov 2003 00:31:19 +0000 (00:31 +0000)]
more status_via_windowport (trunk only)

It was possible for status_finish to get called twice, therefore free() could end up called twice.

Add a macro symbol for the argument to status_initialize().

Adjust some field widths so that there is a little bit of breathing space.

21 years agostatus change followup (trunk only)
nethack.allison [Mon, 24 Nov 2003 03:35:33 +0000 (03:35 +0000)]
status change followup (trunk only)

- Get the HD display working right when Upolyd.
- add a couple of comments.

21 years agoB02003 - spelling of subkeyvalue option in Guidebook
cohrs [Sun, 23 Nov 2003 21:51:15 +0000 (21:51 +0000)]
B02003 - spelling of subkeyvalue option in Guidebook

21 years agoUnix CLI option to set windowtype
cohrs [Sun, 23 Nov 2003 21:36:36 +0000 (21:36 +0000)]
Unix CLI option to set windowtype
Add the ability to select the windowtype on the command line on Unix using
a new -wwindowtype option.  I had thought the proposed patch could core
dump, but the default windowtype selection occurs earlier and ensures
that raw_print will always work.  So, the only problem with the proposed
patch was it didn't move the linux and sco special-case code until after
the selection was made.  That special-case code really should be moved to
to wintty.c, IMO since it doesn't affect other windowtypes.

21 years agolit and unlit corridors
cohrs [Sun, 23 Nov 2003 21:24:16 +0000 (21:24 +0000)]
lit and unlit corridors
The default symbol for lit and unlit corridors are the same.  This makes
the lit_corridor option a no-op where the defaults are used and also means
that using a light scroll/spell a corridor has no obvious effect.  To
address that, I special-cased the lit corridor symbol and change its color
to bright white when its the same symbol as the unlit corridor symbol (I
didn't change the default color since I thought that made the lit corridor
look strange using the windows console interface).

21 years agounused variables
cohrs [Sun, 23 Nov 2003 20:54:41 +0000 (20:54 +0000)]
unused variables
remove unused variables gcc warned about

21 years agoU751 coordinate typos
nethack.allison [Sun, 23 Nov 2003 17:19:33 +0000 (17:19 +0000)]
U751 coordinate typos

apply.c:   if (cansee(rx,ry)) newsym(mtmp->my,mtmp->my);
mon.c:         (distu(mtmp->my, mtmp->my) <= 5) ?
wizard.c:        (distu(mtmp->my, mtmp->my) <= 5) ?

21 years agopaniclog enhancement
nethack.rankin [Sun, 23 Nov 2003 10:01:58 +0000 (10:01 +0000)]
paniclog enhancement

     Include the version number in paniclog entries, so there'll be more
information whenever someone forwards them to us.

21 years agobuild fix (trunk only)
nethack.rankin [Sun, 23 Nov 2003 09:47:34 +0000 (09:47 +0000)]
build fix (trunk only)

     DEC C warned about a problem and that caused make to quit.

|        idx = (++idx % 2);
|........^
|%CC-W-UNDEFVARMOD, In this statement, the expression "idx=(++idx%2)"
|modifies the variable "idx" more than once without an intervening
|sequence point.  This behavior is undefined.

21 years agostatus display - new file (trunk only)
nethack.allison [Sun, 23 Nov 2003 06:50:48 +0000 (06:50 +0000)]
status display - new file (trunk only)

Introduction of a new set of window port status display
routines.  The new routines are conditional on
STATUS_VIA_WINDOWPORT
being defined in config.h. See the experimental section,
where the #define resides for the time being.

21 years agostatus display - port modules (trunk only)
nethack.allison [Sun, 23 Nov 2003 06:47:13 +0000 (06:47 +0000)]
status display - port modules (trunk only)

Introduction of a new set of window port status display
routines.  The new routines are conditional on
STATUS_VIA_WINDOWPORT
being defined in config.h. See the experimental section,
where the #define resides for the time being.

21 years agostatus display - core modules (trunk only)
nethack.allison [Sun, 23 Nov 2003 06:43:17 +0000 (06:43 +0000)]
status display - core modules (trunk only)

Introduction of a new set of window port status display
routines.  The new routines are conditional on
STATUS_VIA_WINDOWPORT
being defined in config.h. See the experimental section,
where the #define resides for the time being.

21 years agomore El-bereth
nethack.rankin [Sat, 22 Nov 2003 04:25:26 +0000 (04:25 +0000)]
more El-bereth

     Make the same change to Guidebook.tex, although it turns out not to
be needed here.

21 years agoEl-bereth
cohrs [Fri, 21 Nov 2003 16:17:03 +0000 (16:17 +0000)]
El-bereth
add a troff control to ensure Elbereth is not hyphenated.

21 years agoredundant "you finish disrobing" messages
nethack.rankin [Fri, 21 Nov 2003 08:08:49 +0000 (08:08 +0000)]
redundant "you finish disrobing" messages

     Just From a bug report:  getting interrupted and then
resuming would sometimes produce two instances of the "You finish" message
(and evidently consumed an extra turn in the process).  I think this is
an old problem and that it's just coincidence that it showed up right after
the patch dealing with avoidance of stale context for 'A'; the interruption
has to occur when there is just one turn left in removing the final item
so doesn't happen very often.

21 years agostethoscope use on corpses & statues (trunk only)
nethack.rankin [Thu, 20 Nov 2003 04:54:39 +0000 (04:54 +0000)]
stethoscope use on corpses & statues (trunk only)

     Prompted by the report that it was possible to check a corpse at an
adjacent spot while levitating:  substantially revamp the handling of
applying a stethoscope to corpses and/or statues.  Aside from the missing
reachability check, the old code suffered from grammar problems when
multiple corpses were present and it didn't try to figure out the gender
of the monster who left the corpse.

     This now lets non-healers check corpses and statues at any time
(previously that only worked for them while hallucinating).  For healers
it gives some new feedback:  when listening to a corpse, they'll be given
a hint if it (actually any corpse in the pile at that location) is going
to revive, and when listening to a statue they'll be given a hint if it
contains any items.  The existing hint when a statue is actually a trap
is still only given to healers.

21 years agocouple of new routines (trunk only)
nethack.rankin [Thu, 20 Nov 2003 04:40:46 +0000 (04:40 +0000)]
couple of new routines (trunk only)

     Groundwork for forthcoming stethoscope fix:  add an object list
traveral routine (there must be something like this already, but I
couldn't find it...) and a couple of timer access routines.

21 years agono rest_on_space in sample config
nethack.allison [Tue, 18 Nov 2003 12:35:49 +0000 (12:35 +0000)]
no rest_on_space in sample config

21 years agono rest_on_space in sample config
nethack.allison [Tue, 18 Nov 2003 12:30:48 +0000 (12:30 +0000)]
no rest_on_space in sample config

21 years agodisenchanter database entry
nethack.allison [Tue, 18 Nov 2003 02:52:32 +0000 (02:52 +0000)]
disenchanter database entry

21 years agomonsters moving other monsters (trunk only)
nethack.allison [Sun, 16 Nov 2003 20:10:30 +0000 (20:10 +0000)]
monsters moving other monsters (trunk only)

For now, the code is conditional on BARGETHROUGH
being defined, while it gets tested further. While behavior is
different with and without BARGETHROUGH defined, savefiles
are the same either way.

After this patch is applied, only the riders have the M3_DISPLACES
bit set, but the Wizard and Vlad probably should too. Any others?

21 years agodatabase pyrolisk entry
nethack.allison [Sun, 16 Nov 2003 16:39:24 +0000 (16:39 +0000)]
database pyrolisk entry

21 years agowin32: opthelp unavailable
nethack.allison [Sun, 16 Nov 2003 04:54:58 +0000 (04:54 +0000)]
win32: opthelp unavailable
Address a recent complaint from <Someone>.

21 years agohealth food store (trunk only)
nethack.allison [Sun, 16 Nov 2003 04:36:27 +0000 (04:36 +0000)]
health food store (trunk only)

21 years agomore Guidebook bits
nethack.allison [Sun, 16 Nov 2003 04:20:29 +0000 (04:20 +0000)]
more Guidebook bits

21 years agono message
nethack.allison [Sun, 16 Nov 2003 03:59:54 +0000 (03:59 +0000)]
no message

21 years agonewsgroup bit
nethack.allison [Sun, 16 Nov 2003 03:00:21 +0000 (03:00 +0000)]
newsgroup bit

21 years agoGuidebook typo
nethack.allison [Sat, 15 Nov 2003 23:26:18 +0000 (23:26 +0000)]
Guidebook typo

Oops, I spotted a typo that I made in the new text.
For the branch, there is no need to re-synch, as the
the generated .txt version is also patched with this patch.

21 years agomore autopickup_exception
nethack.allison [Sat, 15 Nov 2003 23:15:01 +0000 (23:15 +0000)]
more autopickup_exception

An optimization.

Split the patterns into two chains, one for things you want "always picked up", and one for things you want "never picked up".  That way, the
entire exception list isn't being checked twice, once for each type of
check.  The check for things to "always pick up" only checks the
chain at the AP_GRAB index, and the check for things to "never
pick up" only checks the chain at the AP_LEAVE index.

- Also modifies the toggle autopickup '@' message
appropriately for the AUTOPICKUP_EXCEPTIONS build.
(it just tacks on ", with some exceptions" if there are some)

21 years agoGuidebook bits
cohrs [Sat, 15 Nov 2003 21:01:46 +0000 (21:01 +0000)]
Guidebook bits
Guidebook used both "behavior" and "behaviour".  I think this was the
only word not using the US-English spelling.  Also fixed a spacing bit
in Michael's latest rev to the .mn version.

21 years agoFREE_ALL_MEMORY build fix
nethack.allison [Sat, 15 Nov 2003 19:33:36 +0000 (19:33 +0000)]
FREE_ALL_MEMORY build fix

21 years agoautopickup_exceptions docs and tweak
nethack.allison [Sat, 15 Nov 2003 18:47:32 +0000 (18:47 +0000)]
autopickup_exceptions docs and tweak

- document it
-added a goto (shudder) to return to the menu choices after getting
a list of the autopickup_exceptions

21 years agoresuming interrupted 'A' command
nethack.rankin [Sat, 15 Nov 2003 10:25:09 +0000 (10:25 +0000)]
resuming interrupted 'A' command

[ Caveat:  compiles ok on branch code but only play tested on trunk code;
  the do_wear.c diff is a lot different between the two variants and the
  trunk one includes some whitespace cleanup. ]

     <email deleted> reported that having a spellcasting monster
destroy some armor while you're in the midst of using 'A' to take that
armor off would result in a crash.  The problem was actually more
widespread than that:  having a nymph steal worn items (accessories as
well as armor), or a succubus remove them, or being interrupted by monster
activity and then reading a scroll of destroy armor prior to resuming 'A'
could all produce a similar crash.  'A' relied on stale context and could
attempt to manipulate an equipment slot which had become empty, ultimately
leading to an attempt to dereference a null pointer.

     The 'R' command didn't have this problem since any accessory gets
removed immediately.  The 'T' command already had handling for this:
there's only one item to deal with and multi-turn take off only applies
to some of the slots; the donning() check followed by cancel_don() took
care of those.  Only 'A' was vulnerable to the problem and it wouldn't
necessarily need to be interrupted and resumed; loss of the current
multi-turn item or any pending item would be enough--but I'm not sure
whether such item loss could occur without also interrupting the current
activity, so resumption of previous 'A' was probably a requirement for
triggering the crash.

     This makes shield and shirt handling be similar to other types of
armor instead of relying on the fact that none of them need to have any
attribute adjustments when put on or taken off.  However, there are
still assumptions (the `cancelled_don' stuff) that some slots don't have
any eligible items requiring more than a single turn to use; that should
probably be changed.

21 years agoautopickup exceptions
nethack.rankin [Sat, 15 Nov 2003 08:09:18 +0000 (08:09 +0000)]
autopickup exceptions

     External names longer than 31 characters trigger a compiler warning
for me about truncation, and that causes make to quit.  So shorten the
two long names.  Also, call the cleanup routine for the FREE_ALL_MEMORY
configuration.

21 years agoautopickup_exceptions enhancement
nethack.allison [Sat, 15 Nov 2003 02:49:07 +0000 (02:49 +0000)]
autopickup_exceptions enhancement

An enhancement to the original to allow
two types of exceptions:
      always pickup
      never pickup

To specify "never pickup", begin the pattern string with '>'
which is NetHack's down direction symbol (for "leave it down")

To specify "always pickup", begin the pattern string with '<'
which is NetHack's up direction symbol.

For example, to pick up all arrows, regardless of the pickup_
types setting:
autopickup_exception = "<*arrows"

21 years agoautopickup_exceptions build followup
nethack.allison [Sat, 15 Nov 2003 01:17:44 +0000 (01:17 +0000)]
autopickup_exceptions build followup

- correct an obsolete, incorrect comment

21 years agoautopickup_exceptions build option
nethack.allison [Sat, 15 Nov 2003 01:05:32 +0000 (01:05 +0000)]
autopickup_exceptions build option

Add config.h experimental option AUTOPICKUP_EXCEPTIONS.

It's an interface-only change which allows you to add lines to your
config file to selectively avoid autopickup of items based on their
text description that is displayed when you pick them up. It does
it by matching a pattern against the xname singular return value.

For example:

autopickup_exception = "*corpse" will avoid picking up corpses, even if
food (%) is in your pickup_types.

autopickup_exception = "*brown*"
will avoid picking up any brown items (why, I do not know)

autopickup_exception = "*loadstone"
will NOT avoid picking up loadstones, unless they are already
identified, because the xname string will be "gray stone", so no
match there.

The matching has no knowledge of in-game objects, it is just
a text pattern match, thus it is an interface change, not a gameplay
change, and it is meant as a convenience for players.

21 years agowin32tty: Fix an early error message crash
nethack.allison [Sat, 15 Nov 2003 00:38:59 +0000 (00:38 +0000)]
win32tty: Fix an early error message crash

21 years agono message
nethack.allison [Sat, 15 Nov 2003 00:23:15 +0000 (00:23 +0000)]
no message

21 years agoB01004 No mimic corpse effect on pet (trunk only)
nethack.allison [Wed, 12 Nov 2003 03:28:26 +0000 (03:28 +0000)]
B01004 No mimic corpse effect on pet (trunk only)

Make a mimic effect that lasts only as long as the
pet is still consuming the corpse.

21 years agodeafness fix (trunk only)
nethack.rankin [Mon, 10 Nov 2003 08:09:15 +0000 (08:09 +0000)]
deafness fix (trunk only)

     Evidently the trunk code isn't undergoing much testing lately;
"you hear <blah>" messages have been broken for a couple of weeks now.

21 years agosilver wands followup
nethack.allison [Mon, 10 Nov 2003 01:39:38 +0000 (01:39 +0000)]
silver wands followup

There was code higher up that could destroy the obj,
so this eliminates any risk of trying to dereference a
bad pointer in the deferred silver message by saving
a copy of the name earlier on.

21 years agoB01001 - bold menu_heading support
cohrs [Mon, 10 Nov 2003 00:15:47 +0000 (00:15 +0000)]
B01001 - bold menu_heading support
Not really a bug, but when TEXTCOLOR is defined, wintty can display menu
headings is bold upon request, but didn't.

21 years agosilver wands
nethack.allison [Sun, 9 Nov 2003 23:38:33 +0000 (23:38 +0000)]
silver wands

From the newsgroup:
> <email deleted> (<Someone>)
> Newsgroups: rec.games.roguelike.nethack
> Subject: Question: Why don't silver wands give silver damage?
> Date: 9 Nov 2003 09:18:50 -0800
> Organization: http://groups.google.com
> Lines: 7
> <email deleted>
>
> I had a character cornered by a werejackal the other day.  I'm not too
> bothered by the death but why didn't the silver wand he desperately
> wielded in his final moments do extra damage?  I mean, silver rings do
> so why not wands?  I realise this is a pretty minor problem since not
> that many people will be going around wielding wands, but still.
>
>  ~<Someone>

There was a code path for objects such as wands that avoided
all the silver checks. Now fixed.

21 years agoflag adjustment followup (trunk only)
nethack.allison [Sun, 9 Nov 2003 16:05:51 +0000 (16:05 +0000)]
flag adjustment followup (trunk only)

21 years agoflag adjustments (trunk only)
nethack.allison [Sun, 9 Nov 2003 11:48:38 +0000 (11:48 +0000)]
flag adjustments (trunk only)

Move all system or port specific flags to sysflags which is used only if
SYSFLAGS is defined, and leave everything else in flags unconditional.

21 years agoAcknowledge Schroedinger's cat (trunk only)
nethack.allison [Fri, 7 Nov 2003 18:42:59 +0000 (18:42 +0000)]
Acknowledge Schroedinger's cat (trunk only)

Acknowledge Schroedinger's cat at end of game.
- determine cat's status:
      - give points for the animal which accompanied
        you.
     or
     - include dead cat in the box contents.

Schroedinger's cat is the only ordinary creature
that could actually ascend with you.

This patch doesn't deal with any supernatural creatures
including:
 - djinn in bottles
 - ghosts in bottles

21 years agoPOSIX compliance for get_saved_games().
warwick [Fri, 7 Nov 2003 04:47:26 +0000 (04:47 +0000)]
POSIX compliance for get_saved_games().

21 years agomon name buffers
nethack.allison [Thu, 6 Nov 2003 02:16:22 +0000 (02:16 +0000)]
mon name buffers

Follow suit with what <Someone> did for the object name buffers,
so that this sort of statement can work correctly:

pline("%s hits %s.", Monnam(mtmp), mon_nam(mtmp2));

21 years agoU716 - trapped monster switching weapons
cohrs [Wed, 5 Nov 2003 15:47:50 +0000 (15:47 +0000)]
U716 - trapped monster switching weapons
A trapped monster with one step between you and the monster (@.@) would
repeatedly switch between a ranged and hand-to-hand weapon if carrying both.
Since the monster switches each turn, it will not make ranged attacks.
Modified the test in dochug to prefer a ranged weapon in this case.

21 years agowiztele follow-up
nethack.allison [Tue, 4 Nov 2003 11:49:09 +0000 (11:49 +0000)]
wiztele follow-up

21 years agoU716 - trapped monster switching weapons
cohrs [Tue, 4 Nov 2003 05:52:54 +0000 (05:52 +0000)]
U716 - trapped monster switching weapons
A trapped monster with one step between you and the monster (@.@) would
repeatedly switch between a ranged and hand-to-hand weapon if carrying both.
Since the monster switches each turn, it will not make ranged attacks.
Modified the test in dochug to prefer a ranged weapon in this case.

21 years agowizmode level teleport
nethack.allison [Sun, 2 Nov 2003 18:47:50 +0000 (18:47 +0000)]
wizmode level teleport

<Someone> wrote:
> The new ^V wizmode menu is nice, but it is rather misleading; most of
> the levels it lists are "you can't get there from here". Would it be
> possible either to make it only list levels that can be reached
> directly, or alternatively to allow you to reach the ones you
> ordinarily couldn't (maybe by forcefully changing u.uz.dnum to yoink
> you into the right branch, and even summarily issuing you with an
> Amulet if you ask to teleport to the endgame).[...]; being able to bamf
> quickly to Minetown from DL 1, for example, would be damn useful in > testing stuff.

Allow fairly free roaming of the dungeon via the wizard mode teleport menu.

21 years ago<Someone> wrote:
nethack.allison [Sun, 2 Nov 2003 17:59:22 +0000 (17:59 +0000)]
<Someone> wrote:
> The new ^V wizmode menu is nice, but it is rather misleading; most of
> the levels it lists are "you can't get there from here". Would it be
> possible either to make it only list levels that can be reached
> directly, or alternatively to allow you to reach the ones you
> ordinarily couldn't (maybe by forcefully changing u.uz.dnum to yoink
> you into the right branch, and even summarily issuing you with an
> Amulet if you ask to teleport to the endgame).[...]; being able to bamf
> quickly to Minetown from DL 1, for example, would be damn useful in > testing stuff.

Allow fairly free roaming of the dungeon via the wizard mode teleport menu.

21 years agowin32tty hung NetHack fix
nethack.allison [Sat, 1 Nov 2003 23:56:24 +0000 (23:56 +0000)]
win32tty hung NetHack fix

If a Key-down event didn't meet the expected criteria,
the event was ignored in the "peek" loop, but it was
never removed from the input queue either, so it
remained at the top of the queue.

It isn't clear if this fixes the dedicated arrow keys
hanging, but if those were resulting in strange
event values too, it just might.

21 years agoB01001 fix: corpse grammar
nethack.allison [Sat, 1 Nov 2003 22:05:44 +0000 (22:05 +0000)]
B01001 fix: corpse grammar

<Someone> wrote:
> You start bashing monsters with your 2 cockatrice corpses.
> You hit the foo with the cockatrice corpse (note singular).
> The foo is slowing down. The foo turns to stone.
> Also: Your cockatrice corpses rots away.

It appears that vtense() has a problem recognizing "corpses"
as plural.  This doesn't fix that, it just switches to using
otense() in this particular case.

21 years agosleeping shopkeeper
cohrs [Thu, 30 Oct 2003 04:31:05 +0000 (04:31 +0000)]
sleeping shopkeeper
Pat verified something I had wondered about, that various tests of mcanmove
in shk.c should have also been testing mcanmove.  There may well be other
tests of mcanmove in other files that need fixing.

21 years agodebug mode monster creation [trunk only]
nethack.allison [Thu, 30 Oct 2003 02:52:29 +0000 (02:52 +0000)]
debug mode monster creation [trunk only]

Allow '*' with control-g to create a random monster species,
or several different monster species if a multi count was specified
on the control-g command.

21 years agosleeping monster responding to attacks
cohrs [Thu, 30 Oct 2003 02:40:45 +0000 (02:40 +0000)]
sleeping monster responding to attacks
when msleeping is set, mcanmove is not cleared.  mcanmove applies only to
mfrozen.  So, mattackm needs to test both mcanmove and msleeping.
mattackm will not wake the defender if the attack misses.

21 years agoU719: grayswandir and exploding black lights
nethack.allison [Wed, 29 Oct 2003 13:03:23 +0000 (13:03 +0000)]
U719:  grayswandir and exploding black lights

<email deleted> wrote:
> When wielding greyswander and a black light explodes, the
> message is still "You are freaked by a blast of kaleidoscopic
> light!" giving no indication that you are immune to
> hallucination. Maybe something like "You see a blast of color,
> but seem unaffected" would be more appropriate?

return the changed status back to the caller from
make_hallucinated().

21 years agohealer follow-up bit (trunk only)
nethack.allison [Tue, 28 Oct 2003 12:49:11 +0000 (12:49 +0000)]
healer follow-up bit (trunk only)

There is a new Deaf attrib to consider in the trunk.

21 years agoce fix (from <Someone>)
nethack.allison [Tue, 28 Oct 2003 12:19:26 +0000 (12:19 +0000)]
ce fix (from <Someone>)

set interject() and interject_assistance() to NOP for Windows CE port.

21 years agodisplay bit for spellbook gift (trunk only)
nethack.rankin [Tue, 28 Oct 2003 06:55:18 +0000 (06:55 +0000)]
display bit for spellbook gift (trunk only)

     From the newsgroup:  when invisible and unable to see invisible,
if successful prayer results in being given a spellbook you'll get the
message "an object appears at your feet" but the spellbook won't show on
the map.  Add a newsym() to force its location to be updated.  (I didn't
try to figure out why spellbooks use place_object() when all other divine
gifts use dropy() but that's why only this case has the display glitch.)

     This also fixes up the message vs map update sequencing for a couple
of other "at your feet" cases so that all of them use the same ordering:
first the message is given, then the object drops.

[Timing is the only reason not to put this simple change into 3.4.3.]

21 years agotin variety followup 2 (trunk only)
nethack.allison [Tue, 28 Oct 2003 04:36:24 +0000 (04:36 +0000)]
tin variety followup 2 (trunk only)

21 years agotin variety followup (trunk only)
nethack.allison [Tue, 28 Oct 2003 04:14:01 +0000 (04:14 +0000)]
tin variety followup (trunk only)

21 years agotin variety (trunk only)
nethack.allison [Tue, 28 Oct 2003 03:45:49 +0000 (03:45 +0000)]
tin variety (trunk only)

- store the variety of tin at tin creation time
  rather than at tin-opening time (as a negative
  value in spe just as homemade was; spinach
   is still spe 1)

Allow wishing for a particular variety of tin
from the tin variety list:
"deep fried", "boiled","broiled","candied"
"dried", "french fried", "homemade"
"pickled", "pureed", "rotten", "sauteed"
"smoked", "soup made from", "stir fried",
"szechuan"
Example: "tin of soup made from orc"

non-debug player could randomly fail on the
variety specification 1 in 4 times

21 years agowin32tty: fix extended commands
nethack.allison [Mon, 27 Oct 2003 01:14:02 +0000 (01:14 +0000)]
win32tty: fix extended commands

The autocompletion was working, but you couldn't tell
because the text was overwritten with blanks.  This was
a recent glitch created during fix for other cursor problems.

21 years agocrash on hangup following
cohrs [Mon, 27 Oct 2003 00:59:54 +0000 (00:59 +0000)]
crash on hangup following
restore the exit_nhwindows call, but in the right place.  without this,
the window inteface doesn't get a chance o shut down.

21 years agocrash on hangup
cohrs [Mon, 27 Oct 2003 00:39:45 +0000 (00:39 +0000)]
crash on hangup
the message history saver needs the windows to stick around until save
is completed.  This usually the case, but end_of_input() was calling
exit_nhwindows prematurely.  This is actually an old bug (calling it early,
but wasn't harmful until other recent changes).

21 years agosaving msg history glitch (trunk only)
nethack.allison [Mon, 27 Oct 2003 00:23:22 +0000 (00:23 +0000)]
saving msg history glitch (trunk only)

<Someone> discovered that it is possible to
have wins[WIN_MESSAGE] be null during
a hangup, not sure why yet.

Put a guard in to prevent de-referencing a null pointer.

21 years agomore win32tty clean-up
nethack.allison [Sun, 26 Oct 2003 15:56:50 +0000 (15:56 +0000)]
more win32tty clean-up

This brings things much closer to correct operation (I hope).
- The shift to only moving the cursor on input (<Someone>'s
changes) had a lot of complications, among them was
that sometimes, there is no more input. When the program was
exiting, or bombing the cursor synch never got done, so the
final messages could end up strewn any place the cursor
happened to be dwelling.

- There were two competing output systems in use: the
wintty stuff for the game, and the msmsg and error stuff
used by the sys/share/pcsys, sys/share/pctty, and
sys/share/pcunix routines.  Those were meant to mimic
output to stdout, where stuff just got sent to a sequential
display.  Over time, there were calls mixed in that depended
on the cursor tracked stuff from the core game, so you
really couldn't be sure where things were going to display.
It wasn't as much of an issue before, because the cursor
really did get moved around as expected. Everything
now ends up in the same output system.

- I even found a use of the real putchar() because
sys/share/pcunix didn't #include wintty.h the same
as the other files, and the macro never got defined.
Who knows where that character was being put -
the game certainly couldn't track it.

While everything I knew to be wrong yesterday is
now working, there may be some other glitches
lurking that I haven't discovered yet.

Please: test, test, test.

21 years agopatchevel.h comment
nethack.rankin [Sun, 26 Oct 2003 06:04:04 +0000 (06:04 +0000)]
patchevel.h comment

21 years agoclass differentiation followup
nethack.allison [Sat, 25 Oct 2003 22:37:18 +0000 (22:37 +0000)]
class differentiation followup

> Healers pick up on the fact that a wand of undead turning
> revived a creature.
...if a vital piece of code isn't accidentally left out

21 years agoclass differentiation bit (trunk only)
nethack.allison [Sat, 25 Oct 2003 22:20:24 +0000 (22:20 +0000)]
class differentiation bit (trunk only)

Healers pick up on the fact that a wand of undead turning
revived a creature.

21 years agochanging level workaround (C341-13)
cohrs [Sat, 25 Oct 2003 19:28:54 +0000 (19:28 +0000)]
changing level workaround (C341-13)
Use a new flush_screen(-1) call to toggle 3rd screen update in goto_level.
This keeps the 3rd screen state unchanged, no matter what happens at higher
levels, ensures the map window cursor stays on the hero, ensures the
hero's showrace colors remains bright white, and so on.

21 years agohandheld lockfile left around fix (from <Someone>)
nethack.allison [Sat, 25 Oct 2003 18:32:30 +0000 (18:32 +0000)]
handheld lockfile left around fix (from <Someone>)

21 years agopatchlevel.h sync between branch and core
nethack.allison [Sat, 25 Oct 2003 15:20:04 +0000 (15:20 +0000)]
patchlevel.h sync between branch and core

21 years agowin32gui build fix (from <Someone>)
nethack.allison [Sat, 25 Oct 2003 14:45:51 +0000 (14:45 +0000)]
win32gui build fix (from <Someone>)

<Someone> wrote:
> Using the MCVS IDE I couldn't compile NetHack any longer, due to a
> misplaced #endif and a library not included in the DSP file.
> Here's a patch for both problems for 3.5.0.
> The 3.4.x verison only suffered from the first problem. Patch also
> attached.

21 years agomore win32tty fixes
nethack.allison [Sat, 25 Oct 2003 04:02:24 +0000 (04:02 +0000)]
more win32tty fixes

There were still some significant startup message problems
with win32tty.

I've spent a lot of time in the debugger tracing through them all.
I think I've got them all worked out now, certainly the ones that
I was aware of.  There may be some I haven't discovered.
Testing welcomed of course!

This patch also attempts to diagnose the error where someone tries
to execute NetHack directly out of a zip file, and provide
them with a (hopefully) helpful message similar to what we
might end up telling them if they wrote in.  If you want
to test that part, you can comment out the line in the
Makefile that adds "dungeon" to nhdat, and delete the nhdat
in your binary and src directories, and "make install".
Then add the value of your TEMP environment variable as a
DATADIR statement in defaults.nh (here's mine):
DATADIR=C:\DOCUME~1\ALLISO~1\LOCALS~1\Temp
The diagnostic code engages if the game fails to open
dungeon. It then checks to see if it the game dir is the
TEMP directory for your system, and if so it prints the
message.

21 years agofixes catchup
nethack.allison [Sat, 25 Oct 2003 03:59:09 +0000 (03:59 +0000)]
fixes catchup

21 years agowin32tty: startup msg cleanup
nethack.allison [Fri, 24 Oct 2003 15:15:44 +0000 (15:15 +0000)]
win32tty: startup msg cleanup

the win32 cursor restriction stuff messed up any
messages displayed during abnormal start conditions
where the window system never got initialized properly.
among them:
- messages relating to lock files or games in progress
- dungeon errors
- early panic messages

21 years agostarting pet identification
nethack.allison [Fri, 24 Oct 2003 12:15:46 +0000 (12:15 +0000)]
starting pet identification
make it possible for the code to recognize your starting pet throughout the
game via is_starting_pet(mon) macro.

21 years agowere followup
nethack.allison [Fri, 24 Oct 2003 12:06:13 +0000 (12:06 +0000)]
were followup

"Rat's appear" -> "Rats appear"
Use makeplural rather than s_suffix.

21 years agostarting pet identification
nethack.allison [Fri, 24 Oct 2003 11:52:49 +0000 (11:52 +0000)]
starting pet identification

Make it possible to identify your starting pet throughout the game
via is_starting_pet(mon) macro.

21 years agocvsfix
nethack.allison [Fri, 24 Oct 2003 10:20:00 +0000 (10:20 +0000)]
cvsfix

My cvs tree had the correct code. When I did a cvs update
it didn't pull anything down. When I deleted the include/extern.h
file from my cvs tree, and did an update with the "get the clean copy"
switch, it pulled down an extern.h that was indeed missing the
prototype.  In all cases my local cvs reported that it was 1.130.
I applied the prototype change to the cvs copy, did a cvs diff
to ensure nothing else was out of sync and re-committed.

21 years agostone to flesh bit
cohrs [Fri, 24 Oct 2003 05:58:39 +0000 (05:58 +0000)]
stone to flesh bit
<Someone> suggested and I agree (mostly, if you're a Monk poly'd to a
strict carnivore, I think it should still smell delicious):
> "You smell the odor of meat." (if herbivorous)
> "You smell a delicious smell." (otherwise)
> I think that if your character is a monk or still veg(itari)an, you should
> also get the first message. Even if you're not intentionally vegitarian,
> the first message is still appropriate.

21 years agoanother conflict abuse
cohrs [Fri, 24 Oct 2003 01:59:48 +0000 (01:59 +0000)]
another conflict abuse
Reported a really long time ago (June 2001) by <Someone>:
 - stand on the upstairs and engrave Elbereth with a /oFire
 - create Demogorgon and e.g. a tame dragon
 - cause conflict
 - Dragon will kill Demogorgon and Demogorgon will never ever attack Dragon.
All monsters could still attack Demogorgon without response via fightm().
Modified fightm() to include a bit of code in m_move and dog_move, allowing
response to an attack.  Testing this in action, Demogorgon still usually
did things detrimental to the player, mostly summoning nasty monsters.

21 years agobuglist: polymorphed into quantum mechanic
nethack.allison [Fri, 24 Oct 2003 01:54:34 +0000 (01:54 +0000)]
buglist: polymorphed into quantum mechanic
<email deleted> wrote:
- When polymorphed into a quantum mechanic, it is possible to jump in
  the water on a no teleport level and instinctively teleport.
- When an engulfing monster is teleported away on a no teleport level
  when the hero is polymorphed into a quantum mechanic, there is no
  message displayed like "You are no longer engulfed!" because
  u_teleport_mon is passed FALSE for give feedback. But maybe this is
  for a good reason...

21 years ago<Someone>'s were_summon rules
nethack.allison [Thu, 23 Oct 2003 12:13:21 +0000 (12:13 +0000)]
<Someone>'s were_summon rules

>Hemmed in by one invisible wererat?
><Someone>: Should I feel hemmed in if I can see that a wererat summons
>zero rats? Can the invisible wererat hem me in all by itself? And
>even if it had summoned anything, wouldn't a different message had
>been clearer (for isntance, "Rats appear around you!"); after all,
>I could see *what* was hemming me in.
>I agree that the current messages (and even the ones aspired to by the
>comment) are non-ideal.

<Someone>'s suggested set-up:
Seen summoner, seen help    : "The wererat summons help!"
Seen summoner, unseen help: "The wererat summons help! You feel hemmed in."
Seen summoner, no help: "The wererat summons help! But none comes."
Unseen summoner, seen help: "(A rat appears|Rats appear) from
nowhere!"
Unseen summoner, unseen help: "You feel hemmed in."
Unseen summoner, no help: No message.

21 years agocharging tweak
nethack.rankin [Thu, 23 Oct 2003 07:41:24 +0000 (07:41 +0000)]
charging tweak

     Some newsgroup discussion recently pointed out that source comments
for scrolls of charging didn't match the actual charge increase performed
by that magic.  This bumps the values a little bit
 (uncursed: comment said 5 to 15, actual amount was 10 to 14, now 10 to 20;
  blessed: comment said 10 to 25, actual amount was 16 to 25, now 15 to 30)
and adjusts the comments to match the code.

21 years agoweapon skill tweak
nethack.rankin [Thu, 23 Oct 2003 07:12:03 +0000 (07:12 +0000)]
weapon skill tweak

     Barbarians start with either a two-handed sword and an ordinary axe
or a battle-axe and a short sword.  The latter combination was the only
one among all the roles where the player couldn't enhance skills for
starting weapons to expert.  Fix that by allowing barbarians to become
expert in short swords; reduce potential capability with pick-axe/mattock
from expert down to skilled to compensate for the increase.

     This also addresses an earlier complaint that monks are no better in
martial arts than samurai even though the latter have lots of choices for
good weapon skills.  Reduce the martial arts limit on samurai from grand
master to just master; likewise with bare-handed combat for barbarians
and cavemen.  In this case there didn't seem to be any need to bump the
limit on anything else as compensation.

     I still think non-rogues shouldn't be allowed to become expert in
daggers (which means that ranger and valkyrie starting gear would need
to change slightly) due to how powerful throwing them is, but I haven't
included that change here.

     For the skills which have lower upper limits than before, existing
characters who have #enhanced their skills high enough with the previous
code will retain their higher-than-max skill ranking with the new code.
Characters who have exercised enough to advance to the old max but
haven't done so yet will be limited to the new max.

21 years agoinappropriate lit_corridor check
cohrs [Thu, 23 Oct 2003 06:49:22 +0000 (06:49 +0000)]
inappropriate lit_corridor check
To reproduce: disable lit_corridor, enter a corridor, read a scroll of
light, then read a cursed scroll of light.  The corridor won't darken again.
A test of flags.lit_corridor in newsym was at fault.  I'm guessing this was
never noticed because lit_corridor is on by default on Windows and the
default lit and unlit corridor symbols are the same on most other platforms.

21 years agolex update
nethack.rankin [Thu, 23 Oct 2003 06:30:43 +0000 (06:30 +0000)]
lex update

     This is a case where a one-line change to the scanner source produces
a large diff in the generated C code.

21 years agoHalf_physical_damage 08
nethack.allison [Thu, 23 Oct 2003 04:53:46 +0000 (04:53 +0000)]
Half_physical_damage 08

missed a spot

21 years agosupport engraving in blood in special level files
cohrs [Thu, 23 Oct 2003 02:36:23 +0000 (02:36 +0000)]
support engraving in blood in special level files
the file format and sp_lev.c supported it, but the level parser didn't

21 years agobuglist: cutting Shopkeeper the long worm
cohrs [Thu, 23 Oct 2003 02:30:46 +0000 (02:30 +0000)]
buglist: cutting Shopkeeper the long worm
Cutting a shopkeeper poly'd as a long worm would generate strange messages
and could result in a crash.  cutworm didn't deal with all the intricacies
of duplicating a monster.   Fixed by changing cutworm() to use clone_mon()
to do most of its dirty work.  It seems to me that without this change,
cutting a tame long worm could also have similar bad effects.
Other side effects of this change:
- clone_mon now takes x,y coordinates, 0,0 results in previous behavior
- clone_mon no longer always makes cloned monsters tame/peaceful if player
  caused the clone, using the same formula previously in cutworm.  Someone
  else may wish to tweak this for gremlins.
- clone_mon will christen the new mon with the old shopkeeper's name, even
  though clones are never shopkeepers (game can't handle 2 for a shop)
- cutworm can now be called during conflict or pet combat, although I
  added no such calls (yet)

21 years agoextra control characters in panic messages
cohrs [Thu, 23 Oct 2003 01:30:05 +0000 (01:30 +0000)]
extra control characters in panic messages
I noticed a few panic messages contained newlines, and one included a naked
carriage return.  panic() adds a newline itself, and also generally ensures
the message will be on a new line (the initial "oops" ensures the message
itself will be on a new lines).  This patch removes the unneeded characters.

21 years agogcc warning bit
cohrs [Thu, 23 Oct 2003 01:24:20 +0000 (01:24 +0000)]
gcc warning bit

21 years agoHalf_physical_damage 07
nethack.allison [Wed, 22 Oct 2003 23:05:24 +0000 (23:05 +0000)]
Half_physical_damage 07

It is not physical damage if:
1. it already qualifies for some other special type of damage
   for which a special resistance already exists in the game
   including: cold, fire, shock, and acid. Note that fire is
   extended to include all forms of burning, even boiling water
   since that is already dealt with by fire resistance, and in
   most or all cases is caused by fire.
2. it doesn't leave a mark. Marks include destruction of, or
   damage to, an internal organ (including the brain),
   lacerations, bruises, crushed body parts, bleeding.

Current exceptions to the rule (already existing):
- holy water burning chaotic ("it burns like acid") is physical damage.
- unholy water burning lawful is physical damage.

21 years agoHalf_physical_damage 06
nethack.allison [Wed, 22 Oct 2003 03:02:11 +0000 (03:02 +0000)]
Half_physical_damage 06

- [fixed in trunk] Alchemical explosion
- [fixed in trunk] Artifacts' blasting
- [fixed in trunk] Boiling/freezing potions
- [fixed in trunk] Chest/door/tin traps
- [fixed in trunk] Falling rocks/boulders (trap, digging, scroll of earth)
- [fixed in trunk] Mixing water and acid
- [fixed in trunk] Thrown potion (acid)

This is my last patch on this today.