/
faithName.go
108 lines (102 loc) · 2.23 KB
/
faithName.go
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
package genreligion
import (
"github.com/Flokey82/go_gens/genlanguage"
"github.com/Flokey82/go_gens/genstory"
)
// FaitOfSupremePrefixes contains a list of prefixes identifying the group of
// followers of a supreme deity or leader.
var FaitOfSupremePrefixes = []string{
"Faith",
"Way",
"Path",
"Word",
"Truth",
"Law",
"Order",
"Light",
"Darkness",
"Gift",
"Grace",
"Witnesses",
"Servants",
"Messengers",
"Believers",
"Disciples",
"Followers",
"Children",
"Brothers",
"Sisters",
"Brothers and Sisters",
"Sons",
"Daughters",
"Sons and Daughters",
"Brides",
"Grooms",
"Brides and Grooms",
}
// genReligionMethods contains a map of religion name generation
// methods and their relative chance to be selected.
var GenReligionMethods = map[string]int{
MethodRandomType: 3,
MethodRandomIsm: 1,
MethodSurpremeIsm: 5,
MethodFaithOfSupreme: 5,
MethodPlaceIsm: 1,
MethodCultureIsm: 2,
MethodPlaceIanType: 6,
MethodCultureType: 4,
}
const (
MethodRandomType = "[RANDOM] [TYPE]"
MethodRandomIsm = "[RANDOM:trimvowels]ism"
MethodSurpremeIsm = "[SUPREME:trimvowels]ism"
MethodFaithOfSupreme = "[FAITH] of [SUPREME]"
MethodPlaceIsm = "[PLACE:trimvowels]ism"
MethodCultureIsm = "[CULTURE:trimvowels]ism"
MethodPlaceIanType = "[PLACE]ian [TYPE]"
MethodCultureType = "[CULTURE] [TYPE]"
)
const (
TokenPlace = "[PLACE]"
TokenCulture = "[CULTURE]"
TokenRandom = "[RANDOM]"
TokenSurpreme = "[SUPREME]"
TokenType = "[TYPE]"
TokenFaith = "[FAITH]"
)
var NameConfig = genstory.TextConfig{
TokenIsMandatory: map[string]bool{
TokenSurpreme: true,
TokenCulture: true,
TokenRandom: true,
TokenPlace: true,
TokenType: true,
},
TokenPools: map[string][]string{
TokenFaith: FaitOfSupremePrefixes,
},
Tokens: []string{
TokenPlace,
TokenCulture,
TokenRandom,
TokenSurpreme,
TokenType,
TokenFaith,
},
Templates: []string{
MethodRandomType,
MethodRandomIsm,
MethodSurpremeIsm,
MethodFaithOfSupreme,
MethodPlaceIsm,
MethodCultureIsm,
MethodPlaceIanType,
MethodCultureType,
},
Modifiers: map[string]func(string) string{
"trimvowels": func(s string) string {
return genlanguage.TrimVowels(s, 3)
},
},
UseAllProvided: false,
}