' scen/climbdown.txt - finding 2.1: down does three different things.
'
' CTRL.S standing :down.  With a cliff in front of him and his base within
' three pixels of the edge, down steps off it.  With a cliff behind and his
' base eight or more pixels into the block - within six of the edge behind -
' down lowers him over that edge and he ends hanging from it.  Anything else
' is a crouch.  The port crouched in every case, so getting down two storeys
' safely could not be done at all and every descent cost health or a life.
'
' Level 1 screen 1's top row is empty out to column 2 and floor from 3 to 7,
' with floor one row down at column 2, so the join between columns 2 and 3 is
' a ledge with somewhere to stand under it.

' The step-off is not a sequence: CTRL.S :down nudges him five pixels over
' the edge and lets the floor test do the rest.  So this runs long enough to
' land, a storey lower and unhurt.
SCEN down at the edge, with the drop in front, steps off
AT 1 1 3 0
X 105
SEED 17
RUN ..v..........
WANT BY 1
WANT BX 2
WANT STOOPS 0
WANT CLIMBDOWN 0
WANT ALIVE 1
END

' The threshold is three pixels and it is exclusive: at exactly three from
' the edge he crouches, which is what CTRL.S "cmp #StepOffFwd / bcs :notfwd"
' says.  StepOffFwd is 3.
SCEN three pixels from the edge is not close enough
AT 1 1 3 0
X 107
SEED 17
RUN ..v...
WANT STOOPS 1
WANT BY 0
WANT CLIMBDOWN 0
END

' Turned round, the same ledge is behind him and the same key climbs down it.
' He ends a storey lower and unhurt, which is the whole point of the move.
SCEN down with the drop behind him climbs down it
AT 1 1 3 0
FACE 0
X 114
SEED 17
RUN ..v.......................
WANT CLIMBDOWN 1
WANT BY 1
WANT ALIVE 1
WANT HARD 0
WANT STOOPS 0
END

' And in the middle of a floor it is still a crouch, which is what down was
' always for.
SCEN down anywhere else is a crouch
AT 1 1 5 0
SEED 17
RUN ..v
WANT POSN 107
WANT STOOPS 1
WANT CLIMBDOWN 0
WANT FELL 0
WANT BY 0
END

' CTRL.S :2, the button-down branch of "standing", answers a fresh down at the
' same :down label as the button-up branch does - "lda clrD / bmi :down".  The
' port had no down case in that branch at all, so holding the action key took
' the climb-down away.  Held down he keeps his grip, so he is still hanging at
' the end of this rather than having let go.
SCEN down with the button held climbs down too
AT 1 1 3 0
FACE 0
X 114
SEED 17
RUN ..DDDDDDDDDDDDDDDDDDDDDDDD
WANT CLIMBDOWN 1
WANT BY 1
WANT ACTION 3
WANT ALIVE 1
END
