adding druidic names

This commit is contained in:
evilchili 2023-12-17 14:05:17 -08:00
parent c13ae29584
commit c62c14ffa3
2 changed files with 31 additions and 8 deletions

View File

@ -2,12 +2,6 @@ from language import types
from .rules import rules from .rules import rules
# surexit tutbulc filius liuit hagener tutri dierchi tir telih haioid ilau elcu
# filius gelhig haluidt iuguret amgucant pel amtanndi ho diued diprotant gener
# tutri o guir imguodant ir degion guragon tagc rodesit elcu guetig equs tres
# uache, tres uache nouidligi namin ir ni be cas igridu dimedichat guetig hit
# did braut grefiat guetig nis minn tutbulc hai cenetl in ois oisau
consonants = types.WeightedSet( consonants = types.WeightedSet(
("b", 0.2), ("b", 0.2),
("c", 0.8), ("c", 0.8),

View File

@ -4,7 +4,36 @@ from language.languages.druidic import Language
Name = types.NameGenerator( Name = types.NameGenerator(
language=Language, language=Language,
templates=types.NameSet( templates=types.NameSet(
(types.NameTemplate("name,surname"), 1.0), (types.NameTemplate("name"), 1.0),
), ),
) )
NobleName = Name
class DruidicNameGenerator(types.NameGenerator):
def __init__(self):
super().__init__(
language=Language,
templates=types.NameSet(
(types.NameTemplate("name"), 1.0),
),
)
self.language.minimum_grapheme_count = 2
class NobleDruidicNameGenerator(types.NameGenerator):
def __init__(self):
super().__init__(
language=Language,
templates=types.NameSet(
(types.NameTemplate("name"), 1.0),
),
)
self.language.minimum_grapheme_count = 2
self.suffixes = types.equal_weights(["as", "es", "is", "os", "us"], 1.0, blank=False)
def get_name(self) -> str:
return super().get_name() + self.suffixes.random()
Name = DruidicNameGenerator()
NobleName = NobleDruidicNameGenerator()