Commit Graph

1154 Commits

Author SHA1 Message Date
warwick
00671608d6 Fix scattering - the splitting code doesn't look right - it will
leave avg 1/2 the object's quantity on the scatter point.
Return count of how many objects actually left the scatter point.
2002-09-09 05:44:32 +00:00
nethack.rankin
53f40d2a20 avoid buffer overruns
Noticed with recent looting patch:  QBUFSZ is not big enough
to reliably hold formatted object names.  (I haven't looked through
any other source files for similar problems.)
2002-09-07 02:38:50 +00:00
nethack.rankin
069703f6c3 enlightenment refinement for increased damage
The recent change to include increased damage and increased
chance to hit in all enlightenment feedback instead of just at end
of game feels too specific compared to most of the other feedback.
Instead of giving exact plus/minus values, give a generalized
categorization of the amount.  The exact value is given at game end
as in existing 3.4.0 behavior, and also given when in wizard mode.
2002-09-07 02:36:02 +00:00
nethack.allison
9ac2c2c576 <email deleted>
> I'm working on a Nethack port, and one of the header files a
> library uses has a structure with a member named "red". Since
> includes/decl.h #defines red to something, this totally loses.
>
> Attached is a patch which fixes the color defines.
2002-09-06 00:12:44 +00:00
nethack.allison
3bacf79700 menu loot follow-up bit 2002-09-04 01:44:25 +00:00
nethack.allison
5797f8110b menu loot suggestion from newsgroup
Newsgroups: rec.games.roguelike.nethack
Subject: Re: YANI - empty containers interface
<email deleted>
On Mon, 2 Sep 2002 12:13:49 +0300, <email deleted> wrote:
> I find the behaviour when trying to put something in an empty container
> quite irritating. Let's remind it:
> #loot
> "The <container> is empty. Do you want to put something in it? (y/n)"
> This means I have to read the message and to press 'y' or to cancel via
> Esc.
> For comparison, non-empty containers behave like this - please forgive
> me that I've forgotten the exact words:
> #loot
> "Do what?
> 	o - take out
> 	i - put in
> 	b - both of the above"
> So my suggestion is to change the behaviour of empty containers to be
> the same as non-empty ones. That is:
> #loot
> "Do what?
> 	i - put in"
> This way, I don't have to look at the container. If I want to put
> something in, pressing 'i' will lead to the same results in both cases.

This part of the suggestion was not implemented, however:

> If I want to take something out, then pressing 'o' or 'b' - although
> they are not in the list of choices - will display a message "This
><container> is empty" and end the #loot-ing session.
2002-09-04 01:31:20 +00:00
nethack.allison
6bebdbb135 win32 USER_SOUNDS
This uses pmatch() as a default pattern matcher,
and #defines USER_SOUNDS_REGEX for Qt
to enable the code for regular expressions.

This is enabled for win32tty and win32gui.
2002-09-02 23:28:54 +00:00
nethack.allison
46b88235a1 Borland bits (from Yitzhak) 2002-09-02 14:29:57 +00:00
nethack.allison
98d53c93a8 win32 recover; also a core bit from Yitzhak 2002-09-02 14:10:05 +00:00
cohrs
15240f55cd purple worms affected by corpses
Forwarded from the newsgroup as noting that dropping a chameleon corpse
into a purple worm did not cause polymorph nor will the digestion attack.
Added code to dropy and mdamagem to include special corpse effects like
those in dog_eat and meatobj.
2002-09-01 14:57:28 +00:00
nethack.rankin
c33417fc05 B10002 - enlightenment grammar bug
>       In my final attributes;
>       "You had +1 bonus to hit."
>       Surely "You had a ..." ?

Also moves the hit and damage bonus feedback from the "troubles"
section to the "physical attributes" section and delivers it for
every enlightenment rather than just after the game is over.
2002-09-01 09:56:55 +00:00
nethack.allison
304ac1488b message when trying to wear HoOA on quest 2002-08-31 20:47:04 +00:00
nethack.allison
47f4cf21aa doomed quest
Your quest leader would tell you to return later, even after you
were converted, which would be futile, and could mislead new
players.

