Commit Graph

488 Commits

Author SHA1 Message Date
nethack.allison
5d3448fc16 Message recall window extensions
by <Someone>

(the following text accompanies the patch at <Someone>'s web page)

add more configurability to the new msg_window option of [..]3.4.0.
It allows the configuration option to take an optional parameter to
specify the style of message history display to use.

allows the following configuration options:

msg_window:s - single message (as was the default in 3.3.0)
msg_window:c - combination; two messages in 'single', then as 'full'
msg_window:f - full window; oldest message first
msg_window:r - full window reversed; newest message first

In the event of no parameter being provided,
the patch is compatible with the current 3.4.0 behaviour:
msg_window = 'full'
!msg_window = 'single'
msg_window can be configured for these options in the
Options menu (Shift-O)
msg_window stores the current window type in the non-persistent
iflags structure, which means that savefile/bones files should be
100% compatible with Vanilla, but at the disadvantage that your
customisations to msg_window will be replaced with your
defaults.nh (or ~/.nethackrc) value every time you restart a saved game.
Credits:

The patch draws inspiration (and code snippets) extensively
from <Someone>'s original msg_window patch, [...] as well as <Someone>'s code for reverse ordering implemented until recently in
Slash'em.
2002-04-20 14:16:23 +00:00
nethack.rankin
8bcec06645 vault guard behavior
From the newsgroup:  vault guards would ask your name--and you'd
be able to respond--even when you were unconscious (for any reason
besides fainting from lack of food) or paralyzed.  (The code already
made the guard be forgiving when you failed to promptly follow him
out due to that situation, but it would repeatedly say "move along!"
even though you were unable to move.)
2002-04-19 06:03:01 +00:00
nethack.rankin
197b4e706f grammar tidbit
From the newsgroup:  if the Candelabrum of Invocation already
has six candles attached and you apply another one to add the seventh,
the message said it "now has seven candle attached."
2002-04-19 05:50:02 +00:00
cohrs
91b2bab5d5 R804 - fix crash caused by looking at a unique boulder symbol
The code only handled the case where the boulder symbol was non-unique.
Add code to handle the case where the boulder sym is the first match.
2002-04-19 02:28:20 +00:00
nethack.rankin
f0aabe8460 discovery of enchant weapon scrolls
Eliminate or at least reduce one of the idiosyncratic differences
between enchant weapon and enchant armor:  make reading enchant weapon
discover that scroll if the effect is adequately discernible, instead
of always asking the player to supply a name for it.  If your weapon
is identified and its +/- enchantment value goes up, or you're wielding
a worm tooth and it transforms into a crysknife, you learn the scroll.
However for the negative effect of a cursed one, that's only applicable
when the scroll is already known to be cursed.
2002-04-18 02:26:09 +00:00
arromdee
97e393aa05 naga hatchlings growing up
This was reported on the newsgroup.
2002-04-17 00:12:02 +00:00
kmhugo
a7504f0c77 Grappling hook aiming
Characters skilled or better with a grappling hook have a chance of
aiming for an object, monster, or the floor.
2002-04-16 17:24:33 +00:00
cohrs
2490b10b65 pre-known Fake Amulet of Yendor
the change to xname to lazily reset known on objects after DRIN attacks,
need not change the FAoY.  the_unique_obj already handles this
2002-04-16 04:57:51 +00:00
kmhugo
31c824dbf3 digging rock vs. chopping wood
Refinement of the digging code:
* Picks should not chop down trees, but axes should.
* Picks should break walls, rock, statues, and boulders; axes shouldn't.
* Either picks or axes should chop down doors.
2002-04-16 01:37:57 +00:00
kmhugo
a15813a3cb tidbit
A nice little quote I saw in the newsgroup a while ago...
2002-04-15 19:25:18 +00:00
cohrs
27fb054937 polymorph engulfing monster display bit
- <Someone> reported that the swallowed display did not update immediately if
you managed to polymorph the monster that was engulfing you into another
engulfing monster
2002-04-15 15:33:44 +00:00
cohrs
6502474697 more prayer tuning
- Don't guarantee high results when you have high Luck, add Luck into
random param of rn1(), and just add 1 to the basis, keeping the guaranteed
fix of a single major trouble mentioned in the block comment
2002-04-15 14:56:39 +00:00
nethack.rankin
43e65726f7 shop credit fix
[ Fix a bug reported in the newsgroup; I thought I sent this last
  week, but it isn't in the current code so I must have forgotten. ]

     When I split u_left_shop() into two routines I neglected to
propagate the early return condition from the second half to the
first.  The result is that if you leave a shop with unpaid goods
but have enough credit there to cover the cost, the shopkeeper
will take that credit and be satisified, but the kops were still
getting summoned as if he had been robbed.
2002-04-15 10:52:20 +00:00
cohrs
d3078778eb waking waiting monsters after non-damaging attacks
- From a bug report, there are ways to, for example, steal items
from Medusa without waking her, by clever use of Conflict.
Avoid this by removing STRAT_WAITFORU when such an attack succeeds
- it was theoretically possible to use a similar approach to steal from a
STRAT_WAITFORU monster without it noticing while polymorphed and very fast,
so bulletproof this case as well.  Simpler because failed attacks wake too.
2002-04-15 07:00:00 +00:00
cohrs
86f961ba3f crash fix: shopkeeper re-entering shop
- when a shopkeeper leaves the shop to chase the player, and the player
enters the shop, bill_p is set to an unusual value.  bill_p needs to be set
back to a valid value if the shopkeeper re-enters the shop.
- Also, the u.ushops state needs to be updated when a shop becomes tended
again if the player is in the shop.
- introduce a new after_shk_move function to handle this
2002-04-15 06:43:55 +00:00
cohrs
b6be8e8af1 stale pickup_burden message in tty after
- tty interface left a stale prompt on the topl, clear it
2002-04-14 21:59:53 +00:00
cohrs
c850007966 trapped monsters
A suggestion from <Someone>
- since newsym marks physical traps that have a monster trapped as seen,
and the ^ command will tell you what it is, lookat() can tell you about the
trap too
2002-04-14 06:44:46 +00:00
cohrs
1a5f501758 R772.2 - potions of acid in pools
- mixing potions of acid and water result in an explosion, so water_damage
should cause a potion of acid to explode as well
2002-04-14 06:09:00 +00:00
cohrs
d3135ffe1c R778 - prayer bit
- need to use min() not max() for action choice when not on altar
2002-04-14 04:46:11 +00:00
arromdee
70ab0237e5 obsolete aggravation comment
Get rid of the obsolete comments about summon spells also aggravating.

The effect on balance of not aggravating is negligible, because nasty() already
wakes up most of the monsters it creates.
2002-04-14 03:55:30 +00:00
cohrs
9174a9030a remove prescient travel command behavior followup
- applied an intermediate version of the fix which had a bug in choosing
the intermediate location
2002-04-13 16:27:58 +00:00
cohrs
1b321e92bc remove prescient travel command behavior
Addresses reports R718, R772.1, <Someone> P's extra move bug
- when there is a previously seen path or a straight path, always take it
- incorporate fix to ensure no extra "." turn at the end of traveling, but
 still avoid stepping into traps/pools, et al
- include a general "G"-command (and travel) fix to avoid stepping in
 known pools/lava while blind
- when there is no such path, "guess" at a path by finding an intermediate
 location that the hero couldsee that is closest to the actual goal, the
 intermediate goal is re-determined at each step
- when Blind, don't use couldsee for determining straight paths, just direction
- do not consider doors or most boulders obstacles for picking travel
 paths, test_move has a new mode to differentiate this case from the regular
 test case
- don't include known trap locations in the travel path, avoids unnecessary
 stops along the way, and usually doesn't affect the path length
- reformatted the code a bit so I could follow it
2002-04-13 16:00:13 +00:00
nethack.allison
623182af63 ATR_BOLD on spell menu header 2002-04-11 14:05:33 +00:00
nethack.rankin
efbd396bf5 Wizard strategy
When the Wizard uses STRAT_MONSTR to get next to any monster
which is carrying the Amulet, he was actually displacing the other
monster to take its map location.  It was possible--and still is,
actually, although it takes a lot longer now--for the excessive
summoning by spell casting monsters to entirely fill up the temple
on the Sanctum level, so the Wizard would sometimes knock Moloch's
high priest right out of his temple.  And since that priest doesn't
turn hostile until you enter the temple, you might have needed to
kill a peaceful human in order to get the Amulet.

     Now when there's no elbow room in the temple, the Wizard will
stay outside instead of bumping the high priest out.
2002-04-11 02:24:15 +00:00
dean
36964ca72d When using TTY_GRAPHICS, correctly handle an unset TERM environment variable. 2002-04-10 22:30:15 +00:00
nethack.allison
7c386ab823 allow vengeance against nymphs except for specific case
From: "Ken Arromdee" :
> My point is that you should be allowed to take vengeance on thieving
> nymphs too.  The reasoning "a real knight wouldn't kill a nymph for stealing"
> doesn't make sense because the things a real knight would do instead (like
> arresting) aren't part of the game.

This is a compromise.  This doesn't allow vengeance when you were
told "you gladly hand over ...", but does for most other cases, and for
leprechauns.
2002-04-07 13:42:18 +00:00
nethack.allison
817bdf58e7 B/U/C Priest suggestion by Pat
- also a win32 dsp file modification
2002-04-07 12:51:28 +00:00
nethack.rankin
812b53799d multiple iron bars fixes
Can't push boulders through iron bars; traps can't roll such through either;
	likewise for objects thrown by monsters.
Thrown objects susceptible to breaking might do so when they hit iron bars.
Assorted monsters can pass through iron bars; ditto for polymorphed character.
Attempting to dig iron bars will wake nearby monsters instead of yielding
	"you swing your pick-axe through thin air".
Autodig won't accept iron bars as candidate location.
2002-04-07 10:43:59 +00:00
nethack.allison
b940ca0ee7 Priests recognize B/U/C status on items in container menus
<email deleted>
> Since Priests' knowledge of the buc-status of an object only
> kicks in when the name is being looked at for the first time,
> they get an "X" option when taking items out of a newly-looted
> container, but B, U, and C thereafter; could their ability be
> pre-applied to the container's contents when constructing the
> menu, to avoid this anomaly?
>
2002-04-06 18:06:59 +00:00
cohrs
268b70e4e3 R759 - delayed were change could cause crash
moveloop() sets a flag when a were/poly change should occur, but it
delays this change if the hero is Unchanging or cannot be interrupted (e.g.
praying).  However, by the time the change can be applied, the reason
may no longer be valid.  Reset the change indicator when this is the case.
Avoids possible strange polymorphs and were crashes.
2002-04-06 17:24:15 +00:00
nethack.rankin
dfb20853ee comment grammar tidbit
Noticed when sending the reply about the lregion type 5 bug report.
2002-04-06 04:41:32 +00:00
nethack.rankin
b6b550e1a2 fix "couldn't place lregion type 5"
Implement a fix for the problem From a bug report:
if the destination position on the Plane of Fire has a randomly
placed trap on it, you'd get an impossibility warning of "couldn't
place lregion type 5" (and then arrive successfully at the target
spot anyway).  As his investigation indicated, the code to remove
such traps wasn't being reached because the `bad_location' check
yields true for trapped spots.
2002-04-06 04:22:33 +00:00
arromdee
68310c7d79 monster spells (insects, nasties)
This throttles insect creation through monster spell casting.  Especially
insects.  It was creating m_lev worth of insects--for a 25th level priest,
that means every batch of insects was size 25!

