Commit Graph

4479 Commits

Author SHA1 Message Date
PatR
4ffe088a67 workaround for ^G "senior moment"
The less said, the better.
2018-11-29 18:33:34 -08:00
PatR
351c731e06 downgrade Sting's glow
Change "(glowing light blue)" to "(light blue aura)" so that there's
less suggestion that it might function as a light source.
2018-11-29 18:19:20 -08:00
PatR
b113aa7439 more steed dismount
By creating a spot of lava, filling up the whole level, and creating
a lurker above, I managed to trigger the impossible "Dismount: can't
place former steed on map" that was added earlier today.  I also was
told that my god was displeased even though the engulfer's attack was
responsible.  This addresses both situations.  I can't trigger that
impossible any more, and only voluntary dismount blames the hero if
it's killed because there's nowhere to place it.  Hero is still blamed
for any dismount that kills the steed while flying or levitating over
dangerous terrain--hero took steed into jeopardy.
2018-11-29 18:02:52 -08:00
PatR
be327d9822 steed vs "no monster to remove"
Noticed whlie testing the steed-in-pit fix.  The EXTRA_SANITY_CHECKS
for remove_monster() are being tripped if riding hero has steed killed
out from under him because the steed is not on the map.  This started
out simple but got a bit complicated.  It seems to be sufficient but
I'm not very confident about it.

Being engulfed while mounted gave "placing monster over another?" due
to a change made along with EXTRA_SANITY_CHECKS but not conditional on
it.  (The change was to issue a warning about an actual problem which
was previously undiagnosed.)  I think bumping the engulfer off the map
in favor of the former steed only worked because some u.uswallow code
eventually used the hero's location to put the engulfer back.  I didn't
pursue that to try to figure what really happened, just prevent it.

The DISMOUNT_BONES handling was being executed even if the steed was
dead.  DISMOUNT_BONES only happens if the hero is dead.  Since I don't
know whether it's possible for dead hero and dead steed to happen at
the same time, move it inside the steed-not-dead block just in case.
2018-11-29 12:15:14 -08:00
PatR
4ab1c12f03 fix github issue #164 - lack of steed-in-pit mesg
Fixes #164

No message was shown when riding a steed into a pit or spiked pit.
Setup for the message was done, but post-3.4.3 insertion of else-if
into the previous if/else/endif cut off its delivery.
2018-11-29 10:24:50 -08:00
PatR
c318841363 fix #H7631 - wielding cursed weptool via 'apply'
Applying a non-wielded cursed pick-axe first wielded it, then dug,
but it didn't report "pick-axe is welded to your hand".  (Attempting
to drop it or wield something else did report that, after the fact.)
The same thing happened if you used a pole-arm rather than pick-axe.
2018-11-29 03:49:16 -08:00
PatR
234bf7b1b6 fix #H7618 - gas cloud affects underwater monsters
Stinking cloud placed near water or poison gas breathed across it
would affect and potentially kill underwater monsters.  Most swimmers
are on the surface and should be affected, but eels and other fish
shouldn't be.

This also changes minliquid() to not treat flying and levitating as
ways to survive water when on the Plane of Water.

I think goodpos() needs to be taught about that Plane (where many ways
of existing at a water location don't apply).  This doesn't do that.
2018-11-28 17:43:53 -08:00
PatR
98afe5541d mouse_support compile bits
There was a spurious seli-colon after an if's test, making a boundary
check be ineffective.  When looking at that, I noticed that the 'O'
command's display of the current value for mouse_support ("0=off" and
so forth) was relying on implicit concatenation of adjacent string
literals, which would break K&R compilation.  Do that concatenation
the old fashioned way....

While testing (after temporarily adding WC_MOUSE_SUPPORT to tty's
window_procs), I also noticed that wording used by config_error_add
looked strange when it was in response to giving a bad value via 'O'
command.  Suppress its "config_error_add: " prefix is that situation.
2018-11-28 01:02:44 -08:00
nhmall
d18bf800ae expand mouse_support to three values rather than boolean
On Windows only:
   0 = turn off mouse_support
   1 = turn on mouse_support and turn off QuickEdit mode
   2 = turn on mouse_support and leave QuickEdit mode untouched

More generally, but not implemented anywhere:
   0 = turn off mouse_support
   1 = turn on mouse_support and make supporting O/S adjustments
       (O/S adjustments not implented beyond Windows as yet)
   2 = turn on mouse_support and do not make OS adjustments
       (unimplemented as yet so behaves as 1)
