Commit Graph

182 Commits

Author SHA1 Message Date
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
kmhugo
bb88bd1a4a Jousting
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.
2002-01-20 05:44:46 +00:00
nethack.rankin
43a1eadc9c lookat of high priests
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
2002-01-19 06:52:03 +00:00
kmhugo
d25f67cd0d Autoquiver fix
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."
2002-01-19 05:34:34 +00:00
nethack.rankin
6d28ddf14b wiz_level_change cleanup
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.
2002-01-19 04:15:46 +00:00
arromdee
9211e211b0 wizard # list
The monpoly_control command on the wizard # command list was formatted badly.
2002-01-19 03:17:31 +00:00
arromdee
89d9f36f06 fix typo (change experience change)
--Ken A
2002-01-19 01:30:26 +00:00
nethack.allison
885eef0dbb Add Warwick's name to mplayer.c 2002-01-18 20:58:11 +00:00
nethack.allison
fb2f6753d6 From <Someone>
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.
2002-01-18 19:14:13 +00:00
nethack.allison
c20a6f89f1 Some touchstone tuning...
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.
2002-01-18 19:00:09 +00:00
kmhugo
f5c0809aff Monsters shouldn't use wands of digging in Sokoban
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.
2002-01-18 17:17:05 +00:00
arromdee
d3a78f0634 pets and tripe
This fixes a very, very, old bug.  I don't think there's been a version
since pets were introduced that doesn't have it.
--Ken A
2002-01-18 03:15:10 +00:00
warwick
0e46369056 Ignore generated files. 2002-01-18 02:50:06 +00:00
nethack.rankin
f7c01ecc71 [Checked into cvs.]
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
2002-01-18 02:48:30 +00:00
warwick
53117c71cb Lenses don't help when you're blind.
This is a tweak to <Someone>'s lens patch.
2002-01-18 01:38:35 +00:00
arromdee
28975c6682 lenses
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.
2002-01-18 01:23:58 +00:00
arromdee
d2050e48e5 levelchange
This changes the #levelgain command to #levelchange, and allows changing
levels both up and down.

--Ken A.
2002-01-18 01:09:28 +00:00
arromdee
912b4a8d94 reduce insect summoning
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.
2002-01-17 03:14:12 +00:00
arromdee
af50cb590d high priest message
Fix bug: Create high priest, let it kill you.  Get "kiled by the high priest".
2002-01-17 03:04:04 +00:00
arromdee
f93521e95d wizard #poly and #levelgain
This adds the wizard #poly and #levelgain commands.
2002-01-17 02:47:23 +00:00
nethack.allison
2c26f0ceea Removed some unneeded preprocessor conditional code.
It was Windows CE stuff that hasn't been integrated into the sources tree yet.
2002-01-17 02:17:17 +00:00
cohrs
7cb3f8d2f6 gaze attacks while on a scroll of scare monster
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.
2002-01-16 07:56:46 +00:00
cohrs
e3ac04eac1 riding a non-swimming steed into water
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.
2002-01-16 07:05:43 +00:00