Commit Graph

826 Commits

Author SHA1 Message Date
Derek S. Ray
5ccae41702 add glob merging for obvious cases
flooreffects() covers most dropped/thrown/etc. cases, and the hooks in
invent and mon handle "deathdrops" along with picking up items.
still need to check putting into/removing from containers
2015-03-23 23:13:53 -04:00
Derek S. Ray
68b8931918 further ongoing changes
Swap out single object for four separate ones to support tiles
rename to 'glob' to avoid confusion with acid/quivering blobs
2015-03-15 21:46:26 -04:00
nhmall
6e0a3dda2e catch up on half-physical damage docs
This is catching up on some things that were changed
in development years ago that Dave C. suggested be
documented.

For the record:
-The things that were evaluated and ruled out
are now documented in include/youprop.h so they don't
come up again.

- The things that were evaluated and deemed to be susceptible
to the intrinsic and thus led to a modification in the code
are listed below in this commit message.

Modifications:
- A crystal ball exploding on being applied
- Artifacts' blasting
- Being a fish out of water
- Being hit by Mjollnir on the return
- Being thwacked by an iron ball chained to you
- Boiling/freezing potions
- Broken wands
- Bumping head on ceiling by cursed levitation
- Burning (un)holy water
- Chest/door/tin traps
- Dipping a lit lamp into a potion of oil
- Exploding rings and wands (under all circumstances)
- Exploding spellbooks
- Falling downstairs
- Falling into a (spiked) pit
- Falling off or failing to mount a steed
- Falling on a sink while levitating
- Getting squished in a pit under a boulder
- Hitting your foot with a bullwhip
- Hitting yourself with your pick-axe
- Hooking yourself with a grappling hook
- iron-ball-pulling yourself out of a bear trap
- Jumping/Newton's-Thirding into something solid
- Kicking something that makes you go "Ouch!"
- Land mine explosion
- Sitting in a spiked pit
- Stinking cloud damage
- Thrown potion (bottle)
- Zapping yourself with a wand, horn or spell
- Jumping yourself out of a bear trap
2015-03-15 12:36:45 -04:00
Pasi Kallinen
3bbbb01c53 Death talks in CAPITAL LETTERS 2015-03-15 09:53:34 +02:00
Pasi Kallinen
400d842a8f Fix warnings 2015-03-12 17:57:13 +02:00
Pasi Kallinen
a335f8306f Add MAX_STATUENAME_RANK sysconf setting
MAX_STATUENAME_RANK tells how many score file entries to use
for random statue names.
2015-03-11 19:59:52 +02:00
Pasi Kallinen
d5abd07dad Add boolean option "bones"
Setting bones off prevents saving and loading bones files.
2015-03-10 19:50:29 +02:00
Pasi Kallinen
8e31929ef5 Define for generic usernames which prompt for name
Instead of hard-coding the "play", "player", etc. usernames
which will prompt the user for their name, allow defining
the names in config.h
2015-03-09 18:42:53 +02:00
Pasi Kallinen
1609081320 Implement fcntl(2) file locking
If you run a server, then you know of the somewhat annoying perm_lock
errors that creep up, requiring your attention before anyone else can
start a game.

This patch properly implements fcntl(2) locking on systems that can
handle it (*nix systems), that results in the lock being automatically
released on program termination, whether abnormal or not.

Original patch by Drew Streib, update by Edoardo Spadolini
2015-03-07 15:11:41 +02:00
Pasi Kallinen
9da976f004 Fix TTY crashing when a location has more than 32k items 2015-03-02 20:34:25 +02:00
Sean Hunt
777328bd5c Merge fire-based erosion to common codepaths.
This finally eliminates all direct increases of `oeroded` and `oeroded2`
and moves them all to go via `erode_obj()`. They are still manipulated
directly in a few places, but not to erode objects.

This now merges the `fire_damage()` function to a common codepath, used
for items on lava and burning oil, but fire needs more work. There is
still a duplication between `destroy_item()` and `fire_damage()`; the
two codepaths should eventually be merged in some manner so that there
is only one codepath to say "an object was affected by fire". This path
might require some parameters, such as whether the fire will just erode
objects or burn them outright, but that can happen another day.
2015-03-02 12:50:03 -05:00
Sean Hunt
3acd3c4a00 Fold get_wet() into water_damage().
This now ensures that dipping into water works like other sources of
water damage. There is a potentially significant gameplay change here:
dipping a container into uncursed water will wet all its contents. If
this is a problem, then we should add another parameter to water_damage
which will suppress this behaviour for dipping.
2015-03-02 12:50:01 -05:00
Sean Hunt
57dcad3774 Rename rust_dmg() to erode_obj(). 2015-03-02 12:50:01 -05:00
Sean Hunt
3a049cf66e Eliminate erode_obj() and other erosion.
Now all erosion that isn't fire-based goes through `rust_dmg()`
2015-03-02 12:50:00 -05:00
Sean Hunt
7e0d552b06 A lot more cleanup to rust and water. 2015-03-02 12:49:59 -05:00
Sean Hunt
d588210a77 Cover a couple of corner cases with rust_dmg(). 2015-03-02 12:49:57 -05:00
Sean Hunt
9c4b0113aa Remove the victim argument to rust_dmg().
The argument can be calculated from `otmp`.
2015-03-02 12:49:57 -05:00
Sean Hunt
5ffd5a3000 Factor out a new is_moat function.
The fact that Juiblex's swamp is MOAT but not moat is weird and should
probably be looked at at some point.
2015-03-02 12:49:56 -05:00
keni
6fd30ab1ce Manually fix botched NHDT-Branch expansions. 2015-03-01 20:32:28 -05:00
Derek S. Ray
4dddb97301 remove and transfer INVISIBLE_OBJECTS to branch 2015-02-27 19:34:32 -05:00
Sean Hunt
a3faa93403 Remove experimental Unicode support.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.

