Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ NOTE: The following instructions require perl. If you do not have perl on
|
|||||||
A. If you have never set up git on this machine before:
|
A. If you have never set up git on this machine before:
|
||||||
(This assumes you will only be using git for NetHack. If you are going to
|
(This assumes you will only be using git for NetHack. If you are going to
|
||||||
use it for other projects as well, think before you type.)
|
use it for other projects as well, think before you type.)
|
||||||
Tell git what name (or nicname) and email address to use for you:
|
Tell git what name (or nickname) and email address to use for you:
|
||||||
git config --global user.name "MY NAME"
|
git config --global user.name "MY NAME"
|
||||||
git config --global user.email USER@EXAMPLE.COM
|
git config --global user.email USER@EXAMPLE.COM
|
||||||
You probably want to set up a credential cache.
|
You probably want to set up a credential cache.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Here's how to do it:
|
|||||||
- The example above will alert the users for a new feature
|
- The example above will alert the users for a new feature
|
||||||
added in 3.6.0 via a one-liner via pline(), but you
|
added in 3.6.0 via a one-liner via pline(), but you
|
||||||
could get more elaborate (just make sure it is all done
|
could get more elaborate (just make sure it is all done
|
||||||
in the 'if' code block..
|
in the 'if' code block.
|
||||||
|
|
||||||
Once the user finds the alert no longer useful, or becoming
|
Once the user finds the alert no longer useful, or becoming
|
||||||
annoying, they can set the "suppress_alert" option.
|
annoying, they can set the "suppress_alert" option.
|
||||||
@@ -75,7 +75,7 @@ There is a fqn_prefix[] entry for holding the path to each of the following:
|
|||||||
To recap, they are about enabling "different paths for different things", and
|
To recap, they are about enabling "different paths for different things", and
|
||||||
separation of:
|
separation of:
|
||||||
- read-only stuff from read-write stuff.
|
- read-only stuff from read-write stuff.
|
||||||
- sysadmin stuff from user-writeable stuff.
|
- sysadmin stuff from user-writable stuff.
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
==============================================
|
==============================================
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ declarations. Due to some incompatibilities, the patch is not publicly
|
|||||||
available and clang-format is not expected to be regularly used.
|
available and clang-format is not expected to be regularly used.
|
||||||
|
|
||||||
Developers should do their best to adhere to the coding style to promote
|
Developers should do their best to adhere to the coding style to promote
|
||||||
legibile, easy-to-edit code. Legibility is paramount, so in some cases, it may
|
legible, easy-to-edit code. Legibility is paramount, so in some cases, it may
|
||||||
be better not to fully adhere to the style guidelines.
|
be better not to fully adhere to the style guidelines.
|
||||||
|
|
||||||
Recipes for common text editors can be found at the end of this file.
|
Recipes for common text editors can be found at the end of this file.
|
||||||
@@ -30,7 +30,7 @@ characters, not tabs.
|
|||||||
Lines should be at most 78 characters wide. If a line would be longer than the
|
Lines should be at most 78 characters wide. If a line would be longer than the
|
||||||
limit, the line should be wrapped and the wrapped portion should be aligned
|
limit, the line should be wrapped and the wrapped portion should be aligned
|
||||||
with the parentheses or brackets containing the wrap. If there is no set of
|
with the parentheses or brackets containing the wrap. If there is no set of
|
||||||
parenthese or brackets, the line should be indented four spaces. Wrapping
|
parentheses or brackets, the line should be indented four spaces. Wrapping
|
||||||
should normally occur after a comma or before a binary operator, when
|
should normally occur after a comma or before a binary operator, when
|
||||||
possible:
|
possible:
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ possible:
|
|||||||
|
|
||||||
Single blank lines should be used wherever convenient to improve readability.
|
Single blank lines should be used wherever convenient to improve readability.
|
||||||
|
|
||||||
Functions and Control Satements
|
Functions and Control Statements
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
For a function definition, the return type, declarator, and opening brace
|
For a function definition, the return type, declarator, and opening brace
|
||||||
@@ -183,10 +183,10 @@ many entries that reproducing them here is impractical. Fortunately, the
|
|||||||
options are in plain English, so walking through them with a copy of
|
options are in plain English, so walking through them with a copy of
|
||||||
this Guide handy and making changes as required will suffice.
|
this Guide handy and making changes as required will suffice.
|
||||||
|
|
||||||
emacs Configuration
|
Emacs Configuration
|
||||||
===================
|
===================
|
||||||
|
|
||||||
There are no doubt umpteen different ways to handle this in emacs.
|
There are no doubt umpteen different ways to handle this in Emacs.
|
||||||
Putting the following in ~/.emacs.el is one
|
Putting the following in ~/.emacs.el is one
|
||||||
|
|
||||||
(defun hook-c ()
|
(defun hook-c ()
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ filing a bug report from our "Contact Us" web page at:
|
|||||||
https://www.nethack.org/common/contact.html or
|
https://www.nethack.org/common/contact.html or
|
||||||
http://www.nethack.org/common/contact.html
|
http://www.nethack.org/common/contact.html
|
||||||
Please include the version information from #version or the command line
|
Please include the version information from #version or the command line
|
||||||
option --version in the apropriate field.
|
option --version in the appropriate field.
|
||||||
|
|
||||||
A public repository of the latest NetHack code that we've made
|
A public repository of the latest NetHack code that we've made
|
||||||
available can be obtained via git here:
|
available can be obtained via git here:
|
||||||
|
|||||||
+43
-9
@@ -534,6 +534,7 @@ ooze
|
|||||||
kind had swept so evilly free of all litter.
|
kind had swept so evilly free of all litter.
|
||||||
[ At the Mountains of Madness, by H.P. Lovecraft ]
|
[ At the Mountains of Madness, by H.P. Lovecraft ]
|
||||||
blue jelly
|
blue jelly
|
||||||
|
spotted jelly
|
||||||
I'd planned how to prevent the lock from sealing behind me; it
|
I'd planned how to prevent the lock from sealing behind me; it
|
||||||
required a temporary sacrifice, not cleverness. I used the door
|
required a temporary sacrifice, not cleverness. I used the door
|
||||||
itself to help me cut off a portion of my body, after shunting all
|
itself to help me cut off a portion of my body, after shunting all
|
||||||
@@ -892,6 +893,20 @@ tiamat
|
|||||||
extremely vain.
|
extremely vain.
|
||||||
citrine*
|
citrine*
|
||||||
A pale yellow variety of crystalline quartz resembling topaz.
|
A pale yellow variety of crystalline quartz resembling topaz.
|
||||||
|
clay golem
|
||||||
|
It was a warm spring night when a fist knocked at the door so
|
||||||
|
hard that the hinges bent.
|
||||||
|
A man opened it and peered out into the street. There was
|
||||||
|
mist coming off the river and it was a cloudy night. He might
|
||||||
|
as well have tried to see through white velvet.
|
||||||
|
But he thought afterwards that there had been shapes out
|
||||||
|
there, just beyond the light spilling out into the road. A
|
||||||
|
lot of shapes, watching him carefully. He thought maybe
|
||||||
|
there'd been very faint points of light...
|
||||||
|
There was no mistaking the shape right in front of him,
|
||||||
|
though. It was big and dark red and looked like a child's
|
||||||
|
clay model of a man. Its eyes were two embers.
|
||||||
|
[ Feet of Clay, by Terry Pratchett ]
|
||||||
cleaver
|
cleaver
|
||||||
Hither came Conan, the Cimmerian, black-haired, sullen-eyed,
|
Hither came Conan, the Cimmerian, black-haired, sullen-eyed,
|
||||||
sword in hand, a thief, a reaver, a slayer, with gigantic
|
sword in hand, a thief, a reaver, a slayer, with gigantic
|
||||||
@@ -1994,6 +2009,7 @@ gold golem
|
|||||||
~gold golem
|
~gold golem
|
||||||
~straw golem
|
~straw golem
|
||||||
~wood golem
|
~wood golem
|
||||||
|
~clay golem
|
||||||
*golem
|
*golem
|
||||||
"The original story harks back, so they say, to the sixteenth
|
"The original story harks back, so they say, to the sixteenth
|
||||||
century. Using long-lost formulas from the Kabbala, a rabbi is
|
century. Using long-lost formulas from the Kabbala, a rabbi is
|
||||||
@@ -2305,7 +2321,8 @@ cornucopia
|
|||||||
And scatters corn and wine, and fruits and flowers.
|
And scatters corn and wine, and fruits and flowers.
|
||||||
[ Os Lusiadas, by Luis Vaz de Camoes ]
|
[ Os Lusiadas, by Luis Vaz de Camoes ]
|
||||||
horned devil
|
horned devil
|
||||||
Horned devils lack any real special abilities, though they
|
barbed devil
|
||||||
|
These devils lack any real special abilities, though they
|
||||||
are quite difficult to kill.
|
are quite difficult to kill.
|
||||||
~horsem*
|
~horsem*
|
||||||
*horse
|
*horse
|
||||||
@@ -4001,6 +4018,7 @@ pony
|
|||||||
continent and to and from our own world. The precise manner
|
continent and to and from our own world. The precise manner
|
||||||
of their working is a Management secret.
|
of their working is a Management secret.
|
||||||
[ The Tough Guide to Fantasyland, by Diana Wynne Jones ]
|
[ The Tough Guide to Fantasyland, by Diana Wynne Jones ]
|
||||||
|
trident
|
||||||
poseido*n
|
poseido*n
|
||||||
Poseido(o)n, lord of the seas and father of rivers and
|
Poseido(o)n, lord of the seas and father of rivers and
|
||||||
fountains, was the son of Chronos and Rhea, brother of Zeus,
|
fountains, was the son of Chronos and Rhea, brother of Zeus,
|
||||||
@@ -5152,6 +5170,7 @@ tripe ration
|
|||||||
often, alas, because the heat has not been kept low enough,
|
often, alas, because the heat has not been kept low enough,
|
||||||
it has the consistency of wet shoe leather.
|
it has the consistency of wet shoe leather.
|
||||||
[ Joy of Cooking, by I Rombauer and M Becker ]
|
[ Joy of Cooking, by I Rombauer and M Becker ]
|
||||||
|
~water troll
|
||||||
*troll
|
*troll
|
||||||
The troll shambled closer. He was perhaps eight feet tall,
|
The troll shambled closer. He was perhaps eight feet tall,
|
||||||
perhaps more. His forward stoop, with arms dangling past
|
perhaps more. His forward stoop, with arms dangling past
|
||||||
@@ -5420,6 +5439,21 @@ water demon
|
|||||||
and drink, I will enjoy eating you, the biggest monkey, most
|
and drink, I will enjoy eating you, the biggest monkey, most
|
||||||
of all!" He grinned, and saliva dripped down his hairy chin.
|
of all!" He grinned, and saliva dripped down his hairy chin.
|
||||||
[ Buddhist Tales for Young and Old, Vol. 1 ]
|
[ Buddhist Tales for Young and Old, Vol. 1 ]
|
||||||
|
water troll
|
||||||
|
It wasn't that the troll was _horrifying_. Instead of the
|
||||||
|
rotting, betentacled monstrosity he had been expecting
|
||||||
|
Rincewind found himself looking at a rather squat but not
|
||||||
|
particularly ugly old man who would quite easily have passed
|
||||||
|
for normal on any city street, always provided that other
|
||||||
|
people on the street were used to seeing old men who were
|
||||||
|
apparently composed of water and very little else. It was as
|
||||||
|
if the ocean had decided to create life without going through
|
||||||
|
all that tedious business of evolution, and had simply formed
|
||||||
|
a part of itself into a biped and sent it walking squishily up
|
||||||
|
the beach. The troll was a pleasant translucent blue color.
|
||||||
|
As Rincewind stared a small shoal of silver fish flashed
|
||||||
|
across its chest.
|
||||||
|
[ The Colour of Magic, by Terry Pratchett ]
|
||||||
weapon
|
weapon
|
||||||
A weapon is a device for making your enemy change his mind.
|
A weapon is a device for making your enemy change his mind.
|
||||||
[ The Vor Game, by Lois McMaster Bujold ]
|
[ The Vor Game, by Lois McMaster Bujold ]
|
||||||
@@ -5428,17 +5462,17 @@ web
|
|||||||
When first we practise to deceive!
|
When first we practise to deceive!
|
||||||
[ Marmion, by Sir Walter Scott ]
|
[ Marmion, by Sir Walter Scott ]
|
||||||
whistle
|
whistle
|
||||||
There were legends both on the front and on the back of the
|
There were legends both on the front and on the back of the
|
||||||
whistle. The one read thus:
|
whistle. The one read thus:
|
||||||
|
|
||||||
FLA FUR BIS FLE The other: QUIS EST ISTE QUI VENIT
|
FLA FUR BIS FLE The other: QUIS EST ISTE QUI VENIT
|
||||||
'I ought to be able to make it out,' he thought;
|
'I ought to be able to make it out,' he thought;
|
||||||
'but I suppose I am a little rusty in my Latin.
|
'but I suppose I am a little rusty in my Latin.
|
||||||
When I come to think of it, I don't believe I even
|
When I come to think of it, I don't believe I even
|
||||||
know the word for a whistle. The long one does seem
|
know the word for a whistle. The long one does seem
|
||||||
simple enough. It ought to mean, "Who is this who is coming?"
|
simple enough. It ought to mean, "Who is this who is coming?"
|
||||||
|
|
||||||
Well, the best way to find out is evidently to whistle
|
Well, the best way to find out is evidently to whistle
|
||||||
for him.'
|
for him.'
|
||||||
|
|
||||||
[Ghost Stories of an Antiquary, by Montague Rhodes James
|
[Ghost Stories of an Antiquary, by Montague Rhodes James
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ M-2 twoweapon toggle two-weapon combat (unless number_pad is enabled)
|
|||||||
M-a adjust adjust inventory letters
|
M-a adjust adjust inventory letters
|
||||||
M-A annotate add a one-line note to the current dungeon level (see M-O)
|
M-A annotate add a one-line note to the current dungeon level (see M-O)
|
||||||
M-c chat talk to someone
|
M-c chat talk to someone
|
||||||
M-C conduct view optional challanges
|
M-C conduct view optional challenges
|
||||||
M-d dip dip an object into something
|
M-d dip dip an object into something
|
||||||
M-e enhance advance or check weapon and spell skills
|
M-e enhance advance or check weapon and spell skills
|
||||||
M-f force force a lock
|
M-f force force a lock
|
||||||
|
|||||||
+2
-2
@@ -104,7 +104,7 @@ preload_tiles control whether tiles get pre-loaded into RAM at [TRUE]
|
|||||||
of the tile graphics, but uses more memory.
|
of the tile graphics, but uses more memory.
|
||||||
|
|
||||||
Boolean option if TTY_TILES_ESCCODES was set at compile time (tty only):
|
Boolean option if TTY_TILES_ESCCODES was set at compile time (tty only):
|
||||||
vt_tiledata insert extra data escae code markers into output [FALSE]
|
vt_tiledata insert extra data escape code markers into output [FALSE]
|
||||||
|
|
||||||
Any Boolean option can be negated by prefixing it with a '!' or 'no'.
|
Any Boolean option can be negated by prefixing it with a '!' or 'no'.
|
||||||
|
|
||||||
@@ -159,7 +159,7 @@ paranoid_confirmation space separated list [paranoid_confirmation:pray]
|
|||||||
pray -- y to confirm an attempt to pray; on by default
|
pray -- y to confirm an attempt to pray; on by default
|
||||||
Remove -- always pick from inventory for 'R' and 'T' even when
|
Remove -- always pick from inventory for 'R' and 'T' even when
|
||||||
wearing just one applicable item to remove or take off
|
wearing just one applicable item to remove or take off
|
||||||
pickup_burden when you pick up an item that exceeds this encumberance [S]
|
pickup_burden when you pick up an item that exceeds this encumbrance [S]
|
||||||
level (Unencumbered, Burdened, streSsed, straiNed, overTaxed,
|
level (Unencumbered, Burdened, streSsed, straiNed, overTaxed,
|
||||||
or overLoaded), you will be asked if you want to continue.
|
or overLoaded), you will be asked if you want to continue.
|
||||||
pickup_types a list of default symbols for kinds of objects to []
|
pickup_types a list of default symbols for kinds of objects to []
|
||||||
|
|||||||
+4
-4
@@ -1668,7 +1668,7 @@ to %ns lair. If you can manage to defeat %n and return
|
|||||||
undead that befoul the land.
|
undead that befoul the land.
|
||||||
|
|
||||||
"Go with %d as your guide, %p."
|
"Go with %d as your guide, %p."
|
||||||
%E [%nC invaded %H and captured %o. Defeat %ni and retrive %oh.]
|
%E [%nC invaded %H and captured %o. Defeat %ni and retrieve %oh.]
|
||||||
%Cp Pri 00025
|
%Cp Pri 00025
|
||||||
"You can prevail, if you rely on %d."
|
"You can prevail, if you rely on %d."
|
||||||
%E
|
%E
|
||||||
@@ -2056,7 +2056,7 @@ the Amulet."
|
|||||||
%E [You have succeeded. Take %o with you as you go to find the Amulet.]
|
%E [You have succeeded. Take %o with you as you go to find the Amulet.]
|
||||||
# assumes The Longbow of Diana
|
# assumes The Longbow of Diana
|
||||||
%Cc Ran 00082
|
%Cc Ran 00082
|
||||||
%l flexs %o reverently.
|
%l flexes %o reverently.
|
||||||
|
|
||||||
"With this wondrous bow, one need never run out of arrows.
|
"With this wondrous bow, one need never run out of arrows.
|
||||||
You are its keeper now, and the time has come to resume your
|
You are its keeper now, and the time has come to resume your
|
||||||
@@ -2707,7 +2707,7 @@ and you may be able to defeat him."
|
|||||||
"If you are %a at all times you may succeed, %p."
|
"If you are %a at all times you may succeed, %p."
|
||||||
%E
|
%E
|
||||||
%Cp Tou 00034
|
%Cp Tou 00034
|
||||||
"Let all who meet you on your journey know that you are on an quest for
|
"Let all who meet you on your journey know that you are on a quest for
|
||||||
%l and grant safe passage."
|
%l and grant safe passage."
|
||||||
%E
|
%E
|
||||||
%Cc Tou 00035
|
%Cc Tou 00035
|
||||||
@@ -2967,7 +2967,7 @@ The ice and snow gives way to a valley floor. You %x ahead of you
|
|||||||
a huge round hill surrounded by pools of lava. This then is the entrance
|
a huge round hill surrounded by pools of lava. This then is the entrance
|
||||||
to %i. It looks like you're not going to get in without
|
to %i. It looks like you're not going to get in without
|
||||||
a fight though.
|
a fight though.
|
||||||
%E [This is the entrace to %i.]
|
%E [This is the entrance to %i.]
|
||||||
%Cp Val 00036
|
%Cp Val 00036
|
||||||
Once again, you stand before the entrance to %i.
|
Once again, you stand before the entrance to %i.
|
||||||
%E
|
%E
|
||||||
|
|||||||
+8
-9
@@ -54,7 +54,7 @@
|
|||||||
.in -\\n(PYu \" undo indent past label (etc)
|
.in -\\n(PYu \" undo indent past label (etc)
|
||||||
.sn \\n(pdu \" tmac.n: inter-paragraph space
|
.sn \\n(pdu \" tmac.n: inter-paragraph space
|
||||||
..
|
..
|
||||||
.\" end of labeled paragrah
|
.\" end of labeled paragraph
|
||||||
.\"
|
.\"
|
||||||
.\" aligned single character key with SHORT definition (if it overflows one
|
.\" aligned single character key with SHORT definition (if it overflows one
|
||||||
.\" line, all bets are off)
|
.\" line, all bets are off)
|
||||||
@@ -1583,7 +1583,7 @@ debt or credit, if any. The `Iu' command lists unpaid items
|
|||||||
The `Ix' command shows an inventory-like display of any unpaid
|
The `Ix' command shows an inventory-like display of any unpaid
|
||||||
items which have been used up, along with other shop fees, if any.
|
items which have been used up, along with other shop fees, if any.
|
||||||
.hn 3
|
.hn 3
|
||||||
Shop idiosyncracies
|
Shop idiosyncrasies
|
||||||
.pg
|
.pg
|
||||||
Several aspects of shop behavior might be unexpected.
|
Several aspects of shop behavior might be unexpected.
|
||||||
.\" note: using * instead of \(bu is better for plain text output
|
.\" note: using * instead of \(bu is better for plain text output
|
||||||
@@ -2463,19 +2463,19 @@ defaults to the location of the NetHack.exe or NetHackw.exe file
|
|||||||
so setting HACKDIR to override that is not usually necessary or recommended.
|
so setting HACKDIR to override that is not usually necessary or recommended.
|
||||||
.lp LEVELDIR
|
.lp LEVELDIR
|
||||||
The location that in-progress level files are stored. Defaults to HACKDIR,
|
The location that in-progress level files are stored. Defaults to HACKDIR,
|
||||||
must be writeable.
|
must be writable.
|
||||||
.lp SAVEDIR
|
.lp SAVEDIR
|
||||||
The location where saved games are kept. Defaults to HACKDIR, must be
|
The location where saved games are kept. Defaults to HACKDIR, must be
|
||||||
writeable.
|
writable.
|
||||||
.lp BONESDIR
|
.lp BONESDIR
|
||||||
The location that bones files are kept. Defaults to HACKDIR, must be
|
The location that bones files are kept. Defaults to HACKDIR, must be
|
||||||
writeable.
|
writable.
|
||||||
.lp LOCKDIR
|
.lp LOCKDIR
|
||||||
The location that file synchronization locks are stored. Defaults to
|
The location that file synchronization locks are stored. Defaults to
|
||||||
HACKDIR, must be writeable.
|
HACKDIR, must be writable.
|
||||||
.lp TROUBLEDIR
|
.lp TROUBLEDIR
|
||||||
The location that a record of game aborts and self-diagnosed game problems
|
The location that a record of game aborts and self-diagnosed game problems
|
||||||
is kept. Defaults to HACKDIR, must be writeable.
|
is kept. Defaults to HACKDIR, must be writable.
|
||||||
.lp AUTOCOMPLETE
|
.lp AUTOCOMPLETE
|
||||||
Enable or disable an extended command autocompletion.
|
Enable or disable an extended command autocompletion.
|
||||||
Autocompletion has no effect for the X11 windowport.
|
Autocompletion has no effect for the X11 windowport.
|
||||||
@@ -3004,7 +3004,6 @@ such as ``paranoid_confirmation:attack pray Remove''.
|
|||||||
.lp perm_invent
|
.lp perm_invent
|
||||||
If true, always display your current inventory in a window. This only
|
If true, always display your current inventory in a window. This only
|
||||||
makes sense for windowing system interfaces that implement this feature.
|
makes sense for windowing system interfaces that implement this feature.
|
||||||
Persistent.
|
|
||||||
.lp pettype
|
.lp pettype
|
||||||
Specify the type of your initial pet, if you are playing a character class
|
Specify the type of your initial pet, if you are playing a character class
|
||||||
that uses multiple types of pets; or choose to have no initial pet at all.
|
that uses multiple types of pets; or choose to have no initial pet at all.
|
||||||
@@ -4018,7 +4017,7 @@ m S_mimic (mimic)
|
|||||||
] S_mimic_def (mimic)
|
] S_mimic_def (mimic)
|
||||||
M S_mummy (mummy)
|
M S_mummy (mummy)
|
||||||
N S_naga (naga)
|
N S_naga (naga)
|
||||||
\. S_ndoor (doorway witout door)
|
\. S_ndoor (doorway without door)
|
||||||
n S_nymph (nymph)
|
n S_nymph (nymph)
|
||||||
O S_ogre (ogre)
|
O S_ogre (ogre)
|
||||||
o S_orc (orc)
|
o S_orc (orc)
|
||||||
|
|||||||
+7
-8
@@ -1452,7 +1452,7 @@ be automatically turned off.
|
|||||||
\item[\tb{\#untrap}]
|
\item[\tb{\#untrap}]
|
||||||
Untrap something (trap, door, or chest). Default key is '{\tt M-u}', and '{\tt u}' if {\it number\verb+_+pad\/} is on.
|
Untrap something (trap, door, or chest). Default key is '{\tt M-u}', and '{\tt u}' if {\it number\verb+_+pad\/} is on.
|
||||||
%.lp ""
|
%.lp ""
|
||||||
In some circumstancs it can also be used to rescue trapped monsters.
|
In some circumstances it can also be used to rescue trapped monsters.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\tb{\#up}]
|
\item[\tb{\#up}]
|
||||||
Go up a staircase. Default key is '{\tt <}'.
|
Go up a staircase. Default key is '{\tt <}'.
|
||||||
@@ -1830,7 +1830,7 @@ The {\tt Ix} command shows an inventory-like display of any unpaid
|
|||||||
items which have been used up, along with other shop fees, if any.
|
items which have been used up, along with other shop fees, if any.
|
||||||
|
|
||||||
%.hn 3
|
%.hn 3
|
||||||
\subsubsection*{Shop idiosyncracies}
|
\subsubsection*{Shop idiosyncrasies}
|
||||||
|
|
||||||
%.pg
|
%.pg
|
||||||
Several aspects of shop behavior might be unexpected.
|
Several aspects of shop behavior might be unexpected.
|
||||||
@@ -2848,23 +2848,23 @@ so setting HACKDIR to override that is not usually necessary or recommended.
|
|||||||
%.lp
|
%.lp
|
||||||
\item[\bb{LEVELDIR}]
|
\item[\bb{LEVELDIR}]
|
||||||
The location that in-progress level files are stored. Defaults to HACKDIR,
|
The location that in-progress level files are stored. Defaults to HACKDIR,
|
||||||
must be writeable.
|
must be writable.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\bb{SAVEDIR}]
|
\item[\bb{SAVEDIR}]
|
||||||
The location where saved games are kept. Defaults to HACKDIR, must be
|
The location where saved games are kept. Defaults to HACKDIR, must be
|
||||||
writeable.
|
writable.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\bb{BONESDIR}]
|
\item[\bb{BONESDIR}]
|
||||||
The location that bones files are kept. Defaults to HACKDIR, must be
|
The location that bones files are kept. Defaults to HACKDIR, must be
|
||||||
writeable.
|
writable.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\bb{LOCKDIR}]
|
\item[\bb{LOCKDIR}]
|
||||||
The location that file synchronization locks are stored. Defaults to
|
The location that file synchronization locks are stored. Defaults to
|
||||||
HACKDIR, must be writeable.
|
HACKDIR, must be writable.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\bb{TROUBLEDIR}]
|
\item[\bb{TROUBLEDIR}]
|
||||||
The location that a record of game aborts and self-diagnosed game problems
|
The location that a record of game aborts and self-diagnosed game problems
|
||||||
is kept. Defaults to HACKDIR, must be writeable.
|
is kept. Defaults to HACKDIR, must be writable.
|
||||||
%.lp
|
%.lp
|
||||||
\item[\bb{AUTOCOMPLETE}]
|
\item[\bb{AUTOCOMPLETE}]
|
||||||
Enable or disable an extended command autocompletion.
|
Enable or disable an extended command autocompletion.
|
||||||
@@ -3501,7 +3501,6 @@ such as ``{\it par\-a\-noid\verb+_+con\-fir\-ma\-tion:attack~pray~Remove}''.
|
|||||||
\item[\ib{perm\verb+_+invent}]
|
\item[\ib{perm\verb+_+invent}]
|
||||||
If true, always display your current inventory in a window. This only
|
If true, always display your current inventory in a window. This only
|
||||||
makes sense for windowing system interfaces that implement this feature.
|
makes sense for windowing system interfaces that implement this feature.
|
||||||
Persistent.
|
|
||||||
%.lp
|
%.lp
|
||||||
\item[\ib{pettype}]
|
\item[\ib{pettype}]
|
||||||
Specify the type of your initial pet, if you are playing a character class
|
Specify the type of your initial pet, if you are playing a character class
|
||||||
|
|||||||
+7
-7
@@ -1926,7 +1926,7 @@
|
|||||||
any unpaid items which have been used up, along with other shop
|
any unpaid items which have been used up, along with other shop
|
||||||
fees, if any.
|
fees, if any.
|
||||||
|
|
||||||
5.4.1. Shop idiosyncracies
|
5.4.1. Shop idiosyncrasies
|
||||||
|
|
||||||
Several aspects of shop behavior might be unexpected.
|
Several aspects of shop behavior might be unexpected.
|
||||||
|
|
||||||
@@ -3015,19 +3015,19 @@
|
|||||||
|
|
||||||
LEVELDIR
|
LEVELDIR
|
||||||
The location that in-progress level files are stored. Defaults
|
The location that in-progress level files are stored. Defaults
|
||||||
to HACKDIR, must be writeable.
|
to HACKDIR, must be writable.
|
||||||
|
|
||||||
SAVEDIR
|
SAVEDIR
|
||||||
The location where saved games are kept. Defaults to HACKDIR,
|
The location where saved games are kept. Defaults to HACKDIR,
|
||||||
must be writeable.
|
must be writable.
|
||||||
|
|
||||||
BONESDIR
|
BONESDIR
|
||||||
The location that bones files are kept. Defaults to HACKDIR,
|
The location that bones files are kept. Defaults to HACKDIR,
|
||||||
must be writeable.
|
must be writable.
|
||||||
|
|
||||||
LOCKDIR
|
LOCKDIR
|
||||||
The location that file synchronization locks are stored.
|
The location that file synchronization locks are stored.
|
||||||
Defaults to HACKDIR, must be writeable.
|
Defaults to HACKDIR, must be writable.
|
||||||
|
|
||||||
|
|
||||||
NetHack 3.6 May 27, 2018
|
NetHack 3.6 May 27, 2018
|
||||||
@@ -3042,7 +3042,7 @@
|
|||||||
|
|
||||||
TROUBLEDIR
|
TROUBLEDIR
|
||||||
The location that a record of game aborts and self-diagnosed
|
The location that a record of game aborts and self-diagnosed
|
||||||
game problems is kept. Defaults to HACKDIR, must be writeable.
|
game problems is kept. Defaults to HACKDIR, must be writable.
|
||||||
|
|
||||||
AUTOCOMPLETE
|
AUTOCOMPLETE
|
||||||
Enable or disable an extended command autocompletion. Autocom-
|
Enable or disable an extended command autocompletion. Autocom-
|
||||||
@@ -5043,7 +5043,7 @@
|
|||||||
] S_mimic_def (mimic)
|
] S_mimic_def (mimic)
|
||||||
M S_mummy (mummy)
|
M S_mummy (mummy)
|
||||||
N S_naga (naga)
|
N S_naga (naga)
|
||||||
. S_ndoor (doorway witout door)
|
. S_ndoor (doorway without door)
|
||||||
n S_nymph (nymph)
|
n S_nymph (nymph)
|
||||||
O S_ogre (ogre)
|
O S_ogre (ogre)
|
||||||
o S_orc (orc)
|
o S_orc (orc)
|
||||||
|
|||||||
+5
-5
@@ -398,21 +398,21 @@
|
|||||||
#HACKDIR=c:\games\nethack
|
#HACKDIR=c:\games\nethack
|
||||||
|
|
||||||
# The location that level files in progress are stored
|
# The location that level files in progress are stored
|
||||||
# (default=HACKDIR, writeable)
|
# (default=HACKDIR, writable)
|
||||||
#LEVELDIR=c:\nethack\levels
|
#LEVELDIR=c:\nethack\levels
|
||||||
|
|
||||||
# The location where saved games are kept (default=HACKDIR, writeable)
|
# The location where saved games are kept (default=HACKDIR, writable)
|
||||||
#SAVEDIR=c:\nethack\save
|
#SAVEDIR=c:\nethack\save
|
||||||
|
|
||||||
# The location that bones files are kept (default=HACKDIR, writeable)
|
# The location that bones files are kept (default=HACKDIR, writable)
|
||||||
#BONESDIR=c:\nethack\save
|
#BONESDIR=c:\nethack\save
|
||||||
|
|
||||||
# The location that file synchronization locks are stored
|
# The location that file synchronization locks are stored
|
||||||
# (default=HACKDIR, writeable)
|
# (default=HACKDIR, writable)
|
||||||
#LOCKDIR=c:\nethack\levels
|
#LOCKDIR=c:\nethack\levels
|
||||||
|
|
||||||
# The location that a record of game aborts and self-diagnosed game problems
|
# The location that a record of game aborts and self-diagnosed game problems
|
||||||
# is kept (default=HACKDIR, writeable)
|
# is kept (default=HACKDIR, writable)
|
||||||
#TROUBLEDIR=c:\nethack\trouble
|
#TROUBLEDIR=c:\nethack\trouble
|
||||||
|
|
||||||
# Finnish keyboards might need these modifications uncommented. Windows GUI.
|
# Finnish keyboards might need these modifications uncommented. Windows GUI.
|
||||||
|
|||||||
@@ -117,6 +117,17 @@ for hilite_status of string status fields (title, dungeon-level, alignment),
|
|||||||
jumping into or over a Sokoban pit, or over a fire trap, triggers trap twice
|
jumping into or over a Sokoban pit, or over a fire trap, triggers trap twice
|
||||||
mimics created by #wizgenesis could block or not block vision incorrectly
|
mimics created by #wizgenesis could block or not block vision incorrectly
|
||||||
handle monsters inside the invocation area
|
handle monsters inside the invocation area
|
||||||
|
give monsters who have had a worn item stolen or who have been life-saved
|
||||||
|
(used up amulet) a chance to wear replacement gear on next move
|
||||||
|
instead of having to wait until they pick something up
|
||||||
|
Unchanging hero in clay golem form will be killed when cancelled
|
||||||
|
poly'd shapechanger and hiding mimic will revert to normal when cancelled,
|
||||||
|
like werecreature in beast form and non-Unchanging hero
|
||||||
|
cancelled shapeshifter is no longer able to change shape
|
||||||
|
cancelled shapeshifter hit by polymorph magic will become uncancelled
|
||||||
|
polymorph zap which creates a new long worm (or retains an old one via wizard
|
||||||
|
mode monpolycontrol) can hit that worm multiple times (tail segments)
|
||||||
|
wishing for "orange" could yield orange or orange colored gem/potion/spellbook
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||||
@@ -133,6 +144,8 @@ tty: ensure that current status fields are always copied to prior status
|
|||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
move 'perm_invent' value from flags to iflags to keep it out of save files;
|
||||||
|
affects X11, win32, and curses
|
||||||
windows-gui: In nethackw, there could be conflicts between menu accelerators
|
windows-gui: In nethackw, there could be conflicts between menu accelerators
|
||||||
and an extra choice accelerator to fix H7132.
|
and an extra choice accelerator to fix H7132.
|
||||||
windows-gui: recognize new BL_RESET in status_update; no change in behavior yet
|
windows-gui: recognize new BL_RESET in status_update; no change in behavior yet
|
||||||
@@ -185,6 +198,7 @@ wizard mode #wizidentify can now select individual items for permanent
|
|||||||
identification and don't display the selection to permanently
|
identification and don't display the selection to permanently
|
||||||
identify everything if everything is already fully identified
|
identify everything if everything is already fully identified
|
||||||
spiders will occasionally spin webs when moving around
|
spiders will occasionally spin webs when moving around
|
||||||
|
make mine town "orctown" variation a multiple level feature of the mines
|
||||||
|
|
||||||
|
|
||||||
Code Cleanup and Reorganization
|
Code Cleanup and Reorganization
|
||||||
|
|||||||
+1
-1
@@ -93,7 +93,7 @@ To win the game (as opposed to merely playing to beat other people's high
|
|||||||
scores) you must locate the Amulet of Yendor which is somewhere below
|
scores) you must locate the Amulet of Yendor which is somewhere below
|
||||||
the 20th level of the dungeon and get it out.
|
the 20th level of the dungeon and get it out.
|
||||||
Few people achieve this; most never do. Those who have go down
|
Few people achieve this; most never do. Those who have go down
|
||||||
in history as heros among heroes - and then they find ways of making the
|
in history as heroes among heroes - and then they find ways of making the
|
||||||
game even harder. See the
|
game even harder. See the
|
||||||
.I Guidebook
|
.I Guidebook
|
||||||
section on Conduct if this game has gotten too easy for you.
|
section on Conduct if this game has gotten too easy for you.
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ DESCRIPTION
|
|||||||
To win the game (as opposed to merely playing to beat other people's
|
To win the game (as opposed to merely playing to beat other people's
|
||||||
high scores) you must locate the Amulet of Yendor which is somewhere
|
high scores) you must locate the Amulet of Yendor which is somewhere
|
||||||
below the 20th level of the dungeon and get it out. Few people achieve
|
below the 20th level of the dungeon and get it out. Few people achieve
|
||||||
this; most never do. Those who have go down in history as heros among
|
this; most never do. Those who have go down in history as heroes among
|
||||||
heroes - and then they find ways of making the game even harder. See
|
heroes - and then they find ways of making the game even harder. See
|
||||||
the Guidebook section on Conduct if this game has gotten too easy for
|
the Guidebook section on Conduct if this game has gotten too easy for
|
||||||
you.
|
you.
|
||||||
|
|||||||
+6
-6
@@ -177,7 +177,7 @@ int nhgetch() -- Returns a single character input from the user.
|
|||||||
changed and also return ASCII 033 in this case.
|
changed and also return ASCII 033 in this case.
|
||||||
int nh_poskey(int *x, int *y, int *mod)
|
int nh_poskey(int *x, int *y, int *mod)
|
||||||
-- Returns a single character input from the user or a
|
-- Returns a single character input from the user or a
|
||||||
a positioning event (perhaps from a mouse). If the
|
positioning event (perhaps from a mouse). If the
|
||||||
return value is non-zero, a character was typed, else,
|
return value is non-zero, a character was typed, else,
|
||||||
a position in the MAP window is returned in x, y and mod.
|
a position in the MAP window is returned in x, y and mod.
|
||||||
mod may be one of
|
mod may be one of
|
||||||
@@ -334,7 +334,7 @@ add_menu(windid window, int glyph, const anything identifier,
|
|||||||
outside of the standard accelerator (see above) or a
|
outside of the standard accelerator (see above) or a
|
||||||
number. If 0, the item is unaffected by any group
|
number. If 0, the item is unaffected by any group
|
||||||
accelerator. If this accelerator conflicts with
|
accelerator. If this accelerator conflicts with
|
||||||
the menu command (or their user defined alises), it loses.
|
the menu command (or their user defined aliases), it loses.
|
||||||
The menu commands and aliases take care not to interfere
|
The menu commands and aliases take care not to interfere
|
||||||
with the default object class symbols.
|
with the default object class symbols.
|
||||||
-- If you want this choice to be preselected when the
|
-- If you want this choice to be preselected when the
|
||||||
@@ -461,7 +461,7 @@ status_update(int fldindex, genericptr_t ptr, int chg, int percentage, int color
|
|||||||
|
|
||||||
For the user's chosen set of BL_MASK_ condition bits,
|
For the user's chosen set of BL_MASK_ condition bits,
|
||||||
They are stored internally in the cond_hilites[] array,
|
They are stored internally in the cond_hilites[] array,
|
||||||
at the array offset aligned to the color those condtion
|
at the array offset aligned to the color those condition
|
||||||
bits should display in.
|
bits should display in.
|
||||||
|
|
||||||
For example, if the user has chosen to display strngl
|
For example, if the user has chosen to display strngl
|
||||||
@@ -602,7 +602,7 @@ getmsghistory(init)
|
|||||||
If init is TRUE, start over again from most recent message.
|
If init is TRUE, start over again from most recent message.
|
||||||
|
|
||||||
putmsghistory(msg)
|
putmsghistory(msg)
|
||||||
-- The is the counterpart to getmsghistory() for restores
|
-- This is the counterpart to getmsghistory() for restores
|
||||||
used to reload the port's message recall buffer.
|
used to reload the port's message recall buffer.
|
||||||
The routine is called repeatedly from the core restore
|
The routine is called repeatedly from the core restore
|
||||||
routine, starting with the oldest message first, and
|
routine, starting with the oldest message first, and
|
||||||
@@ -693,7 +693,7 @@ when processing options, either in the config file, or by the 'O' command.
|
|||||||
|
|
||||||
You may be wondering what values your window port will find in the
|
You may be wondering what values your window port will find in the
|
||||||
iflags.wc_* and iflags.wc2_* fields for options that the user has not
|
iflags.wc_* and iflags.wc2_* fields for options that the user has not
|
||||||
specified in his/her config file. Put another way, how does you port code
|
specified in his/her config file. Put another way, how does your port code
|
||||||
tell if an option has not been set? The next paragraph explains that.
|
tell if an option has not been set? The next paragraph explains that.
|
||||||
|
|
||||||
If the core does not set an option, it will still be initialized
|
If the core does not set an option, it will still be initialized
|
||||||
@@ -1068,7 +1068,7 @@ When writing a new window-port, you need to follow the following guidelines:
|
|||||||
WINOBJ (if you want the NetHack binary to include them, that is).
|
WINOBJ (if you want the NetHack binary to include them, that is).
|
||||||
|
|
||||||
9) Look at your port's portmain.c (the file containing main()) and make
|
9) Look at your port's portmain.c (the file containing main()) and make
|
||||||
sure that all of the calls match the the requirements laid out in
|
sure that all of the calls match the requirements laid out in
|
||||||
Section VII.
|
Section VII.
|
||||||
|
|
||||||
Now, proceed with compilation and installation as usual. Don't forget
|
Now, proceed with compilation and installation as usual. Don't forget
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ E NEARDATA struct sinfo {
|
|||||||
} program_state;
|
} program_state;
|
||||||
|
|
||||||
E boolean restoring;
|
E boolean restoring;
|
||||||
|
E boolean ransacked;
|
||||||
|
|
||||||
E const char quitchars[];
|
E const char quitchars[];
|
||||||
E const char vowels[];
|
E const char vowels[];
|
||||||
|
|||||||
+2
-1
@@ -146,7 +146,8 @@ typedef struct branch {
|
|||||||
#define MIGR_WITH_HERO 9 /* mon: followers; obj: trap door */
|
#define MIGR_WITH_HERO 9 /* mon: followers; obj: trap door */
|
||||||
#define MIGR_NOBREAK 1024 /* bitmask: don't break on delivery */
|
#define MIGR_NOBREAK 1024 /* bitmask: don't break on delivery */
|
||||||
#define MIGR_NOSCATTER 2048 /* don't scatter on delivery */
|
#define MIGR_NOSCATTER 2048 /* don't scatter on delivery */
|
||||||
|
#define MIGR_TO_SPECIES 4096 /* migrating to species as they are made */
|
||||||
|
#define MIGR_LEFTOVERS 8192 /* grab remaining MIGR_TO_SPECIES objects */
|
||||||
/* level information (saved via ledger number) */
|
/* level information (saved via ledger number) */
|
||||||
|
|
||||||
struct linfo {
|
struct linfo {
|
||||||
|
|||||||
+5
-1
@@ -428,6 +428,8 @@ E const char *NDECL(roguename);
|
|||||||
E struct obj *FDECL(realloc_obj,
|
E struct obj *FDECL(realloc_obj,
|
||||||
(struct obj *, int, genericptr_t, int, const char *));
|
(struct obj *, int, genericptr_t, int, const char *));
|
||||||
E char *FDECL(coyotename, (struct monst *, char *));
|
E char *FDECL(coyotename, (struct monst *, char *));
|
||||||
|
E char *FDECL(rndorcname, (char *));
|
||||||
|
E struct monst *FDECL(christen_orc, (struct monst *, char *));
|
||||||
E const char *FDECL(noveltitle, (int *));
|
E const char *FDECL(noveltitle, (int *));
|
||||||
E const char *FDECL(lookup_novel, (const char *, int *));
|
E const char *FDECL(lookup_novel, (const char *, int *));
|
||||||
|
|
||||||
@@ -519,6 +521,7 @@ E void FDECL(container_impact_dmg, (struct obj *, XCHAR_P, XCHAR_P));
|
|||||||
E int NDECL(dokick);
|
E int NDECL(dokick);
|
||||||
E boolean FDECL(ship_object, (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P));
|
E boolean FDECL(ship_object, (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P));
|
||||||
E void FDECL(obj_delivery, (BOOLEAN_P));
|
E void FDECL(obj_delivery, (BOOLEAN_P));
|
||||||
|
E void FDECL(deliver_obj_to_mon, (struct monst *mtmp, unsigned long));
|
||||||
E schar FDECL(down_gate, (XCHAR_P, XCHAR_P));
|
E schar FDECL(down_gate, (XCHAR_P, XCHAR_P));
|
||||||
E void FDECL(impact_drop, (struct obj *, XCHAR_P, XCHAR_P, XCHAR_P));
|
E void FDECL(impact_drop, (struct obj *, XCHAR_P, XCHAR_P, XCHAR_P));
|
||||||
|
|
||||||
@@ -1283,6 +1286,7 @@ E void FDECL(new_omailcmd, (struct obj *, const char *));
|
|||||||
E void FDECL(free_omailcmd, (struct obj *));
|
E void FDECL(free_omailcmd, (struct obj *));
|
||||||
E struct obj *FDECL(mkobj_at, (CHAR_P, int, int, BOOLEAN_P));
|
E struct obj *FDECL(mkobj_at, (CHAR_P, int, int, BOOLEAN_P));
|
||||||
E struct obj *FDECL(mksobj_at, (int, int, int, BOOLEAN_P, BOOLEAN_P));
|
E struct obj *FDECL(mksobj_at, (int, int, int, BOOLEAN_P, BOOLEAN_P));
|
||||||
|
E struct obj *FDECL(mksobj_migr_to_species, (int, unsigned, BOOLEAN_P, BOOLEAN_P));
|
||||||
E struct obj *FDECL(mkobj, (CHAR_P, BOOLEAN_P));
|
E struct obj *FDECL(mkobj, (CHAR_P, BOOLEAN_P));
|
||||||
E int NDECL(rndmonnum);
|
E int NDECL(rndmonnum);
|
||||||
E boolean FDECL(bogon_is_pname, (CHAR_P));
|
E boolean FDECL(bogon_is_pname, (CHAR_P));
|
||||||
@@ -1753,7 +1757,7 @@ E char *FDECL(self_lookat, (char *));
|
|||||||
E void FDECL(mhidden_description, (struct monst *, BOOLEAN_P, char *));
|
E void FDECL(mhidden_description, (struct monst *, BOOLEAN_P, char *));
|
||||||
E boolean FDECL(object_from_map, (int,int,int,struct obj **));
|
E boolean FDECL(object_from_map, (int,int,int,struct obj **));
|
||||||
E int FDECL(do_screen_description, (coord, BOOLEAN_P, int, char *,
|
E int FDECL(do_screen_description, (coord, BOOLEAN_P, int, char *,
|
||||||
const char **));
|
const char **, struct permonst **));
|
||||||
E int FDECL(do_look, (int, coord *));
|
E int FDECL(do_look, (int, coord *));
|
||||||
E int NDECL(dowhatis);
|
E int NDECL(dowhatis);
|
||||||
E int NDECL(doquickwhatis);
|
E int NDECL(doquickwhatis);
|
||||||
|
|||||||
+2
-1
@@ -40,7 +40,7 @@ struct flag {
|
|||||||
boolean lit_corridor; /* show a dark corr as lit if it is in sight */
|
boolean lit_corridor; /* show a dark corr as lit if it is in sight */
|
||||||
boolean nap; /* `timed_delay' option for display effects */
|
boolean nap; /* `timed_delay' option for display effects */
|
||||||
boolean null; /* OK to send nulls to the terminal */
|
boolean null; /* OK to send nulls to the terminal */
|
||||||
boolean perm_invent; /* keep full inventories up until dismissed */
|
boolean p__obsolete; /* [3.6.2: perm_invent moved to iflags] */
|
||||||
boolean pickup; /* whether you pickup or move and look */
|
boolean pickup; /* whether you pickup or move and look */
|
||||||
boolean pickup_thrown; /* auto-pickup items you threw */
|
boolean pickup_thrown; /* auto-pickup items you threw */
|
||||||
boolean pushweapon; /* When wielding, push old weapon into second slot */
|
boolean pushweapon; /* When wielding, push old weapon into second slot */
|
||||||
@@ -292,6 +292,7 @@ struct instance_flags {
|
|||||||
boolean menu_tab_sep; /* Use tabs to separate option menu fields */
|
boolean menu_tab_sep; /* Use tabs to separate option menu fields */
|
||||||
boolean news; /* print news */
|
boolean news; /* print news */
|
||||||
boolean num_pad; /* use numbers for movement commands */
|
boolean num_pad; /* use numbers for movement commands */
|
||||||
|
boolean perm_invent; /* keep full inventories up until dismissed */
|
||||||
boolean renameallowed; /* can change hero name during role selection */
|
boolean renameallowed; /* can change hero name during role selection */
|
||||||
boolean renameinprogress; /* we are changing hero name */
|
boolean renameinprogress; /* we are changing hero name */
|
||||||
boolean status_updates; /* allow updates to bottom status lines;
|
boolean status_updates; /* allow updates to bottom status lines;
|
||||||
|
|||||||
@@ -270,6 +270,12 @@ typedef struct sortloot_item Loot;
|
|||||||
#define SHIFT_SEENMSG 0x01 /* put out a message if in sight */
|
#define SHIFT_SEENMSG 0x01 /* put out a message if in sight */
|
||||||
#define SHIFT_MSG 0x02 /* always put out a message */
|
#define SHIFT_MSG 0x02 /* always put out a message */
|
||||||
|
|
||||||
|
/* flags for deliver_obj_to_mon */
|
||||||
|
#define DF_NONE 0x00
|
||||||
|
#define DF_RANDOM2 0x01
|
||||||
|
#define DF_RANDOM3 0x02
|
||||||
|
#define DF_ALL 0x04
|
||||||
|
|
||||||
/* special mhpmax value when loading bones monster to flag as extinct or
|
/* special mhpmax value when loading bones monster to flag as extinct or
|
||||||
* genocided */
|
* genocided */
|
||||||
#define DEFUNCT_MONSTER (-100)
|
#define DEFUNCT_MONSTER (-100)
|
||||||
|
|||||||
@@ -83,4 +83,7 @@ enum trap_types {
|
|||||||
TRAPNUM
|
TRAPNUM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define is_pit(ttyp) ((ttyp) == PIT || (ttyp) == SPIKED_PIT)
|
||||||
|
#define is_hole(ttyp) ((ttyp) == HOLE || (ttyp) == TRAPDOOR)
|
||||||
|
|
||||||
#endif /* TRAP_H */
|
#endif /* TRAP_H */
|
||||||
|
|||||||
+3
-4
@@ -599,8 +599,7 @@ drag:
|
|||||||
|| !is_pool(uball->ox, uball->oy)
|
|| !is_pool(uball->ox, uball->oy)
|
||||||
|| levl[uball->ox][uball->oy].typ == POOL))
|
|| levl[uball->ox][uball->oy].typ == POOL))
|
||||||
|| ((t = t_at(uchain->ox, uchain->oy))
|
|| ((t = t_at(uchain->ox, uchain->oy))
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT || t->ttyp == HOLE
|
&& (is_pit(t->ttyp) || is_hole(t->ttyp)))) {
|
||||||
|| t->ttyp == TRAPDOOR))) {
|
|
||||||
if (Levitation) {
|
if (Levitation) {
|
||||||
You_feel("a tug from the iron ball.");
|
You_feel("a tug from the iron ball.");
|
||||||
if (t)
|
if (t)
|
||||||
@@ -745,8 +744,8 @@ xchar x, y;
|
|||||||
if (!Levitation && !MON_AT(x, y) && !u.utrap
|
if (!Levitation && !MON_AT(x, y) && !u.utrap
|
||||||
&& (is_pool(x, y)
|
&& (is_pool(x, y)
|
||||||
|| ((t = t_at(x, y))
|
|| ((t = t_at(x, y))
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT
|
&& (is_pit(t->ttyp)
|
||||||
|| t->ttyp == TRAPDOOR || t->ttyp == HOLE)))) {
|
|| is_hole(t->ttyp))))) {
|
||||||
u.ux = x;
|
u.ux = x;
|
||||||
u.uy = y;
|
u.uy = y;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ NEARDATA char pl_fruit[PL_FSIZ] = DUMMY;
|
|||||||
NEARDATA struct fruit *ffruit = (struct fruit *) 0;
|
NEARDATA struct fruit *ffruit = (struct fruit *) 0;
|
||||||
|
|
||||||
NEARDATA char tune[6] = DUMMY;
|
NEARDATA char tune[6] = DUMMY;
|
||||||
|
NEARDATA boolean ransacked = 0;
|
||||||
|
|
||||||
const char *occtxt = DUMMY;
|
const char *occtxt = DUMMY;
|
||||||
const char quitchars[] = " \r\n\033";
|
const char quitchars[] = " \r\n\033";
|
||||||
|
|||||||
@@ -312,8 +312,7 @@ dig(VOID_ARGS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (context.digging.effort <= 50
|
if (context.digging.effort <= 50
|
||||||
|| (ttmp && (ttmp->ttyp == TRAPDOOR || ttmp->ttyp == PIT
|
|| (ttmp && (ttmp->ttyp == TRAPDOOR || is_pit(ttmp->ttyp)))) {
|
||||||
|| ttmp->ttyp == SPIKED_PIT))) {
|
|
||||||
return 1;
|
return 1;
|
||||||
} else if (ttmp && (ttmp->ttyp == LANDMINE
|
} else if (ttmp && (ttmp->ttyp == LANDMINE
|
||||||
|| (ttmp->ttyp == BEAR_TRAP && !u.utrap))) {
|
|| (ttmp->ttyp == BEAR_TRAP && !u.utrap))) {
|
||||||
@@ -803,7 +802,7 @@ coord *cc;
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if ((boulder_here = sobj_at(BOULDER, dig_x, dig_y)) != 0) {
|
} else if ((boulder_here = sobj_at(BOULDER, dig_x, dig_y)) != 0) {
|
||||||
if (ttmp && (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)
|
if (ttmp && is_pit(ttmp->ttyp)
|
||||||
&& rn2(2)) {
|
&& rn2(2)) {
|
||||||
pline_The("boulder settles into the %spit.",
|
pline_The("boulder settles into the %spit.",
|
||||||
(dig_x != u.ux || dig_y != u.uy) ? "adjacent " : "");
|
(dig_x != u.ux || dig_y != u.uy) ? "adjacent " : "");
|
||||||
@@ -1087,7 +1086,7 @@ struct obj *obj;
|
|||||||
KILLED_BY);
|
KILLED_BY);
|
||||||
} else if (u.utrap && u.utraptype == TT_PIT && trap
|
} else if (u.utrap && u.utraptype == TT_PIT && trap
|
||||||
&& (trap_with_u = t_at(u.ux, u.uy))
|
&& (trap_with_u = t_at(u.ux, u.uy))
|
||||||
&& (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)
|
&& is_pit(trap->ttyp)
|
||||||
&& !conjoined_pits(trap, trap_with_u, FALSE)) {
|
&& !conjoined_pits(trap, trap_with_u, FALSE)) {
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
@@ -1462,8 +1461,7 @@ zap_dig()
|
|||||||
struct trap *adjpit = t_at(zx, zy);
|
struct trap *adjpit = t_at(zx, zy);
|
||||||
if ((diridx < 8) && !conjoined_pits(adjpit, trap_with_u, FALSE)) {
|
if ((diridx < 8) && !conjoined_pits(adjpit, trap_with_u, FALSE)) {
|
||||||
digdepth = 0; /* limited to the adjacent location only */
|
digdepth = 0; /* limited to the adjacent location only */
|
||||||
if (!(adjpit && (adjpit->ttyp == PIT
|
if (!(adjpit && is_pit(adjpit->ttyp))) {
|
||||||
|| adjpit->ttyp == SPIKED_PIT))) {
|
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
cc.x = zx;
|
cc.x = zx;
|
||||||
cc.y = zy;
|
cc.y = zy;
|
||||||
@@ -1477,7 +1475,7 @@ zap_dig()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (adjpit
|
if (adjpit
|
||||||
&& (adjpit->ttyp == PIT || adjpit->ttyp == SPIKED_PIT)) {
|
&& is_pit(adjpit->ttyp)) {
|
||||||
int adjidx = (diridx + 4) % 8;
|
int adjidx = (diridx + 4) % 8;
|
||||||
trap_with_u->conjoined |= (1 << diridx);
|
trap_with_u->conjoined |= (1 << diridx);
|
||||||
adjpit->conjoined |= (1 << adjidx);
|
adjpit->conjoined |= (1 << adjidx);
|
||||||
@@ -1566,7 +1564,7 @@ zap_dig()
|
|||||||
|
|
||||||
if (pitflow && isok(flow_x, flow_y)) {
|
if (pitflow && isok(flow_x, flow_y)) {
|
||||||
struct trap *ttmp = t_at(flow_x, flow_y);
|
struct trap *ttmp = t_at(flow_x, flow_y);
|
||||||
if (ttmp && (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)) {
|
if (ttmp && is_pit(ttmp->ttyp)) {
|
||||||
schar filltyp = fillholetyp(ttmp->tx, ttmp->ty, TRUE);
|
schar filltyp = fillholetyp(ttmp->tx, ttmp->ty, TRUE);
|
||||||
if (filltyp != ROOM)
|
if (filltyp != ROOM)
|
||||||
pit_flow(ttmp, filltyp);
|
pit_flow(ttmp, filltyp);
|
||||||
@@ -1681,7 +1679,7 @@ struct trap *trap;
|
|||||||
schar filltyp;
|
schar filltyp;
|
||||||
{
|
{
|
||||||
if (trap && (filltyp != ROOM)
|
if (trap && (filltyp != ROOM)
|
||||||
&& (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)) {
|
&& is_pit(trap->ttyp)) {
|
||||||
struct trap t;
|
struct trap t;
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -783,7 +783,7 @@ register int x, y;
|
|||||||
|
|
||||||
/* if monster is in a physical trap, you see the trap too
|
/* if monster is in a physical trap, you see the trap too
|
||||||
*/
|
*/
|
||||||
if (tt == BEAR_TRAP || tt == PIT || tt == SPIKED_PIT
|
if (tt == BEAR_TRAP || is_pit(tt)
|
||||||
|| tt == WEB) {
|
|| tt == WEB) {
|
||||||
trap->tseen = TRUE;
|
trap->tseen = TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,8 +149,7 @@ const char *verb;
|
|||||||
if (obj->otyp == BOULDER && boulder_hits_pool(obj, x, y, FALSE)) {
|
if (obj->otyp == BOULDER && boulder_hits_pool(obj, x, y, FALSE)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else if (obj->otyp == BOULDER && (t = t_at(x, y)) != 0
|
} else if (obj->otyp == BOULDER && (t = t_at(x, y)) != 0
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT
|
&& (is_pit(t->ttyp) || is_hole(t->ttyp))) {
|
||||||
|| t->ttyp == TRAPDOOR || t->ttyp == HOLE)) {
|
|
||||||
if (((mtmp = m_at(x, y)) && mtmp->mtrapped)
|
if (((mtmp = m_at(x, y)) && mtmp->mtrapped)
|
||||||
|| (u.utrap && u.ux == x && u.uy == y)) {
|
|| (u.utrap && u.ux == x && u.uy == y)) {
|
||||||
if (*verb)
|
if (*verb)
|
||||||
@@ -956,7 +955,7 @@ dodown()
|
|||||||
if (trap && uteetering_at_seen_pit(trap)) {
|
if (trap && uteetering_at_seen_pit(trap)) {
|
||||||
dotrap(trap, TOOKPLUNGE);
|
dotrap(trap, TOOKPLUNGE);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (!trap || (trap->ttyp != TRAPDOOR && trap->ttyp != HOLE)
|
} else if (!trap || !is_hole(trap->ttyp)
|
||||||
|| !Can_fall_thru(&u.uz) || !trap->tseen) {
|
|| !Can_fall_thru(&u.uz) || !trap->tseen) {
|
||||||
if (flags.autodig && !context.nopick && uwep && is_pick(uwep)) {
|
if (flags.autodig && !context.nopick && uwep && is_pick(uwep)) {
|
||||||
return use_pick_axe2(uwep);
|
return use_pick_axe2(uwep);
|
||||||
|
|||||||
+45
-7
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do_name.c $NHDT-Date: 1519420054 2018/02/23 21:07:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.128 $ */
|
/* NetHack 3.6 do_name.c $NHDT-Date: 1537477563 2018/09/20 21:06:03 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.132 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Pasi Kallinen, 2018. */
|
/*-Copyright (c) Pasi Kallinen, 2018. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -543,7 +543,7 @@ int cx, cy;
|
|||||||
|
|
||||||
cc.x = cx;
|
cc.x = cx;
|
||||||
cc.y = cy;
|
cc.y = cy;
|
||||||
if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch)) {
|
if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch, (struct permonst **)0)) {
|
||||||
(void) coord_desc(cx, cy, tmpbuf, iflags.getpos_coords);
|
(void) coord_desc(cx, cy, tmpbuf, iflags.getpos_coords);
|
||||||
custompline(SUPPRESS_HISTORY,
|
custompline(SUPPRESS_HISTORY,
|
||||||
"%s%s%s%s%s", firstmatch, *tmpbuf ? " " : "", tmpbuf,
|
"%s%s%s%s%s", firstmatch, *tmpbuf ? " " : "", tmpbuf,
|
||||||
@@ -593,7 +593,8 @@ int gloc;
|
|||||||
any.a_int = i + 1;
|
any.a_int = i + 1;
|
||||||
tmpcc.x = garr[i].x;
|
tmpcc.x = garr[i].x;
|
||||||
tmpcc.y = garr[i].y;
|
tmpcc.y = garr[i].y;
|
||||||
if (do_screen_description(tmpcc, TRUE, sym, tmpbuf, &firstmatch)) {
|
if (do_screen_description(tmpcc, TRUE, sym, tmpbuf,
|
||||||
|
&firstmatch, (struct permonst **)0)) {
|
||||||
(void) coord_desc(garr[i].x, garr[i].y, tmpbuf,
|
(void) coord_desc(garr[i].x, garr[i].y, tmpbuf,
|
||||||
iflags.getpos_coords);
|
iflags.getpos_coords);
|
||||||
Sprintf(fullbuf, "%s%s%s", firstmatch,
|
Sprintf(fullbuf, "%s%s%s", firstmatch,
|
||||||
@@ -1699,10 +1700,7 @@ boolean called;
|
|||||||
if (do_saddle && (mtmp->misc_worn_check & W_SADDLE) && !Blind
|
if (do_saddle && (mtmp->misc_worn_check & W_SADDLE) && !Blind
|
||||||
&& !Hallucination)
|
&& !Hallucination)
|
||||||
Strcat(buf, "saddled ");
|
Strcat(buf, "saddled ");
|
||||||
if (buf[0] != 0)
|
has_adjectives = (buf[0] != '\0');
|
||||||
has_adjectives = TRUE;
|
|
||||||
else
|
|
||||||
has_adjectives = FALSE;
|
|
||||||
|
|
||||||
/* Put the actual monster name or type into the buffer now */
|
/* Put the actual monster name or type into the buffer now */
|
||||||
/* Be sure to remember whether the buffer starts with a name */
|
/* Be sure to remember whether the buffer starts with a name */
|
||||||
@@ -2067,6 +2065,46 @@ char *buf;
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
rndorcname(s)
|
||||||
|
char *s;
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
const char *v[] = {"a", "ai", "og", "u"};
|
||||||
|
const char *snd[] = {"gor", "gris", "un", "bane", "ruk",
|
||||||
|
"oth","ul", "z", "thos","akh","hai"};
|
||||||
|
int vstart = rn2(2);
|
||||||
|
|
||||||
|
if (s) {
|
||||||
|
*s = '\0';
|
||||||
|
for (i = 0; i < rn2(2) + 3; ++i) {
|
||||||
|
vstart = 1 - vstart; /* 0 -> 1, 1 -> 0 */
|
||||||
|
if (!rn2(30) && i > 0)
|
||||||
|
(void) strcat(s, "-");
|
||||||
|
(void) sprintf(eos(s), "%s", vstart ? v[rn2(SIZE(v))] :
|
||||||
|
snd[rn2(SIZE(snd))]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct monst *
|
||||||
|
christen_orc(mtmp, gang)
|
||||||
|
struct monst *mtmp;
|
||||||
|
char *gang;
|
||||||
|
{
|
||||||
|
int sz = 0;
|
||||||
|
char buf[BUFSZ], buf2[BUFSZ], *orcname;
|
||||||
|
|
||||||
|
orcname = rndorcname(buf2);
|
||||||
|
sz = (int) (strlen(gang) + strlen(orcname) + sizeof " of " - sizeof "");
|
||||||
|
if (gang && orcname && sz < BUFSZ) {
|
||||||
|
Sprintf(buf, "%s of %s", upstart(orcname), upstart(gang));
|
||||||
|
mtmp = christen_monst(mtmp, buf);
|
||||||
|
}
|
||||||
|
return mtmp;
|
||||||
|
}
|
||||||
|
|
||||||
/* make sure "The Colour of Magic" remains the first entry in here */
|
/* make sure "The Colour of Magic" remains the first entry in here */
|
||||||
static const char *const sir_Terry_novels[] = {
|
static const char *const sir_Terry_novels[] = {
|
||||||
"The Colour of Magic", "The Light Fantastic", "Equal Rites", "Mort",
|
"The Colour of Magic", "The Light Fantastic", "Equal Rites", "Mort",
|
||||||
|
|||||||
@@ -407,6 +407,12 @@ boolean with_you;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((mtmp->mspare1 & MIGR_LEFTOVERS) != 0L) {
|
||||||
|
/* Pick up the rest of the MIGR_TO_SPECIES objects */
|
||||||
|
if (migrating_objs)
|
||||||
|
deliver_obj_to_mon(mtmp, DF_ALL);
|
||||||
|
}
|
||||||
|
|
||||||
if (xlocale && wander) {
|
if (xlocale && wander) {
|
||||||
/* monster moved a bit; pick a nearby location */
|
/* monster moved a bit; pick a nearby location */
|
||||||
/* mnearto() deals w/stone, et al */
|
/* mnearto() deals w/stone, et al */
|
||||||
|
|||||||
+48
-3
@@ -495,7 +495,7 @@ xchar x, y;
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((trap = t_at(x, y)) != 0) {
|
if ((trap = t_at(x, y)) != 0) {
|
||||||
if (((trap->ttyp == PIT || trap->ttyp == SPIKED_PIT) && !Passes_walls)
|
if ((is_pit(trap->ttyp) && !Passes_walls)
|
||||||
|| trap->ttyp == WEB) {
|
|| trap->ttyp == WEB) {
|
||||||
if (!trap->tseen)
|
if (!trap->tseen)
|
||||||
find_trap(trap);
|
find_trap(trap);
|
||||||
@@ -1515,7 +1515,7 @@ boolean shop_floor_obj;
|
|||||||
/* boulders never fall through trap doors, but they might knock
|
/* boulders never fall through trap doors, but they might knock
|
||||||
other things down before plugging the hole */
|
other things down before plugging the hole */
|
||||||
if (otmp->otyp == BOULDER && ((t = t_at(x, y)) != 0)
|
if (otmp->otyp == BOULDER && ((t = t_at(x, y)) != 0)
|
||||||
&& (t->ttyp == TRAPDOOR || t->ttyp == HOLE)) {
|
&& is_hole(t->ttyp)) {
|
||||||
if (impact)
|
if (impact)
|
||||||
impact_drop(otmp, x, y, 0);
|
impact_drop(otmp, x, y, 0);
|
||||||
return FALSE; /* let caller finish the drop */
|
return FALSE; /* let caller finish the drop */
|
||||||
@@ -1612,6 +1612,9 @@ boolean near_hero;
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
where = (int) (otmp->owornmask & 0x7fffL); /* destination code */
|
where = (int) (otmp->owornmask & 0x7fffL); /* destination code */
|
||||||
|
if ((where & MIGR_TO_SPECIES) != 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
nobreak = (where & MIGR_NOBREAK) != 0;
|
nobreak = (where & MIGR_NOBREAK) != 0;
|
||||||
noscatter = (where & MIGR_WITH_HERO) != 0;
|
noscatter = (where & MIGR_WITH_HERO) != 0;
|
||||||
where &= ~(MIGR_NOBREAK | MIGR_NOSCATTER);
|
where &= ~(MIGR_NOBREAK | MIGR_NOSCATTER);
|
||||||
@@ -1667,6 +1670,48 @@ boolean near_hero;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
deliver_obj_to_mon(mtmp, deliverflags)
|
||||||
|
struct monst *mtmp;
|
||||||
|
unsigned long deliverflags;
|
||||||
|
{
|
||||||
|
struct obj *otmp, *otmp2;
|
||||||
|
int where, cnt = 0, maxobj = 0;
|
||||||
|
|
||||||
|
if (deliverflags & DF_RANDOM3)
|
||||||
|
maxobj = rn2(3) + 1;
|
||||||
|
else if (deliverflags & DF_RANDOM2)
|
||||||
|
maxobj = rn2(2) + 1;
|
||||||
|
else if (deliverflags == DF_NONE)
|
||||||
|
maxobj = 1;
|
||||||
|
|
||||||
|
for (otmp = migrating_objs; otmp; otmp = otmp2) {
|
||||||
|
otmp2 = otmp->nobj;
|
||||||
|
where = (int) (otmp->owornmask & 0x7fffL); /* destination code */
|
||||||
|
if ((where & MIGR_TO_SPECIES) == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ((mtmp->data->mflags2 & otmp->corpsenm) != 0) {
|
||||||
|
obj_extract_self(otmp);
|
||||||
|
otmp->owornmask = 0L;
|
||||||
|
otmp->ox = otmp->oy = 0;
|
||||||
|
|
||||||
|
/* special treatment for orcs and their kind */
|
||||||
|
if ((otmp->corpsenm & M2_ORC) != 0 && has_oname(otmp)) {
|
||||||
|
if (!has_mname(mtmp))
|
||||||
|
mtmp = christen_orc(mtmp, ONAME(otmp));
|
||||||
|
free_oname(otmp);
|
||||||
|
}
|
||||||
|
otmp->corpsenm = 0;
|
||||||
|
(void) add_to_minv(mtmp, otmp);
|
||||||
|
cnt++;
|
||||||
|
if (maxobj && cnt >= maxobj)
|
||||||
|
break;
|
||||||
|
/* getting here implies DF_ALL */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
otransit_msg(otmp, nodrop, num)
|
otransit_msg(otmp, nodrop, num)
|
||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
@@ -1717,7 +1762,7 @@ xchar x, y;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (((ttmp = t_at(x, y)) != 0 && ttmp->tseen)
|
if (((ttmp = t_at(x, y)) != 0 && ttmp->tseen)
|
||||||
&& (ttmp->ttyp == TRAPDOOR || ttmp->ttyp == HOLE)) {
|
&& is_hole(ttmp->ttyp)) {
|
||||||
gate_str = (ttmp->ttyp == TRAPDOOR) ? "through the trap door"
|
gate_str = (ttmp->ttyp == TRAPDOOR) ? "through the trap door"
|
||||||
: "through the hole";
|
: "through the hole";
|
||||||
return MIGR_RANDOM;
|
return MIGR_RANDOM;
|
||||||
|
|||||||
+1
-2
@@ -744,8 +744,7 @@ int x, y;
|
|||||||
dotrap(ttmp, 0); /* doesn't print messages */
|
dotrap(ttmp, 0); /* doesn't print messages */
|
||||||
} else if (ttmp->ttyp == FIRE_TRAP) {
|
} else if (ttmp->ttyp == FIRE_TRAP) {
|
||||||
dotrap(ttmp, 0);
|
dotrap(ttmp, 0);
|
||||||
} else if ((ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT
|
} else if ((is_pit(ttmp->ttyp) || is_hole(ttmp->ttyp))
|
||||||
|| ttmp->ttyp == HOLE || ttmp->ttyp == TRAPDOOR)
|
|
||||||
&& Sokoban) {
|
&& Sokoban) {
|
||||||
/* air currents overcome the recoil in Sokoban;
|
/* air currents overcome the recoil in Sokoban;
|
||||||
when jumping, caller performs last step and enters trap */
|
when jumping, caller performs last step and enters trap */
|
||||||
|
|||||||
@@ -1280,7 +1280,7 @@ int how;
|
|||||||
if (WIN_INVEN != WIN_ERR) {
|
if (WIN_INVEN != WIN_ERR) {
|
||||||
destroy_nhwindow(WIN_INVEN), WIN_INVEN = WIN_ERR;
|
destroy_nhwindow(WIN_INVEN), WIN_INVEN = WIN_ERR;
|
||||||
/* precaution in case any late update_inventory() calls occur */
|
/* precaution in case any late update_inventory() calls occur */
|
||||||
flags.perm_invent = 0;
|
iflags.perm_invent = 0;
|
||||||
}
|
}
|
||||||
display_nhwindow(WIN_MESSAGE, TRUE);
|
display_nhwindow(WIN_MESSAGE, TRUE);
|
||||||
destroy_nhwindow(WIN_MAP), WIN_MAP = WIN_ERR;
|
destroy_nhwindow(WIN_MAP), WIN_MAP = WIN_ERR;
|
||||||
|
|||||||
+4
-5
@@ -151,8 +151,7 @@ moverock()
|
|||||||
|
|
||||||
if (mtmp && !noncorporeal(mtmp->data)
|
if (mtmp && !noncorporeal(mtmp->data)
|
||||||
&& (!mtmp->mtrapped
|
&& (!mtmp->mtrapped
|
||||||
|| !(ttmp && ((ttmp->ttyp == PIT)
|
|| !(ttmp && is_pit(ttmp->ttyp)))) {
|
||||||
|| (ttmp->ttyp == SPIKED_PIT))))) {
|
|
||||||
if (Blind)
|
if (Blind)
|
||||||
feel_location(sx, sy);
|
feel_location(sx, sy);
|
||||||
if (canspotmon(mtmp)) {
|
if (canspotmon(mtmp)) {
|
||||||
@@ -1205,7 +1204,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
|
|||||||
break;
|
break;
|
||||||
case TT_PIT:
|
case TT_PIT:
|
||||||
if (desttrap && desttrap->tseen
|
if (desttrap && desttrap->tseen
|
||||||
&& (desttrap->ttyp == PIT || desttrap->ttyp == SPIKED_PIT))
|
&& is_pit(desttrap->ttyp))
|
||||||
return TRUE; /* move into adjacent pit */
|
return TRUE; /* move into adjacent pit */
|
||||||
/* try to escape; position stays same regardless of success */
|
/* try to escape; position stays same regardless of success */
|
||||||
climb_pit();
|
climb_pit();
|
||||||
@@ -1736,7 +1735,7 @@ domove()
|
|||||||
u.ux = mtmp->mx, u.uy = mtmp->my; /* resume swapping positions */
|
u.ux = mtmp->mx, u.uy = mtmp->my; /* resume swapping positions */
|
||||||
|
|
||||||
if (mtmp->mtrapped && (trap = t_at(mtmp->mx, mtmp->my)) != 0
|
if (mtmp->mtrapped && (trap = t_at(mtmp->mx, mtmp->my)) != 0
|
||||||
&& (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)
|
&& is_pit(trap->ttyp)
|
||||||
&& sobj_at(BOULDER, trap->tx, trap->ty)) {
|
&& sobj_at(BOULDER, trap->tx, trap->ty)) {
|
||||||
/* can't swap places with pet pinned in a pit by a boulder */
|
/* can't swap places with pet pinned in a pit by a boulder */
|
||||||
u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */
|
u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */
|
||||||
@@ -2100,7 +2099,7 @@ boolean pick;
|
|||||||
* If not a pit, pickup before triggering trap.
|
* If not a pit, pickup before triggering trap.
|
||||||
* If pit, trigger trap before pickup.
|
* If pit, trigger trap before pickup.
|
||||||
*/
|
*/
|
||||||
pit = (trap && (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT));
|
pit = (trap && is_pit(trap->ttyp));
|
||||||
if (pick && !pit)
|
if (pick && !pit)
|
||||||
(void) pickup(1);
|
(void) pickup(1);
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -2511,7 +2511,7 @@ long *out_cnt;
|
|||||||
if (lets && !*lets)
|
if (lets && !*lets)
|
||||||
lets = 0; /* simplify tests: (lets) instead of (lets && *lets) */
|
lets = 0; /* simplify tests: (lets) instead of (lets && *lets) */
|
||||||
|
|
||||||
if (flags.perm_invent && (lets || xtra_choice)) {
|
if (iflags.perm_invent && (lets || xtra_choice)) {
|
||||||
/* partial inventory in perm_invent setting; don't operate on
|
/* partial inventory in perm_invent setting; don't operate on
|
||||||
full inventory window, use an alternate one instead; create
|
full inventory window, use an alternate one instead; create
|
||||||
the first time needed and keep it for re-use as needed later */
|
the first time needed and keep it for re-use as needed later */
|
||||||
@@ -2536,7 +2536,7 @@ long *out_cnt;
|
|||||||
* more than 1; for the last one, we don't need a precise number.
|
* more than 1; for the last one, we don't need a precise number.
|
||||||
* For perm_invent update we force 'more than 1'.
|
* For perm_invent update we force 'more than 1'.
|
||||||
*/
|
*/
|
||||||
n = (flags.perm_invent && !lets && !want_reply) ? 2
|
n = (iflags.perm_invent && !lets && !want_reply) ? 2
|
||||||
: lets ? (int) strlen(lets)
|
: lets ? (int) strlen(lets)
|
||||||
: !invent ? 0 : !invent->nobj ? 1 : 2;
|
: !invent ? 0 : !invent->nobj ? 1 : 2;
|
||||||
/* for xtra_choice, there's another 'item' not included in initial 'n';
|
/* for xtra_choice, there's another 'item' not included in initial 'n';
|
||||||
@@ -2670,7 +2670,7 @@ nextclass:
|
|||||||
nothing has been listed (because there isn't anyhing to list;
|
nothing has been listed (because there isn't anyhing to list;
|
||||||
recognized via any.a_char still being zero; the n==0 case above
|
recognized via any.a_char still being zero; the n==0 case above
|
||||||
gets skipped for perm_invent), put something into the menu */
|
gets skipped for perm_invent), put something into the menu */
|
||||||
if (flags.perm_invent && !lets && !any.a_char) {
|
if (iflags.perm_invent && !lets && !any.a_char) {
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
add_menu(win, NO_GLYPH, &any, 0, 0, 0,
|
add_menu(win, NO_GLYPH, &any, 0, 0, 0,
|
||||||
not_carrying_anything, MENU_UNSELECTED);
|
not_carrying_anything, MENU_UNSELECTED);
|
||||||
|
|||||||
+5
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 makemon.c $NHDT-Date: 1495237801 2017/05/19 23:50:01 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.116 $ */
|
/* NetHack 3.6 makemon.c $NHDT-Date: 1537477761 2018/09/20 21:09:21 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.124 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1390,6 +1390,9 @@ int mmflags;
|
|||||||
mtmp->mstrategy |= STRAT_APPEARMSG;
|
mtmp->mstrategy |= STRAT_APPEARMSG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (allow_minvent && migrating_objs)
|
||||||
|
deliver_obj_to_mon(mtmp, DF_RANDOM2); /* in case there's waiting items */
|
||||||
|
|
||||||
if (!in_mklev)
|
if (!in_mklev)
|
||||||
newsym(mtmp->mx, mtmp->my); /* make sure the mon shows up */
|
newsym(mtmp->mx, mtmp->my); /* make sure the mon shows up */
|
||||||
|
|
||||||
@@ -1834,7 +1837,7 @@ struct monst *mtmp, *victim;
|
|||||||
slightly less sexist if prepared for it...) */
|
slightly less sexist if prepared for it...) */
|
||||||
: (fem && !mtmp->female) ? "female " : "",
|
: (fem && !mtmp->female) ? "female " : "",
|
||||||
ptr->mname);
|
ptr->mname);
|
||||||
pline("%s %s %s.", Monnam(mtmp),
|
pline("%s %s %s.", upstart(y_monnam(mtmp)),
|
||||||
(fem != mtmp->female) ? "changes into"
|
(fem != mtmp->female) ? "changes into"
|
||||||
: humanoid(ptr) ? "becomes"
|
: humanoid(ptr) ? "becomes"
|
||||||
: "grows up into",
|
: "grows up into",
|
||||||
|
|||||||
@@ -1268,6 +1268,9 @@ register struct attack *mattk;
|
|||||||
mwepgone(mdef);
|
mwepgone(mdef);
|
||||||
otmp->owornmask = 0L;
|
otmp->owornmask = 0L;
|
||||||
update_mon_intrinsics(mdef, otmp, FALSE, FALSE);
|
update_mon_intrinsics(mdef, otmp, FALSE, FALSE);
|
||||||
|
/* give monster a chance to wear other equipment on its next
|
||||||
|
move instead of waiting until it picks something up */
|
||||||
|
mdef->misc_worn_check |= I_SPECIAL;
|
||||||
}
|
}
|
||||||
/* add_to_minv() might free otmp [if it merges] */
|
/* add_to_minv() might free otmp [if it merges] */
|
||||||
if (vis)
|
if (vis)
|
||||||
|
|||||||
+1
-1
@@ -1744,7 +1744,7 @@ struct attack *mattk;
|
|||||||
|
|
||||||
if (!engulf_target(mtmp, &youmonst))
|
if (!engulf_target(mtmp, &youmonst))
|
||||||
return 0;
|
return 0;
|
||||||
if ((t && ((t->ttyp == PIT) || (t->ttyp == SPIKED_PIT)))
|
if ((t && is_pit(t->ttyp))
|
||||||
&& sobj_at(BOULDER, u.ux, u.uy))
|
&& sobj_at(BOULDER, u.ux, u.uy))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -503,8 +503,7 @@ int trap_type;
|
|||||||
if (trap_type || !rn2(4)) {
|
if (trap_type || !rn2(4)) {
|
||||||
rm->typ = SCORR;
|
rm->typ = SCORR;
|
||||||
if (trap_type) {
|
if (trap_type) {
|
||||||
if ((trap_type == HOLE || trap_type == TRAPDOOR)
|
if (is_hole(trap_type) && !Can_fall_thru(&u.uz))
|
||||||
&& !Can_fall_thru(&u.uz))
|
|
||||||
trap_type = ROCKTRAP;
|
trap_type = ROCKTRAP;
|
||||||
ttmp = maketrap(xx, yy + dy, trap_type);
|
ttmp = maketrap(xx, yy + dy, trap_type);
|
||||||
if (ttmp) {
|
if (ttmp) {
|
||||||
@@ -1342,15 +1341,14 @@ coord *tm;
|
|||||||
} while (kind == NO_TRAP);
|
} while (kind == NO_TRAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((kind == TRAPDOOR || kind == HOLE) && !Can_fall_thru(&u.uz))
|
if (is_hole(kind) && !Can_fall_thru(&u.uz))
|
||||||
kind = ROCKTRAP;
|
kind = ROCKTRAP;
|
||||||
|
|
||||||
if (tm) {
|
if (tm) {
|
||||||
m = *tm;
|
m = *tm;
|
||||||
} else {
|
} else {
|
||||||
register int tryct = 0;
|
register int tryct = 0;
|
||||||
boolean avoid_boulder = (kind == PIT || kind == SPIKED_PIT
|
boolean avoid_boulder = (is_pit(kind) || is_hole(kind));
|
||||||
|| kind == TRAPDOOR || kind == HOLE);
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (++tryct > 200)
|
if (++tryct > 200)
|
||||||
@@ -1390,7 +1388,7 @@ coord *tm;
|
|||||||
in a pit and yet not be able to identify that the pit is there. */
|
in a pit and yet not be able to identify that the pit is there. */
|
||||||
if (lvl <= (unsigned) rnd(4)
|
if (lvl <= (unsigned) rnd(4)
|
||||||
&& kind != SQKY_BOARD && kind != RUST_TRAP
|
&& kind != SQKY_BOARD && kind != RUST_TRAP
|
||||||
&& kind != PIT && kind != SPIKED_PIT && kind < HOLE) {
|
&& !is_pit(kind) && kind < HOLE) {
|
||||||
/* Object generated by the trap; initially NULL, stays NULL if
|
/* Object generated by the trap; initially NULL, stays NULL if
|
||||||
we fail to generate an object or if the trap doesn't
|
we fail to generate an object or if the trap doesn't
|
||||||
generate objects. */
|
generate objects. */
|
||||||
|
|||||||
+151
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mkmaze.c $NHDT-Date: 1518718417 2018/02/15 18:13:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.55 $ */
|
/* NetHack 3.6 mkmaze.c $NHDT-Date: 1537477570 2018/09/20 21:06:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.61 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Pasi Kallinen, 2018. */
|
/*-Copyright (c) Pasi Kallinen, 2018. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -25,6 +25,10 @@ STATIC_DCL boolean FDECL(put_lregion_here, (XCHAR_P, XCHAR_P, XCHAR_P,
|
|||||||
STATIC_DCL void NDECL(baalz_fixup);
|
STATIC_DCL void NDECL(baalz_fixup);
|
||||||
STATIC_DCL void NDECL(setup_waterlevel);
|
STATIC_DCL void NDECL(setup_waterlevel);
|
||||||
STATIC_DCL void NDECL(unsetup_waterlevel);
|
STATIC_DCL void NDECL(unsetup_waterlevel);
|
||||||
|
STATIC_DCL void FDECL(check_ransacked, (char *));
|
||||||
|
STATIC_DCL void FDECL(migr_booty_item, (int, const char *));
|
||||||
|
STATIC_DCL void FDECL(migrate_orc, (struct monst *, unsigned long));
|
||||||
|
STATIC_DCL void NDECL(stolen_booty);
|
||||||
|
|
||||||
/* adjust a coordinate one step in the specified direction */
|
/* adjust a coordinate one step in the specified direction */
|
||||||
#define mz_move(X, Y, dir) \
|
#define mz_move(X, Y, dir) \
|
||||||
@@ -610,6 +614,8 @@ fixup_special()
|
|||||||
} else if (on_level(&u.uz, &baalzebub_level)) {
|
} else if (on_level(&u.uz, &baalzebub_level)) {
|
||||||
/* custom wallify the "beetle" potion of the level */
|
/* custom wallify the "beetle" potion of the level */
|
||||||
baalz_fixup();
|
baalz_fixup();
|
||||||
|
} else if (u.uz.dnum == mines_dnum && ransacked) {
|
||||||
|
stolen_booty();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lregions)
|
if (lregions)
|
||||||
@@ -617,6 +623,149 @@ fixup_special()
|
|||||||
num_lregions = 0;
|
num_lregions = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
check_ransacked(s)
|
||||||
|
char *s;
|
||||||
|
{
|
||||||
|
/* this kludge only works as long as orctown is minetn-1 */
|
||||||
|
ransacked = (u.uz.dnum == mines_dnum && !strcmp(s, "minetn-1"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ORC_LEADER 1
|
||||||
|
|
||||||
|
void
|
||||||
|
migrate_orc(mtmp, mflags)
|
||||||
|
struct monst *mtmp;
|
||||||
|
unsigned long mflags;
|
||||||
|
{
|
||||||
|
int nlev, max_depth, cur_depth;
|
||||||
|
d_level dest;
|
||||||
|
|
||||||
|
cur_depth = (int) depth(&u.uz);
|
||||||
|
max_depth = dunlevs_in_dungeon(&u.uz) +
|
||||||
|
(dungeons[u.uz.dnum].depth_start - 1);
|
||||||
|
if (mflags == ORC_LEADER) {
|
||||||
|
/* Note that the orc leader will take possession of any
|
||||||
|
* remaining stuff not already delivered to other
|
||||||
|
* orcs between here and the bottom of the mines.
|
||||||
|
*/
|
||||||
|
nlev = max_depth;
|
||||||
|
mtmp->mspare1 = MIGR_LEFTOVERS;
|
||||||
|
} else {
|
||||||
|
nlev = rn2(max_depth - cur_depth) + cur_depth + 1;
|
||||||
|
if (nlev == cur_depth)
|
||||||
|
nlev++;
|
||||||
|
if (nlev > max_depth)
|
||||||
|
nlev = max_depth;
|
||||||
|
mtmp->mspare1 = 0L;
|
||||||
|
}
|
||||||
|
get_level(&dest, nlev);
|
||||||
|
migrate_to_level(mtmp, ledger_no(&dest), MIGR_RANDOM, (coord *) 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
migr_booty_item(otyp, gang)
|
||||||
|
int otyp;
|
||||||
|
const char *gang;
|
||||||
|
{
|
||||||
|
struct obj *otmp;
|
||||||
|
otmp = mksobj_migr_to_species(otyp, (unsigned long) M2_ORC, FALSE, FALSE);
|
||||||
|
if (otmp && gang) {
|
||||||
|
new_oname(otmp, strlen(gang) + 1); /* removes old name if one is present */
|
||||||
|
Strcpy(ONAME(otmp), gang);
|
||||||
|
if (otyp >= TRIPE_RATION && otyp <= TIN)
|
||||||
|
otmp->quan += (long) rn2(3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
stolen_booty(VOID_ARGS)
|
||||||
|
{
|
||||||
|
char *gang, gang_name[BUFSZ];
|
||||||
|
struct monst *mtmp;
|
||||||
|
int cnt, i, otyp;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* --------------------------------------------------------
|
||||||
|
* Mythos:
|
||||||
|
*
|
||||||
|
* A tragic accident has occurred in Frontier Town...
|
||||||
|
* It has been overrun by orcs.
|
||||||
|
*
|
||||||
|
* The booty that the orcs took from the town is now
|
||||||
|
* in the possession of the orcs that did this and
|
||||||
|
* have long since fled the level.
|
||||||
|
* --------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
gang = rndorcname(gang_name);
|
||||||
|
/* create the leader of the orc gang */
|
||||||
|
mtmp = makemon(&mons[PM_ORC_CAPTAIN], 0, 0, MM_NONAME);
|
||||||
|
if (mtmp) {
|
||||||
|
mtmp = christen_monst(mtmp, upstart(gang));
|
||||||
|
mtmp->mpeaceful = 0;
|
||||||
|
migrate_orc(mtmp, ORC_LEADER);
|
||||||
|
}
|
||||||
|
/* create the stuff that the rest of the gang took */
|
||||||
|
migr_booty_item(rn2(2) ? LONG_SWORD : SILVER_SABER, gang);
|
||||||
|
cnt = rn2(3) + 1;
|
||||||
|
for (i = 0; i < cnt; ++i)
|
||||||
|
migr_booty_item(rn2(4) ? TALLOW_CANDLE : WAX_CANDLE, gang);
|
||||||
|
cnt = rn2(2) + 1;
|
||||||
|
for (i = 0; i < cnt; ++i)
|
||||||
|
migr_booty_item(SKELETON_KEY, gang);
|
||||||
|
otyp = rn2((GAUNTLETS_OF_DEXTERITY - LEATHER_GLOVES) + 1) + LEATHER_GLOVES;
|
||||||
|
migr_booty_item(otyp, gang);
|
||||||
|
cnt = rn2(9) + 1;
|
||||||
|
for (i = 0; i < cnt; ++i) {
|
||||||
|
/* Food items - but no lembas! (or some other weird things) */
|
||||||
|
otyp = rn2((TIN - TRIPE_RATION) + 1) + TRIPE_RATION;
|
||||||
|
if (otyp != LEMBAS_WAFER && otyp != GLOB_OF_GRAY_OOZE &&
|
||||||
|
otyp != GLOB_OF_BROWN_PUDDING && otyp != GLOB_OF_GREEN_SLIME &&
|
||||||
|
otyp != GLOB_OF_BLACK_PUDDING && otyp != MEAT_STICK &&
|
||||||
|
otyp != MEATBALL && otyp != MEAT_STICK && otyp != MEAT_RING &&
|
||||||
|
otyp != HUGE_CHUNK_OF_MEAT && otyp != CORPSE)
|
||||||
|
migr_booty_item(otyp, gang);
|
||||||
|
}
|
||||||
|
/* Make most of the orcs on the level be part of the invading gang */
|
||||||
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
|
if (DEADMONSTER(mtmp))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (is_orc(mtmp->data) && !has_mname(mtmp) && rn2(10)) {
|
||||||
|
/*
|
||||||
|
* We'll consider the orc captain from the level
|
||||||
|
* .des file to be the captain of a rival orc horde
|
||||||
|
* who is there to see what has transpired, and to
|
||||||
|
* contemplate future action.
|
||||||
|
*
|
||||||
|
* Don't christen the orc captain as a subordinate
|
||||||
|
* member of the main orc horde.
|
||||||
|
*/
|
||||||
|
if (mtmp->data != &mons[PM_ORC_CAPTAIN])
|
||||||
|
mtmp = christen_orc(mtmp, upstart(gang));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* Lastly, ensure there's several more orcs from the gang along the way.
|
||||||
|
* The mechanics are such that they aren't actually identified as
|
||||||
|
* members of the invading gang until they get their spoils assigned
|
||||||
|
* to the inventory; handled during that assignment.
|
||||||
|
*/
|
||||||
|
cnt = rn2(7) + 5;
|
||||||
|
for (i = 0; i < cnt; ++i) {
|
||||||
|
int mtyp;
|
||||||
|
|
||||||
|
mtyp = rn2((PM_ORC_SHAMAN - PM_ORC) + 1) + PM_ORC;
|
||||||
|
mtmp = makemon(&mons[mtyp], 0, 0, MM_NONAME);
|
||||||
|
if (mtmp)
|
||||||
|
migrate_orc(mtmp, 0UL);
|
||||||
|
}
|
||||||
|
|
||||||
|
ransacked = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#undef ORC_LEADER
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
maze_inbounds(x, y)
|
maze_inbounds(x, y)
|
||||||
int x, y;
|
int x, y;
|
||||||
@@ -819,6 +968,7 @@ const char *s;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*protofile) {
|
if (*protofile) {
|
||||||
|
check_ransacked(protofile);
|
||||||
Strcat(protofile, LEV_EXT);
|
Strcat(protofile, LEV_EXT);
|
||||||
if (load_special(protofile)) {
|
if (load_special(protofile)) {
|
||||||
/* some levels can end up with monsters
|
/* some levels can end up with monsters
|
||||||
|
|||||||
+17
@@ -224,6 +224,23 @@ boolean init, artif;
|
|||||||
return otmp;
|
return otmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct obj *
|
||||||
|
mksobj_migr_to_species(otyp, mflags2, init, artif)
|
||||||
|
int otyp;
|
||||||
|
unsigned mflags2;
|
||||||
|
boolean init, artif;
|
||||||
|
{
|
||||||
|
struct obj *otmp;
|
||||||
|
|
||||||
|
otmp = mksobj(otyp, init, artif);
|
||||||
|
if (otmp) {
|
||||||
|
add_to_migration(otmp);
|
||||||
|
otmp->owornmask = (long) MIGR_TO_SPECIES;
|
||||||
|
otmp->corpsenm = mflags2;
|
||||||
|
}
|
||||||
|
return otmp;
|
||||||
|
}
|
||||||
|
|
||||||
/* mkobj(): select a type of item from a class, use mksobj() to create it */
|
/* mkobj(): select a type of item from a class, use mksobj() to create it */
|
||||||
struct obj *
|
struct obj *
|
||||||
mkobj(oclass, artif)
|
mkobj(oclass, artif)
|
||||||
|
|||||||
@@ -731,6 +731,17 @@ movemon()
|
|||||||
if (minliquid(mtmp))
|
if (minliquid(mtmp))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* after losing equipment, try to put on replacement */
|
||||||
|
if (mtmp->misc_worn_check & I_SPECIAL) {
|
||||||
|
long oldworn;
|
||||||
|
|
||||||
|
mtmp->misc_worn_check &= ~I_SPECIAL;
|
||||||
|
oldworn = mtmp->misc_worn_check;
|
||||||
|
m_dowear(mtmp, FALSE);
|
||||||
|
if (mtmp->misc_worn_check != oldworn || !mtmp->mcanmove)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_hider(mtmp->data)) {
|
if (is_hider(mtmp->data)) {
|
||||||
/* unwatched mimics and piercers may hide again [MRS] */
|
/* unwatched mimics and piercers may hide again [MRS] */
|
||||||
if (restrap(mtmp))
|
if (restrap(mtmp))
|
||||||
@@ -1435,8 +1446,7 @@ nexttry: /* eels prefer the water, but if there is no water nearby,
|
|||||||
if ((ttmp->ttyp != RUST_TRAP
|
if ((ttmp->ttyp != RUST_TRAP
|
||||||
|| mdat == &mons[PM_IRON_GOLEM])
|
|| mdat == &mons[PM_IRON_GOLEM])
|
||||||
&& ttmp->ttyp != STATUE_TRAP
|
&& ttmp->ttyp != STATUE_TRAP
|
||||||
&& ((ttmp->ttyp != PIT && ttmp->ttyp != SPIKED_PIT
|
&& ((!is_pit(ttmp->ttyp) && !is_hole(ttmp->ttyp))
|
||||||
&& ttmp->ttyp != TRAPDOOR && ttmp->ttyp != HOLE)
|
|
||||||
|| (!is_flyer(mdat) && !is_floater(mdat)
|
|| (!is_flyer(mdat) && !is_floater(mdat)
|
||||||
&& !is_clinger(mdat)) || Sokoban)
|
&& !is_clinger(mdat)) || Sokoban)
|
||||||
&& (ttmp->ttyp != SLP_GAS_TRAP || !resists_sleep(mon))
|
&& (ttmp->ttyp != SLP_GAS_TRAP || !resists_sleep(mon))
|
||||||
@@ -1796,6 +1806,8 @@ struct monst *mtmp;
|
|||||||
pline_The("medallion crumbles to dust!");
|
pline_The("medallion crumbles to dust!");
|
||||||
}
|
}
|
||||||
m_useup(mtmp, lifesave);
|
m_useup(mtmp, lifesave);
|
||||||
|
/* equip replacement amulet, if any, on next move */
|
||||||
|
mtmp->misc_worn_check |= I_SPECIAL;
|
||||||
|
|
||||||
surviver = !(mvitals[monsndx(mtmp->data)].mvflags & G_GENOD);
|
surviver = !(mvitals[monsndx(mtmp->data)].mvflags & G_GENOD);
|
||||||
mtmp->mcanmove = 1;
|
mtmp->mcanmove = 1;
|
||||||
@@ -1806,13 +1818,14 @@ struct monst *mtmp;
|
|||||||
if (mtmp->mhpmax <= 0)
|
if (mtmp->mhpmax <= 0)
|
||||||
mtmp->mhpmax = 10;
|
mtmp->mhpmax = 10;
|
||||||
mtmp->mhp = mtmp->mhpmax;
|
mtmp->mhp = mtmp->mhpmax;
|
||||||
if (surviver)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* genocided monster can't be life-saved */
|
if (!surviver) {
|
||||||
if (cansee(mtmp->mx, mtmp->my))
|
/* genocided monster can't be life-saved */
|
||||||
pline("Unfortunately, %s is still genocided...", mon_nam(mtmp));
|
if (cansee(mtmp->mx, mtmp->my))
|
||||||
mtmp->mhp = 0;
|
pline("Unfortunately, %s is still genocided...",
|
||||||
|
mon_nam(mtmp));
|
||||||
|
mtmp->mhp = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2242,7 +2255,7 @@ int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mtmp->mtrapped && (t = t_at(x, y)) != 0
|
if (mtmp->mtrapped && (t = t_at(x, y)) != 0
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT)) {
|
&& is_pit(t->ttyp)) {
|
||||||
if (sobj_at(BOULDER, x, y))
|
if (sobj_at(BOULDER, x, y))
|
||||||
nocorpse = TRUE; /* Prevent corpses/treasure being created
|
nocorpse = TRUE; /* Prevent corpses/treasure being created
|
||||||
"on top" of boulder that is about to fall in.
|
"on top" of boulder that is about to fall in.
|
||||||
@@ -2887,7 +2900,8 @@ restartcham()
|
|||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
if (DEADMONSTER(mtmp))
|
if (DEADMONSTER(mtmp))
|
||||||
continue;
|
continue;
|
||||||
mtmp->cham = pm_to_cham(monsndx(mtmp->data));
|
if (!mtmp->mcan)
|
||||||
|
mtmp->cham = pm_to_cham(monsndx(mtmp->data));
|
||||||
if (mtmp->data->mlet == S_MIMIC && mtmp->msleeping
|
if (mtmp->data->mlet == S_MIMIC && mtmp->msleeping
|
||||||
&& cansee(mtmp->mx, mtmp->my)) {
|
&& cansee(mtmp->mx, mtmp->my)) {
|
||||||
set_mimic_sym(mtmp);
|
set_mimic_sym(mtmp);
|
||||||
@@ -2929,7 +2943,7 @@ register struct monst *mtmp;
|
|||||||
|| rn2(3) || mtmp == u.ustuck
|
|| rn2(3) || mtmp == u.ustuck
|
||||||
/* can't hide while trapped except in pits */
|
/* can't hide while trapped except in pits */
|
||||||
|| (mtmp->mtrapped && (t = t_at(mtmp->mx, mtmp->my)) != 0
|
|| (mtmp->mtrapped && (t = t_at(mtmp->mx, mtmp->my)) != 0
|
||||||
&& !(t->ttyp == PIT || t->ttyp == SPIKED_PIT))
|
&& !is_pit(t->ttyp))
|
||||||
|| (sensemon(mtmp) && distu(mtmp->mx, mtmp->my) <= 2))
|
|| (sensemon(mtmp) && distu(mtmp->mx, mtmp->my) <= 2))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -2957,7 +2971,7 @@ struct monst *mtmp;
|
|||||||
; /* can't hide if holding you or held by you */
|
; /* can't hide if holding you or held by you */
|
||||||
} else if (is_u ? (u.utrap && u.utraptype != TT_PIT)
|
} else if (is_u ? (u.utrap && u.utraptype != TT_PIT)
|
||||||
: (mtmp->mtrapped && (t = t_at(x, y)) != 0
|
: (mtmp->mtrapped && (t = t_at(x, y)) != 0
|
||||||
&& !(t->ttyp == PIT || t->ttyp == SPIKED_PIT))) {
|
&& !is_pit(t->ttyp))) {
|
||||||
; /* can't hide while stuck in a non-pit trap */
|
; /* can't hide while stuck in a non-pit trap */
|
||||||
} else if (mtmp->data->mlet == S_EEL) {
|
} else if (mtmp->data->mlet == S_EEL) {
|
||||||
undetected = (is_pool(x, y) && !Is_waterlevel(&u.uz));
|
undetected = (is_pool(x, y) && !Is_waterlevel(&u.uz));
|
||||||
@@ -3404,6 +3418,13 @@ boolean msg; /* "The oldmon turns into a newmon!" */
|
|||||||
anomalous extinction feedback during final disclsoure */
|
anomalous extinction feedback during final disclsoure */
|
||||||
if (mbirth_limit(monsndx(olddata)) < MAXMONNO)
|
if (mbirth_limit(monsndx(olddata)) < MAXMONNO)
|
||||||
return 0;
|
return 0;
|
||||||
|
/* cancelled shapechangers become uncancelled prior
|
||||||
|
to being given a new shape */
|
||||||
|
if (mtmp->mcan && !Protection_from_shape_changers) {
|
||||||
|
mtmp->cham = pm_to_cham(monsndx(mtmp->data));
|
||||||
|
if (mtmp->cham != NON_PM)
|
||||||
|
mtmp->mcan = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg) {
|
if (msg) {
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ int x, y;
|
|||||||
|
|
||||||
if (create && !((mtmp = m_at(x, y)) != 0 && mtmp->mtrapped
|
if (create && !((mtmp = m_at(x, y)) != 0 && mtmp->mtrapped
|
||||||
&& (t = t_at(x, y)) != 0
|
&& (t = t_at(x, y)) != 0
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT))) {
|
&& is_pit(t->ttyp))) {
|
||||||
int objgone = 0;
|
int objgone = 0;
|
||||||
|
|
||||||
if (down_gate(x, y) != -1)
|
if (down_gate(x, y) != -1)
|
||||||
|
|||||||
+2
-2
@@ -439,7 +439,7 @@ struct monst *mtmp;
|
|||||||
|| onscary(xx, yy, mtmp))
|
|| onscary(xx, yy, mtmp))
|
||||||
continue;
|
continue;
|
||||||
/* use trap if it's the correct type */
|
/* use trap if it's the correct type */
|
||||||
if ((t->ttyp == TRAPDOOR || t->ttyp == HOLE)
|
if (is_hole(t->ttyp)
|
||||||
&& !is_floater(mtmp->data)
|
&& !is_floater(mtmp->data)
|
||||||
&& !mtmp->isshk && !mtmp->isgd && !mtmp->ispriest
|
&& !mtmp->isshk && !mtmp->isgd && !mtmp->ispriest
|
||||||
&& Can_fall_thru(&u.uz)) {
|
&& Can_fall_thru(&u.uz)) {
|
||||||
@@ -489,7 +489,7 @@ struct monst *mtmp;
|
|||||||
|
|
||||||
/* kludge to cut down on trap destruction (particularly portals) */
|
/* kludge to cut down on trap destruction (particularly portals) */
|
||||||
t = t_at(x, y);
|
t = t_at(x, y);
|
||||||
if (t && (t->ttyp == PIT || t->ttyp == SPIKED_PIT || t->ttyp == WEB
|
if (t && (is_pit(t->ttyp) || t->ttyp == WEB
|
||||||
|| t->ttyp == BEAR_TRAP))
|
|| t->ttyp == BEAR_TRAP))
|
||||||
t = 0; /* ok for monster to dig here */
|
t = 0; /* ok for monster to dig here */
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -249,7 +249,7 @@ int force;
|
|||||||
unsigned tu_pit = 0;
|
unsigned tu_pit = 0;
|
||||||
|
|
||||||
if (trap_at_u)
|
if (trap_at_u)
|
||||||
tu_pit = (trap_at_u->ttyp == PIT || trap_at_u->ttyp == SPIKED_PIT);
|
tu_pit = is_pit(trap_at_u->ttyp);
|
||||||
start_x = u.ux - (force * 2);
|
start_x = u.ux - (force * 2);
|
||||||
start_y = u.uy - (force * 2);
|
start_y = u.uy - (force * 2);
|
||||||
end_x = u.ux + (force * 2);
|
end_x = u.ux + (force * 2);
|
||||||
|
|||||||
+1
-1
@@ -368,7 +368,7 @@ HELM("helm of telepathy", "visored helmet",
|
|||||||
* There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
|
* There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).
|
||||||
* (1) The dragon scale mails and the dragon scales are together.
|
* (1) The dragon scale mails and the dragon scales are together.
|
||||||
* (2) That the order of the dragon scale mail and dragon scales
|
* (2) That the order of the dragon scale mail and dragon scales
|
||||||
* is the the same as order of dragons defined in monst.c.
|
* is the same as order of dragons defined in monst.c.
|
||||||
*/
|
*/
|
||||||
#define DRGN_ARMR(name,mgc,power,cost,ac,color) \
|
#define DRGN_ARMR(name,mgc,power,cost,ac,color) \
|
||||||
ARMOR(name, None, 1, mgc, 1, power, 0, 5, 40, \
|
ARMOR(name, None, 1, mgc, 1, power, 0, 5, 40, \
|
||||||
|
|||||||
+7
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1533352036 2018/08/04 03:07:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.206 $ */
|
/* NetHack 3.6 objnam.c $NHDT-Date: 1537313446 2018/09/18 23:30:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.208 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -3204,6 +3204,11 @@ struct obj *no_wish;
|
|||||||
typ = SPE_BLANK_PAPER;
|
typ = SPE_BLANK_PAPER;
|
||||||
goto typfnd;
|
goto typfnd;
|
||||||
}
|
}
|
||||||
|
/* specific food rather than color of gem/potion/spellbook[/scales] */
|
||||||
|
if (!BSTRCMPI(bp, p - 6, "orange") && mntmp == NON_PM) {
|
||||||
|
typ = ORANGE;
|
||||||
|
goto typfnd;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* NOTE: Gold pieces are handled as objects nowadays, and therefore
|
* NOTE: Gold pieces are handled as objects nowadays, and therefore
|
||||||
* this section should probably be reconsidered as well as the entire
|
* this section should probably be reconsidered as well as the entire
|
||||||
@@ -3508,7 +3513,7 @@ wiztrap:
|
|||||||
if (strncmpi(tname, bp, strlen(tname)))
|
if (strncmpi(tname, bp, strlen(tname)))
|
||||||
continue;
|
continue;
|
||||||
/* found it; avoid stupid mistakes */
|
/* found it; avoid stupid mistakes */
|
||||||
if ((trap == TRAPDOOR || trap == HOLE) && !Can_fall_thru(&u.uz))
|
if (is_hole(trap) && !Can_fall_thru(&u.uz))
|
||||||
trap = ROCKTRAP;
|
trap = ROCKTRAP;
|
||||||
if ((t = maketrap(x, y, trap)) != 0) {
|
if ((t = maketrap(x, y, trap)) != 0) {
|
||||||
trap = t->ttyp;
|
trap = t->ttyp;
|
||||||
|
|||||||
+2
-1
@@ -173,7 +173,8 @@ static struct Bool_Opt {
|
|||||||
#else
|
#else
|
||||||
{ "page_wait", (boolean *) 0, FALSE, SET_IN_FILE },
|
{ "page_wait", (boolean *) 0, FALSE, SET_IN_FILE },
|
||||||
#endif
|
#endif
|
||||||
{ "perm_invent", &flags.perm_invent, FALSE, SET_IN_GAME },
|
/* 3.6.2: move perm_invent from flags to inflags and out of save file */
|
||||||
|
{ "perm_invent", &iflags.perm_invent, FALSE, SET_IN_GAME },
|
||||||
{ "pickup_thrown", &flags.pickup_thrown, TRUE, SET_IN_GAME },
|
{ "pickup_thrown", &flags.pickup_thrown, TRUE, SET_IN_GAME },
|
||||||
{ "popup_dialog", &iflags.wc_popup_dialog, FALSE, SET_IN_GAME }, /*WC*/
|
{ "popup_dialog", &iflags.wc_popup_dialog, FALSE, SET_IN_GAME }, /*WC*/
|
||||||
{ "preload_tiles", &iflags.wc_preload_tiles, TRUE, DISP_IN_GAME }, /*WC*/
|
{ "preload_tiles", &iflags.wc_preload_tiles, TRUE, DISP_IN_GAME }, /*WC*/
|
||||||
|
|||||||
+90
-16
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 pager.c $NHDT-Date: 1523142395 2018/04/07 23:06:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.123 $ */
|
/* NetHack 3.6 pager.c $NHDT-Date: 1537477571 2018/09/20 21:06:11 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.129 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -16,8 +16,9 @@ STATIC_DCL void FDECL(look_at_monster, (char *, char *,
|
|||||||
struct monst *, int, int));
|
struct monst *, int, int));
|
||||||
STATIC_DCL struct permonst *FDECL(lookat, (int, int, char *, char *));
|
STATIC_DCL struct permonst *FDECL(lookat, (int, int, char *, char *));
|
||||||
STATIC_DCL void FDECL(checkfile, (char *, struct permonst *,
|
STATIC_DCL void FDECL(checkfile, (char *, struct permonst *,
|
||||||
BOOLEAN_P, BOOLEAN_P));
|
BOOLEAN_P, BOOLEAN_P, char *));
|
||||||
STATIC_DCL void FDECL(look_all, (BOOLEAN_P,BOOLEAN_P));
|
STATIC_DCL void FDECL(look_all, (BOOLEAN_P,BOOLEAN_P));
|
||||||
|
STATIC_DCL void FDECL(do_supplemental_info, (char *, struct permonst *,BOOLEAN_P));
|
||||||
STATIC_DCL void NDECL(whatdoes_help);
|
STATIC_DCL void NDECL(whatdoes_help);
|
||||||
STATIC_DCL void NDECL(docontact);
|
STATIC_DCL void NDECL(docontact);
|
||||||
STATIC_DCL void NDECL(dispfile_help);
|
STATIC_DCL void NDECL(dispfile_help);
|
||||||
@@ -279,7 +280,7 @@ int x, y;
|
|||||||
int tt = t ? t->ttyp : NO_TRAP;
|
int tt = t ? t->ttyp : NO_TRAP;
|
||||||
|
|
||||||
/* newsym lets you know of the trap, so mention it here */
|
/* newsym lets you know of the trap, so mention it here */
|
||||||
if (tt == BEAR_TRAP || tt == PIT || tt == SPIKED_PIT || tt == WEB)
|
if (tt == BEAR_TRAP || is_pit(tt) || tt == WEB)
|
||||||
Sprintf(eos(buf), ", trapped in %s",
|
Sprintf(eos(buf), ", trapped in %s",
|
||||||
an(defsyms[trap_to_defsym(tt)].explanation));
|
an(defsyms[trap_to_defsym(tt)].explanation));
|
||||||
}
|
}
|
||||||
@@ -509,10 +510,11 @@ char *buf, *monbuf;
|
|||||||
* Therefore, we create a copy of inp _just_ for data.base lookup.
|
* Therefore, we create a copy of inp _just_ for data.base lookup.
|
||||||
*/
|
*/
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
checkfile(inp, pm, user_typed_name, without_asking)
|
checkfile(inp, pm, user_typed_name, without_asking, supplemental_name)
|
||||||
char *inp;
|
char *inp;
|
||||||
struct permonst *pm;
|
struct permonst *pm;
|
||||||
boolean user_typed_name, without_asking;
|
boolean user_typed_name, without_asking;
|
||||||
|
char *supplemental_name;
|
||||||
{
|
{
|
||||||
dlb *fp;
|
dlb *fp;
|
||||||
char buf[BUFSZ], newstr[BUFSZ], givenname[BUFSZ];
|
char buf[BUFSZ], newstr[BUFSZ], givenname[BUFSZ];
|
||||||
@@ -619,7 +621,7 @@ boolean user_typed_name, without_asking;
|
|||||||
int chk_skip, pass = 1;
|
int chk_skip, pass = 1;
|
||||||
boolean yes_to_moreinfo, found_in_file, pass1found_in_file,
|
boolean yes_to_moreinfo, found_in_file, pass1found_in_file,
|
||||||
skipping_entry;
|
skipping_entry;
|
||||||
char *ap, *alt = 0; /* alternate description */
|
char *sp, *ap, *alt = 0; /* alternate description */
|
||||||
|
|
||||||
/* adjust the input to remove "named " and "called " */
|
/* adjust the input to remove "named " and "called " */
|
||||||
if ((ep = strstri(dbase_str, " named ")) != 0) {
|
if ((ep = strstri(dbase_str, " named ")) != 0) {
|
||||||
@@ -629,6 +631,8 @@ boolean user_typed_name, without_asking;
|
|||||||
} else if ((ep = strstri(dbase_str, " called ")) != 0) {
|
} else if ((ep = strstri(dbase_str, " called ")) != 0) {
|
||||||
copynchars(givenname, ep + 8, BUFSZ - 1);
|
copynchars(givenname, ep + 8, BUFSZ - 1);
|
||||||
alt = givenname;
|
alt = givenname;
|
||||||
|
if (supplemental_name && (sp = strstri(inp, " called ")) != 0)
|
||||||
|
copynchars(supplemental_name, sp + 8, BUFSZ - 1);
|
||||||
} else
|
} else
|
||||||
ep = strstri(dbase_str, ", ");
|
ep = strstri(dbase_str, ", ");
|
||||||
if (ep && ep > dbase_str)
|
if (ep && ep > dbase_str)
|
||||||
@@ -760,12 +764,13 @@ boolean user_typed_name, without_asking;
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
do_screen_description(cc, looked, sym, out_str, firstmatch)
|
do_screen_description(cc, looked, sym, out_str, firstmatch, for_supplement)
|
||||||
coord cc;
|
coord cc;
|
||||||
boolean looked;
|
boolean looked;
|
||||||
int sym;
|
int sym;
|
||||||
char *out_str;
|
char *out_str;
|
||||||
const char **firstmatch;
|
const char **firstmatch;
|
||||||
|
struct permonst **for_supplement;
|
||||||
{
|
{
|
||||||
static const char mon_interior[] = "the interior of a monster",
|
static const char mon_interior[] = "the interior of a monster",
|
||||||
unreconnoitered[] = "unreconnoitered";
|
unreconnoitered[] = "unreconnoitered";
|
||||||
@@ -1008,11 +1013,15 @@ const char **firstmatch;
|
|||||||
|
|
||||||
didlook:
|
didlook:
|
||||||
if (looked) {
|
if (looked) {
|
||||||
|
struct permonst *pm = (struct permonst *)0;
|
||||||
|
|
||||||
if (found > 1 || need_to_look) {
|
if (found > 1 || need_to_look) {
|
||||||
char monbuf[BUFSZ];
|
char monbuf[BUFSZ];
|
||||||
char temp_buf[BUFSZ];
|
char temp_buf[BUFSZ];
|
||||||
|
|
||||||
(void) lookat(cc.x, cc.y, look_buf, monbuf);
|
pm = lookat(cc.x, cc.y, look_buf, monbuf);
|
||||||
|
if (pm && for_supplement)
|
||||||
|
*for_supplement = pm;
|
||||||
*firstmatch = look_buf;
|
*firstmatch = look_buf;
|
||||||
if (*(*firstmatch)) {
|
if (*(*firstmatch)) {
|
||||||
Sprintf(temp_buf, " (%s)", *firstmatch);
|
Sprintf(temp_buf, " (%s)", *firstmatch);
|
||||||
@@ -1043,7 +1052,7 @@ coord *click_cc;
|
|||||||
boolean clicklook = (mode == 2); /* right mouse-click method */
|
boolean clicklook = (mode == 2); /* right mouse-click method */
|
||||||
char out_str[BUFSZ] = DUMMY;
|
char out_str[BUFSZ] = DUMMY;
|
||||||
const char *firstmatch = 0;
|
const char *firstmatch = 0;
|
||||||
struct permonst *pm = 0;
|
struct permonst *pm = 0, *supplemental_pm = 0;
|
||||||
int i = '\0', ans = 0;
|
int i = '\0', ans = 0;
|
||||||
int sym; /* typed symbol or converted glyph */
|
int sym; /* typed symbol or converted glyph */
|
||||||
int found; /* count of matching syms found */
|
int found; /* count of matching syms found */
|
||||||
@@ -1137,7 +1146,7 @@ coord *click_cc;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*out_str)
|
if (*out_str)
|
||||||
checkfile(out_str, pm, TRUE, TRUE);
|
checkfile(out_str, pm, TRUE, TRUE, (char *) 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case '?':
|
case '?':
|
||||||
@@ -1151,7 +1160,7 @@ coord *click_cc;
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (out_str[1]) { /* user typed in a complete string */
|
if (out_str[1]) { /* user typed in a complete string */
|
||||||
checkfile(out_str, pm, TRUE, TRUE);
|
checkfile(out_str, pm, TRUE, TRUE, (char *) 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sym = out_str[0];
|
sym = out_str[0];
|
||||||
@@ -1204,7 +1213,7 @@ coord *click_cc;
|
|||||||
}
|
}
|
||||||
|
|
||||||
found = do_screen_description(cc, (from_screen || clicklook), sym,
|
found = do_screen_description(cc, (from_screen || clicklook), sym,
|
||||||
out_str, &firstmatch);
|
out_str, &firstmatch, &supplemental_pm);
|
||||||
|
|
||||||
/* Finally, print out our explanation. */
|
/* Finally, print out our explanation. */
|
||||||
if (found) {
|
if (found) {
|
||||||
@@ -1215,16 +1224,19 @@ coord *click_cc;
|
|||||||
if (found == 1 && ans != LOOK_QUICK && ans != LOOK_ONCE
|
if (found == 1 && ans != LOOK_QUICK && ans != LOOK_ONCE
|
||||||
&& (ans == LOOK_VERBOSE || (flags.help && !quick))
|
&& (ans == LOOK_VERBOSE || (flags.help && !quick))
|
||||||
&& !clicklook) {
|
&& !clicklook) {
|
||||||
char temp_buf[BUFSZ];
|
char temp_buf[BUFSZ], supplemental_name[BUFSZ];
|
||||||
|
|
||||||
|
supplemental_name[0] = '\0';
|
||||||
Strcpy(temp_buf, firstmatch);
|
Strcpy(temp_buf, firstmatch);
|
||||||
checkfile(temp_buf, pm, FALSE,
|
checkfile(temp_buf, pm, FALSE,
|
||||||
(boolean) (ans == LOOK_VERBOSE));
|
(boolean) (ans == LOOK_VERBOSE), supplemental_name);
|
||||||
|
if (supplemental_pm)
|
||||||
|
do_supplemental_info(supplemental_name, supplemental_pm,
|
||||||
|
(boolean) (ans == LOOK_VERBOSE));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pline("I've never heard of such things.");
|
pline("I've never heard of such things.");
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (from_screen && !quick && ans != LOOK_ONCE && !clicklook);
|
} while (from_screen && !quick && ans != LOOK_ONCE && !clicklook);
|
||||||
|
|
||||||
flags.verbose = save_verbose;
|
flags.verbose = save_verbose;
|
||||||
@@ -1319,6 +1331,69 @@ boolean do_mons; /* True => monsters, False => objects */
|
|||||||
destroy_nhwindow(win);
|
destroy_nhwindow(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
do_supplemental_info(name, pm, without_asking)
|
||||||
|
char *name;
|
||||||
|
struct permonst *pm;
|
||||||
|
boolean without_asking;
|
||||||
|
{
|
||||||
|
winid datawin = WIN_ERR;
|
||||||
|
char *entrytext = name, *bp;
|
||||||
|
char question[QBUFSZ];
|
||||||
|
boolean yes_to_moreinfo = FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Provide some info on some specific things
|
||||||
|
* meant to support in-game mythology, and not
|
||||||
|
* available from data.base or other sources.
|
||||||
|
*/
|
||||||
|
if (name && pm && is_orc(pm) &&
|
||||||
|
(strlen(name) < (BUFSZ - 1)) &&
|
||||||
|
(bp = strstri(name, " of ")) != 0) {
|
||||||
|
char fullname[BUFSZ];
|
||||||
|
|
||||||
|
Strcpy(fullname, name);
|
||||||
|
if (!without_asking) {
|
||||||
|
Strcpy(question, "More info about \"");
|
||||||
|
/* +2 => length of "\"?" */
|
||||||
|
copynchars(eos(question), entrytext,
|
||||||
|
(int) (sizeof question - 1 - (strlen(question) + 2)));
|
||||||
|
Strcat(question, "\"?");
|
||||||
|
if (yn(question) == 'y')
|
||||||
|
yes_to_moreinfo = TRUE;
|
||||||
|
}
|
||||||
|
if (yes_to_moreinfo) {
|
||||||
|
int i, subs = 0;
|
||||||
|
char *gang = bp + 4;
|
||||||
|
static const char *text[] = {
|
||||||
|
"%s is a member of a marauding horde of orcs",
|
||||||
|
"rumored to have brutally attacked and plundered the ordinarily",
|
||||||
|
"sheltered town that is located deep within The Gnomish Mines.",
|
||||||
|
"",
|
||||||
|
"The members of that vicious horde proudly and defiantly acclaim",
|
||||||
|
"their allegiance to their leader %s in their names.",
|
||||||
|
};
|
||||||
|
|
||||||
|
*bp = '\0';
|
||||||
|
datawin = create_nhwindow(NHW_MENU);
|
||||||
|
for (i = 0; i < SIZE(text); i++) {
|
||||||
|
char buf[BUFSZ];
|
||||||
|
const char *txt;
|
||||||
|
|
||||||
|
if (strstri(text[i], "%s") != 0) {
|
||||||
|
Sprintf(buf, text[i],
|
||||||
|
subs++ ? gang : fullname);
|
||||||
|
txt = buf;
|
||||||
|
} else
|
||||||
|
txt = text[i];
|
||||||
|
putstr(datawin, 0, txt);
|
||||||
|
}
|
||||||
|
display_nhwindow(datawin, FALSE);
|
||||||
|
destroy_nhwindow(datawin), datawin = WIN_ERR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* the '/' command */
|
/* the '/' command */
|
||||||
int
|
int
|
||||||
dowhatis()
|
dowhatis()
|
||||||
@@ -1362,8 +1437,7 @@ doidtrap()
|
|||||||
break;
|
break;
|
||||||
tt = trap->ttyp;
|
tt = trap->ttyp;
|
||||||
if (u.dz) {
|
if (u.dz) {
|
||||||
if (u.dz < 0 ? (tt == TRAPDOOR || tt == HOLE)
|
if (u.dz < 0 ? is_hole(tt) : tt == ROCKTRAP)
|
||||||
: tt == ROCKTRAP)
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tt = what_trap(tt);
|
tt = what_trap(tt);
|
||||||
|
|||||||
+1
-1
@@ -921,7 +921,7 @@ aligntyp g_align;
|
|||||||
* - fix all of your problems;
|
* - fix all of your problems;
|
||||||
* - do you a gratuitous favor.
|
* - do you a gratuitous favor.
|
||||||
*
|
*
|
||||||
* If you make it to the the last category, you roll randomly again
|
* If you make it to the last category, you roll randomly again
|
||||||
* to see what they do for you.
|
* to see what they do for you.
|
||||||
*
|
*
|
||||||
* If your luck is at least 0, then you are guaranteed rescued from
|
* If your luck is at least 0, then you are guaranteed rescued from
|
||||||
|
|||||||
+8
-4
@@ -543,9 +543,12 @@ unsigned int *stuckid, *steedid;
|
|||||||
/* avoid keeping permanent inventory window up to date during restore
|
/* avoid keeping permanent inventory window up to date during restore
|
||||||
(setworn() calls update_inventory); attempting to include the cost
|
(setworn() calls update_inventory); attempting to include the cost
|
||||||
of unpaid items before shopkeeper's bill is available is a no-no;
|
of unpaid items before shopkeeper's bill is available is a no-no;
|
||||||
named fruit names aren't accessible yet either */
|
named fruit names aren't accessible yet either
|
||||||
defer_perm_invent = flags.perm_invent;
|
[3.6.2: moved perm_invent from flags to iflags to keep it out of
|
||||||
flags.perm_invent = FALSE;
|
save files; retaining the override here is simpler than trying to
|
||||||
|
to figure out where it really belongs now] */
|
||||||
|
defer_perm_invent = iflags.perm_invent;
|
||||||
|
iflags.perm_invent = FALSE;
|
||||||
/* wizard and discover are actually flags.debug and flags.explore;
|
/* wizard and discover are actually flags.debug and flags.explore;
|
||||||
player might be overriding the save file values for them;
|
player might be overriding the save file values for them;
|
||||||
in the discover case, we don't want to set that for a normal
|
in the discover case, we don't want to set that for a normal
|
||||||
@@ -595,6 +598,7 @@ unsigned int *stuckid, *steedid;
|
|||||||
u.uz.dlevel = 1;
|
u.uz.dlevel = 1;
|
||||||
/* revert to pre-restore option settings */
|
/* revert to pre-restore option settings */
|
||||||
iflags.deferred_X = FALSE;
|
iflags.deferred_X = FALSE;
|
||||||
|
iflags.perm_invent = defer_perm_invent;
|
||||||
flags = newgameflags;
|
flags = newgameflags;
|
||||||
#ifdef SYSFLAGS
|
#ifdef SYSFLAGS
|
||||||
sysflags = newgamesysflags;
|
sysflags = newgamesysflags;
|
||||||
@@ -672,7 +676,7 @@ unsigned int *stuckid, *steedid;
|
|||||||
relink_timers(FALSE);
|
relink_timers(FALSE);
|
||||||
relink_light_sources(FALSE);
|
relink_light_sources(FALSE);
|
||||||
/* inventory display is now viable */
|
/* inventory display is now viable */
|
||||||
flags.perm_invent = defer_perm_invent;
|
iflags.perm_invent = defer_perm_invent;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-33
@@ -2660,8 +2660,7 @@ fill_empty_maze()
|
|||||||
maze1xy(&mm, DRY);
|
maze1xy(&mm, DRY);
|
||||||
trytrap = rndtrap();
|
trytrap = rndtrap();
|
||||||
if (sobj_at(BOULDER, mm.x, mm.y))
|
if (sobj_at(BOULDER, mm.x, mm.y))
|
||||||
while (trytrap == PIT || trytrap == SPIKED_PIT
|
while (is_pit(trytrap) || is_hole(trytrap))
|
||||||
|| trytrap == TRAPDOOR || trytrap == HOLE)
|
|
||||||
trytrap = rndtrap();
|
trytrap = rndtrap();
|
||||||
(void) maketrap(mm.x, mm.y, trytrap);
|
(void) maketrap(mm.x, mm.y, trytrap);
|
||||||
}
|
}
|
||||||
@@ -3828,7 +3827,7 @@ selection_do_grow(ov, dir)
|
|||||||
struct opvar *ov;
|
struct opvar *ov;
|
||||||
int dir;
|
int dir;
|
||||||
{
|
{
|
||||||
int x, y, c;
|
int x, y;
|
||||||
char tmp[COLNO][ROWNO];
|
char tmp[COLNO][ROWNO];
|
||||||
|
|
||||||
if (ov->spovartyp != SPOVAR_SEL)
|
if (ov->spovartyp != SPOVAR_SEL)
|
||||||
@@ -3836,40 +3835,31 @@ int dir;
|
|||||||
if (!ov)
|
if (!ov)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
(void) memset(tmp, 0, sizeof(tmp));
|
(void) memset(tmp, 0, sizeof tmp);
|
||||||
|
|
||||||
for (x = 0; x < COLNO; x++)
|
for (x = 1; x < COLNO; x++)
|
||||||
for (y = 0; y < ROWNO; y++) {
|
for (y = 0; y < ROWNO; y++) {
|
||||||
c = 0;
|
/* note: dir is a mask of multiple directions, but the only
|
||||||
if ((dir & W_WEST) && (x > 0)
|
way to specify diagonals is by including the two adjacent
|
||||||
&& (selection_getpoint(x - 1, y, ov)))
|
orthogonal directions, which effectively specifies three-
|
||||||
c++;
|
way growth [WEST|NORTH => WEST plus WEST|NORTH plus NORTH] */
|
||||||
if ((dir & (W_WEST | W_NORTH)) && (x > 0) && (y > 0)
|
if (((dir & W_WEST) && selection_getpoint(x + 1, y, ov))
|
||||||
&& (selection_getpoint(x - 1, y - 1, ov)))
|
|| (((dir & (W_WEST | W_NORTH)) == (W_WEST | W_NORTH))
|
||||||
c++;
|
&& selection_getpoint(x + 1, y + 1, ov))
|
||||||
if ((dir & W_NORTH) && (y > 0)
|
|| ((dir & W_NORTH) && selection_getpoint(x, y + 1, ov))
|
||||||
&& (selection_getpoint(x, y - 1, ov)))
|
|| (((dir & (W_NORTH | W_EAST)) == (W_NORTH | W_EAST))
|
||||||
c++;
|
&& selection_getpoint(x - 1, y + 1, ov))
|
||||||
if ((dir & (W_NORTH | W_EAST)) && (y > 0) && (x < COLNO - 1)
|
|| ((dir & W_EAST) && selection_getpoint(x - 1, y, ov))
|
||||||
&& (selection_getpoint(x + 1, y - 1, ov)))
|
|| (((dir & (W_EAST | W_SOUTH)) == (W_EAST | W_SOUTH))
|
||||||
c++;
|
&& selection_getpoint(x - 1, y - 1, ov))
|
||||||
if ((dir & W_EAST) && (x < COLNO - 1)
|
|| ((dir & W_SOUTH) && selection_getpoint(x, y - 1, ov))
|
||||||
&& (selection_getpoint(x + 1, y, ov)))
|
|| (((dir & (W_SOUTH | W_WEST)) == (W_SOUTH | W_WEST))
|
||||||
c++;
|
&& selection_getpoint(x + 1, y - 1, ov))) {
|
||||||
if ((dir & (W_EAST | W_SOUTH)) && (x < COLNO - 1)
|
|
||||||
&& (y < ROWNO - 1) && (selection_getpoint(x + 1, y + 1, ov)))
|
|
||||||
c++;
|
|
||||||
if ((dir & W_SOUTH) && (y < ROWNO - 1)
|
|
||||||
&& (selection_getpoint(x, y + 1, ov)))
|
|
||||||
c++;
|
|
||||||
if ((dir & (W_SOUTH | W_WEST)) && (y < ROWNO - 1) && (x > 0)
|
|
||||||
&& (selection_getpoint(x - 1, y + 1, ov)))
|
|
||||||
c++;
|
|
||||||
if (c)
|
|
||||||
tmp[x][y] = 1;
|
tmp[x][y] = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (x = 0; x < COLNO; x++)
|
for (x = 1; x < COLNO; x++)
|
||||||
for (y = 0; y < ROWNO; y++)
|
for (y = 0; y < ROWNO; y++)
|
||||||
if (tmp[x][y])
|
if (tmp[x][y])
|
||||||
selection_setpoint(x, y, ov, 1);
|
selection_setpoint(x, y, ov, 1);
|
||||||
@@ -4495,7 +4485,7 @@ ensure_way_out()
|
|||||||
|
|
||||||
while (ttmp) {
|
while (ttmp) {
|
||||||
if ((ttmp->ttyp == MAGIC_PORTAL || ttmp->ttyp == VIBRATING_SQUARE
|
if ((ttmp->ttyp == MAGIC_PORTAL || ttmp->ttyp == VIBRATING_SQUARE
|
||||||
|| ttmp->ttyp == HOLE || ttmp->ttyp == TRAPDOOR)
|
|| is_hole(ttmp->ttyp))
|
||||||
&& !selection_getpoint(ttmp->tx, ttmp->ty, ov))
|
&& !selection_getpoint(ttmp->tx, ttmp->ty, ov))
|
||||||
selection_floodfill(ov, ttmp->tx, ttmp->ty, TRUE);
|
selection_floodfill(ov, ttmp->tx, ttmp->ty, TRUE);
|
||||||
ttmp = ttmp->ntrap;
|
ttmp = ttmp->ntrap;
|
||||||
|
|||||||
+1
-1
@@ -1159,7 +1159,7 @@ int in_sight;
|
|||||||
d_level tolevel;
|
d_level tolevel;
|
||||||
int migrate_typ = MIGR_RANDOM;
|
int migrate_typ = MIGR_RANDOM;
|
||||||
|
|
||||||
if ((tt == HOLE || tt == TRAPDOOR)) {
|
if (is_hole(tt)) {
|
||||||
if (Is_stronghold(&u.uz)) {
|
if (Is_stronghold(&u.uz)) {
|
||||||
assign_level(&tolevel, &valley_level);
|
assign_level(&tolevel, &valley_level);
|
||||||
} else if (Is_botlevel(&u.uz)) {
|
} else if (Is_botlevel(&u.uz)) {
|
||||||
|
|||||||
+64
-70
@@ -7,6 +7,15 @@
|
|||||||
|
|
||||||
extern const char *const destroy_strings[][3]; /* from zap.c */
|
extern const char *const destroy_strings[][3]; /* from zap.c */
|
||||||
|
|
||||||
|
STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse, (unsigned, struct obj *,
|
||||||
|
struct obj *));
|
||||||
|
STATIC_DCL struct obj *FDECL(t_missile, (int, struct trap *));
|
||||||
|
STATIC_DCL char *FDECL(trapnote, (struct trap *, BOOLEAN_P));
|
||||||
|
STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *));
|
||||||
|
STATIC_DCL void FDECL(launch_drop_spot, (struct obj *, XCHAR_P, XCHAR_P));
|
||||||
|
STATIC_DCL int FDECL(mkroll_launch, (struct trap *, XCHAR_P, XCHAR_P,
|
||||||
|
SHORT_P, long));
|
||||||
|
STATIC_DCL boolean FDECL(isclearpath, (coord *, int, SCHAR_P, SCHAR_P));
|
||||||
STATIC_DCL void FDECL(dofiretrap, (struct obj *));
|
STATIC_DCL void FDECL(dofiretrap, (struct obj *));
|
||||||
STATIC_DCL void NDECL(domagictrap);
|
STATIC_DCL void NDECL(domagictrap);
|
||||||
STATIC_DCL boolean FDECL(emergency_disrobe, (boolean *));
|
STATIC_DCL boolean FDECL(emergency_disrobe, (boolean *));
|
||||||
@@ -18,26 +27,16 @@ STATIC_DCL int FDECL(disarm_holdingtrap, (struct trap *));
|
|||||||
STATIC_DCL int FDECL(disarm_landmine, (struct trap *));
|
STATIC_DCL int FDECL(disarm_landmine, (struct trap *));
|
||||||
STATIC_DCL int FDECL(disarm_squeaky_board, (struct trap *));
|
STATIC_DCL int FDECL(disarm_squeaky_board, (struct trap *));
|
||||||
STATIC_DCL int FDECL(disarm_shooting_trap, (struct trap *, int));
|
STATIC_DCL int FDECL(disarm_shooting_trap, (struct trap *, int));
|
||||||
|
STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *));
|
||||||
|
STATIC_DCL boolean FDECL(adj_nonconjoined_pit, (struct trap *));
|
||||||
STATIC_DCL int FDECL(try_lift, (struct monst *, struct trap *, int,
|
STATIC_DCL int FDECL(try_lift, (struct monst *, struct trap *, int,
|
||||||
BOOLEAN_P));
|
BOOLEAN_P));
|
||||||
STATIC_DCL int FDECL(help_monster_out, (struct monst *, struct trap *));
|
STATIC_DCL int FDECL(help_monster_out, (struct monst *, struct trap *));
|
||||||
STATIC_DCL boolean FDECL(thitm, (int, struct monst *, struct obj *, int,
|
|
||||||
BOOLEAN_P));
|
|
||||||
STATIC_DCL void FDECL(launch_drop_spot, (struct obj *, XCHAR_P, XCHAR_P));
|
|
||||||
STATIC_DCL int FDECL(mkroll_launch, (struct trap *, XCHAR_P, XCHAR_P,
|
|
||||||
SHORT_P, long));
|
|
||||||
STATIC_DCL boolean FDECL(isclearpath, (coord *, int, SCHAR_P, SCHAR_P));
|
|
||||||
STATIC_DCL char *FDECL(trapnote, (struct trap *, BOOLEAN_P));
|
|
||||||
#if 0
|
#if 0
|
||||||
STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *));
|
STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *));
|
||||||
#endif
|
#endif
|
||||||
STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *));
|
STATIC_DCL boolean FDECL(thitm, (int, struct monst *, struct obj *, int,
|
||||||
STATIC_DCL boolean FDECL(adj_nonconjoined_pit, (struct trap *));
|
BOOLEAN_P));
|
||||||
|
|
||||||
STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *));
|
|
||||||
STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse, (unsigned,
|
|
||||||
struct obj *,
|
|
||||||
struct obj *));
|
|
||||||
STATIC_DCL void NDECL(maybe_finish_sokoban);
|
STATIC_DCL void NDECL(maybe_finish_sokoban);
|
||||||
|
|
||||||
/* mintrap() should take a flags argument, but for time being we use this */
|
/* mintrap() should take a flags argument, but for time being we use this */
|
||||||
@@ -328,8 +327,7 @@ int x, y, typ;
|
|||||||
if (u.utrap && x == u.ux && y == u.uy
|
if (u.utrap && x == u.ux && y == u.uy
|
||||||
&& ((u.utraptype == TT_BEARTRAP && typ != BEAR_TRAP)
|
&& ((u.utraptype == TT_BEARTRAP && typ != BEAR_TRAP)
|
||||||
|| (u.utraptype == TT_WEB && typ != WEB)
|
|| (u.utraptype == TT_WEB && typ != WEB)
|
||||||
|| (u.utraptype == TT_PIT && typ != PIT
|
|| (u.utraptype == TT_PIT && !is_pit(typ))))
|
||||||
&& typ != SPIKED_PIT)))
|
|
||||||
u.utrap = 0;
|
u.utrap = 0;
|
||||||
/* old <tx,ty> remain valid */
|
/* old <tx,ty> remain valid */
|
||||||
} else if (IS_FURNITURE(lev->typ)
|
} else if (IS_FURNITURE(lev->typ)
|
||||||
@@ -407,8 +405,7 @@ int x, y, typ;
|
|||||||
case HOLE:
|
case HOLE:
|
||||||
case TRAPDOOR:
|
case TRAPDOOR:
|
||||||
if (*in_rooms(x, y, SHOPBASE)
|
if (*in_rooms(x, y, SHOPBASE)
|
||||||
&& (typ == HOLE || typ == TRAPDOOR
|
&& (is_hole(typ) || IS_DOOR(lev->typ) || IS_WALL(lev->typ)))
|
||||||
|| IS_DOOR(lev->typ) || IS_WALL(lev->typ)))
|
|
||||||
add_damage(x, y, /* schedule repair */
|
add_damage(x, y, /* schedule repair */
|
||||||
((IS_DOOR(lev->typ) || IS_WALL(lev->typ))
|
((IS_DOOR(lev->typ) || IS_WALL(lev->typ))
|
||||||
&& !context.mon_moving)
|
&& !context.mon_moving)
|
||||||
@@ -841,6 +838,21 @@ struct trap *trap;
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make a single arrow/dart/rock for a trap to shoot or drop */
|
||||||
|
STATIC_OVL struct obj *
|
||||||
|
t_missile(otyp, trap)
|
||||||
|
int otyp;
|
||||||
|
struct trap *trap;
|
||||||
|
{
|
||||||
|
struct obj *otmp = mksobj(otyp, TRUE, FALSE);
|
||||||
|
|
||||||
|
otmp->quan = 1L;
|
||||||
|
otmp->owt = weight(otmp);
|
||||||
|
otmp->opoisoned = 0;
|
||||||
|
otmp->ox = trap->tx, otmp->oy = trap->ty;
|
||||||
|
return otmp;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dotrap(trap, trflags)
|
dotrap(trap, trflags)
|
||||||
register struct trap *trap;
|
register struct trap *trap;
|
||||||
@@ -862,8 +874,7 @@ unsigned trflags;
|
|||||||
nomul(0);
|
nomul(0);
|
||||||
|
|
||||||
/* KMH -- You can't escape the Sokoban level traps */
|
/* KMH -- You can't escape the Sokoban level traps */
|
||||||
if (Sokoban && (ttype == PIT || ttype == SPIKED_PIT
|
if (Sokoban && (is_pit(ttype) || is_hole(ttype))) {
|
||||||
|| ttype == HOLE || ttype == TRAPDOOR)) {
|
|
||||||
/* The "air currents" message is still appropriate -- even when
|
/* The "air currents" message is still appropriate -- even when
|
||||||
* the hero isn't flying or levitating -- because it conveys the
|
* the hero isn't flying or levitating -- because it conveys the
|
||||||
* reason why the player cannot escape the trap with a dexterity
|
* reason why the player cannot escape the trap with a dexterity
|
||||||
@@ -875,7 +886,7 @@ unsigned trflags;
|
|||||||
/* then proceed to normal trap effect */
|
/* then proceed to normal trap effect */
|
||||||
} else if (already_seen && !forcetrap) {
|
} else if (already_seen && !forcetrap) {
|
||||||
if ((Levitation || (Flying && !plunged))
|
if ((Levitation || (Flying && !plunged))
|
||||||
&& (ttype == PIT || ttype == SPIKED_PIT || ttype == HOLE
|
&& (is_pit(ttype) || ttype == HOLE
|
||||||
|| ttype == BEAR_TRAP)) {
|
|| ttype == BEAR_TRAP)) {
|
||||||
You("%s over %s %s.", Levitation ? "float" : "fly",
|
You("%s over %s %s.", Levitation ? "float" : "fly",
|
||||||
a_your[trap->madeby_u],
|
a_your[trap->madeby_u],
|
||||||
@@ -885,7 +896,7 @@ unsigned trflags;
|
|||||||
if (!Fumbling && ttype != MAGIC_PORTAL && ttype != VIBRATING_SQUARE
|
if (!Fumbling && ttype != MAGIC_PORTAL && ttype != VIBRATING_SQUARE
|
||||||
&& ttype != ANTI_MAGIC && !forcebungle && !plunged
|
&& ttype != ANTI_MAGIC && !forcebungle && !plunged
|
||||||
&& !conj_pit && !adj_pit
|
&& !conj_pit && !adj_pit
|
||||||
&& (!rn2(5) || ((ttype == PIT || ttype == SPIKED_PIT)
|
&& (!rn2(5) || (is_pit(ttype)
|
||||||
&& is_clinger(youmonst.data)))) {
|
&& is_clinger(youmonst.data)))) {
|
||||||
You("escape %s %s.", (ttype == ARROW_TRAP && !trap->madeby_u)
|
You("escape %s %s.", (ttype == ARROW_TRAP && !trap->madeby_u)
|
||||||
? "an"
|
? "an"
|
||||||
@@ -914,12 +925,9 @@ unsigned trflags;
|
|||||||
trap->once = 1;
|
trap->once = 1;
|
||||||
seetrap(trap);
|
seetrap(trap);
|
||||||
pline("An arrow shoots out at you!");
|
pline("An arrow shoots out at you!");
|
||||||
otmp = mksobj(ARROW, TRUE, FALSE);
|
otmp = t_missile(ARROW, trap);
|
||||||
otmp->quan = 1L;
|
if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) {
|
||||||
otmp->owt = weight(otmp);
|
; /* nothing */
|
||||||
otmp->opoisoned = 0;
|
|
||||||
if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) { /* nothing */
|
|
||||||
;
|
|
||||||
} else if (thitu(8, dmgval(otmp, &youmonst), &otmp, "arrow")) {
|
} else if (thitu(8, dmgval(otmp, &youmonst), &otmp, "arrow")) {
|
||||||
if (otmp)
|
if (otmp)
|
||||||
obfree(otmp, (struct obj *) 0);
|
obfree(otmp, (struct obj *) 0);
|
||||||
@@ -942,14 +950,12 @@ unsigned trflags;
|
|||||||
trap->once = 1;
|
trap->once = 1;
|
||||||
seetrap(trap);
|
seetrap(trap);
|
||||||
pline("A little dart shoots out at you!");
|
pline("A little dart shoots out at you!");
|
||||||
otmp = mksobj(DART, TRUE, FALSE);
|
otmp = t_missile(DART, trap);
|
||||||
otmp->quan = 1L;
|
|
||||||
otmp->owt = weight(otmp);
|
|
||||||
if (!rn2(6))
|
if (!rn2(6))
|
||||||
otmp->opoisoned = 1;
|
otmp->opoisoned = 1;
|
||||||
oldumort = u.umortality;
|
oldumort = u.umortality;
|
||||||
if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) { /* nothing */
|
if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) {
|
||||||
;
|
; /* nothing */
|
||||||
} else if (thitu(7, dmgval(otmp, &youmonst), &otmp, "little dart")) {
|
} else if (thitu(7, dmgval(otmp, &youmonst), &otmp, "little dart")) {
|
||||||
if (otmp) {
|
if (otmp) {
|
||||||
if (otmp->opoisoned)
|
if (otmp->opoisoned)
|
||||||
@@ -979,13 +985,11 @@ unsigned trflags;
|
|||||||
|
|
||||||
trap->once = 1;
|
trap->once = 1;
|
||||||
feeltrap(trap);
|
feeltrap(trap);
|
||||||
otmp = mksobj_at(ROCK, u.ux, u.uy, TRUE, FALSE);
|
otmp = t_missile(ROCK, trap);
|
||||||
otmp->quan = 1L;
|
place_object(otmp, u.ux, u.uy);
|
||||||
otmp->owt = weight(otmp);
|
|
||||||
|
|
||||||
pline("A trap door in %s opens and %s falls on your %s!",
|
pline("A trap door in %s opens and %s falls on your %s!",
|
||||||
the(ceiling(u.ux, u.uy)), an(xname(otmp)), body_part(HEAD));
|
the(ceiling(u.ux, u.uy)), an(xname(otmp)), body_part(HEAD));
|
||||||
|
|
||||||
if (uarmh) {
|
if (uarmh) {
|
||||||
if (is_metallic(uarmh)) {
|
if (is_metallic(uarmh)) {
|
||||||
pline("Fortunately, you are wearing a hard helmet.");
|
pline("Fortunately, you are wearing a hard helmet.");
|
||||||
@@ -994,7 +998,6 @@ unsigned trflags;
|
|||||||
pline("%s does not protect you.", Yname2(uarmh));
|
pline("%s does not protect you.", Yname2(uarmh));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
otmp->dknown = 1;
|
otmp->dknown = 1;
|
||||||
stackobj(otmp);
|
stackobj(otmp);
|
||||||
@@ -1642,7 +1645,7 @@ static struct {
|
|||||||
xchar x, y;
|
xchar x, y;
|
||||||
} launchplace;
|
} launchplace;
|
||||||
|
|
||||||
static void
|
STATIC_OVL void
|
||||||
launch_drop_spot(obj, x, y)
|
launch_drop_spot(obj, x, y)
|
||||||
struct obj *obj;
|
struct obj *obj;
|
||||||
xchar x, y;
|
xchar x, y;
|
||||||
@@ -2075,8 +2078,8 @@ register struct monst *mtmp;
|
|||||||
mtmp->mtrapped = 0; /* perhaps teleported? */
|
mtmp->mtrapped = 0; /* perhaps teleported? */
|
||||||
} else if (mtmp->mtrapped) { /* is currently in the trap */
|
} else if (mtmp->mtrapped) { /* is currently in the trap */
|
||||||
if (!trap->tseen && cansee(mtmp->mx, mtmp->my) && canseemon(mtmp)
|
if (!trap->tseen && cansee(mtmp->mx, mtmp->my) && canseemon(mtmp)
|
||||||
&& (trap->ttyp == SPIKED_PIT || trap->ttyp == BEAR_TRAP
|
&& (is_pit(trap->ttyp) || trap->ttyp == BEAR_TRAP
|
||||||
|| trap->ttyp == HOLE || trap->ttyp == PIT
|
|| trap->ttyp == HOLE
|
||||||
|| trap->ttyp == WEB)) {
|
|| trap->ttyp == WEB)) {
|
||||||
/* If you come upon an obviously trapped monster, then
|
/* If you come upon an obviously trapped monster, then
|
||||||
* you must be able to see the trap it's in too.
|
* you must be able to see the trap it's in too.
|
||||||
@@ -2086,7 +2089,7 @@ register struct monst *mtmp;
|
|||||||
|
|
||||||
if (!rn2(40)) {
|
if (!rn2(40)) {
|
||||||
if (sobj_at(BOULDER, mtmp->mx, mtmp->my)
|
if (sobj_at(BOULDER, mtmp->mx, mtmp->my)
|
||||||
&& (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)) {
|
&& is_pit(trap->ttyp)) {
|
||||||
if (!rn2(2)) {
|
if (!rn2(2)) {
|
||||||
mtmp->mtrapped = 0;
|
mtmp->mtrapped = 0;
|
||||||
if (canseemon(mtmp))
|
if (canseemon(mtmp))
|
||||||
@@ -2150,10 +2153,7 @@ register struct monst *mtmp;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
trap->once = 1;
|
trap->once = 1;
|
||||||
otmp = mksobj(ARROW, TRUE, FALSE);
|
otmp = t_missile(ARROW, trap);
|
||||||
otmp->quan = 1L;
|
|
||||||
otmp->owt = weight(otmp);
|
|
||||||
otmp->opoisoned = 0;
|
|
||||||
if (in_sight)
|
if (in_sight)
|
||||||
seetrap(trap);
|
seetrap(trap);
|
||||||
if (thitm(8, mtmp, otmp, 0, FALSE))
|
if (thitm(8, mtmp, otmp, 0, FALSE))
|
||||||
@@ -2169,9 +2169,7 @@ register struct monst *mtmp;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
trap->once = 1;
|
trap->once = 1;
|
||||||
otmp = mksobj(DART, TRUE, FALSE);
|
otmp = t_missile(DART, trap);
|
||||||
otmp->quan = 1L;
|
|
||||||
otmp->owt = weight(otmp);
|
|
||||||
if (!rn2(6))
|
if (!rn2(6))
|
||||||
otmp->opoisoned = 1;
|
otmp->opoisoned = 1;
|
||||||
if (in_sight)
|
if (in_sight)
|
||||||
@@ -2190,9 +2188,7 @@ register struct monst *mtmp;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
trap->once = 1;
|
trap->once = 1;
|
||||||
otmp = mksobj(ROCK, TRUE, FALSE);
|
otmp = t_missile(ROCK, trap);
|
||||||
otmp->quan = 1L;
|
|
||||||
otmp->owt = weight(otmp);
|
|
||||||
if (in_sight)
|
if (in_sight)
|
||||||
seetrap(trap);
|
seetrap(trap);
|
||||||
if (thitm(0, mtmp, otmp, d(2, 6), FALSE))
|
if (thitm(0, mtmp, otmp, d(2, 6), FALSE))
|
||||||
@@ -2818,7 +2814,7 @@ int x, y;
|
|||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
struct trap *t;
|
struct trap *t;
|
||||||
|
|
||||||
if ((t = t_at(x, y)) && ((t->ttyp == PIT) || (t->ttyp == SPIKED_PIT))
|
if ((t = t_at(x, y)) && is_pit(t->ttyp)
|
||||||
&& (otmp = sobj_at(BOULDER, x, y))) {
|
&& (otmp = sobj_at(BOULDER, x, y))) {
|
||||||
obj_extract_self(otmp);
|
obj_extract_self(otmp);
|
||||||
(void) flooreffects(otmp, x, y, "settle");
|
(void) flooreffects(otmp, x, y, "settle");
|
||||||
@@ -2865,8 +2861,7 @@ long hmask, emask; /* might cancel timeout */
|
|||||||
if (Punished && !carried(uball)
|
if (Punished && !carried(uball)
|
||||||
&& (is_pool(uball->ox, uball->oy)
|
&& (is_pool(uball->ox, uball->oy)
|
||||||
|| ((trap = t_at(uball->ox, uball->oy))
|
|| ((trap = t_at(uball->ox, uball->oy))
|
||||||
&& ((trap->ttyp == PIT) || (trap->ttyp == SPIKED_PIT)
|
&& (is_pit(trap->ttyp) || is_hole(trap->ttyp))))) {
|
||||||
|| (trap->ttyp == TRAPDOOR) || (trap->ttyp == HOLE))))) {
|
|
||||||
u.ux0 = u.ux;
|
u.ux0 = u.ux;
|
||||||
u.uy0 = u.uy;
|
u.uy0 = u.uy;
|
||||||
u.ux = uball->ox;
|
u.ux = uball->ox;
|
||||||
@@ -4313,7 +4308,7 @@ boolean force;
|
|||||||
if (ttmp) {
|
if (ttmp) {
|
||||||
Strcpy(the_trap, the(trapdescr));
|
Strcpy(the_trap, the(trapdescr));
|
||||||
if (boxcnt) {
|
if (boxcnt) {
|
||||||
if (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT) {
|
if (is_pit(ttmp->ttyp)) {
|
||||||
You_cant("do much about %s%s.", the_trap,
|
You_cant("do much about %s%s.", the_trap,
|
||||||
u.utrap ? " that you're stuck in"
|
u.utrap ? " that you're stuck in"
|
||||||
: " while standing on the edge of it");
|
: " while standing on the edge of it");
|
||||||
@@ -4615,8 +4610,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */
|
|||||||
/* if no trap here or it's not a falling trap, we're done
|
/* if no trap here or it's not a falling trap, we're done
|
||||||
(note: falling rock traps have a trapdoor in the ceiling) */
|
(note: falling rock traps have a trapdoor in the ceiling) */
|
||||||
if (!t || ((t->ttyp != TRAPDOOR && t->ttyp != ROCKTRAP)
|
if (!t || ((t->ttyp != TRAPDOOR && t->ttyp != ROCKTRAP)
|
||||||
&& (trapdoor_only || (t->ttyp != HOLE && t->ttyp != PIT
|
&& (trapdoor_only || (t->ttyp != HOLE && !is_pit(t->ttyp)))))
|
||||||
&& t->ttyp != SPIKED_PIT))))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (ishero) {
|
if (ishero) {
|
||||||
@@ -4875,8 +4869,8 @@ boolean u_entering_trap2;
|
|||||||
if (!trap1 || !trap2)
|
if (!trap1 || !trap2)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!isok(trap2->tx, trap2->ty) || !isok(trap1->tx, trap1->ty)
|
if (!isok(trap2->tx, trap2->ty) || !isok(trap1->tx, trap1->ty)
|
||||||
|| !(trap2->ttyp == PIT || trap2->ttyp == SPIKED_PIT)
|
|| !is_pit(trap2->ttyp)
|
||||||
|| !(trap1->ttyp == PIT || trap1->ttyp == SPIKED_PIT)
|
|| !is_pit(trap1->ttyp)
|
||||||
|| (u_entering_trap2 && !(u.utrap && u.utraptype == TT_PIT)))
|
|| (u_entering_trap2 && !(u.utrap && u.utraptype == TT_PIT)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
dx = sgn(trap2->tx - trap1->tx);
|
dx = sgn(trap2->tx - trap1->tx);
|
||||||
@@ -4894,21 +4888,21 @@ boolean u_entering_trap2;
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
STATIC_OVL void
|
||||||
clear_conjoined_pits(trap)
|
clear_conjoined_pits(trap)
|
||||||
struct trap *trap;
|
struct trap *trap;
|
||||||
{
|
{
|
||||||
int diridx, adjidx, x, y;
|
int diridx, adjidx, x, y;
|
||||||
struct trap *t;
|
struct trap *t;
|
||||||
|
|
||||||
if (trap && (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)) {
|
if (trap && is_pit(trap->ttyp)) {
|
||||||
for (diridx = 0; diridx < 8; ++diridx) {
|
for (diridx = 0; diridx < 8; ++diridx) {
|
||||||
if (trap->conjoined & (1 << diridx)) {
|
if (trap->conjoined & (1 << diridx)) {
|
||||||
x = trap->tx + xdir[diridx];
|
x = trap->tx + xdir[diridx];
|
||||||
y = trap->ty + ydir[diridx];
|
y = trap->ty + ydir[diridx];
|
||||||
if (isok(x, y)
|
if (isok(x, y)
|
||||||
&& (t = t_at(x, y)) != 0
|
&& (t = t_at(x, y)) != 0
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT)) {
|
&& is_pit(t->ttyp)) {
|
||||||
adjidx = (diridx + 4) % 8;
|
adjidx = (diridx + 4) % 8;
|
||||||
t->conjoined &= ~(1 << adjidx);
|
t->conjoined &= ~(1 << adjidx);
|
||||||
}
|
}
|
||||||
@@ -4918,15 +4912,15 @@ struct trap *trap;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
STATIC_OVL boolean
|
||||||
adj_nonconjoined_pit(adjtrap)
|
adj_nonconjoined_pit(adjtrap)
|
||||||
struct trap *adjtrap;
|
struct trap *adjtrap;
|
||||||
{
|
{
|
||||||
struct trap *trap_with_u = t_at(u.ux0, u.uy0);
|
struct trap *trap_with_u = t_at(u.ux0, u.uy0);
|
||||||
|
|
||||||
if (trap_with_u && adjtrap && u.utrap && u.utraptype == TT_PIT &&
|
if (trap_with_u && adjtrap && u.utrap && u.utraptype == TT_PIT &&
|
||||||
(trap_with_u->ttyp == PIT || trap_with_u->ttyp == SPIKED_PIT) &&
|
is_pit(trap_with_u->ttyp) &&
|
||||||
(adjtrap->ttyp == PIT || adjtrap->ttyp == SPIKED_PIT)) {
|
is_pit(adjtrap->ttyp)) {
|
||||||
int idx;
|
int idx;
|
||||||
for (idx = 0; idx < 8; idx++) {
|
for (idx = 0; idx < 8; idx++) {
|
||||||
if (xdir[idx] == u.dx && ydir[idx] == u.dy)
|
if (xdir[idx] == u.dx && ydir[idx] == u.dy)
|
||||||
@@ -4955,7 +4949,7 @@ struct trap *trap;
|
|||||||
y = trap->ty + ydir[diridx];
|
y = trap->ty + ydir[diridx];
|
||||||
if (isok(x, y)) {
|
if (isok(x, y)) {
|
||||||
if ((t = t_at(x, y)) != 0
|
if ((t = t_at(x, y)) != 0
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT)) {
|
&& is_pit(t->ttyp)) {
|
||||||
trap->conjoined |= (1 << diridx);
|
trap->conjoined |= (1 << diridx);
|
||||||
join_adjacent_pits(t);
|
join_adjacent_pits(t);
|
||||||
} else
|
} else
|
||||||
@@ -4973,7 +4967,7 @@ uteetering_at_seen_pit(trap)
|
|||||||
struct trap *trap;
|
struct trap *trap;
|
||||||
{
|
{
|
||||||
if (trap && trap->tseen && (!u.utrap || u.utraptype != TT_PIT)
|
if (trap && trap->tseen && (!u.utrap || u.utraptype != TT_PIT)
|
||||||
&& (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT))
|
&& is_pit(trap->ttyp))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -4987,8 +4981,8 @@ register struct trap *ttmp;
|
|||||||
/* some of these are arbitrary -dlc */
|
/* some of these are arbitrary -dlc */
|
||||||
if (ttmp && ((ttmp->ttyp == SQKY_BOARD) || (ttmp->ttyp == BEAR_TRAP)
|
if (ttmp && ((ttmp->ttyp == SQKY_BOARD) || (ttmp->ttyp == BEAR_TRAP)
|
||||||
|| (ttmp->ttyp == LANDMINE) || (ttmp->ttyp == FIRE_TRAP)
|
|| (ttmp->ttyp == LANDMINE) || (ttmp->ttyp == FIRE_TRAP)
|
||||||
|| (ttmp->ttyp == PIT) || (ttmp->ttyp == SPIKED_PIT)
|
|| is_pit(ttmp->ttyp)
|
||||||
|| (ttmp->ttyp == HOLE) || (ttmp->ttyp == TRAPDOOR)
|
|| is_hole(ttmp->ttyp)
|
||||||
|| (ttmp->ttyp == TELEP_TRAP) || (ttmp->ttyp == LEVEL_TELEP)
|
|| (ttmp->ttyp == TELEP_TRAP) || (ttmp->ttyp == LEVEL_TELEP)
|
||||||
|| (ttmp->ttyp == WEB) || (ttmp->ttyp == MAGIC_TRAP)
|
|| (ttmp->ttyp == WEB) || (ttmp->ttyp == MAGIC_TRAP)
|
||||||
|| (ttmp->ttyp == ANTI_MAGIC))) {
|
|| (ttmp->ttyp == ANTI_MAGIC))) {
|
||||||
|
|||||||
@@ -1484,6 +1484,9 @@ struct attack *mattk;
|
|||||||
setmnotwielded(mdef, otmp);
|
setmnotwielded(mdef, otmp);
|
||||||
otmp->owornmask = 0L;
|
otmp->owornmask = 0L;
|
||||||
update_mon_intrinsics(mdef, otmp, FALSE, FALSE);
|
update_mon_intrinsics(mdef, otmp, FALSE, FALSE);
|
||||||
|
/* give monster a chance to wear other equipment on its next
|
||||||
|
move instead of waiting until it picks something up */
|
||||||
|
mdef->misc_worn_check |= I_SPECIAL;
|
||||||
|
|
||||||
if (otmp == stealoid) /* special message for final item */
|
if (otmp == stealoid) /* special message for final item */
|
||||||
pline("%s finishes taking off %s suit.", Monnam(mdef),
|
pline("%s finishes taking off %s suit.", Monnam(mdef),
|
||||||
|
|||||||
+1
-1
@@ -1916,7 +1916,7 @@ char *limits; /* points at range limit for current row, or NULL */
|
|||||||
* shadow limit imposed by the far block (right) then use the far
|
* shadow limit imposed by the far block (right) then use the far
|
||||||
* wall as our new far block when we recurse.
|
* wall as our new far block when we recurse.
|
||||||
*
|
*
|
||||||
* If the limits are the the same, and the far block really exists
|
* If the limits are the same, and the far block really exists
|
||||||
* (fb_row >= 0) then do the same as above.
|
* (fb_row >= 0) then do the same as above.
|
||||||
*
|
*
|
||||||
* Normally, the check would be for the far wall being closer OR EQUAL
|
* Normally, the check would be for the far wall being closer OR EQUAL
|
||||||
|
|||||||
+17
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 worn.c $NHDT-Date: 1526728754 2018/05/19 11:19:14 $ $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.51 $ */
|
/* NetHack 3.6 worn.c $NHDT-Date: 1537234121 2018/09/18 01:28:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.55 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -710,6 +710,13 @@ clear_bypasses()
|
|||||||
struct obj *otmp, *nobj;
|
struct obj *otmp, *nobj;
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 'Object' bypass is also used for one monster function:
|
||||||
|
* polymorph control of long worms. Activated via setting
|
||||||
|
* context.bypasses even if no specific object has been
|
||||||
|
* bypassed.
|
||||||
|
*/
|
||||||
|
|
||||||
for (otmp = fobj; otmp; otmp = nobj) {
|
for (otmp = fobj; otmp; otmp = nobj) {
|
||||||
nobj = otmp->nobj;
|
nobj = otmp->nobj;
|
||||||
if (otmp->bypass) {
|
if (otmp->bypass) {
|
||||||
@@ -741,10 +748,19 @@ clear_bypasses()
|
|||||||
continue;
|
continue;
|
||||||
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
|
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
|
||||||
otmp->bypass = 0;
|
otmp->bypass = 0;
|
||||||
|
/* long worm created by polymorph has mon->mextra->mcorpsenm set
|
||||||
|
to PM_LONG_WORM to flag it as not being subject to further
|
||||||
|
polymorph (so polymorph zap won't hit monster to transform it
|
||||||
|
into a long worm, then hit that worm's tail and transform it
|
||||||
|
again on same zap); clearing mcorpsenm reverts worm to normal */
|
||||||
|
if (mtmp->data == &mons[PM_LONG_WORM] && has_mcorpsenm(mtmp))
|
||||||
|
MCORPSENM(mtmp) = NON_PM;
|
||||||
}
|
}
|
||||||
for (mtmp = migrating_mons; mtmp; mtmp = mtmp->nmon) {
|
for (mtmp = migrating_mons; mtmp; mtmp = mtmp->nmon) {
|
||||||
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
|
for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj)
|
||||||
otmp->bypass = 0;
|
otmp->bypass = 0;
|
||||||
|
/* no MCORPSENM(mtmp)==PM_LONG_WORM check here; long worms can't
|
||||||
|
be just created by polymorph and migrating at the same time */
|
||||||
}
|
}
|
||||||
/* billobjs and mydogs chains don't matter here */
|
/* billobjs and mydogs chains don't matter here */
|
||||||
context.bypasses = FALSE;
|
context.bypasses = FALSE;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 zap.c $NHDT-Date: 1525012627 2018/04/29 14:37:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.277 $ */
|
/* NetHack 3.6 zap.c $NHDT-Date: 1537234123 2018/09/18 01:28:43 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.287 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -222,7 +222,11 @@ struct obj *otmp;
|
|||||||
case WAN_POLYMORPH:
|
case WAN_POLYMORPH:
|
||||||
case SPE_POLYMORPH:
|
case SPE_POLYMORPH:
|
||||||
case POT_POLYMORPH:
|
case POT_POLYMORPH:
|
||||||
if (resists_magm(mtmp)) {
|
if (mtmp->data == &mons[PM_LONG_WORM] && has_mcorpsenm(mtmp)) {
|
||||||
|
/* if a long worm has mcorpsenm set, it was polymophed by
|
||||||
|
the current zap and shouldn't be affected if hit again */
|
||||||
|
;
|
||||||
|
} else if (resists_magm(mtmp)) {
|
||||||
/* magic resistance protects from polymorph traps, so make
|
/* magic resistance protects from polymorph traps, so make
|
||||||
it guard against involuntary polymorph attacks too... */
|
it guard against involuntary polymorph attacks too... */
|
||||||
shieldeff(mtmp->mx, mtmp->my);
|
shieldeff(mtmp->mx, mtmp->my);
|
||||||
@@ -238,6 +242,7 @@ struct obj *otmp;
|
|||||||
if (polyspot)
|
if (polyspot)
|
||||||
for (obj = mtmp->minvent; obj; obj = obj->nobj)
|
for (obj = mtmp->minvent; obj; obj = obj->nobj)
|
||||||
bypass_obj(obj);
|
bypass_obj(obj);
|
||||||
|
|
||||||
/* natural shapechangers aren't affected by system shock
|
/* natural shapechangers aren't affected by system shock
|
||||||
(unless protection from shapechangers is interfering
|
(unless protection from shapechangers is interfering
|
||||||
with their metabolism...) */
|
with their metabolism...) */
|
||||||
@@ -261,6 +266,22 @@ struct obj *otmp;
|
|||||||
|| (u.uswallow && mtmp == u.ustuck)))
|
|| (u.uswallow && mtmp == u.ustuck)))
|
||||||
learn_it = TRUE;
|
learn_it = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* do this even if polymorphed failed (otherwise using
|
||||||
|
flags.mon_polycontrol prompting to force mtmp to remain
|
||||||
|
'long worm' would prompt again if zap hit another segment) */
|
||||||
|
if (!DEADMONSTER(mtmp) && mtmp->data == &mons[PM_LONG_WORM]) {
|
||||||
|
if (!has_mcorpsenm(mtmp))
|
||||||
|
newmcorpsenm(mtmp);
|
||||||
|
/* flag to indicate that mtmp became a long worm
|
||||||
|
on current zap, so further hits (on mtmp's new
|
||||||
|
tail) don't do further transforms */
|
||||||
|
MCORPSENM(mtmp) = PM_LONG_WORM;
|
||||||
|
/* flag to indicate that cleanup is needed; object
|
||||||
|
bypass cleanup also clears mon->mextra->mcorpsenm
|
||||||
|
for all long worms on the level */
|
||||||
|
context.bypasses = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WAN_CANCELLATION:
|
case WAN_CANCELLATION:
|
||||||
@@ -2306,7 +2327,7 @@ boolean ordinary;
|
|||||||
|
|
||||||
case WAN_CANCELLATION:
|
case WAN_CANCELLATION:
|
||||||
case SPE_CANCELLATION:
|
case SPE_CANCELLATION:
|
||||||
(void) cancel_monst(&youmonst, obj, TRUE, FALSE, TRUE);
|
(void) cancel_monst(&youmonst, obj, TRUE, TRUE, TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPE_DRAIN_LIFE:
|
case SPE_DRAIN_LIFE:
|
||||||
@@ -2675,25 +2696,45 @@ boolean youattack, allow_cancel_kill, self_cancel;
|
|||||||
|
|
||||||
/* now handle special cases */
|
/* now handle special cases */
|
||||||
if (youdefend) {
|
if (youdefend) {
|
||||||
if (Upolyd) {
|
if (Upolyd) { /* includes lycanthrope in creature form */
|
||||||
if ((u.umonnum == PM_CLAY_GOLEM) && !Blind)
|
/*
|
||||||
pline(writing_vanishes, your);
|
* Return to normal form unless Unchanging.
|
||||||
|
* Hero in clay golem form dies if Unchanging.
|
||||||
if (Unchanging)
|
* Does not cure lycanthropy or stop timed random polymorph.
|
||||||
|
*/
|
||||||
|
if (u.umonnum == PM_CLAY_GOLEM) {
|
||||||
|
if (!Blind)
|
||||||
|
pline(writing_vanishes, your);
|
||||||
|
else /* note: "dark" rather than "heavy" is intentional... */
|
||||||
|
You_feel("%s headed.", Hallucination ? "dark" : "light");
|
||||||
|
u.mh = 0; /* fatal; death handled by rehumanize() */
|
||||||
|
}
|
||||||
|
if (Unchanging && u.mh > 0)
|
||||||
Your("amulet grows hot for a moment, then cools.");
|
Your("amulet grows hot for a moment, then cools.");
|
||||||
else
|
else
|
||||||
rehumanize();
|
rehumanize();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mdef->mcan = TRUE;
|
mdef->mcan = 1;
|
||||||
|
/* force shapeshifter into its base form */
|
||||||
if (is_were(mdef->data) && mdef->data->mlet != S_HUMAN)
|
if (mdef->m_ap_type != M_AP_NOTHING)
|
||||||
|
seemimic(mdef);
|
||||||
|
/* [not 'else if'; chameleon might have been hiding as a mimic] */
|
||||||
|
if (mdef->cham >= LOW_PM) {
|
||||||
|
/* note: newcham() uncancels shapechangers (resets m->mcan
|
||||||
|
to 0), but only for shapechangers whose m->cham is already
|
||||||
|
NON_PM and we just verified that it's LOW_PM or higher */
|
||||||
|
newcham(mdef, &mons[mdef->cham], FALSE, FALSE);
|
||||||
|
mdef->cham = NON_PM; /* cancelled shapeshifter can't shift */
|
||||||
|
}
|
||||||
|
if (is_were(mdef->data) && !is_human(mdef->data))
|
||||||
were_change(mdef);
|
were_change(mdef);
|
||||||
|
|
||||||
if (mdef->data == &mons[PM_CLAY_GOLEM]) {
|
if (mdef->data == &mons[PM_CLAY_GOLEM]) {
|
||||||
if (canseemon(mdef))
|
if (canseemon(mdef))
|
||||||
pline(writing_vanishes, s_suffix(mon_nam(mdef)));
|
pline(writing_vanishes, s_suffix(mon_nam(mdef)));
|
||||||
|
/* !allow_cancel_kill is for Magicbane, where clay golem
|
||||||
|
will be killed somewhere back up the call/return chain... */
|
||||||
if (allow_cancel_kill) {
|
if (allow_cancel_kill) {
|
||||||
if (youattack)
|
if (youattack)
|
||||||
killed(mdef);
|
killed(mdef);
|
||||||
@@ -3373,8 +3414,7 @@ struct obj **pobj; /* object tossed/used, set to NULL
|
|||||||
The(distant_name(obj, xname))); /* lame */
|
The(distant_name(obj, xname))); /* lame */
|
||||||
range = 0;
|
range = 0;
|
||||||
} else if (Sokoban && (t = t_at(x, y)) != 0
|
} else if (Sokoban && (t = t_at(x, y)) != 0
|
||||||
&& (t->ttyp == PIT || t->ttyp == SPIKED_PIT
|
&& (is_pit(t->ttyp) || is_hole(t->ttyp))) {
|
||||||
|| t->ttyp == HOLE || t->ttyp == TRAPDOOR)) {
|
|
||||||
/* hero falls into the trap, so ball stops */
|
/* hero falls into the trap, so ball stops */
|
||||||
range = 0;
|
range = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1161,7 +1161,7 @@ CalculateCellSize(HWND hWnd, LPSIZE pSize, LPSIZE pWindowSize)
|
|||||||
hdc = GetDC(hWnd);
|
hdc = GetDC(hWnd);
|
||||||
|
|
||||||
/* if windows size is specified - attempt ro stretch cells across
|
/* if windows size is specified - attempt ro stretch cells across
|
||||||
the the window size. If not - make default cell size based on
|
the window size. If not - make default cell size based on
|
||||||
10 points font. Make sure that cell cesize does not exceeds 20 points
|
10 points font. Make sure that cell cesize does not exceeds 20 points
|
||||||
*/
|
*/
|
||||||
if (pWindowSize->cx > 0)
|
if (pWindowSize->cx > 0)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ typedef struct mswin_nethack_message_window {
|
|||||||
int yMax; /* maximum vertical scrolling position */
|
int yMax; /* maximum vertical scrolling position */
|
||||||
int xPage; /* page size of horizontal scroll bar */
|
int xPage; /* page size of horizontal scroll bar */
|
||||||
int lines_last_turn; /* lines added during the last turn */
|
int lines_last_turn; /* lines added during the last turn */
|
||||||
int dont_care; /* flag the the user does not care if messages are lost */
|
int dont_care; /* flag the user does not care if messages are lost */
|
||||||
} NHMessageWindow, *PNHMessageWindow;
|
} NHMessageWindow, *PNHMessageWindow;
|
||||||
|
|
||||||
static TCHAR szMessageWindowClass[] = TEXT("MSNHMessageWndClass");
|
static TCHAR szMessageWindowClass[] = TEXT("MSNHMessageWndClass");
|
||||||
|
|||||||
+1
-1
@@ -1048,7 +1048,7 @@ identifier
|
|||||||
outside of the standard accelerator (see above) or a
|
outside of the standard accelerator (see above) or a
|
||||||
number. If 0, the item is unaffected by any group
|
number. If 0, the item is unaffected by any group
|
||||||
accelerator. If this accelerator conflicts with
|
accelerator. If this accelerator conflicts with
|
||||||
the menu command (or their user defined alises), it loses.
|
the menu command (or their user defined aliases), it loses.
|
||||||
The menu commands and aliases take care not to interfere
|
The menu commands and aliases take care not to interfere
|
||||||
with the default object class symbols.
|
with the default object class symbols.
|
||||||
-- If you want this choice to be preselected when the
|
-- If you want this choice to be preselected when the
|
||||||
|
|||||||
+2
-2
@@ -2906,7 +2906,7 @@ int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list)
|
|||||||
if (dialog->result()<0)
|
if (dialog->result()<0)
|
||||||
qApp->enter_loop();
|
qApp->enter_loop();
|
||||||
}
|
}
|
||||||
//if ( (nhid != WIN_INVEN || !flags.perm_invent) ) // doesn't work yet
|
//if ( (nhid != WIN_INVEN || !iflags.perm_invent) ) // doesn't work yet
|
||||||
{
|
{
|
||||||
dialog->hide();
|
dialog->hide();
|
||||||
}
|
}
|
||||||
@@ -4840,7 +4840,7 @@ void NetHackQtBind::qt_update_inventory()
|
|||||||
if (main)
|
if (main)
|
||||||
main->updateInventory();
|
main->updateInventory();
|
||||||
/* doesn't work yet
|
/* doesn't work yet
|
||||||
if (program_state.something_worth_saving && flags.perm_invent)
|
if (program_state.something_worth_saving && iflags.perm_invent)
|
||||||
display_inventory(NULL, FALSE);
|
display_inventory(NULL, FALSE);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -401,7 +401,7 @@ void NetHackQtBind::qt_update_inventory()
|
|||||||
if (main)
|
if (main)
|
||||||
main->updateInventory();
|
main->updateInventory();
|
||||||
/* doesn't work yet
|
/* doesn't work yet
|
||||||
if (program_state.something_worth_saving && flags.perm_invent)
|
if (program_state.something_worth_saving && iflags.perm_invent)
|
||||||
display_inventory(NULL, false);
|
display_inventory(NULL, false);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2404,7 +2404,7 @@ void
|
|||||||
nh_XtPopup(w, g, childwid)
|
nh_XtPopup(w, g, childwid)
|
||||||
Widget w; /* widget */
|
Widget w; /* widget */
|
||||||
int g; /* type of grab */
|
int g; /* type of grab */
|
||||||
Widget childwid; /* child to recieve focus (can be None) */
|
Widget childwid; /* child to receive focus (can be None) */
|
||||||
{
|
{
|
||||||
XtPopup(w, (XtGrabKind) g);
|
XtPopup(w, (XtGrabKind) g);
|
||||||
XSetWMProtocols(XtDisplay(w), XtWindow(w), &wm_delete_window, 1);
|
XSetWMProtocols(XtDisplay(w), XtWindow(w), &wm_delete_window, 1);
|
||||||
|
|||||||
+1
-1
@@ -826,7 +826,7 @@ menu_item **menu_list;
|
|||||||
* each time.
|
* each time.
|
||||||
*/
|
*/
|
||||||
if (menu_info->valid_widgets
|
if (menu_info->valid_widgets
|
||||||
&& (window != WIN_INVEN || !flags.perm_invent)) {
|
&& (window != WIN_INVEN || !iflags.perm_invent)) {
|
||||||
XtDestroyWidget(wp->popup);
|
XtDestroyWidget(wp->popup);
|
||||||
menu_info->valid_widgets = FALSE;
|
menu_info->valid_widgets = FALSE;
|
||||||
menu_info->is_up = FALSE;
|
menu_info->is_up = FALSE;
|
||||||
|
|||||||
+1
-1
@@ -702,7 +702,7 @@ identifier
|
|||||||
outside of the standard accelerator (see above) or a
|
outside of the standard accelerator (see above) or a
|
||||||
number. If 0, the item is unaffected by any group
|
number. If 0, the item is unaffected by any group
|
||||||
accelerator. If this accelerator conflicts with
|
accelerator. If this accelerator conflicts with
|
||||||
the menu command (or their user defined alises), it loses.
|
the menu command (or their user defined aliases), it loses.
|
||||||
The menu commands and aliases take care not to interfere
|
The menu commands and aliases take care not to interfere
|
||||||
with the default object class symbols.
|
with the default object class symbols.
|
||||||
-- If you want this choice to be preselected when the
|
-- If you want this choice to be preselected when the
|
||||||
|
|||||||
+2
-2
@@ -700,7 +700,7 @@ mswin_layout_main_window(HWND changed_child)
|
|||||||
GetNHApp()->rtInvenWindow.bottom = GetNHApp()->rtMenuWindow.bottom;
|
GetNHApp()->rtInvenWindow.bottom = GetNHApp()->rtMenuWindow.bottom;
|
||||||
|
|
||||||
/* adjust map window size only if perm_invent is set */
|
/* adjust map window size only if perm_invent is set */
|
||||||
if (flags.perm_invent)
|
if (iflags.perm_invent)
|
||||||
GetNHApp()->rtMapWindow.right = GetNHApp()->rtMenuWindow.left;
|
GetNHApp()->rtMapWindow.right = GetNHApp()->rtMenuWindow.left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -712,7 +712,7 @@ mswin_layout_main_window(HWND changed_child)
|
|||||||
/* kludge - inventory window should have its own type (same as
|
/* kludge - inventory window should have its own type (same as
|
||||||
menu-text
|
menu-text
|
||||||
as a matter of fact) */
|
as a matter of fact) */
|
||||||
if (flags.perm_invent && i == WIN_INVEN) {
|
if (iflags.perm_invent && i == WIN_INVEN) {
|
||||||
mswin_get_window_placement(NHW_INVEN, &rt);
|
mswin_get_window_placement(NHW_INVEN, &rt);
|
||||||
} else {
|
} else {
|
||||||
mswin_get_window_placement(GetNHApp()->windowlist[i].type,
|
mswin_get_window_placement(GetNHApp()->windowlist[i].type,
|
||||||
|
|||||||
+3
-3
@@ -251,7 +251,7 @@ mswin_menu_window_select_menu(HWND hWnd, int how, MENU_ITEM_P **_selected,
|
|||||||
/* If we just used the permanent inventory window to pick something,
|
/* If we just used the permanent inventory window to pick something,
|
||||||
* set the menu back to its display inventory state.
|
* set the menu back to its display inventory state.
|
||||||
*/
|
*/
|
||||||
if (flags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN
|
if (iflags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN
|
||||||
&& how != PICK_NONE) {
|
&& how != PICK_NONE) {
|
||||||
data->menu.prompt[0] = '\0';
|
data->menu.prompt[0] = '\0';
|
||||||
SetMenuListType(hWnd, PICK_NONE);
|
SetMenuListType(hWnd, PICK_NONE);
|
||||||
@@ -322,7 +322,7 @@ MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
GetWindowRect(hWnd, &rt);
|
GetWindowRect(hWnd, &rt);
|
||||||
ScreenToClient(GetNHApp()->hMainWnd, (LPPOINT) &rt);
|
ScreenToClient(GetNHApp()->hMainWnd, (LPPOINT) &rt);
|
||||||
ScreenToClient(GetNHApp()->hMainWnd, ((LPPOINT) &rt) + 1);
|
ScreenToClient(GetNHApp()->hMainWnd, ((LPPOINT) &rt) + 1);
|
||||||
if (flags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN)
|
if (iflags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN)
|
||||||
mswin_update_window_placement(NHW_INVEN, &rt);
|
mswin_update_window_placement(NHW_INVEN, &rt);
|
||||||
else
|
else
|
||||||
mswin_update_window_placement(NHW_MENU, &rt);
|
mswin_update_window_placement(NHW_MENU, &rt);
|
||||||
@@ -334,7 +334,7 @@ MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
GetWindowRect(hWnd, &rt);
|
GetWindowRect(hWnd, &rt);
|
||||||
ScreenToClient(GetNHApp()->hMainWnd, (LPPOINT) &rt);
|
ScreenToClient(GetNHApp()->hMainWnd, (LPPOINT) &rt);
|
||||||
ScreenToClient(GetNHApp()->hMainWnd, ((LPPOINT) &rt) + 1);
|
ScreenToClient(GetNHApp()->hMainWnd, ((LPPOINT) &rt) + 1);
|
||||||
if (flags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN)
|
if (iflags.perm_invent && mswin_winid_from_handle(hWnd) == WIN_INVEN)
|
||||||
mswin_update_window_placement(NHW_INVEN, &rt);
|
mswin_update_window_placement(NHW_INVEN, &rt);
|
||||||
else
|
else
|
||||||
mswin_update_window_placement(NHW_MENU, &rt);
|
mswin_update_window_placement(NHW_MENU, &rt);
|
||||||
|
|||||||
+12
-6
@@ -1102,7 +1102,7 @@ identifier
|
|||||||
outside of the standard accelerator (see above) or a
|
outside of the standard accelerator (see above) or a
|
||||||
number. If 0, the item is unaffected by any group
|
number. If 0, the item is unaffected by any group
|
||||||
accelerator. If this accelerator conflicts with
|
accelerator. If this accelerator conflicts with
|
||||||
the menu command (or their user defined alises), it loses.
|
the menu command (or their user defined aliases), it loses.
|
||||||
The menu commands and aliases take care not to interfere
|
The menu commands and aliases take care not to interfere
|
||||||
with the default object class symbols.
|
with the default object class symbols.
|
||||||
-- If you want this choice to be preselected when the
|
-- If you want this choice to be preselected when the
|
||||||
@@ -1194,7 +1194,7 @@ mswin_select_menu(winid wid, int how, MENU_ITEM_P **selected)
|
|||||||
ShowWindow(GetNHApp()->windowlist[wid].win, SW_SHOW);
|
ShowWindow(GetNHApp()->windowlist[wid].win, SW_SHOW);
|
||||||
nReturned = mswin_menu_window_select_menu(
|
nReturned = mswin_menu_window_select_menu(
|
||||||
GetNHApp()->windowlist[wid].win, how, selected,
|
GetNHApp()->windowlist[wid].win, how, selected,
|
||||||
!(flags.perm_invent && wid == WIN_INVEN
|
!(iflags.perm_invent && wid == WIN_INVEN
|
||||||
&& how == PICK_NONE) /* don't activate inventory window if
|
&& how == PICK_NONE) /* don't activate inventory window if
|
||||||
perm_invent is on */
|
perm_invent is on */
|
||||||
);
|
);
|
||||||
@@ -1211,7 +1211,7 @@ void
|
|||||||
mswin_update_inventory()
|
mswin_update_inventory()
|
||||||
{
|
{
|
||||||
logDebug("mswin_update_inventory()\n");
|
logDebug("mswin_update_inventory()\n");
|
||||||
if (flags.perm_invent && program_state.something_worth_saving
|
if (iflags.perm_invent && program_state.something_worth_saving
|
||||||
&& iflags.window_inited && WIN_INVEN != WIN_ERR)
|
&& iflags.window_inited && WIN_INVEN != WIN_ERR)
|
||||||
display_inventory(NULL, FALSE);
|
display_inventory(NULL, FALSE);
|
||||||
}
|
}
|
||||||
@@ -2118,6 +2118,7 @@ initMapTiles(void)
|
|||||||
HBITMAP hBmp;
|
HBITMAP hBmp;
|
||||||
BITMAP bm;
|
BITMAP bm;
|
||||||
TCHAR wbuf[MAX_PATH];
|
TCHAR wbuf[MAX_PATH];
|
||||||
|
DWORD errcode;
|
||||||
int tl_num;
|
int tl_num;
|
||||||
SIZE map_size;
|
SIZE map_size;
|
||||||
extern int total_tiles_used;
|
extern int total_tiles_used;
|
||||||
@@ -2131,8 +2132,13 @@ initMapTiles(void)
|
|||||||
NH_A2W(iflags.wc_tile_file, wbuf, MAX_PATH),
|
NH_A2W(iflags.wc_tile_file, wbuf, MAX_PATH),
|
||||||
IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
|
IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
|
||||||
if (hBmp == NULL) {
|
if (hBmp == NULL) {
|
||||||
raw_print(
|
char errmsg[BUFSZ];
|
||||||
"Cannot load tiles from the file. Reverting back to default.");
|
|
||||||
|
errcode = GetLastError();
|
||||||
|
Sprintf(errmsg, "%s (0x%x).",
|
||||||
|
"Cannot load tiles from the file. Reverting back to default",
|
||||||
|
errcode);
|
||||||
|
raw_print(errmsg);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2243,7 +2249,7 @@ mswin_popup_destroy(HWND hWnd)
|
|||||||
DrawMenuBar(GetNHApp()->hMainWnd);
|
DrawMenuBar(GetNHApp()->hMainWnd);
|
||||||
|
|
||||||
/* Don't hide the permanent inventory window ... leave it showing */
|
/* Don't hide the permanent inventory window ... leave it showing */
|
||||||
if (!flags.perm_invent || mswin_winid_from_handle(hWnd) != WIN_INVEN)
|
if (!iflags.perm_invent || mswin_winid_from_handle(hWnd) != WIN_INVEN)
|
||||||
ShowWindow(hWnd, SW_HIDE);
|
ShowWindow(hWnd, SW_HIDE);
|
||||||
|
|
||||||
GetNHApp()->hPopupWnd = NULL;
|
GetNHApp()->hPopupWnd = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user