Commit Graph

11474 Commits

Author SHA1 Message Date
Bart House
fcd74aedf4 Added mingw build. 2020-12-14 00:28:36 -08:00
Bart House
f89005efd7 Make compiling the lua interpreter optional. 2020-12-14 00:24:05 -08:00
Bart House
d88749e419 Working on getting WinGW building with Azure pipeline.
Fix typo recently introduced.  Allow LUATOP to be specified by pipeline.
2020-12-13 20:38:56 -08:00
Bart House
e5fb08ae4e Switch mingw build to use submodules in default path. 2020-12-13 20:31:01 -08:00
Bart House
d58a034721 Merge branch 'master' into NetHack-3.7 2020-12-13 20:17:12 -08:00
Bart House
93a49c7845 Adding pdcurses submodule for MinGW build. 2020-12-13 19:44:15 -08:00
Bart House
b18cbdb160 Improvements to azure pipeline. 2020-12-13 18:55:35 -08:00
PatR
e9d729733b bargethrough/monster-vs-monster displacing
Fix the regression that monster movement flag unification
introduced for monsters able to swap places with adjacent
monsters.  It used to be restricted in order to prevent
Riders swapping places with other Riders so that they didn't
repeatedly exchange places when one was right behind the other
and the farther one moved first.  Then when displacer beasts
were added, that restriction was extended to prevent them
swapping places with Riders (but not the other way around.)
The flags change inadvertently let any displacer swap with any
other displacer.
2020-12-13 15:51:23 -08:00
PatR
04724fc5a0 Qt: remove "Search [______]" from Help menu
Prevent Qt from inserting an extra entry in the Help dropdown
menu displayed in the menu bar across the top of the screen
when nethack has focus.  "Search [______]" lets the user enter
a string to search for but doesn't give nethack any control
over that so we can't have it.

I haven't found a sane way to get rid of it.  The insane way
of not naming any menu "Help" works.  This uses "\177Help" so
that it still looks like "Help" but won't match that string.
2020-12-13 13:45:04 -08:00
nhmall
c1b0f4e47a Xcode updates 2020-12-13 12:24:35 -05:00
nhw_cron
abb21797e7 This is cron-daily v1-Jan-20-2020. files updated: Files 2020-12-13 12:02:05 -05:00
nhmall
1a369f1af0 ensure a rebuild of include/nhlua.h after fetching Lua source 2020-12-13 10:40:02 -05:00
nhmall
8c42d306f7 purge trampoli.h 2020-12-13 10:27:49 -05:00
Pasi Kallinen
4729062846 Make Death revive faster
Death will revive faster than the other riders.
Make all the riders revive after 67 turns, instead of 500.
There was practically a zero chance a rider would revive at 500,
so keep it somewhat sensible.
2020-12-13 12:28:45 +02:00
Michael Meyer
02ba5e4811 Improve consistency of polearm targeting rules
Multiple functions are involved in the process of targeting and
attacking an enemy with a polearm or lance, and these functions
previously used inconsistent tests to determine which targets were
legal.  For instance, find_poleable_mon would give up immediately if the
hero was blind, while neither get_valid_polearm_position nor use_pole
cared as long as the hero could detect a target on the square (e.g. by
ESP).  find_poleable_mon considered warning symbols as potential
targets, but use_pole discarded them.  get_valid_polearm_position
considered moats and pools to be illegal targets, but use_pole would
let the hero successfully hit a monster on those squares; on the
other hand, get_valid_polearm_position would mark squares that were not
visible and did not contain a known monster as legal targets, while
find_poleable_mon and use_pole would exclude them.

Obviously this was inconsistent and could introduce confusion for
polearm users, who would potentially need to explicitly target squares
marked "(illegal)" at some point over the course of their game, among
other problems.  This commit makes polearm targeting tests more
consistent; the following rules are applied to positions within the
appropriate range:

* Monsters which are detected by any means that reveals an actual
  monster glyph are legal to target, even if the hero is blind

* Monsters the hero cannot detect, but is aware of -- i.e. those
  represented by an 'I' -- are similarly legal to target

* Monsters detected via warning are not legal targets, since the hero
  does not have as strong a sense of where exactly they are, their shape
  and size, etc

