copperwater [Tue, 12 Jun 2018 15:33:36 +0000 (11:33 -0400)]
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.
copperwater [Tue, 29 May 2018 02:12:47 +0000 (22:12 -0400)]
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.
copperwater [Fri, 1 Feb 2019 17:21:42 +0000 (12:21 -0500)]
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.
copperwater [Thu, 19 Dec 2019 03:25:12 +0000 (22:25 -0500)]
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.
copperwater [Tue, 5 Feb 2019 03:45:45 +0000 (22:45 -0500)]
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.
copperwater [Fri, 25 Jan 2019 14:27:55 +0000 (09:27 -0500)]
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.
copperwater [Sat, 22 Dec 2018 14:38:40 +0000 (09:38 -0500)]
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.
copperwater [Sat, 8 Dec 2018 18:51:23 +0000 (13:51 -0500)]
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.)
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.
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.
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.
Pasi Kallinen [Wed, 1 Jan 2020 11:25:55 +0000 (13:25 +0200)]
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.
Patric Mueller [Tue, 31 Dec 2019 13:10:24 +0000 (14:10 +0100)]
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".
nhmall [Tue, 31 Dec 2019 15:02:54 +0000 (10:02 -0500)]
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.
PatR [Tue, 31 Dec 2019 02:37:42 +0000 (18:37 -0800)]
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.
PatR [Mon, 30 Dec 2019 02:55:44 +0000 (18:55 -0800)]
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.)
Pasi Kallinen [Thu, 26 Dec 2019 16:43:39 +0000 (18:43 +0200)]
Add lua object references
Whenever a lua script references a core struct obj, increment a counter
in the obj struct. Core code will not free the obj, if there are any
lua references pointing to it, just makes it free-floating.
When lua script ends, the lua gc will free the free-floating objects.
PatR [Tue, 24 Dec 2019 12:31:41 +0000 (04:31 -0800)]
fix github issue #272 - meat rings, +0 protection
Meat rings were causing increased hunger even though they don't do
anything. Not mentioned in the report, but cheap plastic imitation
amulets increased hunger too and they don't do anything either.
Trickier to fix, +0 rings of protection were excluded from hunger
on the grounds that +0 rings don't do anything, but since 3.6.0
+0 protection provides +1 to magic cancellation if protection isn't
coming from anywhere else. Two +0 rings of protection are trickier
still since only one of them provides the MC bonus.
PatR [Tue, 24 Dec 2019 11:26:34 +0000 (03:26 -0800)]
'w-' object lost panic
After the "make 'w' parallel with 'Q'" patch, wielding bare hands
was erroneously treating object id 0 as a split of zeroobj. That
isn't in inventory so seems 'lost'. Fixed by testing for nonzero.
There was another bug: you could wield a partial stack even if your
current weapon was cursed. Fixed by reordering if/else-if/end-if.
PatR [Tue, 24 Dec 2019 10:41:19 +0000 (02:41 -0800)]
fix github issue #268 - worm tooth & crysknife
Change the composition of worm tooth from none-of-the-above to bone
and crysknife from mineral to bone, same as is used for unicorn horn.
I think the only significant difference will be that worm teeth used
up during polypiling will produce skeletons rather than flesh golems.
nhmall [Mon, 23 Dec 2019 15:44:07 +0000 (10:44 -0500)]
add a requested interface adjustment for menu invert operations
Originally requested by one of the hardfought admins
Adjust all active window ports (tty, curses, win32, Qt, X11) to store
the itemflags that they receive with each item.
Also, make those active window ports understand the new
MENU_ITEMFLAGS_SKIPINVERT flag by skipping any menu items with that
setting during invert_all and invert_page operations.
Build testing and rudimentary functionality testing was carried out
on each of the window ports listed above.
The code was also modified on some non-active window ports (Qt3, gem,
gnome) but it was not tested for build or function there.
The desired functionality expressed was to be able to select a
single object category, and use the @ "invert all" function to
exclude that one and select all the others.
The "invert all" function's behavior of also including things
like "select all" and BUCX menu items made the feature unuseful
for that purpose.
PatR [Mon, 23 Dec 2019 10:26:59 +0000 (02:26 -0800)]
github issue #267 - giant {beetle,spider}
Increase weight of giant spider from 100 to 200; leave nutrition at 100.
Increase weight of giant beetle from 10 to 200; increase nutrition from
10 to 50. Both are still size 'large'.
I've left giant ant with weight 10, nutrition 10, size 'tiny' so that
it doesn't become bigger than soldier and fire ants.
PatR [Mon, 23 Dec 2019 01:22:07 +0000 (17:22 -0800)]
fix mysterious force bug
Subtracting one dungeon depth value from another had the subtraction
backwards and that yielded a negative value where a positive one is
expected. If NH_RELEASE_STATUS were to be set to NH_STATUS_RELEASED
then this was at risk of crashing (if the bad subtraction yields -2,
rn2(diff+2) would divide by 0) since rn2()'s argument isn't validated
for released version.
fixes37.0 was confused, listing a couple of things that aren't bugs
in 3.6 as general fixes. I suspect that the DLB one was fixed before
being exposed via git, so shouldn't be there at all.
nhmall [Sun, 22 Dec 2019 23:28:24 +0000 (18:28 -0500)]
groundwork for window port interface change to add_menu
groundwork only - window port interface change
This changes the last parameter for add_menu() from a boolean
to an unsigned int, to allow additional itemflags in future
beyond just the "preselected" that the original boolean offered.
There shouldn't be any functionality changes with this groundwork-only
change, and if there are it is unintentional and should be reported.
PatR [Sun, 22 Dec 2019 22:51:05 +0000 (14:51 -0800)]
wielding partial stack
If you're wielding a stack of N items, issuing the command to quiver
them asks whether you want to quiver N-1 of them (implicitly leaving
one wielded). If you answer no then you're asked whether to quiver
all of them. You could also give a count when picking the item to be
quivered and the stack would be split based on that.
However, if you have a stack of N items quivered, issuing the command
to wield them just did so, leaving the quiver empty. And picking an
item ignored any count, so even explicitly asking for 1 (out of N)
wielded the whole stack. Change 'w' to parallel 'Q'; if you try to
wield a quivered stack, you'll be asked whether to wield just 1 of
them. For no, ask whether to wield the whole stack. Or you can give
an explicit count when picking any stack in inventory to wield.
Both 'w' and 'Q' probably ought to handle the alternate/secondary
weapon similarly when it contains a stack. This doesn't address that.
PatR [Sun, 22 Dec 2019 21:40:59 +0000 (13:40 -0800)]
'quick_farsight' option
Bite the bullet and add a special purpose boolean option to control
game behavior for random clairvoyance. When objects or monsters are
discovered, it normally issues "you sense your surroundings" and
performs a getpos() operation which allows the player to browse the
map by moving the cursor around and getting 'autodescribe' feedback.
But there have been complaints that once the hero has the Amulet
(which triggers random clairvoyance even though hero isn't flagged
as having that attribute) the message and pause-to-browse become too
intrusive.
This was initially combined with the 'timed clairvoyance' fix because
they both bump EDITLEVEL to invalidate existing save files, but their
details don't interact so I separated them.
PatR [Sun, 22 Dec 2019 21:30:25 +0000 (13:30 -0800)]
fix github issue #266 - timed clairvoyance
When the hero has random clairvoyance, the code used
| (moves % 15) == 0 && rn2(2) != 0
(where 'moves' is actually the turn number) to decide when it would
kick in and show a portion of the map. If the hero was fast enough
to get an extra move when the turn value met the (moves % 15) == 0
condition then clairvoyance could happen twice (or more if poly'd)
on the same turn.
The changes (one new field, reordering a few others) in 'struct
context' invalidate existing 3.7.0-x save files.
PatR [Sun, 22 Dec 2019 00:57:53 +0000 (16:57 -0800)]
Unix Makefile.utl
Build feedback filtered by a script which filters out -Dthis -Wthat:
gcc -g -I../include -I../lib/lua-/src -c ../win/share/tilemap.c
The second -I is obsolete or else its bogus value would have caused
build failure. When removing it, I noticed that there was still quite
a bit of obsolete yacc and lex stuff in there. Remove that too.
copperwater [Tue, 1 Oct 2019 00:56:03 +0000 (20:56 -0400)]
Port the autounlock feature, hallucinatory trap names from UnNetHack
This adds a boolean option, autounlock, defaulting to true. When this is
set to TRUE, messages stating that some door or container is locked are
automatically followed by a prompt asking if you would like to unlock
it, if you are carrying an unlocking tool (key, lock pick, or credit
card).
Architecturally, this extends the pick_lock function to take three
additional arguments (door coordinates or a box on the ground you are
autounlocking).
The code that selects an unlocking tool will always look first for a
skeleton key, then a lock pick, then a credit card. Since curses, rust,
and other attributes don't really have an effect on the viability of the
unlocking device, it didn't seem to warrant making a more complex
function for that.
Add hallucinatory trap names
This adds many funny, realistic, and nonsensical traps to the game, to
be shown when the player is hallucinating.
Architecturally, the biggest change is merging the what_trap macro and
the "defsyms[trap_to_defsym(ttyp)].explanation" pattern into a single
function "trapname", which returns the name of the trap, handling the
hallucination case. There is also a second parameter used for overriding
hallucination in the occasional cases where the actual trap name should
always be returned.
In addition, the what_trap and random_trap macros are now obsolete and
not used anywhere, so they are removed.
reinstate anti-rng abuse bit on hallucination
updates to hallucinatory trap names and fixes37.0 entry