Commit Graph

8042 Commits

Author SHA1 Message Date
PatR
fcd38bdbef couple of interface comments 2019-05-05 13:38:58 -07:00
PatR
a8550fc0e7 ball&chain sanity checking
Add a bc sanity check.  It seems to work ok--in other words, not
trigger--under normal punishment.  I don't have any test cases to
exercise its warnings.

This dragged in a couple of minor bc changes that were pending.  I
should have cleared those out before tackling the sanity checking.
2019-05-05 13:33:30 -07:00
Pasi Kallinen
bed2c2307e Fix monster trapped state being wrong
When cloning a monster, clear the clone trapped and hiding states.
When splitting a monster (eg. a black pudding), the clone could
be placed on a trap, so do mintrap.
When removing a monster from the map, clear the trapped state.
2019-05-05 22:58:27 +03:00
Pasi Kallinen
f55e9ddd7c Fix impossible if monster cannot be relocated from tele region 2019-05-05 22:30:20 +03:00
nhmall
40e7eb7e2a sync recent wording change in history 2019-05-05 14:16:49 -04:00
nhmall
79cc1aa01a Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2019-05-05 13:34:38 -04:00
nhmall
c74e36a359 some updates for 3.6.2 2019-05-05 13:33:59 -04:00
keni
fe055cd6bc This is cron-daily v1-May-5-2019. guidebook updated: doc/Guidebook.txt
to 948099800b722f9be0e8f9c8d4d96cfda5cea98e
2019-05-05 13:32:53 -04:00
PatR
86195d4ad2 display.c formatting
Miscellaneous cleanup of display.c.
2019-05-02 15:22:29 -07:00
Pasi Kallinen
f303fd2872 Database fixes
Merge barbed devil entry to already existing one.
Replace spaces in the beginning of lines with tabs.
2019-05-01 13:38:57 +03:00
PatR
0dc85b93b4 fix github issue #188 - #chat to succubus/incubus
Fixes #188

The change to fix setting SEDUCE=0 in sysconf broke chatting with
seductive demons by unintentionally changing the way Null attack
argument was handled.  It's still handled differently than it used
to be, but I think this difference is correct.
2019-04-30 11:35:06 -07:00
Pasi Kallinen
f17cfc977b Add the missing int param 2019-04-29 20:45:18 +03:00
Pasi Kallinen
1a4223faac Unify code for cure self spell 2019-04-29 18:50:08 +03:00
PatR
c4ae9115cb fix github issue #187 - 'reassess' panic with Qt5
Fixes #187

Qt5 gave "status 'reassess' before init" panic at start of new game.
Don't call status_initialize(REASSESS) from set_usamon()--used for
hero setup as well as for hero polymorph--unless it was previously
called from display_gamewindows() with !REASSESS [which happens when
windowprocs.wincap2 has WC2_STATUS_HILITES or WC2_FLUSH_STATUS set].
2019-04-28 17:32:16 -07:00
PatR
75db8e004d fix #H8612 - splashes of venom might stay intact
If a poly'd hero spits venom and it lands at a 'soft' spot such as
water, it would remain as an intact venom object.  (Venom spat by
monsters seems to always be used up regardless of where it lands.)
2019-04-25 07:11:42 -07:00
PatR
f838967c04 vampshifting Vlad
Vlad keeps his own form when carrying the Candelabrum, but if you
manage to get that away from him he should behave like other vampires.
He wasn't though; a high level wizard casting polymorph on him would
change him into an arbitrary monster rather than into a wolf/bat/cloud
that revives as Vlad when killed.
2019-04-24 16:59:44 -07:00
PatR
f441696908 fix #H8619 - hallucination vs vampire transform
|The seemingly dead vampire bat rises as a vampire.
was overriding hallucination when describing both old and new forms.
In 3.6.0 it only overrode the dying shape (explicitly so, presumeably
because the feature was brand new) and honored hallucination for the
revived shape.  The 3.6.1 fix to prevent non-hallucinating:  'The
seemingly dead Foo rises as Foo.' for a named vampire unintentionally
overrode hallucination for the revived shape.

