Commit Graph

4682 Commits

Author SHA1 Message Date
Pasi Kallinen
4e067f5f2b Show level annotation on level entry
Idea by Chris Smith, via Unnethack
2015-04-26 10:46:42 +03:00
nhmall
8624709c0d comment termination bit 2015-04-25 15:49:14 -04:00
nhmall
07c5467434 checkfile protection from caller
Changes to be committed:
	modified:   src/pager.c
2015-04-25 10:51:07 -04:00
Pasi Kallinen
5828d17eef 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.
2015-04-25 15:19:19 +03:00
Pasi Kallinen
5479a0b44c Also allow q at the Itemized billing -prompt
Original change via AceHack by Alex Smith
2015-04-25 12:56:55 +03:00
PatR
27d8b631cd 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.
2015-04-25 02:11:13 -07:00
Pasi Kallinen
672ef5223a Fix adding doors to levels 2015-04-25 12:00:44 +03:00
Pasi Kallinen
8e6dde226f Fix out-of-map condition in buzz 2015-04-25 06:24:43 +03:00
PatR
1eff16afcb 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.
2015-04-24 16:07:00 -07:00
nhmall
65e699b646 fix an observed stack corruption
Changes to be committed:
	modified:   src/pager.c
2015-04-24 11:23:07 -04:00
keni
24eb44a8c0 force date change (another mail test) 2015-04-24 10:11:17 -04:00
keni
de87c7550c and fill in the line (another mail test) 2015-04-24 10:01:00 -04:00
keni
34508d5df2 add a date line (another mail test) 2015-04-24 09:56:24 -04:00
keni
5e39fdffde Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-24 09:33:35 -04:00
keni
2774278607 enable subst for all DEVEL/*.txt (really another mail test) 2015-04-24 09:32:50 -04:00
Pasi Kallinen
1369b17e3b Stop travel or run when you get hungry 2015-04-24 16:24:50 +03:00
keni
a2dcc89838 force the date (really testing email) 2015-04-24 09:11:33 -04:00
PatR
ce58721890 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).
2015-04-24 02:18:07 -07:00
PatR
d65fba4ebe 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.
2015-04-23 19:25:01 -07:00
Pasi Kallinen
aea472c0c0 Give honorifics to vampires and elves 2015-04-23 21:46:10 +03:00
Pasi Kallinen
ea6157c475 Give gnomes occasionally a candle
...and if in unlit area, light the candle.
2015-04-23 21:19:25 +03:00
Pasi Kallinen
23ad7a8635 Hallucinated currencies
Originally via UnNetHack by Patric Mueller
2015-04-23 20:30:59 +03:00
Pasi Kallinen
fbf787c4fe 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!".
2015-04-23 19:27:12 +03:00
PatR
ae6eeec22a 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.
2015-04-22 19:47:55 -07:00
PatR
51a70d0277 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.
2015-04-22 19:18:57 -07:00
PatR
16d8074352 lint 2015-04-22 19:17:49 -07:00
Pasi Kallinen
5a42ce4040 Unify boulder dropping on player
... and if you're swallowed, make the dropped boulder hit the monster.
(Changes from UnNetHack)
2015-04-22 20:22:55 +03:00
Pasi Kallinen
ed164ad324 Fix typo in func decl 2015-04-22 13:24:51 +03:00
Pasi Kallinen
65dcf2e2cc Fold another instance of "You are rooted" into u_rooted 2015-04-22 11:54:27 +03:00
Pasi Kallinen
bd69677933 Unify stumbling on door mimic 2015-04-22 09:23:54 +03:00
Pasi Kallinen
75e7d837e6 Unify food-related conducts when eating a monster 2015-04-22 09:16:49 +03:00
Pasi Kallinen
6d4aa312e6 Unify hero free hand check and msg 2015-04-22 09:02:38 +03:00
Pasi Kallinen
171e8284cd Unify monster gender setting 2015-04-22 08:58:04 +03:00
Pasi Kallinen
3bf2d17e2c Unify iron ball unwielding 2015-04-22 08:53:13 +03:00
Pasi Kallinen
34d5a4c1f9 Unify file removed -trickery 2015-04-22 08:45:03 +03:00
Pasi Kallinen
2783157f95 Unify "You are rooted" message 2015-04-22 08:35:14 +03:00
Derek S. Ray
0bef94cfde 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
2015-04-21 21:47:33 -04:00
Pasi Kallinen
c9bb75eaf3 Unify dropping boulder on monster 2015-04-21 22:40:27 +03:00
Pasi Kallinen
a155d1d474 Solidify the astral plane
...to prevent xorns appearing in the inaccessible map fringes
2015-04-21 11:22:34 +03:00
PatR
7bbf292c92 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.
2015-04-20 19:45:13 -07:00
keni
32ed364086 Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource 2015-04-20 20:49:51 -04:00
keni
04f6fe8e51 Developer.txt: add notes about branches 2015-04-20 20:49:18 -04:00
Pasi Kallinen
bac7654a75 Make sure can't chat out of the map 2015-04-20 18:09:59 +03:00
PatR
6cad21e4e8 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.
2015-04-20 00:05:00 -07:00
nhmall
09920871f2 invalid escape
Changes to be committed:
	modified:   win/share/tiletext.c
2015-04-19 18:56:49 -04:00
nhmall
0827c0df9d 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
2015-04-19 17:17:03 -04:00
nhmall
56c4475c20 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.
2015-04-19 13:31:59 -04:00
Pasi Kallinen
460538b618 Fix dark room glyphs when searching
Searching while blind showed room glyphs as lit even when
dark_room option was on.
2015-04-19 10:47:05 +03:00
PatR
7ba63a868a 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?]
2015-04-18 20:18:43 -07:00
PatR
8246c1b7c7 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.
2015-04-18 20:02:40 -07:00