Commit Graph

2330 Commits

Author SHA1 Message Date
cohrs
d66bd647e6 more SAFERHANGUP
make "done_hup" volatile on platforms where this matters, since hangup()
now returns when it didn't used to.
2003-09-19 03:55:33 +00:00
cohrs
40b5b12673 SAFERHANGUP
This is an initial round of SAFERHANGUP hangup changes.  It introduces
SAFERHANGUP, provides the core framework, and enables it for UNIX.

Window-port changes are provided for win/tty, win/X11 and win/gnome.  Qt
changes should be forthcoming after having Warwick look at them.
window.doc is updated so windowport maintainers have an clue what needs to
be done to support SAFERHANGUP.
2003-09-19 03:15:49 +00:00
cohrs
1382c6c028 oracles/rumors for offerings
As suggested in a message from <Someone>, add a rumor and an oracle
regarding priestly donations.  Keni's suggested wording was incorporated.
A spelling error in another oracle is also fixed.
2003-09-18 03:03:12 +00:00
cohrs
5e443536d8 "your" artifacts
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.
2003-09-18 02:52:40 +00:00
warwick
9402d6dc54 Don't use regex by default - that way player can share/transport
their nethack.cnf between platforms bettery. Wildcards suffice anyway.
2003-09-16 03:45:58 +00:00
warwick
b6ff9d7d73 Use __BIG_ENDIAN__ rather than __ppc__ (more portable, more meaningful). 2003-09-16 00:20:18 +00:00
cohrs
3eb58528dd redundant comparison bit 2003-09-15 16:20:38 +00:00
nethack.allison
e62bd5eb14 wish bit
<Someone> wrote:
>> You're equally unlikely to be wishing for spellbooks by colour,
>> but I note that 'grey' for 'gray' only works for dragonscale and
>> stones, not the spellbook description.
>>
> I've just noticed that the fix for this only works for 'grey
> spellbook', not 'grey spell book'; 'spell book' works for wishing
> in other contexts, so it probably ought to here :-)
2003-09-15 10:47:30 +00:00
nethack.allison
b4b37dde28 buglist: autodig
> Would it be possible to make autodig also dig downward
> when I press '>' while wielding an pick-axe? When digging for gold,
> after casting detect objects, this would be convenient for getting
> to buried gold and gems.
> [<Someone>]
2003-09-15 03:49:28 +00:00
nethack.allison
e919b2e01c buglist: desacrated temples and blindness.
> When I enter a desacrated temple, sometimes an enormous ghost
> appears next to me:
> You have an eerie feeling... An enormous ghost appears next to
>     you!
> You are frightened to death, and unable to move.
> You regain your composure. When I don't have telepathy, and don a
>     blindfold first, I get the same messages:
> You are now wearing a blindfold. You can't see any more.
> You have an eerie feeling... An enormous ghost appears next to
>     you!
> You are frightened to death, and unable to move.
> You regain your composure. Why does the ghost scare me if I
>     cannot even see it? How do I notice it appear?
>  [<Someone>]
2003-09-15 03:08:56 +00:00
nethack.allison
5eff6601e9 avoid the_your[] duplication
get rid of a duplication of the_your[] strings (do.c, trap.c) by
moving it to c_common_strings.
2003-09-15 02:04:00 +00:00
cohrs
e2d75840b0 quivering coins
A while back, I delayed applying this patch after a discussion about
quivering coins, because I didn't want to change the behavior of GOLDOBJ
vs non-GOLDOBJ games.  I'm tired of seeing this diff in my tree, and I
recall there was some sentiment that I should have checked it in, so I'm
adding the feature in the trunk.
2003-09-14 00:01:35 +00:00
cohrs
10847b0e3d gcc compilation warnings 2003-09-13 22:55:45 +00:00
nethack.allison
bd170f5869 show errno not result
open_levelfile_exclusively() was showing the return value -1 in a panic message, even though that was the only possible value; show errno instead
2003-09-13 17:11:20 +00:00
nethack.allison
cc830fb311 buglist - full level triggers impossible() from migrating mons
<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.
2003-09-13 05:30:43 +00:00
cohrs
32b2af4abf buglist followup to pacifying a shopkeeper
Quoting the buglist: "If shk.c does get modified, I'd
like to see a call to rouse_shk() added at the start of rob_shop().
If the shk wakes up for buying and selling, he ought to wake up for
robbery--even when it's covered by the customer's credit--too."
2003-09-12 20:08:44 +00:00
cohrs
8396866296 inappropriate pacification of shopkeepers
A recent report noted that if you are invisible, teleport into a shop,
steal something, teleport out, and then return, the shopkeeper will become
pacified.  This is because the pacification code occurred even if the
shopkeeper already knew your name, as long as the "Welcome" message had not
yet occurred.  Implement <Someone>'s proposed fix: Before pacifying, either
the visitct must be zero (as per old code) or the customer name must
already be known.  And, of course, the customer name must differ from the
current setting.  This skips the pacification code in those situations
where the shopkeeper learned your name but was not happy about it (which is
what visitct > 0 implies, at least initially).