Change it to honor hallucination for both before and after monsters
|The seemingly dead grid bug rises as a microscopic space fleet.
2019-04-24 14:02:09 -07:00
nhmall
82353f1965 enum bit 2019-04-22 14:27:41 -04:00
nhmall
dcf4da2150 preserve dknown field between fakeobj instances
Preserve temporary fake object's previous dknown value by storing it
as a flag value within the m_ap_type field of the posing monster, and
recalling it when it is needed.

This is intended to help eliminate observable differences in price display
between real objects and mimics posing as objects.

98% of this is just switching the code to utilize macro M_AP_TYPE(mon)
everywhere to ensure that the flag bits are stripped off when needed.
2019-04-22 14:17:18 -04:00
PatR
cd6b5ef933 mimicking a corpse
Noticed while looking over mimic hiding.  When on an object, a mimic
will hide as that type of object.  But for a corpse, it picked a random
monster type and could choose one that doesn't leave a corpse.  Also as
a tin it would always be an empty one, but there doesn't seem to be any
way for a player to learn that.
2019-04-20 16:00:29 -07:00
PatR
ab4625a6bf quantum mechanic hits
Noticed while trying to find the reason for the wildmiss impossible(),
you could be teleported and then drop dead at the destination.  A QM's
AD_TLPT hit also does 1d4 physical damage which gets applied after the
teleport.  Getting "You die." seemed pretty strange, particularly after
picking the destination with telport control.  This makes sure that the
damage will never be fatal when teleport is attempted.
2019-04-19 17:32:36 -07:00
PatR
edd412e56c VMS config1.h
Some port of yacc was generating '#include <stdlib.h>' before our
'#include "config.h" and needed a specific define from config1.h to
be supplied on the command line to avoid conflicting contents within
that header file, but then config1.h drew complaints about redefining
the macro.  Guard against that.
2019-04-19 12:42:35 -07:00
PatR
6c84ccc241 status 'fieldorder'
DEC C in one of its non-ANSI modes didn't like
 fieldorder = test ? &array1 : &array2;
It first complained that '&' applied to an array has no effect (which
was typically true in pre-ANSI environments) and once those '&'s are
ignored, the attempted assignment didn't match the variable's type.
That code was actually more complicated that it needed to be; slightly
simpler code works as intended.
2019-04-19 12:28:14 -07:00
PatR
4aa673c20e fix #H8579 - mimics mimicking shop objects
Showing the price of a shop object when examining it with '/' or ';'
didn't include a price if it was actually a mimic.  This makes fake
objects have prices when appropriate, but it is only a partial fix
because moving away from a mimic causes nethack to forget the fake
object's dknown flag for most types of objects.

