Commit Graph

4372 Commits

Author SHA1 Message Date
nhmall
2355209f3c Merge branch 'NetHack-3.6.2' 2018-09-14 18:27:53 -04:00
nhmall
5f551553db Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-14 18:27:06 -04: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
1ea24ee1b9 Merge branch 'NetHack-3.6.2' 2018-09-11 08:51:32 -04:00
nhmall
726fb95f97 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-11 08:51:04 -04:00
nhmall
fc7b79a192 Merge branch 'NetHack-3.6.2' 2018-09-11 08:50:07 -04:00
Pasi Kallinen
c7c21c264e Remove unnecessary spaces from couple messages 2018-09-11 15:39:13 +03:00
nhmall
3ac2041656 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-11 08:23:12 -04:00
nhmall
59019910b5 heed OPTIONS=symset:default in config file in windows and msdos 2018-09-10 15:27:05 -04:00
Ray Chason
8dbaafbb7b Ignore Win32 build products 2018-09-10 21:13:10 +03:00
Ray Chason
cdfb9cb744 Linux and Mac: ignore .moc files created in src 2018-09-10 21:12:53 +03: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
nhmall
e7e3fe8622 Merge branch 'NetHack-3.6.2' 2018-09-07 08:30:20 -04:00
nhmall
83c96c88f6 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-07 08:29:41 -04: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
17bdd76cd2 Merge branch 'NetHack-3.6.2' 2018-09-03 08:58:04 -04:00
nhmall
6d2217cdfc Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-09-03 08:57:34 -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
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
nhmall
5ddcad1ca7 Merge branch 'NetHack-3.6.2' 2018-08-31 07:17:46 -04:00
nhmall
8dee5ff686 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-08-31 07:15:26 -04:00
Pasi Kallinen
d2eba695c8 Use DEADMONSTER instead of checking mhp 2018-08-30 20:05:18 +03:00
PatR
f1d0636ba0 fix wiz identify bugs
Fixes #124

Fix github pull request #124 which was also reported directly (but not
through the contact form so #Hxxx number).  Using ^I or #wizidentify
displays inventory with everything ID'd for that command only and adds
a menu entry "_ - use '^I' to identify" that can be chosen to make
those ID's persistent.  Picking underscore would work but picking the
alternate '^I' wouldn't work if the platform had unsigned characters
for plain 'char'.  Switch the return value from magic number -1 to
magic number ^I which isn't a valid inventory letter and isn't subject
to sign conversion.  Casting -1 to '(char) -1' would have worked too
despite some confusion expressed in discussion of the pull request.

If ^I has been bound to some other command and #wizidentify hasn't
been bound to any keystroke, temporary ID didn't disclose any extra
information (ie, acted like ordinary inventory display) and the extra
menu entry to make temporary ID become persistent wasn't available.
This fixes that too.
2018-08-29 19:19:49 -07:00
Pasi Kallinen
987516cedb Split string parsing and monster creation out of create_particular 2018-08-28 20:16:11 +03:00
Pasi Kallinen
599edde94d Fix monsters not wielding digging implements
My change to unify the pet and monster digging weapon choosing
made monsters not actually wield the chosen weapon, even though
they could still dig as if they did. Pets behaved properly.

Also add an explicit check for IS_STWALL so they won't keep
switching away from their current weapon until needed.
2018-08-28 18:15:46 +03:00
PatR
95b9205168 fix #H7354 - incorrect material
for parchment and vellum spellbooks.  Parchment and vellum are made
from animal skin rather than from plants, so classifying spellbooks
with those descriptions as paper is inaccurate.  Changing them to be
made out of leather has a couple of side-effects:  eating them while
polymorphed will break vegetarian conduct and polymorphing them might
result in a leather golem rather than a paper one.

