-
Notifications
You must be signed in to change notification settings - Fork 3
/
figurepicker.js
61 lines (57 loc) · 1.01 KB
/
figurepicker.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
var probable = require('probable');
var alternateFigureTable = probable.createRangeTableFromDict({
throne: 160,
goddess: 40,
queen: 40,
lord: 30,
friend: 4,
cat: 4,
president: 16,
blob: 20,
tree: 4,
monster: 20,
fiend: 16,
salad: 8,
sandwich: 4,
corporation: 4,
community: 8,
church: 4,
committee: 4,
empress: 4,
'god-emperor': 4,
dance: 12,
recital: 4,
mistress: 4,
nation: 4,
dome: 8,
dragon: 4,
'director-general': 2,
potentate: 8,
monolith: 4,
union: 4,
shoggoth: 2,
worm: 2,
dracula: 3,
voivode: 2,
'home planet': 3,
chronicles: 1,
dimension: 3,
hole: 2,
pie: 4,
abyss: 1,
altar: 1
});
function getSecondaryTributeFigure() {
return alternateFigureTable.roll();
}
function getMainTributeFigure() {
var figure = 'GOD';
if (probable.roll(4) === 0) {
figure = getSecondaryTributeFigure();
}
return figure;
}
module.exports = {
getMainTributeFigure: getMainTributeFigure,
getSecondaryTributeFigure: getSecondaryTributeFigure
};