These changes clean up build warnings and allow the resulting "NetHack"
Application icons to be dragged around freely in the Finder, as is expected
for Mac apps.
The earlier patch made sure that bribe() didn't pass an
invalid value to money2mon(). This one changes money2mon() so
that if some other code else does so, reporting the impossible
situation won't be followed by a splitobj panic. Most of this
patch is reformatting though.
1. The switch statement was using the material "GOLD"
rather than GOLD_CLASS.
2. If getobj() had been working for gold when it
came to touchstones, there would have been a
memory leak here because the object returned
would have been from mkgoldobj(). The goldobj
was not being freed anywhere, nor was it being
put on a chain. You also would have had zero
gold after rubbing it on the stone. The intent
was clearly to allow gold since there was a
case in the switch statement.
3. getobj() wasn't working properly for gold
selection here anyway, so this was
not the cause of <Someone>'s gold obj in inventory.
You ended up dropping through to code that
was supposed to print "You cannot verb object."
For touchstones that came out as:
"You cannot rub on the stone gold."
Fixes:
- menu shortcuts implemented
- most windows close on space (except for menus with
PICK_ANY style)
- "hilite_pet" option is implemented
- map scrolling is improved somewhat (it now scrolls if
the char is within 5 spaces from the edge of the map -
configurable by #define CLIPAROUND_MARGIN)
- added 3 winhack-specific options:
win32_map_mode:[tiles|ascii4x6|ascii6x8|ascii8x8
|ascii16x8|ascii7x12|ascii8x12|ascii15x12
|ascii12x16|ascii10x18|fit_to_screen]=20
win32_align_status:[left|top|right|bottom]
win32_align_message:[left|top|right|bottom]
Note: aligning status window to left or right edge of the screen does
not look good.
Duuuh. Of course adding objects already changed the editlevel.
Anyway, here's the fix I was working on. It only matters in a very obscure
situation. (Also, the quest leader still speaks no matter what he's
polymorphed into.)
Duuuh. Of course adding objects already changed the editlevel.
Anyway, here's the fix I was working on. It only matters in a very obscure
situation. (Also, the quest leader still speaks no matter what he's
polymorphed into.)
over the place.
Often they would use
"%ld zorkmid%s", amt, plur(amt)
but not consistently, so some of the hard-coded usage
could result in "1 zorkmids"
This adds the function
currency(long)
to return the name of the currency, either plural
or singular depending on the argument passed to it.
That eliminates the need for the extra %s in the
format string and the use of the plur() macro.
The GOLDOBJ fix I posted back on 1/3 caused "Ix" to access a null pointer
(obj) while generating the total line. This patch fixes the bug I added to
xprname.
Incorporate a slightly cleaned up version of <Someone>'s patch to enable a
"pettype:none" startup option that allows one to start the game without a pet.
If you get interrupted while reading a spellbook and then
the book gets destroyed or you change levels, the object pointer
remembered for the book will be invalid and could accidentally
match one subsequently allocated to some other book. That would
result in "you continue your efforts to memorize the spell" when
starting to read that other book; it would also end up bypassing
the reading difficulty check and reuse the old book's delay counter.
I don't remember who reported this. It was quite some time
ago and I have an abandoned patch dated last March from when I
first started to fix it.
Files patched:
include/extern.h
src/save.c, shk.c, spell.c
This patch, based on code sent to us by <Someone> well over a year ago, addresses
bugs recently resurfaced. Namely, that lava does not generally do anything
to monsters or objects that land in java. Newly renamed minliquid() handles
both water and lava, and new fire_damage() is used similar to water_damage().
This fixes the problem with my monster spell changes which let monsters
summon monsters around you when they don't even know you're around.
The summoned monsters should appear where the monster thinks you are, if
you're invisible or displaced.
I have not prevented them from summoning monsters when you are in a temple,
nor have I prevented them from aggravating monsters several times when you're
out of sight.
Messages should be a little smarter, taking into account number of monsters
and invisibility/displacement.
--Ken A
Players wielding a lance while riding will "joust" monsters
they attack.
Note that monsters don't get pushed into inaccessable tiles such
as walls, doors, iron bars, water, or lava; they stay at the edge.
Further refinements are possible for these cases.
One from <Someone>'s list: there's no particular reason for
the High Priest of Moloch in the temple on the sanctum level in
Gehennom to have his identity concealed when he's detected from
a distance. I also changed the concealment of the Astral Plane
to stop when you're adjacent to the priest, since #chat--among
other things, such as simply entering the temple--provides other
means of identifying which temple it is once you're there.
Files patched:
include/extern.h
src/do_name.c, pager.c
Implement a patch which <Someone> posted on the newsgroup back in September:
"If I had my druthers, daggers would be chosen over other
weapons if there's no missiles or suitable ammo available, and weapons
not designed for throwing wouldn't be chosen at all."
The new routine needed to do something with u.ulevelmax
(which controls whether lost levels can be regained via magic).
This sets it to the new level rather than having it go up or
down the same amount as the user specified in the level change,
which yields a plausible reason for using this command to set
experience level explicitly to its current value.
The new code was using a mixture of spaces and tabs for
indentation; I've totally reformatted it.
This was caused by character set incompatibility between message and map
windows. Apparently, Nethack is using IBM character set (CP 437) but fonts
were create for Windows ANSI codepage. I fixed most of it by changing
character set of the fonts except for the Rogue level. I had to make changes
to src/drawing.c for Rogue level since most of Windows fonts are not capable
of displaying control characters (char. code<0x20)
And of course, disabling IBMGraphics option fixes it all.
If you have an unidentified gray stone in your pack,
you just had to use the 'a'pply command. If it was
a touchstone, it would be included in the list,
otherwise it wouldn't.
This allows any stone to be included in the 'a'pply
command.
Also, adds missing punctuation to the use_stone()
messages.
Also prevents rubbing a stone on itself.
A number of players have complained that Sokoban can be rendered
unsolvable without "creative nethacking" when monsters zap wands of
digging. This patch prevents monsters from selecting wands of
digging in Sokoban.
Note that we can't simply make Sokoban HARDFLOOR, as that causes
problems with the hole generation code.
When potions of full healing got added, they included the
ability to restore lost experience levels when blessed ones are
quaffed. This patch throttles them so that when multiple levels
have been lost, drinking multiple potions can only restore half
of those levels. Also, it prevents them from fixing any level
loss which occurs if you polymorph into a "new man" (or woman
or dwarf, &c, where you can gain or lose up to 2 levels).
This also makes the "golden glow" prayer result be at least
as good as blessed full healing by restoring a lost level instead
of giving 5 extra hit points when you have any recoverable lost
levels pending.
And tangentially related: gaining a level while polymorphed
now gives your current monster form an extra hit die in addition
to the latent boost your normal human/whatever form gets.
Files patched:
src/exper.c, polyself.c, potion.c, pray.c
This adds <Someone>'s lens patch.
This is probably it for me adding in any more user-contributed patches for
3.3.2 (except maybe coin flipping; does anyone object to it?)
--Ken A.
Testing the Astral Plane showed that the summon insects spell was a little
ridiculous with the new monster spellcasting routines. You can easily
have enough priests within range of you that insects are summoned almost every
round. I've made this saner by halving the frequency of the spell. The player
will still probably encounter summoned insects a lot more than before.
Reported to the list 1/5/2001 by <Someone>.
I put stop_occupation calls in all the gaze cases where they were needed.
You might still die, but you'll only get attacked once before you stop waiting.
Patch from <Someone> to the list on 10/01/2001. The changes cause riding a steed
into water to result in a dismount, and, if the steed can't survive in
water, the death of the steed, with the usual pet-death penalties.