* Statues are legal targets, but will not be suggested by
  find_poleable_mon unless the hero is impaired (confused, stunned, or
  hallucinating); the same is true of tame/peaceful monsters

* Apparently empty squares, including those containing an undetected
  monster, are legal to target unless they cannot be seen (whether due
  to blindness or a very dark room/level)

* Positions which are otherwise legal but are blocked by an obstruction like a
  tree or pillar are not legal targets
2020-12-13 11:05:48 +02:00
Bart House
939b1c00dd Fix azure pipeline build for linux/mac. 2020-12-12 21:41:24 -08:00
PatR
b7a140d006 towel adjustments
Consolidate a small amount of duplicate code from wet_a_towel()
and dry_a_towel().
2020-12-12 14:22:21 -08:00
PatR
bc7fb05dcf Makefile vs lua fix
I've been ignoring submodules so far.  For the old method of
dealing with lua, the instructions

You might need to do
  make spotless
  make fetch-lua

aren't adequate.  They should be

When lua version has changed in Makefile.top, before running
setup.sh to put that new Makefile in place, do
  make spotless
then
  sys/unix/setup.sh [hints/...]
  make fetch-lua

otherwise it will try to clean up the not yet fetched new lua
version instead of the old one.
2020-12-12 14:10:18 -08:00
PatR
25bcbe3846 fix github pull request #418 - towel wetness
Fire damage would dry out a wet towel but never all the way to 0.
Water damage would wet a towel but if it was already wet, its
wetness might decrease.

This uses the pull request's change for increasing the wetness
but changes dry_a_towel so that the original code for decreasing
that will work as is.  Using wet_a_towel() to set wetness to 0
doesn't make much sense, so still won't do so; dry_a_towel() does
and now will.

This also adds missing perm_invent update for towels in inventory
changing wetness.

Fixes #418
2020-12-12 12:04:20 -08:00
Bart House
bbc5cee97f Fix Azure pipeline introduced by only checking out a single repository.
If checking out a single repository, the repository is checked out
to the path $(Agent.BuildDirectory)\s instead of
$(Agent.BuildDirectory)\s\<name of repository>.  Modified checkout
to hard code path to avoid this change in behavior.
2020-12-12 11:47:44 -08:00
Pasi Kallinen
704b11fb05 Add some new demonic and angelic maledictions
From SpliceHack
2020-12-12 20:54:04 +02:00
PatR
8d65d6dbf0 fix #H3134 - selling container for credit
If a container holds anything that a shop wouldn't ordinarily
buy and sell and you sell it for gold, the 'foreign' contents
are marked no_charge and hero still owns them.  But selling the
same container+contents for credit instead of gold would take
shop possession of all the contents without increasing the
credit amount.

The fixes entry is longer than the fix.  It solves cited case but
I won't be surprised much if it messes up some other case(s).
2020-12-11 22:32:38 -08:00
nhw_cron
f489328836 This is cron-daily v1-Jan-20-2020. files updated: Files 2020-12-11 22:52:01 -05:00
nhmall
d008d6c995 use .Substring to limit maintenance to major Lua version releases only 2020-12-11 22:35:37 -05:00
Bart House
fe874db0b3 Fix Windows build break caused by bump to lua 5.4.2.
Modified Windows build to use submodules/lua for lua source.
2020-12-11 18:45:44 -08:00
PatR
5b709fcb55 Qt text search crash fix
About 5 weeks ago, commit e4106bb161
changed Qt's searching in text windows to be able to find a match
on the very first line.  It assumed that the first line would be
the current line except when repeating the same search after a
match.  But after a failed search the current line index is -1 and
starting a new search would crash trying to look that line up.
2020-12-11 18:11:27 -08:00
PatR
0d0900b3a4 dowhatis formatting for Qt
The '/' command's variants /o, /O, /m, and /M use spaces to
align output in columns and that looks quite bad if rendered in
a proportional font.  Qt normally uses proportional font for
text windows but it watches the supplied lines for any with four
consecutive spaces and forces fixed-width font if it sees any.
So changing the existing separator line from "" to "    " makes
Qt format the dowhatis data as intended.
2020-12-11 17:15:21 -08:00
PatR
51e967ee42 warning suppression - unused static routine 2020-12-11 17:01:43 -08:00
nhmall
6dc033e5d8 don't miss the special furniture checks during liquid flow
Closes #405
2020-12-11 16:28:59 -05:00
nhmall
abca3d26db another Lua version bit, this one a recent addition 2020-12-11 15:34:43 -05:00
Pasi Kallinen
ea93c17fa7 Monsters can revive corpses on floor with undead turning
... but only if the corpse is in direct line from the monster to hero
2020-12-11 19:49:25 +02:00
nhw_cron
d5a8f783e0 This is cron-daily v1-Jan-20-2020. files updated: Files 2020-12-11 09:30:05 -05:00
nhw_cron
ee6645cdaf This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-12-11 09:29:52 -05:00
nhmall
cb84c555d7 more Lua 5.4.2 bits 2020-12-11 09:25:01 -05:00
nhmall
affb60dd97 support for build with current Lua version 5.4.2
This may require
    	make spotless
    	make fetch-lua