That could be solved by adding an mobj field to mon->mextra, which
will break save compatibility, or by adding a whole extra set of
object glyphs for object-with-dknown-set.  The latter could probably
be done without breaking backwards save compatibility (new program
using old files) but it seems like more effort that it'd be worth and
it would break forwards save compatibility (old program attempting to
use new files--something we've never claimed to support).
2019-04-18 15:41:54 -07:00
PatR
5bc6bb0f49 another bit of reformatting 2019-04-17 19:01:47 -07:00
PatR
bbe4991a7f monster movement comments
A bit of reformatting and a couple of new comments.  No change in
behavior.
2019-04-17 18:57:14 -07:00
PatR
7088247883 vms update revisited
Redo the UCHAR_P handling from df84da3ec2
(5 weeks ago) and 02b21865fd followup.
The earlier #define was happening too late in the #include sequence;
tradstdc.h is processed before global.h+(vmsconf.h,unixconf.h,...).

Also, DEC C in 'common' mode complains about indented '#' starting a
line but not in column 1.  Putting #pragma in column 2 was deliberate
in case of an ancient compiler which doesn't understand that directive.
Splitting the difference via non-indented '# pragma' may or may not
mollify the latter when it's bypassing conditionally excluded code.
2019-04-15 13:48:27 -07:00
PatR
0776a864f1 slightly better shop repair feedback
During shop repair, give a message about the shopkeeper using a spell
(if hero is close enough) before "Suddenly, <various repairs occur>."
And when shop repair is for a single untrap of landmine or bear trap
adjacent to shk (and the hero can see it happen), say "<Shk> untraps
<trap>" rather than just "Suddenly, a trap is removed from the floor!"
2019-04-13 17:28:26 -07:00
PatR
5534eab514 probing fix
For the inventory of a probed monster, if the probing took place in
a shop the inventory display would have selling price appended to
all the items.  That wouldn't really be a problem if it was just for
a pet who was carrying one shop item, but it applied to every item
being carried by any probed monster (including shopkeeper) with no
regard for whether the shop actually claimed ownership.
2019-04-13 15:57:16 -07:00
PatR
fa98c6fb72 fix #H8534 - thrown pick-axe vs "scum!"
[I accidentally left this out of the earlier patch.]

Change in meaning of mnearto()'s return value wasn't progagated to
shkcatch(). Make it an int instead of boolean so that it can
communicate both 'moved successfully' and 'moved but had to move
another monster out of the way to do so'.
2019-04-12 01:33:42 -07:00
PatR
86e5022293 fix #H8534 - thrown pick-axe vs "scum!"
Change in meaning of mnearto()'s return value wasn't progagated to
shkcatch().  Make it an int instead of boolean so that it can
communicate both 'moved successfully' and 'moved but had to move
another monster out of the way to do so'.
2019-04-11 15:38:51 -07:00
nhmall
558216e0c5 Guidebook.tex corrections 2019-04-10 17:22:18 -04:00
PatR
14ad5356e5 another STATUS_HILITES optimization
When highlighting is disabled due to 'statushilites' being 0, don't
bother checking whether any temporary highlights are timing out.
2019-04-10 04:29:10 -07:00
PatR
2e30f6916f more !STATUS_HILITES
No point in checking for timed out temporary highlights if there aren't
any highlights.
2019-04-09 17:45:32 -07:00
PatR
2724c88191 Guidebook update
Tweak the status hilites section.  Add a bit of detail about how to
specify both color and attribute and/or multiple attributes.  Also,
change the Guidebook's table of status fields to be column-oriented.
With the exception of 'score', reading down the three columns now
matches going across the status lines.  The previous ordering started
row-oriented but then became scrambled compared to the usual display.

As usual, Guidebook.tex is best guess....
2019-04-09 15:46:19 -07:00
PatR
24d09e64a3 tty blink & dim attributes
Enable blink and dim for the TERMLIB + !NO_TERMS configuration of the
tty interface.  Blink now works the same as in the curses interface
for status highlights.  The terminal emulator I'm using has an escape
sequence for dim but it evidently doesn't do anything (same no effect
as with curses), so that isn't adequately tested.
2019-04-09 13:16:54 -07:00
nhmall
730f9684eb vs nhsetup bit 2019-04-09 00:41:12 -04:00
nhmall
5258bb0ed4 adjust for recently released MS Visual Studio 2019
win\curses\cursstat.c(886) : error C4703: potentially uninitialized local pointer variable 'p' used
2019-04-09 00:35:02 -04:00
PatR
0e425d645f curses vs !HILITE_STATUS
The curses interface wouldn't build with HILITE_STATUS disabled.  I
started adapting it to handle genl_status_update() but that was taking
too much effort with each niggling detail leading to another.  This
goes the opposite direction:  forcing the old STATUS_VIA_WINDOWPORT
behavior without having that #define available.  That dragged along a
bunch of unexpected changes too.
2019-04-06 15:53:51 -07:00
PatR
f52e9865f2 fix #H8481 - placing monster at <0,0>
mon_arrive() -> m_into_limbo() -> migrate_to_level() -> wormgone()
followed by place_monster() "for relmon".  relmon() was changed (last
November, cc5bb44a9a) to not require
the monster be on the map, so just get rid of the place_monster() that
was trying to put the "gone" long worm at <0,0>.

