PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.6
Code Block Pro – Beautiful Syntax Highlighting v1.27.6
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / samples / narrat.sample

narrat.sample in Code Block Pro – Beautiful Syntax Highlighting 1.27.6, at build/shiki/samples/narrat.sample

92 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 quest_demo:
2 set_button shopButton true
3 set_button parkButton greyed
4 jump bread_quest
5
6 bread_quest:
7 choice:
8 talk helper idle "Can you get 2 pieces of bread for me?"
9 "Yes":
10 talk helper idle "Thanks, that's very nice!"
11 talk helper idle "I'll be waiting for you at the park"
12 jump bread_start
13 "No":
14 talk helper idle "Oh, okay"
15 jump quest_demo
16
17 bread_start:
18 start_quest breadShopping
19 talk inner idle "Time to go to the shop to buy some bread then."
20 set_screen map
21 set_button shopButton true
22
23 shopButton:
24 // set_screen default
25 "You visit the bread shop"
26 talk shopkeeper idle "Hello, I'm a little baker selling bread and drinks!"
27 set data.breadPrice 5
28 jump shop_menu
29
30 parkButton:
31 choice:
32 talk helper idle "Ah, so do you have my bread?"
33 "Yes!" if (>= $items.bread.amount 2):
34 talk helper idle "Thanks a lot!"
35 add_item bread -2
36 complete_objective breadShopping delivery
37 complete_quest breadShopping
38 set_button parkButton false
39 jump demo_end
40 "No :(":
41 talk helper idle "Oh okay"
42
43 shop_menu:
44 choice:
45 talk shopkeeper idle "So, do you want some bread?"
46 "Buy bread (costs %{$$data.breadPrice})" if (>= $stats.money.value $data.breadPrice):
47 add_item bread 1
48 if (== $data.breadPrice 5):
49 add_stat money -5
50 else:
51 add_stat money -4
52 jump map_update
53 roll bread_haggle haggling 50 "Try to haggle for bread" hideAfterRoll:
54 success "You explain that helper cat needs bread to feed his poor family":
55 add_xp haggling 10
56 set data.breadPrice 4
57 talk shopkeeper idle "I guess I can sell you bread for 4 coins"
58 jump shop_menu
59 failure "You try to pity trip the shopkeeper but he won't bulge":
60 add_xp haggling 5
61 talk shopkeeper idle "The price is 5 coins, nothing less, nothing more."
62 jump shop_menu
63 "Exit":
64 jump map_update
65
66 show_map:
67 set_button parkButton false
68 set_button shopButton true
69 set_screen map
70
71 map_update:
72 set_button parkButton false
73 set_button shopButton true
74 log $items.bread
75 if (>= $items.bread.amount 2):
76 complete_objective breadShopping bread
77 talk inner idle "I've got enough bread now, I'm going to go to the park."
78 start_objective breadShopping delivery
79 set_screen map
80 set_button parkButton true
81 set_button shopButton false
82 else:
83 talk inner idle "Hmm, I still need to buy more bread for helper cat."
84 set_screen map
85
86 eat_bread:
87 talk player idle "hmm, bread"
88
89 read_book:
90 talk inner idle "It's full of ocult rituals. I'm not sure what they are, but I'm sure they are useful."
91
92 // From: https://github.com/liana-p/narrat-engine/blob/main/packages/narrat/examples/games/demo/data/quest.narrat