Expose map-location specific timers to lua scripts. For example:
nh.start_timer_at(x,y, "melt-ice", 10);
Currently only available timer type is "melt-ice".
Eucalyptus leaves are famously inedible except by certain animals such
as koalas. I consider it very strange that a single leaf in NetHack
gives you six meatballs' worth of calories.
I considered making it 0 nutrition, but am not sure if a 0-nutrition
comestible would end up violating some assumption that all food is at
least 1 nutrition.
Selection difference is something I have found myself wanting a lot when
working on levels, and have had to defer to a clunkier xor-then-and
approach. This commit implements the TODO-ed addition and subtraction
operators on two sets.
I don't see how the addition operator would be any different from
logical or, so it just calls l_selection_or rather than implement a new
function.
Allow defining rolling boulder launching location in special level
lua scripts:
des.trap({ type="rolling boulder", coord={7, 5}, launchfrom={-2, -2} });
launchfrom is relative to the trap coord.
If any artifacts are discovered and menustyle traditional is in use,
the player can type `a to get the artifact subset of discovered items.
Likewise with `u to for unique items (the invocation tools and the
real Amulet). For normal object classes, `<class> works for every
class, even when there aren't any discoveries for it (where you get
told "you haven't discovered any yet" if you pick such). But `a
and `u were only allowed if at least one thing in the corresponding
category had been discovered. Change to allow it even when none have
been. The feedback of "you haven't discovered any {unique items,
artifacts} yet" was already in place.
Doesn't apply for picking the class via menu. Menus don't have any
concept of "allowed as a response even though not listed as a choice".
get lawful artifacts
Reported by vultur-cadens, Angels can be given Sunsword or Demonbane
for starting equipment even when they aren't lawful so won't attempt
to use those.
This should fix it but it's a pain to test.
Closes#691
Pull request #692 from zomGreg. One comment misspells "transcription"
and Death quote #29 coming from Reaper Man misspells "metaphor". Fixed
by separate commits.
Closes#692
In the sysconf section, "the following options affect the score file:"
had some score options and then several non-score options. Change to
"following four options" which reads a little strange but is precise.
Some other inserted line after those four options describing what
follows would read better but the stuff that follows is essentially
random based on the order that support for them was implemented.
Guidebook.mn: the 'placeholders' for DUMPLOG file name substitution
had the description column line up but the proportional font for the
'%x' column looked bad. Force fixed-width font there. Also add some
indentation. I wasn't sure whether '.in' should in inside .PS ... .PE
or outside. The final result looks the same either way.
Guidebook.tex: the new LIVELOG entry was accidentally placed after
the \elist line when it should come before that. (Not tested.)
Fix an object sanity check failure: a buried object with its bypass
bit set.
clear_bypasses() was supposed to be clearing the bypass bit on every
object but was neglecting the buried objects list and the billed
objects list (and inventory of the mydogs list, but that is expected
to always be empty at the time when clear_bypasses() gets called).
We already had an issue with billed objects, revealed by the fuzzer
soon after sanity checking was extended to test bypass/in_use/nomerge
bits. That one was fixed by clearing the bypass bit of specific
objects as they are being added to a shop bill. This fix should make
that earlier one become obsolete, but isn't removing it.
Reported by k21971, the dumplog section labeled "major events" showed
all logged events rather than just the ones classified as major.
Filter out the non-major ones when writing dumplog.
At the moment only a couple of ones other than achievements are major.
Probably various other types should be too.
The #chronicle command still lists all logged events unless they're
flagged as 'spoiler'. So far the mines' end luckstone is the only
one flagged that way. Unfortunately a player with access to live
logging could still learn whether or not the gray stone that has just
been picked up on the last mines level is the target luckstone by
viewing the log from outside of the game.
The #chronicle command would be more useful if it gathered all the
categories of events present and put up a menu allowing the player to
choose which ones to view. I haven't attempted to implement that.
Closes#687
Add /tune/ to the achievement section of the Guidebook.
The 'note' part is a bit of a spoiler and risks making the prayer
boon of "Hark! To enter the castle you must play the right tune."
redundant for players who actually read the Guidebook (so hardly
anybody). Since that's the first stage of a two-stage reward I've
left it alone.
Rewrite choose_stairs(). Use of '&& !builds_up()' was a no-op in
normal branches and forced picking the down stairs/ladder in Vlad's
Tower (or Sokoban) rather than reversing the usual up/down choice.
Also, the logic used was backwards: Kops always surrounded the up
stairs instead of the down stairs as intended. Non-Kops picked the
opposite direction of what the arguments asked for but since they based
their choice of up versus down on hidden mon->m_id, the reversal wasn't
noticeable.
Extend the choosing so that if nothing in the requested direction can
be found, it tries the opposite direction. Otherwise when Vlad's m_id
happens to force the direction to be 'up', he has nowhere to teleport
to now that being in his Tower doesn't force 'down' anymore. He goes
to down ladder when on the top level but if you level teleport to the
next level down and he accompanies you, he might go to either the down
ladder or the up ladder when he tries to get away from you to heal.
Reported by entrez: if a monster or explosion kills the hero with an
object that has timers or is a light source, it could trigger a panic
when end of game cleanup can't find it because it has been removed
from the map or monster's inventory and not placed back on the map
yet. This isn't much different from something thrown by hero which
had a similar situation dealt with a long time ago. Fix by setting
'thrownobj' for monster-launched and explosion-launched missiles.
That way done_object_cleanup() called from really_done() will place the
missile on the map where saving bones or general cleanup can find it.
It doesn't bother dealing with exploding a lit potion of oil that
kills the hero by missile damage before the potion explodes. If that
ends up in bones, it should still be lit and might blow up before the
new character reaches it. (Not verified.)
The code for a hero polymorphed into a unicorn and catching a thrown
gem has been moved into its own routine. No change in behavior, just
less clutter in the thrown-object-hits-hero section of the monster
throwing routine.
It was silly how some clearly mechanical traps didn't consider
flight or levitation when to trigger. Do those checks in dotrap/mintrap
making hero and monster trap triggering match more closely.
Report was for curses but issue is in the core so any interface
that supports persistent inventory is affected. Reading a not-yet-
discovered scroll of blank paper wasn't always updating perm_invent
to show change in formatted description when it became discovered.
Would only happen on turn #1 (so the scroll needed to be acquired
via autopickup at starting location or via wizard mode wish so that
it could be read before any game time elapsed) when the object
discovery routine deliberately avoided updating perm_invent. Fix
by using a different way than moves==1 to decide whether an object
is being discovered because it is part of hero's initial inventory.
Extend the PR#660 change that shows whether a monster is asleep when
examined by farlook/quicklook/autodescribe to monsters that aren't
moving due to timed sleep as well as those that are asleep for an
unspecified amount of time. Unfortunately 'mfrozen' isn't specific
about why a monster can't move so the phrasing is less than ideal.
The default sink glyph is already used for many other things:
iron bars, trees, corridors, drawbridges, and clouds.
Change the glyph to {, and change the color to white.
The glyph is only used for fountains, so it makes "safe"
water-related glyphs match.
Ensure the first spell - if any - given to the hero in initial
inventory is level 1 - otherwise you can end up with a situation
where the hero knows level 3 spells, but won't have enough power
to cast them.
If the hero starts out with a spell, ensure enough power (5)
to cast that level 1 spell.
Tone down sleep level to 3 (hitting a monster does tend to wake
it up), and replace the random monk starting sleep spell with
confuse monster, which fits nicely with monk's bare-handed
fighting style.
The enchantment spells were skewed towards lower spell levels,
and didn't seem to correspond with the spell effectiveness or
power. Adjust the spell levels:
- Confuse monster is probably the least powerful enchantment, and
also requires touch to work, so make it the new level 1 spell.
- Sleep is quite powerful, and ray, bump it to level 4.
- Charm monster is even more powerful so make it level 5.
(Considering that create familiar is level 6)
old new
sleep 1 4
confuse monster 2 1
slow monster 2 2
cause fear 3 3
charm monster 3 5
Also swap sleep and confuse monster generation probability.
Pull request from argrath: the code that decides whether to add 'B'
for blessed items, 'X' for unknown bless/curse state and so forth
when setting up prompting for the 'I' command was counting up the
recently introduced "just picked up" category using an uninitialized
variable. So it might erroneously include 'P' as a choice when no
such items were present.
Closes#683
I've seen complaints how looting containers is tedious, and
since multiple containers in the same location are now (and have
been for a while) handled with a menu, the yes-no-quit prompt
for a single container doesn't really mean anything.
Remove that prompt, and remove the "open carefully" message too,
so when you're looting a location with a single container, the
command will drop straight into the loot-in-out -menu. Also
adjust one looting message to explicitly mention the container
if there are other objects on top of it.
Removing the prompt means you can't loot a saddle from a tame
monster with plain loot when standing on a container - you need
to prefix the loot command with 'm' prefix in that case.
Reordering "killed for the first time" and "hit with a wielded weapon
for the first time" was done by moving the latter to hmon(). Hitting
with an applied polearm also gave the first-hit message since it
bypassed the routine that had been doing so. But the throwing code
that handles applied polearms calls hmon() for damage, so after that
reordering, the first-hit log message became duplicated if triggered
by polearm usage.
Also, fix a quibble with the wizard mode conduct message given after
never-hit-with-wielded-weapon conduct has been broken. The message
said "used a wielded weapon N times" when it meant "hit with a wielded
weapon N times". "Used" is misleading if that wielded weapon happens
to be a pick-axe, so change the message to say "hit with".