-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathceleste.js
126 lines (121 loc) · 2.42 KB
/
celeste.js
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
const { aOrAn } = require("./helpers/aOrAn");
function prefix_from(prefixes) {
if (prefixes.length === 0) {
return "";
}
if (Math.random() < 0.67) {
return "";
}
const result = prefixes[Math.floor(Math.random() * prefixes.length)];
const suffix = prefix_from(prefixes.filter(x => x !== result));
if (suffix === "") {
return result;
} else {
return result + " " + suffix;
}
}
function prefix() {
return prefix_from([
"reverse",
"chained",
"delayed",
"failed",
"grounded",
"inverted",
"extended",
"upside-down",
]);
}
function tech() {
const techs = [
"autoscroller",
"back",
"Badeline",
"bino",
"block",
"bubble",
"bubs",
"bunny",
"cassette",
"ceiling",
"corner",
"Dama",
"dash",
"death",
"demo",
"door",
"dream",
"fast",
"feather",
"fish",
"heart",
"hyper",
"ice",
"jelly",
"Kevin",
"key",
"Lexi",
"multi",
"neutral",
"oil",
"pause",
"Theo",
"spike",
"spinner",
"spring",
"super",
"ultra",
"wall",
"wave",
"wind",
"frown",
"smile"
];
const suffixes = [
"boost",
" boost",
"bounce",
" bubble",
" buffer",
" cancel",
"corner",
" corner boost",
" cycle",
"dash",
" dash",
" dash jump",
"drop",
" drop",
" fall",
"glide",
"hop",
" hyper",
"jump",
" jump",
"kick",
" ladder",
" pop",
" skip",
" skip skip",
" smuggle",
" storage",
" super",
" ultra",
" warp",
"vator",
];
let p = prefix();
if (p !== "") {
p = p + " ";
}
const result = p + techs[Math.floor(Math.random() * techs.length)] + suffixes[Math.floor(Math.random() * suffixes.length)];
if (Math.random() < 0.1) {
return result + " into " + tech();
}
return result;
}
function command(chatClient, channel) {
const message = tech();
chatClient.say(channel, `Simply do ${aOrAn(message)} ${message}`);
}
module.exports = { command };