Commit Graph

5879 Commits

Author SHA1 Message Date
PatR
2d150d323b new status conditions
Several conditions result in stale data on the status line when
starting or stopping because things which didn't used to affect it
haven't been setting context.botl to force an update.  This wasn't
systematic; there are bound to be lots more.
2020-02-15 15:41:24 -08:00
PatR
c21921668a fix github issue #293 - raven vs raven
The saying /corvus oculum corvi non eruit/ (Latin) means "a crow
doesn't pluck out the eye of another crow" (roughly).  Something
along the lines of "like-minded people stick together".  Honor the
literal meaning by preventing a raven's blinding attack that gets
directed at another raven from being able to cause blindness.

Fixes #293
2020-02-15 13:55:51 -08:00
PatR
eb919d3cdb fix #K355 - grammar issues with monster+container
Mon rummages in <container> and Mon takes <item> from <container>
was missing an() for the container itself and should have been
using doname() rather than xname() for any items taken out (when
done adjacent to hero).
2020-02-14 16:24:49 -08:00
nhmall
751f1f47ab Windows options dynamically
There are two executables int the windows binary, each of which
have different options and capabilities. Sharing of one dat/options
file hasn't really been an accurate approach.

Produce that information dynamically for the Windows exe files.

This impacts alt-v results.
2020-02-13 21:24:24 -05:00
PatR
cbe27c7702 unseen pet drowning
The "you have a sad feeling for a moment" message was only given when
one monster kills another (and the latter is an unseen pet).  Give it
for drowning too.  There are probably a bunch of other circumstances
which warrant it as well but I've settled for handling minliquid().
2020-02-13 15:38:59 -08:00
nhmall
878ec6ee2a Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-13 18:19:35 -05:00
nhmall
a213811975 stone/unexplored glyph follow-up
typo
2020-02-13 17:37:55 -05:00
Pasi Kallinen
5885962efd Alloc sizeof struct instead of pointer-to-struct 2020-02-13 22:06:50 +02:00
nhmall
5ca2cdbd86 eliminate an odd line wrapping noticed on windows 2020-02-13 00:59:04 -05:00
PatR
75e9055b89 plug a couple of memory leaks in sp_lev.c, take II
[...]
| Change selection_free(foo) to also free(foo) after freeing foo's
| fields.  Every use was already
|   selection_free(foo);
|   free(foo);
| except for the two instances of memory leak.

And except for the three which aren't in sp_lev.c, one of which was
dealing with memory managed by Lua.  This time it seems to be working
as intended.
2020-02-12 18:56:41 -08:00
PatR
804499d9be add some new, easier achievements
Introduce eight achievements that can be attained by more players.
 Entered Gnomish Mines  - self explanatory
 Entered Mine Town      - the town portion, not just the level
 Entered a shop         - any tended shop on any level
 Entered a temple       - likewise for temple
 Consulted the Oracle   - bought at least one major or minor oracle
 Read a Discworld Novel - read at least one passage
 Entered Sokoban        - like mines
 Entered the Big Room   - not always possible since not always present

