Commit Graph

10018 Commits

Author SHA1 Message Date
Patric Mueller
5267a50c7e Move enhance_tip into context and don't show tip if #enhance has been used before
Breaks save and bones compatibility.
2020-01-06 00:50:32 +01:00
PatR
8853d0e566 wizard mode wishing for secret doors
Allow wishing for secret doors and secret corridors.  It's a bit
more strict about where the wish is performed than wishing for
furniture.  Implemented in order to test drum of earthquake effects.

I spent a lot of time figuring out SDOOR details that somebody
already knew at some point but evidently didn't document--you can't
specify D_CLOSED for them or the display code will issue impossible
warnings about wall mode angles.
2020-01-05 13:13:21 -08:00
PatR
52f4803a5a more earthquake
When a drum of earthquake targets a secret door, reveal it (which
is always followed by collapsing the door), and when it targets a
secret corridor, reveal that corridor.  Both situations also place
a pit at the location.
2020-01-05 11:30:38 -08:00
Pasi Kallinen
cedc757e16 Unify random light state for rooms or level 2020-01-05 13:31:24 +02:00
PatR
5292ab5de0 fix #K105 - earthquake chasms
Drum of earthquake can try to destroy fountains, thrones, altars,
sinks, and graves but it wouldn't do so because maketrap() had been
changed to prevent clobbering furniture with traps.  So you might get
"the throne falls into a chasm" but the throne would remain intact.

Change furniture to be floor before trying to create a pit.  The gist
of the patch is the 'if' after 'do_pit:' and also some changes to the
revealing of hidden monsters.  The rest is reformatting.
2020-01-05 01:20:15 -08:00
PatR
4b2ba5acc7 twoweapon tweaks
Don't allow dual-wielding if either wielded or alternate weapon
(or both) is a launcher:  bow, crossbow, or sling.  (I thought that
this had been addressed ages ago.)

Refine the "can't twoweapon" feedback.  The message for having
either or both hands empty is the same, but sentence construction
is different.  The not-a-weapon feedback is slightly different, now
mentioning whether it's the wielded or alternate weapon which isn't
allowed.  The case where neither are acceptable still just reports
uwep; mentioning both it and uswapwep would be too verbose.

Make more things be described as "(wielded)" instead of "(weapon in
hand)".  It was just stacks with quantity more than 1.  That's now
joined by ammo and missiles (any stack size, but in reality just 1
since greater was already being caught here) and any quantity of
non-weapon, non-weptool.  It's overridden if dual-wielding so that
right/left stay matched.

When dual-wielding, list primary as "(wielded in right hand)" and
secondary as "(wielded in left hand)" instead of "(weapon in hand)"
and "(wielded in other hand)".  The vaguer wording was better for
bows since they're held in the off hand but now that they can't be
dual-wielded that doesn't matter.  (Single-wielding a bow is still
"(weapon in hand)".)

When not dual-wielding, the item in the alternate weapon slot is
still described as "(alternate weapon; not wielded)" even if it's
not actually a weapon.  I couldn't think of better phrasing.
2020-01-04 18:22:04 -08:00
PatR
17468a8ae9 candelabrum vs candles bit
Move declaration to start of block so that C99 isn't required.
2020-01-04 17:22:18 -08:00
Patric Mueller
b55165ed07 Applying a spellbook hints about read charges left
Applying a spellbook allows the player to flip through the pages, providing an
indication of how many reads it has left before turning blank.

Originally from UnNetHack but code almost completely refactored and updated
for post 3.4 changes like deafness and novels.
2020-01-05 00:27:29 +01:00
Patric Mueller
9110302d42 When hallucinating, see hallucinated currencies instead of bits for an ale 2020-01-05 00:27:29 +01:00
Patric Mueller
49ef111bac Merge branch 'copperwater_consolidated_pull_request_265'
This includes most commits from GitHub pull request #265 with some code
adjustment and documentation in doc/fixes37.0.
2020-01-05 00:27:20 +01:00
Patric Mueller
25a248219a Update fixes37.0 2020-01-04 23:03:45 +01:00
Patric Mueller
0c89eb32f5 Show the teleportation messages only with flags.verbose 2020-01-04 22:54:14 +01:00
copperwater
02731cb996 Always print a message when the hero level teleports
For much the same reason as the horizontal teleport message: various
forms of level teleportation produce no message indication at all that
you just ended up somewhere else.
2020-01-04 22:54:14 +01:00
copperwater
6cbf8ccef4 Always print a message when the hero teleports
It's useful to get a message as indication you suddenly moved somewhere.
For instance, MSGTYPE=stop can be used on this to avoid bumbling in the
wrong direction after a spontaneous uncontrolled teleport.
2020-01-04 22:54:14 +01:00
copperwater
d9c7a7b13c Teach non-mindless monsters about the Castle trapdoors
This feature is originally from SliceHack, but the original code
directly edited the monmove code, whereas I thought it was cleaner to
use the existing mtrapseen code. Thus, this commit just marks trapdoors
as "seen" for all non-mindless monsters generated in the Castle level
(the same way all monsters in Sokoban are marked aware of pits and
holes).

