Commit Graph

6113 Commits

Author SHA1 Message Date
PatR
1f787c077b tiles lint
FDECL(foo, (boolean)) ought to have been using (BOOLEAN_P), but
the tiles code isn't including the header which defines that, so
change the argument to int.
2016-06-23 06:19:45 -07:00
Pasi Kallinen
030e3c0dfd Use the graymapping stuff in the tile lib 2016-06-23 10:15:55 +03:00
Pasi Kallinen
5f35d49105 X11: Make statue tiles look like grayscale monsters 2016-06-23 09:44:07 +03:00
keni
7feb3ad948 Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0 2016-06-22 19:29:14 -04:00
keni
ce26d2616d add docs for the cmdhelp conditionals 2016-06-22 19:28:23 -04:00
Pasi Kallinen
f32a9778b2 Unify mon throwing missile collision check 2016-06-22 21:59:29 +03:00
PatR
dc6827ce12 more monkeys
My old monkey patch was a bit more extensive than Pasi's, although
it didn't originally include letting apes be tameable with bananas.
No sense in throwing it away:
1) Make monkeys and apes be omnivores instead of carnivores.
2) Make bananas be preferred food for herbivore/omnivore subset
   of Y-class, so excludes carniverous ape, owlbear, and yeti.
   [Sasquatch remain omnivorous but aren't tameable with bananas.]
3) While updating befriend_with_food(), make horses be affected
   only by food they might eat, not by meat and corpses and tins.
   So they'll be somewhat harder to cope with for characters not
   strong enough to kill them.  [Dogs and cats are unchanged.]

Not included (not even implemented...):
0) Allow archeologists to choose monkey for starting pet.
   [The one in "Raiders of the Lost Ark" didn't actually belong
   to Indiana Jones but spent a lot of time accompanying him.]
2016-06-21 17:32:02 -07:00
Pasi Kallinen
d015cbec15 Silence some compiler warnings 2016-06-21 14:14:54 +03:00
Pasi Kallinen
9ff069ed19 Add fixes entries for my commits 2016-06-21 13:18:05 +03:00
PatR
4697c13db0 '$' vs #jump
Hero poly'd into xorn can wear jumping boots or cast jump spell, so
some target destinations which were excluded by '$' (to show valid
destinations during getpos) shouldn't have been.  Doubly so if
wearing the Eyes of the Overworld where xorn'd hero can jump through
walls rather than just into them.

This attempts to deal with diagonal moves vs open doorways sanely,
including allowing knight's move jumps in or out of them when
appropriate.

Also, need to check isok(x,y) before cansee(x,y) instead of after.
2016-06-21 02:39:21 -07:00
Pasi Kallinen
d91d445fc6 Fix compiler warning 2016-06-20 13:21:22 +03:00
Pasi Kallinen
53e8869a16 Cannot tame carnivorous ape with bananas 2016-06-20 13:05:01 +03:00
Pasi Kallinen
16118580d5 Tame simians with bananas
Bananas are quite rare, and none of the simians are very strong,
so this won't be in any way overpowered - just a bit of flavor.

I think this was originally Derek's change from Sporkhack, but
similar ones have been done in the community multiple times
in the past.
2016-06-20 12:56:58 +03:00
Pasi Kallinen
3eb919d5ab Fix #H4411: Targeting detected monster through wall with fireball
Fireball and cone of cold could target detected monsters
through a wall when cast at skilled or higher.  This allowed
eg. targeting the Wiz from outside his tower.

Use walk_path to determine the actual location where the
spell will hit, so trying to cast through a wall will
make the explosion happen at the nearest empty space.
2016-06-20 09:11:56 +03:00
PatR
1cad5efe17 fix #H3723 - eating "YUM YUM" scroll
From November, 2014, player thought eating a scroll labeled YUM YUM
while polymorphed ought to give a special message.

