Commit Graph

117 Commits

Author SHA1 Message Date
Sean Hunt
97d6fade74 Reformat all C files.
I'll push a formatting guide at some point. There may still be
outstanding changes, but please feel free to resolve those as you arrive
a them.

To the best of my knowledge, there is no changes to the actual code
content, but the formatter does have the occasional bug. If you run into
an issue, please fix it!
2015-05-09 13:43:16 -04:00
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -04:00
Pasi Kallinen
fdc7e980ea Prevent segfaults, makemon can return null 2015-04-03 14:46:28 +03:00
Pasi Kallinen
411ee58593 Add more explicit helpless reasons
Instead of just "while helpless", the death reason will tell
more explicitly why the player was helpless.  For example:
"while frozen by a monster's gaze"
2015-03-29 22:12:19 +03:00
Sean Hunt
3a049cf66e Eliminate erode_obj() and other erosion.
Now all erosion that isn't fire-based goes through `rust_dmg()`
2015-03-02 12:50:00 -05:00
Sean Hunt
7e0d552b06 A lot more cleanup to rust and water. 2015-03-02 12:49:59 -05:00
Sean Hunt
9c4b0113aa Remove the victim argument to rust_dmg().
The argument can be calculated from `otmp`.
2015-03-02 12:49:57 -05:00
Sean Hunt
6e9fa71b05 Make SEDUCE unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt
ac108cd365 Make GOLDOBJ unconditional. 2015-02-27 19:33:40 -05:00
Sean Hunt
1edadd1d48 Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-02-27 19:33:16 -05:00
Sean Hunt
260f7ea860 Make TOURIST unconditional. 2015-02-27 19:33:12 -05:00
Sean Hunt
9e65758947 Make STEED unconditional. 2015-02-27 19:33:01 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
nethack.rankin
a2f15cfd61 theft vs donning, round 2 (trunk only)
The message "you stop taking off <that armor>" when interrupted by a
nymph's or monkey's theft attack would only be given if you were using 'A'
to take off the armor.  If you used 'T', you'd get "you stop putting on
<that armor>" instead.  The fix for that also makes it easy to vary the
nymph message "<the nymph persuades> you to start taking off" to be "<the
nymph persuades you to continue taking off" when taking that same piece
of armor off was interrupted by the theft.
2012-02-05 04:26:48 +00:00
nethack.rankin
ef888e065a fix #H2589 - theft vs donning/doffing (trunk only)
From a bug report, having some
armor stolen while in the midst of putting on armor--when both items have
a multiple turn completion delay--could result in side-effects for the
latter item being reversed even though they hadn't been applied yet.  So
you'd lose points of Int and Wis when attempting to put on a positively
enchanted helm of brilliance, or gain such with a negatively enchanted one.

     steal() was assigning to afternmv before it had been used to finish the
action of putting on or taking off armor.  Fix by interrupting the attempt
to put on or take off armor when being victimized by theft (or being hit by
succubus or incubus seduction).  The existing stop_occupation() call wasn't
sufficient because afternmv is different from occupation.
2012-02-04 08:13:26 +00:00
keni
178f66dbe4 now we need one of those temporary failures so we can see if recovery works,
and that's a crapshoot: mcastu.c mhitu.c
2011-12-30 23:14:58 +00:00
nethack.rankin
84f02bd336 intrinsics revamp (trunk only)
Simplify many of the intrinsics macros from
  #define xxx_resistance (Hxxx || Exxx || resists_xxx(&youmonst))
down to
  #define xxx_resistance (Hxxx || Exxx)
by setting or clearing an extra bit in Hxxx during polymorph so that the
resists_xxx() check becomes implicit.

     Unfornately there were lots of places in the code that treat Hxxx
as a timeout number--primarily for Stunned, Confused, and Hallucination;
Stunned happens to be one of the revised macros--rather than as a bit
mask, so this patch needed a lot more changes than originally antipated.
2011-10-01 00:25:57 +00:00
nethack.rankin
8d5a04a1c0 fix #H2384 - ceiling hiding by poly'd hero (trunk only)
From a bug report, a hero hiding on the
ceiling while poly'd into a piercer or lurker-above could be moved long
distances when a monster attacked his location, because when the attacker
moves into hero's spot, hero's new location is chosen before the attacker
had released its own spot.  If things are crowded, the nearest open space
can be quite far away, including beyond nonpassable walls.  Fix by taking
attacker off the map before choosing hero's destination, so in crowded
conditions they will likely end up trading places.

     This also prevents eels and sharks from moving onto land when the
