Commit Graph

6736 Commits

Author SHA1 Message Date
Pasi Kallinen
2ee6412a2f Fix X11 segfault when quitting without dumplogfile defined
Guard dumplog-specific output by checking we actually are putting
the output into the dumplog.

This is a post-3.6.0 bug.
2018-03-20 17:37:56 +02:00
PatR
906818f5cb wishing for containers
Noticed while investigating the broken chest whose lock was already
broken:  wishing for locked, unlocked, or broken chest (or large box)
was treated as asking for something unknown.  Add support for those
three prefixes, although they only have meaning for chest and box.
If more that one is specified in the same wish, whichever one comes
last overrides the others.

Also, "empty" was already an accepted prefix (for tins); honor it for
containers too.

Lastly, wishing for "box" failed.  Give a large box instead.  I went
back and forth about whether to do the same for "small box" and ended
up not including it, but turns out that small/medium/large prefix for
globs ends up making "small box" and "medium box" match "box" which
has now become a synonym for "large box".  I'm not sure whether that
is a bonus or a bug; small box is clearly not the same thing as large
box, but getting the only available box when asking for any box seems
better than claiming not to understand the request.
2018-03-19 17:59:24 -07:00
PatR
0419f097f1 fix #H6960 - redundant feedback for '#force'
When using #force at a spot which has a broken or unlocked chest (or
large box) whose lock state has been previously discovered, avoid
|There is a broken chest here, but its lock is already broken.
|There is an unlocked chest here, but its lock is already unlocked.
by suppressing "broken"/"unlocked" from the chest description for
that particular message.

We might still want to change "broken chest" to "damaged chest" but
I don't think there should be any reference to its lock as the reason
it's broken or damaged.  The fact that #loot, #force, and applying a
key still treat it as a container is sufficient to reveal that it
functions as one.
2018-03-19 15:48:46 -07:00
nhmall
7238803b25 revert box naming 2018-03-19 07:13:07 -04:00
Pasi Kallinen
b85b7b93f0 Typofix 2018-03-19 08:22:14 +02:00
Alex Kompel
d6e43a32ec win32-gui: fix truncated status fields call to get dimensions of the text bounding rectangle needs to be made after the font is set in order to get the accurate reading 2018-03-18 23:00:23 -07:00
Alex Kompel
60454b4f92 win32-gui: Do not auto-assign non-alphabet accelerator characters to menu items. Picking up pile that contains gold forces accelerators to start with $ so the next one becomes %, ... 2018-03-18 23:00:16 -07:00
nhmall
5b03dccb19 missed one, transcription error 2018-03-18 10:29:45 -04:00
nhmall
1d5f67c9ed misplacement 2018-03-18 10:11:51 -04:00
nhmall
ff67fac614 remove a couple where normal man->men rules should apply 2018-03-18 10:09:45 -04:00
nhmall
1ab2c25c9a another dictionary consulted, another couple of prefixes 2018-03-18 09:54:18 -04:00
nhmall
d8b12eefe7 just a couple of additional pluralization bits 2018-03-18 09:24:38 -04:00
nhmall
8ce08d3cf9 3rd time fixes36.1 2018-03-18 09:09:08 -04:00
nhmall
168d5171b7 typo in fixes36.1
locks -> lock
2018-03-18 08:52:34 -04:00
nhmall
e7ed6508cd more message adjustments to chests with broken locks 2018-03-18 08:49:25 -04:00
nhmall
e07c6b5b77 broken large box wording change
> When you try to #force a large box or chest whose lock is already broken from a
> previous #force, the game tells you "There is a broken large box here, but its
> lock is already broken." It's minor, but this implies that the box being broken
> is separate from the lock being broken (as well as that the box itself *can* be
> broken).

change the wording to "lock-damaged box" and suppress
", but its lock is aleady broken" when "lock-damaged box" has
already been displayed.

(Nobody particularly likes the wording "lock-damaged box" either, but at least
it seems less misleading)
2018-03-17 23:05:52 -04:00
nhmall
f2d92426cc more plural refinement 2018-03-16 22:34:13 -04:00
PatR
c43b19a6d2 sys/unix/gitinfo.sh
Avoid '[[ ... ]]' to cater to a more rudimentary shell.
2018-03-16 00:39:05 -07:00
nhmall
c42dc27330 ox tweak 2018-03-15 22:19:28 -04:00
nhmall
467e3bfdab more pluralization bits
Handle more *man and *men cases.