While implementing it, I noticed that if a g.cube managed to get on
to a spot containing a scroll of scare monster, it would eat that
along with everything else.
2016-06-18 15:38:00 -07:00
Pasi Kallinen
7c117908c5 Merge branch 'bobbydurrett-mailenvfix' into NetHack-3.6.0 2016-06-18 20:39:22 +03:00
Pasi Kallinen
bb87745142 Merge branch 'mailenvfix' of https://github.com/bobbydurrett/NetHack into bobbydurrett-mailenvfix 2016-06-18 20:37:34 +03:00
PatR
37c4655722 fix #H4404 - Orc wizard vs ring of poison resist
Orcs are innately poison resistant, so orcish wizard's random ring
shouldn't be poison resistance.  Presumeably an orc who is bright
enough to become a wizard is not so dumb as to bring a useless ring
with him/her into the dungeon....
2016-06-17 16:30:50 -07:00
PatR
1af081edc5 fix #H4388 - wishing conduct inconsistency
Make wishing for an artifact and not getting it because it already
exists break never-wished-for-artifact conduct.  The wish was made
even if the result wasn't what the player wanted.
2016-06-16 22:01:27 -07:00
PatR
2c8a359feb fix #H4401 - grammar bug when hallucinating
You kill poor goblin.
"poor" implies a pet; pet has a name; "the" is omitted for named
creature; hallucination suppresses name, so "the" needs to be
reinstated.
  You kill the poor goblin.
2016-06-16 17:39:00 -07:00
PatR
1f4574b6c8 lycanthropy tweaks
Make it be cannabalism for a were<foo> to eat a <foo> corpse.

Let werejackals summon foxes and coyotes in addition to jackals,
and werewolves summon wargs in addition to wolves and winter wolves.
2016-06-16 17:11:25 -07:00
PatR
09326f03bf cmdhelp build bug
dowhatdoes_core() was using iflags.altmeta unconditionally but
its availability and usefulness is conditional upon #if ALTMETA.
2016-06-16 00:01:06 -07:00
PatR
93dbc7216a config file typo 2016-06-15 23:58:21 -07:00
PatR
bc8e613719 engulfer tuning
Reported by me ;-} during beta testing last Fall, engulfers have a
tendency to re-engulf the hero immediately after expelling him/her.
Use mspec_used (set when expelling rather than engulfing) to make
them wait a turn or two.  Initially that made the too-soon engulf
attacks always miss, so this changes too-soon engulf to a touch or
claw attack instead.  Some tuning in damage or message may be needed.
2016-06-14 17:37:44 -07:00
PatR
7e257dc7e8 eating off floor while blind
Reported directly to devteam in late December, when blind and
lacking gloves, you could safely locate cockatrice corpses on the
floor by using 'm' prefix to move without pickup followed by 'e'
and then answering no when ask whether to eat a cockatrice corpse.
2016-06-14 16:43:03 -07:00
PatR
b47a456630 feedback for failed movement attempts
When underwater and an attempt to move onto adjacent land fails
because the destination is a wall or solid rock or closed door,
report that there's an obstacle instead of just silently failing
to make the move.

If the user has 'mention_walls' option set, give feedback for
failing to move diagonally into or out of a doorway instead of
just silently not moving.

Having 'mention_walls' set could yield "you cannot pass through
the bars" when travel was testing (not moving) for a path past
iron bars, and when it happened it tended to be delivered a whole
bunch of times.
2016-06-13 17:46:34 -07:00
Pasi Kallinen
8fdd2318c1 Change deserted temple ghost messages 2016-06-13 11:25:34 +03:00
Pasi Kallinen
942ee14d0f Move generic usernames to sysconf 2016-06-13 11:01:05 +03:00
Pasi Kallinen
3f5116fbd4 Add more hallu liquids 2016-06-13 10:26:13 +03:00
PatR
4ff8d8ac7e fix #H4060 - sysconf is re-read if no config file
Config file handling remembers the name of the last config file
read in order for options processing to use it in messages, but
it was also reused as default config file name if user-supplied
config file name failed access() test.  So the SYSCF file became
the default user config file after it was used.  The config file
handling was a real mess.

