fix #H6925 - being trapped vs Levitation/Flying

Make being trapped in/on/over floor block Levitation and Flying, the
way that being inside solid rock already does, and the way levitating
blocks flight.

Blocked levitation still provides enhanced carrying capacity since
magic is attempting to make the hero's body be bouyant.  I think that
that is appropriate but am not completely convinced.

One thing that almost certainly needs fixing is digging a hole when
trapped in the floor or tethered to a buried iron ball, where the
first part of digactualhole() releases the hero from being trapped.
If being released re-enables blocked levitation, the further stages
of digging might not make sense in some circumstances.

I recently realized that being held by a grabbing monster is similar
to being trapped so should also interfere with levitation and flying.
Nothing here attempts to address that.

Save files change, but in a compatible fashion unless trapped at the
time of saving.  If someone saves while trapped prior to this patch,
then applies it and restores, the game will behave as if the patch
wasn't in place--until escape from trap is achieved.  (Not verified.)
This commit is contained in:
PatR
2018-09-30 01:06:59 -07:00
parent 00dfed5b3a
commit 3e19858edd
20 changed files with 330 additions and 149 deletions

View File

@@ -152,6 +152,11 @@ fix missing space in "would flyif you weren't levitating"
a wand of polymorph lost its magical ability for the turn just because the
player using it to engrave happened to be blind, which didn't make
a much sense
floating eye is classified as a flyer but flying is blocked while levitating,
so don't set intrinsic flying if hero is polymorphed into one
being trapped (bear trap, web, molten or solidified lava, chained to buried
iron ball) blocks both levitation and flight (note: being stuck in a
pit ends when either of those starts so doesn't apply)
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository