Commit Graph

138 Commits

Author SHA1 Message Date
nethack.allison
5ba1968c14 swap touchstone and flint
in the objects[] array to allow inclusion of touchstone
when wishing for gray stone.

The patch increments editlevel and invalidates bones
and save files.
2002-02-14 02:33:52 +00:00
kmhugo
38e91a320d Twoweapon update
Make two-weapon combat dependant on the hero's current form.
Adds the macro could_twoweap() and performs some housekeeping
in monst.c.
2002-02-13 17:31:07 +00:00
cohrs
c1a3682952 "The" Invocation items in farewell message followup
use and export the_unique_obj() for the test, to ensure consistency
2002-02-12 05:42:08 +00:00
nethack.allison
9748b45905 Allow BUC menu options when dealing with containers
not just when dropping. Alters the way the BUC patch
works, so that it uses getobj() callbacks.
2002-02-11 05:43:38 +00:00
arromdee
98dafd0839 comment tid 2002-02-09 07:42:06 +00:00
cohrs
cf37a7bac0 verb agreement
add and use new APIs, Tobjnam, otense and vtense, is_plural
to determine tense/form of verbs and a few pronouns as well
2002-02-09 00:16:35 +00:00
nethack.rankin
f750e2df4e fix B3032 -- wand of speed monster id
Make wands of speed or slow monster known if their effect
on monsters is observed; likewise for speed boots.  Also, avoid
giving odd "the bat is moving faster" when seeing a bat created
in gehennom and inaccurate "the monster is moving slower" when
a monster puts on speed boots.
2002-02-08 04:14:03 +00:00
nethack.allison
4b364d6927 modifying 'O' command behavour
I was asked how a window-port controls which options are
set to SET_IN_FILE, DISP_IN_GAME, or SET_IN_GAME.

This provides a run-time way to change an option's SET_IN_FILE,
DISP_IN_GAME, or SET_IN_GAME status through code, rather
than clog up options.c with a lot of compile-time #ifdefs
for different ports to offer different default option settings.
Update the documentation to reflect this.
2002-02-07 03:23:55 +00:00
nethack.allison
9d03c83d57 Use tabs for option menu separation if iflags.menu_tab_sep is set.
Simplifies some ports option menu displays.
2002-02-05 14:14:13 +00:00
nethack.allison
7d1e6f7d57 from Yitzhak
Add absent prototypes to some core routines.
Also add some port function() to function(void) in some win32 routines.
Also updates the Borland C Makefile for win32.
2002-02-05 13:21:43 +00:00
nethack.allison
06528d1002 3.3.2 to 3.4.0 2002-02-04 16:06:00 +00:00
nethack.allison
bd44ec4f65 wincap field updates
As Warwick suggested, instead of having fixed tile
sizes as options, allow specification of the size
explicitly.

Also, at Yitzhak's suggestion, provide a hook for
overriding the port's tile file name.  That name,
and the contents of the file it points to, will
be window-port specific of course.
2002-02-04 12:50:46 +00:00
nethack.allison
cb6a93641b Adjust window-port related option processing
to allow common parsing in the core, and direct access to the
results by the window port.

Notes:

o Adds a new field, wincap, to the window_procs
structure for setting bits related to the preference
features that the window port supports.  This allows
run-time determination of whether a particular option
setting is applicable to the running window port.  A
window-port is free to support as many, or as few,
of the available options as it wants.  Ensure that
only the ones supported have their corresponding bit
set in window_proc.wincap. [see chart in
doc/window.doc for help with that.]

o The settings I stuck into wincap for each window
port are almost certainly not accurate, so each port
team should review them.  You should only include
the ones that you will actually react to and make
adjustments for if the user changes that option.
Without the setting in wincap, the option won't even
show up in the 'O'ptions menu.

o preference_update() added to the window-port
interface, so that the window-port can be notified
if an option of interest (an option with its
corresponding bit set in wincap field) is
changed.

o provided a genl_preference_update() routine in
windows.c and used it for all the existing
window ports since they don't have a functional
one of their own yet.

o this messes around heavily with iflags and the options
arrays in options.c

o I hope I didn't break any port's existing code. I
tried not to.  The Mac however, in particular, should
be looked at because it suffered a namespace collision
with what I was working on around fontname.  It had
Mac specific font stuff in options.c. Please test
the Mac.
2002-02-03 05:31:47 +00:00
nethack.allison
51e3079709 <Someone>'s OS2 updates. 2002-02-02 19:46:18 +00:00
kmhugo
532242f07f Artifact prices
Each artifact has its own individual price, rather than being solely
based on the cost of its base item.
2002-02-02 19:21:33 +00:00
cohrs
bd56046f44 vortexes are not really alive
add vortexes to the set of nonliving() monsters
2002-02-02 03:50:53 +00:00
nethack.allison
39f24cda78 Fix "gems in apply menu" From a bug report. 2002-01-28 11:38:25 +00:00
cohrs
00cfa4a9f8 autodig chattiness
The autodig code still requires lots of interaction, because of all the
digging messages.  Make these messages behave more like boulder pushing
messages, where they only display if the previous move wasn't a push.
2002-01-27 23:45:47 +00:00
nethack.allison
ad2e81c296 Fixes:
- B1026  [confirmed] win32: setting multiple options
- bugfix: menu: set focus to the item and make it visible when it is
selected  with accelerator key.
- increased menu font size by 1 point
- layout the main window on WM_MOVE message so the menu windows stays with
the main window  (it was not changing the location before)
- got rid of WinCE specific define (ARM)
- handle all keyboard input via WM_KEYDOWN instead WM_CHAR

Files affected: config1.h mhmsg.h mhmain.c mhmenu.c mswproc.c resource.h
winhack.rc

Notes:
 That overrides Yitzhak's mhmenu patch - I don't like the menu prompt on the
title bar since it can be null and in most cases it is. It looks much better
as a header column in the list and is displayed only if present.

I moved ARM-related (processor) defines to wceconf.h  You cannot undef ARM
before windows.h is processed - ARM version won't compile.

.rc files are generated by IDE - you cannot edit them directly or your
changes will be gone next time the file is saved. If anything needs to be
added to winhack.rc file manually it has to be marked by the following
defines or via menu option View->Resource Includes:
#define APSTUDIO_READONLY_SYMBOLS
...
#undef APSTUDIO_READONLY_SYMBOLS
2002-01-27 23:28:02 +00:00
nethack.allison
8389fb1f29 >B1014 <Someone> [reported] change request - disclosure default
>
>	I'd like the default for "Would you like to see your <whatever>"
>	at the end of a game to be "y" instead of "n". I haven't asked
>	for full disclosure in order to have it skipped if I press the
>	space bar once too often by mistake.

This changes the way the flags.end_disclose array is used to
allow what this request is asking for.  It should be backward
compatible with previous "disclose" options.

The order that the end_disclore options are stored:
inventory, attribs, vanquished, genocided, conduct
There is an array in flags:
	end_disclose[NUM_DISCLOSURE_OPT];
with option settings for the each of the following:
iagvc [see disclosure_options in decl.c]:
Legal setting values in that array are:
	DISCLOSE_PROMPT_DEFAULT_YES  ask with default answer yes
	DISCLOSE_PROMPT_DEFAULT_NO   ask with default answer no
	DISCLOSE_YES_WITHOUT_PROMPT  always disclose and don't ask
	DISCLOSE_NO_WITHOUT_PROMPT   never disclose and don't ask

Those setting values can be used in the option
string as a prefix to each disclosure option
to get the desired behaviour for that option.

For backward compatibility, no prefix is actually required,
and the presence of a i,a,g,v, or c without a prefix sets
the corresponding value to DISCLOSE_YES_WITHOUT_PROMPT;

The actual prefixes used are controlled by the following in flag.h:
#define DISCLOSE_PROMPT_DEFAULT_YES	'y'
#define DISCLOSE_PROMPT_DEFAULT_NO	'n'
#define DISCLOSE_YES_WITHOUT_PROMPT	'+'
#define DISCLOSE_NO_WITHOUT_PROMPT	'-'

As far as the docs go, I don't know if I've got the *roff
stuff right.   The TeX stuff looks okay when I converted it to .pdf.

This increments EDITLEVEL.  If that is a problem, I can
add a routine to restore.c to perform a conversion of the old
values in flags. Let me know.
2002-01-27 01:26:59 +00:00
nethack.allison
69ce21fe0b Add a macro to provide universal consistency around the check
for what sort of creatures tend to revive.
2002-01-26 15:05:00 +00:00
cohrs
f73a1879c9 landmines and boulders
Make pushing a boulder onto a landmine share code with the trap case,
resulting in pits, waking sleepers, et al.
Don't leave a boulder suspended over the new pit, fill it.
Make sure any remaining boulder is placed on top of the pile.
If player sets off landmine, monsters killed are credited to/blamed on player.
2002-01-25 06:38:42 +00:00
warwick
654a297052 MacOSX/Qt system tweaks
These changes clean up build warnings and allow the resulting "NetHack"
Application icons to be dragged around freely in the Finder, as is expected
for Mac apps.
2002-01-24 05:49:04 +00:00
warwick
a89b941f5b MacOSX: no lrand48()
No lrand48() on MacOSX, since MacOSX is really BSD.
2002-01-23 02:26:02 +00:00
nethack.allison
2d5361e389 From <Someone>,
Fixes:
- menu shortcuts implemented
- most windows close on space (except for menus with
  PICK_ANY style)