This patch fixes it for Unix but there is a lot of scope for
typos in the changes for other platforms.  Testing is needed.
2016-06-12 17:52:12 -07:00
PatR
4e12bb6144 more cmdhelp
Some number_pad handling which wasn't present in the original cmdhelp
but is acted upon in cmd.c.
2016-06-11 15:35:35 -07:00
Pasi Kallinen
2ca57b9969 Change fountains to bright blue
It's "sparkling water" after all, and makes it more obvious they're
different from water.
2016-06-11 22:43:58 +03:00
Pasi Kallinen
01d580cc0a Make ray bounceback depend on the wall type. 2016-06-11 22:26:27 +03:00
Pasi Kallinen
69aca5ac96 Reduce #turn undead helpless duration 2016-06-11 21:33:12 +03:00
Pasi Kallinen
939e507345 When attacking a peaceful monster, make other peaceful monsters react. 2016-06-11 20:27:55 +03:00
Pasi Kallinen
b75ce0b996 Prevent diagonal jump through open door 2016-06-11 19:27:50 +03:00
PatR
9ad584523f dat/symbols: RogueEpyx
I don't know whether this fixes #H4335 but it does eliminate a
bunch of duplicate symbol entries.  And the two whose duplicates
had different values are suspicious ones: using linefeed and tab as
the character for object class symbol, which could easily confuse
the tty interface's cursor position tracking.  But those should
have been overridden by the later entries which specified the
default object class characters--I couldn't find anything in symbol
processing which would cause it to keep the first value instead of
replacing that with the second one.

The report had a link to screen shot which showed a door (I think
an open one despite the '+' shape) in the corner inside a room,
something like
 --+-----------
 |            |
 |       =
 |          ..##
 |          .+#
 ----+---------
where the '+#' in the lower right looks like it belongs two rows up
and one column over, the upper left of the three '#' is white and
the other two gray (lit corridor or empty dooryway or what?), the
'=' is actually three horizontal bars in green, and the lower '.'
has the cursor on it.  There aren't any object class symbols shown
(unless the triple-barred = is one), so linefeed and tab don't look
like likely culprits.
2016-06-11 00:16:11 -07:00
PatR
1eb4d3432e "fix" bz 431 - phrasing of alignment description
The character attributes (^X) description of alignment includes
information about whether the alignment is different from what it
started out as, and is used in a verbose sentence which names the
entire three-deity pantheon.  Someone thought
  You were chaotic, temporarily on a mission for Foo
  who was opposed by Bar (lawful) and Quux (neutral).
was in need to better phrasing.  It looks straightforward to me
(the temporary aspect indicates that a helm of opposite alignment
was causing 'chaotic').  I was going to mark it "won't fix" until
I noticed that you could also get
  You were lawful, now on a mission for Bar
(when permanent, one-time alignment change was causing 'lawful').

The first one is changed for the present tense:
  You are chaotic, currently on a mission for Foo
and stays the same for end-of-game disclosure past tense.  I
considered using "formerly"--as best past tense of "currently"--
but it could be confused as a reference to the original alignment
rather than the alignment in place when the game ended.

The second is unchanged for present tense:
  You are lawful, now on a mission for Bar
For past tense, it's changed to:
  You were lawful, belatedly on a mission for Bar