I left "leathery spell book" as paper since that directly refers to
the cover.  The composition shouldn't be changed--the pages of such
a book are still made out of paper--but the effect of eating one
possibly should.  (That description originally was "leather" and got
changed.  I don't remember the details and assumed it was due to odd
wishing behavior, but there's a commented-out routine in eat.c which
suggests it was related to eating instead.  Anyway, "leathery" is
still non-leather.)
2018-08-27 19:13:54 -07:00
Pasi Kallinen
bf10a70de0 Make it clear when a leprechaun dodges your attack
It was not obvious what was happening when a leprechaun dodged
your attack. Add a message to explicitly spell it out.
Code by aosdict.
2018-08-26 18:43:25 +03:00
Pasi Kallinen
43dc3bdf5f Hallu YAFM for stumbling onto an undetected monster
Pokemon reference. Based on an idea by aosdict.
2018-08-26 17:55:16 +03:00
Pasi Kallinen
6b79355494 Make wish prompts not remember the input
With EDIT_GETLIN, the wish prompt remembered the previous input,
but this isn't actually useful.
2018-08-26 12:18:16 +03:00
PatR
083e0904db another fix fox "killed, while helpless"
Augmented death reason with appended "while <helpless-reason>" was
broken in 3.6.0 and got fixed shortly after release (too late to
prevent high-score files from being corrupted).  Then within a
couple of weeks it got broken again, and doesn't work in 3.6.1
either (but in this case, it is omitted instead of being cloned
to all following score entries).  The problem is in both record
and logfile, but not xlogfile, so we could create a fix up routine
that would use the last to repair record (and perhaps logfile).
But having two fixup routines would probably lead to confusion.

The problem this time was bad logic in the fix for
|alter name of monster causing hero's death if name contains
|    characters that could cause confusion when using record,
|    logfile, or xlogfile later
killerformat() was going out of bounds of the input string and
using up all of 'siz' so that there was never room to append the
", while helpless" suffix.
2018-08-23 18:01:00 -07:00
PatR
78c5173cd1 shop damage repair
Fixes #121

Fix githib issue #121 - shopkeepers don't charge for consecutive
acts of vandalism on the same square.  pay_for_damage() keys its
action on the 'when' field of the damage structure, and when a
second type of damage gets added to existing damage, that wasn't
being updated.  Both bits of damage (broken door or dug wall plus
trap created at same spot) get repaired together but shopkeeper
wasn't challanging hero to pay for the second one (trap).

The repair process had issues too.  If you broke a shop door, paid
off the shopkeeper, then left the level before the repair took
place and came back after (or rather, catching up for lost time
repaired it when you returned to the level), it didn't actually
get fixed and remained a doorless doorway that was considered to
have been successfully repaired (record of damage discarded).
Unless there was also a trap there; then the door did get properly
fixed when the trap was removed.

Object scattering during wall repair was bypassed if trap removal
took place.

Also, trap removal while off level still gave messages when it took
place after you returned.  I didn't try to verify that; it's possible
that vision is in a state where you can't see the repair even if you
return to a spot where it would be visible.  But the return value
from the repair routine was one which wanted a message instead of
the one to suppress messages.

Not addressed:  digging a pit inside a shop (aside from in doorway
or breached wall) is not treated as damage which should be repaired.
This includes the case of digging up a grave which converts the spot
into ordinary floor (plus pit trap).
2018-08-22 17:41:54 -07:00
nhmall
772d352652 resolve a merge conflict that got by into master 2018-08-16 08:09:40 -04:00
nhmall
6f4b2ffbad Merge branch 'NetHack-3.6.2' 2018-08-16 08:01:22 -04:00
nhmall
4eaf09bdd0 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-08-16 07:58:57 -04:00
PatR
320d592dfd fix github issue #125 - grave gold not buried
Fixes #125

When a random grave included some gold among whatever treasure was
generated, that gold was left on top of the grave instead of being
buried inside it like other treasure.

I'm sure this was intentional but only because mkgold() puts the
gold on the ground and merges it with other gold if there is already
some present.  Keeping an existing stack of gold distinct from the
new one in order to bury the latter is feasible but clumsy.  Just
make a new gold object directly, bypassing mkgold(), and bury that.
2018-08-15 18:33:37 -07:00
PatR
854155dfa9 git pull request #123 - wallification vs map edge
Fixes #123

Make sure wallification doesn't go out of bounds when operating
near the map edge.  The top and left edges were ok (although the
left edge could uselessly try to wallify unused column 0) but the
right and bottom ones weren't validating the map boundary.  None
of the 3.6.x levels were affected.

I've done this a little differently from the suggested commit in
the pull request.
2018-08-14 18:06:59 -07:00