Commit Graph

1856 Commits

Author SHA1 Message Date
PatR
366043f714 tribute catch-up 2016-01-04 17:30:05 -08:00
Pasi Kallinen
1e0b16c99d Add the compile-time options to fixes-file 2016-01-04 23:19:49 +02:00
nhmall
c4d45d6960 make some mextra guard macros available
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   include/mextra.h
2016-01-03 10:48:47 -05:00
PatR
f279a9ec0d fix #H4153 - killed by kicking something weird
Steps to make sure 'kickedobj' didn't end up as a stale pointer
prevented it from being around to format the reason for death when
a kicking attempt was fatal.
2016-01-03 00:36:31 -08:00
Pasi Kallinen
8e7e79448e Enable scroll bar in X11 menu windows 2016-01-01 21:24:55 +02:00
nhmall
fce9f1131d improve messaging on vampire bat to fog cloud transition in Vlad's
Bug 271 - #H4167: vampires being fog clouds show up as bats on telepathy

A bug reporter wrote:
> In top level of Vlad's, the vampires hiding as fog clouds in the closets show
> up on telepathy as B, when far-looked as vampire bat.  once the door opens they
> are fog clouds.
>
> I currently have telepathy from the PYEC.

The vampire /was/ shapeshifted into a vampire bat, but once the secret door
was revealed, it shifted into a fog cloud in order to pass under the door.

If you were to blast the door with a wand of striking from a distance,
you would have encountered the vampire bat.

This clarifies the situation through better messaging.

--------
Original debug call stack trace:
     NetHack.exe!newcham(monst * mtmp, permonst * mdat, char polyspot, char msg) Line 3140
     NetHack.exe!vamp_shift(monst * mon, permonst * ptr) Line 1598
     NetHack.exe!m_move(monst * mtmp, int after) Line 1219
     NetHack.exe!dochug(monst * mtmp) Line 566
     NetHack.exe!dochugw(monst * mtmp) Line 100
     NetHack.exe!movemon(...) Line 707
     NetHack.exe!moveloop(char resuming) Line 105
     NetHack.exe!main(int argc, char * * argv) Line 105
2016-01-01 11:17:57 -05:00
PatR
3c43f155aa tribute: The Colour of Magic 2015-12-31 15:07:06 -08:00
PatR
a236f9d5f6 fix bz265 - accessibility fix for reluctant pet
Requested by a blind player.  The message "Fido moves only reluctantly"
didn't convey enough information to be useful.  Describe the reason why
the move is reluctant:  "Fido steps reluctantly over <some object>."

If there is a pile, it will describe the top item rather than whichever
cursed item the pet doesn't want to step on.
2015-12-30 23:38:11 -08:00
PatR
da0876482e fix #H4147 - "unlockable chest" desc is misleading
Change "unlockable" to "broken" so that it won't be misunderstood to
mean "capable of being unlocked".  The accompanying suggestion to omit
"broken" unless/until a lock or unlock attempt is made is no good since
the main reason for describing the broken lock is to avoid unnecessary
attempts to lock or unlock a container that the hero knows to be broken
but the player may have forgotten.

I also changed remote look-at for objects to use distant_name(doname)
instead of distant_name(xname) so that qualifiers like "empty" and
"broken" will show up on chests you've investigated before but aren't
standing on now.  Monster type for corpse also gets shown, instead of
just 'food (corpse)'.  Other remote items will become more verbose,
but only those that the hero has already seen up close.
2015-12-30 02:33:42 -08:00
PatR
5834ace823 fix 'doterrain menu bug'
From a report sent directly to devteam:  the #terrain command had the
same bug as the '`' command (which was one of the very first ones
reported):  impossible("add_menu called before start_menu").  Only X11
notices.
2015-12-29 15:09:50 -08:00
PatR
0c2443ebd0 fix 'blind sink behavior'
Reported directly to devteam:  teleporting or polymorphing a sink when
dropping the relevant ring into it was suppressed if the hero couldn't
see it happen.