Past tense of "now" should be "then", but if used it that message
it would sound absurdly stilted.  "Belatedly" is meant to suggest
that if you intended to be on a mission for Bar, you should have
started out as lawful.  (It's beside the point that some roles or
races couldn't start out at as lawful.)

Both of these changes leave something to be desired, but I'm
going to mark the bz entry closed.
2016-06-09 17:08:37 -07:00
PatR
ebd6bb62f5 fix #H4383 - blasted twice by Excalibur
...when alignment was toggled by helm of opposite alignment.  The
touch/retouch code is quite convoluted, but I think this simple
change is the right fix.
2016-06-09 11:42:34 -07:00
PatR
60b7e9bc17 more cmdhelp revamp
The if/elif/else/endif interpretor for '&' command data was too
simplistic.  It would allow multiple else clauses, elif clauses
after an else clause, and worst of all, accept a should-be-rejected
conditional block if an else or elif which evaluated true followed
an elif which evaluated false which in turn followed an earlier
true clause.  (dat/cmdhelp trigger any of those bugs.)
2016-06-08 16:54:01 -07:00
PatR
ca22b3fe46 cmdhelp revamp
Implement a rudimentary if/elif/else/endif interpretor and use
conditionals in dat/cmdhelp to describe what command each keystroke
currently invokes, so that there isn't a lot of "(debug mode only)"
and "(if number_pad is off)" cluttering the feedback that the user
sees.  (The conditionals add quite a bit of clutter to the raw data
but users don't see that.  number_pad produces a lot of conditional
commands:  basic letters vs digits, 'g' vs 'G' for '5', phone
keypad vs normal layout of digits, and QWERTZ keyboard swap between
y/Y/^Y/M-y/M-Y/M-^Y and z/Z/^Z/M-z/M-Z/M-^Z.)

The interpretor understands
 '&#' for comment,
 '&? option' for 'if' (also '&? !option'
                       or '&? option=value[,value2,...]'
                       or '&? !option=value[,value2,...]'),
 '&: option' for 'elif' (with argument variations same as 'if';
                         any number of instances for each 'if'),
 '&:' for 'else' (also '&: #comment';
                  0 or 1 instance for a given 'if'), and
 '&.' for 'endif' (also '&. #comment'; required for each 'if').

The option handling is a bit of a mess, with no generality for
which options to deal with and only a comma separated list of
integer values for the '=value' part.  number_pad is the only
supported option that has a value; the few others (wizard/debug,
rest_on_space, #if SHELL, #if SUSPEND) are booleans.
2016-06-08 14:58:35 -07:00
PatR
d92ae04afb some doc bits
Add fixes36.1 for '&' command's support of altmeta option.

Short command help lacked an entry for '&' command.

Wizard mode help omitted #vanquished and some other obscure commands.
2016-06-08 05:35:53 -07:00
Pasi Kallinen
3502cfcc5a Hallucinatory liquids for water, lava, and acid 2016-06-07 20:57:50 +03:00
Pasi Kallinen
a157c4873d Fix typo 2016-06-07 08:58:52 +03:00
PatR
a846f811af more multishot
An attempt to simplify handling of missiles which stop at hero's
location (either hit or reached end of range) would have resulted
in missiles that hit the hero not being put on the map.  I had
realized this earlier but for some reason didn't get around to
dealing with it before the previous commit.
2016-06-06 18:13:04 -07:00
PatR
8c0810f687 multishot by monsters, plus reformatting
Some reformatting of the recently added pet ranged attack code.

The redundant--but different--multishot volley code has been replaced
so that there are only two versions (hero and monster) instead of
three (hero and monster vs hero and pet vs other monster).  The monst
version was out of date relative to post-3.4.3 changes to the hero one.
The pet version was way out of date and had some bugs:  wielding an
elven bow gave a +1 multishot increment to volley count for fast weapon
even when throwing something rather than shooting arrows, wielding any
weapon which had at least +2 enchantment gave 1/3 enchantment bonus to
volley count when throwing instead of shooting shoot ammo, and a pet
which got killed in the midst of a multishot volley--perhaps by a gas
spore explosion or some other passive counterattack--would keep on
shooting/throwing until the volley count was exhausted.

Pet use of ranged weapons is not ready for prime-time.  Pets don't
hang on to missiles or launchers+ammo, they just drop them if there is
no target immediately available.
2016-06-06 17:42:58 -07:00
Pasi Kallinen
e276540230 Remove extraneous curses gfx define 2016-06-06 21:16:01 +03:00
Bobby Durrett
1c8f312fb6 Fix crash with MAIL env variable 2016-06-05 21:10:26 -07:00
PatR
e3c15574ac lint cleanup 2016-06-05 14:52:01 -07:00
PatR
30638db579 tiles fixup: zap beams
Just noticed that a change of mine to src/drawing.c 2.5 weeks ago
("zap beam symbol descriptions -- they aren't walls") triggered a
set of four complaints when processing tiles.
2016-06-05 14:50:30 -07:00