Commit Graph

3732 Commits

Author SHA1 Message Date
nethack.rankin
2e3a0f3b04 quest.txt Astral Plane
"Astral plane" is a place name so should be fully capitalized.  Some
of the variations used ("through the elemental planes to the astral",
"plane of the astral", "planes of the elements") aren't as clear cut, but
I capitalized all of those I found.
2009-04-07 19:42:26 +00:00
nethack.rankin
810c538dd0 climbing back to the Castle (trunk only)
From the newsgroup:  someone using <Someone>'s level-flip patch
(to transpose special levels left-to-right or top-to-bottom or both in
order to get more variety from them) ended up in solid rock.  When
climbing the stairs up from the Valley to the Castle, goto_level() was
hardcoded to find a spot in the extreme lower right corner.  If the level
is turned upside down, solid rock from an unused row at the top edge of
the map ends up at the bottom, and the placement code could put the hero
there.  That code only checked for walls and monsters being in the way,
not rock.  Also, if the level is flipped side-to-side than hero ends up
in same area as the upstairs rather than on opposite side of the Castle.

     This switches to the same teleport-region code used for other level
changes which don't arrive on stairs; such regions get flipped along with
map by that patch (I hope).  Even though no such fix is currently needed
for unmodified nethack, this change gets rid of the special case Castle
placement code entirely, simplifying both goto_level() and u_on_sstairs()
in the process.

     The Castle's existing from-below region covers the rightmost half-
dozen or so columns across all rows, so offers a bigger landing zone than
just the bottom corner.  That could be tweaked within castle.des but I
don't think it needs to be.
2009-04-07 08:21:32 +00:00
nethack.rankin
e205569714 extended quest text formatting (trunk only)
Add questpgr formatting codes to support pronouns for leader,
nemesis, deity, and artifact.
  %lh -> "he" or "she" for leader; %nh for nemesis; %dh for hero's god;
  %li -> "him" or "her"; likewise %ni, %di;
  %lj -> "his" or "her"; and %nj, %dj;
H, I, and J modifiers yield capitalized form of same.
  %oh -> "it" or "they" for artifact (Eyes of the Overworld is plural);
  %oi -> "it" or "them";
  %oj -> "its" or "their"; plus capitalization with uppercase modifiers.
