# Mission 114 played through (plans/briefs/world114.md): the terraces for the red key, the skate
# track for the green, the pool's islands for the blue, the vault's five treasures and the exit
# on its high platform by helicopter.
wait 30
expect mission = 114
# South to the terraces. Each terrace (rows z0 .. z0 + 5, walk 20, 17, 14, 11, then the floor 8)
# has mines sweeping along X in its rows z0 + 1, + 3, + 5; the rows between are safe. Each lane is
# crossed at x 50 once every mine in it is more than 12 away, and its last lane by dropping off
# the terrace's edge.
# The lava pit (z 60-64) on the bar over it (x 50, y 22): a jump from its north floor catches the
# bar; hanging, south along it and off its end.
go 50 59.2 tol 0.05
hold 6 jump
wait 40
expect y >= 21.9
go 50 65.8 tol 0.1
until ground = 1
go 50 66
clear 50 20 67 12 lane x max 900
go 50 68 tol 0.2
clear 50 20 69 12 lane x max 900
go 50 70 tol 0.2
clear 50 20 71 12 lane x max 900
go 50 72.3 tol 0.2
until ground = 1
expect y <= 17.1
# Terrace 2 (walk 17): over lane 73 to row 74 and west along it to treasure 1 (35, 74).
clear 50 17 73 12 lane x max 900
go 50 74 tol 0.2
go 35 74 until treasures = 1 max 900
until treasures = 1 max 200
# Down at x 50 (a lane's two mines, mirrored, are both far from its middle at once): terrace 3
# (walk 14) for the egg (40, 80) along row 80; terrace 4 (walk 11) and east along row 86 to
# treasure 2 (65, 86); the floor (walk 8) and the red key (50, 93).
go 50 74
clear 50 17 75 12 lane x max 900
go 50 76 tol 0.2
clear 50 17 77 12 lane x max 900
go 50 78.3 tol 0.2
until ground = 1
clear 50 14 79 12 lane x max 900
go 50 80 tol 0.2
go 40 80 until eggs = 1 max 600
go 50 80
clear 50 14 81 12 lane x max 900
go 50 82 tol 0.2
clear 50 14 83 12 lane x max 900
go 50 84.3 tol 0.2
until ground = 1
clear 50 11 85 12 lane x max 900
go 50 86 tol 0.2
go 65 86 until treasures = 2 max 900
until treasures = 2 max 200
go 50 86
clear 50 11 87 12 lane x max 900
go 50 88 tol 0.2
clear 50 11 89 12 lane x max 900
go 50 90.3 tol 0.2
until ground = 1
expect y <= 8.1
go 50 93 tol 0.3
# Up the lift (2 x 2 at x 64-65, z 92-93) to its landing (walk 20) and north along the way over
# the terraces' east ends to the first terrace, in lane x 66 (the mines sweep to x 65), west
# along its row 66 and north to the hall.
# Onto the item (the original's 28 px boxes, BD-0021).
go 60 92 tol 0.15
go 63.3 92.5 tol 0.1
lift 64 8 92 max 1200
go 64.5 92.5 tol 0.15
until y >= 19.9 max 900
go 65 90
go 66 72
go 66 66.2
go 50 66
go 50 65.2 tol 0.05
hold 6 jump
wait 40
expect y >= 21.9
go 50 58.4 tol 0.1
until ground = 1
expect keys = 1
# West through the red door (x 41, it takes the key) to the skate track (walk 20, x 4-29, z 46-54): a skateboard
# from its head (28, 50), through the block of mines (x 20-22, z 47, 50, 53: the skateboard sets
# them off), treasures 3-5 (16, 47), (12, 53), (8, 50) and the green key (5, 50); the inverts in
# their alcoves (18, 45) and (10, 55) kept clear of.
# The fan passage (x 31-39, one wide at z 50): each fan (x 38, 35, 32) jumped while the mine
# sweeping under the ceiling (x 31-39, y 25) is far: over 38 as it turns at the west end; on the
# floor between, the mine passes over him; over 35 and 32 as it turns at the east end.
go 43 50
go 39.3 50 tol 0.08
near 31 25 50 0.4 lane x max 900
go 36.6 50 jump 2.6 tol 0.1
until ground = 1
go 36.3 50 tol 0.08
near 39 25 50 0.4 lane x max 900
go 33.6 50 jump 2.6 tol 0.1
until ground = 1
go 33.3 50 tol 0.08
go 30.6 50 jump 2.6 tol 0.1
until ground = 1
go 28.15 50 tol 0.1
hold 2 action
wait 20
go 19 50 max 600
go 16 47.5 until treasures = 3 max 600
until treasures = 3 max 200
go 12 52.5 until treasures = 4 max 600
until treasures = 4 max 200
go 8 50 until treasures = 5 max 600
until treasures = 5 max 200
go 5 50 until keys = 1 max 600
until keys = 1 max 200
# Back east along the track on the skateboard, off it (Action) in the corridor, north through the
# green door (z 41) to the pool's bank (walk 20, z 29).
go 22 50.5 max 900
# The board glides on; it is left only below 8 px a tick (Decor.cpp:4499, OR-0020), on the track
# before the fan passage.
wait 60
hold 2 action
wait 20
# The fan passage eastward: over 32 as the mine turns at the east end, over 35 and 38 as it turns
# at the west end.
go 30.7 50 tol 0.08
near 39 25 50 0.4 lane x max 900
go 33.4 50 jump 2.6 tol 0.1
until ground = 1
go 33.7 50 tol 0.08
near 31 25 50 0.4 lane x max 900
go 36.4 50 jump 2.6 tol 0.1
until ground = 1
go 36.7 50 tol 0.08
go 39.4 50 jump 2.6 tol 0.1
until ground = 1
go 43 50
go 50 43
# The column of lightning across the way (z 35) passed in its cycle's quiet half.
go 50 37 tol 0.1
until blitz = 50 max 400
go 50 31
go 50 29.4 tol 0.2
expect keys = 0
# The pool (water y 12-19, its bottom walk 12): its chain of islands (walk 20) on four ferries
# (2 wide, 60 ticks, 40 dwelling), stepping on as each lies at its near end and off at its far
# end; the eggs on the first three islands, the blue key on the last (58, 23). The mines hang
# over the islands' corners. Along the bank (z 29) at z 29.1: the wall at z 30 is a half-width off
# z 29.3 (OR-0017).
go 47.5 29.1 tol 0.1
# On as the ferry comes in (its far end first): found resting there, it could leave before his walk,
# easing in (BD-0059), took him aboard.
lift 47 20 25 max 900
lift 47 20 28 max 900
go 47.5 28 tol 0.15
lift 47 20 25 max 600
go 46.5 23
go 46 22 until eggs = 3 max 300
go 45.5 20.3 tol 0.1
lift 45 20 19 max 900
go 45.5 19 tol 0.15
lift 45 20 15 max 600
go 46 12.5 until eggs = 4 max 300
go 48.3 11.5 tol 0.1
lift 49 20 11 max 900
go 49 11.5 tol 0.15
lift 55 20 11 max 600
go 57.5 11.5
go 58 12 until eggs = 5 max 300
go 57.5 14.3 tol 0.1
lift 57 20 15 max 900
go 57.5 15 tol 0.15
lift 57 20 19 max 600
go 58 21
go 58 23 until keys = 1 max 300
until keys = 1 max 200
# The pool's four treasures on its bottom (walk 12), each dived for when the fish near it are
# clear, then up at the nearest bank (its top level with the water's) and out. Treasure 6
# (64, 26) from the last island's east edge, out onto the south bank (z 29).
go 60.4 23 tol 0.15
face 90
clear 63 14 25 3.5 max 1800
go 64 26 with crouch until treasures = 6 max 600
hold 250 crouch
until treasures = 6 max 200
clear 64 15 27.5 2.5 max 900
go 64 28.4 tol 0 with lookup until y >= 19.2 max 600
face 180
hold 8 up jump
hold 30 up
until ground = 1
# Round to the north bank (z 6): treasure 7 (66, 12).
go 70 29
go 70 6
go 66 6.4 tol 0.15
face 180
clear 66 15 8 5 lane x max 1800
go 66 12 with crouch until treasures = 7 max 600
hold 250 crouch
until treasures = 7 max 200
clear 66 15 8 5 lane x max 900
# Under water to just off the bank first: surfacing farther out (the fish's original timing
# changes where he is after the dive, BD-0016) the jump falls short of the one-cell ledge.
go 66 7.2 tol 0.15 max 600
go 66 6.6 tol 0 with lookup until y >= 19.2 max 600
face 0
hold 8 up jump
hold 30 up
until ground = 1
# West along the north bank: treasure 8 (40, 9).
go 40 6.4 tol 0.15
face 180
clear 40 15 8 5 lane x max 1800
go 40 9 with crouch until treasures = 8 max 600
hold 250 crouch
until treasures = 8 max 200
clear 40 15 8 5 lane x max 900
go 40 6.6 tol 0 with lookup until y >= 19.2 max 600
face 0
hold 8 up jump
hold 30 up
until ground = 1
# To the west bank (x 30): treasure 9 (36, 20), timed past the fish along x 35.
go 30 6
go 30.4 20 tol 0.15
face 90
clear 35 13 20 6 lane z max 1800
go 36 20 with crouch until treasures = 9 max 600
hold 250 crouch
until treasures = 9 max 200
clear 35 13 20 4 lane z max 900
go 30.6 20 tol 0 with lookup until y >= 19.2 max 600
face 270
hold 8 up jump
hold 30 up
until ground = 1
# Back to the hall and east through the blue door (x 59) into the vault (walk 20). Its five
# treasures each lie two west of a sleeping follow star, which wakes within 2.06: each is taken
# from 0.4 west of it, the ways kept 2.4 or more from every star.
go 30 29
go 50 29.3
go 50 33 tol 0.1
until blitz = 50 max 400
go 50 41
go 50 50
go 57.5 50
go 63 50 tol 0.1
until blitz = 50 max 400
go 71 50
go 83 50 tol 0.1 until treasures = 10 max 600
until treasures = 10 max 200
go 75.4 63
go 75.6 66 tol 0.1 until treasures = 11 max 600
until treasures = 11 max 200
go 75.4 63
go 89.3 63
go 90 66 tol 0.1 until treasures = 12 max 600
until treasures = 12 max 200
go 89.3 52
# Onto the item (the original's 28 px boxes, BD-0021).
go 90 34 tol 0.15
go 89.5 34 tol 0.1 until treasures = 13 max 900
until treasures = 13 max 200
go 89.3 37
go 75.4 37
go 75.6 34 tol 0.1 until treasures = 14 max 600
until treasures = 14 max 200
# A helicopter from the row by the west wall (73, 44), up to the exit's platform (walk 34) and
# down onto the exit (89, 59).
go 74 42
go 73.15 44 tol 0.1
hold 2 action
wait 20
go 75 46 tol 0 with lookup until y >= 33.5 max 900
fly 89 34.90 59 tol 0.3 max 900
go 89 59 tol 0 with crouch until exit = 1 max 600
until mission = 110 max 900
expect phase = Play
wait 60