2018-11-27 22:15:34 -05:00
nhmall
53e72acb98 correct sz error when gang parameter is null 2018-11-26 10:59:57 -05:00
PatR
436956ac92 github pull request #163 - bag of holding weight
Fixes #163
Fixes #153

Encumbrance calculations for taking things out of a bag of holding
where subject to rounding issues due to integer division.  This may
improve things, although I think taking out a partial stack might not
be much better than before.

I simplified the contributed code, then decided that it wasn't an
improvement.  In the process of switching back and forth I may have
introduced bugs which weren't present originally.
2018-11-25 15:36:54 -08:00
PatR
5226de8c74 warning fixups
Non-const string literals.
2018-11-25 14:31:20 -08:00
nhmall
457d3a0d26 more warning quiet 2018-11-25 14:16:22 -05:00
nhmall
5c27a36936 try to silence clang warning 2018-11-25 13:39:48 -05:00
nhmall
ccd6f1cf22 more orctown-related follow-up
Under some circumstances, when all the marauding orcs belonging to the
horde operating within the gnomish mines had been provided with their
spoils and placed appropriately, there could still be some pillaged stuff
left-over on the migrating obj chain. Orcs created by regular monster
generation elsewhere would then be susceptable to receiving that stuff
until it was used up. That part is fine, except that the orcs were then
being named as part of the same horde operating within the mines. Now
they will no longer be named as part of the Gnomish Mines horde.

Mythos: There's a good chance that these particular orcs received the
stolen goods from the Gnomish Mines horde.
2018-11-25 12:47:53 -05:00
PatR
e5c488b15e fix github pull request #161 - scatter()
Fixes #161

Report states that scattering objects might leave a 'pile' glyph when
no longer appropriate.  I didn't try to reproduce that, just took it
on faith.  The fix tried to be too efficient and might have missed
fixing the display if breaks() or ohitmon() destroyed the objects
being scattered and left 'total' at 0.
2018-11-24 15:22:33 -08:00
PatR
bb08a46480 fix #H7596 - magic trap 'deafening roar' outcome
doesn't wake monsters.  Now it does.
2018-11-24 15:01:30 -08:00
PatR
cc5bb44a9a fix #H7591 - migrating monsters vs full levels
During level change, when a monster from mydogs (monsters accompaying
hero, usually pets) couldn't be placed because the level was full, it
was set to migrate to that level (in order to get another chance to
arrive if hero left and returned).  The code sequence
 mon_arrive()-> mnexto()-> m_into_limbo()-> migrate_to_level()-> relmon()