Also, %O yields shortened artifact name ("the Foo" in place of "the Foo
of Bar").  These provide support for terser summary lines, but can also
be used in the regular quest text passages.

     A couple of nemeses don't specify gender.  The random choices need
to be made early so that the leaders' messages can get them right.  This
chooses during role initialization and then uses that result once the
corresponding monster is eventually created.  It does the same for leader
even though no current leader needs it, and for deity too.
2009-04-07 02:19:54 +00:00
nethack.rankin
a86187b398 summary text for block messages (trunk only)
[Make use of recent message history changes.]

     Add support to makedefs and the core for including a line of summary
text with quest messages that don't use pline() delivery.  The multi-line
record structure of quest.txt begins each entry with %C and ends with %E.
makedefs now examines the %E lines looking for "[anything]" and adds that
to quest.dat where deliver_by_window() can find it.  The square brackets
are required in the input and intentionally carried along to the output.
putmsghistory() is used to put the summary text into the message history
buffer for use by ^P, without being displayed first.  (So this is a no-op
for interfaces which haven't implemented putmsghistory yet.  Maybe
genl_putmsghistory() should pass such text to pline() as a quick hack?)

     This adds a few summary lines to quest.txt so that the feature can
be tested.  Most of them were written by <Someone> nearly three years
ago.  I'm planning to add a couple of new control codes that'll allow some
of them to expand into shorter text.  (The one where the Archeologist
leader tells you that the nemesis stole the artifact so your mission is
to find the goal level, defeat the nemesis, and return with the artifact
ends up being roughly 160 characters long.)
2009-04-06 02:50:41 +00:00
nethack.rankin
f468865494 putmsghistory() (trunk only)
[Third of three message history patches.]

     Add another argument to putmsghistory() so that it can tell whether
it's processing multiple messages for restore (which should be treated as
being older than any current messages) or a single message to stuff into
history (which should be treated as the most recent message even though
it hasn't been displayed in the message window).
2009-04-06 01:43:01 +00:00
nethack.rankin
47dad80337 tty messge history restore (trunk only) 2009-04-06 01:06:26 +00:00
nethack.rankin
d961d89714 hangup vs msghistory (trunk only)
[First of three message history patches.]

     The post-3.4.3 hangup changes broke the post-3.4.3 message history
save/restore for tty (and maybe Win32, if it supports hangup handling;
other interfaces haven't implemented message history save/restore yet)
during hangup saves by preventing interface-specific getmsghistory() from
being called.  Relatively benign; hangup save just behaved as if message
history was empty, so restore had no old messages to put back.  Naturally
post-hangup restore is when players would be most interested in reviewing
the previous session's messages, so benign failure isn't acceptable.  Fix
is to leave getmsghistory() intact when replacing windowprocs with the
I/O-free routines.  [I can't trigger real hangups for testing, but can
call hangup() from within the debugger to force an approximation of one.]
2009-04-06 00:46:43 +00:00
nethack.rankin
35d9a7c978 reading covered T-shirt (trunk only)
From a bug report, you could read
a worn T-shirt even when it was covered by a worn suit.
2009-04-01 00:52:30 +00:00
nethack.rankin
80322ee47d rusty pearl rings (trunk only)
Recent newsgroup discussion complained about a pearl ring becoming
rusty.  That has no effect on game play but does feel weird.  Rings which
are described by their gems specify a material based on the gem rather
than on the band, so making pearl rings be made out of iron didn't fit.
The substance pearls are made of is the same as in the shells of the
oysters or whatever critters excrete them.  The closest matches available
seem to be mineral and bone; I've gone with bone here.
2009-04-01 00:33:53 +00:00
nethack.rankin
1ab038dca5 dropping unpaid items vs containers (trunk only)
From a bug report, the 'D'
command would list 'u' as an item category choice if you were carrying
unpaid items inside a container, but if those were the only unpaid items
then nothing would happen once the dropping stage was reached.  Applied
to all menustyles (except partial, which bypasses categories and goes
straight to a menu listing all items).  There were two alternatives for
the fix:  suppress 'u' as an applicable category when it only applies
to container contents, or include the container among the drop candidates
even though it isn't an unpaid item itself.  I went with the latter; it's
simpler to implement and also feels a little more intuitive than behaving
like there aren't any unpaid items present.
2009-03-28 01:36:12 +00:00
nethack.rankin
b8b8a65dfb role selection typo (trunk only)
tty's role confirmation menu was always showing "dwarven" as the
chosen race.  I don't know how many times I saw it without ever realizing.
``races[FACE]'' in the code eventually stood out enough to be noticed.  :-)
2009-03-24 00:31:01 +00:00
nethack.rankin
664229027e another main() bit (trunk only)
It always struck me as odd that x_maze_max and y_maze_max were
initialized in main().  They're only needed when making new levels, so
don't have to come before saved game restoration.  They could easily have
gone into init_dungeon() (although they make well predate that), or even
mklev() (reinitializing them for each new level wouldn't have been a big
deal).  That's all moot, though, since it's trivial to initialize them at
compile time.
2009-03-23 00:29:56 +00:00
nethack.rankin
a2124ab231 role selection bits (trunk only)
Add a couple of comments and remove a block of unnecessary code left
over from early development.
2009-03-22 22:42:51 +00:00
nethack.rankin
cfeb804372 rephrasing mixup (trunk only) 2009-03-22 22:31:47 +00:00
cohrs
694a330a24 role.c compilation bit (trunk only)
gcc warnings noticed a mismatch in a format string
2009-03-22 17:02:28 +00:00
cohrs
d70a61f85d remove unused variable (trunk only) 2009-03-22 15:56:55 +00:00
nethack.rankin
7dd956c948 role init tidbit 2009-03-22 03:19:59 +00:00
nethack.rankin
44cc716fe4 enhanced interactive role selection (trunk only)
[See cvs log for src/role.c for a much longer description.]

     When picking role, race, and so forth, new menu entries allow you to
pick any of the other items before the one currently being handled.  After
picking all four of race, role, gender, and alignment (or if you answered
'y' to "shall I pick for you?"), there is a followup prompt to confirm the
choices.  It's a menu which also provides a chance to rename the character.

     This has only been implemented in win/tty's player_selection(), with
some support code in the core that might be useful to other interfaces.
And so far, the chance to rename is only presented as a menu choice if
you've given an answer to "who are you?" prompt earlier during startup.
Also, ports that use pcmain.c aren't able to perform hero renaming yet.
2009-03-22 00:23:57 +00:00
nethack.rankin
c35d7f42be enhanced interactive role selection (trunk only)
[This verbose description is being committed with role.c only;
  the dozen or so other affected files will use a much shorter one.]

     Executive summary:  using Unix (or VMS) with tty, start up via
	nethack -u player
and follow the prompts.  Seeing this in action will be much clearer than
any description.  It might work as is with Mac and Be too, where you
don't need to bother with "-u player" to get "who are you?".  Only half
of it will work with other ports using tty so far, and it does nothing
for ports which don't use tty.

     I started out attempting to add an option which would let you defer
picking your character name until after you'd picked role and race and
so forth (so that you could let the game pick randomly, then use your own
role- or race- or gender-specific name for the result) but threw my ends
up in frustration.  Instead, this allows you to specify race and/or gender
and/or alignment before role when interactively choosing them (ie, after
giving 'n' to the "shall I pick for you?" prompt), by adding extra menu
entries to the role menu, with similar entries in the other menus so you
can actually bounce back and forth picking whichever of the four role/race/
gender/alignment attributes in any order.  (<Someone> has a patch to
control the order of the four prompts via option setting, but it's not as
versatile as this ended up being.)

     That works pretty well, so I added a confirmation prompt when you're
done (which can be bypassed by picking new 'a' instead 'y' at the "shall
I pick your character's role [ynaq]?" prompt).  And I introduced a chance
to rename the character during that confirmation, with a quite modest
amount of spaghetti being added into main() to support it.  Picking a new
name which matches a save file will result restoring the saved game just
as if you'd used that name from the start.  [One thing which hasn't been
resolved yet is whether anything special needs to be done when changing
name to or from "wizard", particulary for ports which allow/reject wizard
mode access based on character name rather than user name.]

     Right now, renaming is only available if you've gone through the
"who are you?" prompt (thereby demonstrating that you're allowed to use
an arbitrary name), since some multi-user sites may be using scripting to
force the character name for players who share an account.  There should
be a new SYSCF option to let sites explicitly allow renaming, but this
had already grown pretty big so that is deferred.  (And I haven't yet
implemented sysconf for VMS so wouldn't have been able to test it....)

     Unfortunately, role selection has been implemented in the interface
code instead of in the core--a big mistake, in my opinion, even if some
interfaces can give easy point and click control to the player--so this
has only been implemented for tty.

     Also, renaming needs to manipulate lock files in the case where the
file name is based on the character name.  I moved the file name part
into getlock() itself, removing some clutter from main().  But getlock()
handling in pcmain.c is something I won't touch with a pole of any length.
It needs to be cleaned up before the rename capability can be activated
for ports that use that main().  The rest of the rename support there is
present but bracketed by #if 0.

     Lastly, the handling of generic character names like "player" and
"games" has been moved into plnamesuffix(), again to eliminate a bit of
clutter from main().  And plnamesuffix()'s potential for uncontrolled
recursion (if player keeps giving -Role instead of Name to askname()) has
been replaced by iteration.  It could still go on forever if the player
is persistent or askname() goes haywire, but I don't think we really care.

     The interface-specific changes are limited to player_selection() and
askname(), so folks can add this to other interfaces as desired without
flailing all over the place.  But the changes to tty's player_selection()
were quite extensive.  (Fortunately, some of it is just fixing up the
indentation to match changes in block nesting.)  Like tty, win32 and gem
use build_plselection_prompt().  It now returns a string ending in "[ynaq]"
rather than just "[ynq]" so if they don't bother with these changes, they
should either fix that up or at least accept 'a' as a synonym for 'y'
during the initial "shall I pick your character's role?" prompt.
2009-03-22 00:22:33 +00:00
keni
27c39a97e1 Allocation and style errors. Thanks Pat. 2009-03-20 20:31:14 +00:00
nethack.rankin
077606bc01 fix #H1826 - split long worm with 0 hit points
From a bug report, a long worm with 0 HP
was observed via stethoscope after cutting one or more worms in half many
times, followed by an unspecified crash.  Cutting a worm doesn't reduce
its level below 3, but if a worm is drained to level 0 by some other means
and then gets cut in half (and still has at least 2 HP left), cutworm()
would give the new level 0 worm 0d8 (hence 0) for current and max HP.
That could confuse end-of-move monster cleanup, which thinks 0 HP is a
dead monster who has been removed from the map but not yet purged from the
fmon list.  Purging it would then leave a stale monster pointer on the map.

     cutworm() should have special cased level 0 to use 1d4 for HP, but
instead I've changed it to not produce a cloned worm if the source one is
lower than level 3.
2009-03-06 02:22:14 +00:00
nethack.rankin
b76f8aab8d offshoot of #H1820 - priests/minions vs opposite alignment (trunk only)
In #H1820, <email deleted> reported that helms
of opposite alignment didn't work for monsters.  There's never been
any attempt to implement that, and it wasn't omitted by accident, so
I wouldn't classify it as a bug.  But it does seem buggy that temple
priests and minions of <deity> would be willing to put such helms on
and risk changing allegiance to another deity.  This lets other types
of monsters still wear helms of opposite alignment as ordinary head
protection, but the explicity aligned creatures won't do so anymore.
2009-03-01 03:49:54 +00:00
nethack.rankin
b71b3e920a whip fixes bit (trunk only)
use_whip() prompts with getdir(), which doesn't prevent the player
from deliberately pointing off the edge of the map, so the bullwhip bug
was more general than yesterday's fixes entry.  Being confused or stunned
could trigger a problem but one could happen without them.
2009-02-23 23:54:22 +00:00
nethack.rankin
e11c136bc9 fix #H1816 - polearm/grapnel/whip fixes (trunk only)
From a bug report, applying a polearm to make a
short-range ranged attack didn't scuff any engraving you were standing on,
unlike ordinary melee and throwing/shooting attacks.  Grappling hooks had
the same omission.  Fixing it led to several other minor bugs.  Attempting
to target an unseen monster's spot with polearm or grapnel would yield some
permutation of "wait, there's something there" but draw the 'I' glyph at
the wrong spot.  It used <u.ux+u.dx,u.uy+u.dy> instead of the actual target,
so put the 'I' one step in front of your most recent move (or throw or zap
or whatever last set u.dx and u.dy).  Giving ESC when prompted for target
spot failed to use up a turn even when the polearm or grappling hook had
just been auto-wielded for use.  Neither use_pole() nor use_grapple() set
`notonhead' for hmon() (called via thitmonst() in their cases; this was
academic since plain physical damage attacks don't actually care about it).
[The bad 'I' placement was a post-3.4.3 bug.]

     Applying a bullwhip to attack an adjacent monster didn't have any of
those issues but did have the possibility of targetting off the edge of
the map when standing at that edge while confused or stunned.

     Applying a polearm to target an 'I' would yield "nothing happens" if
the unseen monster wasn't there anymore, and it didn't bother to remove
that 'I' from the map.  After changing it to do so, the phrasing no longer
made any sense.  This led to a slightly bigger change than I intended:
since statues are now shown as gray monsters (does that work for tiles?)
instead of as chunks of stone, they are likely to be intentional targets
sometimes, so polearm attacks now handle them differently from other
non-monster locations.  [I hope that other attack forms don't need
similar handling.  Melee certainly doesn't, since walking onto the spot
is enough to distinguish statues from monsters.  Having the missile pass
right through a statue's location probably suffices for ranged attacks.]
2009-02-23 01:20:32 +00:00
nethack.rankin
a2257ebb1a mimics as doors on rogue level
From a bug report.5 years ago? and again today:
mimics appear on the rogue level even though they're lowercase letter
monsters.  <Someone> notes that during level generation, mimics pretending to
be closed doors are sometimes substituted for trapped actual doors.  That
should be avoided on the rogue level both because its doorways are always
empty (enforced after the fact in extralev.c code rather than in the door
making code) and because mimics aren't uppercase letter monsters (so
should only ever appear there if they've travelled from another level).
2009-02-22 01:37:09 +00:00
nethack.rankin
121b9e9722 small mimic grabbing bug (trunk only)
Noticed while testing the patch for monster ranged attacks when hero
is hidden.  Using #monster while in small mimic form would hide you, as
intended, but the first monster (or last monster?) who hit you hand-to-hand
would be grabbed ("It gets stuck on you.").  Unlike large and giant mimics,
small ones lack such a grab attack so when you eventually returned to
normal form, u.ustuck would remain set and you would end up being stuck
to an arbitrary monster instead of releasing it from your grasp.
2009-02-18 01:13:24 +00:00
nethack.rankin
dc8d285179 fix #1812 - ranged targetting of hidden hero (trunk only)
From a bug report, a hero who had
eaten a mimic corpse and was stuck mimicking gold was hit by an approaching
dragon's breath attack.  Make monsters usually fail to notice that you're
lined up for their ranged attack when/if you're hidden from them.
2009-02-18 00:50:20 +00:00
nethack.rankin
817976661f digging prompt: > vs < (trunk only)
The intersection of a couple of recent patches:  noticed when
updating movement as a grid bug, and accentuated when fixing the attempt
to move down while levitating.  If you can't reach the floor due to
levitation, don't show '>' in the list of likely candidate directions for
the prompt when digging.  It was always included so that the list could
never be empty, but it's a poor suggestion to the player when levitating.
Use '<' instead in that situation; also a poor suggestion, but silly
rather than unintentional.  :-)

     This only affects the bracketted part of the "In what direction?"
prompt, not the actual digging (and player can pick any direction whether
it's shown in the prompt or not, so the digging code is already prepared
to handle attempts to dig up as well as down anyway).
2009-02-03 03:03:16 +00:00
nethack.rankin
82ae06c617 yet more monpolycontrol (trunk only)
Factor out a few lines of common code instead of duplicating them.
2009-02-03 01:45:05 +00:00
nethack.rankin
53f1abed25 monpolycontrol typo (trunk only) 2009-02-03 00:28:06 +00:00
nethack.rankin
2904f49767 object save/restore (trunk only)
Make the same simplification to save and restore of obj->oextra as
was done yesterday for monst->mextra:  no need for a set of all 0 sizes
when the whole thing is null.  Bumps EDITLEVEL again.
2009-02-01 02:16:47 +00:00
nethack.rankin
84ca1773e5 fix #H1803 - levitating at floor level...
From a bug report, being stuck in the
floor or in lava and trying to move downwards while levitating gave "you
are floating high above the floor/lava" which contradicts being stuck.
Now you'll get "you are trapped in the floor/lava" in that situation.
I thought about letting it fall through to the chance to autodig with
wielded pick, but decided to go with just the alternate message.  (Being
tethered to a buried iron ball still lets you "float high above the floor",
so this doesn't check for being trapped that way.)
2009-02-01 00:56:50 +00:00
nethack.rankin
71219bf093 mimic statues & 2009 startup banner (trunk only)
A mimic posing as a statue was displayed as a tengu statue (and
recognizeable as such now that statues are displayed as the corresponding
monster rather than rock-class back tick), but the lookat code described
it as a giant ant statue (since there was no obj->corpsenm available to
indicate the monster type, it defaulted to 0).  This adds monst->mextra
field `mcorpsenm' so that mimics have a place to remember what sort of
statue or corpse they are mimicking.  And it picks a random monster type
when they take such forms so that the old tengu hack becomes irrelevant.

     newmextra() and newoextra() initialized pointers via memset(...,0)
which is not portable; switch to explicit assignments.  The wizard mode
code to display memory used for monsters and objects added in amounts
for the miscellaneous things pointed to by monst->mextra and obj->oextra
structs but didn't include memory for those structs themselves; add it.
Simplify monster save/restore slightly; there's no need for extra zeroes
to represent monst->mextra->X sizes when monst->mextra is null.

     Update the startup banner for 2009.  I should have done this with a
separate patch but I'm taking a shortcut.  :-]
2009-01-31 08:03:41 +00:00
nethack.rankin
0def692d5f probing shapechangers and mimics (trunk only)
Mentioned in the newsgroup recently:  stethoscope didn't reveal
when a monster was actually a chameleon, even though that's the sort of
inside information you might expect.  This adds "shapechanger" to the
other miscellaneous attributes shown.  I initially had "(a chameleon)" or
"(a vampire lord)" but decided that that was too specific, particularly
for the latter where you might expect/hope that the vampire bat next to
you is just an ordinary vampire rather than a lord.

     I had a pet eat a mimic corpse and take on the shape of a pyramidal
amulet.  Probing described it as "mimicing a pyramidal".  Many of the
names and descriptions in objects[] are only partial, so aren't suitable
for supplying feedback like this (and "mimicking" was misspelled...).
Switch to simple_typename(), although in the case of undiscovered amulet
it yields just "an amulet" rather than "a pyramidal amulet".  This also
extends probing feedback for mimicry to include all monsters mimicking
something, not just those who are in the midst of eating.  [That's
post-3.4.3 code and is only applicable for wands of probing.  Using a
stethoscope or hitting with Magicbane will unhide a mimic before giving
extra info about it.]
2009-01-30 01:44:53 +00:00
nethack.rankin
414e83fb78 grid bugs vs diagonal movement (trunk only)
From a bug report, attempting to move
diagonally when poly'd into grid bug form doesn't give any useful
feedback in the general case, and in the specific case of using 'u' to
try to move northeast with vi-style keys, it performs #untrap instead.
Diagonal directions were being classified as non-movement when in grid
bug form, so the feedback was usually just "unknown command".  But 'u'
is bound to untrap as a a convenience to players who use num_pad-style
movement keys.  (Move commands don't actually reach the assigned key
part of command handling, so for forms other than grid bug, !num_pad 'u'
moves NE despite the untrap function given to that key.)

     Split the diagonal handling out from movement command recognition.
It now gives "you can't get there from here..." if player tries to move
diagonally as a grid bug.  For direction prompts, it now gives "you can't
orient yourself that direction" instead of popping up the command assist
display.  (In the prompt string showing likely candidate directions for
digging, diagonal handling for grid bugs is academic because they aren't
strong enough to wield pick-axes.)
2009-01-29 00:46:01 +00:00
nethack.rankin
b76973aaaf monpolycontrol tweak (trunk only)
I) When testing the shopkeeper polymorph fix a couple of days ago, I
tried to pick a form without a head (which is now rejected for shk) by
specifying "trapper" via #monpolycontrol.  It worked, in the sense that
the shopkeeper didn't take that form, but it also retried with "lurker
above".  After trapper was rejected, it matched "trapper or lurker above"
for monster class and picked at random from that class (and in this case,
the second try was rejected for being headless too).  The code I added
(a couple of years ago?) to prevent picking invalid forms for vampire
shapeshifting was a bit sloppy with its retry attempts.

II) I also noticed that monpolycontrol would let you pick forms that
newcham subsequently rejected, like placeholder monster "giant", so that
select_newcham_form got called again, resulting in a new prompt from
monpolycontrol to choose a form without seeing any explanation why the
first try was ignored.  Now you'll get the same "it can't become that"
feedback and immediate reprompt as for an invalid monster, instead of
returning newcham a form that it won't accept.

