Commit Graph

7048 Commits

Author SHA1 Message Date
PatR
3eded06669 fix #H7156 - perm_invent
Bug report #H7156 listed three items, all relating to perm_invent:
1) it shouldn't persist across save/restore since restore might be
   on a system which doesn't have enough room to display it (report
   actually complained that config file setting was ignored when
   restoring old games, which is an expected side-effect for options
   that persist across save/restore);
2) permanent inventory wasn't updated when using scroll of charging;
3) attempts to update permanent inventory during restore could lead
   to crash if it tries to access shop cost for unpaid items.
Items (2) and (3) have already been fixed.  This fixes (1).

Replace 'flags.perm_invent' with a dummy flag, preserving save files
while removing it from flags.  Add 'iflags.perm_invent' to hold the
value of the perm_invent option.

The win32 files that are updated here haven't been tested.  Whichever
branch contains the curses interface needs to be updated; ditto for
any other pending/potential interfaces which support perm_invent.
2018-09-14 17:34:33 -07:00
PatR
2c231f57bd git pull request #133 - reassess worn equipment
Fixes #133

Monsters who lost an amulet of life saving while having their life
saved wouldn't attempt to put on another amulet unless/until they
picked up some object.  Likewise if they had a worn item stolen.
(There are probably other events which should re-check worn gear.)

The suggested commit had a life-saved monster re-check equipment
during life-saving which might have led to reports about them
effectively getting extra moves, especially if two-weapon fighting
or zap rebound with sequence of kill/life-save/kill-again allowed
the target to put on a replacement amulet of life-saving prior to
the second kill.  It also wasn't amenable to dealing with stolen
equipment.  This alternate fix sets a flag to have monster check
its equipment on its next move.
2018-09-14 15:08:22 -07:00
Pasi Kallinen
e37087e999 Handle monsters inside the invocation area 2018-09-14 21:49:02 +03:00
Pasi Kallinen
97b2ba2e54 Mimics created by #wizgenesis blocked vision incorrectly 2018-09-14 21:07:08 +03:00
PatR
37f8d0edb3 fix #H7385 - double trap activation when jumping
Jumping performs the placement of the last step after using hurtle()
to move to the destination, so if hurtle() triggered a trap then it
would happen twice.  Report was for a Sokoban pit but it would happen
for fire traps too.  Other traps would yield "you pass over <trap>"
while hurtling and then trigger the trap when landing.  Have
hurtle_step() ignore a trap for the last step of a jump, leaving it
to the jump's landing to handle.

Also, give feedback when hurtling over water or lava, similar to what
happens when passing over a previously seen trap which doesn't
activate.
2018-09-13 17:10:25 -07:00
nhmall
7d4a7a1f42 tty column placement of BL_HUNGER and BL_CAP could collide
Change the placement of the code that makes a replica of the
current status fields for later comparison.

