]> granicus.if.org Git - nethack/log
nethack
10 years agoenlightenment for polymorph & lycanthropy
PatR [Sat, 2 May 2015 02:44:56 +0000 (19:44 -0700)]
enlightenment for polymorph & lycanthropy

Fine-tune lycanthropy feedback by combining "you are a werecritter"
and "you are in beast form" into one message.  Also, add some new
feedback when lycanthropy and intrinsic polymorph are blocked by
intrinsic unchanging.

10 years agostabilize loss of gold
PatR [Sat, 2 May 2015 01:01:12 +0000 (18:01 -0700)]
stabilize loss of gold

When gold is stolen by a leprechaun or lost when being "overwhelmed
by an urge to take a bath" while dipping in a fountain, if you had
99 gold pieces or less, you'd lose all of it (in the bath case, only
if it was at least 10 to start with), but if you had 100 or more,
you would lose a random amount which could be as little as 1.  And
in the bath case, if the random amount was less than 10, you would
lose nothing but be told that "you lost some of your money in the
fountain".  After this change, it is still possible to lose less
when starting with more, but not as likely and not as extreme a case
as maybe losing only 1 when starting with thousands.

The fountain-dip bath case has code to handle mutiple denominations
of coins, possibly the only place in the program where that exists.
I've left that alone although it should probably be taken out....

10 years agofixes entry for previous bubble fix
nhmall [Fri, 1 May 2015 22:34:06 +0000 (18:34 -0400)]
fixes entry for previous bubble fix
 Changes to be committed:
modified:   doc/fixes35.0

10 years agoMerge branch 'AlexK-misc'
nhmall [Fri, 1 May 2015 22:24:59 +0000 (18:24 -0400)]
Merge branch 'AlexK-misc'

10 years agoHandle boulder-option in config file
Pasi Kallinen [Fri, 1 May 2015 19:03:10 +0000 (22:03 +0300)]
Handle boulder-option in config file

Setting boulder in config file did not work correctly in post-3.4.3
code, due to the symset changes.

10 years agoUninitialized variable
Pasi Kallinen [Fri, 1 May 2015 11:52:25 +0000 (14:52 +0300)]
Uninitialized variable

10 years agoanother ball & chain tweak
nhmall [Fri, 1 May 2015 11:39:53 +0000 (07:39 -0400)]
another ball & chain tweak

checking if uball is OBJ_FREE was inappropriate, because
sometimes it is in inventory.

10 years agosanity check owornmask
PatR [Fri, 1 May 2015 09:32:14 +0000 (02:32 -0700)]
sanity check owornmask

Extend the processing done by the wizard mode 'sanity_check' option
to look for anomalies with obj->owornmask since there seem to have
been a few lately.  I haven't actually triggered any so this code
isn't very well exercized yet.

sanity_check uses pline() rather than impossible() or debugpline()
to deliver messages so might not be very useful with keymasking.

A sizeable chunk of this diff is just cleaning up indentation so
that I could see what I was working with....

10 years agoInitialize variable
Pasi Kallinen [Fri, 1 May 2015 08:55:15 +0000 (11:55 +0300)]
Initialize variable

