|
|
|
@ -23,6 +23,20 @@ BACKGROUND_LIST = ["Acolyte", "Charlatan", "Criminal / Spy", "Entertainer", "Fol
|
|
|
|
|
"Guild Artisan / Guild Merchant", "Hermit", "Knight", "Noble", "Outlander", "Pirate", "Sage", |
|
|
|
|
"Sailor", "Soldier", "Urchin",] |
|
|
|
|
|
|
|
|
|
INSTRUMENT_LIST = ["Bagpipes", "Birdpipes", "Clarinet", "Drum", "Dulcimer", "Fiddle", "Flute", "Glaur", "Hand Drum", |
|
|
|
|
"Harp", "Horn", "Longhorn", "Lute", "Lyre", "Pan Flute", "Shawm", "Songhorn", "Tantan", "Thelarr", |
|
|
|
|
"Tocken", "Trumpet", "Viol", "Wargong", "Yarting", "Zulkoon"] |
|
|
|
|
|
|
|
|
|
LANGUAGES = ["Abyssal", "Celestial", "Deep Speech", "Draconic", "Dwarvish", "Elvish", "Giant", "Gnomish", "Goblin", |
|
|
|
|
"Halfling", "Infernal", "Orc", "Primordial", "Sylvan", "Undercommon"] |
|
|
|
|
|
|
|
|
|
GAMING_SETS = ["Bowls", "Darts", "Dice Set", "Dragonchess Set", "Playing Card Set", "Quoits", "Three-Dragon Ante Set"] |
|
|
|
|
|
|
|
|
|
ARTISANS_TOOLS = ["Alchemist's Supplies", "Brewer's Supplies", "Calligrapher's Supplies", "Carpenter's Tools", |
|
|
|
|
"Cartographer's Tools", "Cobbler's Tools", "Cook's Utensils", "Glassblower's Tools", |
|
|
|
|
"Jeweler's Tools", "Leatherworker's Tools", "Mason's Tools", "Painter's Supplies", "Potter's Tools", |
|
|
|
|
"Smith's Tools", "Tinker's Tools", "Weaver's Tools", "Woodcarver's Tools"] |
|
|
|
|
|
|
|
|
|
class HeroCreation: |
|
|
|
|
def __init__(self): |
|
|
|
|
self.name_generation() |
|
|
|
@ -37,6 +51,10 @@ class HeroCreation:
|
|
|
|
|
self.article = self.grammar() |
|
|
|
|
self.skill_generation() |
|
|
|
|
self.skill_proficiency() |
|
|
|
|
self.instruments = "None" |
|
|
|
|
self.instrument_proficiencies() |
|
|
|
|
self.artisan_tools = "None" |
|
|
|
|
self.artisan_tool_proficiencies() |
|
|
|
|
self.apply_skill_modifiers("dexterity","initiative") |
|
|
|
|
self.whoami = (f"Your new character is {self.name}, {self.article} {self.race} {self.job}, with the " |
|
|
|
|
f"{self.background} background.\n") |
|
|
|
@ -51,7 +69,9 @@ class HeroCreation:
|
|
|
|
|
f"\nInvestigation: {self.investigation}\nMedicine: {self.medicine}\nNature: {self.nature}" |
|
|
|
|
f"\nPerception: {self.perception}\nPerformance: {self.performance}\nPersuasion: {self.persuasion}" |
|
|
|
|
f"\nReligion: {self.religion}\nSleight of Hand: {self.sleight_of_hand}" |
|
|
|
|
f"\nStealth: {self.stealth}\nSurvival: {self.survival}") |
|
|
|
|
f"\nStealth: {self.stealth}\nSurvival: {self.survival}\n") |
|
|
|
|
self.other_proficiencies = (f"Additional Proficiencies\n----------\nInstruments: {self.instruments}\n" |
|
|
|
|
f"Artisan's Tools: {self.artisan_tools}") |
|
|
|
|
|
|
|
|
|
#Assign the correct a/an article in the 'whoami' attr |
|
|
|
|
def grammar(self): |
|
|
|
@ -163,6 +183,7 @@ class HeroCreation:
|
|
|
|
|
setattr(self,proficient_skill,f"{new_score} (Prof)") |
|
|
|
|
|
|
|
|
|
def job_characteristics(self): |
|
|
|
|
|
|
|
|
|
with open('jobs.json') as json_file: |
|
|
|
|
job_data = json.load(json_file) |
|
|
|
|
hit_die_value = job_data[self.job]["Hit Die"] |
|
|
|
@ -170,6 +191,36 @@ class HeroCreation:
|
|
|
|
|
starting_hp_value = job_data[self.job]["Starting HP"] |
|
|
|
|
setattr(self,"starting_hp",starting_hp_value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def instrument_proficiencies(self): |
|
|
|
|
with open('jobs.json') as json_file: |
|
|
|
|
job_data = json.load(json_file) |
|
|
|
|
instrument_prof_list = [] |
|
|
|
|
try: |
|
|
|
|
for value in range(job_data[self.job]["Instruments"]): |
|
|
|
|
new_instrument = random.choice(INSTRUMENT_LIST) |
|
|
|
|
INSTRUMENT_LIST.remove(new_instrument) |
|
|
|
|
instrument_prof_list.append(new_instrument) |
|
|
|
|
instrument_string = ", ".join(instrument_prof_list) |
|
|
|
|
setattr(self, "instruments", str(instrument_string)) |
|
|
|
|
except KeyError: |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
def artisan_tool_proficiencies(self): |
|
|
|
|
with open('jobs.json') as json_file: |
|
|
|
|
job_data = json.load(json_file) |
|
|
|
|
artisan_prof_list = [] |
|
|
|
|
try: |
|
|
|
|
for value in range(job_data[self.job]["Artisan's Tools"]): |
|
|
|
|
new_tool = random.choice(ARTISANS_TOOLS) |
|
|
|
|
ARTISANS_TOOLS.remove(new_tool) |
|
|
|
|
artisan_prof_list.append(new_tool) |
|
|
|
|
artisan_tool_string = ", ".join(artisan_prof_list) |
|
|
|
|
setattr(self, "artisan_tools", str(artisan_tool_string)) |
|
|
|
|
except KeyError: |
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Used for interactively moving around stats in case of a bad allocation. |
|
|
|
|
#Disabling for now, as this project is intended to be one-command and self-contained |
|
|
|
|
# def stat_moves(self): |
|
|
|
|