-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutorial.py
114 lines (88 loc) · 3.18 KB
/
tutorial.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
from time import sleep
from enemy import Goblin, Empty
from level import level_lib
from level_runner import LevelRunner
from player_stats import PlayerStats
from tunnel import Tunnel
def tutorial(disp, inp):
tunnel = Tunnel()
disp.new_frame()
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(4, 17, "^ this is you")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(2, 18, "v its dark, you cant see whats infront of you")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(2, 18, "v hit space to reveal the next step")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.darkness_revealed = True
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(2, 18, "v hit space again to move forwards")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.darkness_revealed = False
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(2, 18, "v this next step has an enemy in it")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(2, 18, "v this enemy is an o, hit that key to handle it")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.darkness_revealed = True
tunnel.append_step(Goblin())
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(2, 18, "v there we go! hit space to step forward again")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.darkness_revealed = False
tunnel.append_step(Empty())
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(4, 18, "^ beware that you'll step forward automatically after a second")
disp.scr.addstr(5, 18, " ain't no time for dawdlin' in the tunnels!")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
disp.display_tunnel(tunnel)
disp.scr.addstr(9, 2, "Enter to continue >")
disp.scr.addstr(5, 2, "recognise the pattern, predict the enemies and handle them")
disp.scr.addstr(6, 2, "you'll lose a few lives to start with, but you'll pick it up quickly")
disp.scr.addstr(7, 2, "survive 40 steps to complete a level")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()
disp.new_frame()
level_runner = LevelRunner(disp, inp, PlayerStats())
level_runner.run_level(level_lib.get_level(0), 0)
disp.new_frame()
disp.scr.addstr(2, 2, "You got this! Go explore the real tunnels now!")
disp.display_frame()
sleep(0.5)
inp.wait_indefinitely_for_key()