' scen/level12.txt - finding 1.5, the five reasons the twelfth level cannot
' be finished.  One scenario per reason, in the order the review lists them.

' 1. AUTO.S stealsword.  Cutting right into screen 18 is when the shadow
' takes the sword: the block goes from screen 15 (1,0), and AddGuard's test
' for it being gone is what puts the shadow there from then on.
'
' Screen 21 row 0 is empty out to column 6, then floor, pillar and the
' up-plate at 9, and its right is screen 18.  He faces left when he is put
' down, so he is turned round first and then run at the join.
SCEN cutting right into screen 18 takes the sword
AT 12 21 9 0
SEED 17
WANTBLOCK 15 1 0 22
RUN ..<<<<....>>>>>>>>>>>>>>>>
WANTBLOCK 15 1 0 1
WANT SCRN 18
WANT ALIVE 1
END

' The control: the sword is not taken by wandering about screen 21.  Without
' it the check above would be satisfied by a change that removed the sword at
' the start of the level, which is not what the original does.
SCEN the sword stays put until he cuts right
AT 12 21 9 0
SEED 17
RUN ..>>>>>>>>>>>>>>>>
WANTBLOCK 15 1 0 22
WANT SCRN 21
END

' 4. AUTO.S ADDGUARD adds the shadow once the sword has gone and not once the
' two have become one.  The port tested only for the sword, so every time
' screen 15 was entered after the merge he was made again and the meeting
' could be had over and over.
'
' The room is set up as it would be with the sword already taken, rather than
' played up to: TYPE takes the block out and ENTER arrives at the room again,
' which is what puts whoever is waiting there.  Then he walks into the shadow
' with his sword away - the one thing that ends it - and arrives once more.
SCEN the shadow does not come back after the merge
AT 12 15 6 0
TYPE 15 1 0 1
ENTER
SEED 17
RUN ..>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ENTER
WANT SCRN 15
WANT MERGES 1
WANT SHADOWS 1
WANT ALIVE 1
END

' The control: the gate is on the merge and not on the shadow.  With the
' sword still in the room nobody is waiting, which is what the test for it
' being gone is there for.
SCEN nobody is waiting while the sword is still there
AT 12 15 6 0
ENTER
WANT SHADOWS 0
WANT MERGES 0
END

' 2. CTRL.S onground.  Once the two are one, empty air on the top row of
' screen 2, and from column six of screen 13's top row, becomes floor as he
' comes to it.  That invisible bridge is the only way left out of the room
' where they met, and the port had none of it.
'
' Screen 15's left is screen 2, whose top row is empty from column 0 to 7,
' and screen 2's left is screen 13.  So the merge scenario simply carries on
' walking, and what it walks on is the thing being tested.
SCEN the bridge carries him across screen 2
AT 12 15 6 0
TYPE 15 1 0 1
ENTER
SEED 17
RUN ..>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RUN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
WANT MERGES 1
WANT SCRN 2
WANT BX 0
WANT BY 0
WANT FELL 0
WANT ALIVE 1
WANT BRIDGE 8
END

' The first control: no merge, no bridge.  Put down on the same row with the
' meeting still to come, he steps off the end of the torch block as before.
SCEN there is no bridge before the merge
AT 12 2 9 0
SEED 17
RUN ..>>>>>>>>>>>>>>>>>>
WANT BRIDGE 0
WANT FELL GE 1
END

' The second control: the bridge has an edge, and it is where the original
' puts it.  Carrying on into screen 13 he walks columns 9 to 6 on air, then
' 5 and 4 on the floor that is really there, and steps off at column 3 -
' which is what stops this change being "the twelfth level is solid".
SCEN the bridge on screen 13 stops at column six
AT 12 15 6 0
TYPE 15 1 0 1
ENTER
SEED 17
RUN ..>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RUN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RUN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
WANT SCRN 13
WANT BY 2
WANT ALIVE 1
' And he goes over that edge once.  CTRL.S startfall increments CharBlockY as
' the fall begins, so the first frame of the fall is measured against the floor
' a storey down.  Without that the port measured it against the floor he had
' just left, and the falling pose's footmark puts his base back over it: he
' landed on the block he had stepped off, crouched, and stepped off it again.
' Two step-offs and a landing that never happened, for one walk over one edge.
' (The landing count is no use here - the shadow lands too.)
WANT FELL 1
END

