-
Notifications
You must be signed in to change notification settings - Fork 2
/
fnord.cfg
71 lines (49 loc) · 3.87 KB
/
fnord.cfg
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
// assume fnord_sttmp does dbclr
alias fnord_sttmp "menu_cmd rpn /tempdb dbsave dbclr"
alias fnord_ldtmp "menu_cmd rpn /tempdb dbload"
alias dbpush "menu_cmd rpn \"/$1\" dbpush"
alias fnord_load "menu_cmd rpn /fdb_$1 dbload"
alias fnord_save "menu_cmd rpn /fdb_$1 dbsave"
alias fnord_clear "fnord_sttmp; menu_cmd rpn /fdb_$1 dbsave; fnord_ldtmp"
alias fnord_add "fnord_sttmp; fnord_load $1; dbpush \"$2\"; fnord_save $1; fnord_ldtmp"
alias fnord_from "fnord_sttmp; fnord_load $1; menu_cmd rpn dblen rand dbgoto /fnord_word dbread def; fnord_ldtmp"
// use the optimized version
alias fnord_from "fnord_load $1; menu_cmd rpn dblen rand dbgoto /fnord_word dbread def"
alias fnord_chance_0 ""
alias fnord_chance_do "fnord_chance_$fnord_chance_is"
alias fnord_chance "alias fnord_chance_1 \"$2\"; menu_cmd rpn /fnord_chance_is 100 rand $1 le def; fnord_chance_do"
alias fnord_set "set fnord_text \"$fnord_word\""
alias fnord_append "set fnord_text \"$fnord_text $fnord_word\""
alias fnord_p_adj "fnord_from adjectives; fnord_append"
alias fnord_p_noun "fnord_from nouns; fnord_append"
alias fnord_p_name "fnord_from names; fnord_append"
alias fnord_p_place "fnord_from places; fnord_append"
alias fnord_p_pre "fnord_from prepositions; fnord_append"
alias fnord_p_act "fnord_from actions; fnord_append"
alias fnord_p_pro "fnord_from pronouns; fnord_append"
alias fnord_p_intro "fnord_from intros; fnord_append"
alias fnord_p_mod "fnord_from modifiers; fnord_append"
alias fnord_p_inf "fnord_from infinitives; fnord_append"
alias fnord_p_ability "fnord_from abilities; fnord_append"
alias fnord_p "set fnord_text \"$fnord_text $1\""
alias fnord_p0 "set fnord_text \"$1\""
alias fnord_p_in_place "fnord_p \"in\"; fnord_p_place"
alias fnord_rule0 "fnord_p \"the\"; fnord_chance 50 fnord_p_adj; fnord_p_noun; fnord_chance 20 fnord_p_in_place; fnord_p \"is\"; fnord_p_adj"
alias fnord_rule1 "fnord_p_name; fnord_p_act; fnord_p \"the\"; fnord_p_adj; fnord_p_noun; fnord_p \"and the\"; fnord_p_adj; fnord_p_noun"
alias fnord_rule2 "fnord_p \"The\"; fnord_p_noun; fnord_p \"from\"; fnord_p_place; fnord_p \"will go to\"; fnord_p_place"
alias fnord_rule3 "fnord_p_name; fnord_p \"must take the\"; fnord_p_adj; fnord_p_noun; fnord_p \"from\"; fnord_p_place"
alias fnord_rule4 "fnord_p_place; fnord_p \"is\"; fnord_p_adj; fnord_p \"and the\"; fnord_p_noun; fnord_p \"is\"; fnord_p_adj"
alias fnord_rule5 "fnord_p_name; fnord_p_pre; fnord_p_place; fnord_p \"for the\"; fnord_p_adj; fnord_p_noun"
alias fnord_rule6 "fnord_p \"the\"; fnord_chance 50 fnord_p_adj; fnord_p_noun; fnord_p_act; fnord_p \"the\"; fnord_p_adj; fnord_p_noun; fnord_chance 20 fnord_p_in_place"
alias fnord_rule7 "fnord_p_name; fnord_p_pre; fnord_p_place; fnord_p \"and\"; fnord_p_act; fnord_p \"the\"; fnord_p_noun"
alias fnord_rule8 "fnord_p_name; fnord_p \"takes\"; fnord_p_pro; fnord_chance 50 fnord_p_adj; fnord_p_noun; fnord_p \"and\"; fnord_p_pre; fnord_p_place"
alias fnord_rule9 "fnord_p_name; fnord_p_act; fnord_p \"the\"; fnord_chance 50 fnord_p_adj; fnord_p_noun"
alias fnord_rule10 "fnord_p_name; fnord_p_act; fnord_p_name; fnord_p \"and\"; fnord_p_pro; fnord_chance 50 fnord_p_adj; fnord_p_noun"
alias fnord_rule11 "fnord_p \"you must meet\"; fnord_p_name; fnord_p \"at\"; fnord_p_place; fnord_p \"and get the\"; fnord_chance 50 fnord_p_adj; fnord_p_noun"
alias fnord_rule12 "fnord_p \"a\"; fnord_p_noun; fnord_p \"from\"; fnord_p_place; fnord_p_act; fnord_p \"the\"; fnord_chance 50 fnord_p_adj; fnord_chance 20 fnord_p_adj; fnord_p_noun"
alias fnord_echo "echo ^2${fnord_text}."
alias fnord_say "say ^2${fnord_text}."
alias fnord_rule "fnord_rule$fnord_type ; fnord_say"
alias fnord "fnord_sttmp; fnord_p0 \"\"; fnord_chance 80 fnord_p_intro; menu_cmd rpn /fnord_type 13 rand def; fnord_rule; fnord_ldtmp"
// use optimized fnord_from
alias fnord "fnord_sttmp; fnord_p0 \"\"; fnord_chance 80 fnord_p_intro; menu_cmd rpn /fnord_type 13 rand def; fnord_rule; fnord_ldtmp"