Commit Graph

10428 Commits

Author SHA1 Message Date
nhmall
5e0c668e83 set g.opt_need_redraw on ingame cond_foo change 2020-02-08 21:38:14 -05:00
nhmall
4d42d44c02 catch-up on some updates to fixes37.0
Side note: Here's a correction for the commit
message for 330287da42:

The original incorrectly stated 'CONDITION_SIZE' (which
doesn't exist) instead of CONDITION_COUNT in one of the
paragraphs.

--- snip ---

eliminate the uses of the manually maintained BL_MASK_BITS

Use CONDITION_COUNT which does not require manual updating.

Also attempts to adjust win32 graphics window port for
the new fields.

That port has its own field names and should be adjusted
to using the following which are declared extern in
include/botl.h.

   struct conditions[CONDITION_COUNT];
   int cond_idx[CONDITION_COUNT];

The former contains the fields that were port-specifically
added to the win32 graphical port and more, plus it is
centrally maintained and currently utilized by tty and curses.

The cond_idx[] array contains the ranked ordering of the
condition fields from highest ranking to lowest. Instead
of indexing like this:
    int i;
    for (i = 0; i < CONDITION_COUNT; ++i) {
        ...conditons[i].enabled;
        ...condtions[i].text[0];
    }

you can use the ranked ordering like this:
    int i, ci;
    for (i = 0; i < CONDITION_COUNT; ++i) {
        ci = cond_idx[i];
        ...conditons[ci].enabled;
        ...condtions[ci].text[0];
    }
2020-02-08 21:07:04 -05:00
nhmall
330287da42 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2020-02-08 20:51:10 -05:00
nhmall
2da95e4dc0 eliminate the uses of the manually maintained BL_MASK_BITS
Use CONDITION_SIZE which does not require manual updating.

Also attempts to adjust win32 graphics window port for
the new fields.

That port has its own field names and should be adjusted
to using the following which are declared extern in
include/botl.h.

   struct conditions[CONDITION_COUNT];
   int cond_idx[CONDITION_COUNT];

The former contains the fields that were port-specifically
added to the win32 graphical port and more, plus it is
centrally maintained and currently utilized by tty and curses.

The cond_idx[] array contains the ranked ordering of the
condition fields from highest ranking to lowest. Instead
of indexing like this:
	int i;
	for (i = 0; i < CONDITION_COUNT; ++i) {
	    ...conditons[i].enabled;
 	    ...condtions[i].text[0];
	}

you can use the ranked ordering like this:
	int i, ci;
	for (i = 0; i < CONDITION_COUNT; ++i) {
	    ci = cond_idx[i];
	    ...conditons[ci].enabled;
 	    ...condtions[ci].text[0];
	}
2020-02-08 20:40:38 -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
PatR
916366fbd1 new data.base quote: win/winner/winning
A quote about "winning team" doesn't fit nethack very well but this
is too good to pass up.  I considered adding "/Rule Six/" as a false
rumor, but the rumors don't offer any way to specify attribution.

Also, give full attribution for another Douglas Adams quote that's
used for a random ungraving.
2020-02-08 16:05:29 -08: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
57d25ad826 fixes37.0 update for unexplored changes and new status conditions 2020-02-08 01:30:14 -05:00
nhmall
4f2375ffe5 Merge branch 'new-status-conditions' into NetHack-3.7 2020-02-08 01:24:51 -05:00
nhmall
07a9a67fb2 expand the pool of status condition fields
Most of the additional ones are "opt-in" meaning that unless you add them
to your config file to enable them, they won't show up.

Two that aren't "opt-in", but can be "opted-out" (as can they all) are
cond_grab (for an eel grabbing you and drowing being imminent) and
cond_lava which leads to a fatality.

All the ones that already existed are "opt-out" options, meaning that
they will still show if you do nothing.

Here's the complete list of status conditions following this patch:
 config option     internal     default mask id            mask        text1    tex2   text3
"cond_barehanded"  bl_bareh     opt_in  BL_MASK_BAREH      0x00000001L Bare     Bar    Bh
"cond_blind"       bl_blind     opt_out BL_MASK_BLIND      0x00000002L Blind    Blnd   Bl
"cond_busy"        bl_busy      opt_in  BL_MASK_BUSY       0x00000004L Busy     Bsy    By
"cond_conf"        bl_conf      opt_out BL_MASK_CONF       0x00000008L Conf     Cnf    Cf
"cond_deaf"        bl_deaf      opt_out BL_MASK_DEAF       0x00000010L Deaf     Def    Df
"cond_iron"        bl_elf_iron  opt_out BL_MASK_ELF_IRON   0x00000020L Iron     Irn    Fe
"cond_fly"         bl_fly       opt_out BL_MASK_FLY        0x00000040L Fly      Fly    Fl
"cond_foodPois"    bl_foodpois  opt_out BL_MASK_FOODPOIS   0x00000080L FoodPois Fpois  Poi
"cond_glowhands"   bl_glowhands opt_in  BL_MASK_GLOWHANDS  0x00000100L Glow     Glo    Gl
"cond_grab"        bl_grab      opt_out BL_MASK_GRAB       0x00000200L Grab     Grb    Gr
"cond_hallu"       bl_hallu     opt_out BL_MASK_HALLU      0x00000400L Hallu    Hal    Hl
"cond_held"        bl_held      opt_in  BL_MASK_HELD       0x00000800L Held     Hld    Hd
"cond_ice"         bl_icy       opt_in  BL_MASK_ICY        0x00001000L Icy      Icy    Ic
"cond_lava"        bl_inlava    opt_out BL_MASK_INLAVA     0x00002000L Lava     Lav    La
"cond_lev"         bl_lev       opt_out BL_MASK_LEV        0x00004000L Lev      Lev    Lv
"cond_paralyze"    bl_parlyz    opt_in  BL_MASK_PARLYZ     0x00008000L Parlyz   Para   Par
"cond_ride"        bl_ride      opt_out BL_MASK_RIDE       0x00010000L Ride     Rid    Rd
"cond_sleep"       bl_sleeping  opt_in  BL_MASK_SLEEPING   0x00020000L Zzz      Zzz    Zz
"cond_slime"       bl_slime     opt_out BL_MASK_SLIME      0x00040000L Slime    Slim   Slm
"cond_slip"        bl_slippery  opt_in  BL_MASK_SLIPPERY   0x00080000L Slip     Sli    Sl
"cond_stone"       bl_stone     opt_out BL_MASK_STONE      0x00100000L Stone    Ston   Sto
"cond_strngl"      bl_strngl    opt_out BL_MASK_STRNGL     0x00200000L Strngl   Stngl  Str
"cond_stun"        bl_stun      opt_out BL_MASK_STUN       0x00400000L Stun     Stun   St
"cond_submerged"   bl_submerged opt_in  BL_MASK_SUBMERGED  0x00800000L Sub      Sub    Sw
"cond_termIll"     bl_termill   opt_out BL_MASK_TERMILL    0x01000000L TermIll  Ill    Ill
"cond_tethered"    bl_tethered  opt_in  BL_MASK_TETHERED   0x02000000L Teth     Tth    Te
"cond_trap"        bl_trapped   opt_in  BL_MASK_TRAPPED    0x04000000L Trap     Trp    Tr
"cond_unconscious" bl_unconsc   opt_in  BL_MASK_UNCONSC    0x08000000L Out      Out    KO
"cond_woundedl"    bl_woundedl  opt_in  BL_MASK_WOUNDEDL   0x10000000L Legs     Leg    Lg
2020-02-08 01:03:25 -05:00
nhmall
d37fa196b2 make a distinction between rock and unexplored area
This adds a pair of new glyphs: GLYPH_UNEXPLORED and GLYPH_NOTHING

GLYPH_UNEXPLORED is meant to be the glyph for areas of the map that
haven't been explored yet.

GLYPH_NOTHING is a glyph that represents that which cannot be seen,
for instance the dark part of a room when the dark_room option is
not set.  Since the symbol for stone can now be overridden to
a players choice, it no longer made sense using S_stone for the
dark areas of the room with dark_room off. This allows the same
intended result even if S_stone symbol is mapped to something visible.

GLYPH_UNEXPLORED is what areas of the map get initialized to now
instead of STONE.

This adds a pair of new symbols: S_unexplored and S_nothing.

S_nothing is meant to be left as an unseen character (space) in
order to achieve the intended effect on the display.

S_unexplored is the symbol that is mapped to GLYPH_UNEXPLORED, and
is a distinct symbol from S_stone, even if they are set to the same
character. They don't have to be set to the same character.

Hopefully there are minimal bugs, but it is a deviation from a
fairly long-standing approach so there could be some unintended
glitches that will need repair.
2020-02-08 00:48:03 -05:00
PatR
84daf75981 'travel' option
Change '!travel' to only prevent travel-by-mouse and leave '_' alone.
2020-02-07 14:37:51 -08:00
Pasi Kallinen
7ca4ae7c4b YAFM tweak 2020-02-07 23:44:06 +02:00
Pasi Kallinen
4943fe23b3 YAFM when sitting on a towel
(via xNetHack)
2020-02-07 23:16:23 +02:00
Pasi Kallinen
a9c41d2ae0 YAFM when restoring a game while hallu
(via xNetHack)
2020-02-07 23:08:18 +02:00
Pasi Kallinen
eed37c9a84 Allow #wizgenesis quantity in the prompt
The #wizgenesis command can also accept a quantity in the input prompt,
previously it only accepted a command repeat prefix.

(via UnNetHack, originally from NetHack4)
2020-02-07 19:11:18 +02:00
PatR
b4d8475b95 populate insight.c
Move enlightenment and conduct from cmd.c to insight.c.  Also move
vanquished monsters plus genocided and/or extinct monsters from end.c
to there.  And move the one-line stethoscope/probing feedback for
self and for monsters from priest.c to there.

Achievement feedback has been overhauled a bit.  When no achievements
have been recorded, the header for them (after conducts) won't be
shown, and when at least one has been recorded, make the prompt for
asking whether to disclose conduct be about disclosing conduct and
achievements.  Also, describe achievements in the Guidebook.

I ran out of gas before updating Guidebook.tex; it will catch up to
Guidebook.mn eventually.

Some of the MS-DOS Makefiles haven't been updated yet so linking
without insight.{o,obj} will break there.
2020-02-06 17:42:15 -08:00
nhmall
690e072a49 is_elf(), is_dwarf(), is_gnome(), is_orc(), is_human()
Those tests were only checking the permonst mflags2 field
so anytime those tests were used in the code, they came
up false for things like an elven ranger. An elven ranger
should return true for an is_elf() test, as an example.

That happens because the profession monsters in monst.c
are defined with M2_HUMAN.

This augments those is_*() race tests to also check for a
matching player race as well.
2020-02-06 12:09:24 -05:00
Connor Gregorich-Trevor
a634dd01b6 Update minotaur monster definition. 2020-02-05 20:03:34 -06:00
Connor Gregorich-Trevor
d6a99a5586 Added sounds for minotaurs. 2020-02-05 19:54:01 -06:00
nhmall
0673328696 resolve a couple of build failures when STATUS_HILITES is not defined
This addresses the build failures but it is unknown
whether the logic remains sound.
2020-02-05 12:24:15 -05:00
nhmall
c234f5a97d version bit 2020-02-04 07:57:43 -05:00
nhmall
0f27a8e71d fix copy-and-paste error 2020-02-03 03:54:14 -05:00
nhmall
816e2285ea add recent file addition to msdos Makefile2.cross 2020-02-03 03:51:30 -05:00
nhmall
1dfab5fe11 remove an argument that is no longer necessary from a few functions
Passing a boolean 'ghostly' argument to some functions that are also passed
an NHFILE * is unnecessary now.
2020-02-02 22:54:44 -05:00
nhmall
56b196772e windows vs Makefile follow-up bit 2020-02-02 21:04:45 -05:00
nhmall
80a602d344 add recent file addition to windows visual studio project and Makefile 2020-02-02 20:59:41 -05:00
nhmall
f41e0b9eec add recent file addition to Xcode project 2020-02-02 20:43:00 -05:00
PatR
00ce339c15 muse looting
Give better feedback than "<Monster> rummages through something"
when hero sees a monster looting a container.

Have monster take out up to 4 items at a time instead of always 1.
(Hero can take out an arbitrary number in one move.)

When deciding what to try to take out, 'count' (now 'nitems') was
initialized to 1 instead of 0, giving the monster a 1 out of N+1
chance of not trying to take anything out.  It wasn't clear whether
that was intentional (there's already a chance for not taking things
out when deciding whether to use the container).  I kept that result
in and made it more explicit now.

When deciding whether the chosen item could be moved from container
to monster's inventory, the can_carry(item) check was counting the
weight of the item twice, once explicitly when considering adding it
to minvent but also implicitly as part of the carried container's
weight already in minvent.
2020-02-02 15:22:42 -08:00
Patric Mueller
29da34b799 Adding missing basic taste "umami" as hallucinatory color 2020-02-02 20:16:13 +01:00
chasonr
1ab84e055e Merge branch 'NetHack-3.7' into msdos-video-doc 2020-02-02 10:15:32 -05:00