diff --git a/npc/__init__.py b/npc/__init__.py index 3332bda..d7117a2 100644 --- a/npc/__init__.py +++ b/npc/__init__.py @@ -30,5 +30,5 @@ def load_ancestry_pack(module_name: str = "") -> ModuleType: def random_npc(ancestries: list = []) -> NPC: if not ancestries: - ancestries = list(load_ancestry_pack()[1].values()) + ancestries = list(load_ancestry_pack()[0].values()) return random.choice(ancestries).NPC() diff --git a/npc/ancestries/malseid.py b/npc/ancestries/malseid.py new file mode 100644 index 0000000..4c2372a --- /dev/null +++ b/npc/ancestries/malseid.py @@ -0,0 +1,29 @@ +import random + +from npc import types +from language.languages import druidic + +tail_traits = [ + 'small', + 'clipped', + 'stubby', + 'stiff', + 'strong', + 'thick', + 'thin', +] + + +class Malseid(types.NPC): + language = druidic + has_tail = True + + @property + def tail(self): + if self._tail is None: + self._tail = random.choice(tail_traits) + return self._tail + + + +NPC = Malseid