hero has hidden on the ceiling next to their pool.  They'll miss without
moving into hero's spot, but the hero will become unhidden so they'll be
able to make ordinary water-to-shore attack on their next turn.

     Lastly, when the attacker is a long worm, the spot chosen for hero
might be filled by its tail by the time hero actually moves.  So double
check and possibly re-select target spot after moving a worm's tail.
2011-07-17 09:19:17 +00:00
nethack.rankin
6df18e20be magic cancellation/Protection revamp (trunk only)
Optimize yesterday's new code.  When calculating magic cancellation,
avoid calling protects() for hero's inventory; the information it's
providing is already available via u.uprops[PROTECTION].  That part of
the inventory scan is only needed for monsters.
2011-04-09 00:05:06 +00:00
nethack.rankin
5bd6ba0d1c magic cancellation and Protection (trunk only)
Magic cancellation comes from some types of worn armor and has a
value of 0 through 3.  A non-zero value guards against some forms of
monster magic attacks (most notably, level drain by vampires and wraiths
and lycanthropy from werecritter bites).  This reduces the effectiveness
of mc a moderate amount (the new values happen to be the same as those
adopted by the Spork variant):
 chance to block various touch effects
  mc  old     new
   1  34.67%  30%
   2  67.33%  60%
   3  98%     90%

    This also makes the Protection intrinsic (strictly speaking, extrinsic)
be the only way to attain an mc factor of 3.  Cloak of protection is the
only way to get mc 3 from a single item.  Otherwise you need an mc 2 item
and a ring of protection (or one of the recently modified quest artifacts).

     Cancellation factor for elven and dwarvish mithril coats and for
robes and oilskin cloaks is reduced from 3 to 2; for elven cloak and
cloak of magic resistance from 3 to 1 (play balance; they're valuable
even without magic cancellation); for dwarven and orcish cloaks and
clocks of invisibility and displacement and for cornuthaum (wizard hat)
from 2 to 1.  Plate mail and crystal plate mail stay at 2.  A variety of
suits which were at 0 are increased to 1; leather jacket and dragon
scales/scale mail stay at 0 (the latter for play balance rather than for
the amount of your body that's covered).

     Having extrinsic protection will increase mc by 1 (unless it's
already 3).  That's obtained by wearing a cloak of protection (where the
increase is redundant), a ring (or two) of protection (even if conferring
a negative AC amount), or wearing the Mitre of Holiness or wielding the
Tsurugi of Muramasa.  Having multiple sources doesn't make the benefit
cumulative; it's just +1.

     Intrinsic protection (bought from priest, gained from prayer, gained
from eating rings of protection while polymorphed into metallivore, or
temporary while spell of protection is active) doesn't increase mc from
armor but does provide minimum mc 1 instead of naked 0 (play balance
again; buying it is too easy to let it increase mc 1 or 2 to 2 or 3).
(Extrinsic protection is a superset; its +1 bonus also increases 0 to 1.)

    TODO: add an amulet of protection so player has another option for