This patch:
1. Causes the quest leader to banish you the first time you
encounter him/her following a conversion, since you cannot ever
complete the quest anyway in the current game.
2. Adds a new general QT_BANISHED message to be delivered, in
which you are told that you won't be able to get the Amulet without
the Bell now.

This helps resolve the complaint about not knowing that your game
cannot be won.
2002-08-31 20:14:17 +00:00
nethack.rankin
5088492cf6 speed of petrified monsters
Someone posted in the newsgroup about using stone-to-flesh
to reanimate a petrified pet and having it come back to life with
boosted speed intact.  When the character gets petrified, stripping
speed is one of the first things which happens, so now do that for
monsters too.  I decided not to make monsters who have normal speed
become slow; there isn't any analogous case for the player.

     Possible bug:  while testing this, I zapped a wand of probing
at a hill orc which had just eaten a lizard corpse to save itself
from stoning.  The feedback said "eating" but the orc immediately
hit and killed me as if it wasn't affected by any movement delay.
2002-08-31 09:24:08 +00:00
cohrs
36905aaf96 U29 - mounting steed gets thru tight spots
Mounting a steed would work even when done diagonally at a doorway,
such as a shop door.  Use test_move to check for all such moves and disallow
the mount in this case.
2002-08-30 06:17:41 +00:00
cohrs
38c663056c short int
A fix from <Someone>: "this code only claims to inform the leader if mshort
is set i.E. sizeof(int)<=16."
2002-08-30 03:11:22 +00:00
nethack.allison
eb2503deac bees from trees
<email deleted> wrote in the newsgroup:
> "You've attracted the tree's former occupants!"
> (nothing happens)
>
> Yes, it's _zero_ to four bees, depending on your luck.  I think it's meant
> to be one to five, though.
>
2002-08-30 02:55:21 +00:00
nethack.allison
510ae5b5f2 take_gold() crash with GOLDOBJ
Possible fix for B10001.
When the code went into case 3 in cursed_book(),
the game hung in an endless loop in take_gold().
The call stack was:
    take_gold() line 22 + 10 bytes
    cursed_book(int 2) line 124
    study_book(obj * 0x00968860) line 421 + 19 bytes
    doread() line 130 + 9 bytes
    rhack(char * 0x005b8eac in_line) line 1813 + 3 bytes
    moveloop() line 405 + 7 bytes
    main(int 3, char * * 0x00962ac0) line 93
2002-08-29 02:23:47 +00:00
cohrs
4aa5bceb1f B09002 - killing monsters seen by infravision
ohitmon was incorrectly using location visibility in a couple places where
monster visibility was more appropriate.  I'm still not sure about the
canspotmon check for destroy vs killed.  Similar checks do no appear
elsewhere in the code.  But at least now the 'destroyed' won't be shown
for a seen, living monster.
2002-08-26 15:31:51 +00:00
cohrs
9900fc1507 cancelling compound option change
Patch from <Someone>.  Accept escape when setting complex option as a cancel,
like most other prompts.
2002-08-26 15:23:06 +00:00
nethack.allison
d1da0e7398 bones file diagnostics
Pat added some error information to create_levelfile.
This does the same for create_bonesfile, but the
only place it is logged is in the paniclog, unless
you're in wizard mode.  If bones file creation is
silently failing for someone and they aren't getting
bones files, this provides a way to diagnose why.
2002-08-24 23:25:40 +00:00
nethack.allison
706f95ca7d misc bits: options, also win32 follow-up from <Someone>
(from <Someone>):
I guess that this:
      mcam += iflags.wc_scroll_amount;
should be his:
      mcam += iflags.wc_scroll_amount - 1;