Being unable to see the sink transform or vanish shouldn't stop that
from happening.  Since the hero is known to not be levitating (because
of the sink), it can be assumed that he can feel the transformation or
vanishment (is that a real word?), so use the same messages regardless
of blindness.
2015-12-28 17:32:31 -08:00
PatR
901317f57c force TIMED_DELAY for OSX
Outputing extra characters to induce a delay is useless on OSX, so set
TIMED_DELAY by default instead of relying on user to do it.
2015-12-28 14:35:23 -08:00
Pasi Kallinen
ff30a56e3e Add config file examples to Guidebook 2015-12-28 20:00:50 +02:00
PatR
e43e97b021 death-reason sanitizing
Prevent commas, equal signs, and tabs in reason for death.  Comma
can make while-helpless reason ambiguous in record and basic logfile.
Equal sign can do the same for fixrecord.awk, the awk program that
can be used to fix up corrupted 3.6.0 record files, if it resorts to
constructing logfile records out of xlogfile records.  And tab could
break parsing of xlogfile (it should already be excluded though; the
code that lets players assign names to monsters uses mungspaces(), and
one of the things that does is to convert any tab into a space before
squeezing consecutive spaces down to one).

The name alteration shows up for tombstone as well as for file entries.
That could be changed but hardly seems worth the effort.  Perhaps the
name sanitizing ought to be moved to the initial naming?  At least then
it would be pretty obvious that it was intentional rather by mistake.
2015-12-27 17:43:58 -08:00
PatR
67e6029723 tribute: Snuff 2015-12-27 01:46:12 -08:00
nhmall
6117eddc62 one statue from single vampire via cockatrice corpse
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   include/extern.h
	modified:   src/mon.c

Fixes H4148 (bz246) and H4150 (bz248)

comments:
I wielded a c-corpse against a shapeshifting vampire bat (checked with a
stethoscope, it said "shapeshifter".) The bat turned to stone and spawned a
vampire.  I hit the vampire and it also turned to stone, so I had two statues
from one monster (vampire bat and vampire.)  Not sure if this is a bug or a
feature...

comments:
Engulfed by a fog cloud that was actually a Vampire,
and got the message: "You break out of the vampire!"
2015-12-26 19:08:08 -05:00
PatR
e429415832 fix #H4144 - rejecting named monster's own name
Some monsters can't be named, but if the user tried to assign them a
name that matched what they were already called, the rejection message
could be silly.  Reported case was "I'm Izchak, not Izchak!".  The fix
is more general than just for shopkeepers, although their reject
message was silliest when complaining about the name already in use.
For the cited case, feedback will now be 'He is already called Izchak.'
2015-12-25 23:36:44 -08:00
PatR
1c80503938 fix #H4146 - more enlightenment vs drain resistance
Duplicate of another recent report as far as drain resistance from
Excalibur/Stormbringer/Staff of Aesculapius not being shown by
enlightenment goes, but this one mentioned that it also wasn't being
shown for lycanthropy.  Being inflicted by that does confers level-
drain resistance.  were_change() wasn't calling set_uasmon() since
it isn't changing youmonst.data, but set_uasmon() is were intrinsics
conferred by creature form are set up.  So call it when changing
were-form.  Direct access to u.ulycn wasn't calling it either, so add
a new routine to assign the value to that instead doing so directly.
2015-12-25 16:46:02 -08:00
PatR
0d36c443a3 fix #4040:2 - message typo for pet mind flayer
Mentioned in a completely unrelated report (about energy drain for
vortex attack):  the message given if a tame mind flayer is killed by
attempting to eat Medusa's brains had "then is passes" where "then it
passes" was intended.
2015-12-25 15:33:56 -08:00
PatR
192372a9ac "fix" #H4040 - energy vortex power drain
Reporter thought the fact that two different DREN cases had different
chances to inflict energy drain was an inconsistency, but it was
intentional.  Attack for DREN damage has 25% chance to drain energy,
and is never used since no monster has such an attack.  Engulf for
DREN damage has 75% chance to drain energy; energy vortices have this,
and the higher chance to be drained while engulfed was intentional.
So add comments explicitly spelling out the 25% and 75% chances.

During beta testing there was a complaint that the energy drain was
much too severe:  once hero's current energy drops to 0, excess drain
for current attack and future drains come out of max-energy instead.
That's survivable for caster-type characters with really high energy,
but drained low energy characters to 0 max energy very quickly.
I agreed with the complaint but didn't implement a fix until too late
for 3.6.0.  I've since thrown that one out and done this one instead.
Change base drain amount from 4d6 to 2d6, and weaken it more to 1d6
when energy is low or strengthen it to 3d6 when energy is high.  It
almost certainly will need further tuning.
2015-12-25 15:00:28 -08:00
PatR
67826ff67b inappropriately sensing humans and elves
Discovered while testing the from-what enhancements to enlightenment.
Polymorphing into a vampire confers the ability to sense humans and
elves without having telepathy or being triggered by blindness.  That
would be taken away if you polymorphed into something else, but was
being left in effect if polymorph just timed out and hero returned to
normal form.