This also deals with an older bug report where you attack a shopkeeper
while outside the shop and then later enter the shop while the shopkeeper
is in it.  hot_pursuit() sets the customer name, and the new check avoids
pacifying the shopkeeper for the same reason as noted above.
2003-09-12 17:23:04 +00:00
cohrs
57a21dafde Missing FOUNTAIN in minend-3
<Someone> reported a missing FOUNTAIN tag the minend-3 to correspond to one
of the fountains in the map.
2003-09-12 16:50:09 +00:00
cohrs
ad41e2dc32 U614 - Master Kaen death message
rewrote the message so it doesn't talk about his body dissolving into gas,
since there's a possibility that he'll leave a corpse.  It now doesn't
mention a body at all, so it's not so bad when he doesn't leave a corpse
either.  The contents are completely changed, and I think it's more in line
with the sort of thing you'd expect from Master Kaen.
2003-09-12 16:20:50 +00:00
warwick
9d83d474f4 Solve a number of MacOSX problems. 2003-09-11 04:25:52 +00:00
warwick
0460cc9824 MacOSX can handle >14 character names.
I think the #if is inverted really - what DOES have that limit?
2003-09-11 04:23:52 +00:00
warwick
a80481a5e7 Avoid unixisms. On MacOSX, we cannot assume that the user will use
a command-line option to set their name. Normally they will type
a name if asked - but they won't be asked if we pull their username
as a name.
2003-09-11 04:22:55 +00:00
warwick
656fe3689d Rule for tile2cmp.o needed. 2003-09-11 04:21:12 +00:00
warwick
fcc6b44ab8 *** empty log message *** 2003-09-11 04:19:43 +00:00
warwick
1fc1945222 A .txt file is easier for the end user. 2003-09-11 04:19:02 +00:00
warwick
4c2486026e Work on BigEndian systems too. Only __ppc__ detected for now (Mac OS X). 2003-09-11 04:00:21 +00:00
nethack.rankin
b7529324a7 fixes typo
Plus a correction for an earlier entry.
2003-09-11 03:02:54 +00:00
nethack.rankin
951ca18e61 fix U640 - Medusa bug
Described in the newsgroup a while back and recently reported:  if
you had reflection and were invisible and had esp and were blind, Medusa
would turn herself to stone by looking at you.  When you're invisible,
she shouldn't be able to see your source of reflection so shouldn't be
affected by the gaze; that's how things work when you aren't blind but
the relevant code was being skipped when you are.

     Now esp is irrelevant for this and she'll see her reflected gaze
only when she can see you, regardless of whether you see it happen.
2003-09-11 02:45:55 +00:00
cohrs
3415b354ab shopkeeper messages outside the shop
remove_rooms() was trying to be clever and truncate the maximum room bounds
in partially overlapping rooms.  In the process, it would truncate the
bounds of L shaped rooms incorrectly, leaving some locations outside the
bounds with the roomno field set.  Since the maximum bounds really do not
have to actually match the largest extent of the room in the case of
irregular rooms, it was easiest to just remove the code that was performing
the incorrect truncation.  Due to the way remove_room() is coded, this
could result in shopkeeper messages (or, less likely, priest messages,
although that has not been reported yet) occuring for locations to the
right (or the upper/lower right corner) of the MAP on the Bustling Town level.
2003-09-10 21:11:21 +00:00
nethack.allison
b7a64afdd7 U638 Juiblex's "moat"
> 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.
2003-09-10 01:16:23 +00:00
jwalz
0b284f75a0 compilation bit 2003-09-08 00:48:37 +00:00
nethack.allison
eb398e0b2a save/bones compatibility info followup 2003-09-07 18:19:24 +00:00
nethack.allison
89ec7dad49 save/bones compatibility info followup 2003-09-07 18:17:05 +00:00
nethack.allison
dae1b81029 #U632: Objects in Pits (game behavior)
<Someone> submitted the following bug report:
> An object and a pit are occupying the same square. I try to kick
> the object out of the square, but "You can't kick something
> that's in a pit!"
>
> I step into the square and escape the pit, but I can pick up the
> object, so maybe it's not in the pit after all.
>