This change prevents these Castle monsters from moving onto trapdoors
97.5% of the time. (A determined player can still patiently sit and wait
for everyone in the castle to plunge like lemmings into the trapdoors,
but it will now take 40 times as long.) Also unlike SliceHack, this only
excludes mindless monsters - not all non-humanoids. There are plenty of
intelligent non-humanoid monsters generated right next to the trapdoors,
after all.

This is aimed at better flavor (the inhabitants of the castle should
know about the traps in their own area) and better scenery in the Valley
(doesn't seem as much of a valley of the dead if there are hordes of
soldiers milling around down there).

I considered sticking an in_mklev condition onto this if statement, so
that monsters spawned into the Castle after its creation will fall down
the trapdoors, but ultimately decided against it.
2020-01-04 22:54:14 +01:00
copperwater
43d06a4911 Default shk sell prompt to N
It can get annoying when you accidentally sell something you didn't mean
to by hitting space or enter at this prompt.
2020-01-04 22:54:14 +01:00
copperwater
f87e42e682 Underwater fire scroll causes vaporization regardless of confusion
This is originally from the variant SliceHack. Rationale: there's still
fire being summoned, so it should vaporize some water.
2020-01-04 22:54:14 +01:00
copperwater
2d8b72be9d Better reporting directions for impossible()
Rather than just informing the player that saving and reloading might
fix the problem, they are now encouraged to report the problem to the
value of DEVTEAM_EMAIL. If the sysconf specifies SUPPORT, that is also
presented as an option.
2020-01-04 22:54:14 +01:00
copperwater
598563dac3 Add a default message for chatting to gnomes
Message is a reference to The Silver Chair. Most of the other races had
their own messages already, but gnomes would just default to discussing
dungeon exploration, which doesn't make that much sense most of the
times when you would be chatting to them in their own mines.

The quotation is edited from the source to reflect the dungeon
environment, but the sentiment is actually pretty spot-on given the
average player's win ratio.

Note: this doesn't interfere with the South Park gnome speech added to
3.6 a while ago; that only occurs when hallucinating and this only
occurs when not hallucinating.
2020-01-04 22:54:14 +01:00
copperwater
6b389c385d Call potion bottles by nonsensical names if hallucinating
From SliceHack. Note that this refers to the description of the physical
bottle; it's a substitute for "phial", "carafe", "flask", etc. such as
are seen when a potion crashes on someone's head. They don't obscure the
randomized appearance or actual potion identity.

The SliceHack version evidently went through several revisions; just
take the current one.
2020-01-04 22:54:14 +01:00
copperwater
c578b9537a Neutral sacrifices disappear in a cloud of smoke
The general idea here came from SpliceHack -- give each alignment a
unique effect in what happens to its sacrifices -- but the "puff of
smoke" in Splice seemed too small.
2020-01-04 22:54:14 +01:00
copperwater
2b670a82e4 Give player message informing them they can use #enhance
Triggers when you feel more confident in your skills. This is to address
a problem I have heard about several times from newer players: unless
you pay close attention to the guidebook, nothing in the game actually
indicates that you can level up your abilities and how to do it.

