# Mission 066 played through (plans/briefs/world066.md), all three eggs: east through the lower
# wind tunnel, back west through the upper one to the middle and upper storeys, and from their
# teleporter 1 to the east cave. The storeys are the other way to the east cave, not an addition
# to the stair from the lava cells (x 80-81, z 65 -> 63), which this route leaves out.
wait 30
expect mission = 66
# The start corridor (walk 20, one wide, three high: a jump carries him under two blocks): over
# the mine west of the start (x 18) for the egg, back between the mines, over the mine east of
# it (x 20).
face 270
go 18.85 60 tol 0.03
go 16.5 60 jump 3 tol 0.2
until ground = 1
until mtick >= 159 max 1500  # where an egg was taken before BD-0073 (beyond 10 lives it stays)
face 90
go 19 60 jump 2 tol 0.05
until ground = 1
go 19.2 60 tol 0.03
go 22.6 60 jump 4 tol 0.08
until ground = 1
# The lightning curtain (x 24) in a quiet half (blitz 50-99).
until blitz = 50 max 400
go 25.5 60 tol 0.08
# The three big creatures, deadly only resting at the ends of their walks: each passed through
# while it walks back west from its east end (x 32, 36, 43), the trap (30) jumped on the way.
near 32 20 60 0.05 max 2000
clear 32 20 60 0.05 max 700
go 33.5 60 jump 4.3 tol 0.08
expect x >= 33.3
near 36 20 60 0.05 max 2000
clear 36 20 60 0.05 max 700
go 37.5 60 tol 0.08
near 43 20 60 0.05 max 2000
clear 43 20 60 0.05 max 900
go 50 60
# The lower wind tunnel (walk 20, two high, blowing east), entered beside its fan: walking with
# the wind he runs at twice his pace, each of its three mines (x 57, 61, 65) jumped a block before
# it; its egg at the end.
go 51 60 tol 0.1
go 51 61.4 tol 0.1
# Along z 62.05: the tunnel (z 62) is one cell wide, and off its middle his body meets the row
# z 61 (OR-0017).
go 59.2 62.05 jump 3.2 tol 0.3
go 63.2 62.05 jump 3.2 tol 0.3
go 67.2 62.05 jump 3.2 tol 0.3
go 68.3 62 until eggs = 2
until mtick >= 4064 max 1500  # where an egg was taken before BD-0073 (beyond 10 lives it stays)
# East out of the wind: the two saws in the floor (x 71, 73) jumped, one jump each, landing
# between them; up the stair (x 77-78, z 63-64) to the corridor of lava cells (z 65, walk 26).
go 72.2 62 jump 1.85 tol 0.08
until ground = 1
go 75 62 jump 3 tol 0.2
until ground = 1
go 77.5 62.2 tol 0.1
face 180
go 77.5 63 jump 1.5 tol 0.2
until ground = 1
expect y >= 21.95
go 77.5 64 jump 1.5 tol 0.2
until ground = 1
expect y >= 23.95
go 77.5 65 jump 1.5 tol 0.2
until ground = 1
expect y >= 25.95
# West along the corridor of lava cells: each of its three (x 74, 72, 70) jumped under its knob,
# to the side way (x 67, z 63-64) north to the upper wind tunnel, out of the wind at its edge.
face 270
go 75.5 65 tol 0.05
go 73 65 jump 1.9 tol 0.1
until ground = 1
expect y >= 25.95
go 71 65 jump 2 tol 0.1
until ground = 1
expect y >= 25.95
go 69 65 jump 2 tol 0.1
until ground = 1
expect y >= 25.95
go 67 65 tol 0.05
face 0
go 67 62.6 tol 0.05
# The upper wind tunnel (z 62, walk 26, two high, blowing west; its fan at x 69): in as the
# bulldozer comes to rest at its west end (x 56), so that it sets off east toward him and is jumped
# as it comes; with the wind he runs at twice his pace along the north wall (z 61.8, as near it as
# his body goes), one jump over each of the mines at x 63 and 60, the bulldozer and the mine
# at x 52, to the tunnel's west end (x 50).
clear 56 26 62 0.02 lane x max 1000
near 56 26 62 0.02 lane x max 1000
wait 35
hold 25 up
face 270
go 61.5 61.8 jump 2.6 tol 0.1
until ground = 1
go 58.5 61.8 jump 2.6 tol 0.1
until ground = 1
go 55.6 61.8 jump 2.8 tol 0.1
until ground = 1
go 50.6 61.8 jump 2.6 tol 0.1
until ground = 1
wait 30
expect x <= 50.5
# North out of the tunnel (x 50) into the middle storey's room B1 (walk 26), along its south side
# (z 56), never on the blupit's lane (z 52, where its shots fly between x 40 and 49), to the mouth
# of the bulldozer's corridor (z 53, one wide, three high).
go 50 56 tol 0.1
go 41 56 tol 0.2
go 40.2 53 tol 0.1
go 39 52.8 tol 0.05
# The bulldozer's corridor (x 30-39): the bulldozer jumped as it comes east toward him (it set off
# from its west end, x 33, and is past x 36.2), along the north wall (z 52.8); on west to the gap.
near 33 26 53 0.02 lane x max 1000
clear 33 26 53 0.02 lane x max 200
near 36.2 26 53 0.03 lane x max 300
go 30.4 52.8 jump 7.5 tol 0.05
expect x <= 30.5
# The gap (x 26-29) on the lift: at the corridor's edge (x 29.6) for the lift's stop at its east end
# (its far end first); onto it, walked to its west part while it carries him (so that he can step
# off in its short stop), off at its west end onto the trench room's floor (x 25).
go 29.6 52.8 tol 0.03
lift 26 26 53 max 300
lift 29 26 53 max 300
hold 32 up
lift 26 26 53 max 300
go 24 52.8 tol 0.1
expect x <= 24.2
expect y >= 25.95
# The trench of five mines (x 15-19, walk 25) and the crate at its end (x 20): a jump up from its
# east edge (x 21.3) catches the bars over it (y 27, x 14-21); hanging, west along them over the
# mines, off their end (x 13.5) onto the floor by the stair.
go 21.3 53 tol 0.05
hold 6 jump
wait 40
expect y >= 26.95
go 12.8 53 tol 0.1
until ground = 1
expect y >= 25.95
# The stair north (x 10-11, z 52-50, two up each) to the upper corridor (z 46, walk 32).
go 10.5 53.2 tol 0.1
face 0
go 10.5 52 jump 1.5 tol 0.2
until ground = 1
expect y >= 27.95
go 10.5 51 jump 1.5 tol 0.2
until ground = 1
expect y >= 29.95
go 10.5 50 jump 1.5 tol 0.2
until ground = 1
expect y >= 31.95
go 11.3 46 tol 0.05
# The upper corridor east (one wide, three high: a jump carries him under two blocks), along its
# north wall (z 45.8): over the cell under teleporter 1 (x 12), the trap (x 16) and the still mine
# (x 21); the moving mine (x 26-30) jumped as it comes back west toward him (it was at its west end
# 69 ticks before he sets off from x 23.5); the traps (x 32, 34), landing between them; the egg at
# the corridor's east end (x 46) under the drips.
face 90
go 13.3 45.8 jump 2.2 tol 0.1
until ground = 1
expect x >= 12.6
go 15.3 45.8 tol 0.05
go 17.2 45.8 jump 1.9 tol 0.1
until ground = 1
go 20.1 45.8 tol 0.05
go 21.9 45.8 jump 1.8 tol 0.1
until ground = 1
go 23.5 45.8 tol 0.05
near 26 32 46 0.05 lane x max 600
wait 69
go 31.2 45.8 jump 4 tol 0.05
go 33 45.8 jump 1.8 tol 0.1
until ground = 1
go 35 45.8 jump 1.8 tol 0.1
until ground = 1
go 46 46 tol 0.1
until mtick >= 9295 max 1500  # where an egg was taken before BD-0073 (beyond 10 lives it stays)
# Back west: the clay bridge's hole (x 40; it crumbled behind him on the way east), the traps
# (x 34, 32); the moving mine jumped as it comes east toward him (106 ticks
# after it turned at its east end, x 30), the still mine and the trap (x 16); under teleporter 1
# (x 12), which takes him to teleporter 2 on the east cave's west ledge (walk 32), under it
# (81, 57).
face 270
go 40.7 45.8 tol 0.05
go 39 45.8 jump 1.8 tol 0.1
until ground = 1
go 34.7 45.8 tol 0.05
go 33 45.8 jump 1.8 tol 0.1
until ground = 1
go 31 45.8 jump 1.8 tol 0.1
until ground = 1
expect x >= 30.6
near 30 32 46 0.05 lane x max 600
wait 106
go 25 45.8 jump 3.8 tol 0.05
go 20.1 45.8 jump 1.8 tol 0.1
until ground = 1
go 16.7 45.8 tol 0.05
go 15 45.8 jump 1.8 tol 0.1
until ground = 1
go 12 46 tol 0.05 until x >= 80 max 900
# Under the partner's pillar, as the original lands him (BD-0017).
expect z >= 56.9
expect z <= 57.1
expect y >= 31.95
go 82.5 61 tol 0.1
face 90
# The rods over the lava pit (z 61, x 84-92, hung from at his walking height): out to x 85, past
# the mine rising and falling through their lane (x 86) just after it turns at the bottom; on to
# x 87.5, past the bird's diagonal (it crosses the lane at x 89) in the long gap after it leaves
# its south-west end; off their end onto the far ledge.
go 85 61 tol 0.1
near 86 28 61 0.1 max 600
go 87.5 61 tol 0.05
near 87 32 64 0.1 max 600
clear 87 32 64 0.1 max 300
wait 60
go 92.9 61 tol 0.1
until ground = 1 max 60
# The far ledge (walk 32): round the trap (94, 61) to the golden key (98, 61), then the main hub.
go 93.3 62.4 tol 0.15
go 97.3 62.4
go 98 61 until exit = 1
until mission = 1 max 900
expect phase = Play
wait 60