This compiles, but I have not done extensive testing.

Conflicts:
	include/config.h
	include/decl.h
	include/extern.h
	include/global.h
	include/tradstdc.h
	include/wintty.h
	src/drawing.c
	src/files.c
	src/hacklib.c
	src/mapglyph.c
	src/options.c
	sys/winnt/nttty.c
	win/tty/getline.c
	win/tty/topl.c
	win/tty/wintty.c
2015-02-27 19:34:29 -05:00
Sean Hunt
7c09285a8c Make EXP_ON_BOTL unconditional. 2015-02-27 19:34:26 -05:00
Sean Hunt
0001534d04 Make REDO unconditional. 2015-02-27 19:33:52 -05:00
Sean Hunt
d218bedbf7 Make LOADSYMSETS unconditional.
There are some bugs here, but this functionality should make it into the release
in some form.
2015-02-27 19:33:51 -05:00
Sean Hunt
74e741bbbc Make AUTOPICKUP_EXCEPTIONS unconditional. 2015-02-27 19:33:50 -05:00
Sean Hunt
b138d380ea Make BARGETHROUGH unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt
6e9fa71b05 Make SEDUCE unconditional. 2015-02-27 19:33:48 -05:00
Pasi Kallinen
612852f7de Apply paxed's DEBUG patch to remove DEBUG/D_DEBUG.
Move debugging output into couple preprocessor defines, which
    are no-op without DEBUG.  To show debugging output from a
    certain source files, use sysconf:

    DEBUGFILES=dungeon.c questpgr.c

    Also fix couple debug lines which did not compile.

This also includes fixes due to Derek Ray to depugpline to work better
on other platforms.
2015-02-27 19:33:45 -05:00
Sean Hunt
ac108cd365 Make GOLDOBJ unconditional. 2015-02-27 19:33:40 -05:00
Sean Hunt
4f59f5c6fd Make WIZARD unconditional. 2015-02-27 19:33:22 -05:00
Sean Hunt
ad82ca80f3 Make DUNGEON_OVERVIEW unconditional. 2015-02-27 19:33:20 -05:00
Sean Hunt
1edadd1d48 Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-02-27 19:33:16 -05:00
Sean Hunt
260f7ea860 Make TOURIST unconditional. 2015-02-27 19:33:12 -05:00
Sean Hunt
5ee71d2757 Make SINKS unconditional. 2015-02-27 19:33:06 -05:00
Sean Hunt
b066b7c170 Make KOPS unconditional. 2015-02-27 19:33:04 -05:00
Sean Hunt
9e65758947 Make STEED unconditional. 2015-02-27 19:33:01 -05:00
Sean Hunt
264dc66129 Make ELBERETH unconditional. 2015-02-27 19:32:53 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
Sean Hunt
a3b1cb8432 Remove the 'nul' variable. 2015-02-18 23:51:31 -05:00
Sean Hunt
862d32c2ec Fix a few compiler (clang) warnings. 2015-02-16 00:23:48 -05:00
Derek
bae3c6088f Exclude all the Win32 build artifacts (Studio and otherwise)
Squashed commit of the following:

commit e37c7626f035a29321c9ac12cca83a0af2132abb
commit 86ebb3e66aedb6b5a31d61d57c39cf84c12d2276
commit 6cd677c8fca4102f223fb1708d00a65c2ded6658
Author: Derek <derekray@gmail.com>
Date:   Fri Feb 13 13:24:29 2015 -0500
2015-02-13 13:26:05 -05:00
nethack.rankin
e8e291b018 fix #H3039 - panic() when trying to drop destroyed items
From a bug report, dropping a lit
(burning) potion of oil while levitating can produce an explosion which can
destroy inventory.  If in the process of dropping multiple items, the ones
after the oil might be gone, resulting in use of stale pointers and possibly
triggering an "extract_nobj: object lost" panic or even a crash.  While
testing my fix, I discovered that being killed by an exploding potion of oil
could produce an "object_is_local" panic if bones are saved  (and reproduced
with unmodified 3.4.3).
2013-11-05 00:57:56 +00:00
nethack.rankin
fec8981102 poly'd hero hiding feedback
When hiding as a monster, say so during the #monster command and
also list being hidden in the status section of enlightenment/^X.

     Also, prevent hiding on the floor or ceiling on the planes of air
