Commit Graph

13462 Commits

Author SHA1 Message Date
PatR
c8ceeac24e pull request #763 - noxious nemeses
Pull request from vultur-cadens:  some of the quest nemeses death
messages mention releasing noxious gas or noxious fumes so create
a poison gas cloud for them.

Closes #763
2022-05-15 12:20:10 -07:00
vultur-cadens
a18b7ebad9 Make some quest nemeses leave poison clouds when they die.
The Archeologist, Caveman, and Priest quest texts describe the
nemesis's body producing a cloud of noxious fumes/gas when killed.
2022-05-15 12:19:46 -07:00
PatR
4d9c568a8e \#therecmdmenu #name monster
Implement naming an adjacent monster with #therecmdmenu.

Also plug a memory leak using item-action name or call on objects.
2022-05-15 11:01:44 -07:00
PatR
3a0a92764a more wormgone
When wormgone() takes a long worm off the map, clear its stale mx,my
coordinates.  None of its callers need those anymore.

Also a bit of potential long worm clean up that occurred to me when
I looked at object bypass handling.  Expected to be a no-op here.
2022-05-14 18:10:42 -07:00
PatR
ef08773f2b migrating monster fix
The change to zero out a monster's map coordinates when it is taken
off the map yesterday messed up migration between levels inside the
Wizard's tower.  (Didn't apply when accompanying the hero between
levels, so probably unlikely to be noticed.)

Noticed while moving some replicated code into its own routine.
2022-05-14 03:30:45 -07:00
PatR
87749392b0 more writing novels
Instead of always retaining a blank spellbook when failing to write a
novel, make 2/3 chance to retain and 1/3 chance to destroy.  Same odds
(but separate chance) to attempt to write the Great Yendorian Novel
versus awful fan fiction.
2022-05-13 16:47:00 -07:00
PatR
a1bf4c2786 pull request #761 - writing novels
Pull request by entrez:  don't create a Pratchett novel by writing
"novel" or "paperback book" on a known blank spellbook with a magic
marker.

Blanking a novel produces a blank spellbook; there isn't any blank
novel.  That's intentional.  Writing "novel" on a blank spellbook
and getting a randomly chosen Pratchett one wasn't intentional.

Closes #761
2022-05-13 16:04:02 -07:00
Michael Meyer
92999914c8 Prevent hero from writing Pratchett books
The hero's ability to channel Pratchett and write his books with a magic
marker once she had read or IDed at least one of them seemed strange,
especially cases like an illiterate hero doing it as her first
introduction to the written word.  Block the hero from writing random
novels with a marker.

The image of the hero sitting down in the dungeon to write a novel is
funny, so it feels like a good spot for a funny message.  I'm not
sure if what I have there is perfect, but it can always be changed.
2022-05-13 16:01:04 -07:00
PatR
bb2c1bd115 pull request #760 - kickobjnam
Add pull request by argrath:  only one of the calls to new kick_ouch()
needs to pass 'kickobjnam'.

Closes #760
2022-05-13 15:57:03 -07:00
SHIRAKATA Kentaro
0b00f97766 kickobjnam on dokick() is assigned only kicking object 2022-05-13 15:51:08 -07:00
PatR
1ce457f801 display former possessions of dead monster
Reported directly to devteam by a hardfought player and also by
entrez.  The recent mon_leaving_level() change resulted in objects
dropped by a dying monster not being displayed immediately.

It justed needed the relobj(mon, 0, FALSE) to relobj(mon, 1, FALSE)
change in m_detach() but this does some related cleanup in
mon_leaving_level()'s callers.  wormgone() takes a long worm off the
map but leaves its stale coordinates set because some code relied on
that.  This takes away the need for that but still doesn't actually
clear them.