extrinsic protection.
2011-04-07 20:59:40 +00:00
nethack.rankin
72ca745646 purple worms in wall (trunk only)
From a bug report, a purple worm
could swallow a ghost or xorn and end up inside solid rock.  It took a
bunch of tries to reproduce this, but I eventually did.  (I'm not sure
why it didn't happen every time a worm swallowed a target which was in
rock; the code for positioning an engulfer after it digests a target
always puts the engulfer in the target's former spot.)  After this
patch, worms can still swallow ghosts and xorns, but only when they're
in locations the worm could walk onto.
2011-01-11 02:21:10 +00:00
keni
bd1a922dae Guidebook update and SEDUCE runtime switch
add SYSCF docs to the Guidebook because it's info needed in a binary distro
Guidebook.tex - also add some missing italics to some "NetHack" occurances
call nethack.org "official"
Guidebook.txt - didn't regenerate cleanly so no diff
add SEDUCE to SYSCF (only partly inspired by the recent email)
2010-05-13 00:54:13 +00:00
keni
4eabcee787 Add RCS version lines 2009-05-06 10:50:32 +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
d0a7d15023 drain energy attack (trunk only)
During some recent newsgroup discussion, <Someone> posted an entry from
his personal bug list:  energy draining damage from ordinary attacks is
implemented even though there are no monsters with that capability and it
was not implemented for engulf attacks even though energy vortices have
the capability.  This implements energy drain engulf attacks against the
hero and also both modes of energy drain attacks for monsters and poly'd
hero against spellcasting monsters.  Since monsters don't have energy,
they lose access to their special abilities (their spells, that is) for a
few turns, same as a post-3.4.3 change done for anti-magic traps.
2007-12-20 23:02:47 +00:00
nethack.rankin
61cd699405 monst vs steed tidbit
I came across an old bug report which stated that steeds missed out
on their chance to counterattack if the hero had just taken some action
other than moving.
        [1: monster attacks steed instead of hero ]
        [2: if monster died while attacking, return 1 ]
        if (i & MM_DEF_DIED || u.ux != u.ux0 || u.uy != u.uy0)
                return (0);
        [4: otherwise, steed counterattacks monster ]
Sometime since whatever version the 2001 report was for, but before the
current cvs repository was set up someone addressed this by changing it
to be
        if (i & MM_DEF_DIED || !u.umoved)
                return (0);
but I think that fixed the wrong thing.  I believe that the original code
was attempting to make sure that the steed was still in position to be
able to counterattack.  There's no reason to care about the hero's most
recent action; he had to have done something that caused time to elapse
in order for the other monster to have initiated an attack in the first.
(The new range check is actually redundant; mattackm() also enforces it.)
2007-06-02 22:00:29 +00:00
nethack.rankin
0ba059f749 Hallucination vs gaze attacks (trunk only)
Suggested by <Someone> in March, 2005 based on newsgroup discussion
at the time:  hallucination protects against touch of death attack by
disrupting how the hero's brain reacts, so why not against gaze attacks
too?  This gives hallucinating hero 75% chance of being unaffected by
gazes.  If unaffected or if the gazer has been cancelled, the gaze will
fail with some feedback.  Previously, all cancelled gazes failed but only
Medusa's gave feedback.

     This will give players another way to defeat Medusa, but since it
isn't foolproof and there are several sure fire ways already, I don't
think it'll hurt play balance there.  It may be useful to avoid getting
repeatedly stunned by Archons though.
2007-05-29 02:00:25 +00:00
nethack.rankin
8748bf5334 fix #H172 - inconsistent damage calculation for negative AC
Reported last August by <email deleted>:  the code
that decided whether hero poly'd into a pudding would be split when being
hit by an iron weapon always reduced damage by u.uac if armor class is
negative, whereas the normal amount is -rnd(-u.uac).  So player pudding
with good armor always got maximum reduction.  Probably had little actual
effect on game play; puddings can't wear armor so would need to be using
rings and/or spell of protection and/or have eaten rings of protection
while in some previous metallivoric form in order to get good enough AC
for this to matter.
2007-03-27 04:30:01 +00:00
cohrs
a5640e4bc8 H206 - passive fire damage affecting weapons (trunk only)
<email deleted> reported back on 8/31/06 that elven weapons were not
affected when he poked a fire elemental with them.  This is true, but
moreover, there was no code to have passive fire to affect attackers.
Now erode_obj() supports all the same damage types as rust_dmg(), and added
the connecting code to allow passive fire attacks do something.
There probably should be macros for the damage types used by rust_dmg
and erode_obj, and possibly these functions should be combined, but they
are slightly different and dealing with that requires more thought.
2007-03-20 20:08:09 +00:00
nethack.rankin
c86f9ff008 worn gear after polymorph alignment change [1 of 2] (trunk only)
Make polymorphing or changing alignment perform a touch check (as is
done when catching lycanthropy) on wielded weapon(s) to see whether the
hero can still use them in his new form.  Part [2 of 2] will update
retouch_equipment() to check all items in use rather than just weapon(s).
(A comment or two in part 1 already refers to expected behavior of part 2.)
2007-03-20 03:58:27 +00:00
nethack.rankin
25527a6315 silver vs lycanthropy (trunk only)
Monster werecritters are vulnerable to silver when in human form as
well as when in beast form, but hero inflicted with lycanthropy was only
vulnerable while in beast form.  Add pseudo-property Hate_silver to handle
that correctly.  Also, add silver vulnerability to enlightenment feedback.
Lastly, hero vulnerable to silver had Con abused if hit by silver missile
but not when hit hand-to-hand; add an exercise() call to the latter.
2007-03-18 03:26:43 +00:00
nethack.rankin
f67a4547ac held artifacts evading your grasp (trunk only)
From a bug report, trying
to invoke a wielded artifact after changing alignment resulted in "the
<artifact> evades your grasp" but it remained wielded, contradicting the
message.  This adjusts the message in touch_artifact() if the object is
already in inventory, and adds retouch_object() to handle cases where
failing to be able to touch ought to force unwearing/unwielding.
2007-03-10 05:54:17 +00:00
nethack.rankin
521469f27b mind flayer vs ghost (trunk only)
There's newsgroup discussion about a mind flayer sucking the brains
of a ghost, plus speculation that the fix for C343-121 has already taken
care of it.  I agree with them that ghost's brains are too insubstantial
to be hit by brainsuck damage from mind flayers' tentacles.  C343-121 is
vague enough to cover this; the corresponding fixes entry was more specific
and is augmented here.
2007-02-24 04:59:43 +00:00
nethack.rankin
2fa9bd0301 petrification fixes
Eliminate the somewhat redundant "You die..." following "You turned
to stone..." when becoming petrified by touching a cockatrice (reported
by <email deleted> for kicking, but occurs for weaponless hitting too).
Also, if a cockatrice killed you with normal damage, your tombstone would
erroneously report petrification and presumeably there'd be a statue
instead of a ghost in the resulting bones file.  This fixes both things.
2006-11-10 05:13:57 +00:00
nethack.rankin
9315307df2 safe_qbuf, short_oname (trunk only)
Change safe_qbuf() so that instead of picking one of three strings
for sprintf() to plug into a prompt string, it actually constructs the
full prompt string itself.  Also pass in the unformatted object and a pair
of formatting functions instead of performing dual formatting in advance.
The actual formatting is done via new routine short_oname() which also
takes an object and a pair of formatting routines plus a target length.
It uses the first routine, typically xname() or doname(), and formats the
object, then if the result is too long it makes some transformations, and
tries again.  If truncating "called foo" and "named bar" down to 12 chars
and omitting "uncursed, rustproof, thoroughly corroded" attributes still
result in a string that's too long, it uses the other formatting routine.
The latter calls one of several jacket routines around simple_typename()
to produce a short result.

     This has been through about four incarnations now and has gotten a