Some plural usage of completely made up fruit names that should
be entered in singular form but have what appears to be a
valid plural name it will end up singularized. Not much
we can do about that for ficticious words.

For instance, if you try to name your fruit bigmen or snakemen
and you intended that to be the singular name, NetHack will likely
singularize it to bigman or snakeman.

Many real dictionary words that end in "men", however, should
be handled a wee bit better now. A real word such as stamen,
for example.
2018-03-15 22:02:41 -04:00
PatR
877f403734 fix plural of box
"boxen" may be hacker slang for plural of "box", but "foxen" is
definitely not the plural of "fox".  Restrict the "ox"->"oxen"
entry to full word "ox", not "*ox" suffix.
2018-03-15 13:05:08 -07:00
Pasi Kallinen
aac0a21a7e Make graves white
Making them easy to distinguish from walls.
2018-03-15 18:42:25 +02:00
Pasi Kallinen
a785663c58 Attempting to open down or at yourself is same as #loot
Trying to open at the same location as you did nothing,
make it loot instead. Apparently #looting is also annoying
when using vi-keys.

Based on code by aosdict
2018-03-14 20:15:21 +02:00
Pasi Kallinen
cbf6f83a8b Fix the filename in qt4 hints file 2018-03-14 19:02:07 +02:00
Pasi Kallinen
b331d4643b Update Files
I don't know how the automatic Files update should work,
so adding the Qt4 files manually.
2018-03-14 18:44:28 +02:00
PatR
c28b44c27c prevent pline() segfault
The use of debugpline() in tty_curs() got me wondering what would
happen if debugpline() was called while pline() is in progress.  I
don't know how to trigger the bad coordinate situation, so I put an
unconditional debugpline() in the NHW_MESSAGE case of tty_putstr()
and used DEBUGFILES=wintty.c to enable it.  Instant segfault, and
the backtrace was short and not useful so the stack might have been
clobbered.  I didn't spend any time trying to figure where or why
the segfault occurred.

Change pline() so that if it is called while the previous pline()
hasn't finished yet (ie, recursively), use raw_print() and return
early.  The raw_print message isn't very useful--it pops up wherever
the cursor happens to be, just like the cursor position bug that has
been an issue recently--but does get delivered without any segualt
and isn't completely useless if DUMPLOG is enabled and you save or
quit before the message buffer gets recycled.  Message readability
situation could be improved but avoiding the segfault was my goal.

Putting any debugpline() into *_raw_print() would be inadvisable....
2018-03-13 11:27:04 -07:00
nhmall
0b6e26d9e0 windows spotless bit 2018-03-12 08:47:37 -04:00
nhmall
ae6a391997 fix an out of range issue on WIN32 tty 2018-03-11 23:38:00 -04:00
nhmall
4e086caceb ensure tty_curs() behaves the same whether DEBUG defined or not
ensure tty_curs() behaves the same whether DEBUG defined or not
when it comes to positioning the cursor.

The return statement, in the debug case only, was preventing
the cursor from being moved following a range check, so the
next output was written whereever the cursor happened to be
previously.

The messaging that detects the failed range check will get
written in the DEBUG defined case hopefully allowing resolution
to the range check failure, but now the cmov will still
be attempted just as it is in the case where DEBUG is not
defined.
2018-03-11 23:29:06 -04:00
PatR
152d9e7705 fix #H6955 - wielded potion 'object lost' panic
Report classified this as 'segfault' but it's actually a controlled
panic().  When hero has lycanthropy and is wielding a potion of unholy
water while in human form, if that potion is boiled then it triggers
a transformation to beast form which in turn causes wielded weapon to
be dropped.  When the code unwinds back up through potionbreathe() to
destroy_item(), the boiled potion won't be found in inventory any more
and useup() -> useupall() -> freeinv() -> extract_nobj() panics.
2018-03-11 12:39:01 -07:00
PatR
f026e37573 last gitinfo bit?
If dat/gitinfo.txt is being created from scratch, say so instead of
saying "updated".
2018-03-10 12:55:28 -08:00
PatR
ddb830911e more Unix gitinfo
When make uses 'makedefs -v' to create date.h, force it to create
gitinfo.txt all the time instead of just when that doesn't already
exist.  Use 'make GITINFO=0' to get the previous behavior.