- "hilite_pet" option is implemented
- map scrolling is improved somewhat (it now scrolls if
  the char is within 5 spaces from the edge of the map -
  configurable by #define CLIPAROUND_MARGIN)
- added 3  winhack-specific options:

 win32_map_mode:[tiles|ascii4x6|ascii6x8|ascii8x8
                 |ascii16x8|ascii7x12|ascii8x12|ascii15x12
                 |ascii12x16|ascii10x18|fit_to_screen]=20
 win32_align_status:[left|top|right|bottom]
 win32_align_message:[left|top|right|bottom]

Note: aligning status window to left or right edge of the screen does
not look good.
2002-01-22 00:30:58 +00:00
arromdee
166affb0f9 polymorphed quest leader
Duuuh.  Of course adding objects already changed the editlevel.

Anyway, here's the fix I was working on.  It only matters in a very obscure
situation.  (Also, the quest leader still speaks no matter what he's
polymorphed into.)
2002-01-21 22:15:22 +00:00
nethack.allison
f2fe0a3d5c The word "zorkmid" was hard-coded in format strings all
over the place.

Often they would use
	"%ld zorkmid%s", amt, plur(amt)
but not consistently, so some of the hard-coded usage
could result in "1 zorkmids"

This adds the function
	currency(long)
to return the name of the currency, either plural
or singular depending on the argument passed to it.
That eliminates the need for the extra %s in the
format string and the use of the plur() macro.
2002-01-21 03:35:04 +00:00
nethack.rankin
e2175c2ce1 stale spellbook pointer
If you get interrupted while reading a spellbook and then
the book gets destroyed or you change levels, the object pointer
remembered for the book will be invalid and could accidentally
match one subsequently allocated to some other book.  That would
result in "you continue your efforts to memorize the spell" when
starting to read that other book; it would also end up bypassing
the reading difficulty check and reuse the old book's delay counter.

     I don't remember who reported this.  It was quite some time
ago and I have an abandoned patch dated last March from when I
first started to fix it.

Files patched:
  include/extern.h
  src/save.c, shk.c, spell.c
2002-01-20 09:53:36 +00:00
nethack.rankin
36511f2280 compile fix 2002-01-20 09:22:16 +00:00
cohrs
e7bdcb157f lava effects for monsters and objects
This patch, based on code sent to us by <Someone> well over a year ago, addresses
bugs recently resurfaced.  Namely, that lava does not generally do anything
to monsters or objects that land in java.  Newly renamed minliquid() handles
both water and lava, and new fire_damage() is used similar to water_damage().
2002-01-20 07:04:18 +00:00
arromdee
bfbf1d6c30 monster spells
This fixes the problem with my monster spell changes which let monsters
summon monsters around you when they don't even know you're around.

The summoned monsters should appear where the monster thinks you are, if
you're invisible or displaced.

I have not prevented them from summoning monsters when you are in a temple,
nor have I prevented them from aggravating monsters several times when you're
out of sight.

Messages should be a little smarter, taking into account number of monsters
and invisibility/displacement.

--Ken A
2002-01-20 06:17:20 +00:00
kmhugo
bb88bd1a4a Jousting
Players wielding a lance while riding will "joust" monsters
they attack.

Note that monsters don't get pushed into inaccessable tiles such
as walls, doors, iron bars, water, or lava; they stay at the edge.
Further refinements are possible for these cases.
2002-01-20 05:44:46 +00:00
nethack.rankin
43a1eadc9c lookat of high priests
One from <Someone>'s list:  there's no particular reason for
the High Priest of Moloch in the temple on the sanctum level in
Gehennom to have his identity concealed when he's detected from
a distance.  I also changed the concealment of the Astral Plane
to stop when you're adjacent to the priest, since #chat--among
other things, such as simply entering the temple--provides other
means of identifying which temple it is once you're there.

Files patched:
  include/extern.h
  src/do_name.c, pager.c
2002-01-19 06:52:03 +00:00
warwick
0e46369056 Ignore generated files. 2002-01-18 02:50:06 +00:00
nethack.allison
82385ba4f7 Update patchlevel.h notes a bit 2002-01-17 12:56:26 +00:00
warwick
f86ab80cfb Changes work with Qt 3.0 (basically just use obsoleted QTableView class
until I get around to replacing it properly).
2002-01-17 04:10:23 +00:00
arromdee
f93521e95d wizard #poly and #levelgain
This adds the wizard #poly and #levelgain commands.
2002-01-17 02:47:23 +00:00
nethack.allison
2c26f0ceea Removed some unneeded preprocessor conditional code.
It was Windows CE stuff that hasn't been integrated into the sources tree yet.
2002-01-17 02:17:17 +00:00
arromdee
4361289ec3 BUC patch
This adds the BUC-patch, except that it includes four separate choices for
blessed/cursed/uncursed/unknown.  The patch only applies to full menu styles.

--Ken A

(Incidentally, I have a suggestion: when deciding what's the first line for
purposes of mailing out messages, use the first nonblank line...)
2002-01-16 03:19:45 +00:00
arromdee
4b6b5d7b8c This adds in <Someone>'s autodig patch. 2002-01-15 02:50:36 +00:00
nethack.allison
59b7cb4be4 Michael Allison wrote:
> There has been some feedback from others on the development team
> around the tiles:
>   "The Rogue Level should ideally be text-mode. It freaks out the
>    tiled-version-only players when they first get there, but that
>    makes it a good reminder of NetHack's roots."
>
> The other supported tiled ports work this way too.  They display
> regular ASCII characters on the Rogue level, just like Rogue did.

-Adds Rogue-level ascii support.
-Also removes unicode support.

Some other build script tweaks as well.

M. Allison
2002-01-14 12:36:09 +00:00
arromdee
b09c3e2e69 Fixing a buglist bug. Also changing an unrelated buglist item a bit (it was
mine to begin with, I thought I had a way to fix it but it turns out I didn't,
so I was researching it again).

Checked into CVS.
2002-01-13 20:37:18 +00:00
nethack.allison
e02ab47597 Changes to existing files by the win32 port additions. 2002-01-13 05:53:39 +00:00
nethack.allison
f64c0ac241 Since the touchstone uses objclass oc_color we need
to make that field unconditional, otherwise
NetHack won't compile without TEXTCOLOR defined.

Also provides at least an interim solution for the has_color()
problem that Warwick pointed out.

Lastly, Archeologists know touchstones.
2002-01-12 02:16:09 +00:00
warwick
df13e93d67 Adds to Qt windowport:
- "Saved game" dialog (could be useful in other ports - plain C code used)
   - "splash screen"
   - compact mode cleanup for 240x320 displays
   - messages-on-map overlay display
   - allows online reading of Guidebook in HTML format (coming soon)
2002-01-11 07:03:12 +00:00
arromdee
157840766d Finally overhauled some spell stuff. --Ken A.
Summary of spell changes:
-- wimpiness of 'default' spell fixed by doing half damage for magic resistance
instead of 1 damage, and using half monster level instead of 1/3.  It may
still need tweaking, but is much better than before.
-- 'default' spell for cleric monsters is now the wounds spell, by analogy with
wizard monsters.
-- added clerical lightning strike, flame strike, gush of water
-- all spells should now say the monster is casting a spell, and all spells
should have messages.  (Side effect: monsters speeding up by other means
also give a message saying so).
-- casting undirected spells is not affected by whether the monster knows
where you are.  Monsters that are attacking your displaced image, that are
several squares away, or that are peaceful can use undirected spells.
-- messages should correctly say whether the spell is undirected (a monster
was always casting at thin air or pointing at you and cursing, without checking
to see if the spell wouldn't require pointing)
-- Monsters which are attacking your displaced image, etc. use up mspec_used.
If they are casting an undirected spell, the spell still works.
-- Monsters which are not attacking can cast spells that don't attack.
-- If a monster didn't have ranged spellcasting ability (which most don't),
it would print a curse message from buzzmu() every round it was at range,
creating a useless stream of constant curse messages

I still haven't made spellcasters "smarter" in the sense of noticing whether
you have reflection, fire resistance, etc.  That opens a big can of worms
because it would mean giving monsters a memory.

Known bug: the higher level a monster is, the more spells it has; since it
chooses a noncombat spell by randomly picking a spell and casting if it
happens to be noncombat, the higher level the monster is the greater the
chance of getting nothing.
2002-01-11 01:09:07 +00:00
kmhugo
478555f1ee Macintosh updates
* Updated preprocessor conditionals for the MPW compilers.
* Use new system call names provided for in the latest Apple
  Universal Headers.
* Tune up some of the includes for CodeWarrior.
* Define YY_NEVER_INTERACTIVE for the dungeon and level compilers.
* Remove pointless debugging code.
2002-01-10 06:48:27 +00:00
nethack.allison
9b7d9f29b5 From a bug report: monsters hit by polymorph
magic while wearing dragon scales/scale mail were being turned
into random monsters instead of into dragons.

Also

Two items from <Someone>'s list.

Files patched:
  include/obj.h
  src/mon.c, muse.c, worn.c, zap.c
2002-01-09 13:10:13 +00:00
nethack.allison
767335698b <Someone>'s touchstone code and a bee swarm bit. 2002-01-09 03:31:30 +00:00
cohrs
c77073be31 sync changes since last snapshot 2002-01-07 02:12:04 +00:00