bit less testing each time, but I need to get it in place before I end up
running out of gas and abandoning it.  I've got some changes to shk.c
(where safe_qbuf is needed but not currently used) that now need to be
redone and will come eventually.
2006-10-24 05:18:00 +00:00
cohrs
365440853b U856 - cockatrice and nurses
One from the way-back machine.  A nurse would hit you-as-cockatrice repeatedly
and never turned to stone.  With this change, nurses will turn to stone (and
also don't heal cockatrices, which seems fair).  I considered giving them
gloves, but that seemed like too much effort.  There are other cases where a
monster "hits" but will not petrify.  However, it doesn't seem like passiveum
detects all the specific ways the monster "hit" you so I left them alone.
2006-10-05 06:47:39 +00:00
nethack.rankin
f36c9d19fd mon vs mon attack message phrasing
From <Someone>:
  Pet picks up 8 spears.
  Pet wields 8 spears.
  Pet thrusts its spear at Foe.
The routine to handle a monster attacking the hero are already uses "mon
thrusts one of its spears" in this case, so make monster against monster
messages do the same.  Also, it's no longer necessary to save one monster
name before formatting another when using two monster names in the same
message, so switch to the more straightforward usage here.  (The Blind
check is needed in the mhitu case but not in the mhitm one, where it's
redundant because the caller has already verified that both monsters'
locations are visible, but I left it in.)
2006-08-08 05:08:23 +00:00
nethack.rankin
12586f6ee8 unseen monsters vs hiding hero
While testing the hiding vs traps patch, I became a mimic and hid.
  It gets stuck to you.
Huh?  Nothing was visible; nothing became visible (aside from the ']' at my
position changing back to 'm').  Display the invisible monster glyph when
an unseen monster bumps into you while you're hiding or mimicking gold.
That's usually handled by the hit and miss routines, but they aren't used
when you're just brought out of hiding instead of attacked.
2006-05-27 04:13:20 +00:00
nethack.rankin
27dcb8e34a silver vs poly'd hero (trunk only)
<Someone> reported that thitu() was adding d20 damage for silver object
hitting silver-hating hero even though all the callers were using dmgval()
which also does that, resulting in doubled silver bonus/penalty.  This
fixes that (including for boomerangs thrown by player, which weren't using
dmgval(), to handle a hyptothetical silver boomerang).  While testing it,
I noticed that there was no "the silver sears your flesh" message when a
monster hit you with a wielded silver weapon, so this fixes that too.
(How did we miss that?  And how did <Someone>? :-)
2006-04-06 05:57:50 +00:00
nethack.rankin
08e9280201 swallowed time (trunk only)
From a bug report, making engulf time longer for high AC
didn't make sense for non-digestion attacks:  taking longer to die from
being digested (high AC lets you last longer there) is much different from
being stuck inside a vortex or elemental and suffering extra buffettings
or whatever.  Calculate swallow time differently for non-digestion than
for digestion.  (The adjustment based around level 25 doesn't make much
sense either, but I left that in.)

     If you survive total digestion via life saving, you get a message
about the monster not liking your taste.  I don't think that's appropriate,
but haven't tried to figure out how to fix it.
2006-03-28 04:57:40 +00:00
nethack.allison
0b88609133 chameleon behaviour
- restore intended behaviour of kill_genocided_monsters().
  It has been incorrect since  the chameleon overhaul in June 2004.
- eliminate CHAM_ORDINARY and use NON_PM instead.
2006-03-12 04:43:28 +00:00
nethack.rankin
02a2e8b6ef wildmiss refinement (trunk only)
> This makes monsters marginally smarter--independent of their defined
> intelligence levels--by skipping their remaining attacks when the first
> turns out to be targetted at nothing.  The exception is for monsters with
> both melee and spell attacks; they'll keep going in case they end up
> choosing a spell which doesn't need a target location.  (It's rather
> ironic that the most intelligent monsters are the ones who'll foolishly
> continue swinging at thin air.  This could be improved by forcing then to
> skip ahead to their spell attack.)

     This implements the improvement for spellcasters.  After they make
