capitalex bu gisti düzenledi . Düzenlemeye git
1 file changed, 78 insertions
old_dialogue.gd(dosya oluşturuldu)
@@ -0,0 +1,78 @@ | |||
1 | + | extends Sequence | |
2 | + | ||
3 | + | func 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 | + | ||
8 | + | func 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 | + | ||
32 | + | func play_minigame() -> void: | |
33 | + | await_minigame(Minigames.QUICK_SHOT, 'minigame_ended') | |
34 | + | ||
35 | + | func 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 | + | ||
45 | + | func 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 | + | ||
52 | + | func 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 | + | ||
66 | + | func 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() |
Daha yeni
Daha eski