To skip it entirely, you need to do that and also make sure that
some file by that name already exists.  'touch dat/gitinfo.txt' or
perhaps 'echo "#no git" > dat/gitinfo.txt' would suffice.
2018-03-10 12:32:52 -08:00
Pasi Kallinen
4f459a9532 Fix WINCHAIN compilation 2018-03-10 21:48:22 +02:00
nhmall
6fc324798e H5239 not hypocrisy to speed up your own pet
H5239 1100
2018-03-10 13:17:21 -05:00
nhmall
6586e9204b pluralization special case tweak
mongoose -> mongooses, not mongeese
2018-03-10 11:28:01 -05:00
nhmall
5fece7b175 pluralization bits 2018-03-10 10:43:34 -05:00
PatR
e408c48bb3 mplayer valkyries w/ Mjollnir
If an mplayer Valkyrie on the Astral Plane is given a war hammer,
give her gauntlets of power instead of random gloves since that will
either be Mjollnir or a very wimpy endgame weapon.  (Maybe someday
mplayer Valkyrie's will be able to throw Mjollnir; their chance of
having it on the Astral Plane is moderately high if it hasn't already
been created prior to arriving there.)

I also gave monsters wearing gauntlets of power a 3..6 damage bonus
for hand-to-hand.  While making that change, I noticed that monsters
wielding a scalpel or tsurugi wouldn't split puddings, unlike the
hero (a post-3.6.0 change), so fix that.
2018-03-09 14:11:04 -08:00
PatR
cba6761ee6 Files update
I'm not sure of the status for possibly maintaining 'Files' via
automation, so manually add the new file 'gitinfo.sh' to sys/unix.
There was a sys/unix/hints file that wasn't listed, so add linux-qt4.
The whole win/Qt4 subdirectory is missing though.  I don't even
remember that being added.
2018-03-08 10:26:08 -08:00
PatR
03da0190fb nhversioning update
Update dat/gitinfo.txt if the current branch is different from the
one recorded in the file, not just when the commit hash is different.

Make the usual output less verbose so that it fits within 80 columns.
2018-03-06 17:16:49 -08:00
PatR
a43b2086e4 stuck_in_wall tweak
When divine aid granted temporary Passes_walls ability to stuck hero,
it was giving 4d4 turns (4..16, avg 10).  But the first warning that
it's timing out is given at 4 turns left so wouldn't be seen if the
random amount of time picked was the minimum.  Switch to 4d4+4 (8..20,
avg 14) so that the message at 4 turns left will always happen.
2018-03-05 12:26:44 -08:00
PatR
8279aa4384 removing a monster from current level
I ended up not using this, but it might as well be included for
potential future use.  Extend mlevel_tele_trap() to support forcing
a monster off the current level to make room either for the hero or
some other monster.  goto_level() does something similar when the
hero is arriving on a level.  This is for situations where the hero
is already there (such as divine aid attempting to fix STUCK_IN_WALL).

mlevel_tele_trap(mon, (struct trap *) 0) will usually move 'mon' off
the level, scheduled to migrate back if the hero leaves the level and
subsequently returns.  'Usually' because it doesn't work in endgame
and certain monsters are excluded regardless of dungeon location, so
caller has to be prepared to try to move another monster (or resort
to goto_level()'s unconditional forced migration).
2018-03-05 12:01:31 -08:00
Pasi Kallinen
b416564f39 Fix garbage value warning 2018-03-05 21:09:15 +02:00
PatR
4d35ca86f3 gitinfo.txt on Unix
Hide the scary perl command during 'make all' feedback in src/.
I'm not a shell programmer but this works fine for me when skipping
NHgithook::NHversioning because dat/gitinfo.txt is already present,
when creating dat/gitinfo.txt successfully, and when creation fails
because perl can't find NHgithook.pm.  It hasn't been tested when
perl itself is absent.
2018-03-04 14:17:13 -08:00
nhmall
2317288150 more nmake spotless 2018-03-04 10:37:43 -05:00
nhmall
a120d99005 msc makefiles update timestamp on copied files 2018-03-04 10:30:17 -05:00
nhmall
dee2fea82d msc Makefile 2018-03-04 10:25:11 -05:00
nhmall
12562694a9 update nmake spotless for windows 2018-03-04 10:09:35 -05:00
nhmall
939bd356a4 more msc makefile tweaks 2018-03-04 09:54:29 -05:00
nhmall
777317224b windows cmdline dependency bit 2018-03-04 09:11:01 -05:00
nhmall
eddfcc4422 windows cmdline Makefile 2018-03-04 09:07:16 -05:00