Also, another m_into_limbo() bit:  make mdrop_special_objs() check the
location and send any dropped items to random locations if the monster
dropping things isn't on the map, instead of placing them at <0,0>.
2019-04-06 12:57:29 -07:00
PatR
0bfd12dd16 tty status
Take care of a minor 'TODO' and make another stab at getting truncated
encumbrance and/or level-description to reset to full size when enough
space becomes available.
2019-04-06 05:36:29 -07:00
PatR
b7a884289d botl.c functions
Put the prototypes for routines in botl.c into the same order as the
corresponding functions are in the file.  Also a few were missing and
another few used STATIC_OVL when STATIC_DCL was appropriate.
2019-04-06 01:08:16 -07:00
PatR
8c4e792770 curses ">>" (terse "--More--")
I've noticed many instances of the game pausing and not being sure why,
then pressing <space> and having it resume.  The curses interface had
a tendency to put its equivalent of the --More-- prompt, >>, somewhere
where that wasn't visible, either off the right hand edge (possibly) or
underneath the window borders if those were enabled.  Especially the
very last one it issues prior to exit.  (An extra one compared to tty
behavior.)

This ended up being a pretty substantial overhaul of message window
handling.  I wouldn't be surprised if it has off-by-one errors which
happen to be paired up and cancel each other out.  ">>" is still drawn
in orange if guicolor is on, now in inverse video when that is off.
If it happens to be drawn at the same screen location in consecutive
instances, the first ">" will toggle between blink and not blink so
that there'll be no doubt as to whether the keypress registered when
dismissing it (moot if the text preceding it is different but there's
no attempt to be smart enough to check that, just screen placement).
2019-04-04 17:55:40 -07:00
PatR
00aa7206f7 opthelp bit 2019-04-04 15:08:56 -07:00
keni
1386d39b32 Merge branch 'NetHack-3.6.2-beta01' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2-beta01 2019-04-04 17:01:48 -04:00
keni
e0e937e7b6 Solaris hints files from Kevin Smolkowski 2019-04-04 17:00:51 -04:00
PatR
e5fea0291e curses prompting
Make the same fix to curses that was done for tty in 3.6.1:  don't
let MSGTYPE entries be matched against prompt strings.  Like tty,
curses was using ordinary pline() to issue prompts; something like
MSGTYPE=hide"yn"
could wreak havoc.  Switch to custompline(OVERRIDE_MSGTYPE,...).
2019-04-04 13:52:14 -07:00
PatR
505997a702 couple of comment tidbits 2019-04-03 18:31:25 -07:00
PatR
add4d4d724 untested build fix for term_attr_fixup()
modified:
  sys/mac/mttymain.c
  sys/msdos/video.c
  sys/winnt/nttty.c
2019-04-02 07:38:57 -07:00
PatR
be966cfe5a curses ^P msg_window:Full
This changes the recently added msg_window:f for curses to start
viewing the old messages on the last page rather than the first.  For
msg_window:Reversed (the default for curses) and for either direction
when all of the message history happens to fit on one page, there's
no change.  But for multiple pages, the FIFO feedback now pads the top
of the first page with blank lines so that the last page is full, and
it starts out showing that last page first.  So if you only want to go
back few or several messages, they will be in view immediately.

Old layout:
|first message (oldest)   |  |1st message of last page |
|2nd message of 1st page  |  | ...                     |
| ...                     |  |final (most recent) mesg |
| ...                     |  | (blank filler)          |
|last message of 1st page |  | (blank filler)          |
|             (1 of 2) => |  |          <= (2 of 2)    |
and ^P started with first page visible and needed normal menu handling,
<space> or '>' or '|', to go forward to view the most recent messages.

New layout:
|1st message of last page |  | (blank filler)          |
|2nd message of last page |  | (blank filler)          |
| ...                     |  |first message (oldest)   |
| ...                     |  | ...                     |
|final (most recent)      |  |last message of 1st page |
| <= (2 of 2)             |  |    (1 of 2) =>          |
and ^P starts on last page (two of two in this example) but can go
back with '<' and '^'.

So if the total size takes one and third pages (which isn't uncommon
for the default number of kept messages), you'll see 3/4 of the most
recent messages on the initial screen, then you can page backward if
you want to see the other 1/4.

The page indicator is deliberately drawn a bit differently just to
draw attention to the fact you're starting on the last page.  I'm not
sure whether that is actually worthwhile but it was trivial to do.
2019-04-02 01:11:59 -07:00