In words: If scroll amount is 1, the behaviour should be as it was
before the option existed, which means: no addition to mcam.
2002-08-24 15:33:00 +00:00
nethack.rankin
6b03787171 more trickery - build fix
Update the other trickery situation.  I don't know how I managed
to miss this.  The disadvantage of suppressing extern.h from normal
dependencies I guess.
2002-08-24 05:52:22 +00:00
nethack.rankin
b00a9dcd4a level file handling and trickery feedback
1) consolidate all core usage of `errno' in files.c;
2) give more feedback for any failure by create_levelfile or open_levelfile,
   similar to what was being done for problems during level change;
3) include trickery info in paniclog (many instances of "trickery" seem to
   be due to disk or quota problems rather than user misbehavior...).

The create_levelfile call in pcmain probably ought to be changed to use
error feedback, but in the meantime this should continue working.

Perhaps error() should be modified to update paniclog too, but I didn't
want to go through all its port-specific incarnations making changes.
2002-08-23 14:52:25 +00:00
cohrs
c3125ec0f9 hitting and mhurtle
Fix part of the buglist entry regarding hitting and mhurtle.  Flag if
mhurtle already killed the monster, and don't call killed again in this case.
One of the new checks for this already_killed flag is just futureproofing.
2002-08-23 05:47:54 +00:00
nethack.allison
2ce6152d63 B08021 scroll_amount wincap option
> - I'd like to see another option added: scroll_amount. In
>   combination with scroll_margin, this would control the amount
>   of squares the screen is scrolled when the scroll_margin is
>   reached (currently, this amount is 1, but if I recall
>   correctly, it used to be more). For example, if both were 5,
>   when you came within 5 spaces of the left screen border, the
>   screen would shift 5 spaces to the right).
2002-08-23 01:03:59 +00:00
nethack.rankin
b840adcb62 trickery bulletproofing
Prevent the pardoning of trickery in wizard mode from attempting
to continue when there's no longer any current level.  Also prevent
the ZEROCOMP configuration from trying to read from file descriptor -1
in case there're any other places which still let that slip through.
And fix an oddity in the VMS port's error() routine which has gone
unnoticed for years.
2002-08-22 03:05:18 +00:00
nethack.rankin
f13035aa48 B09001 - mhp > mhpmax after life drain
A monster hit by Stormbringer could take less damage to current
HP than it took to max HP if attacker had sufficient penalties, so
end up being healthier than its new maximum.  This only applies to
attacks by the player; attacks by monsters don't include the sorts of
modifiers that can trigger it.
2002-08-22 01:44:24 +00:00
nethack.rankin
d5c2438652 bad "cad" message
From the newsgroup:  taking a shop-owned pick-axe out of a
container inside a shop gave a misleading message telling the
player to take the pick-axe out of the shop.  It was caused by
using the object's `unpaid' field before addtobill() had set it.
2002-08-22 01:23:31 +00:00
cohrs
59a96452ff B04006 - Grayswandir and unicorn horns
Implement a check in make_hallucinated similar to the check in make_blinded
to handle the case where your hallucination is cured but Grayswandir is
suppressing its effects anyway.
2002-08-22 00:13:03 +00:00
cohrs
2d2a20cdf0 R1049 followup
This patch handles the case of angering the town watch when breaking a wand
of digging damages walls or doors.
2002-08-21 23:36:47 +00:00
cohrs
5d492abf6f R1049 - various wand of digging bugs
- Breaking wand of digging dug through rock which should be undiggable.
Checks assumed pits would never show up in solid rock.
- Breaking wand of digging near shop walls wouldn't anger the shopkeeper
Checks assumed pits would never show up in walls, also, added a special
case to pay_for_damage to handle the case where you're falling thru and
can't be asked to pay.
- Shop walls wouldn't be restored if there are pits in the way.
Checks assumed pits would never show up in walls.
- If there was a hole outside the shop, you could kick stuff out of the
door into the hole without shopkeeper noticing.  Added the missing check.
2002-08-21 23:06:58 +00:00
cohrs
d18027e570 tearing spellbooks while confused
Reported to the newsgroup, the code in study_book for the effect of
confusion on studying a book was never reached.  The study_book code
didn't completely handle continuing to read a book when you got confused
after getting interrupted.
2002-08-21 16:43:48 +00:00
cohrs
aedda43f38 tearing spellbooks while confused
Reported to the newsgroup, the code in study_book for the effect of
confusion on studying a book was never reached.  Removed the deprecated
check from read.c
2002-08-21 16:42:10 +00:00
nethack.allison
2697615bd3 win32: hold .0 file open exclusively
-prevents problems with internal recover
if second copy of game is started up with
the same player name.
2002-08-21 15:21:56 +00:00
cohrs
e1ea4460ce B08019 - growup followup
growup entries for all the orc types as <Someone> suggested, since generic orcs
almost never occur.
2002-08-21 05:14:10 +00:00
cohrs
a372574583 B08018 - vision when breaking closed doors
Do vision_recalc immediately when blasting a door so that all the
subsequent messages for the same blast hitting other things are all
evaluated with the same vision in effect.
2002-08-21 04:48:17 +00:00
nethack.allison
3515dcf1f1 SELF_RECOVER for win32
- define SELF_RECOVER for win32
- add code to perform a recover operation from
  within NetHack itself when SELF_RECOVER is defined