This adds redundant 'return' statements at the end of a few void
functions that are longer than fits within a typical screen display.
They make searching for the end of the current routine in an editor
or pager easier without resorting to regular expressions and can
also be used to search for the beginning if/when preceding routine
ends in 'return' too.
2022-05-13 14:46:02 -07:00
nhmall
44c225a11e yet more version buf 2022-05-12 20:10:27 -04:00
nhmall
f8b8495144 more version buf 2022-05-12 19:56:16 -04:00
nhmall
fe5cb1011f buf sizes in version.c
there were some 'sizeof buf' on a passed pointer variable buf.
pass the actual buffer size in a second argument.
2022-05-12 19:38:50 -04:00
PatR
0e83e15d6b un-macro some of display.h
I recently captured preprocessor output for a file and the amount of
code being expanded--and subsequently compiled--for canspotmon() was
quite an eye opener.  This converts most of the macros it uses into
function calls.  The resulting executable generated for OSX (built
for x86_64 and containing four interfaces) is about 5.5% smaller! and
there wasn't any difference in speed that I could notice.

The knowninvisible() macro has been in error for as far back as the
git logs go (which include those for the second cvs repository, so
over 20 years now).
2022-05-12 14:42:20 -07:00
nhmall
66e965f878 Don't include /fsanitize=address in vs 2017
Closes #759
2022-05-12 08:05:28 -04:00
PatR
9f1b738d1d recharging
Make "recharging" and "scroll of recharging" be aliases for "scroll
of charging" when wishing.

I thought this had been put in place years ago.
2022-05-11 22:11:42 -07:00
nhmall
c5ec3fc248 Xcode project update 2022-05-11 16:38:27 -04:00
PatR
ebf8396444 redundant "shopkeeper disappears" message
Reported directly to devteam by entrez, the rloc() monst vanishes/
appears nearby/&c message was being given before "satisified, <shk>
suddenly disappears" making the latter redundant.  As discussed, the
fix isn't as simple as suppressing one message or the other because
both are given conditionally.

This seems to solve it but has only been lightly tested.
2022-05-11 13:12:25 -07:00
nhmall
c38e5cba5c correct the qt5 package instructions for ubuntu 2022-05-11 09:47:00 -04:00
nhmall
d486270ec9 warning fix 2022-05-10 21:10:02 -04:00
PatR
97d884585c redo magic whistle feedback
Give more information when magic whistle is already discovered and
applying it affects multiple pets, without much increase in verbosity.
For each of the three categories
 1) was already in view and moves to another spot still in view,
 2) was out of view and arrives at a spot within view,
 3) was in view but gets sent to a spot out of view,
show the pet by name (which might be "your <monst>" if it hasn't been
named) when there is just one, or "two creatures", "three...", "four...",
"several...", or "many..." when there are more than one.  The first
category with more than 1 says "creatures".  When there are additional
categories with more than 1, their part of the message says "others" if
prior part(s) already mention "creatures", or it says "other creatures"
if the prior part(s) only list pets by name.

For example
|Three creatures appear.
|Fido shifts location and Fang appears.
|Your pony shifts location and two other creatures appear.
|Many creatures shift locations, several others appear, and two others
disappear.
|Two creatures appear and two others disappear.
2022-05-10 15:53:24 -07:00
nhmall
6d15142250 fix one more lua file header 2022-05-10 11:30:30 -04:00
nhmall
0602a3b89f update lua file headers 2022-05-10 11:26:52 -04:00
nhkeni
e5648584b3 update headers on Lua files 2022-05-10 07:44:26 -04:00
nhmall
6c12b85a0e missed a reference in README 2022-05-09 17:58:26 -04:00
nhmall
4f851e0165 update README to reflect a recent file name change 2022-05-09 17:55:49 -04:00
nhmall
718365cf03 Merge branch 'pr758' into NetHack-3.7 2022-05-09 17:16:30 -04:00
nhmall
c87f779755 split getting kick damages into separate function
Closes #758 by argrath
2022-05-09 17:15:31 -04:00
SHIRAKATA Kentaro
4da4584633 split getting damages with a kick into separate function 2022-05-10 05:45:39 +09:00
nhmall
b53e76813d bump patchlevel 2022-05-09 09:15:17 -04:00
nhmall
4951cca84e Merge branch 'pr757' into NetHack-3.7 2022-05-09 09:06:50 -04:00
nhmall
a01a26f0a7 split adjusting attributes into separate function
Closes #757 by argrath
2022-05-09 09:05:58 -04:00
nhmall
81528b2853 Merge branch 'fix-do-wear' of https://github.com/argrath/NetHack into pr757 2022-05-09 09:04:56 -04:00
nhmall
7c2d528202 Merge branch 'pr754' into NetHack-3.7 2022-05-09 09:04:22 -04:00
nhmall
011405a15c split kicking empty space into separate function
Closes #754 by argrath
2022-05-09 09:03:24 -04:00
nhmall
c8a866cc14 Merge branch 'fix-kick' of https://github.com/argrath/NetHack into pr754 2022-05-09 09:02:01 -04:00
nhmall
9db8bd93df Merge branch 'pr748' into NetHack-3.7 2022-05-09 08:56:19 -04:00
nhmall
d3f98917e9 fixes entry for pr748 2022-05-09 08:55:40 -04:00
nhmall
200302e15f Merge branch 'altarmask-sanctum-bit' of https://github.com/entrez/NetHack into pr748 2022-05-09 08:47:02 -04:00
nhmall
17cb7646c2 follow-up bit in utf8map.c 2022-05-09 07:46:54 -04:00
SHIRAKATA Kentaro
037683581f split adjusting attributes into separate function 2022-05-09 20:38:15 +09:00
nhmall
0aaa114a46 rgbstr_to_uint32() -> rgbstr_to_int32()
Closes #756
2022-05-09 07:31:30 -04:00
PatR
da83c9324a magic whistle fix
Restore old behavior of magic whistle causing pets to be moved to
different locations even when already adjacent to the hero.