for some platforms.
2020-12-11 09:20:26 -05:00
nhmall
0d1a894661 move .travis.yml to outdated for now 2020-12-11 09:11:09 -05:00
nhmall
69455f404e Guidebook date bump 2020-12-11 08:46:39 -05:00
PatR
6f5a1ccc63 fix Guidebook thinko
Fix the recently revised description of "#version".
'windowtype' doesn't have an underscore in it.
2020-12-11 05:26:00 -08:00
PatR
e2680bfc4a add the hardcoded menu control keys to key help
'? k' shows menu controls in a fancy layout and '? i' lists the
same things in basic layout but both only showed the keys that
can be changed via option settings.  Add <return>, <space>, and
<escape> so that all relevant keys are listed together whether
re-bindable or not.  The description of <space> is accurate for
tty and curses but possibly not for other interfaces.

This also reorders how the controls are listed, moving next page
and previous page before first page and last page, and placing
invert between select and deselect rather than after both.
2020-12-11 05:10:43 -08:00
nhw_cron
6e960a4667 This is cron-daily v1-Jan-20-2020. guidebook updated: doc/Guidebook.txt 2020-12-10 20:24:37 -05:00
PatR
80a3c0c4d2 key rush.numpad/M-5 doc 2020-12-10 15:32:23 -08:00
PatR
fd5ef1ecaa more key bindings
number_pad==1 adds
 '5' => 'G'
 M-5 => 'g'
 '0' => 'i'
number_pad==2 swaps 5 and M-5 and adds M-0
 '5' => 'g'
 M-5 => 'G'
 '0' => 'i'
 M-0 => 'I'

M-5 and M-0 were missing from the bound key handling; they still
used hardcoded digits even though the actions for plain 5 and
plain 0 can be bound to other keys these days.  This implements
the M-5 variation as NHKF_RUSH2.  Changing numpad from 1 to 2
or vice versa will swap the NHKF_RUN2 and NHKF_RUSH2 actions
regardless of what keys they're assigned to.  I haven't done
anything for unimplemented NHKF_DOINV2 though (and am not
planning to in case someone else wants to jump in...).

This also fixes the description of the 'I' command.  The extended
command name for that still misleadingly refers to "type" rather
than "class" though.
2020-12-10 15:06:26 -08:00
Pasi Kallinen
971ea03b9e Remove accidental compile warning flags 2020-12-10 22:14:07 +02:00
Pasi Kallinen
eb1fb93d06 Mark unused parameters 2020-12-10 22:08:32 +02:00
Pasi Kallinen
0dc6792b80 Fixes bit for unifying the traps 2020-12-10 19:04:31 +02:00
Pasi Kallinen
f936cd9887 Remove unused variables 2020-12-10 19:04:31 +02:00
Pasi Kallinen
fd665a180a Unify trap selector 2020-12-10 19:04:31 +02:00
Pasi Kallinen
e6142f1149 Unify vibrating square 2020-12-10 19:04:31 +02:00
Pasi Kallinen
d537ceb2c4 Unify magic portals 2020-12-10 19:04:31 +02:00
Pasi Kallinen
31a7f2b4d8 Remove unused label 2020-12-10 19:04:31 +02:00