Same thing occurred for sensing shriekers if you poly'd into a purple
worm and then reverted to normal (something much less likely to get
noticed and not really subject to abuse if it ever did).

Bonus fix:  the code involved was using 0 to mean that Warn_of_mon
from polymorph wasn't in effect, but 0 is also giant ant.  This makes
it use NON_PM for that instead.
2015-12-25 14:24:18 -08:00
PatR
0ed3d8be4c from_what()
Enlightenment/attribute disclosure while in wizard mode shows reasons
for some of the intrinsics.  This adds some more of those:  innately
due to polymorph for lots of things, and innately due to role for
knight's jumping.  (Drain_resistance from equipped item came with the
'resistance from Excalibur' patch.)
2015-12-25 14:15:00 -08:00
PatR
6f595dabcc fix #H4142 - resistance from Excalibur
Enlightenment and end of game disclosure didn't report level-drain
resistance if that was obtained via wielding Excalibur (or Stormbringer
or Staff of Aesculapius).  Drain_resistance wasn't one of the attributes
set for intrinsics/extrinsics when wielding or unwielding weapon or
wearing/unwearing other equipment.  loseexp() checks resists_drli()
which does check for items in use, so level drain would be aborted,
possibly after messages claimed that it was taming place.  I didn't try
to untangle any of that, just changed set_artifact_intrinsic to include
a test for DRAIN_RES.
2015-12-25 14:13:05 -08:00
PatR
9df552543b fix "Patch for dos mode nethackrc file on linux"
Reported directly to devteam (12 Dec), user had a config file originally
from MSDOS or Windows and used it on a linux system.  That works as-is
except when it contained an invalid option line.  Feedback was
"ad option line: "whatever-the-line-was
because of the carriage return character staying in the option buffer
after linefeed was stripped off from CR+LF line end.

He included a patch which replaced this existing fixup after fgets()
if ((p = index(buf, '\n')) != 0) *p = '\0';
with a loop over the whole string changing either '\n' or '\r' to '\0'.
This uses
if ((p = index(buf, '\n')) != 0) {
if (p > buf && *(p - 1) == '\r') --p;
*p = '\0';
}
instead.  Ordinarily I would have just cloned the original line and then
substituted \r for \n in the copy, but the report mentioned "I couldn't
get index to work with carriage return".  I don't know what he tried to
do or why simple index(buf,'\r') might not work as intended on his
platform, so I went with something that will work even if index()
behaves as strangely as the report suggested.

(We already have a couple of index(string,'\r') calls in use, but I'm
not going to change those unless someone complains about a problem.)
2015-12-24 16:00:50 -08:00
Pasi Kallinen
1cddb2f717 Fix bz210, H4114: Castle chest can be trapped 2015-12-24 14:07:35 +02:00
Pasi Kallinen
cc7d5c31b4 Allow optional parameter for boolean config options
Some people try to set boolean options in the config file
by giving the option a parameter, so allow that:

OPTIONS=color:true

Allowed parameters are "true", "yes", "false", and "no".
Negating an option and giving it a parameter is an error.
2015-12-24 11:24:13 +02:00
PatR
ad838c7e79 fix #H4041 - implicit declaration of has_colors()
_M_UNIX (SCO UNIX) and __linux__ (all flavors of linux?) both call
has_colors() for TTY_GRAPHICS+TEXTCOLOR configuration, but neither
declared it.  The new declaration is just a guess based on usage.
2015-12-23 16:25:06 -08:00
PatR
9114a334c9 fix "killed by a died"
Explosion caused by an unseen gas spore resulted in messages about
"explosion" instead of "gas spore's explosion", which is intended, but
followed that with a death reason of "killed by a died" which isn't.
2015-12-23 16:05:45 -08:00
Pasi Kallinen
91a7d393cd Do not autopickup unpaid items in shops
This is overridden by pickup_thrown and autopickup
exceptions.
2015-12-22 22:36:30 +02:00
Pasi Kallinen
715fd7e3d9 Displace a pet rather than stop travel
... and stop travel if you take damage from any source.

