最後活躍 1735703845

old_dialogue.gd 原始檔案 Playground
1extends Sequence
2
3func setup():
4 backdrop_image('qs-background', preload('res://imgs/events/QuickShot00_background.png'))
5 backdrop_image('qs-table', preload('res://imgs/events/QuickShot01_table.png'))
6 backdrop_image('qs-guy', preload('res://imgs/events/QuickShot02_guy.png'))
7
8func intro():
9 fade_out()
10
11 set_backdrop('qs-background')
12 add_backdrop('qs-table')
13 add_backdrop('qs-guy')
14 fade_in()
15
16 say_left("""
17 Back for another go, huh? Look, since my boss isn't around how about I give you around on the house.
18 """)
19 respond("> Play Game")
20
21 say_left("""
22 Same rules as last time:
23
24 Get 30 points and ya get the small prize.
25
26 Get 50 points and ya can get a big prize.
27 """)
28 next()
29
30 goto('play_minigame')
31
32func play_minigame() -> void:
33 await_minigame(Minigames.QUICK_SHOT, 'minigame_ended')
34
35func minigame_ended(userdata):
36 if userdata.score < 30:
37 execute('no_prize')
38
39 elif userdata.score < 50:
40 execute('small_prize')
41
42 else:
43 execute('large_prize')
44
45func no_prize() -> void:
46 say_left('ooo, tough luck. Maybe you want to have another go?')
47 pick([
48 '> Leave empty handed', 'end',
49 '> Play again', 'play_minigame'
50 ])
51
52func small_prize() -> void:
53 say_left('Alright, you won the small prize. Maybe you could get the big prize next time~')
54 respond('> Take small prize')
55
56 give_prize([
57 Items.small_prize.PLASTIC_TRUMPET,
58 Items.small_prize.BAG_O_BUGS,
59 Items.small_prize.STUFFED_BULL,
60 ])
61
62
63 end()
64
65
66func large_prize() -> void:
67 say_left("""
68 Way to go! The grand prize is all yours!
69 """)
70 respond('> Take big prize')
71
72 give_prize([
73 Items.large_prize.BIG_STUFFED_BEAR,
74 Items.large_prize.WEIRD_BALL,
75 Items.large_prize.STUFFED_GATOR
76 ])
77
78 end()
79