III) The change in shopkeeper polymorph was rejecting forms without hands.
That was way too restrictive; the notake() filter is sufficient.

     This is all modification of post-3.4.3 stuff, so no fixes entry.
[Not 100% true.  newcham() doesn't explicitly reject humans anymore,
relying on polyok() test instead.  Kops are the only humans who pass it.
If they're not supposed too, they need M2_NOPOLY in their definition.]
2009-01-27 02:07:31 +00:00
nethack.rankin
1a6289a5ec fix #H1798 - limbless shopkeepers shouldn't take possessions (trunk only)
From a bug report, a shopkeeper who's been
polymorphed into a limbless creature shouldn't be able to come take your
possessions when you die since you can't pick up items when in that shape.
Rather than add new special case handling for shopkeepers, prevent them
from taking on shapes that render them unable to behave like shopkeepers
so that they can continue to catch thrown pick-axes and assorted other
things that would otherwise need a lot of extra checking introduced.
Ditto for temple priests, vault guards, and quest leaders.  Restriction
also applies to wizard mode use of #monpolycontrol, the only place where
players can actually notice this.

     It could--perhaps should--restrict them even further, forcing forms
that retain speech capability, but I didn't go that far.
2009-01-24 22:59:53 +00:00
nethack.rankin
b12d8522c5 Sunsword redux (trunk only)
This started out as a one line change.  After I saw someone in the
newsgroup mention that Sunsword's light was inferior to that of a lamp,
I decided to make it work better (than in 3.4.3, that is, becoming the
same brightness as a lamp) when blessed and worse when cursed (useless to
hero but still visible if wielded by a monster).  But then it needed to
change light radius when its curse/bless state changed, and it needed
message feedback when doing so, and that got kind of complicated.  I
wouldn't have bothered if I'd known what I was getting into, but I don't
want to throw it away now that I've done all this work....

     Sunsword now gives a light radius of 3 when blessed (same as a lit
lamp), radius of 2 when uncursed (same as a lit candle and as it has been
providing since added in 3.4.0), and a radius of 1 when cursed (nearly
but not completely useless, as mentioned above).  Also, it now "shines"
rather than "glows" since we usually use the latter for temporary effects.
2009-01-24 01:44:29 +00:00
nethack.rankin
e6b2d5c33d blessing/cursing via potion (trunk only)
Allow potions thrown straight down while hero is mounted to target
steed instead of always hitting the floor.  There's already a fixes35.0
entry for potions hitting worn saddle instead of the creature wearing it,
but that only happened when thrown at a nearby saddled monster, not when
the hero was stuck mounted on a steed with cursed saddle.

     Eight separate "the <obj> glows <color>" messages were too many...
(four for dipping an item in holy/unholy water, four more for throwing
either of those potions at a saddled monster).  Replace the repetitive
code, leaving just two such messages.  Setting of bknown flag for the
dipped object is the only intentional change here.  That used to be done
unconditionally but now requires that the hero see the glow color.
2009-01-23 00:05:14 +00:00
nethack.rankin
8c90e9ae7b fatal explosion feedback (trunk only)
From the newsgroup:
    As you read the scroll, it disappears.
    The scroll erupts in a tower of flame!
    Your spellbook of force bolt catches fire and burns!
    [...]
    Your potion of paralysis boils and explodes!
    Something seems to be holding you.
    Do you want your possessions idenified?
This character survived the burning and boiling objects then succumbed
to the initial flame explosion.

     A fatal explosion calls done() without any explanation.  Or rather,
it dated to the time where it would immediately follow "the scroll erupts
in flame" (or "you are caught in <some kind of> explosion") without the
chance for intervening messages.  Then when item destruction was moved
sooner (for bones file purposes), message sequencing was left dangling.
This patch adds a new "it was fatal" message in front of done().
2009-01-05 00:35:39 +00:00
nethack.allison
76350a5348 Fix a few build issues seen by various compilers
that I have on my system but haven't used for a while
(a couple of warnings and a couple of errors)
2008-12-30 22:02:31 +00:00
nethack.rankin
b8ed7412dc exerchk fix (trunk only)
Post-3.4.3 problem noticed by Michael:  some code which was supposed
to be inside the end of a loop got placed in front of the wrong closing
brace, ending up beyond that loop.  As a result, decay of old attribute
exercise wasn't working as intended, and out of bounds array modification
was occurring (clobbering u.abon.a[0], which probably messed up resetting
strength when taking off rings of gain strength which were worn during an
exercise check).
2008-12-30 21:45:41 +00:00
nethack.rankin
624df671c6 lifesaved steed (trunk only)
From the newsgroup:  hero's steed can become untame if killed while
it is wearing an amulet of life saving, leaving the hero still mounted
and resulting in repeated "placing steed onto map?" warnings when the
steed tries to move.  Force the hero to be thrown off the mount in that
situation.
2008-11-24 23:35:33 +00:00
nethack.rankin
4b1116f4d0 fix #H1755 - feedback for clerical summoning when blind (trunk only)
From a bug report, the feedback
you get when a monster summons insects or snakes is the same when blind
as when you can see.  A comment in the code stated as much, but fixing
it is relatively straightforward.  (Or not; there are actually a lot of
cases to be handled; this covers enough of them, I hope.)
2008-11-15 20:38:02 +00:00
nethack.rankin
655a340f69 fix #H1733 - fainting doesn't behave like falling (trunk only)
Suggested by <Someone> <email deleted>, fainting from lack
of food while wielding a cockatrice corpse should fall on that corpse
and be fatal, like triggering a pit or moving down stairs while too
heavily encumbered.  I put the fixes entry in the new features section
even though it probably qualifies as a bug.
2008-11-14 00:38:28 +00:00
nethack.rankin
1485d51ca9 fix #H1745 - enlightenment about number of times killed
From a bug report, code that always
produced plural feedback (used only for values of N greater than 3) was
unnecessarily handling plural vs singular.  No change in game behavior;
just one less function call in the code.
2008-11-14 00:08:32 +00:00
nethack.rankin
2cbc40caf7 fix #H1749 - kick that misses didn't reveal concealed mimic
From a bug report, getting "your
clumsy kick does no damage" when attempting to kick the location of a
concealed mimic or hidden monster didn't bring the target out of hiding.
2008-11-13 23:24:00 +00:00
nethack.rankin
fd799733c2 [part of] #H1743 - sleeping victim of theft (trunk only)
Mentioned by <email deleted> in his report about
sound anomalies, it was possible for a sleeping hero to "gladly start
removing armor" when attacked by a nymph or succubus.  The code
explicitly wakes up the hero if he has fainted from lack of food because
"can't charm without waking you" (according to the existing comment),
but it didn't handle other forms of sleep and paralysis.  You could get
 |You fall asleep.
 |The wood nymph charms you.  You gladly start removing your armor.
 |The combat awakens you.
Now in the same situation you'll get
 |You fall asleep.
 |You wake up.
 |The wood nymph charms you.  You gladly start removing your armor.
2008-11-02 23:12:21 +00:00
nethack.rankin
83eb72c0fd hand slip when naming objects (trunk only)
From a bug report, the text change applied
when you try to give an artifact's name to am item of that artifact's type
would choose a letter from 'a' through 'y' when replacing the randomly
selected target letter.  Rather than fixing the off by one bug which
prevented 'z' from being chosen, this switches to the existing routine
used for mangling engravings.  (Unfortunately the fix is not as simple as
first expected, because wipeout_text() doesn't guarantee to change text
which has spaces in it and all the quest artifact names have those.)
2008-11-02 22:26:56 +00:00
nethack.rankin
bb5820b493 monsters eating green slime corpses (trunk only)
From a bug report, pets able to eat
acidic and poisonous corpses (black naga was the case cited) would eat
green slime corpses without turning into green slime, unlike the hero.
This prevents such monsters from eating green slime unless they're
starving, implements transformation into green slime for the case where
it does get eaten, and prevents non-pet gelatinous cubes from devouring
such corpses.  meatobj() is reorganized to hopefully become clearer, and
it removes the assumption that the object eater is a g.cube in case we
ever adopt slash'em's "tasmanian devil" monster.

     Monsters with digestion attacks who swallow green slime monsters
are turned into green slime, but ones who swallow hero poly'd into green
slime are not.  This doesn't address that.
2008-10-25 01:04:04 +00:00