Commit Graph

2908 Commits

Author SHA1 Message Date
nethack.rankin
22269488fa quest message tweaks
From a list of bugs sent by <email deleted>, the initial message for
the knight quest included the phrase "looking closer" which isn't suitable
if the hero is blind at the time.  Also, one samurai guardian message used
"ninja" (assassin, more or less) where it ought to have been using "ronin"
(samurai without any master, a disgrace).

     The archeologist and tourist quests' initial messages had similar
blindness problems with "look".  (There are still at least 3 other places
which use "appear"; I've left those alone.)
2005-12-04 03:05:18 +00:00
nethack.rankin
d4c28b30a2 killer reason tweaks
A couple of items pointed out by <Someone>:  the killer reason
when hit by mis-return of thrown Mjollnir would vary depending upon whether
it was fully identified, unlike several other death-by-missile cases which
force the object to be described as if fully ID'd.  Also, the killer reason
when death is caused by kicking an object would give way too much detail
about the object if it was ID'd.  Fix both by switching to killer_xname().
Now "killed by a war hammer named Mjollnir" becomes "killed by Mjollnir"
(same as when already ID'd), and "killed by kicking 5 cursed poisoned -1
orcish arrows" becomes "killed by kicking orcish arrows" whether ID'd or not.

     [Trunk only] question?  Should being hit by returning Mjollnir really
be receiving half-physical-damage reduction when hero has that attribute?
It ignores the fact that Mjollnir is also dishing out lightning damage.
Are other artifact hits ignoring such things too?
2005-12-03 04:46:48 +00:00
nethack.rankin
6955f1ab63 fix #Q241 - swallowing Medusa (trunk only)
From a bug report, eating Medusa's corpse is fatal
but devouring her whole (purple worm or poly'd hero) was not.  Now it will
be.  Also, being killed by swallowing a cockatrice or a Rider could have
disclosed "you went without food" if you hadn't eaten anything else prior.
This fixes that too, although it might be a little silly if it happens to
a monk since he'll feel guilty (for non-vegetarian diet) right as he dies.
2005-12-03 03:16:25 +00:00
nethack.rankin
c28a4aece8 grammar bit: fatal cockatrice corpse theft (trunk only)
From a bug report, stealing a cockatrice corpse
from a monster while polymorphed into a nymph and not wearing any gloves,
the cause of death ended up being "petrified by cockatrice corpse".  It would
also have said the same thing if a stack of multiple corpses was involved.
This fixes both cases, and also hypothetical unique monsters with petrifying
touch.  (Last bit tested by temporarily adding Medusa to touch_petrifies().)
2005-12-01 04:19:15 +00:00
nethack.rankin
6708e01a47 fix #Q235 - rubbing against known touchstones
Allow rubbing any object against any touchstone even when the latter
is known so only gems make sense.  Also, propagate an earlier fix which
allowed rubbing gold against known touchstones to the branch (it had been
trunk only).
2005-11-29 02:28:52 +00:00
nethack.rankin
121a49cdcd number_pad:3,4,-1 (trunk only)
I left out the Guidebook updates when I checked in the number_pad
changes yesterday.  I no longer have any way to preview either format but
at least LaTeX doesn't give any warnings about the TeX one.  I suspect that
the list of valid settings is going to be too wide; it will likely need to
become an actual item list or table to make the descriptions wrap sensibly.

     doc/Guidebook.txt hasn't been updated in a long time.  Can someone
generate an up-to-date copy and check it in?
2005-11-27 04:04:20 +00:00
nethack.allison
af91e757f5 build clean-up (trunk only)
../src/detect.c(715) : warning C4101: 'obj' : unreferenced local variable
2005-11-26 04:00:22 +00:00
nethack.rankin
ea61a13add number_pad:3,4,-1 (trunk only)
[See the cvs log from flag.h for comments pertaining to iflags.num_pad
and Cmd.num_pad, Cmd.commands[], Cmd.serialno.]
2005-11-26 02:34:23 +00:00
nethack.rankin
0076d5fc00 number_pad:3,4,-1 (trunk only)
Add support requested by a user for number_pad:3 to use a phone-style
keypad layout where 1,2,3 are on the top row and 7,8,9 on the bottom,
opposite of the adding machine layout adopted by computer keyboards.  Also
number_pad:4 combines that with the number_pad:2 hack to give different
behavior for the 5 key (also meta-5 and meta-0).  And number_pad:-1 is a
rather absurd way to support German keyboards which have y and z keys
swapped, avoiding the need to add a new option for that.  With it, z moves
upper-left and y zaps wands, with corresponding swap of the upper case,
control, and meta variations of those two letters.  (There is a "German
keyboard patch" for this floating around the net, but it implements a
compile time configuration setting which results in hard-coded behavior
for those keys.  This implementation lets it be toggled on or off at will.)

     There's more here, intended to ultimately simplify rhack() quite a
bit.  Most of that isn't finished yet.  However, the part that is done
should produce same run-time behavior as before.  I hope....

     iflags.num_pad and iflags.num_pad_mode should now be viewed as opaque
items used for communicating dynamically updated option settings to the
core only.  Ports and/or interfaces which feel inclined to peek at them
should switch to Cmd.num_pad,&c instead.  (I've made that switch for a
couple of places which would have stopped compiling due to sdir and ndir
going away, and for vms+tty where I could directly test the change(s),
possibly plus one or two places which got heldover over from my earlier
attempt that did try to update all of them.  Ports which haven't made the
change yet ought to continue to work as-is though.)

     Eventually ports/interfaces which implement alternate ways to invoke
commands (pull down menus or extra keyboard buttons or whatever) should be
able to scan Cmd.commands[] to figure out which input characters trigger
which nethack functions.  The ones that currently use hardcoded key lists
will probably need to migrate before any dynamic key binding functionality
gets implemented.  (Which may never happen; it's definitely not on my own
to-do list.)  Cmd.serialno is intended to be the way for them figure out
when the commands have been changed (which right now only happens when 'O'
is used to alter the number_pad setting); perhaps a new interface callback
would be better suited for communicating this.

     It may be necessary to rearrange header inclusion so that func_tab.h
gets included before flag.h (and/or struct cmd gets moved from the latter
to the former--but then func_tab.h would be needed in a bunch of places
which don't currently use it) to support some pre-ANSI compilers.  And the
command initialization might need to be moved to somewhere earlier than
init_options() at some point if port/interface initialization starts caring
about it.
2005-11-26 02:32:49 +00:00
nethack.rankin
cd4e6a8f1a wishing bit (trunk only)
The code let you wish for trapped containers in wizard mode and tried
not to let you do so in normal mode.  But it handled the trapped attribute
by overloading the poisoned one, so wishing for a "poisoned chest" would
produce a trapped chest in any mode.  This fixes that by removing the
overloading.  You can wish for a trapped box/chest (or tin) in wizard mode
and you can now also explicitly wish for an untrapped one in any mode.
Asking for trapped in normal mode--most likely hoping to seed a dangerous
bones file--just negates any preceding "untrapped" handled earlier within
the same wish, and specifying "poisoned" for a container no longer has any
effect.
2005-11-19 04:38:42 +00:00
nethack.rankin
bdf85bfa84 magically detecting chest traps (trunk only)
(Nothing to do with the recent suggestion that the search command be
extended to find traps on adjacent containers.)  When a crystal ball or
confused/cursed gold detection performed trap detection, it found trapped
chests on the floor but not any which were buried or carried by the hero
or by monsters.  This fixes that.

     Still needs fixing?  The message "your toes stop itching" when the
only trap on the level is at the hero's current location is pretty strange
if that trap happens to be carried rather than stood over, but I don't
know what to change it to.  I guess it's always been strange if there was
a ceiling trap rather than a floor trap involved.
2005-11-17 04:51:13 +00:00
nethack.rankin
dce306df5b fix #Q227 - cancelling items in shop entrance (trunk only)
From a bug report:  cancelling objects
in a shop doorway or one step inside would cause the shopkeeper to brand you
a thief.  The relevant code is trying to handle the case where you're inside
one shop and zap a wand or spell from there into another one; it didn't cope
with being in the neutral area of a single shop.
2005-11-17 03:51:16 +00:00
nethack.rankin
bcb9d35fe3 yet more artifact name handling (trunk only)
The fix to prevent naming an unknown gray stone "the Heart of Ahriman"
from revealing whether the object was a luckstone was inadequate to prevent
using the same trick with "the Mitre of Holiness" to determine if an unknown
helmet was a helm of brilliance.  (I don't know whether whoever figured out
the first one has realized the second yet; no one had mentioned it in the
newsgroup the last time I looked.)  To get this right we need to check for
objects sharing the same set of shuffled descriptions in addition to testing
whether they have identical descriptions.  Doing that meant reorganizing how
object shuffling is done, but it produces the same behavior as before.
2005-11-15 04:50:06 +00:00
nethack.rankin
179e30b2fe X11 typo
From a bug report:  fix a typo for mouse
position handling in set_button_values().  I have no way to test this,
nor can I tell whether it could have ever impacted anyone.  The old code
clearly had a mistake and the fix is obvious.
2005-11-13 05:55:32 +00:00
nethack.rankin
c2e8fb61b8 more luck stone ID (trunk only)
Refine yesterday's change in how attempting to assign an artifact's
name to some object works:  only check object descriptions for undiscovered
object types.  Once you know that a particular gray stone is a flint stone,
you could name it "the Heart of Ahriman" as before the previous change.
Conversely, once you learn luck stones, you could give that name to any
other unknown gray stone.  This restores the ability of a player to name
his elven broadsword such that some unsuspecting other player might find
"a runed broadsword named Stormbringer" in a bones file.
2005-11-13 04:43:50 +00:00
nethack.rankin
75c4576668 gas spore explosions while hallucinating (trunk only)
From a bug report:  when hallucinating,
messages for affected monsters and/or hero referred to "the gas spore's
explosion" instead of supplying random monster names.  This is a little bit
tricky; since it can be displayed multiple times for one explosion, it needs
to be constructed on the fly in explode().  (Caller couldn't have handled
this anyway since it's using the value for killed-by reason which mustn't
be distorted by hallucination.)
2005-11-13 03:20:20 +00:00
nethack.rankin
d5be1ff3f1 plug luckstone identification hole (trunk only)
From the newsgroup:  when you pick up a gray stone, you can determine
whether it is a luckstone by attempting to name it "the Heart of Ahriman".
Your "fingers slip" if it is, they don't if it isn't.  That's way too
cheesy for my tastes.  This patch will make the finger slipping occur for
any item that has the same description rather than just for the exact type.
Now you won't be able to name any type of gray stone "the Heart of Ahriman"
(nor an elven broadsword "Stormbringer"; however, assuming that you manage
to acquire a non-artifact runesword, you can still uselessly name it
"Orcrist" if you want).
2005-11-12 05:30:11 +00:00
nethack.rankin
90a9978c33 fix #Q221 - inappropriate vault guard message when embedded gold reached
From a bug report:  when a guard who's
leading the character out of a vault comes across gold (from mineralize()
usually, but a player could deliberately seed the area in xorn form), the
message "the guard calms down and picks up the gold" was given even though
the guard wasn't angry.  Pick up such gold as soon as temporary corridor
reaches it so that on his next move the guard won't mistakenly think that
the hero has just dropped it.
2005-11-12 03:19:22 +00:00
nethack.rankin
0a3ac165cc more container flags (trunk only)
cknown and lknown flags for containers are now checked when deciding
whether an item is fully identified, and they're set when identification
takes place.  (You'll learn how many items are inside even if you haven't
looked to see what they are yet.  This means that an inventory listing of
unpaid items will reveal the contents after you've used enouch magic to ID
an unpaid container.)  Also, set those flags for any container in initial
inventory; rogues should know that sack starts out empty.
2005-11-06 06:10:32 +00:00
nethack.rankin
b9ae4361af container status bits (trunk only)
Couple of post-3.4.3 things:  using ':' to view the contents when
looting or applying a container wasn't setting its cknown flag (contents
known); probing a container wasn't setting lknown flag (lock state known).
2005-11-03 06:15:59 +00:00
nethack.rankin
7921c6ea3e minions/Angels (trunk only)
Angels used the epri extension even though they're never priests,
presumeably because they're sometimes flagged as "renegade".  Since the
only priests ever flagged as renegade are roaming minions rather than
temple priests, move the renegade flag to the emin extension and switch
Angels over to that.  Summoned Angels will now always have the isminion
flag set.

     Makefiles need updating:  monst.{c,o} now depends upon emin.h.
2005-11-03 04:54:55 +00:00
nethack.rankin
940a70d6ae thy/thine usage
According to the dictionary, "thine" is used in place of "thy" when
preceding a word which starts with a vowel or "h".
2005-11-03 03:44:56 +00:00
nethack.rankin
3389c02126 guardian angel
Move the guardian angel creation and removal code to minion.c.
2005-11-02 05:49:18 +00:00
nethack.rankin
fa708fe73b chest trap bit
From a bug report, the "you stagger"
message when a trapped chest releases a cloud of gas shouldn't include the
inaccurate phrase "and your vision blurs" if hallucination is blocked by
Grayswandir.  Suppress it in that case.
2005-11-02 02:35:31 +00:00
nethack.rankin
0defd00b4b fix #Q211 - inappropriate vault feedback
From a bug report, you'd get the message
"the corridor disappears" whenever a vault guard was killed, even if the
temporary vault corridor was already gone due to leaving its vicinity.  This
fix seems to work ok, but I don't pretend to understand how the convoluted
vault code actually works.
2005-10-29 04:07:21 +00:00
nethack.rankin
1f5c035b3b makeplural/makesingular support for foo-at-bar (trunk only)
Suggested by Janet, after inhaling paint fumes.  Unlike mother-in-law,
which is an entry in the hallucinating monsters list and would be pluralized
if chosen as a tin description, I think the rank title man-at-arms will only
ever go through plural/singular handling if used as a fruit name.  But since
the man/men part was already implemented for pluralization, adding the -at-
part is trivial.  Also adds men/man singularization for the general case
where -at- isn't involved.
2005-10-25 01:47:03 +00:00
nethack.rankin
297eadd67d fix M203 - grammar for tin of hallucinated "mother-in-law" (trunk only)
From a bug report, (is that name just
a coincidence, or is it our Matt?), "this tin smells like mother-in-laws"
should be "this tin smells like mothers-in-law".  That led to a small can
of worms when I tried experimenting with mother-in-law as the named fruit.
Naming your fruit "pomegranates" would result in "pomegranateses" if you had
more than one.  These changes are mostly just band-aids for that; I think
the proper solution is to singularize the user's value when fruit name is
being assigned.  Force it into lower case at the same time, then some other
special casing could be eliminated.  There's no particular reason to keep
"grapes" and "grape" as separate entries, nor "matzot" and "MATZOT" either.

     One of the non foo-in-bar changes prevents "grapefruit" from getting
a false match against named fruit "grape".  (Are there any legitimate cases
where trailing text should be ignored?  I couldn't think of any.)  Another
results in a wish for "kumquats"--when fruit name "kumquat" exists--yielding
two instead of a random amount, the way that specifying plural works with
other sorts of objects.  And if you're strange enough to name your fruit
"kumquats" in the first place, asking for "kumquat" will produce exacly one.

     This patch applies cleanly to 3.4.4 but I don't think it's been tested
adequately enough to be included there.
2005-10-22 06:38:41 +00:00
nethack.rankin
74f08dcb22 more monster key use
Let monsters use lock picks and credit cards in addition to keys for
opening doors.  And the earlier code to have pets hang on to a key didn't
work as intended.  It worked fine if the key was the only object carried,
but the monsters' item dropping code didn't give any special handling to
keys so they'd be dropped too if the pet carried another droppable item.
This eliminates second set of checks for handling some items specially--
dropping now uses the same routine as is used when pet movement decides
whether there's anything to drop.

     Also, a couple more door message tweaks.  "You see a door open" seems
strange when you watch your pet do the opening.  Previously fixed for the
"unlock and open" case, this does the same for opening already unlocked
doors and for giants smashing down doors--it now gives a more specific
message when you see a monster perform the action.

     Possible change in play balance:  pets capable of picking up the
rogue's Master Key of Thievery or tourist's Platinum Yendorian Express
Card will keep one of them.  So a player might accidentally lose one by
leaving it on the floor in a pet's path, or more significantly, the Card
will yield a means of giving magic resistance to a monster who can't wear
a cloak or dragon scales.  It's neutral and the most interesting high-end
pets are lawful (hence won't pick it up), so that probably won't have much
impact.
2005-10-20 03:58:46 +00:00
nethack.rankin
213e3e4d00 SC343-9 followup (trunk only)
monst->cham usage bit.  CHAM_ORDINARY probably ought to be discarded
and replaced by NON_PM; then mons[0] wouldn't be ineligible to become a
shapechanger.  (Not that we want giant ants to mutate on the fly, but in
case someone ever inserts something interesting in front of them.)
2005-10-11 04:30:24 +00:00
nethack.rankin
c1393e508f key use by pets
Spotted when fixing the Rogue level digging/phasing bug:  pet movement
was setting up the wrong flag for pets who happened to be carrying a key.
This wasn't particularly noticeable because they tended to drop keys right
after picking them up.  And apparently the checks elsewhere in movement
prevented that wrong flag from having any effect; once I changed it so that
pets would hang on to keys, I never saw them break a door down with one.
Now they'll keep keys, similar to unicorn horns and pick-axes, and use them
properly.  The door unlocking message needed a tweak because it assumed
that the opener was on the far side trying to reach you and looked quite
odd when you could see the action taking place.

     I've put this into the fixes file as a new feature rather than a fix.
2005-10-11 04:22:18 +00:00
nethack.rankin
fb6cbd37e7 fix C343-3 / #U793, tame h and U don't dig on Rogue level
From a bug report, 2003:  a
pet who normally would dig could pass through walls and solid rock on the
Rogue level without leaving a tunnel in its wake.  Monsters are explicitly
prohibited from digging on the Rogue level, but pet movement ignored that
and specified that locations accessible via digging were valid destinations;
actual movement bypassed the digging step so it acted like passthru.
2005-10-11 03:47:27 +00:00
nethack.rankin
8f8538e527 fix SC343-9, bones handling for corpse/statue of unique monster (trunk only)
The logic in cant_revive() was a little off, so reviving a unique
corpse or statue on a bones level would recreate that unique monster instead
of making a doppelganger who's imitating it.  Fixing that was simple but had
the unintended side-effect of making it impossible to deliberately create
unique monsters with ^G in wizard mode.  So create_particular() has been
modified to let the user override the zombie or doppelganger conversion.
And then when not overriding, shapechangers took on random appearance, so
this also changes create_particular() to override shape changing.  And that
has the side-effect of making chameleons or vampires start out as themselves
instead of as random critters or bats/fog clouds.  [Better stop now! :-]

    resetobjs() also needed to have extra corpse handling when saving bones
because the fix for revival wouldn't prevent you from turning to stone by
eating apparent-Medusa's corpse.  Statues of uniques and corpses of special
humans like vault guards and shopkeepers didn't need anything extra; they
can retain original form until an attempt at revival is tried.

    I'm not going to try to adapt this for 3.4.4.
2005-10-08 04:19:31 +00:00
nethack.rankin
8c56042a0c vampire bit (trunk only)
Vampires' aversion to altars is retained when they've shapeshifted
into their assorted alternate forms.
2005-10-06 03:57:15 +00:00
nethack.rankin
a906215720 more monster alignment
Simplify is_lminion(); as a result, several source files no longer
need access to epri.h.  (mondata.c already could have lived without it;
eshk.h as well.)

Makefile dependency changes:
  mondata.{c,o} -- doesn't need epri.h or eshk.h
  monmove.{c,o} -- doesn't need epri.h
  wizard.{c,o}  -- ditto
  pline.{c,o}   -- ditto (yesterday's patch)
2005-10-06 03:45:20 +00:00
nethack.rankin
5ffa09c388 alignment of Angels followup
No need to retain sgn() here; mon_aligntyp() takes care of that now.
2005-10-06 03:12:55 +00:00
nethack.rankin
7b1b472c33 alignment of Angels
From a bug report, the probing/stethoscope code assumed that all Angels
(the specific monster type, not the whole 'A' class) used the epri extension
to hold alignment, but that's not true for randomly generated ones.  So
monster status feedback gave erroneous results, and it would vary based on
pet behavior if the random Angel had been tamed.  Also, touch_artifact()
didn't know about special alignment handling for Angels and aligned priests
so always used their default alignment.

     There are other problems with Angels--such as whether they should even
be allowed to be generated randomly in the first place--that this doesn't
attempt to address.  The patch for that was starting to sprawl all over the
place so I pulled this simpler bit out for a first cut.  Probing now shows
the Wizard of Yendor as unaligned instead of lumping him in with chaotics.

     Another Makefile update needed:  pline.[c,o] no longer needs epri.h.
2005-10-05 05:15:46 +00:00
nethack.allison
7391587006 nethack.rankin wrote:
>      Makefiles need a dependency update to add edog.h for eat.c.
2005-10-02 21:08:28 +00:00
nethack.rankin
f1fe8c1600 mind flayer brain attacks (trunk only)
Fix a couple of problems From a bug report.  Eating a Rider corpse is fatal, but eating a live Rider's
brain was not--now it will be, both for monster mind flayers and for player
poly'd into one.  Also, there was no check for cannibalism when poly'd hero
eats brains--now there is.  Not mentioned in the report:  eating Medusa's
brains will now be fatal just like eating her corpse.  And pet mind flayers
who eat the hero's brains will gain some nutrition like they do when eating
monster brains.

     Creating a common eat_brains() routine turned out to be something of
a mistake; there is only a tiny amount of overlap among the u-vs-m, m-vs-u,
and m-vs-m cases.

     Makefiles need a dependency update to add edog.h for eat.c.
2005-10-01 05:14:19 +00:00
nethack.rankin
be193d27b5 more graphics option parsing
The recent fix for OPTIONS=noDECgraphics,IBMgraphics would have been
subject to lint complaints for some configurations.  Declare the extra
variable with the same conditional tests which control its use; somewhat
messier, but lint free.

     My previous fix only solves this problem for the initial config file
parsing.  If you enable IBMgraphics (by any method), then interactively
use the 'O' command to try to enable DECgrahpics and to _simultaneously_
disable IBMgraphics instead of letting it be overridden, you will end up
with IBMgraphics on and DECgraphics off.  That's because the menu entries
are processed in order, and after it has acted upon the request to set
DECgraphics on, the IBMgraphics flag will have been switched off; then
when it acts upon the request to toggle IBMgraphics, that flag will end
up being switched back on (switching DECgraphics back off in the process).

     This erroneous behavior was the same prior to last week's patch;
I just hadn't noticed yet.  It looks like we really do need to change
{ASCII,DEC,IBM,MAC}graphics into a single compound option.
2005-09-27 04:35:57 +00:00
nethack.rankin
fa7fd20cae handling of {DEC,IBM,MAC}graphics options
Fix the problems From a bug report.  So having
  OPTIONS=IBMgraphcs
  OPTIONS=noDECgraphics
would yield an ASCII display instead of showing IBMgraphics, but IBMgraphics
flag in the Options list would falsely show as on.  Manually toggling it off
put things back into sync.

     Avoiding the false setting is completely trivial.  And fixing the
inappropriate override turns out to be easy too, unless I've bungled this.
One thing it does not do is try to warn about attempts to set conflicting
options like
  OPTIONS=IBMgraphcs
  OPTIONS=DECgraphics
Fixing that seems to be too messy to bother with, particularly since the
game runs ok (leaving the setting handled last in place).
2005-09-24 04:21:50 +00:00
nethack.rankin
7828cb3687 level drain while polymorphed (trunk only)
Noticed when incorporating the "vampire dancing" patch:  losing a level
while polymorphed would subtract from your normal hit points but didn't
affect your monster hit points.  Now they'll lose d8 from max and current,
similar to the amount they increase when gaining a level.

     This also addresses an issue from the newsgroup a few weeks back:
someone mentioned an assumption that Stormbringer drained an amount other
than d8 for monsters who use some other formula for their hit points.  It
wasn't true, but now it will be (approximately).  Most monsters with unusual
hit points aren't subject to level drain, so it shouldn't have much impact.
2005-09-22 06:02:08 +00:00
nethack.rankin
7ec0d054a4 fix #M178 - mirror feedback for unID'd looking glass
From a bug report, applying a
mirror at sleeping Medusa yielded "too tired to look at your mirror" even
even though the item being used was listed in inventory as "looking glass".
Several other messages and any target monster would produce similar things.
Perhaps they should auto-ID when applied, but I changed messages to use
the description if real name isn't known.

     This also treats incubi identically to succubi regarding mirrors:
they like to see their own image and will take the mirror away when one is
applied at them.
2005-09-22 04:57:48 +00:00
nethack.rankin
5bc6f1444e HP and Pw multiplication (trunk only)
Fix the problem pointed out by <email deleted>
where polymorphing into a new man at level 1 could be used to approximately
double or triple your hit points and spell power.  With means to drain
level back down to 1 and with amulets of life saving to survive those times
you lose levels instead of gain, you could do this repeatedly and end up
with HP and Pw values in the millions.

     This uses the earlier patch that records the HP and Pw increments from
level gains.  Now when polymorphing into a new man, level based HP and Pw
are removed from the current values, remainder get multiplied by 80%, 90%,
100%, or 110% (average 95%, so tend to drop slightly), then a brand new set
of level gain increments (reflecting new man's Con and Wis) are added in.

     Code for calculating spell energy is moved from pluslvl() and u_init()
into new routine newpw().  It and newhp() take over responsibility for
remembering the level based increments from pluslvl() which didn't deal
with the initial amount (stored in slot [0]; earlier patch didn't need it).
2005-09-21 05:31:42 +00:00
nethack.rankin
25a9c0ca4b "vampdance" patch for avoiding unlimited HP and Pw gain (trunk only)
<email deleted> sent a report with
subject "Vampire-dancing can give you unlimited maxhp/maxmp" about how you
can manipulate your hit points and spell energy by using equipment to
lower Con and Wis prior to deliberately losing a level, then switching to
alternate gear to raise them prior to gaining the trivial 1 XP needed to
regain the lost level.  With Stormbringer (to toss up so that it falls on
your head) or spell of drain level (to cast at yourself), you can do this
level toggling as much as you like since it doesn't consume any resources
in the process.  All you is a supply of non-threatening monsters to kill
for the regaining half.

     In March he sent "vampire-dancing (patch)" which didn't include a
patch but did give a URL ( http://nethack.angband.pl/vampdance.patch )
for one.  That contained his suggested fix:  recording the hit points and
energy points given each time you gain a level and then using those exact
amounts when you lose the corresponding level.  It's still possible to
manipulate HP and Pw by losing multiple levels after you've boosted Con
and Wis to ascension ready status (you'll lose the original values but can
expect to get better ones when gaining levels back), but can only gain a
modest improvement and repeating it doesn't augment the effectiveness.
Plus it's much harder to regain multiple levels than it is to get just one.

     His patch had a couple of bugs which I've fixed.  I suppose that there
could be additional potential problems but the idea and its implementation
are both pretty straightforward.  (This doesn't address the other recently
reported situation of using polymorph into "new man" while at level one to
multiply HP and Pw.)
2005-09-13 05:09:17 +00:00
nethack.rankin
1c290666a6 choking on gold
From a bug report:  "choked on an a very rich meal".
2005-09-10 02:40:51 +00:00
nethack.rankin
6e987c27af gems vs snoozing unicorns
From the newsgroup three or four weeks ago:  sleeping or pararlyzed
unicorns would catch thrown gems despite being unable to move.  Now they'll
magically dodge instead--in other words, thrown gems will always simply
miss the target (and land at its feet) when a unicorn is unable to move.
The unicorn won't be angered or awakened by the attempt.
2005-09-07 04:51:56 +00:00
nethack.rankin
d129f6760e fix vision bug - moving a subset of boulders from a location
From a bug report.  Pushing one
boulder from a location which had more than one would open up line of sight
at that spot as if all boulders there were gone.
2005-09-04 03:06:20 +00:00
nethack.rankin
e3f1716da9 consistent level change messages
From a bug report: #M30: 3.4.2 bugs and ideas); describe
flyers (poly'd hero or riding flying steed) as flying when they use ladders
or jump down holes.  This also gives feedback when using the stairs in the
ordinary up or down case, where no message was previously given.
2005-09-03 05:36:40 +00:00
nethack.rankin
545239f4b1 fix M167 - hero lycanthrope vulnerable to level drain
From a bug report, player's character inflicted
with lycanthropy doesn't gain level drain resistance when in normal form
even though lycanthrope monsters do have it when in their human form.  The
report claimed that the character didn't gain it when in beast form either,
but the code--and testing--suggests otherwise.

     The same resist_drli() call used for monsters is used for the hero,
but the is_were() check there isn't able to recognize a lychanthrope hero
since youmonst->data doesn't track that when in human/normal form.  This
adds another more specific check to handle that case.
2005-09-02 06:29:15 +00:00
nethack.rankin
8ce7216a0c fix M159 - crash at end of prayer
Fix the crash caused by division by zero (attempt to compute rn2(0))
when deciding prayer boon for a character whose Luck went negative during
the course of the prayer.  <email deleted> triggered it
by killing a shopkeeper with the ongoing damage from a scroll of stinking
cloud; his non-chaotic character was branded a murderer and lost two points
of Luck after the prayer was already in progress.  (Prayers fail when Luck
is already negative, so the code to pick a boon expects non-negative values;
the fact that is always adds at least +2 leads to me to suspect that someone
already realized that luck timeout on Friday 13th could result in Luck of -1
at the end of a successful prayer--that value doesn't trigger this crash.)
2005-09-02 06:00:44 +00:00