This patch does *not* address this part of the bug report:
> If it's in the pit and it's a cockatrice corpse, should I die
> from landing on it when I fall into the pit?
2003-09-07 17:25:50 +00:00
nethack.allison
c3bfccdaf6 runtime bones compatibility info
Put the accepted bones file range on the options menu display.
Also adds a missing "if (wizard)" in bones.c
2003-09-07 11:48:43 +00:00
nethack.allison
89551f2157 missing band
<Someone> pointed out that I didn't check in the
updated include/extern.h
2003-09-06 21:33:31 +00:00
nethack.allison
9091855c66 monster birth limits followup 2003-09-06 11:01:05 +00:00
nethack.allison
237a8fbce7 monster birth limits exceeded by bones load
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.
2003-09-05 20:39:35 +00:00
nethack.allison
724ac2670c more overlay bits
Although the overlay stuff is destined to be
removed someday, this patch just makes the
use of STATIC_DCL, STATIC_OVL consistent
in the trunk.

[As a side pointless experiment, I was able
 to build a working  8086 port of 3.4.2 after
 this change that worked correctly in limited
 testing right up until it came time to enter
 Ft. Ludios., where it couldn't allocated the
required amount of memory.]
2003-09-05 14:59:53 +00:00
nethack.allison
1fed7915fb Remove vestiges of old overlay source split
[trunk only]
2003-09-05 13:55:24 +00:00
nethack.allison
416412f92b Remove vestiges of old overlay source split
[trunk only]
2003-09-05 02:45:18 +00:00
cohrs
1a94dcfca3 U631 - bustling town down stairs
correct the region where the down stairs can be placed so they don't show up
in a cut off cave.  If/when the level generator is improved to avoid generating
such caves, the down stairs region could potentially be changed back.
2003-09-04 15:24:15 +00:00
nethack.allison
74d4f057d5 U614 student statues were converted to valkyries 2003-09-04 10:26:19 +00:00
nethack.allison
e382e3b055 U613 specifying alignment in win32 and CE (from Yitzhak)
> The bug involved using the initalign (and related) indexes into
> the array of alignments as indexes into the respective combo box,
> and these are (apparently) not equivalent. To fix, the combo box
> is queried one by one for the item with the index that produces
> that proper alignment value, and then uses that index found. I
> did not find an API that does this in one step, but this only
> happens once, at dialog initialization.
2003-09-03 03:57:32 +00:00
cohrs
efb8739977 U624 (also in U614) - monk quest grammar
The first reported 3.4.2 grammar bug.  This one has been there a while.
2003-09-03 01:29:13 +00:00
cohrs
0d2ff02af3 README.linux sync
update the README.linux to correspond to the version that was included
in the 3.4.2 binary distro.
2003-09-03 01:22:09 +00:00
kmhugo
1c17e4087a Qt/MacOS X tidbit
The Info.plist file contains vital information about a given
application package.  Rename the file from .pli to .plist (note
that other files in this directory use long extensions).
Also correct and add to some of the information in this file.
2003-09-03 00:16:51 +00:00
kmhugo
48d826b907 Mac Terminal port tuneup
Submit the last of the changes that were needed to compile the
MacOS X Terminal port.
2003-09-02 16:06:53 +00:00
cohrs
5ba58b7229 flaming sphere and sliming
Reported to rgrn vs 3.4.1, polymorphing into other flaming monsters cures
sliming, but polymorphing to a flaming sphere did not.
2003-09-02 03:58:33 +00:00
cohrs
3444083f28 monster hp loss with Stormbringer
<Someone> forwarded from rgrn that a monster using Stormbringer would
lose hp when hitting the player.  The sign of the "gain" was reversed due
to subtracting the difference in the wrong order.
2003-09-02 03:48:34 +00:00