10 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
keni [Fri, 1 May 2015 02:01:12 +0000 (22:01 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

10 years agonhsub: add -m flag for fixing commit dates
keni [Fri, 1 May 2015 02:00:19 +0000 (22:00 -0400)]
nhsub: add -m flag for fixing commit dates

10 years agolint: use const for string literal
PatR [Fri, 1 May 2015 00:59:05 +0000 (17:59 -0700)]
lint: use const for string literal

10 years agocan't use BALL_IN_MON after u.uswallow set to 0
nhmall [Thu, 30 Apr 2015 12:26:46 +0000 (08:26 -0400)]
can't use BALL_IN_MON after u.uswallow set to 0

u.uswallow is set to 0 a couple of lines above so
the test will never be TRUE.

10 years agofix a panic and infinite recursion
nhmall [Thu, 30 Apr 2015 03:53:31 +0000 (23:53 -0400)]
fix a panic and infinite recursion
 Changes to be committed:
modified:   src/ball.c
modified:   src/display.c
modified:   src/mon.c

10 years agocomment rearranged
nhmall [Thu, 30 Apr 2015 00:54:11 +0000 (20:54 -0400)]
comment rearranged

Requested by Sean for some work he's doing for reindent.

10 years agoExtract ball and chain before flooreffects
Pasi Kallinen [Wed, 29 Apr 2015 17:35:46 +0000 (20:35 +0300)]
Extract ball and chain before flooreffects

10 years agoCheck for valid coord in obj_nexto_xy
Pasi Kallinen [Wed, 29 Apr 2015 14:04:49 +0000 (17:04 +0300)]
Check for valid coord in obj_nexto_xy

10 years agoPrevent monsters throwing items out of map
Pasi Kallinen [Wed, 29 Apr 2015 13:28:01 +0000 (16:28 +0300)]
Prevent monsters throwing items out of map

If a monster was in the projectile's path, the projectile stopping
checks would not be reached.  The thrown object could fly up to
the maximum range, through walls, or even outside the map.

10 years agoUnquiver gold before making it vanish
Pasi Kallinen [Tue, 28 Apr 2015 19:14:20 +0000 (22:14 +0300)]
Unquiver gold before making it vanish

This fixes a complaint for "deleting worn obj":  If reading a cursed
spellbook took your money, and the gold was quivered.

10 years agoMake spell list title obey menu_headings
Pasi Kallinen [Tue, 28 Apr 2015 11:13:01 +0000 (14:13 +0300)]
Make spell list title obey menu_headings

10 years agoExclude "grey" from color picker menu
Pasi Kallinen [Tue, 28 Apr 2015 09:46:39 +0000 (12:46 +0300)]
Exclude "grey" from color picker menu

10 years agotrade a segfault for a panic
nhmall [Tue, 28 Apr 2015 03:42:06 +0000 (23:42 -0400)]
trade a segfault for a panic
 Changes to be committed:
modified:   src/invent.c
modified:   src/options.c

Apparently we need this based on Pasi's segfault. We just
don't yet know why we need them.

Also fix a warning:
..\src\options.c(1282) : warning C4101: 'tmp' : unreferenced local variable

10 years agoUnify getting terrain under drawbridge
Pasi Kallinen [Mon, 27 Apr 2015 19:15:23 +0000 (22:15 +0300)]
Unify getting terrain under drawbridge

10 years agoUnify guards yelling
Pasi Kallinen [Mon, 27 Apr 2015 18:31:25 +0000 (21:31 +0300)]
Unify guards yelling

10 years agoAdd is_watch define for watchmen
Pasi Kallinen [Mon, 27 Apr 2015 18:09:26 +0000 (21:09 +0300)]
Add is_watch define for watchmen

10 years agoAllow all text attributes for menu_headings
Pasi Kallinen [Mon, 27 Apr 2015 15:43:55 +0000 (18:43 +0300)]
Allow all text attributes for menu_headings

10 years agoAllow changing menucolors in-game via Options
Pasi Kallinen [Mon, 27 Apr 2015 14:45:40 +0000 (17:45 +0300)]
Allow changing menucolors in-game via Options

10 years agoShow only beginning of annotation when redoing it
Pasi Kallinen [Mon, 27 Apr 2015 13:18:59 +0000 (16:18 +0300)]
Show only beginning of annotation when redoing it

10 years agomore BUCX: union vs intersection
PatR [Mon, 27 Apr 2015 08:22:39 +0000 (01:22 -0700)]
more BUCX: union vs intersection

Fix filtering used by the 'D' command, and a few other activities that
allow both object class filtering and bless/curse state filtering, so
that when both class(es) and state(s) are specified, objects need to
match both rather than either.  D?C will present the player with cursed
scrolls to drop rather than all scrolls plus all other cursed objects.

This also fixes another instance when gold could end up with its bknown
flag set.

10 years agobubble structure contains pointer into static array. Bubble objects
Alex Kompel [Sun, 26 Apr 2015 21:47:38 +0000 (14:47 -0700)]
bubble structure contains pointer into static array. Bubble objects
are being flat-dumped into save file and this causes segfault in restore()
whenever data segment layout changes (e.g. global variables added/removed).
bmask should either be stored with the objects.

10 years agoPrevent possible buffer overflow
Pasi Kallinen [Sun, 26 Apr 2015 12:56:28 +0000 (15:56 +0300)]
Prevent possible buffer overflow

getlin() gets at most a BUFSZ string from user; make the buf big
enough to hold that _and_ the query itself.

10 years ago'I' command support for BUCX
PatR [Sun, 26 Apr 2015 10:20:58 +0000 (03:20 -0700)]
'I' command support for BUCX

Allow the 'I' command to show inventory of known blessed items via
pseudo object classes B, C, U, and X.  That's instead of an showing
inventory of specific object class.  The two can't be combined
because 'I' operates on single character input.

I had to modify tty_yn_function to prevent it from forcing a BUCX
character into lower case (simply using lower case would cause a
conflict with 'u' and 'x' for inventory of shopping bill), and did
that by checking whether any of the acceptable response characters
are upper case.  Pretty straightforward and shouldn't impact any
other uses that don't specify upper case choices.

I did the same thing for X11.  Other interfaces most likely need
to do something similar.  If they don't, a response of 'B' or 'C'
(for menustyle:traditional or menustyle:combination) will simply
not work, without causing any problems, same as typing an invalid
choice, and 'U' or 'X' will give shop feedback instead of the
requested subset of inventory.

The Guidebook revisions are untested.

10 years agoAdd level annotating to the Call menu
Pasi Kallinen [Sun, 26 Apr 2015 08:29:54 +0000 (11:29 +0300)]
Add level annotating to the Call menu

Via UnNetHack

10 years agoShow level annotation when overwriting existing one
Pasi Kallinen [Sun, 26 Apr 2015 08:10:34 +0000 (11:10 +0300)]
Show level annotation when overwriting existing one

Idea by Chris Smith, via UnNetHack

10 years agoMung annotation spaces
Pasi Kallinen [Sun, 26 Apr 2015 07:57:21 +0000 (10:57 +0300)]
Mung annotation spaces

10 years agoShow level annotation on level entry
Pasi Kallinen [Sun, 26 Apr 2015 07:46:38 +0000 (10:46 +0300)]
Show level annotation on level entry

Idea by Chris Smith, via Unnethack

10 years agocomment termination bit
nhmall [Sat, 25 Apr 2015 19:49:14 +0000 (15:49 -0400)]
comment termination bit

10 years agocheckfile protection from caller
nhmall [Sat, 25 Apr 2015 14:51:07 +0000 (10:51 -0400)]
checkfile protection from caller
 Changes to be committed:
modified:   src/pager.c

10 years agoShow only the short automatic glyph description
Pasi Kallinen [Sat, 25 Apr 2015 12:19:13 +0000 (15:19 +0300)]
Show only the short automatic glyph description

When you turn on the automatic description of a glyph under cursor,
we want to show the short description of what glyph it actually is.
The long full description of all possibilities is far too long, so
may cause more-prompts, and is awkward for blind players.

10 years agoAlso allow q at the Itemized billing -prompt
Pasi Kallinen [Sat, 25 Apr 2015 09:56:51 +0000 (12:56 +0300)]
Also allow q at the Itemized billing -prompt

Original change via AceHack by Alex Smith

10 years agoisspace() usage
PatR [Sat, 25 Apr 2015 09:11:13 +0000 (02:11 -0700)]
isspace() usage

Replace most uses of isspace() with a simple test for ' ' after
processing the string buffer with mungspaces (which replaces tab
with space, converts instances of consecutive whitespace into a
single space, and removes leading and trailing spaces).  The uses
where this wasn't done now cast their argument to (uchar) so that
platforms with signed chars will never pass negative values to it.

I didn't mess with the menu coloring code (except for casts to the
isspace() argument); it almost certainly could benefit from using
mungspaces.  I did mess with the symset processing quite a bit,
and hope I haven't accidentally broken anything.  Default symbols
and DECgraphics symbols still parse and display ok, so the rest of
dat/symbols should be ok too.  I didn't test symbols in the user's
config file because I don't remember how that's supposed to work.

10 years agoFix adding doors to levels
Pasi Kallinen [Sat, 25 Apr 2015 09:00:39 +0000 (12:00 +0300)]
Fix adding doors to levels

10 years agoFix out-of-map condition in buzz
Pasi Kallinen [Sat, 25 Apr 2015 03:24:36 +0000 (06:24 +0300)]
Fix out-of-map condition in buzz

10 years agodo_look fix fix
PatR [Fri, 24 Apr 2015 23:07:00 +0000 (16:07 -0700)]
do_look fix fix

Avoid initializer for auto-class array since many pre-ANSI compilers
didn't support that.  Also, when ESC is used to cancel inventory
selection, don't continue on searching for that selection in invent.

10 years agofix an observed stack corruption
nhmall [Fri, 24 Apr 2015 15:23:07 +0000 (11:23 -0400)]
fix an observed stack corruption
 Changes to be committed:
modified:   src/pager.c

10 years agoforce date change (another mail test)
keni [Fri, 24 Apr 2015 14:11:17 +0000 (10:11 -0400)]
force date change (another mail test)

10 years agoand fill in the line (another mail test)
keni [Fri, 24 Apr 2015 14:01:00 +0000 (10:01 -0400)]
and fill in the line (another mail test)

10 years agoadd a date line (another mail test)
keni [Fri, 24 Apr 2015 13:56:24 +0000 (09:56 -0400)]
add a date line (another mail test)

10 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
keni [Fri, 24 Apr 2015 13:33:35 +0000 (09:33 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

10 years agoenable subst for all DEVEL/*.txt (really another mail test)
keni [Fri, 24 Apr 2015 13:32:50 +0000 (09:32 -0400)]
enable subst for all DEVEL/*.txt (really another mail test)

10 years agoStop travel or run when you get hungry
Pasi Kallinen [Fri, 24 Apr 2015 13:24:50 +0000 (16:24 +0300)]
Stop travel or run when you get hungry

10 years agoforce the date (really testing email)
keni [Fri, 24 Apr 2015 13:11:33 +0000 (09:11 -0400)]
force the date (really testing email)

10 years agomore data.base lookup tidbits
PatR [Fri, 24 Apr 2015 09:18:07 +0000 (02:18 -0700)]
more data.base lookup tidbits

Still doesn't address the reported stack corruption.

* 'alt' points to a buffer which has already been processed by
  lcase(), so remove the redundant call to that routine;
* common error exit accessed via 'goto' could potentially leave
  a dangling window structure (only if 'data' is corrupted though;
  it's the only way a failure at that late point could occur).

10 years agodo_look bits
PatR [Fri, 24 Apr 2015 02:25:01 +0000 (19:25 -0700)]
do_look bits

I didn't find Michael's crasher, but I did find a couple of minor
problems:

knight's saddled pony wasn't found in the file lookup either though
there is an entry for pony ("tame saddled <foo>" stripped off "tame "
but not "saddled "; "saddled <foo>" would only be found of there was
a wildcard entry key of "*<foo>", like "*horse" to catch both horse
and warhorse);

"wombat" matched the bat entry rather than reporting an unknown
entity.

10 years agoGive honorifics to vampires and elves
Pasi Kallinen [Thu, 23 Apr 2015 18:46:02 +0000 (21:46 +0300)]
Give honorifics to vampires and elves

10 years agoGive gnomes occasionally a candle
Pasi Kallinen [Thu, 23 Apr 2015 18:19:19 +0000 (21:19 +0300)]
Give gnomes occasionally a candle

...and if in unlit area, light the candle.

10 years agoHallucinated currencies
Pasi Kallinen [Thu, 23 Apr 2015 17:30:49 +0000 (20:30 +0300)]
Hallucinated currencies

Originally via UnNetHack by Patric Mueller

10 years agoIndicate how far you fall down a hole or trapdoor
Pasi Kallinen [Thu, 23 Apr 2015 16:27:07 +0000 (19:27 +0300)]
Indicate how far you fall down a hole or trapdoor

No extra message when falling down to the next level,
otherwise give "You fall down a [very] [deep] shaft!".

10 years agostatue glyph save/restore
PatR [Thu, 23 Apr 2015 02:47:55 +0000 (19:47 -0700)]
statue glyph save/restore

Remove the code that converted statues shown as monsters into stautes
shown as big rocks when saving and then reversed the effect when
restoring.  It was done to preserve save file compatability with 3.4.3
where statue-as-monster glyphs didn't exist, so is no longer useful.

10 years agosp_lev.c cleanup
PatR [Thu, 23 Apr 2015 02:18:57 +0000 (19:18 -0700)]
sp_lev.c cleanup

* remove several unreachable panic() calls; alloc() already panics
  rather than return a null pointer;
* replace a couple of calls to malloc() with alloc() so that
  MONITOR_HEAP won't produce spurious alloc/free discrepancies;
* replace several instances of variable 'd' with 'd0' so that it
  doesn't conflict with the name of a function;
* comment out opvar_new_region() since it isn't used anywhere.

10 years agolint
PatR [Thu, 23 Apr 2015 02:17:49 +0000 (19:17 -0700)]
lint

10 years agoUnify boulder dropping on player
Pasi Kallinen [Wed, 22 Apr 2015 17:22:51 +0000 (20:22 +0300)]
Unify boulder dropping on player

... and if you're swallowed, make the dropped boulder hit the monster.
(Changes from UnNetHack)

10 years agoFix typo in func decl
Pasi Kallinen [Wed, 22 Apr 2015 10:24:51 +0000 (13:24 +0300)]
Fix typo in func decl

10 years agoFold another instance of "You are rooted" into u_rooted
Pasi Kallinen [Wed, 22 Apr 2015 08:54:27 +0000 (11:54 +0300)]
Fold another instance of "You are rooted" into u_rooted

10 years agoUnify stumbling on door mimic
Pasi Kallinen [Wed, 22 Apr 2015 06:23:54 +0000 (09:23 +0300)]
Unify stumbling on door mimic

10 years agoUnify food-related conducts when eating a monster
Pasi Kallinen [Wed, 22 Apr 2015 06:16:49 +0000 (09:16 +0300)]
Unify food-related conducts when eating a monster

10 years agoUnify hero free hand check and msg
Pasi Kallinen [Wed, 22 Apr 2015 06:02:38 +0000 (09:02 +0300)]
Unify hero free hand check and msg

10 years agoUnify monster gender setting
Pasi Kallinen [Wed, 22 Apr 2015 05:58:04 +0000 (08:58 +0300)]
Unify monster gender setting

10 years agoUnify iron ball unwielding
Pasi Kallinen [Wed, 22 Apr 2015 05:53:13 +0000 (08:53 +0300)]
Unify iron ball unwielding

10 years agoUnify file removed -trickery
Pasi Kallinen [Wed, 22 Apr 2015 05:45:03 +0000 (08:45 +0300)]
Unify file removed -trickery

10 years agoUnify "You are rooted" message
Pasi Kallinen [Wed, 22 Apr 2015 05:35:14 +0000 (08:35 +0300)]
Unify "You are rooted" message

10 years agoMake coalescence message be smart about status
Derek S. Ray [Wed, 22 Apr 2015 01:47:33 +0000 (21:47 -0400)]
Make coalescence message be smart about status

- honor blindness and hallucination
- honor ability to see one of the mergees
- provide audible feedback if appropriate
- merging inside pack gets special-cased so player knows something
  different/unusual is happening

10 years agoUnify dropping boulder on monster
Pasi Kallinen [Tue, 21 Apr 2015 19:40:27 +0000 (22:40 +0300)]
Unify dropping boulder on monster

10 years agoSolidify the astral plane
Pasi Kallinen [Tue, 21 Apr 2015 08:22:30 +0000 (11:22 +0300)]
Solidify the astral plane

...to prevent xorns appearing in the inaccessible map fringes

10 years agomongone vs vault guard
PatR [Tue, 21 Apr 2015 02:45:13 +0000 (19:45 -0700)]
mongone vs vault guard

mongone() would send away a vault guard, whether alive or already
dead and parked at <0,0>, losing the information needed to remove
the temporary vault corridor once whatever obstacle (ie, the hero)
that's keeping it in place has been cleared.  Have mongone() call
grddead() like mondead() does, so that a guard will just be moved
to <0,0> with 0 HP and kept there rather than being purged during
the next dead monster removal.

Move polearm context reset to m_detach() [and, unfortunately,
duplicated in grddead()] rather than in having it in dmonsfree()
since execution of the latter is deferred.  I'm not sure offhand
whether a fast hero could get a second move before end-of-turn
purging of dead monsters.

10 years agoMerge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
keni [Tue, 21 Apr 2015 00:49:51 +0000 (20:49 -0400)]
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource

10 years agoDeveloper.txt: add notes about branches
keni [Tue, 21 Apr 2015 00:49:18 +0000 (20:49 -0400)]
Developer.txt: add notes about branches

10 years agoMake sure can't chat out of the map
Pasi Kallinen [Mon, 20 Apr 2015 15:09:59 +0000 (18:09 +0300)]
Make sure can't chat out of the map

10 years agotribute in-game bonus
PatR [Mon, 20 Apr 2015 07:05:00 +0000 (00:05 -0700)]
tribute in-game bonus

Give 20 experience points the first time the hero reads a passage
from a tribute novel.  It's enough to go from level 1 to 2 or from
2 to 3.  By the time a book store is found, that's too trivial for
most to care about, but it's potentially useful to a pacifist.

10 years agoinvalid escape
nhmall [Sun, 19 Apr 2015 22:56:49 +0000 (18:56 -0400)]
invalid escape
 Changes to be committed:
modified:   win/share/tiletext.c

10 years agoUpdate the tile RGB values and mappings
nhmall [Sun, 19 Apr 2015 21:17:03 +0000 (17:17 -0400)]
Update the tile RGB values and mappings
 Changes to be committed:
modified:   win/share/monsters.txt
modified:   win/share/objects.txt
modified:   win/share/other.txt
modified:   win/share/tile2bmp.c
modified:   win/share/tiletext.c

10 years agoextend the tty statue patch to tiles
nhmall [Sun, 19 Apr 2015 17:31:59 +0000 (13:31 -0400)]
extend the tty statue patch to tiles
 Changes to be committed:
modified:   doc/fixes35.0
modified:   win/share/gifread.c
modified:   win/share/monsters.txt
modified:   win/share/objects.txt
modified:   win/share/other.txt
modified:   win/share/tile2bmp.c
modified:   win/share/tilemap.c

The tty code already had the statue patch included, where
statues are represented by stone versions similar in
appearance to their monster likeness.

This extends it to tiles.

A new pass through the monsters.txt file is done
in tile2bmp to include new modified tiles to the output
file that are gray-scaled versions for mapping to the
NetHack statue glyphs.

10 years agoFix dark room glyphs when searching
Pasi Kallinen [Sun, 19 Apr 2015 07:46:21 +0000 (10:46 +0300)]
Fix dark room glyphs when searching

Searching while blind showed room glyphs as lit even when
dark_room option was on.

10 years agofix "bad fruit #0"
PatR [Sun, 19 Apr 2015 03:18:43 +0000 (20:18 -0700)]
fix "bad fruit #0"

When minimal_xname() set up a dummy object containing as few details
as possible, it wasn't setting up the fruit id field, so xname()
couldn't figure out what type of fruit it had and issued a warning.

I haven't managed a test case that uses minimal_xname so testing of
the fix is less than comprehensive.  [Pasi got it through dopay, but
that only resorts to minimal_xname if the formatted name is really
long and would otherwise cause the shopkeeper's prompt to overflow.
Long fruit name combined with long individual object name wasn't
long enough to trigger that.  Maybe uncursed, greased, rustproof
the like, or possibly just a longer shopkeeper name than I had?]

10 years agorevisit the forcefight crash fix
PatR [Sun, 19 Apr 2015 03:02:40 +0000 (20:02 -0700)]
revisit the forcefight crash fix

The previous fix prevents the crash from 'the()' when NO_GLYPH was
used as an index into the defsyms array, but it resulted in giving
feedback of "you attack thin air" regardless of what was at the
target location, reverting to the situation that the buggy code was
attempting to address in the first place.  Handle that differently
by removing the unseen monster glyph sooner.  Also, the underwater
handling wasn't working as intended.

I blamed Derek's pudding farming patch for introducing the problem,
but all that did was replace the offending line(s) with different
indentation.  The older post-3.4.3 patch which produced the problem
was mine.  Sorry, Derek.

10 years agorevert unneeded lookat() change
PatR [Sun, 19 Apr 2015 01:50:38 +0000 (18:50 -0700)]
revert unneeded lookat() change

The enclosing switch statement is only reached when `glyph_is_cmap' is
known to be true, so remove the redundant extra test.

10 years agosuggested booktribute mods
nhmall [Sat, 18 Apr 2015 21:45:27 +0000 (17:45 -0400)]
suggested booktribute mods
 Changes to be committed:
modified:   include/extern.h
modified:   src/files.c
modified:   src/objects.c
modified:   src/spell.c

- charge a little more.
- no free read in the bookstore.

10 years agoprevent a couple of reported array index segfaults
nhmall [Sat, 18 Apr 2015 19:29:37 +0000 (15:29 -0400)]
prevent a couple of reported array index segfaults
 Changes to be committed:
modified:   src/hack.c
modified:   src/pager.c

Don't use glyph_to_cmap as an array index into
the defsyms[] array unless it really is a cmap.

Recent situation: glyph_to_cmap will return
NO_GLYPH for the unknown monster glyph 'I', which
is not a valid index for the defsyms[] array.

10 years agoAllow wishing for polearm or hammer
Pasi Kallinen [Sat, 18 Apr 2015 14:25:52 +0000 (17:25 +0300)]
Allow wishing for polearm or hammer

which gives a random weapon with the matching skill,
so a random polearm, or a war hammer, respectively.

10 years agoFix saving xlogfile realtime
Pasi Kallinen [Fri, 17 Apr 2015 07:35:05 +0000 (10:35 +0300)]
Fix saving xlogfile realtime

10 years agoadd an initializer
nhmall [Fri, 17 Apr 2015 04:46:54 +0000 (00:46 -0400)]
add an initializer

10 years agoprotect against bad dates
nhmall [Fri, 17 Apr 2015 04:31:22 +0000 (00:31 -0400)]
protect against bad dates

A recent fault on mingw32 revealed that faulty
code which passes a bad or out-of-range date
value could have game-fatal consequences.
Add some protection.

10 years agodate verification
nhmall [Fri, 17 Apr 2015 04:12:53 +0000 (00:12 -0400)]
date verification

10 years agoPrevent divide by zero in newman
Pasi Kallinen [Wed, 15 Apr 2015 18:05:42 +0000 (21:05 +0300)]
Prevent divide by zero in newman

...which happened when your max power was 0

10 years agoPrevent illegal positions for tmp_at
Pasi Kallinen [Wed, 15 Apr 2015 17:35:48 +0000 (20:35 +0300)]
Prevent illegal positions for tmp_at

It seems like m_throw() can call tmp_at() with !isok coordinates,
so prevent those in both functions

10 years agoPrevent infinite loop
Pasi Kallinen [Wed, 15 Apr 2015 17:06:38 +0000 (20:06 +0300)]
Prevent infinite loop

...if the map is filled with monsters, and for some reason
the drowning just won't kill you.

Infinite looping cannot currently happen, because no-one who
can drown can keep surviving the drowning once their amulet
of life saving is used up.

10 years agoPrevent out-of-bounds coords when closing a door
Pasi Kallinen [Wed, 15 Apr 2015 16:43:32 +0000 (19:43 +0300)]
Prevent out-of-bounds coords when closing a door

10 years agoPrevent segfault when looking around inside monster
Pasi Kallinen [Wed, 15 Apr 2015 14:06:39 +0000 (17:06 +0300)]
Prevent segfault when looking around inside monster

A recent change by me introduced a segfault when
counting swallowed hero as a monster inventory item.

10 years agoMove triplicate defines into single place
Pasi Kallinen [Tue, 14 Apr 2015 17:33:30 +0000 (20:33 +0300)]
Move triplicate defines into single place

10 years agoYAFM for magic flute
Pasi Kallinen [Tue, 14 Apr 2015 17:04:46 +0000 (20:04 +0300)]
YAFM for magic flute