Original patch via Acehack by Alex Smith
2015-12-21 19:13:45 +02:00
Pasi Kallinen
9a2eb370e7 Make travel consider traps like closed doors
Test case: U-shaped corridor, with a known trap in it.
Before this change, travel would try to move straight at
the target, bumping the wall or walking into a dead-end.
After this, travel will go along the corridor and then stop
right before the trap.

Original patch via AceHack by Alex Smith.
2015-12-21 17:36:14 +02:00
PatR
c86ae780c4 tribute: more Raising Steam
The number of passages felt a bit light, so add a few more.
2015-12-21 02:06:23 -08:00
PatR
b66b5ee6c3 fix #H4072 - alchemy bugs
The 3.6.0 feature of dipping only a subset when attempting to dip a large
stack of potions into another potion (other than water) was calculating
the size of the subset poorly.  Dipping 9 non-magic potions would always
dip the whole stack, but attempting to dip 10 would split the stack and
dip 2..9, so manually splitting off 9 in advance let the player always
get maximum yield.  This anomaly didn't extend to dipping magic potions,
where dipping 2 always dipped "all" 2 and attempting to dip 3..N dipped
2..min(N,9) regardless of N.  Also, the decision about whether what you
were dipping was magic was based on the potion being dipped even though
most alchemy formulas yield the same outcome when dipping magic potion
into non-magic or vice versa.

Change the splitting calculation to yield 3..min(N,8) for magic and 7..N
for non-magic, with no extra threshold that can produce anomalies in the
result.  Also, the determination of magic vs non-magic is based on the
outcome rather than either of the inputs--unless the outcome is random,
in which case it will be treated as magic if either of the input potions
is magic.
2015-12-20 17:17:48 -08:00
PatR
40ad82ed77 fix #H4105 - credit cloning
Putting gold into a hero-owned container on a shop's floot gave credit
for the amount of the gold but also set the gold object no_charge, so
it could be taken out without taking away the credit.  Then put back
in and taken out as many times as the player liked, doubling the gold
each time until the shopkeeper was out of cash.

I think the proper fix would be to avoid giving credit instead of not
marking the gold no_charge, but that would require multiple additional
changes so I took the easy way out.

Most of the changes to pickup.c are reformatting that it escaped prior
to release.  The changes to shk.c are cosmetic and not part of the fix.
2015-12-20 01:44:19 -08:00
PatR
0d2a4afd81 fix "spellbook of novel" on discoveries list
Avoid "spellbook of novel" after novel becomes discovered.  Now it will
just be "novel".  Prior to discovery, it might be on the list as "book
called whatever" if the player assigns a type name.

Also, make novel become discovered after reading one instead of only via
object identification.  It already shows up as "novel" in inventory, but
changing its definition to designate it as not-interesting-to-discover
feels disrespectful to the tribute.
2015-12-19 20:07:51 -08:00
PatR
f87fd929e5 have #jump cast "jumping"
Requested during beta testing:  if hero can't jump, have #jump command
attempt to cast the jumping spell.  This is similar to how #unturn and
^T cast spells when used while lacking the innate ability.
2015-12-19 19:39:20 -08:00
PatR
7d6d508eef more tin opener
Reading a non-cursed scroll of enchant weapon has a side-effect of
uncursing a weapon welded to hand(s).  Make it do the same thing for
cursed tin opener, the only non-weapon/non-weptool that welds to hand.
2015-12-19 18:14:39 -08:00
Pasi Kallinen
43bf9c978d Improve the tin opener 2015-12-19 14:44:39 +02:00
nhmall
a5c63af579 objected to 2015-12-18 20:55:24 -05:00
nhmall
c69e116438 fixes update for database change
sceptre of might dat/database change fixes entry
2015-12-18 19:47:18 -05:00
nhmall
5ee09d66d6 blind pronunciation of scroll formula not a literacy violation
bug bz25, no web id, devteam email received on 1/3/2006 6:15 AM:
> Reading a scroll while blind shouldn't violate illiterate conduct
2015-12-18 19:02:19 -05:00
nhmall
2765790b24 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0
Conflicts:
	doc/fixes36.1
2015-12-18 12:56:38 -05:00
nhmall
7019a7da77 fix H4101: can hear pets while deaf
This is a fix for H4101, bz192.