a wildmiss, they'll skip any further physical attacks but eventually try
their spell.  (Titans have multiple physical attacks followed by a spell;
other high-end monsters probably do too.)
2006-02-07 05:35:29 +00:00
nethack.rankin
702060c4de monsters with multiple attacks missing wildly (trunk only)
Reduce verbosity for monsters with multiple attacks who "swing wildly
at you and miss" or "miss your displaced image" due to their confusion or
your invisibility or displacement.  It's aggravating to sit through that
three times for claw/claw/bite or swing/swing/kick when those longer
descriptions of why such missing happened guarantee multiple --More--
prompts.  (Can't simply use Norep() to deal with this because wildmiss()
varies its messages.)

     This makes monsters marginally smarter--independent of their defined
intelligence levels--by skipping their remaining attacks when the first
turns out to be targetted at nothing.  The exception is for monsters with
both melee and spell attacks; they'll keep going in case they end up
choosing a spell which doesn't need a target location.  (It's rather ironic
that the most intelligent monsters are the ones who'll foolishly continue
swinging at thin air.  This could be improved by forcing then to skip ahead
to their spell attack.)  Exploding monsters aren't affected because they
don't have multiple attacks.  Offhand I can't think of any other situation
where a wild miss on the first of N attacks could still yield a successful
result on any of the other N-1 actions.

     Monsters attempting ranged attacks who get multiple shots (due to
multiple weapon attacks per turn rather than to multi-shot volley during
a single attack) will end up conserving ammo when they stop after seeing
that the first shot didn't find a target.  Note that trying to attack you
but accidentally attacking some other target isn't affected since that
doesn't yield the wild miss outcome.  Intelligent monsters probably ought
to recognize that their attack against you ended up hitting someone else
and refrain from repeating that mistake N-1 more times.  Whether feedback
from that ought to carry over to their next turn is not so clear cut.
2006-02-02 07:20:08 +00:00
nethack.allison
0dc071bee8 mextra changes
Note: The CVS repository was tagged with NETHACK_PRE_MEXTRA
prior to application of this patch to allow easy withdrawal if necessary.

Adds a new mextra structure type that has a set
of pointers to various types of monster structures
including:
   mname, egd, epri, eshk, emin, edog

