Commit Graph

8129 Commits

Author SHA1 Message Date
nhmall
656e18786e Merge branch 'NetHack-3.6.2' 2018-12-25 22:12:44 -05:00
nhmall
ed6ff9ce82 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-25 22:06:23 -05:00
PatR
cae50298b6 container_contents() vs show goods
Fix another inconsistency with containers in shops:  prices shown when
looking inside.  Apply had them (because shop goods in containers are
flagged as 'unpaid' when hero carries the container), and loot did not
(because they aren't flagged that way).
2018-12-25 17:07:45 -08:00
PatR
96eebc1955 bill hero for magic bag explosion
Exploding a bag of holding on a shop floor didn't bill for shop-owned
contents which got destroyed.  This puts them on the 'Ix' used up list.
2018-12-25 16:52:33 -08:00
PatR
5f5f7f63f1 stolen_value() vs containers
stolen_value() treated hero-owned container holding shop-owned goods
as free for the taking.

The fix I'm working on which led to discovering this first added
stolen_value() then eventually stopped using it so I don't have an
example of where it is giving the wrong result.
2018-12-25 16:45:41 -08:00
nhmall
d7194709bd Merge branch 'NetHack-3.6.2' 2018-12-25 16:54:00 -05:00
nhmall
54fef9e737 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-25 16:53:40 -05:00
PatR
3aca92215c prices of items on shop floor
get_cost_of_item() was giving different information from shop #chat
when dealing with containers owned by hero containing objects owned
by the shop.  And when it was legitimately reporting a price of 0,
doname_with_price() wasn't reporting 'no charge' for items inside a
shop that were owned by hero or that shopkeeper didn't care about.

Extend the shop price reveal to far-look, but only when hero and item
being examined are inside the same shop.
2018-12-25 13:48:51 -08:00
nhmall
7974533eab Merge branch 'NetHack-3.7' into win-wip3.7 2018-12-25 16:35:45 -05:00
nhmall
f52c7b0de7 merge fix-up 2018-12-25 16:34:28 -05:00
nhmall
eb1f430ff5 Merge branch 'NetHack-3.6.2' 2018-12-25 16:34:07 -05:00
nhmall
fcfb748876 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-25 16:26:49 -05:00
Bart House
64be5fd35a lock -> g.lock 2018-12-25 13:05:43 -08:00
PatR
99cd9ea264 simplify container_contents()
iflags.in_dumplog is accessible even when DUMPLOG is not enabled.
2018-12-25 13:05:35 -08:00
Bart House
c67f7e5122 globals from files.c moved to instance globals. 2018-12-25 12:56:27 -08:00
Bart House
b1ab64db43 program_state moved to g. 2018-12-25 10:09:04 -08:00
Bart House
ab73df996f Fix typo lockum -> locknum 2018-12-25 09:40:30 -08:00
Bart House
16db7498d0 UNIX, VMS, DEF_PAGER, MICRO and MFLOPPY globals moved to g. 2018-12-25 09:34:24 -08:00
Bart House
0763046c38 zeroX, tc_gbl_data and fqn_prefix moved to instance globals. 2018-12-25 08:09:37 -08:00
Bart House
1c65e6afe0 context to g.context 2018-12-25 07:29:38 -08:00
Bart House
9069615861 Global changes for qt, qt4, amiga, x11 and curses. 2018-12-24 21:28:44 -08:00
Bart House
8c1a4d9a97 invent, youmonst, hackdir moved to g. 2018-12-24 21:04:15 -08:00
Bart House
90547edb83 moves, monstermoves, wailmsg, migrating_objs and billobjs moved to g. 2018-12-24 20:22:33 -08:00
Bart House
be5cdcf77a killer, level and rooms move to instance globals. 2018-12-24 19:50:08 -08:00
PatR
02cfd131ee status gold vs symset:Blank
Symset:Blank sets all the map symbols (except STRANGE_OBJECT) to
<space>.  The status lines for !STATUS_HILITES force status to use '$'
instead of ' ' for the prefix before ":1234" for gold, but the status
lines for STATUS_HILITES did not.  tty ended up with ":1234" for gold.
win32 and curses both ignore the prefix and construct their own, but
since win32 uses the map symbol for that it must also be ending up
with ":1234" (I assume; I haven't seen it).  curses is forcing '$' for
the prefix, even on the rogue level.

This attempts to fix win32 without be able to test the result.  I've
left curses alone.
2018-12-24 18:43:51 -08:00
PatR
0ad8a192bf formatting: parse_conf_file() 2018-12-24 17:50:21 -08:00
Bart House
198e44216e Instance globals changes needed for X11 and gem ports. 2018-12-24 16:58:32 -08:00
Bart House
63628796c1 Instance globals changes for unix build. 2018-12-24 16:53:26 -08:00
Bart House
572ee347b9 Another round of instance globals changes. 2018-12-24 16:43:50 -08:00
Bart House
e5e906dc3b Changes needed in various ports due to globals changes. 2018-12-24 14:47:51 -08:00
Bart House
62e1a45b60 Merge branch 'win-wip3.7' into win-wip3.7-bart
Conflicts:
	src/end.c
2018-12-24 12:09:42 -08:00
nhmall
a229a8a56d Merge branch 'NetHack-3.6.2' 2018-12-24 06:44:27 -05:00
nhmall
dcc7187057 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-24 06:43:15 -05:00
PatR
e2852f25fd fix temporary strength loss that was permanent
Watching the fuzzer, I saw hero's strength plummet to 3 again and not
rise above 5 after that.  It turns out to be due to life-saving, which
was fixing severe hunger but was not restoring the point of strength
that's lost when you go from hungry to weak.

I'm not sure whether this was caused by 3.6.1's commit
024e9e1225 or already behaved that way.

Another fuzzer bit:  the monk I was watching was bitten by a wererat
early on and was still inflicted with lycanthropy when he reached
level 19.  (I've no idea how his level got to be so high; it jumped
from 14 to 19 while I wasn't paying attention.)  Extend the earlier
hack for drinking a blessed potion of restore ability to recover lost
characteristcs to sometimes drink a potion of holy water instead.
2018-12-24 02:08:44 -08:00
PatR
f6d5862c0d implement #H6051 - fake players resist Conflict
The rationale is that since the player character resists conflict,
fake players should too.

[I'm not sure that I buy that.  Player character is always the one
*causing* conflict and it doesn't affect self.  But this is simple
as long as no other resistance checks are against attack-by-ring.]
2018-12-23 17:25:14 -08:00
PatR
7bc36ddef4 fix #H6942 - dropx vs hold_another_object
Dropping an existing fragile item while levitating will usually
break it.  Getting a new wished-for fragile item and dropping it
because of fumbling or overfull inventory never would.

Some callers of hold_another_object() held on to its return value,
others discarded that.  That return value was unsafe if the item
was dropped and fell down a hole (or broke [after this change]).
Return Null if we can't be sure of the value, and make sure all
callers are prepared to deal with Null.
2018-12-23 12:37:26 -08:00
nhmall
74d30fc18e Merge branch 'NetHack-3.6.2' 2018-12-23 15:35:31 -05:00
nhmall
99f589b15d Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-23 15:35:14 -05:00
PatR
df5dc6050d EXTRA_SANITY_CHECKS build fix
is if/else friendly and semi-colon friendly, but not comma friendly.
2018-12-23 12:13:37 -08:00
PatR
95acf0d93a avoid checkfile() segfault
Recent change for "pair of lenses names The Eyes of the Overworld"
triggered a segfault if item was neither named nor called.
2018-12-23 12:03:53 -08:00
Bart House
74edf42f1c Moved decl.c globals into instance globals. 2018-12-22 18:44:22 -08:00
nhmall
11da5b8fed Merge branch 'NetHack-3.6.2' 2018-12-22 21:23:38 -05:00
nhmall
eb0506fe96 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-22 21:23:15 -05:00
PatR
0eb11aa718 fix github issue #155 - encumbrance vs water
Fixes #155

When drowning, you need to be unencumbered in order to crawl out of
water.  When not drowing, you don't, but put a limit on how much can
be carried.  If polymorphed into a swimming creature, allow stressed
or less; otherwise (magical breathing), burdened or less.  (Doesn't
apply on the Plane of Water since there's no climb from water to land
involved.)
2018-12-22 18:09:44 -08:00
nhmall
c4642a231a Merge branch 'NetHack-3.6.2' 2018-12-22 20:16:32 -05:00
nhmall
43414321db Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-12-22 19:52:56 -05:00
PatR
d6ed41339e fix #H7749 - "you detect it"
'Detect' is used for observing a vampire shape change without being
able to see the vampire.  The problem here is that it changed from
bat form to fog cloud form in order to pass under a closed door,
and the message was being delivered when it was already at the door
location instead of before the move from a visible spot to that door.

I'm not happy with this fix, but any other alternative I considered
seemed to be worse.  Having the shape change use up the monster's
move is probably a better way to go.  Then on its next move it will
be in the right form to make a normal flow-under-door move.
2018-12-22 16:35:15 -08:00
Bart House
6c0df43a17 Add check for GCC_WARN before using #prama GCC to turn off warning 2018-12-22 15:12:56 -08:00
Bart House
7743714f1b Changed references from Cmd to g.Cmd. 2018-12-22 15:03:25 -08:00
Bart House
9567526586 Changed references from hname to g.hname. 2018-12-22 14:51:26 -08:00