2002-08-21 03:30:19 +00:00
nethack.allison
68aca25b70 Remove www link for coyote names
The link is no longer valid. I found another
link, http://tultw.com/bios/latin.htm
but this doesn't seem like something we
want to direct maintenance effort towards.
So this removes the link altogether.
2002-08-20 11:43:16 +00:00
nethack.allison
fc319a4be0 string constants
<Someone> wrote:
> Linux, Redhat 7.1 nethack 3.4.0
>
>Please see attached patch file.
>
>I'm attempting to move more stuff into the "read-only" area, in
>preparation for a port to another OS.
2002-08-20 08:05:20 +00:00
nethack.allison
6578eb1884 B07004 camera breaks on shade 2002-08-20 00:03:17 +00:00
cohrs
379ffe2461 B08012 - tweaking travel and closed doors
- when testing travel locations, don't treat diagonal moves thru closed
doors as possible, unless player can go/dig thru door
- treat closed doors and boulders as expensive for travel, preferring open paths
2002-08-19 17:10:34 +00:00
nethack.rankin
06ce74ffb5 juice name bit 2002-08-19 08:22:32 +00:00
nethack.rankin
9a9259cf36 B08017 - piece of cheese juice
Implement <Someone>'s request that fruit name "foo of bar" yield
juice messages referring to "bar juice" instead of "foo of bar juice".
2002-08-19 07:33:13 +00:00
nethack.allison
b0632cc637 add full suite of directions to cmdassist 2002-08-19 01:59:28 +00:00
nethack.allison
2695ca47b4 gas colors while blind
<email deleted> on Sunday, August 18, 2002 at 15:28:18
> comments: player is blind, and not hallucinating (initially). On #loot:
>
> You trigger a trap!
> A cloud of ultraviolet gas billows from the large box.
> You stagger and get dizzy...
2002-08-19 00:00:52 +00:00
nethack.allison
17ba46e459 recover.c had:
#  ifdef WIN32
#define SAVESIZE	(PL_NSIZ + 40)  /* username-player.NetHack-saved-game */

files.c had:
#  if defined(WIN32)
#define SAVESIZE	(PL_NSIZ + 60)	/* username-player.NetHack-saved-game */

It has to be 40 for savefile compatibility with 3.4.0.
2002-08-18 19:35:45 +00:00
nethack.rankin
096b420889 rolling boulder hitting pit which holds monster
From a bug report, a rolling boulder
trap could report that the boulder had fallen into the pit with you
and then let it keep rolling.  flooreffects() only returns true
when it uses up the object being manipulated but it doesn't use up
boulders that hit pits which hold monsters or the hero.  Its caller
needs to handle the cases where the boulder ends up sharing the pit
with a monster.
2002-08-17 10:24:35 +00:00
nethack.allison
4b1cec6060 follow-up bit 2002-08-16 02:44:57 +00:00
nethack.allison
bbd3671740 selection of top,bottom,left, or right
for align_message and align_status, so that you don't have
to type in the word top or bottom or left or right.
2002-08-16 02:34:12 +00:00