Replaces the mextra bits in the monst structure
with a single pointer called mtmp->mextra of type
(struct mextra *).
The pointer can be null if there are no additional
structures attached. The mextra structure is not
adjacent to the monst structure.

Reduces the in-memory footprint of the monst that
has no other structures attached, at the cost
of adding 6 extra long ints per monster to
the save file

The new mextra structure has the mextra fields
independent of each other, not overlapping as was
the case with previous NetHack versions.
This patch doesn't do anything to capitalize on
that difference however.

Consolidates vault.h, epri.h, eshk.h, emin.h and edog.h
into mextra.h

Adds a macro for checking for whether a monster has
a name:
	has_name(monst)

This fixes the magic trap panic
   expels() -> spoteffects() -> dotrap() ->
	domagictrap() -> tamedog()
because the monst no longer varies in size so no
replacement is required.
2006-01-06 05:46:03 +00:00
nethack.rankin
6a40b203ed terminate eating if pet falls asleep or becomes paralyzed (trunk only)
From a bug report:  sleeping pet could
be shown as "eating" by stethoscope.  Fixing that is a one-liner since all
(or should be all; sleeping gas trap wasn't utilizing it) cases of monster
being forced into sleep go through one routine.  That wasn't the situation
for paralysis, but now it is.  Paralyzed pets won't continue eating either.
2005-12-06 04:48:27 +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
d7a0044056 farmed pudding (trunk only)
I've gotten tired of seeing newsgroup claims along the lines of
"since devteam is aware of this and has chosen not to eliminate it, they
must endorse it", so weaken the tactic of "pudding farming".  It is still
possible to gain unlimited experience (past level 15 or so there's not
much point), but will be less effective for gaining items and for providing
sacrifice fodder.  Keep track of which monsters have been created via
cloning (mostly puddings; gremlins and blue jellies are affected too but
nobody's likely to care much about them) so that they can receive special
handling.  Make cloned monsters progressively less likely to leave corpses
as the number killed for a particular type goes up, and also much less
likely to drop random items at death.  This is sure to need some tuning
once hard core farmers point out how they can still abuse it.  For the
absurdly extreme case, see

http://scavenger.homeip.net/farmbot/HomePage

FYI, farmbot/PuddingFarmingHOWTO includes an impressive screen shot of a
dungeon level where rampant farming is taking place.
2005-07-17 05:00:25 +00:00
nethack.rankin
bd1af39997 Stoning management (trunk only)
Make petrification initiation or termination go through a new routine,
make_stoned(), instead of manipulating its countdown timer and delayed
killer directly.  No change in behavior.

     There's no reason in terms of bug risk or game play or saved data why
this shouldn't be done in the branch too, but so much of the surrounding
context has already diverged between trunk and branch that it's trunk only.
2005-06-19 04:38:30 +00:00
nethack.rankin
f4a3b20afe Fire/Frost Brand vs rusting
Implement the suggestion that Fire Brand avoids damage from rust traps
by boiling away the water.  Rather than making this be trap-specific, it
applies to all types of erosion which go through erode_obj().  That includes
hitting rust monsters but not dipping into potions or fountains, nor falling
into moats.  And it doesn't provide 100% protection, just a high chance of
avoiding rust damage.  Also, Frost Brand gets similar protection by freezing.

     The message handling needed some rewriting for the branch version.
That compiles ok but hasn't been tested.  It would have been simpler just to
move Yobjnam2() over even if nothing else was changed to use it yet....
2005-04-19 04:15:51 +00:00
cohrs
2f497c620e M29 - unconscious effects when not unconscious
While auditing nomul() I noticed unconscious() treats (multi < 0 && !nomovemsg)
as unconscious.  This explains the behavior in M29 (unconscious message
while performing #turn).  I checked all the places with this combination,
and found a few that did not appear to fall under the "unconscious" category.
Most I changed to use You_can_move_again to ensure the same display w/o the
unconscious behavior. Also:
- found another string that unconscious() should have considered
- vomit() now sets nomovemsg, one caller was also doing this redundantly
- vomiting_dialogue() was calling stop_occupation() after vomit(), which can
  reset multi.  I reversed the order and removed a doubly-redundant nomul call.

tele() still has a problem: some cases where multi < 0 should probably take
a branch like the unconscious() branch but with a different message.
doturn()'s behavior - turn then wait - is also less than perfect, but I
think this is a known problem.
2005-03-25 20:30:24 +00:00