- 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
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.
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.
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
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.
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)
<Someone> wrote:
- You currently appear to be able to specify '~' and have it try
to detect monsters (though it won't detect any long worms)
Show the entire worm when specifying either '~' or 'w' now.
Allow migrated objects to break on arrival. Added code to obj_delivery to
cause this, along with a flag to keep breakage from occurring. The new
flag isn't used yet, because all the current object migration involve
objects that were moving/dropping. To help make this change, rloco now
returns whether the object was placed or not, so caller can know if an obj
pointer is still valid or not.
Making the breakage messages for MIGR_NEAR_PLAYER objects show up after the
new level is displayed required some effort (rather than while the old level
was still displayed, which was confusing), due to the needs of goto_level.
- obj_delivery now has 2 passes, one for before player arrives, another after,
allowing the two cases to be treated differently
- goto_level calls obj_delivery twice (run_timers is not called twice,
since the run required before the level is displayed will have already run
any timers on migrating object)
- kill_genocided_monsters now kills eggs on the migrating_objs list too
20000922 Water should flow into pits from broken WoD, or DoE.
This addresses the Wand of Digging part, but does not
do anything about Drum of Earthquake.
add a new melt_ice_away timer for ice created via zapping
a wand/spell of cold.
Some follow-up adjustments to the length of time before
the ice melts may be necessary. Ideally, I'd like to
have it so that the shorter the length of time since
the ice was created, the lesser the chance that it will
melt out from under you. Likewise, the longer it has
been, the more risky it will be to venture onto it.
At the moment, however, each spot of ice is just
getting a somewhat random time always greater
than 50, which is less than ideal.
Reported a while back, a (stonable) hiding monster will hide at a location
containing only a cockatrice corpse. While it would be interesting to
allow monsters to try, and stone themselves as a result, I chose the
simpler fix which is to not have monsters hide in such situations. I found
the hiding code was duplicated in several places, so I moved it into a new
hideunder() function that works for both the hero and monsters.
On September 11, 2003 "<Someone>" wrote:
> When we're going to have a different save file format, could
> the last messages in the message history be saved as well, so
> ^P would work the same before and after saving (possibly
> including a few less messages to make room for the startup
> messages?).
This seemed like a reasonable request. This patch:
- adds the core support required.
- adds the tty supporting routines.
Introduce a new set of functions to manage delayed killers in the trunk, used
in addressing the various reports of delayed killer confusion. Since existing
delayed killers are related to player properties, the delayed killers are
keyed by uprop indexes. I did this to avoid adding yet another set of
similar identifiers.
- the new delayed_killer() is used for stoning, sliming, sickness, and
delayed self-genocide while polymorphed. Some other timed events don't
use it (and didn't use the old delayed_killer variable) because they
use a fixed message when the timeout occurs.
- A new data structure, struct kinfo, is used to track both delayed and
immediate killers. This encapsulates all the info involved with
identifying a killer. The structure contains a buffer, which subsumes the
old killer_buf and several other buffers that didn't/couldn't use killer_buf.
- the killer list is saved and restored as part of the game state.
- the special case of usick_cause was removed and a delayed killer list
entry is now used in its place
- common code dealing with (un)sliming is moved to a new make_slimed function
- attempted to update all make dependencies for new end.c -> lev.h
dependency, sorry if I messed any up
This patch introduces a change to yname() and Yname2() that avoids the
possessive "your" for the hero's normal, fully identified artifacts.
Quest artifacts still get the possessive, as do all other objects and all
objects not in the hero's possession. shk_your()/Shk_Your() are used in
many places with a specific, generalized name for the object, so I didn't
introduce the artifact behavior there, although I did change them to append
a space, which simplified some other code. Through added use of yname(),
there may be some places that used to just say "corpse" that will now be more
descriptive via yname()'s use of cxname(). I'm sure <Someone> will point
out any such places that are too onerous, although nothing obviously is.
I took the opportunity to inspect many uses of "your" and even Your(). Two
new functions are also introduced, yobjnam() and Yobjnam2(), which work
like aobjnam() and yname() combined, because I found that many uses of
aobjnam() were preceeded by "your" and I couldn't generally provide the
desired behavior for artifacts (or future artifacts) without a combined
function. In some cases, this change allowed better sharing of code.
rust_dmg() still takes a string as input which is sometimes initialized
from xname() and often prepends "your" to it. Currently, this isn't a
problem since there currently are no normal, armor artifacts. If/when any
are introduced, rust_dmg() will need to be addressed.
The patch is for the trunk only. A lot of research was required and I
didn't feel the upside was there for repeating it in the 3.4.3 branch.
<email deleted> wrote:
> If more monsters fall through a trap door than can fit on the
> level below, when you go down the stairs, you get the following
> message:
> "Program in disorder - perhaps you'd better #quit.
> rloc(): couldn't relocate monster"
> This message seems to appear once for every monster-too-many that
> fell through the hole. I originally found this while
> intentionally completely filling a level with black puddings
> (there was a trap door I didn't know about). I also confirmed it
> in a wiz-mode test using gremlins and water.
[confirmed: moveloop -> deferred_goto -> goto_level ->
losedogs -> mon_arrive -> rloc -> impossible]
This patch:
- causes rloc() to return TRUE if successful,
or FALSE if it wasn't.
- adds code to mon_arrive() in dog.c to deal with
the failed rloc()
- allows the x,y parameters to mkcorpstat() to
be 0,0 in order to trigger random placement of the
corpse on the level
- if you define DEBUG_MIGRATING_MONS when you build cmd.c
then you'll have a debug-mode command #migratemons to
store the number of random monsters that you specify
on the migrating monsters chain.
> NetHack feedback form submitted by
> <email deleted>
> on Tuesday, September 9, 2003 at 06:41:34
> Hi, Just thought I'd point out a sort of inappropriate word
> choice or typo that I came across in Juiblex's Swamp. I got this
> message, after pushing a boulder into the swamp: There is a large
> splash as the boulder falls into the moat. Obviously it's a swamp
> and not a moat so that sounds a bit wrong. It says the same sort
> of thing when I #dip a scroll in the swamp as well.
Bones loading was only checking to see if a
monster was marked extinct, it wasn't adding
up the born count of a species in the current
game with the number of that species on the
bones level being loaded. That made it possible
to exceed the correct number of nazgul and
erinys via bones.
This adds a common routine called propagate()
that makemon() and restmonchn(ghostly) share,
for incrementing the born count and checking for
extinction, etc.
When a bones level is loaded, restmonchn()
will flag an illegal monster (duplicated unique,
or too many of a species) by setting the
individual monster's mhpmax to the cookie
value DEFUNCT_MONSTER. Before getbones() finishes
loading the bones level, it will purge those
monsters from the chain.
- fix ring of protection from shape changers causing
real monster to be created.
- add ability to get the character class monster from
genus() or the species.
- use the character class monster when animating
guardian corpses.
- If you have Gnome installed on solaris, the GETRES support wouldn't build.
I don't have access to a solaris system with Gnome installed, but hacked
unixconf.h to force the GETRES code itself to be compiled. So, I believe the
unixres.c change will work for folks really using Gnome on Solaris.
Whether the rest of the gnome code will build there is beyond me.
- I accidentally left TIMED_DELAY defined and the Solaris build failed.
While solaris has usleep(), this is not part of SVR4 as far as I can tell.
But, SysV does have poll, so I implemented msleep() for SysV systems in
terms of poll. So, you can now define TIMED_DELAY on any SYSV build.
<Someone> wishes to add a couple of new options to the wince port ("run fullscreen" and "do not use CE software keyboard").
The wincap field was full, so this adds a second field for
additional options.
This allows the use of the right mouse button to
look at things on the screen when the
'clicklook' option is set.
Concept came from a patch for 3.4.0
that I saw referenced on r.g.r.n
[see http://www.steelskies.com/nethack.php]
but the implementation is different.
I encountered a look vs pickup cockatrice corpse
bug today.
If you looked at a location with ':', you
would instantly get
"Touching the cockatrice corpse is a fatal mistake..."
but if you used "m," you got the full list of
things at the location to choose from.
This patch makes the behaviour consistent
and more informative to the player.
You now get the partial list of things felt
up until the cockatrice corpse is encountered,
and then you get the
"Touching the cockatrice corpse is a fatal mistake..."
Before, the code was never displaying the partially
built list because the feel_cockatrice() call was
happening before the window display call.
Mostly `gcc -Wwrite-strings' complaining about passing string
literals to safe_qbuf(). `gcc -Wformat' didn't catch the type mismatch
of formatting the return value of strlen() with %d, presumeably because
size_t is defined as unsigned int on this system and it treats int and
unsigned int as interchangeable as far as printf/scanf checking goes.
I'm not sure whether the sizeof() values being passed to safe_qbuf()
ought to have casts. Any system where size_t isn't the same width as
unsigned int is bound to support prototypes, but might possibly warn about
the implicit conversion of unsigned long (or even unsigned long long these
days) to unsigned int.
This solution is mostly a band-aid. Make sure information set by join_map
that is overlaid by the MAP is cleared out. This ensures that place_branch
will never consider invalid data. A new function, remove_rooms(), with a
helper, remove_room(), takes care of this, but only for rooms created by
join_map, which addresses the only known case that causes this problem.
There's a possibility that some other strange behavior, especially in
minetn-6, will be fixed by this as well. The problem of disconnected caves
on minetn-6 is not yet addressed.
Also, add a check to lev_comp.y to make sure the required fg semantics of
joined levels (fg must be ROOM or CORR) are actually met. Doesn't affect
any levels currently included in the distro, but might address levels
others are trying to make.
1) killer reason for scattered land mine shrapnel used "a" or "an" prefix
even when multiple projectiles hit as a group -- one of various things
From a bug report.oextra field) --
noticed while investigating #1 and later From a bug report.4.0 due to an unintentional side-effect of missile killer reason
handling in 3.4.1 (removal of redundant "poisoned" prefix by m_throw()
confused the poison handling routine) -- noticed while investigating #3.
> The `prompt' buffer in tty_yn_function still only holds QBUFSZ
> characters. But fixing the tty incarnation wouldn't be good enough;
> all the other interfaces would need to handle it too. I think it
> should be fixed in the core instead. Prompt strings simply should
> not be allowed to become so lengthy.
Another step in the fight against prompt sting buffer overflows.
The goes after the ones that may not have been found yet.
This makes yn_function a real core function and removes
the #define yn_function macro.
The yn_function validates the prompt string buffer being
passed prior to calling (*windowprocs.win_yn_function)(),
and if necessary, truncating it and adding "...".
This won't help if the overflow occurs in the core in
a buffer that is still QBUFSZ in size, but it will help if
a BUFSZ buffer is being passed to one of the query
functions.
This patch gives game and savefile compatibility
whether GOLDOBJ is defined or not.
You can build with GOLDOBJ defined or not, and
still load your saved games. Rebuild with the
opposite, and load the same game.
That way GOLDOBJ can be experimented with
more easily.
1. Leave the "you" struct and the "monst"
struct the same under the hood between
GOLDOBJ and !GOLDOBJ.
2. Always write out gold as an
object on the player and monster
inventory chains.
On a restore of the savefile with GOLDOBJ
not defined, take the gold objects out of
the inventory chains and put it into u.ugold
or mtmp->mgold as appropriate.
On a restore of the savefile with GOLDOBJ
defined, nothing special is done.
Another fix to address the complaints about two-handed weapons being
rendered useless by 3.4.1's change to require free hands in order to apply
containers. Some players now fear to wield two-handed weapons because a
curse would make accessing their bag impossible, which is doubly nasty if
that's where they have scrolls of remove curse or potions of holy water
intended to deal with cursed items. The same situation applies for cursed
one-handed weapon combined with cursed shield, so some are now claiming
that 3.4.1 has made two-weapon combat be even more attractive than before.
This implements #tip, a new command that causes a container at the
current location or carried in inventory to have its contents emptied
onto the floor. Hero's hands don't need to be free at the time but tipping
a floor container requires limbs; tipping an inventory container doesn't
need hands or even limbs. The contained items don't pass through inventory
during the process, so don't cause objects (loadstones, crysknives, scrolls
of scare monster?) to go through their special handling unless it's part of
normally dropping to the floor. Tipping a bag of tricks behaves the same
as applying it (one monster is released, and it only becomes empty if
that happened to be the last charge) and items tipped out of a cursed bag
of holding have their normal cursed bag chance (1/13) of being destroyed.
Tipping an inventory container while levitating or during unskilled riding
behaves similar to normal drop--from a height, so some fragile items break.
Players have wanted this feature to get gray stones out of chests or
heavy corpses out of ice boxes but I didn't care much about that; losing
access to your bag is more significant. I'm pretty sure that there was a
user patch to do something like this floating around at one time, but I
couldn't find it when I looked, so I implemented #tip totally from scratch.
Bug? Extended commands which lack meta-key shortcuts are not listed
in the help files displayed by the '?' command....
Move a couple of instances of container contents manipulation into
their own routines. Behavior for items disappearing from cursed bags of
holding isn't quite identical but is effectively the same. I think its
use of stolen_value (or simply the behavior of the latter) is buggy, but
I haven't tried to fix that. (Cursed bag of holding destroying a player
owned bag containing shopped owned items definitely doesn't work well.)
<Someone> noted that if you dropped a box while levitating, nothing would
break. This is true for sacks too, which shouldn't be immune either.
Throwing didn't break contained objects either, not mentioned in his report.
Refactored out the code in kick_object that handled damage for objects
contained in normal containers and added calls in hitfloor and throwit.
kick_object still only calls it for boxes, but other callers will call it
for any object letting it decide if damage is required. BoH objects aren't
affected, since traditionally the inside of the BoH is "somewhere else".
This started out as a change to address the strange sequence of messages if
you remove a blindfold while engulfed in a dust vortex. That is addressed
by a new function that can be called in such situations. Calls to this
function were added in all the cases where the can_blnd() engulfing
conditions end as a result of player action. There are some other cases
that end ucreamed or usleep, but they happen between turns and shouldn't
need extra handling.
While I was at it, I noticed that a unicorn horn or prayer would cure
blindness even while engulfed in a dust vortex. This is useless, because
you immediately get blind again the next turn. So, I added checks to avoid
doing this. Finally, it didn't make sense for eating a carrot to cure your
blindness in these situations either, only for it to return immediately.
1) make two-weapon combat perform two attacks instead of always either
hitting twice or missing twice;
2) address <Someone>'s report of weapon skill to-hit adjustment being ignored
for bare-handed and martial arts attacks;
3) address newsgroup complaints about the intrusive "your armor is rather
cumbersome" message given every time a monk wearing a suit attacks;
this implements the suggestion that it only occur for those times where
you miss because of the penalty involved, suppressing it when you miss
due to other reasons and when you successfully hit;
4) bonus fix: a side-effect of #3 is that the order of the messages "your
armor is cumbersome" and Stormbringer's "bloodthirsty blade attacks" is
inverted, making a sensible sequence instead of implying precognition.
> "A cloud of sangria gas billows from the chest.
> You stagger and your vision blurs."
> When I see the gas billowing from the chest, I'm not yet
> hallucinating. Shouldn't the gas have a normal colour, then?
> Only after my vision blurs should the gas assume a fake colour, I
> think.
>
Prevent burying a ball from ending your punishment.
When you bury the ball, internally NetHack Punishment
ceases, but a new trap type of TT_BURIEDBALL immediately
kicks in (acting similar to TT_INFLOOR in some ways).
You can eventually work the ball free (or teleport, etc.),
but that will just return you back to normal Punishment.
3.4.1 included a change which requires you to be able to use hands
in order to manipulate containers; that makes sense but has introduced
an unintended side-effect. It has become much harder to uncurse a
two-handed weapon or combination of a one-handed weapon and a shield
because you can't get scrolls or potions out of your bag. This adds a
new major trouble for prayer to address that, escalating it above the
normal minor cursed item trouble. It also removes a nonsensical check
for combination of two-handed weapon and shield that I added long ago.
Not related, but same file: add the missing artifact touch checks
for putting on accessories (quest amulets and lenses). I can't remember
if this was From a bug report.
The CE ports use makedefs hosted on another platform,
so the version string generated at build time isn't really
appropriate.
Add a way to add information to the version string
at runtime for such ports.
To fix Magicbane's message sequencing, its code needs to be redone
substantially. These changes make that easier.
cancel_monst() let caller know whether cancellation succeeds
resist() give artifact weapons a resistance attack rating
vtense() handle monster names and "you" as subjects; checking against
object names and descriptions pointed out a couple of other
words that would have ended up being miscategorized.