Commit Graph

1154 Commits

Author SHA1 Message Date
cohrs
e4af2e9a0a correct updated cost of scalpel
rev 1.6 included the wrong updated cost
2002-01-29 08:36:22 +00:00
cohrs
273c0f7f2d remove left over debugging message 2002-01-29 08:07:13 +00:00
cohrs
f51556bc59 eggs and other breakables break falling down stairs
<Someone> questioned why eggs and potions don't break when falling downstairs.
For that matter, other breakables should as well.
2002-01-29 06:35:17 +00:00
cohrs
05ab895737 /tmp/msg 2002-01-29 04:19:46 +00:00
nethack.allison
6fea907683 disclose refinements:
- allow spaces between the different possibilities
- add a missing null at the end of the list of prefixes to prevent index()
  from going crazy
- slight re-wording of the Guidebook
2002-01-28 12:58:45 +00:00
nethack.allison
39f24cda78 Fix "gems in apply menu" From a bug report. 2002-01-28 11:38:25 +00:00
arromdee
1b08077c93 egg breaking
This fixes beta bug 2012.
2002-01-28 02:24:02 +00:00
cohrs
00cfa4a9f8 autodig chattiness
The autodig code still requires lots of interaction, because of all the
digging messages.  Make these messages behave more like boulder pushing
messages, where they only display if the previous move wasn't a push.
2002-01-27 23:45:47 +00:00
nethack.allison
b879096f07 Allow the options specific to the win32 graphical port
to be silently ignored by the tty port, so that the
config file can be conveniently shared between the two.
2002-01-27 13:18:28 +00:00
nethack.allison
359957ddbc One of the beta testers asked if the win32 scrolling
offset could be configured.  This allows it to be
set from the config file using:
	win32_map_cliparound_margin.
2002-01-27 04:36:39 +00:00
cohrs
35edad47ab unused variables 2002-01-27 04:19:44 +00:00
nethack.allison
8389fb1f29 >B1014 <Someone> [reported] change request - disclosure default
>
>	I'd like the default for "Would you like to see your <whatever>"
>	at the end of a game to be "y" instead of "n". I haven't asked
>	for full disclosure in order to have it skipped if I press the
>	space bar once too often by mistake.

This changes the way the flags.end_disclose array is used to
allow what this request is asking for.  It should be backward
compatible with previous "disclose" options.

The order that the end_disclore options are stored:
inventory, attribs, vanquished, genocided, conduct
There is an array in flags:
	end_disclose[NUM_DISCLOSURE_OPT];
with option settings for the each of the following:
iagvc [see disclosure_options in decl.c]:
Legal setting values in that array are:
	DISCLOSE_PROMPT_DEFAULT_YES  ask with default answer yes
	DISCLOSE_PROMPT_DEFAULT_NO   ask with default answer no
	DISCLOSE_YES_WITHOUT_PROMPT  always disclose and don't ask
	DISCLOSE_NO_WITHOUT_PROMPT   never disclose and don't ask

Those setting values can be used in the option
string as a prefix to each disclosure option
to get the desired behaviour for that option.

For backward compatibility, no prefix is actually required,
and the presence of a i,a,g,v, or c without a prefix sets
the corresponding value to DISCLOSE_YES_WITHOUT_PROMPT;

The actual prefixes used are controlled by the following in flag.h:
#define DISCLOSE_PROMPT_DEFAULT_YES	'y'
#define DISCLOSE_PROMPT_DEFAULT_NO	'n'
#define DISCLOSE_YES_WITHOUT_PROMPT	'+'
#define DISCLOSE_NO_WITHOUT_PROMPT	'-'

As far as the docs go, I don't know if I've got the *roff
stuff right.   The TeX stuff looks okay when I converted it to .pdf.

This increments EDITLEVEL.  If that is a problem, I can
add a routine to restore.c to perform a conversion of the old
values in flags. Let me know.
2002-01-27 01:26:59 +00:00
cohrs
df9092ccb5 scalpel and corrosion
make scalpel type METAL (for stainless steel), also increase cost to
reflect it's higher quality
2002-01-27 01:08:55 +00:00
cohrs
494b133ec2 getobj using counts from inventory display
getobj used display_inventory when "?" was selected.  However, any count
entered via the menu interface was lost.  Provide a new internal function
that can return both a letter and a count
2002-01-26 20:21:18 +00:00
nethack.allison
1454fb5e71 touchstone ugly check didn't take GOLDOBJ into consideration. 2002-01-26 15:16:06 +00:00
nethack.allison
69ce21fe0b Add a macro to provide universal consistency around the check
for what sort of creatures tend to revive.
2002-01-26 15:05:00 +00:00
nethack.allison
5482d1ab74 some special code
was added, specific to menustyle:combination in
menu_drop(), which short-circuited a redundant
prompt that <Someone> had complained about by returning
immediately if a special code came back from
ggetobj() in ggoresults.

The top of menu_drop, however, had created a
u_gold object and inserted it into the invent
chain, so you can't just return.  You have
to use a "goto" to get to drop_done, so that
the object is cleaned up.
2002-01-26 04:06:26 +00:00
arromdee
5182c9110e secret door detection
There was an old bug where a wand of secret door detection was identified
even though it didn't find anything.

