]> granicus.if.org Git - nethack/log
nethack
19 years agoconfused remove curse
nethack.rankin [Fri, 15 Apr 2005 02:59:03 +0000 (02:59 +0000)]
confused remove curse

     When confused remove curse acts upon an object to randomly bless or
curse it, clear the bknown flag.  Do this for all objects which get subjected
to the effect, even ones which are already blessed or cursed and hence don't
change state.

19 years agocostly_alteration() tweaking (trunk only)
nethack.rankin [Fri, 15 Apr 2005 02:41:53 +0000 (02:41 +0000)]
costly_alteration() tweaking (trunk only)

     For cancellation I accidentally used terrain type WATER when I meant
object type POT_WATER, so being charged for cancelling holy or unholy water
wasn't working.  When I first put in COST_UNHOLY the name made some sense
based on its usage, but after later adding COST_UNBLSS it didn't any more;
change it to COST_UNCURS.

     A shopkeeper's complaint that you're uncursing or unblessing his wares
(only applies to water) now sets bknown flag since you know that the object
has become uncursed.  I hadn't realized that confused remove curse only
affects uncursed objects; this greatly simplifies extra code I added there
for costly_alteration().

[No fixes entry needed.]

19 years agofinding traps while blind [missing pieces]
nethack.rankin [Fri, 15 Apr 2005 02:34:15 +0000 (02:34 +0000)]
finding traps while blind [missing pieces]

     <Someone> reported that when levitating and blind, he was getting
"You float over the hole" without it showing up on the map.  Easiest way
to reproduce:  zap a wand of digging downwards while levitating blind,
move off the spot and back over it.

     Make sure that all traps created by the player are mapped.  For other
traps, it was about 50:50 whether the trap triggering message yields enough
information to warrant forcibly mapping the trap when blind.

19 years agofinding traps while blind
nethack.rankin [Thu, 14 Apr 2005 03:26:56 +0000 (03:26 +0000)]
finding traps while blind

     <Someone> reported that when levitating and blind, he was getting
"You float over the hole" without it showing up on the map.  Easiest way
to reproduce:  zap a wand of digging downwards while levitating blind,
move off the spot and back over it.

     Make sure that all traps created by the player are mapped.  For other
traps, it was about 50:50 whether the trap triggering message yields enough
information to warrant forcibly mapping the trap when blind.

19 years agothrottle eating of rings
nethack.rankin [Sat, 9 Apr 2005 05:07:15 +0000 (05:07 +0000)]
throttle eating of rings

     A few weeks ago someone in the newsgroup posted how he got an intrinsic
