-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.bard
More file actions
85 lines (64 loc) · 1.31 KB
/
test.bard
File metadata and controls
85 lines (64 loc) · 1.31 KB
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
import random
from game_logic.tarot import draw_cards
# @include shared/common.bard
:: Start
~ count = 0
~ health = 100
~ multiplier = 2
~ price = 100.0
// Comment
# Comment
Basic increment:
~ count += 1 // Comment
Count is now {count}
@render render_spread(cards)
@input name="player_name" label="Your Name"
Subtraction:
~ health -= 25
Health is now {health}
<>
Health conditional is now {'s' if health > 10 else 'n'}
Health is {health:.2f}
Multiplication:
~ multiplier *= 3
Multiplier is now {multiplier}
Division:
~ price /= 4
Price is now {price}
Floor division:
~ count //= 2
Count is now {count}
-> NextPassage
Modulo:
~ health %= 10
Remainder is now {health} ^SPECIAL
Exponentiation:
~ multiplier **= 2
Multiplier is now {multiplier}
All tests complete!
+ [Choice Text] -> NextPassage
* {health.other > 10} [Other Choice Text] -> NextPassage
:: NextPassage
Text content
~ my_string_variable = "this_string"
~ my_function_variable = MyFunction(health=health)
@py:
import random
value = random.randint(1, 10)
my_variable = 2
my_other_variable = "string"
@endpy
@if health > 10:
~ my_cond_var = "var"
Display text
@elif health > 5:
Display this text
@else:
Display final text
@endif
@for h in range(health):
My health is {h} now!
@endfor
+ [Continue] -> NewPassage
:: NewPassage
This is a new passage