tried to remove the monster from the map, but it wasn't necessarily on
the map (depending upon whether it couldn't arrive at all, or arrived
at the hero's spot and couldn't be moved out of the hero's way).  The
EXTRA_SANITY_CHECKS for remove_monster() issued impossible "no monster
to remove".  relmon() now checks whether monster is already off the map.

While investigating that, I discovered that pets set to re-migrate
to the same level to try again on hero's next visit didn't work at all.
migrating_mons gets processed after mydogs so moving something from
the latter to the former after arrival failure just resulted in
immediate second failure when the more general list was handled during
the hero's current arrival.  And failure to arrive from migrating_mons
would kill the monster instead of scheduling another attempt.

The sanest fix for that turned out to be to have all monsters who
can't arrive be put back on the migrating_mons list to try again upon
hero's next visit.  Pets still fail twice but are no longer discarded
during the second time, and now do arrive when hero leaves and comes
back provided he or she has opened up some space before leaving.  If
there's still no space on the next visit, monsters who can't arrive
then are scheduled to try again on the visit after that.

Recent fix for invalid corpses becomes moot.  Monsters aren't killed
during arrival failure so there are no resulting corpses to deal with.
2018-11-24 01:45:09 -08:00
nhmall
569a66e32e Revert "Removed unnecessary use of static for nocreate values."
This reverts commit 74fc1403e3.
2018-11-23 22:17:38 -05:00
nhmall
75a962aa78 Revert "Modified how we initialize save file info."
This reverts commit 44b002c9f3.
2018-11-23 22:17:35 -05:00
nhmall
d88490fa94 Revert "Revert "Modified how we initialize save file info.""
This reverts commit 05c9ccc035.
2018-11-23 22:17:31 -05:00
nhmall
c5b283a839 Revert "Added decl_early_init() which is called when PLAYAGAIN is supported."
This reverts commit acbe4d9242.
2018-11-23 22:17:24 -05:00
nhmall
bb826992dd Revert "Previous encumberance state moved to decl.c."
This reverts commit 4e774197a6.
2018-11-23 22:17:22 -05:00
nhmall
28a953337f Revert "Moved petname_used to decl.c"
This reverts commit 6272c37035.
2018-11-23 22:17:20 -05:00
nhmall
162018060a Revert "Initial check in of icontext."
This reverts commit 5bbe3cd6bb.
2018-11-23 22:17:18 -05:00
nhmall
93ebcf0071 Revert "check."
This reverts commit 7814d9097a.
2018-11-23 22:17:16 -05:00
nhmall
7ce4c28eb9 Revert "Fixed nocreate."
This reverts commit 244a473a19.
2018-11-23 22:17:14 -05:00
nhmall
4590c9c0dd Revert "Instance variable work check-point."
This reverts commit 8e316df117.
2018-11-23 22:17:12 -05:00
nhmall
4d6e3326bb Revert "Instance variable work."
This reverts commit 14bf74c862.
2018-11-23 22:17:09 -05:00
nhmall
7ad3f32e16 Revert "Renamed instance_variables to global_variables and iv to g."
This reverts commit f9a0db6c44.
2018-11-23 22:17:07 -05:00
nhmall
414a5135b7 Revert "rumors.c static globals moved to instance_globals."
This reverts commit 6a78b203e4.
2018-11-23 22:17:05 -05:00
nhmall
bf3602eb1b Revert "rfilter initialized to UNDEFINED."
This reverts commit 716c2ceccf.
2018-11-23 22:17:03 -05:00
nhmall
5e5e321378 Revert "Renamed UNDEFINED to UNDEFINED_VALUE."
This reverts commit cee4933c24.
2018-11-23 22:17:01 -05:00
nhmall
053baa8274 Revert "restore.c globals moved to instance_globals."
This reverts commit 865c4d5a7d.
2018-11-23 22:16:59 -05:00
nhmall
04fe16d938 Revert "Moved read.c globals to instance_globals."
This reverts commit d37a91a6b8.
2018-11-23 22:16:56 -05:00
nhmall
2fb68024fe Revert "Moved potion.c globals to instance_globals."
This reverts commit d3c192e5a8.
2018-11-23 22:16:54 -05:00
nhmall
9db124f650 Revert "Fix compiler warnings in macos build."
This reverts commit 0d59f1a22b.
2018-11-23 22:16:49 -05:00
nhmall
7f023c99fb Revert "Moved sex_change_ok to instance_globals."
This reverts commit ee22210a68.
2018-11-23 22:16:47 -05:00
nhmall
44af1c78f3 Revert "topl.c globals moved to instance_globals."
This reverts commit b384223e1b.
2018-11-23 22:16:45 -05:00
nhmall
01bc4ab5e2 Revert "Fix g.restoring comments."
This reverts commit ad725c0f0f.
2018-11-23 22:16:42 -05:00
nhmall
61a35d4ac0 Revert "Moved pickup globals to instance_globals."
This reverts commit 01596f1660.
2018-11-23 22:16:40 -05:00
nhmall
734a6c2ddb Revert "objnam.c globals moved to instance globals."
This reverts commit 041e55467a.
2018-11-23 22:16:35 -05:00
nhmall
3cbc6d4cf5 Revert "Modified objects initialization to support re-entry."
This reverts commit c3eefefc99.
2018-11-23 22:16:24 -05:00
Bart House
c3eefefc99 Modified objects initialization to support re-entry. 2018-11-23 15:22:55 -08:00
Bart House
041e55467a objnam.c globals moved to instance globals. 2018-11-23 15:22:55 -08:00
Bart House
01596f1660 Moved pickup globals to instance_globals. 2018-11-23 15:22:55 -08:00
Bart House
ad725c0f0f Fix g.restoring comments. 2018-11-23 15:22:54 -08:00
Bart House
b384223e1b topl.c globals moved to instance_globals. 2018-11-23 15:22:54 -08:00
Bart House
ee22210a68 Moved sex_change_ok to instance_globals. 2018-11-23 15:22:54 -08:00
Bart House
0d59f1a22b Fix compiler warnings in macos build. 2018-11-23 15:22:54 -08:00