It was unconfirmed, but I had no trouble confirming it.  It happened because
the wand worked on squares that were couldsee() but which (because they weren't
lit) you couldn't actually see.  The wand would detect the secret corridor and
then not display it because it was out of sight.

I fixed it to display the corridor, in sight or not (I could have had it not
detect anything, but the wand is fairly weak already.)
2002-01-26 02:26:28 +00:00
cohrs
82611f9cd8 inappropriate very difficult reading message
add missing set of parentheses around lense test in read_ability calculation
2002-01-25 08:08:33 +00:00
cohrs
f73a1879c9 landmines and boulders
Make pushing a boulder onto a landmine share code with the trap case,
resulting in pits, waking sleepers, et al.
Don't leave a boulder suspended over the new pit, fill it.
Make sure any remaining boulder is placed on top of the pile.
If player sets off landmine, monsters killed are credited to/blamed on player.
2002-01-25 06:38:42 +00:00
nethack.rankin
e1427a07ab code sync 2002-01-25 00:06:00 +00:00
nethack.allison
dea6099cae (from Steve VanDevender)
Not using FDECL to declare the prototype for dogmove.c:can_reach_food()
causes the Digital UNIX C compiler to throw a prototype mismatch error
when compiling dogmove.c.
2002-01-24 23:40:58 +00:00
nethack.allison
6cfec715ac no message 2002-01-24 20:39:16 +00:00
nethack.allison
eed0831f28 Fix a crash-causing null pointer dereference.
(Thanks to Yitzhak)
2002-01-24 18:21:24 +00:00
warwick
654a297052 MacOSX/Qt system tweaks
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.
2002-01-24 05:49:04 +00:00
nethack.rankin
ef8f180fbc more GOLDOBJ
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.
2002-01-24 02:54:06 +00:00
nethack.allison
4c46f6eb2b Fix several touchstone-related things:
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."
2002-01-24 02:39:55 +00:00
cohrs
3fc3ef8537 another vision-related message
don't just say "the knife misses" when you can actually see the monster
with infravision by testing using the correct function
2002-01-24 02:34:52 +00:00
nethack.rankin
6876df1b2d bribe fix for GOLDOBJ 2002-01-24 00:39:56 +00:00
nethack.allison
7d593cb1d6 bit 2002-01-23 20:13:15 +00:00
cohrs
1a7aa0933e another WIZKIT fix
previous rev put the new "else" in the wrong place
2002-01-23 18:23:54 +00:00
cohrs
4b677185de another WIZKIT fix
if $HOME is not set, don't use uninitialized buffer as the filename to open
2002-01-23 18:06:19 +00:00
nethack.allison
0011db11d3 wizkit fix 2002-01-23 17:52:53 +00:00
dean
84b72da0eb update unused pragmas Update some of the mac pragmas for unused variables for the MPW compilers. 2002-01-23 06:14:21 +00:00
arromdee
af6a8574e0 minor things
Two unrelated tids.  I wouldn't bother putting them into Beta 1. :-)
2002-01-23 01:41:53 +00:00
nethack.allison
2d5361e389 From <Someone>,
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.
2002-01-22 00:30:58 +00:00
arromdee
c8c7c22a92 swallowing zombies/mummies 2002-01-21 22:54:17 +00:00
arromdee
b7b85375c5 polymorphed quest leader
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.)
2002-01-21 22:25:04 +00:00
arromdee
166affb0f9 polymorphed quest leader
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.)
2002-01-21 22:15:22 +00:00
cohrs
6a637d21a5 spells doing negative damage
Add a check to zhitm to ensure that spells cast by characters with low XL
and Int will not do negative damage.
2002-01-21 03:41:21 +00:00
nethack.allison
f2fe0a3d5c The word "zorkmid" was hard-coded in format strings all
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.
2002-01-21 03:35:04 +00:00
arromdee
4f10682592 priest names 2002-01-21 03:30:51 +00:00
cohrs
371bbc2fb8 cost of eating an unpaid tin
The cost of an unpaid tin should be calculated before eating, not after,
so the cost will be based on your pre-eating hunger, not post.
2002-01-21 03:25:50 +00:00
cohrs
202a383444 xprname fix
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.
2002-01-20 22:25:16 +00:00
cohrs
7a634884b4 starting the game without a pet
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.
2002-01-20 21:05:29 +00:00
nethack.allison
ce63457151 Clear a warning
src/mcastu.c(603) : warning C4244: 'initializing' :
conversion from 'long ' to 'char ', possible loss of data

M. Allison
2002-01-20 15:07:56 +00:00
nethack.rankin
e2175c2ce1 stale spellbook pointer
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
2002-01-20 09:53:36 +00:00
cohrs
e7bdcb157f lava effects for monsters and objects
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().
2002-01-20 07:04:18 +00:00
kmhugo
629f0897d6 Jousting follow-up
Fix an oversight.
2002-01-20 06:26:33 +00:00
arromdee
bfbf1d6c30 monster spells
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
2002-01-20 06:17:20 +00:00