add non-audio (felt) outcome to yelp()

This also add #wizintrinsic command because testing this was a pain
without a simple, straightforward way to go deaf that didn't time-out
before the situation being tested recurred.
2015-12-18 12:50:25 -05:00
Pasi Kallinen
24aea231d4 Add fixes entries 2015-12-18 18:49:50 +02:00
PatR
20b2120f3f fix bz 103+#H4095 - high scores ", while helpless"
If a character dies with 'multi' at a non-zero value, the reason for
helplessness is appended to the cause of death.  But that was taking
place in writeentry(), which is used for every score entry while
rewriting 'record' when a new high score is added.  So whenever a new
score with helplessness was added, all existing entries got corrupted
by having the newest game's reason for helplessness tacked on.

Append the helplessness reason while formatting the cause of death
instead of when writing out score and logfile entries.  xlogfile is
handled a little differently in case the cause of death plus reason
for helplessness is too long so truncated for record and logfile.
Full reason is still put into xlogfile.
2015-12-17 19:50:06 -08:00
nhmall
3e597b6882 Fix bug C343-20 wrong level shown at death
Changes to be committed:
	modified:   doc/fixes36.1
	modified:   src/ball.c

I looked up the original bug report that led to bug page C343-20
"When dying immediately on entering a level, the map may show you dying on the previous level."

It was received public report U891:
> When one is being punished and goes down a staircase and dies because the
> ball and chain fell on their head, one gets the message about their death
> while the old level is still being displayed. I wasn't sure whether this
> was a bug or not because on one hand it wouldn't make much sense to
> generate a new level if the character is going to die anyway. However,
> that being said it does make a difference if the character is about to go
> down into a level where one cannot leave bones files, ie medusa or the
> first level of the mines (if i remember correctly). So, if your character
> dies from this does the bones file get left on the level you were on
> (which is still displayed at the time of death) or the level you died as
> soon as you got to (but was never displayed)? Thanks!

Pat had remarked in response: "So this is just a display issue; game play works as intended
(for the program; I imagine you weren't planning to get killed."

A debug trace in wizard mode 3.6.1 beta shows that the relevant code path is this:
NetHack.exe!done(int how) Line 908
NetHack.exe!losehp(int n, const char * knam, char k_format) Line 2678
NetHack.exe!drag_down(...) Line 823
NetHack.exe!goto_level(d_level * newlevel, char at_stairs, char falling, char portal) Line 1316
NetHack.exe!next_level(char at_stairs) Line 1157
NetHack.exe!dodown(...) Line 954
NetHack.exe!rhack(char * cmd) Line 3416
NetHack.exe!moveloop(char resuming) Line 464
NetHack.exe!main(int argc, char * * argv) Line 104

This patch clears the display for the situation in drag_down(),
so the old level is not shown.
2015-12-17 20:27:42 -05:00
PatR
8f2a408ef3 fix #H4065 - unnecessary role select confirmation
If player specified all four facets of role:  role, race, gender, and
alignment, via command line or option settings, the tty interface still
asked the player to confirm whether the character's role/&c was ok?
Skip that confirmation when all four things have already been chosen.
2015-12-17 06:37:08 -08:00
Pasi Kallinen
8af8c42e62 Clarify regex support in the guidebook 2015-12-17 12:47:03 +02:00
PatR
d68bb738d2 fix #H4095 - naming discoveries list
The menu for picking an item to name when using the "on discoveries list"
choice for #name or C when that list spanned multiple pages was exiting
for <space> instead of advancing to next page.  Space was being assigned
as the selection letter for class header lines, which made no sense.
2015-12-16 18:16:39 -08:00
nhmall
fa092f5fe9 housekeeping for 3.6.1
Changes to be committed:
	modified:   Files
	modified:   README
	modified:   dat/history
	modified:   doc/Guidebook.mn
	modified:   doc/Guidebook.tex
	modified:   include/global.h
	modified:   include/obj.h
	modified:   include/patchlevel.h
	modified:   src/invent.c
	modified:   src/objnam.c
	modified:   src/shknam.c
	modified:   src/sounds.c
	modified:   src/spell.c
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/nethack.def
	modified:   win/macosx/NetHackGuidebook.applescript
	modified:   win/macosx/NetHackTerm.applescript
	modified:   win/win32/mswproc.c
2015-12-16 17:52:34 -05:00