A loop shortcut was causing it to be skipped under some
circumstances and that was negatively impacting the placement
of status field values that were further to the right.
2018-09-12 19:42:45 -04:00
Pasi Kallinen
b33b66aa29 Qt: Remember the tile and font size
The QT_TILEWIDTH and QT_TILEHEIGHT read from NetHack config file
override the remembered settings.
Also set the smallest tile size to 6x6
2018-09-12 18:43:10 +03:00
Pasi Kallinen
c7c21c264e Remove unnecessary spaces from couple messages 2018-09-11 15:39:13 +03:00
nhmall
59019910b5 heed OPTIONS=symset:default in config file in windows and msdos 2018-09-10 15:27:05 -04:00
Pasi Kallinen
8210f81618 fixes update 2018-09-10 21:33:41 +03:00
Ray Chason
c13eed7369 Qt4: Hide buttons not matching typed command
There are way too many buttons on the extended command window.
Let the user type a letter or two, and hide the buttons that don't
match.
2018-09-10 21:13:32 +03:00
Ray Chason
25f770509a -ansi -pedantic can't come after -std=c++11 2018-09-10 21:13:28 +03:00
Ray Chason
3479c471dd Qt on Win32: changes needed for Win32
* Fix an include directory
* Use strchr instead of index
* play_usersound conflicts with another function
2018-09-10 21:13:24 +03:00
Ray Chason
7de9266b04 Qt on Win32: add stub for Qt window_procs 2018-09-10 21:13:20 +03:00
Ray Chason
41fdc79b7b Qt on Win32: resolve conflict over boolean type 2018-09-10 21:13:14 +03:00
Ray Chason
8dbaafbb7b Ignore Win32 build products 2018-09-10 21:13:10 +03:00
Ray Chason
3fc2373ca2 Add build configuration for Qt 4 and 5 2018-09-10 21:13:05 +03:00
Ray Chason
6894e464d4 Win32: delete the o directory only if it exists 2018-09-10 21:13:00 +03:00
Ray Chason
5be0044c62 Add -lgdi32 to conlibs, needed to link 2018-09-10 21:12:56 +03:00
Ray Chason
cdfb9cb744 Linux and Mac: ignore .moc files created in src 2018-09-10 21:12:53 +03:00
Ray Chason
e7a3390d74 Add build products to make spotless
Win32 Makefile.gcc now cleans up all build products except the binary
directory.
2018-09-10 21:12:47 +03:00
Ray Chason
5e04a6e6cb New hints file for Qt 5 on Mac OS X 2018-09-10 21:12:17 +03:00
Pasi Kallinen
2ef07ad178 Qt4: Fix compile warning 2018-09-10 21:09:58 +03:00
Pasi Kallinen
249494c8ee Qt4 moc is moc-qt4
At least on my Debian, the Qt4 MOC is now called moc-qt4,
when it used to be just moc - probably due to Qt5 being moc-qt5
2018-09-10 21:06:37 +03:00
Ray Chason
08ef5ff99f Provide Qt 5 configuration on Linux
* CXX specifies -std=gnu++11
* WINQT5LIB variable added
* Hints file can specify CXX and MOC
2018-09-09 18:10:20 +03:00
nhmall
4be2467cc9 win32 gui bits
fix an index out-of-bounds
status hitpoint bar behavior at zero hp to match tty
2018-09-08 08:54:35 -04:00
PatR
b572ccb014 web spinning
This started as some formatting cleanup but I've added a couple of
additional terrain features which can act as web support (stairs up
and ladder up).