' 3. TOPCTRL.S NextFrame: the twelfth level is over on reaching screen 23,
' the room the bridge leads to.  There is no exit door and no stairs on this
' level, so the port - which knew only about the princess's room on level 14
' - had no way of leaving it.
'
' Screen 23's right is screen 13, whose second row begins with floor, so he
' is put there and walked at the join.  The bridge does not yet reach this
' row, which is finding 2.1 and not this one.
SCEN reaching screen 23 finishes the twelfth level
AT 12 13 0 1
SEED 17
RUN ..>>>>>>>>>>>>
WANT SCRN 23
WANT DONE 1
WANT ALIVE 1
END

' The control: it is that room and no other.  Walked the other way he ends up
' somewhere else on the same level with the level still to finish.
SCEN no other room on the level finishes it
AT 12 13 0 1
SEED 17
RUN ..<<<<....>>>>>>>>>>>>
WANT DONE 0
WANT SCRN NE 23
END

' 5. MISC.S UNHOLY and the twelfth level's half of TOPCTRL.S chgmeters: the
' kid and his shadow are one person, so a blow to either is felt by both and
' the shadow's death is his own.  Related, and the reason the port's
' behaviour was odder than the review describes: DecStr sent anyone with an
' id of one - which is what the shadow is - down the PLAYER's branch, so the
' kid's own blows came out of the kid's meter and the shadow was never
' touched at all.  Measured on the board before the change: after the fight
' below the shadow still had all four of his, and the kid was dead.
'
' Up to the moment a blow lands, neither has lost anything: the shadow's
' entrance drop costs him nothing, because the shadow always lands softly
' however far he has fallen, and so there is nothing to mirror onto the kid.
' That is finding 2.3, and before it was fixed this read 2 and 3.
SCEN before the blow lands neither has lost anything
AT 12 15 6 0
TYPE 15 1 0 1
ENTER
SWORD 1
SEED 17
RUN ..>>>>>>>>........B..>B..>^..B..>B..^>.B
WANT MAXSTR 3
WANT MAXOPP 4
WANT STR 3
WANT OPPSTR 4
WANT ALIVE 1
END

' Fought to the end, both die.  The meeting cannot be settled with the sword,
' which is the point of the level: it is finished by putting the sword away
' and walking into him.
SCEN killing the shadow is killing himself
AT 12 15 6 0
TYPE 15 1 0 1
ENTER
SWORD 1
SEED 17
RUN ..>>>>>>>>........B..>B..>^..B..>B..^>.B..>>..B..>B..>^..B..>B..>>..B..>B..B..>^..B..>B..>B..>B..>B..>B..>B..>B..>B..>B..
WANT OPPSTR 0
WANT GUARDS 1
WANT STR 0
WANT ALIVE 0
END

' The control: this is the twelfth level and nowhere else.  The same script
' against the guard on level 1 screen 3 takes two off him and nothing off the
' player, which is also what shows that giving a character with an id of one
' his own meter has not given every character the player's.
SCEN elsewhere a blow costs only the one who takes it
AT 1 3 2 1
SWORD 1
SEED 17
RUN ..<<<<....>>>>>>>>>>>>>>........B...B...^..B...B..^..B...>..B..
WANT MAXSTR 3
WANT STR 3
WANT OPPSTR 2
WANT ALIVE 1
END

' Also in 1.5: AUTO.S FinalShad :hold keeps the shadow at the ceiling until
' the kid is left of x 150, a little over half way across the room.  The drop
' is a greeting; the port had him falling the moment the room was entered,
' whether the kid was there to see it or not.
'
' Put down at column 7 the kid is at x 163, so the shadow waits.
SCEN the shadow waits at the ceiling
AT 12 15 7 0
TYPE 15 1 0 1
ENTER
SEED 17
RUN ..........
WANT SHADOWS 1
WANT OPPPOSN 15
WANT OPPFALL 0
WANT X 170
END

SCEN and drops once the kid is well into the room
AT 12 15 7 0
TYPE 15 1 0 1
ENTER
SEED 17
RUN ..........>>>>>>>>>>>>>>
WANT X LT 150
WANT OPPPOSN GT 100
END
