瀏覽代碼

Add special careers to main block

master
Noëlle 4 年之前
父節點
當前提交
157c647ce4
共有 1 個文件被更改,包括 30 次插入25 次删除
  1. 30
    25
      koboldgen.py

+ 30
- 25
koboldgen.py 查看文件

@@ -121,15 +121,20 @@ class Character:
{"id": 10, "name": "Cartographer"},
{"id": 11, "name": "Inventor"},
{"id": 12, "name": "Merchant"},
{"id": 119, "name": "Bard"},
{"id": 120, "name": "Sorcerer"},
{"id": 121, "name": "Cleric"},
{"id": 122, "name": "Rogue"},
{"id": 123, "name": "Ranger"},
{"id": 124, "name": "Barbarian"},
{"id": 125, "name": "Artificer"},
{"id": 126, "name": "Druid"},
{"id": 127, "name": "Wizard"}
{"id": 13, "name": "Bard"},
{"id": 14, "name": "Sorcerer"},
{"id": 15, "name": "Cleric"},
{"id": 16, "name": "Rogue"},
{"id": 17, "name": "Ranger"},
{"id": 18, "name": "Barbarian"},
{"id": 19, "name": "Artificer"},
{"id": 20, "name": "Druid"},
{"id": 21, "name": "Wizard"},
{"id": 22, "name": "Fighter"},
{"id": 23, "name": "Monk"},
{"id": 24, "name": "Paladin"},
{"id": 25, "name": "Warlock"},
{"id": 26, "name": "Blood Hunter"}
]

def __init__(self, name=None, career=None, stats=None, gadget=None):
@@ -138,7 +143,7 @@ class Character:
self.career = ""
elif isinstance(career, str):
self.career = career
elif isinstance(career, int) and (career in range(13) or career in range(119,128)):
elif isinstance(career, int) and career in range(27):
self.career = [x for x in Character.CAREERS if x["id"] == career][0]
else:
self.career = ""
@@ -196,7 +201,7 @@ class Character:
self.stats = stats

def gen_career(self):
cid = r.randint(0,12)
cid = r.randint(0,26)
self.career = next((x for x in Character.CAREERS if x["id"] == cid), "")

def gen_gadget(self):
@@ -468,11 +473,11 @@ class Campaign:
self.params = Plot()
self.art = "an" if self.params.loc_desc[0] in ["a","e","i","o","u"] else "a"
self.characters = []
self.characters.append(Character("Niwri", 123, [3, 4, 4, 3], 123))
self.characters.append(Character("Zax", 124, [1, 6, 2, 5], 124))
self.characters.append(Character("Chroma", 125, [4, 2, 5, 3], 125))
self.characters.append(Character("Zenosha", 126, [3, 4, 5, 2], 126))
self.characters.append(Character("Snax", 127, [3, 4, 6, 1], 127))
self.characters.append(Character("Niwri", 17, [3, 4, 4, 3], 123))
self.characters.append(Character("Zax", 18, [1, 6, 2, 5], 124))
self.characters.append(Character("Chroma", 19, [4, 2, 5, 3], 125))
self.characters.append(Character("Zenosha", 20, [3, 4, 5, 2], 126))
self.characters.append(Character("Snax", 21, [3, 4, 6, 1], 127))
# self.print_params()
# self.print_chars()
return
@@ -482,10 +487,10 @@ class Campaign:
self.params = Plot()
self.art = "an" if self.params.loc_desc[0] in ["a","e","i","o","u"] else "a"
self.characters = []
self.characters.append(Character("Daldain", 119, [3, 4, 5, 2], 114))
self.characters.append(Character("Gox", 124, [2, 5, 2, 5], 115))
self.characters.append(Character("Zeeli", 120, [4, 2, 5, 3], 116))
self.characters.append(Character("Sox", 122, [3, 3, 3, 3], 117))
self.characters.append(Character("Daldain", 13, [3, 4, 5, 2], 114))
self.characters.append(Character("Gox", 18, [2, 5, 2, 5], 115))
self.characters.append(Character("Zeeli", 14, [4, 2, 5, 3], 116))
self.characters.append(Character("Sox", 16, [3, 3, 3, 3], 117))
# self.print_params()
# self.print_chars()
return
@@ -495,11 +500,11 @@ class Campaign:
self.params = Plot()
self.art = "an" if self.params.loc_desc[0] in ["a","e","i","o","u"] else "a"
self.characters = []
self.characters.append(Character("Daldain", 119, [4, 5, 5, 3], 118))
self.characters.append(Character("Gox", 124, [2, 6, 4, 5], 119))
self.characters.append(Character("Zeeli", 120, [3, 4, 6, 5], 120))
self.characters.append(Character("Marwyse", 121, [4, 4, 6, 3], 121))
self.characters.append(Character("Sox", 122, [5, 4, 4, 4], 122))
self.characters.append(Character("Daldain", 13, [4, 5, 5, 3], 118))
self.characters.append(Character("Gox", 18, [2, 6, 4, 5], 119))
self.characters.append(Character("Zeeli", 14, [3, 4, 6, 5], 120))
self.characters.append(Character("Marwyse", 15, [4, 4, 6, 3], 121))
self.characters.append(Character("Sox", 16, [5, 4, 4, 4], 122))
# self.print_params()
# self.print_chars()
return

Loading…
取消
儲存