and water.  (Didn't apply to monsters, who only hide on ROOM spots.)

     Half the change to dohide() is just revised indentation.
2013-03-16 01:44:28 +00:00
nethack.rankin
0add521787 fix #H2645 - invulnerability during prayer is vulernable to stinking cloud
From a bug report, stinking cloud
harms hero even when u.uninvulnerable is set during successful prayer.
This makes the cloud harmless during prayer as he suggested.

     It also makes being inside a stinking cloud become a major trouble
that prayer can fix.  (With magical breathing such a cloud is harmless and
with poison resistance it is just a nuisance; it won't be considered to be
trouble in such cases.)  The fix is to clear away the cloud, or to teleport
the hero if he's inside multiple overlapping clouds or in one that is
marked as permanent (which I think isn't currently possible).
2012-05-07 01:44:38 +00:00
nethack.rankin
669c2ab560 container_impact_dmg
A post-3.4.3 change made the contents of thrown (or dropped while
levitating) containers subject to breakage, but it had sequence issues.
When something was thrown from outside a shop (or from its doorway or
entry spot) and arrived inside, the shopkeeper was taking possession too
soon, charging the hero for any broken contents, and then going ballistic
(summoning kops and attacking) because the hero was outside the shop while
owing money.  We need to break contents before shk claims ownership, which
turned out to be trickier than it sounds since it has to occur after any
item-hits-floor message if such feedback is given.

    Also, clear the container's contents-known flag when contents break.
Conceivably it should stay set when there is only one item, since hearing
something break could only be that item, but this resets container->cknown
unconditionally if anything inside breaks.
2012-05-05 23:26:26 +00:00
nethack.rankin
9f2ca00138 fix [part of] #H2554 - hunger when declining to attack peaceful monst
Reported last December by <email deleted>, attempting to move
into a peaceful monster's position and then declining to attack at the
confirmation prompt uses no time, as expected, but does burn nutrition
the same as if you carried out the attack.  A player could abuse that to
make room to eat an intrinisic-conferring corpse before it rots away.
This fixes that, and also makes attacking a monster via applying a polearm
and via kicking burn the same extra nutrition as ordinary attack.  I didn't
add it for attacking via throwing.

     He/she also reported that kicking at a peaceful monster and declining
to attack at the prompt wakes up nearby monsters even though no actual kick
ultimately takes place.  I can confirm that, but this does not fix it.
2012-05-01 02:22:33 +00:00
nethack.rankin
ebf42e6746 fix #H2642 - escaping from drowning by moving diagonally
From a bug report, you could crawl
out of water to avoid drowning by moving diagonally into an intact doorway
even though regular movement won't allow that.  (Second version of Medusa's
level has a door adjacent to water.)  You could also escape diagonally when
polymorphed into a grid bug.
2012-04-30 21:25:05 +00:00
nethack.rankin
4c3939bb76 more #overview changes
Change how overview data is handled if/when you get expelled from
the quest:  mark quest levels as unreachable rather than discarding their
overview data, so that it can be included in end of game disclosure (and
can be revived if you manage to return to your quest branch by invoking
the W quest artifact).

     Order of endgame levels was odd:  earth followed by astral, water,
fire, and air, because the code didn't know how to insert in front of the
first one visited.  Now it does.  Placement of endgame levels was sub-
optimal:  since that has the highest internal dungeon branch number, it
came out last.  Now it is forced to come out first, so that it appears
above the dungeon.  And use "Plane of Earth" for level name rather than
"Plane 1", and so on for the others, when in the endgame.

     Since I'm bumping EDITLEVEL due to adding mapseen.flags.unreachable,
I am also inserting u.uevent.uvibrated now so that it won't trigger another
EDITLEVEL increment.  At the moment it doesn't do anything except get set
when you receive the "you feel strange vibrations <under you>" message.
The level where that occurs will eventually have an automatic annotation
of some sort.
2012-04-14 08:31:05 +00:00
nethack.rankin
6218a0eee2 overview disclosure (trunk only)
Add 'o' to "i a v g c" disclosure set, to display final dungeon
overview at end of game.  It lists all levels visited rather than just
those that #overview considers to be interesting, but it doesn't reveal
any undiscovered aspects of those levels except for the presence of bones.
(I think revealing shops and altars and such would be worthwhile, but the
data for that isn't handy at the time.)  If the game ends due to death,
the bones section of the current level will have "you, <reason you died>"
(before any real bones entries for that level).  That occurs before bones
file creation so it doesn't give away whether bones are being saved.

     end.c includes some unrelated lint cleanup.

     Guidebook.{mn,tex} updates the section for autopickup_exceptions as
well as for disclose.  It had some odd looking indentation due to various
explicit paragraph breaks.  I took "experimental" out of its description
since it was moved out of the experimental section of config.h long ago.
The revised Guidebook.tex is untested.
2012-04-09 02:56:37 +00:00
nethack.rankin
ec966362a6 #overview enhancements too (trunk only)
I accidentally left his out of yesterday's commit.
2012-02-16 23:06:00 +00:00