This lets rloc() give its relatively new, more verbose messages if
a magic whistle isn't discovered yet but suppresses those when
already discovered in order to issue its own message.  For a single
pet that starts within view and arrives elsewhere within view it says
"shifts location" rather than "vanishes and reappears".  For multiple
pets, it gives one summary message instead of a separate one for each
pet affected by whistling.
2022-05-09 03:21:53 -07:00
nhmall
2047d42bc6 regression in process_text_window()
original code:

     if (linestart && (*cp & 0x80) != 0) {
         g_putch(*cp);
         end_glyphout();
         linestart = FALSE;
     } else {
         (void) putchar(*cp);
     }

new code:

    if (linestart) {
        if (SYMHANDLING(H_UTF8)) {
            /* FIXME: what is actually in that line? is it the \GNNNNNNNN or UTF-8? */
            g_putch(*cp);
        } else if ((*cp & 0x80) != 0) {
            g_putch(*cp);
            end_glyphout();
        }
        linestart = FALSE;
    } else {
        (void) putchar(*cp);
    }

The new code didn't output a character if linestart was true and the character did
not have bit 0x80 set.

fixed code:

    if (linestart) {
        if (SYMHANDLING(H_UTF8)) {
            /* FIXME: what is actually in that line? is it the \GNNNNNNNN or UTF-8? */
            g_putch(*cp);
        } else if ((*cp & 0x80) != 0) {
            g_putch(*cp);
            end_glyphout();
        } else {
            (void) putchar(*cp);
        }
        linestart = FALSE;
    } else {
        (void) putchar(*cp);
    }
2022-05-08 20:27:00 -04:00
nhkeni
c6c61a1419 Lua sandbox
Change table format to handle functions never to be included.
Clean up bit masks and tables of functions.
Remove some old comments and out-of-date code.
2022-05-07 17:45:36 -04:00
nhmall
b74ba33eed tile.c must match target for crosscompile 2022-05-07 15:06:43 -04:00
nhmall
3101727fc0 more preprocessor and multiplatform cleanup
in wintty.c
2022-05-07 15:00:11 -04:00
nhmall
e4f85df216 Revert "some follow-up for MSDOS build"
This reverts commit 36d3b64326.
2022-05-07 14:34:06 -04:00
nhmall
36d3b64326 some follow-up for MSDOS build
The preprocessor directives in win/tty/wintty.c were crossed-up
under MSDOS build. I think I got them straightened out now.

For a crosscompile situation, the tilemap utility (which runs on
the host) needs to produce an output src/tile.c that is compatible
for the target platform.

Don't use ENHANCED_SYMBOLS under MSDOS, for now anyway.
2022-05-07 13:08:02 -04:00