I also lowered the range for nasties creation for similar reasons.
2002-04-06 04:00:04 +00:00
nethack.allison
69ee06a9bc Two new options
Add "travel" boolean option to enable/disable travel command.
Add "mouse_support" wincap option to enable/disable mouse.

- When running the win32 tty version full-screen, some people
complained about the square mouse cursor.

Newsgroups: rec.games.roguelike.nethack
Subject: Re: Getting rid of the cursor?
<email deleted> <email deleted>
Followup-To:

On Thu, 04 Apr 2002 00:20:06 <email deleted> wrote:
> Ok, let me be more specific: when playing the windows non-GUI version, is
> there a way to get rid of the large rectangular white cursor?
>
> <email deleted> wrote in message
> <email deleted>
>> Can you get rid of the cursor in the windows version?  I really hate that
>> thing.
>>

<email deleted>
>Newsgroups: rec.games.roguelike.nethack
>Subject: Disabling Mouse Input
>
>I purchased an older P120 laptop to be able to play Nethack at the hotel.
>I find that I rest my thumbs on the mouse touch pad all too often and my
>@ moves unexpectedly at times. I took a peruse through defaults.nh, but
>came up empty.
>
>Anyone know if mouse input can be disabled?
>
>MRSisson
2002-04-04 03:45:03 +00:00
cohrs
63262053ee another pass at preserving the Burdened message
- this is brute force, always update the status line each time you
insert something into a container.  If you look closely, you may still
see the Burdened message disappears momentarily doe to the many possible
messages between the freeinv() call and the point where the object is
actually put into the container.
2002-04-03 07:17:55 +00:00
arromdee
6e0678b4ac comment spacing tid 2002-04-03 06:56:35 +00:00
cohrs
6610d63f1d no wisdom bonus from random Elbereth engravings
- check !in_mklev before giving credit for engraving Elbereth
2002-04-02 17:13:35 +00:00
cohrs
5c1ea899bf ensure touch_artifact is always called via hold_another_object
- remove the touch_artifact calls just added
- put a check into hold_another_object itself, based on the complete check
removed from makewish
2002-04-02 05:32:02 +00:00
cohrs
e503714013 disappearing burdened message
- the "Burdened" message could disappear from the status line if it was
updated partway thru in_container, clearing the bot flags.  Re-order
message so it comes after add_to_container, as in 3.3.1.
2002-04-02 01:18:13 +00:00
cohrs
a74ae204cf striking ID followup part 2
- test WoStriking after activating statue, not before
2002-04-01 16:51:10 +00:00
cohrs
e5111e7587 striking ID followup
- only ID wand of striking, not spellbook of force bolt, seeing the spell
cast does not make the book known
2002-04-01 15:32:51 +00:00
cohrs
a0ba9d1421 R739 - dead migrating monster
- It was possible for hmon_hitmon to call mhurtle to move a monster into a
hole or other trap, causing it to migrate.  Then, hmon_hitmon would
subtract hp, and could mark the monster as dead.  Later, dmonsfree would
notice the monster wasn't on the level anymore, causing the impossible.
Avoid the problem by just not hurtling the monster if it's going to die.
It's possible it will get lifesaved after not hurtling.  Technically, if it
does die, the corpse should be hurtled, but won't be.
- treat jousting similarly
2002-04-01 07:03:44 +00:00
cohrs
31c4ccd43b R363 - can't drown breathless monsters
- if you're polymorphed into an eel, you were able to drown things like xorns
- also, fix the tombstone message when an eel drowns you, it was basing the
message on your location, not the eel's location
2002-04-01 05:33:32 +00:00
arromdee
08c463759c iron balls/teleds
Fixing some iron ball/teleds stuff:
-- If the player can pass through walls, ignore all checks for walls, or else
things will behave weirdly.
-- Instead of using the kludge "if the distance is >2 it must be a teleport",
pass a parameter indicating whether they crawled or teleported onto the new
space.  This fixes a special case, where the player moved one space and the
ball didn't move, but the chain moved through solid rock.  This is acceptable
if teleporting and unacceptable if dragging.
This also required some rearrangement of teleds() so that u.ux,u.uy
are set after placing the ball, not before.  I'm still not sure the pit
filling line is in the right place; anyone know?
-- add some comments so I can look at the code in a month and still know what
I did.
Most of this patch is just adding the new parameter.
2002-04-01 05:18:28 +00:00
cohrs
7c224da1e4 no sacrificing while swallowed 2002-04-01 01:37:26 +00:00
cohrs
9a5a051791 identifying a wand of striking when it activates a statue trap 2002-04-01 01:22:39 +00:00
cohrs
62519872b9 tripping over objects under water
- cannot trip over submerged objects when you're water walking
2002-04-01 00:57:22 +00:00
cohrs
587fe0b9e7 comment bit
- the dropx comment has been wrong for a while, time to accept that
2002-04-01 00:20:58 +00:00
cohrs
6519e5a127 comment bit
- the dropx comment has been wrong for a while, time to accept that
2002-04-01 00:04:45 +00:00
jwalz
11856d20b7 I recognize that this was an attempt to force the macro to act as a normal
statement that could be followed by ';' anywhere.  However, with the goto
there, my compiler complains every time it's used:
"ball.c", line 402: warning: statement not reached
"ball.c", line 434: warning: statement not reached
"ball.c", line 442: warning: statement not reached
"ball.c", line 449: warning: statement not reached
"ball.c", line 452: warning: statement not reached
"ball.c", line 457: warning: statement not reached
"ball.c", line 479: warning: statement not reached
"ball.c", line 498: warning: statement not reached
None of the current uses care about an excess statement, but is there a
way to satisfy both desires?
2002-03-31 22:42:07 +00:00