value for increased damage up to something like +74 via eating rings (on his
way to killing the Riders a zillion times for maximum score--he wanted to be
sure to kill them in a single hit each time so that his use of keystroke
macros wouldn't get out of sync by extended combat).  Make it moderately
difficult to get beyond +20 and impossible to get past +40 for corresponding
attribute when eating rings of increase damage, increase accuracy, and
protection.  Since you could also wear a pair of +7 rings you can still get
an awfully high total, but it won't be unlimited any more and most people
willing and able to go to such extreme lengths would undoubtedly prefer to
be wearing other types of rings.

19 years agoautocursing armor worn by monsters
nethack.rankin [Sat, 9 Apr 2005 03:23:17 +0000 (03:23 +0000)]
autocursing armor worn by monsters

     From the newsgroup:  non-cursed dunce cap or helm of opposite alignment
which would glow black and become cursed if worn by the hero wasn't doing
the same when worn by a monster.  Fixing this gives players a new way to
recognize bad hats--drop on altar, then drop in front of approaching goblin
or other wimpy monster capable of wearing armor--but I think that's fair.
Since helms of opposite alignment are usually already cursed it won't make
much difference for them; most players seem to avoid all conical hats so it
won't make much difference for dunce caps either.

19 years agoredundant feedback for containers (trunk only)
nethack.rankin [Thu, 7 Apr 2005 03:39:43 +0000 (03:39 +0000)]
redundant feedback for containers (trunk only)

     Looting or applying an empty container whose [lack of] contents is
known yields "Your empty <container> is empty."  Suppress the first "empty".
No fixes entry needed; this is post-3.4.3 code.

19 years agoredundant feedback for `I u'
nethack.rankin [Thu, 7 Apr 2005 03:32:48 +0000 (03:32 +0000)]
redundant feedback for `I u'

     When 3.4.0 added the shop price to inventory display of unpaid items,
it resulted in showing that price twice if you used the `I u' command while
carrying just one unpaid object.

k - a potion of object detection (unpaid, 150 zorkmids)    150 zorkmids

With two or more unpaid objects it uses a menu style display and explicitly
suppresses "(unpaid, N zorkmids)" from the inventory formatting.  Do the
same suppression when there's one item.

k - a potion of object detection                     150 zorkmids

19 years agoalteration of shop-owned objects (trunk only)
nethack.rankin [Tue, 5 Apr 2005 05:24:04 +0000 (05:24 +0000)]
alteration of shop-owned objects (trunk only)

[This ought to be suitable for the branch version too but I'm not going to
spend the effort to migrate it there.]

     Recently From a bug report, reducing
the value of a shop object via cursed enchantment was ignored by shopkeeper.
This replaces the existing costly_cancel() routine with costly_alteration()
which performs a similar task:  bill for any item whose value has been made
less.  The hero owns the resulting object but must pay for the original one
before being allowed to leave the shop.

     This covers the majority of cases where bill_dummy_object() was already
being used:  cancelling a charged or enchanted item, casting drain life at
same, diluting potions or blanking scrolls or books by dipping them into a
potion of water, dulling a weapon by engraving with it, eating unpaid food
or opening unpaid tins, applying a cream pie to hit yourself with it in the
face, applying a wand to break it, burning something by dipping it into lit
potion of oil, and clearing potions by dipping a unicorn horn into them.
The shop billing behavior for those actions hasn't been changed, just
consolidated into one place which delivers a common message for them.

     This also covers many cases which weren't being handled:  stripping
wand or magic tool charges via cursed scroll of charging, reducing a charged
ring's enchantment via same, reducing weapon or armor enchantment via cursed
scroll of enchant weapon or armor, stripping an item's rustproofing via
confused enchantment, making a crysknife revert to a worm tooth, unblessing
potions of holy water or uncursing potions of unholy water.  (That last one
won't be billed if it's the result of prayer rather scroll, spell, or #dip.)

     And this tries to handle the reverse situation more thoroughly too:
many actions which improve the value of an unpaid item now also cause the
shop bill to be updated to reflect its new higher price.  Aside from the
basic enchanting and charging magic, it covers converting dragon scales into
dragon scale mail and worm tooth into crysknife.  Some things which might be
expected to inflate shop prices, like rustproofing or increasing the number
of charges in a wand, don't actually affect the price.  And there are bound
to be cases where the price is affected but I've overlooked.

19 years agosmartphone keypad input tweaks (from <Someone>)
nethack.allison [Tue, 29 Mar 2005 04:32:42 +0000 (04:32 +0000)]
smartphone keypad input tweaks (from <Someone>)

19 years agoclicklook on win32
nethack.allison [Tue, 29 Mar 2005 04:26:58 +0000 (04:26 +0000)]
clicklook on win32

Make clicklook option a little safer/easier on win32 by letting
right-mouse button work as expected.

19 years agosmartphone keypad input tweaks (from <Someone>)
nethack.allison [Tue, 29 Mar 2005 03:58:23 +0000 (03:58 +0000)]
smartphone keypad input tweaks (from <Someone>)

<Someone> wrote:
> Some keypad input tweaks for Smartphone port:
> - added "Type Cmd" command that allows to type arbitrary commands using
> phone keypad
> - added Q(quiver) command to "Attack" layout
> - fixed F command to prompt for direction
>
>
>>2) I can't find a way to do the equivalent of d<number><item> and the
>>same for picking up (for example when multiple rations are on top of each
>>other and you can only afford 1)
>>
>>3) I can't find a way to change the quiver (the Q command)

19 years agoM36 - can see through polymorphed boulder
cohrs [Mon, 28 Mar 2005 18:24:35 +0000 (18:24 +0000)]
M36 - can see through polymorphed boulder
The vision matrix was updated in the boulder->statue case, but
not in the statue->boulder case.

19 years agobill_dummy_object
nethack.rankin [Sun, 27 Mar 2005 04:54:20 +0000 (04:54 +0000)]
bill_dummy_object

     Various actions (potion dilution, igniting candles or oil, dulling a
weapon by engraving) on an unpaid object can modify it in such a way that
a shopkeeper will force the hero to buy it.  bill_dummy_object() is used
to make a copy for the shop bill; play continues with the modified item
now owned by the player.  bill_dummy_object() was setting the no_charge
flag unconditionally on the modified object but the flag shouldn't be set
for items in inventory.  It was possible to drop the object and sell it,
pick it back up for free due to that flag setting, then drop it and sell
it again.  One easy way to reproduce is to zap yourself with a wand of
cancellation while carrying unpaid positively enchanted armor or weapon.

     The no_charge flag gets cleared when you pick something up off the
floor or take it out of a container, so this sell-it-again case would only
repeat once.  Selling a dropped item ought to clear the flag, but my head
is still spinning after looking at the shop code to see about implementing
that.  This fix just prevents bill_dummy_object() from mis-setting the
flag in the first place; sellobj() still can't fix it up after the fact.

19 years agoshop billing
nethack.rankin [Sun, 27 Mar 2005 03:59:56 +0000 (03:59 +0000)]
shop billing

     Shop internals:  funnel all checks for whether an object is something
a shopkeeper will charge the hero for through one routine instead of having
duplication code which might eventually get out of synch.  There shouldn't
be any detectable change in behavior due to this.  No fixes entry necessary.

19 years agoDrawbridge collapse bug
cohrs [Fri, 25 Mar 2005 22:33:05 +0000 (22:33 +0000)]
Drawbridge collapse bug
From a bug report, it is possible for the hero to
appear embedded in the wall after destroying the drawbridge.  This is because
The variable "lev1", which was the entity's location, was being referenced
after e_died, but e_died can change the entity's location.  So, as <Someone>
suggested, refer to the current location directly.

19 years agotypo
cohrs [Fri, 25 Mar 2005 20:31:55 +0000 (20:31 +0000)]
typo

19 years agoM29 - unconscious effects when not unconscious
cohrs [Fri, 25 Mar 2005 20:30:24 +0000 (20:30 +0000)]
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.

19 years agocode cleanup
cohrs [Fri, 25 Mar 2005 20:00:15 +0000 (20:00 +0000)]
code cleanup
removing the remains of sync_hunger() which has been #ifdef'd out for years.

19 years agofinally finished but not eating
cohrs [Fri, 25 Mar 2005 18:00:00 +0000 (18:00 +0000)]
finally finished but not eating
Finally apply the patch sent by <Someone> in 11/2003 for slashem-Bugs-799278,
updated to match the current code and handle additional cases.  The fix
is brute force: always ensure nomovemsg is set when nomul is called with
a negative value.  I also scanned the code for places manually setting
multi negative, they all set nomovemsg.  It would be nice to have a function
that did the right thing, but there are several special cases and I was
not feeling creative.

19 years agopet ascension
nethack.rankin [Sun, 20 Mar 2005 05:23:33 +0000 (05:23 +0000)]
pet ascension

     From the newsgroup:  player offered the Amulet with a pet adjacent
to his character, and instead of getting "You and Fido ascended" he got
"Fido is still eating" followed by "You ascended".  Make all adjacent pets
eligible to accompany an ascension even when they're in circumstances where
they'd be prevented from coming along on a normal level change.

19 years agomonster aggravation spell
nethack.rankin [Sun, 20 Mar 2005 05:05:06 +0000 (05:05 +0000)]
monster aggravation spell

     When testing drawbridge stuff recently I ended up with an unseen
monster who evidently cast the aggravation spell repeatedly, yielding a
steady stream of "you feel that monsters are aware of your presence"
messages.  This patch makes monsters tend to avoid repeating that spell
once everyone on the level has already been woken up.  It also extends
the spell effect so that it will wake monsters like quest nemesis and the
Wizard who ordinarily wait until you get close before they become active.

19 years agoseeing lightning while blind followup
cohrs [Sat, 19 Mar 2005 17:22:46 +0000 (17:22 +0000)]
seeing lightning while blind followup
As soon as I did the commit, I saw I was missing a test before the
"tingles" message.

19 years agoseeing lightning while blind
cohrs [Sat, 19 Mar 2005 17:20:06 +0000 (17:20 +0000)]
seeing lightning while blind
<Someone> reported that even when blind, you can get
"The bolt of lightning whizzes by you".

19 years agoshop statues & boulders
nethack.rankin [Sat, 19 Mar 2005 05:26:02 +0000 (05:26 +0000)]
shop statues & boulders

     Fix a buglist entry:  fracturing a boulder or statue owned by a shop
was ignored by the shopkeeper.  The existing vague fixes entry of "some
shop thefts weren't charged" covers this.

19 years agodipping in acid
cohrs [Fri, 18 Mar 2005 20:59:29 +0000 (20:59 +0000)]
dipping in acid
Add checks to allow erosion of objects #dip'd in acid.
From a bug report.

19 years agovision thing
cohrs [Fri, 18 Mar 2005 05:34:43 +0000 (05:34 +0000)]
vision thing
<Someone> reported: You kill it! A potion of invisibility shatters!
Change the rule in hero_breaks() to avoid giving info for things out of
sight, except when from_invent is set, to preserve desired behavior.

19 years agoavoid more QBUFSZ buffer overflows
cohrs [Fri, 18 Mar 2005 03:46:20 +0000 (03:46 +0000)]
avoid more QBUFSZ buffer overflows
Several places were not using safe_qbuf or anything equivalent to avoid
overflowing a QBUFSZ buffer.  Add more uses plus one special case.  For
the current max lengths returned by xname(), I think this is
sufficient.  This addresses a reported buffer overflow for a
"thoroughly rusty thoroughly corroded helm of opposite alignment", plus more.

19 years agoland mine vs drawbridge
nethack.rankin [Thu, 17 Mar 2005 05:20:34 +0000 (05:20 +0000)]
land mine vs drawbridge

     Fix the reported problem that having a land mine explode on an open
drawbridge or under its portcullis did not cause the bridge to be destroyed.

19 years agosliming ghosts
cohrs [Mon, 14 Mar 2005 16:27:35 +0000 (16:27 +0000)]
sliming ghosts
From a bug report.  Green slime would slime noncorporeals.
Added missing checks.

19 years agopassive damage
cohrs [Mon, 14 Mar 2005 15:27:53 +0000 (15:27 +0000)]
passive damage
As From a bug report, twice.  Change max_passive_dmg to multiply the
result by the number of direct attacks the aggressor can make.  This way, a
tame mind flayer, for example, will avoid pounding on a spotted jelly and
dying as a result of the Nth passive response.

19 years agocompilation bit
cohrs [Mon, 14 Mar 2005 15:02:28 +0000 (15:02 +0000)]
compilation bit
remove unused label gcc whined about

19 years agoMr. Izchak
nethack.rankin [Sun, 13 Mar 2005 06:48:35 +0000 (06:48 +0000)]
Mr. Izchak

     Suppress "Mr" or "Ms" title for shopkeepers when they're going by a
first name rather than a surname.  The bug report was for Izchak, but it
would have happened with the two last resort names (which I've never seen
in actual use) and for the "hippie names" used in post-3.4.x health food
shops.  I have not attempted to specify gender for those, just flagged
them as first names.  This prepends a prefix character to the name string
(see comment in shknam.c) to specify gender and/or first name vs surname.

19 years agomore health food shops (trunk only)
nethack.rankin [Sun, 13 Mar 2005 05:29:01 +0000 (05:29 +0000)]
more health food shops (trunk only)

     Allow health food stores to carry eggs and tins of veggy contents in
their stock.  The tins will almost always contain spinach because random
tins containing meat are converted into that.

     Also, allow health food stores to be placed with the level compiler
(not tested) and to be forcibly placed in wizard mode via SHOPTYPE setting
of "V".  Increments EDITLEVEL in patchlevel.h because lighting store in
Minetown got renumbered and the special level for it needs to be rebuilt.

19 years agodigging holes
nethack.rankin [Thu, 10 Mar 2005 05:18:28 +0000 (05:18 +0000)]
digging holes

     If you manage to escape a hole and then dig down with a pick-axe at
that location, finish on the first move instead of after the usual N turns.

19 years agohealth food tins
nethack.rankin [Thu, 10 Mar 2005 05:06:24 +0000 (05:06 +0000)]
health food tins

     Groundwork for having health food shops carry tins as part of their
stock.  (That part isn't finished yet.)  The choice of which types of tin
preparation might be sold as health food is rather arbitrary.  Tweak if
needed--but keep in mind that just because something is marketed as health
food doesn't necessary mean that it's actually healthy; vice versa as well.

     Tin handling could be simplified if tin->spe for spinach was changed
from 1 to -1.  Then checks for spinach could compare against SPINACH_TIN
instead of a magic number, and with non-spinach tin->spe would be a direct
index rather than needing negating and offsetting.

20 years agotheft detection
nethack.rankin [Sun, 6 Mar 2005 06:58:46 +0000 (06:58 +0000)]
theft detection

     Shop items stolen or destroyed without being in inventory were handled
inconsistently compared to simply picking up unpaid items because different
criteria got used to decide whether the shk cares about something.  Last
December a hack to deal with this for container contents was introduced but
that left the problem for ordinary items.  This patch attempts to address
it by using a common check for theft and for pickup's add-to-bill.

     It hasn't had nearly enough testing and I won't be very surprised if
one or more new obscure shop bugs have now come into being, but perhaps
they'll at least be consistent bugs as far as shop billing is concerned....

20 years agoselling health food (trunk only)
nethack.rankin [Sun, 6 Mar 2005 06:42:41 +0000 (06:42 +0000)]
selling health food (trunk only)

     I didn't remember a new shop type of "health food store" being added.
While trying to test some shop changes, it sure threw me for a loop when
a shopkeeper who sold lots of food refused to buy any.  This patch teaches
such shks to buy vegetarian food.  (No fixes entry included since the
relevant code hasn't been released yet.)

     Shouldn't such shops sometimes carry tins and eggs in their initial
stock?  They currently don't because those items fail the material==VEGGY
test.  Adding eggs would be easy; tins are messier since you can't decide
whether they're vegetarian until after they've been created.

20 years agotile renumbering
nethack.allison [Sun, 20 Feb 2005 20:04:01 +0000 (20:04 +0000)]
tile renumbering

20 years agotile synch and a warning fix
nethack.allison [Sun, 20 Feb 2005 19:49:56 +0000 (19:49 +0000)]
tile synch and a warning fix

20 years agocopy/paste error in horse_parts: foreclaw vs forehoof
cohrs [Tue, 15 Feb 2005 00:25:23 +0000 (00:25 +0000)]
copy/paste error in horse_parts: foreclaw vs forehoof
When horse_parts were separated from animal_parts, one "forehoof" was missed

20 years agomore ring theft
nethack.rankin [Thu, 10 Feb 2005 05:54:34 +0000 (05:54 +0000)]
more ring theft

     Neither nymphs nor monkeys can steal a ring worn underneath gloves
since they can't see them.  If such rings are randomly targetted, try to
take gloves instead.

     Succubi trying to take worn ring of adornment will attempt to take
off worn gloves first.  (Presumeably they can sense magic rings hidden
beneath gloves better than nymphs can; they're about to try to take all
worn armor off anyway....)  If the glove removal fails, ring theft will
too.  Likewise for incubi, remove gloves before trying to force the hero
to put on ring of adornment.

     At the moment succubi and incubi can't remove gloves which are
blocked by a welded weapon, but they can manipulate rings then if there
aren't any gloves involved.  I don't think that's right.  The latter is
nymph-like and could be attributed to magic, but if that's the case why
aren't they able to remove gloves from under cursed weapons too?

20 years agoring theft
nethack.rankin [Thu, 10 Feb 2005 04:25:29 +0000 (04:25 +0000)]
ring theft

     Prevent monkeys from stealing any ring which the hero can't remove due
to it being stuck inside the grip of a cursed weapon.  Nymphs can still do
so though.  From a bug report.

20 years agoyet more exploding magic pointers
nethack.rankin [Tue, 8 Feb 2005 04:57:54 +0000 (04:57 +0000)]
yet more exploding magic pointers

     Revert mostly to <Someone>'s original approach for keeping track of whether
a container being applied or looted had been destroyed by the operation.
askchain() now knows not to attempt to re-merge an item that has been
destroyed (a theorhetical action since no stackable items can trigger a
magic bag explosion) like the earlier change to menu_loot().  Also have
use_container() clean up after itself so that current_container never has
an old pointer value left around.

20 years agomorer exploding magic pointers
nethack.rankin [Sun, 6 Feb 2005 05:12:48 +0000 (05:12 +0000)]
morer exploding magic pointers

     Just a comment update this time.

20 years agomore exploding magic pointers
nethack.rankin [Sun, 6 Feb 2005 04:44:36 +0000 (04:44 +0000)]
more exploding magic pointers

     My simpler fix for dealing with stale pointers caused by magic bag
explosion didn't handle menu_loot() checking whether to merge a destroyed
object with a stack it had been split from (the case <Someone> didn't attempt to
address either).  That only needs a one-line change, but this also removes
the illusiion of generality that menu_loot() tried to maintain.  It always
operates on current_container and relies on calling in_container() and
out_container() which do the same, so passing a container argument to it
was not useful.  If that had been taken out first, <Someone>'s method of fixing
the original problem would have been simpler than mine but I'm not planning
to back out the earlier change.

     Also fix a minor post-3.4.3 bug with a container-contents-known flag
being set incorrectly.

20 years agoexploding magic pointers
nethack.rankin [Sun, 6 Feb 2005 03:25:04 +0000 (03:25 +0000)]
exploding magic pointers

     Fix the two problems that <Someone> reported about stale pointer use
after a bag of holding has exploded.  use_container() passed the wrong
variable for quantity when calling useupf(), and doapply() had no way to
tell if the object being used had been destroyed so could use an invalid
pointer when checking for speaking artifact.  The fix for the latter is
much simpler than what <Someone> suggested.

20 years agosanctum level shortcut
nethack.rankin [Thu, 3 Feb 2005 05:09:37 +0000 (05:09 +0000)]
sanctum level shortcut

     Newsgroup discussion has pointed out that after performing the
invocation ritual to gain access to the bottom level, it is possible to
skip almost all of Moloch's Sanctum by level teleporting in (and back out
to retry if necessary) directly to the high priest's temple.  This fix
doesn't prevent entering that level via teleport or make you end up at
the stairs, it just forces arrival to be on the right side so that you'll
need to slog through the morgue room and the big chamber surrounding the
temple.  Since there isn't much before the morgue aside from a few small
rooms with a secret door or two, it's no longer a very worthwhile shortcut.

20 years agomedusa meat
nethack.rankin [Thu, 3 Feb 2005 04:12:28 +0000 (04:12 +0000)]
medusa meat

     Someone in the newsgroup mentioned that there is no warning from blessed
food detection if you attempt to eat a tin of Medusa meat.  touch_petrifies()
isn't enough to catch that.  A warning was given about Medusa's corpse, but
only if you lacked poison resistance.  Eating a tainted Medusa corpse had a
similar problem; the check to override food poisoning so that petrification
takes effect missed it.  This makes the petrification checks be consistent,
including hypothetical case of Medusa egg.

20 years agowishing tweaks
nethack.rankin [Tue, 1 Feb 2005 05:35:34 +0000 (05:35 +0000)]
wishing tweaks

     When a wish request for "<foo> armor" fails to match anything, check
whether it matches "<foo> mail" before resorting to selecting a random piece
of armor.  Most of the suits are named "mail", and while I don't think many
people will ask for "ring armor", I do think that "crystal plate armor" and
"gray dragon scale armor" are sometimes tried.

     This also greatly simplifies the handling for spelling variant "armour"
by rewriting it to "armor".  Unfortunately "grey" vs "gray" can't be handled
the same way since both spellings are used by the program.

20 years agostop occupation during problem countdown
nethack.rankin [Tue, 1 Feb 2005 03:46:31 +0000 (03:46 +0000)]
stop occupation during problem countdown

     A user recently complained that he started an activity such as
searching and specified a repeat count, right after getting--and not
realizing the significance of--the first message in the countdown
sequence for turning into stone.  He suggested that subsequent messages
interrupt multi-turn activity so that the player has a chance to do
something to prevent imminent death.  This implements that, with the
added wrinkle that it won't interrupt if the activity is something that
might save the character's life:  attempting to eat a tin that is either
sure to help (if ID'd as food that cures stoning) or a desparate gamble
(if unID'd).  Some hooks for similar behavior for other conditions like
turning into slime are included, although no tins can help for anything
other than petrification so far.

     Shouldn't fatal illness have an end-is-near countdown too?

20 years agominor build fix
nethack.rankin [Tue, 1 Feb 2005 02:35:47 +0000 (02:35 +0000)]
minor build fix

     same_race() recently added to mondata.c (trunk only) exposed an old
inconsistency in mondata.h (trunk and branch).

20 years agointelligent pets vs cannibalism (trunk only)
nethack.rankin [Sun, 30 Jan 2005 04:19:01 +0000 (04:19 +0000)]
intelligent pets vs cannibalism (trunk only)

     Implement a user suggestion that tame humanoids should avoid eating
corpses of their own species.  Prevent them--except for kobolds, orcs, and
ogres--from doing so unless starving.  Arbitrary:  tame elves won't eat
other elves even when starving.  A polymorphed character will incur the
effects of cannibalism when eating either his/her underlying race _or_
the current one (player orcs and cavemen aren't affected though).

20 years agoU1270 - monster evading kick produces a teleport message in Sokoban
cohrs [Thu, 27 Jan 2005 17:21:33 +0000 (17:21 +0000)]
U1270 - monster evading kick produces a teleport message in Sokoban
This time, it was just the message that was incorrect.  Added a
!level.flags.noteleport check before displaying "teleports".

20 years agouse of NULL (trunk only)
nethack.allison [Sun, 23 Jan 2005 19:59:21 +0000 (19:59 +0000)]
use of NULL (trunk only)

There were 2 files where NULL had crept into the sources,
even though we are not using it anywhere else.

20 years agowin32 and wince
nethack.allison [Sun, 23 Jan 2005 19:39:01 +0000 (19:39 +0000)]
win32 and wince
Remove the email address which is no longer valid from
several NetHack source files.

20 years agodjgpp zlib support
nethack.allison [Sun, 23 Jan 2005 16:29:16 +0000 (16:29 +0000)]
djgpp zlib support

Tested the djgpp MSDOS build with zlib support.

20 years agofollowup to compression changes
nethack.allison [Sun, 23 Jan 2005 14:34:29 +0000 (14:34 +0000)]
followup to compression changes

20 years agobones follow-up
nethack.allison [Sat, 22 Jan 2005 18:58:02 +0000 (18:58 +0000)]
bones follow-up

include the savefile info in bones files

20 years agoconfig.h follow-up
nethack.allison [Sat, 22 Jan 2005 18:42:16 +0000 (18:42 +0000)]
config.h follow-up

I had uncommented ZLIB_COMP for testing in config.h, but it should
have been commented when the diff was cut.

20 years agoincrement patchlevel
nethack.allison [Sat, 22 Jan 2005 15:48:42 +0000 (15:48 +0000)]
increment patchlevel

20 years agozlib support; also internal compression changes
nethack.allison [Sat, 22 Jan 2005 15:28:15 +0000 (15:28 +0000)]
zlib support; also internal compression changes

o Add support for zlib compression via ZLIB_COMP in config.h (ZLIB_COMP
  and COMPRESS are mutually exclusive).
o rlecomp and zerocomp are run time options available if RLECOMP and
  ZEROCOMP are defined, but not turned on by default if either COMPRESS
  or ZLIB_COMP are defined.
o Add information to the save file about internal compression options
  used when writing the save file, particularly rlecomp and zerocomp
  support.
o Automatically adjust rlecomp and zerocomp (if support compiled in)
  when reading in an existing savefile that was saved with those options
  turned on.  Still allows writing out of savefile in preferred format.
o In order to support zlib and not conflict with compress and uncompress
  routines there, the NetHack internal functions were changed to
  nh_uncompress and nh_compress as done in the zlib contribution received
  in 1999 from <Someone>.

I tagged the sources NETHACK_3_5_0_PREZLIB prior to applying these
changes.

20 years agoU1258 - removing ring of levitation while riding a flying steed
cohrs [Fri, 21 Jan 2005 22:27:19 +0000 (22:27 +0000)]
U1258 - removing ring of levitation while riding a flying steed
As reported, you'd get the "float gently to the ground" message even while
riding a flying steed.  Rearranged the code and added a new case for this.
I found it odd that Hallucination protected you from falling out of the
saddle due to the Sokoban air currents.  The message implied otherwise, so
I've made the sokoban_trap code apply in both cases.

20 years agopolymorphing into a flyer while in a pit
cohrs [Tue, 18 Jan 2005 16:17:27 +0000 (16:17 +0000)]
polymorphing into a flyer while in a pit
<Someone> reported that if you polymorph into a flying monster while in a
pit, you must take u.utrap turns to first climb out before you can fly.  Of
course, once you're out, you can swoop down into the pit to pick things up
w/o delay.  Rather that have you automatically fly out (e.g. like quaffing
a potion of levitation), I thought it was better to take a turn to fly out,
so that's what I've implemented.

The code to deal with exiting a pit is moved to a new climb_pit function
and the "up" command now lets you climb from a pit too (something I've
found non-intuitive in the past).

Finally, I noticed that non-moving monsters could still go up/down even
though they couldn't move around.  Added non-moving checks in doup/dodown.

20 years agoU1231 - messages ordering when displacing a pet into a trap
cohrs [Tue, 18 Jan 2005 15:23:47 +0000 (15:23 +0000)]
U1231 - messages ordering when displacing a pet into a trap
move the message so it's before the mintrap test.  newsym's are needed
to ensure the display is correct if a --More-- prompt results.  I left the
"frighten" message alone, except for tense.  As per Pat's suggestion, I
changed the wording to future-proof the message.

20 years agoexperience calculation
cohrs [Tue, 18 Jan 2005 15:01:10 +0000 (15:01 +0000)]
experience calculation
fix the bug <Someone> noticed WRT experience calculation for nonphysical damage.

20 years agocomment isqrt
cohrs [Mon, 17 Jan 2005 22:24:00 +0000 (22:24 +0000)]
comment isqrt
Help code divers to understand why isqrt is not a complicated function.

20 years agoGuidebook update
nethack.allison [Sun, 16 Jan 2005 03:57:39 +0000 (03:57 +0000)]
Guidebook update

20 years agofixes35.0 update
nethack.allison [Sat, 15 Jan 2005 14:12:23 +0000 (14:12 +0000)]
fixes35.0 update

20 years agowin32tty: prevent early messages from flashing by unseen
nethack.allison [Sat, 15 Jan 2005 14:04:03 +0000 (14:04 +0000)]
win32tty: prevent early messages from flashing by unseen

20 years agocustomize role, race, gender, align choices (trunk only)
nethack.allison [Sat, 15 Jan 2005 14:01:47 +0000 (14:01 +0000)]
customize role, race, gender, align choices (trunk only)

Support negation syntax to restrict unwanted race, role, gender, align
options:
        OPTIONS=role:!knight, role:!tourist, race:!orc
prevents them from being picked randomly or
appearing in the pick lists at the start of the game.

20 years agostartup problems on Unix
cohrs [Thu, 13 Jan 2005 01:36:40 +0000 (01:36 +0000)]
startup problems on Unix
I found I was no longer able to start "nethack", I think due to the change
in the save file structure.  But, it looks like the Unix-specific check in
bufon() was never quite correct.  I'd have to guess we've been lucky up
until now.

20 years agofiles.c fixup
cohrs [Thu, 13 Jan 2005 00:39:38 +0000 (00:39 +0000)]
files.c fixup
With recent files.c changes, code required for Qt compilation on Unix no
longer worked.

20 years agomissing copyright
cohrs [Thu, 13 Jan 2005 00:34:35 +0000 (00:34 +0000)]
missing copyright
<Someone>, I think, noticed there was no copyright on the window.doc.
Add one.  I don't recall when I originally wrote it, but I last changed
it in 2003, so that's the year I'm putting in.  Anyone else that wants to
share the blame, please add your name and update the year as needed.

20 years agofollowup: drinking from sinks while levitating
cohrs [Tue, 11 Jan 2005 19:47:37 +0000 (19:47 +0000)]
followup: drinking from sinks while levitating
This is a followup to the patch I made a couple months ago.  It replaces
the "!Levitation && !u.uswallow" checks with can_reach_floor(), which
makes a more complete set of checks and is more consistent.  I applied
this to fountains too.  I doubt that fountains hit the ceiling, and the
checks also seem reasonable for heights in between (e.g. while mounted).

20 years agoyet another bit
nethack.allison [Mon, 10 Jan 2005 01:13:03 +0000 (01:13 +0000)]
yet another bit

20 years agoAltGr-4 and alternate tiles in menus - trunk only (from <Someone>)
nethack.allison [Sun, 9 Jan 2005 23:35:52 +0000 (23:35 +0000)]
AltGr-4 and alternate tiles in menus - trunk only (from <Someone>)

On Mon, 03 Jan 2005 12:04:29 +0000, <email deleted> wrote:
> Dear NetHack win32 developers,
>
> This bug does not affect the win32 binaries that you distribute but it
> does affect NetHack 3.4.3 if I build it from source. The difference may
> be due to different compilers or whatever. I'm using mingw32-gcc v3.2
>
> I don't quite understand what's going on (I never was much good at
> win32 programming), but it appears that the WM_KEYDOWN message for
> AltGr-4 is being translated into a WM_CHAR message with a wParam of
> 128. I don't understand why that should be, but anyway. The problem
> then occurs when NetHack casts wParam to char which, since char is
> signed, gives -128. onListChar() then passes -128 to isdigit() which
> causes the crash. The fix appears to be to simply drop the cast:

Also
> <email deleted>
> Newsgroups: rec.games.roguelike.nethack
> Subject: Changing tile set for item list?
> Date: 1 Jan 2005 20:03:08 -0800
> <email deleted>
>
> I'm using the windows interface for Nethack 3.4, and I've successfully
> changed the tileset used by changing defaults.nh.  The only problem is,
> the item list (i.e. The list that comes up when I press "i") still uses
> the old tiles.  Is there any way to change the list so it uses the new
> tiles?  I've searched the guidebook to no avail.  I'm debating if it is
> even possible.
>
> Thanks for the help,
> -Zmann

trunk patch:
- menu: display custom tiles if map is not ASCII
- menu: display '-'/'+'/'#' in place of a tile if map is ASCII
- fix isdigit() crash on AltGr-4 with mingw

It looks kinda weird with huge tiles (e.g. absurd96) but that could
be just me. Comments/suggestions are welcome.

-<Someone>

20 years agoselectsaved follow-up bit (trunk only)
nethack.allison [Sun, 9 Jan 2005 23:25:40 +0000 (23:25 +0000)]
selectsaved follow-up bit  (trunk only)

fix a cut-and-paste error that I didn't catch earlier.

20 years agoselectsaved follow-up bit (trunk only)
nethack.allison [Sun, 9 Jan 2005 21:58:43 +0000 (21:58 +0000)]
selectsaved follow-up bit  (trunk only)

20 years agoselectsaved option (trunk only)
nethack.allison [Sun, 9 Jan 2005 21:40:24 +0000 (21:40 +0000)]
selectsaved option (trunk only)

- always write plname into save file, no longer conditional
- add 'selectsaved' wincap option to control the display of
  a menu of save files for ports/platforms that support it.
- add support for win32 tty using normal nethack menus.
- the win/tty/wintty code is generalized enough that any
  tty port could support the option if the appropriate port-specific
  code hooks for wildcard file lookups are added to src/file.c
  specifically in the get_saved_games() routine. There is posix
  code in there from Warwick already, and there is findfirst/findnext
  code in there from win32. Warwick has the posix code only
  enabled for Qt at present, but with wintty support, that could be expanded
  to other Unix environments quite easily I would think.

Here is what the tty support looks like:

    NetHack, Copyright 1985-2005
         By Stichting Mathematisch Centrum and M. Stephenson.
         See license for details.

    Select one of your saved games
    a - Bob
    b - Fred
    c - June
    d - mine3
    e - Sirius
    f - Start a new character
    (end)

The following files existed in the NetHack SAVEDIR directory
at the time:
    ALLISONMI-Bob.NetHack-saved-game
    ALLISONMI-Fred.NetHack-saved-game
    ALLISONMI-June.NetHack-saved-game
    ALLISONMI-mine3.NetHack-saved-game
    ALLISONMI-Sirius.NetHack-saved-game
Note that despite the file names, the actual character name
is drawn from the savefile.

The WIN32CON support passes
    USER-*.NetHack-saved-game
to findfirst/findnext where USER is your login name of course.

20 years agofilled trap doors on castle can be re-dug
nethack.allison [Sat, 8 Jan 2005 14:37:36 +0000 (14:37 +0000)]
filled trap doors on castle can be re-dug

20 years agoextern.h bit
nethack.allison [Thu, 6 Jan 2005 04:36:30 +0000 (04:36 +0000)]
extern.h bit

20 years agono message
nethack.allison [Tue, 4 Jan 2005 02:32:22 +0000 (02:32 +0000)]
no message

20 years agomore trunk 3.5
nethack.allison [Sun, 2 Jan 2005 20:55:41 +0000 (20:55 +0000)]
more trunk 3.5

20 years agohousekeeping: mark trunk sources 3.5 (misc)
nethack.allison [Sun, 2 Jan 2005 17:21:18 +0000 (17:21 +0000)]
housekeeping: mark trunk sources 3.5 (misc)

20 years agohousekeeping: mark trunk sources 3.5 (doc)
nethack.allison [Sun, 2 Jan 2005 17:10:47 +0000 (17:10 +0000)]
housekeeping: mark trunk sources 3.5 (doc)

20 years agohousekeeping: mark trunk sources 3.5 (dat)
nethack.allison [Sun, 2 Jan 2005 16:54:29 +0000 (16:54 +0000)]
housekeeping: mark trunk sources 3.5 (dat)

20 years agohousekeeping: mark trunk sources 3.5 (include)
nethack.allison [Sun, 2 Jan 2005 16:50:12 +0000 (16:50 +0000)]
housekeeping: mark trunk sources 3.5 (include)

20 years agohousekeeping: mark trunk sources 3.5 (src)
nethack.allison [Sun, 2 Jan 2005 16:44:46 +0000 (16:44 +0000)]
housekeeping: mark trunk sources 3.5 (src)

20 years agonew year
nethack.allison [Sun, 2 Jan 2005 13:13:17 +0000 (13:13 +0000)]
new year

20 years agoregion player_flags follow-up correction [trunk only]
nethack.allison [Sun, 2 Jan 2005 13:04:56 +0000 (13:04 +0000)]
region player_flags follow-up correction [trunk only]

20 years agoregion boolean field [trunk only]
nethack.allison [Thu, 30 Dec 2004 15:54:42 +0000 (15:54 +0000)]
region boolean field [trunk only]

Since the trunk breaks savefile compatibility anyway,
remove some code that was inappropriately loading a boolean
with multiple values in order to preserve savefile compatibility in 3.4.x

[Note: this patch increments EDITLEVEL rendering existing bones
and save files obsolete]

20 years agominor doorganize() addition
nethack.allison [Fri, 24 Dec 2004 23:30:31 +0000 (23:30 +0000)]
minor doorganize() addition

This is a minor addition to Pat's doorganize() patch.

This just allows you to press '?' in the midst of an #adjust command
to see what letters are already in use. It is a PICK_NONE menu for
viewing only, because your actual response to the #adjust must not
be limited to the letters already used. It helps to be able to see
what's already consumed without having to terminate the command,
inventory, then start it again.

20 years agoadd May 2004 trunk patch to the branch
nethack.allison [Fri, 24 Dec 2004 23:18:51 +0000 (23:18 +0000)]
add May 2004 trunk patch to the branch

Bug Report:
>> Status of the doppelganger (neutral): Level 13 HP 1433(1433) AC 5.
>> [See the HPs!! ]

Michael:
> I used a debugger and traced this massive hit point growth
> to this line in mon.c, function newcham(). (I watched the mhp
> jump from 58 to 567 with this one calculation!
>> Ah, I see that this problem is fixed in the trunk but still present in
>> the branch. This seems serious/abusive enough to warrant the fix to be
>> applied to the branch too, doesn't it?

Pat:
>      I don't think it's all that important but you're welcome to
> extract and adapt the patch if you like.

20 years agoobj->quan bits
nethack.allison [Tue, 21 Dec 2004 16:40:14 +0000 (16:40 +0000)]
obj->quan bits

20 years agospelling bit
nethack.allison [Tue, 21 Dec 2004 15:57:59 +0000 (15:57 +0000)]
spelling bit

...on the word "grammatical" no less.

20 years agoreplacement meaningless_code patch
cohrs [Tue, 21 Dec 2004 06:27:24 +0000 (06:27 +0000)]
replacement meaningless_code patch
I moved the "else" into the comment rather than the suggested removal of
the comment.

20 years agofix monster summoning message
nethack.rankin [Tue, 21 Dec 2004 04:27:34 +0000 (04:27 +0000)]
fix monster summoning message

     From a bug report:
> If the Summon Nasties monster spell gates in two minions instead of one,
> the message still says "A monster appears from nowhere!"

The code wasn't counting any summoned monsters who had an opposite alignment
to the summoner.  It also assumed that the 10% chance for demon summoning
in Gehennom always yielded exactly one monster even though that can produce
zero or more than one.

20 years agocandelabrum wording
nethack.allison [Mon, 20 Dec 2004 23:57:02 +0000 (23:57 +0000)]
candelabrum wording

On Sat, 18 Dec 2004 14:07:14 +1300, <email deleted> wrote:
> Adding one of several candles to a candelabrum which already has six
> gives an ungrammatical message.

20 years agotreat statues and containers alike in follow-up
nethack.allison [Fri, 17 Dec 2004 13:27:29 +0000 (13:27 +0000)]
treat statues and containers alike in follow-up