The novel and bigroom ones aren't always achieveable since novels are
only guaranteed if a book or scroll shop gets created and bigroom is
only guaranteed in wizard mode.  No one ever claimed that every
possible achievement can be attained in a single game.  (If one for
entering the Fort Ludios level--or perhaps entering the Fort itself--
eventually gets add, that won't be possible in every game either.)

The mine town one probably needs some tweaking.  Two of the town's
seven variants have no town boundary (despite a rectangular area of
pre-defined map) and at present simply arriving on either of those
levels is enough to be credited with the entered-town achievement.

Bump EDITLEVEL because u.uachieved[] has increased in size.  This
time it has been expanded to the maximum that xlogfile's bitmask of
achievements can handle, enough for up to 9 more achievements without
another EDITLEVEL increment.
2020-02-12 14:35:37 -08:00
nhmall
2c69ad8771 improve the g.multi condition results 2020-02-11 14:04:19 -05:00
nhmall
7421c989e5 accuracy bit 2020-02-10 23:39:37 -05:00
nhmall
0b15b99b12 Merge branch 'NullCGT-minotaurs-pr298' into NetHack-3.7 2020-02-10 22:02:26 -05:00
PatR
9a8bea550f Revert "plug a couple of memory leaks in sp_lev.c"
This reverts commit 1b7ac93930.

I just got a crash from within Lua when loading mine town and it
appears to be memory related, so back out the "plug leaks" commit
for the time being.
2020-02-10 15:44:16 -08:00
PatR
1b7ac93930 plug a couple of memory leaks in sp_lev.c
selection_floodfill() would free the contents of its temporary
selection structure when the check function was Null but neglected
to free the allocated structure itself.  I don't know whether that
was ever triggered.

generate_way_out_method() did likewise when trying to make a hole
or trapdoor.  It reused the 'ov3' pointer without freeing it first.
'heaputil' reported instances of non-freed memory that were
allocated at line 3612 by selection_clone(), only called within
generate_way_out_method().

Change selection_free(foo) to also free(foo) after freeing foo's
fields.  Every use was already
  selection_free(foo);
  free(foo);
except for the two instances of memory leak.
2020-02-10 14:23:47 -08:00
PatR
bade2f19b2 simplify Achievements display
The you-acquired-the-Amulet achievement uses alternate wording when
you were carrying it but just gave it up via #offer to ascend.  That
wording looks much better when displayed right before "You ascended!",
without entered-endgame and entered-astral (and maybe always-blind or
never-wore-armor) achievements in between.  That was and still is done
by taking it away.  Adding it back in the desired spot is simpler than
leaving it out while tracking whether it was removed.

Effectively, ACH_UWIN (ascension) is forced to be very last--where it
will always be anyway, but at one point the blind and nudist ones came
after it--and ACH_AMUL (you obtained the Amulet) is sorted to right
before that.  For non-ascending games, the Amulet achievement is left
in the position where it was attained.
2020-02-10 11:21:44 -08:00
PatR
d462bdffca redo achievement tracking
Instead of an assortment of bits, assign numeric indices to the
potential achievements and keep an array of those in the order they
were attained.  So disclosure might show the same subset occurring
differently in different games depending on the player's actions.
The encoded field in xlogfile doesn't care about that and remains
the same.

Modifies 'struct u', so EDITLEVEL has been incremented and existing
save files are invalidated.
2020-02-10 00:17:54 -08:00
nhmall
9b0ded6ff6 Merge branch 'feature/sounds' of https://github.com/NullCGT/NetHack into NullCGT-minotaurs-pr298 2020-02-09 20:38:22 -05:00
PatR
e09bfeb8af remove another unused variable 2020-02-09 12:28:19 -08:00
nhmall
bea4fb9166 remove an unused variable 2020-02-09 15:21:35 -05:00
nhmall
2ed0270e7e Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-09 14:57:15 -05:00
nhmall
c7c0c87859 move status condition field selection to its own menu 2020-02-09 14:56:37 -05:00
Pasi Kallinen
6fd51c29ef Unify Bag of Holding item loss chance 2020-02-09 18:39:46 +02:00
Pasi Kallinen
39032d2fac Fix the selection param unify 2020-02-09 14:47:41 +02:00
Pasi Kallinen
e182ff428b Unify lua setting wallprop 2020-02-09 14:30:11 +02:00
Pasi Kallinen
ced327fdf5 Unify some exported lua script params 2020-02-09 13:44:04 +02:00
nhmall
5e0c668e83 set g.opt_need_redraw on ingame cond_foo change 2020-02-08 21:38:14 -05:00
PatR
e198150ad8 more level teleport feedback
Level teleporting to current level doesn't give any feedback but
is usually done intentionally to abort the level teleport.  Being
on the bottom level of branch and attempting to teleport even lower
failed silently like choosing the current level.  Have it give some
feedback about not being able to go any lower.
2020-02-08 17:15:18 -08:00
nhmall
4096ce8454 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 19:52:22 -05:00
nhmall
67cc0183b0 ranking of new status conditions 2020-02-08 19:51:04 -05:00
Pasi Kallinen
1e915a9a52 Unify revealing hiding monsters for mvm attacks
Whether the monster-vs-monster hits or misses, hiders
are revealed the same way. Unify that part of the code.

Use git show --patience to have a better view of the changes.
2020-02-08 23:41:36 +02:00
nhmall
ce235dc94b more condition_aliases 2020-02-08 14:26:03 -05:00
nhmall
cef50363ca adjust condition_aliases to include new macro masks 2020-02-08 14:01:57 -05:00
PatR
f3338e6e30 remove unused variable 2020-02-08 09:59:08 -08:00
Pasi Kallinen
df137029c0 Unify finding room pos for some features 2020-02-08 19:47:36 +02:00
Pasi Kallinen
0f16a48aaf Unify (un)locking boxes in inventory 2020-02-08 18:56:40 +02:00
Pasi Kallinen
58677b9e95 Unify inventory letter value for sortloot 2020-02-08 18:42:06 +02:00
nhmall
e12cab4ee1 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 11:06:04 -05:00
nhmall
5116ad4eed Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 11:05:26 -05:00
Pasi Kallinen
7eb20c9e7a Unify multishot class bonus code 2020-02-08 18:04:54 +02:00
nhmall
ffd9eedb2c condtests[bl_bareh] requires a couple of additional g.context.botl = 1 2020-02-08 11:03:46 -05:00
Pasi Kallinen
0323eecbfe Unify finding a queen bee 2020-02-08 17:35:52 +02:00
Pasi Kallinen
c585c65042 Add some stair helper functions 2020-02-08 17:08:26 +02:00
Pasi Kallinen
9e4319824d Fix digging through iron bars from adjacent pit
It was possible to create a pit on top of iron bars, by first creating
a pit next to the bars, going down into the pit, and then digging sideways
towards the bars. This did not destroy the iron bars.
2020-02-08 17:08:17 +02:00
nhmall
d02bf5d1d0 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 07:40:47 -05:00
nhmall
27ab3e66ba options.c initializers got misaligned
Correct the initializers in options.c for the cond_ options.
2020-02-08 07:39:21 -05:00
Pasi Kallinen
c2e8703fe0 Unify breamm and breamu
Monster vs monster breath attacks were using nearly the same code
as monster vs hero - unify the code
2020-02-08 14:19:17 +02:00
nhmall
a781b295a5 OS X warning 2020-02-08 01:44:56 -05:00
nhmall
4f2375ffe5 Merge branch 'new-status-conditions' into NetHack-3.7 2020-02-08 01:24:51 -05:00