The message "<Spider> spins a web" was given if you could detect or
sense <spider> rather than see it.  I've changed that to only happen
if you see the new web appear rather than the critter spinning it
(it only becomes an unseen trap if you don't watch it appear).

After spinning a web, a spider can't spin another one until 4d4 moves
have elapsed.  That seems suitable when the spider can be seen but
isn't really adequate throttling when the spider is far away--it can
end up spinning a lot of webs by the time you get to its vicinity.
Perhaps it shouldn't be able to spin a new web if there is already
one with N steps of its location?
2018-09-07 18:12:03 -07:00
Pasi Kallinen
2122506ebe Spiders will occasionally spin webs
Idea and code inspired by aosdict
2018-09-07 20:26:18 +03:00
PatR
533234f13d arg type mismatch
This was right in 3.4.3 but got changed way back in 2004.
No effect on play and unlikely to be complained about by any
compiler.
2018-09-06 16:28:42 -07:00
PatR
4ce6d81d60 hilite_status type 'up' or 'down' vs strings
The temporary highlight types 'goes-up' and 'goes-down' aren't useful
for the three string status fields (title, dungeon-level, alignment)
since the string values might go up when the underlying value goes up
or might go down instead (and similarly for down, down, up).  The code
involved can compare strings but the values are effectively arbitrary
so the comparison is only really useful for same vs changed.  This
treats types 'up' and 'down' for strings as 'changed' when coming from
config file and no longer offers them as choices when using 'O'.

Config file parsing perhaps ought to treat them as errors instead.
2018-09-06 05:26:21 -07:00
nhmall
c00b698b4a hitpointbar bit for prior commit 2018-09-05 20:47:16 -04:00
nhmall
ec43a80e9e stop tty hitpointbar from jumping to 100% health at zero hit points 2018-09-05 20:21:59 -04:00
nhmall
878823ad8a another mswproc bit - remove enum values from comments 2018-09-03 08:52:16 -04:00
nhmall
ec2258ae70 mswproc.c bit 2018-09-03 08:49:47 -04:00
nhmall
a417d67572 status_update distinguish new BL_RESET from BL_FLUSH
This adds BL_RESET to status_update to send a flag to a window
port that every field should be updated because something has
happened in the core to make current values shown to be
untrustworthy or potentially obliterated.

That is now distinguished from BL_FLUSH, which now has no
bearing on whether every field needs to be redone, and instead
can be used by a window port indicator that it is time to render
any buffered status field changes to the display.

tty port now sets WC2_FLUSH_STATUS indicator for BL_FLUSH support
and now does one rendering per bot() call, instead of up to 22.

Side note: The tty hitpoint bar code was relying on the old
behavior of redrawing everything upon BL_FLUSH apparently, so it
initially had some color change lag issues, corrected by marking
BL_STATUS as dirty (in need of updating) in tty_status_update()
whenever BL_HP was marked as dirty.
2018-09-03 08:18:18 -04:00
nhmall
0b32735ff8 ensure BL_FLUSH always sent when context.botlx is set
ensure BL_FLUSH always gets sent down to the window port whenever bot() is
called with context.botlx set so that status updates work as
expected after full screen clear after a level change

Fixes #107
2018-09-02 18:26:42 -04:00
nhmall
6594805811 transformation message when you apply a figurine
make the transformation message of a deliberate apply of a figurine seem
a bit less definite when blind. Put 'I' unseen monster marker at the spot
you expect it to be.
2018-09-02 18:20:40 -04:00
nhmall
7bc0ce66e6 Revert "transformation message when you apply a figurine"
This reverts commit e2b187f2f1.
2018-09-02 18:11:03 -04:00
nhmall
9323f074f7 Revert "ensure BL_FLUSH always gets sent down to the window port whenever bot() is"
This reverts commit ee4c12b238.
2018-09-02 18:10:40 -04:00
nhmall
ee4c12b238 ensure BL_FLUSH always gets sent down to the window port whenever bot() is
called with context.botlx set so that status updates work as
expected after full screen clear after a level change

Fixes #107
2018-09-02 18:05:16 -04:00
nhmall
e2b187f2f1 transformation message when you apply a figurine
make transformation message of a deliberate apply of a figurine seem a bit
less definite when blind. Put 'I' unseen monster marker at the spot you
expect it to be.
2018-09-02 17:54:00 -04:00
nhmall
b77f559d58 quiet a new visual studio compiler complaint from recent code change
..\src\hack.c(2553): warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'int (__cdecl *)(void)'
2018-09-01 15:07:19 -04:00
nhmall
d32347aae3 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2018-09-01 14:54:36 -04:00
nhmall
1462f69f54 reports on windows of partial status lines after level change
tty: turn off an optimization that is the suspected cause of Windows reported
	partial status lines following level changes. It was turned on for
        non-unix platforms only
2018-09-01 14:52:47 -04:00
Pasi Kallinen
27d7f216c7 Split pickup checks out of dopickup 2018-09-01 20:45:51 +03:00
Pasi Kallinen
9e35a94097 Fix pickup awful hack
If pickup has been bound to some other key than ',', the awful hack
did not work correctly. Testing, I couldn't notice the difference,
but probably just not doing the right thing...
2018-09-01 20:15:19 +03:00
nhmall
cd9c0e880a adjust wizidentify title and prompt 2018-09-01 11:16:08 -04:00
nhmall
5a44a34420 wizidentify suppress unnecessary prompt; allow individual items for perm ID
Don't display the selection to identify all items if there are none.

Complete an item marked ToDo in cmd.c: allow selection of one or more
particular items to permanently identify rather than just all or nothing.
2018-09-01 10:43:26 -04:00
PatR
111cfa0ff4 Guidebook update
I noticed that the description of ^O still referred to the 3.6.0
behavior (either #wizwhere or #overview depending upon play mode)
rather than the 3.6.1 behavior (unconditional #overview).

While updating that I changed a bunch of "Wizard-mode" references
to "Debug mode" which is the proper end-user name.

I slightly expanded the descriptions of #wizdetect, #wizgenesis,
\#wizintrinsic, WIZKIT, and Debug mode, and removed at least one
out of date reference to debug mode being a conditional feature.

And for most of the stuff I was looking at, I changed the nroff
source to honor the roff guideline of having each sentence start
on its own line (and also the latex source to use those same line
breaks even though they don't need it).

Not done:  a lot of quoted single characters use 'c' instead of `c'
(pair of ticks rather than back-tick and normal tick).  One form
or the other should be changed so that they're all consistent.
I'm pretty this was mentioned the last time it was formatted for
the web site.

Guidebook.mn has been tested, Guidebook.tex has not.
2018-08-30 15:42:06 -07:00
Pasi Kallinen
d2eba695c8 Use DEADMONSTER instead of checking mhp 2018-08-30 20:05:18 +03:00