Experienced players don't need this message, of course; they can hide it
via MSGTYPE if they really hate it, but I additionally added a clause
that prevents this message from being displayed more than once per game
session. (It didn't seem important enough to make a save field for.)
2020-01-04 22:54:14 +01:00
copperwater
a8a321423d Suppress "Unknown command" messages in the dumplog.
Backported from TNNT. Only affects dumplog pline history, not any other
form of pline history.

The impetus for this is to avoid dumplogs full of "Unknown command foo."
messages which don't provide any value for people reading the file. In
many cases, these messages crowd out the actual message history, making
it hard to reconstruct what happened.
2020-01-04 22:54:14 +01:00
copperwater
f044576309 Remove "iron hook" unidentified description
It's confusing and served no purpose; a spoiled player knew what it is,
an unspoiled player might think it was a hook-hand or something. Now
they all show up as grappling hook.
2020-01-04 22:54:14 +01:00
copperwater
77281e7194 Choir chanting, bathing in darkness before Moloch snuffs out your life
Inspired by a Dudley's Dungeon strip. No gameplay change, just flavor.
2020-01-04 22:54:14 +01:00
copperwater
c59387d9aa Show "You feel very comfortable here" message when crowned 2020-01-04 22:54:14 +01:00
Patric Mueller
1acd631766 Candelabrum now reads "(n of 7 candles attached)"
It wasn't obvious enough before that the Candelabrum has seven candle
slots. This makes it show it clearly.
2020-01-04 22:54:14 +01:00
Patric Mueller
18b46449f0 Only output candelabrum tip if candles are in inventory 2020-01-04 22:54:14 +01:00
copperwater
40d6dbaa96 Applying a candelabrum with no candles gives a tip
"This candelabrum has no candles. To attach candles, apply them instead
of the candelabrum."
2020-01-04 22:54:14 +01:00
copperwater
ce617ba798 Replace awful "You feel cold" message for freezing a door you can't see
That message implied something to do with an effect happening to the
hero that causes them to feel cold, such as taking cold damage.
Change it to "You hear a deep cracking sound" instead.
2020-01-04 22:54:14 +01:00
Pasi Kallinen
1db0a5dda0 Fix unused param warning 2020-01-04 17:26:53 +02:00
Pasi Kallinen
1d312ee3fe Add some player lua methods
Adds u.clear_inventory() and u.giveobj(new.obj("rock")) and some other minor stuff.
2020-01-04 16:55:53 +02:00
nhmall
d6bc9f0bb3 fix inaccuracies in comment 2020-01-04 07:35:53 -05:00
PatR
cd4376a208 display of data.base entries
Make data.base display perform a couple of extra data integrity
checks and meet tabexpand()'s expectation about buffer size.

Also be a little more forgiving in case someone uses spaces instead
of a tab to indent new text lines.
2020-01-04 03:35:11 -08:00
PatR
730b67b838 add some bullet-proofing to tabexpand()
Include some bounds checking for tabexpand, but it assumes caller
passes a BUFSZ buffer rather than having that caller pass the actual
size.
2020-01-04 03:33:57 -08:00
Pasi Kallinen
a018930964 Update map glyph when placing obj on map via lua 2020-01-04 11:35:17 +02:00
nhmall
f01b81a7b7 old bits in doc files 2020-01-01 11:59:43 -05:00
nhmall
218cbe9ea6 2020 2020-01-01 10:12:16 -05:00
Pasi Kallinen
7e07cef197 Lua struct obj improvements
If the core frees the obj struct referred by lua, don't free it,
just mark it as OBJ_LUAFREE - lua will free it in gc once all
the references to it are gone.
2020-01-01 13:25:59 +02:00
Patric Mueller
2ae7cf02ea Replace "money" in in-game texts with "gold"
When GOLDOBJ was activated unconditionally, several texts started referencing
"money" instead of "gold".

As we don't have the intention to introduce a complex coin system with
different denominations, change it back and also some other places that
reference "money".
2020-01-01 10:59:24 +01:00
nhmall
1a6fc77198 fixes37.0 catch-up 2019-12-31 10:09:37 -05:00
nhmall
663bb188da twoweapon message adjustment
There was a concern that some things resulted in "is not a weapon"
when trying to twoweapon, then were subsequently refered to in
menus as "weapon in hand."

Remove any perceived inconsistency by simply adjusting the first
message.
2019-12-31 10:02:54 -05:00
PatR
6e90c4deed miscellaneous reformatting
Some new code was using 3.4.3 era formatting (operators at end of
first half of a continued line rather than at start of second half).
Also a few cases of 'g.' prefix making lines be too wide.  I imagine
there will be a lot more of these over time.
2019-12-30 18:37:42 -08:00
PatR
31fadff2c1 fix github issue #273 - named orc mummy
The test for whether a migrating object generated as plundered
mine-town loot should be delivered to any orc created and then giving
that orc a bandit name was kicking in for orc mummies and orc zombies
as well as for regular orcs.

Also, the loot could include tins or eggs and their species would
get clobbered by the overloading of obj->corpsenm.  During delivery
when the overloading was reset they would become giant ant eggs/tins.
(Not seen in actual play.)
2019-12-29 18:55:44 -08:00
PatR
e4221db47e fix github issue #275 - artifact life drain
A monster using Stormbringer or Staff of Aesculapius to drain life
from another monster would heal the hero instead of the attacker.
2019-12-29 15:30:55 -08:00
Pasi Kallinen
2dda1c43b2 Fix heap-use-after-free when rewielding partial stack 2019-12-29 17:28:15 +02:00
Pasi Kallinen
4c82594193 Fix another out-of-bounds error
Monster trying to decide if a tin could cure stoning looking at
a special or empty tin would do acidic(&mons[-1])
2019-12-29 16:36:54 +02:00
nhmall
d7e3331129 remove a few obsolete notes 2019-12-28 16:35:26 -05:00
nhmall
471f3e6556 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2019-12-27 12:14:13 -05:00
nhmall
4e904d01e8 msdos cross-compile bits 2019-12-27 12:13:41 -05:00