import random def pb(skill): return (user_data[skill] - 10) // 2 def base36encode(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): base36 = '' if 0 <= number < len(alphabet): return sign + alphabet[number] while number != 0: number, i = divmod(number, len(alphabet)) base36 = alphabet[i] + base36 return base36 def base36decode(number): return int(number, 36) seed = input("Seed:") seed = base36decode(seed) while seed < -1 or seed > 89234750982: seed = int(input("Seed (positive number less than 89,234,750,982): ")) random.seed(seed) user_tribe = str() user_skills = list() user_languages = "Common" user_data = {"Size": "Medium", "Gold": 100} races = ["Dwarf", "Elf", "Halfling", "Human"] classes = ["Barbarian", "Bard", "Cleric", "Druid", "Fighter", "Monk", "Paladin", "Ranger", "Sorcerer", "Rogue"] skill_list = { "Barbarian": ["Climb", "Craft", "Handle Animal", "Intimidate", "Jump", "Listen", "Ride", "Survival", "Swim"], "Bard": ["Appraise", "Balance", "Bluff", "Climb", "Concentration", "Craft", "Decipher Script", "Diplomacy", "Disguise", "Escape Artist", "Gather Information", "Hide", "Intimidate", "Jump", "Knowledge (arcana)", "Knowledge (architecture and engineering)", "Knowledge (dungeoneering)Knowledge (geography)Knowledge (history)Knowledge (local)", "Knowledge (nature)", "Knowledge (nobility and royalty)", "Knowledge (religion)", "Knowledge (the planes)", "Listen", "Move Silently", "Perform", "Profession", "Ride", "Search", "Sense Motive", "Sleight of Hand", "Speak Language", "Spellcraft", "Swim", "Tumble", "Use Magic Device"], "Cleric": ["Concentration", "Craft", "Diplomacy", "Heal", "Knowledge (arcana)", "Knowledge (history)", "Knowledge (religion)", "Knowledge (the planes)", "Profession", "Spellcraft"], "Druid": ["Concentration", "Craft", "Diplomacy", "Handle", "Animal", "Heal", "Knowledge (nature)", "Listen", "Profession", "Ride", "Spellcraft", "Spot", "Survival", "Swim"], "Fighter": ["Climb", "Craft", "Handle Animal", "Intimidate", "Jump", "Ride", "Swim"], "Monk": ["Balance", "Climb", "Concentration", "Craft", "Diplomacy", "Escape Artist", "Hide", "Jump", "Knowledge (arcana)", "Knowledge (religion)", "Listen", "Move Silently", "Perform", "Profession", "Sense Motive", "Spot", "Swim", "Tumble"], "Paladin": ["Concentration", "Craft", "Diplomacy", "Handle Animal", "Heal", "Knowledge (nobility and royalty)", "Knowledge (religion)", "Profession", "Ride", "Sense Motive", "Spot", "Swim", "Tumble"], "Ranger": ["Climb", "Concentration", "Craft", "Handle Animal", "Heal", "Hide", "Jump", "Knowledge (local)", "Listen", "Move Silently", "Profession", "Ride", "Search", "Spot", "Survival", "Swim", "Use Rope"], "Rogue": ["Appraise", "Balance", "Bluff", "Climb", "Craft", "Decipher Script", "Diplomacy", "Disable Device", "Disguise", "Escape Artist", "Forgery", "Gather Information", "Hide", "Intimidate", "Jump", "Knowledge (local)", "Listen", "Move Silently", "Open Lock", "Perform", "Profession", "Search", "Sense Motive", "Sleight of Hand", "Spot", "Swim", "Tumble", "Use Magic Device", "Use Rope"], "Sorcerer": ["Bluff", "Concentration", "Craft", "Knowledge (arcana)", "Profession", "Spellcraft"], "Wizard": ["Concentration", "Craft", "Decipher Script", "Knowledge (Arcana)", "Knowledge (Architecture and Engineering)", "Knowledge (Dungeoneering)", "Knowledge (Geography)", "Knowledge (History)", "Knowledge (Local)", "Knowledge (Nature)", "Knowledge (Nobility and Royalty)", "Knowledge (Religion)", "Knowledge (The Planes)", "Spellcraft", "Profession"] } class_health = {"Barbarian": 12, "Bard": 6, "Cleric": 8, "Druid": 8, "Fighter": 10, "Monk": 8, "Paladin": 10, "Ranger": 8, "Sorcerer": 4, "Rogue": 6, "Wizard": 4} class_xp = {"Barbarian": 4, "Bard": 6, "Cleric": 2, "Druid": 4, "Fighter": 2, "Monk": 4, "Paladin": 2, "Ranger": 6, "Sorcerer": 2, "Rogue": 8, "Wizard": 2} alignment1 = ["Lawful", "Neutral", "Chaotic"] alignment2 = ["Good", "Neutral", "Evil"] niche_feats = ["Combat Experience (int 13)", "Dodge (dex 13)", "Power Attack (str 13)", "Simple Weapon Proficency (druids, monks, rogues, and wizards)", "Spell Mastery (Wizard)", "Two weapon fighting (Dex 15)"] feats = ["Acrobatic", "Agile", "Alertness", "Animal Affinity", "Armor Proficency", "Athletic", "Blind-Fight", "Combat Casting", "Combat Reflexes", "Deceitful", "Deft Hands", "Diligent", "Endurance", "Eschew Materials", "Great Fortitude", "Improved Counterspell", "Improved Initiative", "Improved Unarmed Strike", "Investigator", "Iron Will", "Lightning Reflexes", "Magical Aptitude", "Martial Weapon Proficency", "Negotiator", "Nimble Fingers", "Persuasive", "Point Blank Shot", "Run", "Self Sufficent", "Skill Focus", "Spell Focus", "Spell Penetration", "Stealthy", "Toughness", "Track"] melee_weapons = ["Club", "Dagger", "Javelin", "Light Mace", "Heavy Mace", "Short Spear", "Sickle", "Spear", "Spiked Gauntlet", "Great Club", "Morningstar", "Quarterstaff", "Scythe"] ranged_weapons = ["Light Crossbow", "Sling", "Heavy Crossbow"] wizard_weapons = ["Club", "Dagger", "Heavy Crossbow", "Light Crossbow", "Quarterstaff"] bard_weapons = ["Long Sword", "Rapier", "Sap", "Short Sword", "Short Bow", "Dagger", "Gauntlet", "Light Mace", "Sickle", "Club", "Heavy Mace", "Morningstar", "Short Spear", "Long Spear", "Quarterstaff", "Spear", "Crossbow", "LightCrossbow", "Javelin", "Sling"] monk_weapons = ["Club", "Light Crossbow", "Heavy Crossbow", "Dagger", "Handaxe", "Javelin", "Quarterstaff", "Sling"] rogue_weapons = ["Sap", "Short Bow", "Rapier", "Short Sword", "Club", "Dagger", "Javelin", "Light Mace", "Heavy Mace", "Short Spear", "Sickle", "Spear", "Spiked Gauntlet", "Great Club", "Morningstar", "Quarterstaff", "Scythe", "Dejada", "Sling", "Light Crossbow", "Heavy Crossbow"] druid_weapons = ["Club", "Dagger", "Quarterstaff", "Scimitar", "Sickle", "Short Spear", "Sling", "Spear"] armor = ["Padded", "Leather", "Padded Leather", "Chain Shirt", "Hide", "Scalemail", "Chainmail", "Breastplate", "Splintmail", "Bandedmail", "Half Plate"] shields = ["Light Wooden", "Light Steel", "Heavy Wooden", "Heavy Steel", "Buckler"] bard_armor = ["Padded", "Leather", "Padded Leather", "Chain Shirt"] cleric_armor = ["Padded", "Leather", "Padded Leather", "Hide", "Chain Shirt", "Scalemail", "Chainmail", "Breastplate", "Splintmail", "Bandedmail", "Half Plate"] barbarian_armor = ["Padded Leather", "Padded Leather", "Chain Shirt", "Hide", "Scalemail", "Chainmail", "Breastplate"] druid_armor = ["Padded", "Leather", "Hide"] religions = ["Heironeous", "Moradin", "Yondalla", "Ehlonna", "Garl Glittergold", "Pelor", "Corellon Larethian", "Kord", "Wee Jas", "St. Cuthbert", "Boccob", "Fharlanghn", "Obad-Hai", "Olidammara", "Hextor", "Nerull", "Vecna", "Erythnul", "Gruumsh"] monk_religions = ["Heironeous", "St. Cuthbert", "Hextor"] fighter_religions = ["Heironeous", "Kord", "St. Cuthbert", "Hextor", "Erythnul"] religion_weapons = {"Boccob": "Quarterstaff", "Corellon Larethian": "Long Sword", "Ehlonna": "Long Bow", "Erythnul": "Morningstar", "Fharlanghn": "Quarterstaff", "Garl Glittergold": "Battleaxe", "Gruumsh": "Spear", "Heironeous": "Long Sword", "Hextor": "Flail", "Kord": "Greatsword", "Moradin": "Warhammer", "Nerull": "Scythe", "Obad-Hai": "Quarterstaff", "Olidammara": "Rapier", "Pelor": "Heavy Mace", "St. Cuthbert": "Light Mace", "Vecna": "Dagger", "Wee Jas": "Dagger", "Yondalla": "Short Sword"} familiars = ["Bat", "Cat", "Hawk", "Lizard", "Owl", "Rat", "Raven", "Snake", "Toad", "Weasel"] weapon_data = { "Gauntlet": {"Cost": 2, "Damage (S)": "1d2", "Damage (M)": "1d3", "Critical": 2, "Weight": 1, "Type": "Bludgeoning", "Handed": 1}, "Dagger": {"Cost": 2, "Damage (S)": "1d3", "Damage (M)": "1d4", "Critical": 2, "Weight": 1, "Type": "Bludgeoning", "Handed": 1}, "Spiked Gauntlet": {"Cost": 5, "Damage (S)": "1d3", "Damage (M)": "1d4", "Critical": 2, "Weight": 1, "Type": "Piercing", "Handed": 1}, "Light Mace": {"Cost": 5, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 4, "Type": "Bludgeoning", "Handed": 1}, "Sickle": {"Cost": 6, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 2, "Type": "Slashing", "Handed": 1}, "Club": {"Cost": 0, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 3, "Type": "Bludgeoning", "Handed": 1}, "Heavy Mace": {"Cost": 12, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 2, "Weight": 8, "Type": "Bludgeoning", "Handed": 1}, "Morningstar": {"Cost": 8, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 2, "Weight": 8, "Type": "Bludgeoning and Piercing", "Handed": 1}, "Short Spear": {"Cost": 1, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 3, "Type": "Piercing", "Handed": 1}, "Long Spear": {"Cost": 5, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 3, "Weight": 9, "Type": "Piercing", "Handed": 2}, "Quarterstaff": {"Cost": 0, "Damage (S)": "2d6", "Damage (M)": "2d6", "Critical": 2, "Weight": 4, "Type": "Bludgeoning", "Handed": 2}, "Spear": {"Cost": 2, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 3, "Weight": 6, "Type": "Piercing", "Handed": 2}, "Heavy Crossbow": {"Cost": 50, "Damage (S)": "1d8", "Damage (M)": "1d10", "Critical": 2, "Weight": 8, "Type": "Piercing", "Handed": 1}, "Light Crossbow": {"Cost": 35, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 2, "Weight": 4, "Type": "Piercing", "Handed": 1}, "Javelin": {"Cost": 1, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 2, "Type": "Piercing", "Handed": 1}, "Sling": {"Cost": 0, "Damage (S)": "1d3", "Damage (M)": "1d4", "Critical": 2, "Weight": 0, "Type": "Bludgeoning", "Handed": 1}, "Throwing Axe": {"Cost": 8, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 2, "Type": "Slashing", "Handed": 1}, "Light Hammer": {"Cost": 1, "Damage (S)": "1d3", "Damage (M)": "1d4", "Critical": 2, "Weight": 2, "Type": "Bludgeoning", "Handed": 1}, "Handaxe": {"Cost": 6, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 3, "Weight": 3, "Type": "Slashing", "Handed": 1}, "Kukri": {"Cost": 8, "Damage (S)": "1d3", "Damage (M)": "1d4", "Critical": 2, "Weight": 2, "Type": "Slashing", "Handed": 1}, "Light Pick": {"Cost": 4, "Damage (S)": "1d3", "Damage (M)": "1d4", "Critical": 4, "Weight": 3, "Type": "Piercing", "Handed": 1}, "Sap": {"Cost": 1, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 2, "Type": "Bludgeoning", "Handed": 1}, "Short Sword": {"Cost": 10, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 2, "Type": "Piercing", "Handed": 1}, "Battleaxe": {"Cost": 10, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 3, "Weight": 6, "Type": "Slashing", "Handed": 1}, "Flail": {"Cost": 8, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 2, "Weight": 5, "Type": "Bludgeoning", "Handed": 1}, "Long Sword": {"Cost": 15, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 2, "Weight": 4, "Type": "Slashing", "Handed": 1}, "Heavy Pick": {"Cost": 8, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 4, "Weight": 6, "Type": "Piercing", "Handed": 1}, "Rapier": {"Cost": 20, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 2, "Type": "Piercing", "Handed": 1}, "Scimitar": {"Cost": 15, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 2, "Weight": 4, "Type": "Slashing", "Handed": 1}, "Trident": {"Cost": 15, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 2, "Weight": 4, "Type": "Piercing", "Handed": 1}, "Warhammer": {"Cost": 12, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 3, "Weight": 5, "Type": "Bludgeoning", "Handed": 1}, "Falchion": {"Cost": 75, "Damage (S)": "1d6", "Damage (M)": "2d4", "Critical": 2, "Weight": 8, "Type": "Slashing", "Handed": 2}, "Glaive": {"Cost": 8, "Damage (S)": "1d8", "Damage (M)": "1d10", "Critical": 3, "Weight": 10, "Type": "Slashing", "Handed": 2}, "Greataxe": {"Cost": 20, "Damage (S)": "1d10", "Damage (M)": "1d12", "Critical": 3, "Weight": 12, "Type": "Slashing", "Handed": 2}, "Great Club": {"Cost": 5, "Damage (S)": "1d8", "Damage (M)": "1d10", "Critical": 2, "Weight": 8, "Type": "Bludgeoning", "Handed": 2}, "Heavy Flail": {"Cost": 15, "Damage (S)": "1d8", "Damage (M)": "1d10", "Critical": 2, "Weight": 10, "Type": "Bludgeoning", "Handed": 2}, "Greatsword": {"Cost": 50, "Damage (S)": "1d10", "Damage (M)": "2d6", "Critical": 2, "Weight": 8, "Type": "Slashing", "Handed": 2}, "Guisarme": {"Cost": 9, "Damage (S)": "1d6", "Damage (M)": "2d4", "Critical": 3, "Weight": 12, "Type": "Slashing", "Handed": 2}, "Halberd": {"Cost": 10, "Damage (S)": "1d8", "Damage (M)": "1d10", "Critical": 3, "Weight": 12, "Type": "Piercing or Slashing", "Handed": 2}, "Lance": {"Cost": 10, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 3, "Weight": 10, "Type": "Piercing", "Handed": 2}, "Ranseur": {"Cost": 10, "Damage (S)": "1d6", "Damage (M)": "2d4", "Critical": 3, "Weight": 12, "Type": "Piercing", "Handed": 2}, "Scythe": {"Cost": 18, "Damage (S)": "1d6", "Damage (M)": "2d4", "Critical": 4, "Weight": 10, "Type": "Piercing or Slashing", "Handed": 2}, "Long Bow": {"Cost": 75, "Damage (S)": "1d6", "Damage (M)": "1d8", "Critical": 3, "Weight": 3, "Type": "Piercing", "Handed": 2}, "Short Bow": {"Cost": 30, "Damage (S)": "1d4", "Damage (M)": "1d6", "Critical": 3, "Weight": 2, "Type": "Piercing", "Handed": 2} } armor_data = { "None": {"Cost": 0, "Armor Bonus": 0, "Max Dex Bonus": 100, "Armor Check": 0, "Arcane Spell Failure": 0, "Weight": 0, "Class": "None"}, "Padded": {"Cost": 5, "Armor Bonus": 1, "Max Dex Bonus": 8, "Armor Check": 0, "Arcane Spell Failure": 5, "Weight": 10, "Class": "Light"}, "Leather": {"Cost": 10, "Armor Bonus": 2, "Max Dex Bonus": 6, "Armor Check": 0, "Arcane Spell Failure": 10, "Weight": 15, "Class": "Light"}, "Padded Leather": {"Cost": 25, "Armor Bonus": 3, "Max Dex Bonus": 5, "Armor Check": -1, "Arcane Spell Failure": 15, "Weight": 20, "Class": "Light"}, "Chain Shirt": {"Cost": 100, "Armor Bonus": 4, "Max Dex Bonus": 4, "Armor Check": -2, "Arcane Spell Failure": 20, "Weight": 25, "Class": "Light"}, "Hide": {"Cost": 15, "Armor Bonus": 3, "Max Dex Bonus": 4, "Armor Check": 3, "Arcane Spell Failure": 20, "Weight": 25, "Class": "Medium"}, "Scalemail": {"Cost": 50, "Armor Bonus": 4, "Max Dex Bonus": 3, "Armor Check": 4, "Arcane Spell Failure": 25, "Weight": 30, "Class": "Medium"}, "Chainmail": {"Cost": 150, "Armor Bonus": 5, "Max Dex Bonus": 2, "Armor Check": 5, "Arcane Spell Failure": 30, "Weight": 40, "Class": "Medium"}, "Breastplate": {"Cost": 200, "Armor Bonus": 5, "Max Dex Bonus": 3, "Armor Check": -4, "Arcane Spell Failure": 25, "Weight": 30, "Class": "Medium"}, "Splintmail": {"Cost": 200, "Armor Bonus": 6, "Max Dex Bonus": 0, "Armor Check": 7, "Arcane Spell Failure": 40, "Weight": 45, "Class": "Heavy"}, "Bandedmail": {"Cost": 250, "Armor Bonus": 6, "Max Dex Bonus": 1, "Armor Check": 6, "Arcane Spell Failure": 35, "Weight": 35, "Class": "Heavy"}, "Half Plate": {"Cost": 600, "Armor Bonus": 7, "Max Dex Bonus": 0, "Armor Check": 7, "Arcane Spell Failure": 40, "Weight": 50, "Class": "Heavy"}, "Buckler": {"Cost": 15, "Armor Bonus": 1, "Armor Check": 1, "Arcane Spell Failure": 5, "Weight": 5, "Class": "Light"}, "Light Wooden": {"Cost": 3, "Armor Bonus": 1, "Armor Check": 1, "Arcane Spell Failure": 5, "Weight": 5, "Class": "Light"}, "Light Steel": {"Cost": 9, "Armor Bonus": 1, "Armor Check": 1, "Arcane Spell Failure": 5, "Weight": 6, "Class": "Light"}, "Heavy Wooden": {"Cost": 7, "Armor Bonus": 2, "Armor Check": 12, "Arcane Spell Failure": 15, "Weight": 10, "Class": "Heavy"}, "Heavy Steel": {"Cost": 20, "Armor Bonus": 2, "Armor Check": 12, "Arcane Spell Failure": 15, "Weight": 15, "Class": "Heavy"} } languages = {"Human": "Common", "Druid": "Druidic", "Dwarf": "Dwarven", "Elf": "Elven", "Gnome": "Gnome", "Halfling": "Halfling"} dwarf_first_names = ["Adrik", "Alberich", "Baern", "Barendd", "Brottor", "Bruenor", "Dain", "Darrak", "Delg", "Eberk", "Einkil", "Fargrim", "Flint", "Gardain", "Harbek", "Kildrak", "Morgran", "Orsik", "Oskar", "Rangrim", "Rurik", "Taklinn", "Thoradin", "Thorin", "Tordek", "Traubon", "Travok", "Ulfgar", "Veit", "Vondal"] dwarf_last_names = ["Balderk", "Battlehammer", "Brawnanvil", "Dankil", "Fireforge", "Frostbeard", "Gorunn", "Holderhek", "Ironfist", "Loderr", "Lutgehr", "Rumnaheim", "Strakeln", "Torunn", "Ungart"] dwarf_clans = ["Balderk", "Dankil", "Gorunn", " Holderhek", "Loderr", "Lutgehr", "Rumnaheim", "Strakeln", "Torunn", "Ungart"] elf_first_names = ["Adran", "Aelar", "Aramil", "Arannis", "Aust", "Beiro", "Berrian", "Carric", "Enialis", "Erdan", "Erevan", "Galinndan", "Hadarai", "Heian", "Himo", "Immeral", "Ivellios", "Laucian", "Mindartis", "Paelias", "Peren", "Quarion", "Riardon", "Rolen", "Soveliss", "Thamior", "Tharivol", "Theren", "Varis"] elf_last_names = ["Amakiir", "Amastacia", "Galanodel", "Holimion", "Ilphelkiir", "Liadon", "Meliamne", "Naïlo", "Siannodel", "Xiloscient"] halfling_first_names = ["Alton", "Ander", "Cade", "Corrin", "Eldon", "Errich", "Finnan", "Garret", "Lindal", "Lyle", "Merric", "Milo", "Osborn", "Perrin", "Reed", "Roscoe", "Wellby"] halfling_last_names = ["Brushgather", "Goodbarrel", "Greenbottle", "High-hill", "Hilltopple", "Leagallow", "Tealeaf", "Thorngage", "Tosscobble", "Underbough"] human_first_names = { "Calishite": {"Aseir", "Bardeid", "Haseid", "Khemed", "Mehmen", "Sudeiman", "Zasheir"}, "Chondathan": {"Darvin", "Dorn", "Evendur", "Gorstag", "Grim", "Helm", "Malark", "Morn", "Randal", "Stedd"}, "Damaran": {"Bor", "Fodel", "Glar", "Grigor", "Igan", "Ivor", "Kosef", "Mival", "Orel", "Pavel", "Sergor"}, "Illuskan": {"Ander", "Blath", "Bran", "Frath", "Geth", "Lander", "Luth", "Malcer", "Stor", "Taman", "Urth"}, "Mulan": {"Aoth", "Bareris", "Ehput-Ki", "Kethoth", "Mumed", "Ramas", "So-Kehur", "Thazar-De", "Urhur"}, "Rashemi": {"Borivik", "Faurgar", "Jandar", "Kanithar", "Madislak", "Ralmevik", "Shaumar", "Vladislak"}, "Shou": {"Chien", "Huang", "Kao", "Kung", "Lao", "Ling", "Mei", "Pin", "Shin", "Sum", "Tan", "Wan"}, "Turami": {"Anton", "Diero", "Marcon", "Pieron", "Rimardo", "Romero", "Salazar", "Umbero"} } human_last_names = { "Calishite": {"Basha", "Dumein", "Jassan", "Khalid", "Mostana", "Pashar", "Rein"}, "Chondathan": {"Amblecrown", "Buckman", "Dundragon", "Evenwood", "Greycastle", "Tallstag"}, "Damaran": {"Bersk", "Chernin", "Dotsk", "Kulenov", "Marsk", "Nemetsk", "Shemov", "Starag"}, "Illuskan": {"Brightwood", "Helder", "Hornraven", "Lackman", "Stormwind", "Windrivver"}, "Mulan": {"Ankhalab", "Anskuld", "Fezim", "Hahpet", "Nathandem", "Sepret", "Uuthrakt"}, "Rashemi": {"Ankhalab", "Anskuld", "Fezim", "Hahpet", "Nathandem", "Sepret", "Uuthrakt"}, "Shou": {"An", "Chen", "Chi", "Fai", "Jiang", "Jun", "Lian", "Long", "Meng", "On", "Shan", "Shui", "Wen"}, "Turami": {"Agosto", "Astorio", "Calabra", "Domine", "Falone", "Marivaldi", "Pisacar", "Ramondo"} } human_tribes = ["Calishite", "Chondathan", "Damaran", "Illuskan", "Mulan", "Rashemi", "Shou", "Turami"] user_race = random.choice(races) user_class = random.choice(classes) if user_race == "Dwarf": user_tribe = random.choice(dwarf_clans) user_data["Name"] = random.choice(dwarf_first_names) + " " + random.choice(dwarf_last_names) + ", of the clan " + user_tribe if random.random() > 0.8: user_data["Religion"] = "Moradin" user_data["Age"] = random.randrange(40, 140) user_data["Height"] = random.randrange(48, 56) user_data["Weight"] = 130 + (user_data["Height"] - 57) * random.randrange(2, 12) user_data["con"] = random.randrange(10, 20) user_data["cha"] = random.randrange(6, 16) user_languages += languages["Dwarf"] elif user_race == "Elf": user_data["Name"] = random.choice(elf_first_names) + " " + random.choice(elf_last_names) if random.random() > 0.8: user_data["Religion"] = "Corellon Larethian" user_data["Age"] = random.randrange(110, 180) user_data["Height"] = random.randrange(55, 65) user_data["Weight"] = 85 + (user_data["Height"] - 52) * random.randrange(1, 6) user_data["dex"] = random.randrange(10, 20) user_data["con"] = random.randrange(6, 16) user_languages += "Elven" elif user_race == "Halfling": del user_data["Size"] user_data["Size"] = "Small" user_data["Name"] = random.choice(halfling_first_names) + " " + random.choice(halfling_last_names) if random.randrange(0, 3) > 0: user_data["Alignment"] = "Neutral " + random.choice(alignment2) user_data["Age"] = random.randrange(22, 30) user_data["Height"] = random.randrange(30, 32) user_data["Weight"] = random.randrange(34, 40) user_data["dex"] = random.randrange(10, 20) user_data["str"] = random.randrange(6, 16) user_languages += "Halfling" else: user_tribe = random.choice(human_tribes) user_data["Age"] = random.randrange(18, 30) user_data["Height"] = random.randrange(60, 80) user_data["Weight"] = 120 + (user_data["Height"] - 58) * random.randrange(2, 8) user_data["Name"] = random.sample(human_first_names[user_tribe], 1) + random.sample(human_first_names[user_tribe], 1) user_data["Name"] = " ".join(str(x) for x in user_data["Name"]) + ", of the clan " + user_tribe if "str" not in user_data: user_data["str"] = random.randrange(8, 18) if "dex" not in user_data: user_data["dex"] = random.randrange(8, 18) if "con" not in user_data: user_data["con"] = random.randrange(8, 18) if "cha" not in user_data: user_data["cha"] = random.randrange(8, 18) if "int" not in user_data: user_data["int"] = random.randrange(8, 18) if "wis" not in user_data: user_data["wis"] = random.randrange(8, 18) user_data["Health"] = class_health[user_class] + pb("con") if user_class == "Barbarian": user_data["Weapon"] = random.choice(melee_weapons) user_data["Shield"] = random.choice(shields) user_data["Armor"] = random.choice(barbarian_armor) user_data["Alignment"] = alignment1[random.randrange(1, 3)] + " " + random.choice(alignment2) if random.random() > 0.3: user_data["Religion"] = "Kord" if random.random() > 0.6: user_data["Religion"] = "Obad Hai" if random.random() > 0.9: user_data["Religion"] = "Erythnul" elif user_class == "Bard": user_data["Weapon"] = random.choice(bard_weapons) user_data["Shield"] = shields[random.randrange(0, 3)] user_data["Armor"] = random.choice(bard_armor) user_data["Alignment"] = alignment1[random.randrange(1, 3)] + " " + random.choice(alignment2) if "Chaotic" in user_data["Alignment"]: user_data["Religion"] = "Olidammara" elif random.random() > 0.5: user_data["Religion"] = "Pelor" elif random.random() > 0.5: user_data["Religion"] = "Corellon Larethian" elif user_class == "Cleric": user_data["Religion"] = random.choice(religions) user_data["Weapon"] = religion_weapons[user_data["Religion"]] user_data["Armor"] = random.choice(cleric_armor) user_data["Shield"] = random.choice(shields) elif user_class == "Druid": if random.random() > 0.5: user_data["Shield"] = "Light Wooden" else: user_data["Shield"] = "Heavy Wooden" user_data["Weapon"] = random.choice(druid_weapons) user_data["Armor"] = random.choice(druid_armor) if random.random() > 0.8: if random.random() > 0.5: user_data["Religion"] = "Obad Hai" else: user_data["Religion"] = "Ehlonna" user_data["Alignment"] = random.choice(alignment1) + " " + random.choice(alignment2) while user_data["Alignment"] == "Chaotic Good" or user_data["Alignment"] == "Chaotic Evil" or user_data["Alignment"] == "Lawful Good" or user_data["Alignment"] == "Lawful Evil": del user_data["Alignment"] user_data["Alignment"] = random.choice(alignment1) + " " + random.choice(alignment2) user_languages += "Druidic" elif user_class == "Fighter": if random.random() > 0.5: user_data["Weapon"] = random.choice(melee_weapons) else: user_data["Weapon"] = random.choice(ranged_weapons) user_data["Shield"] = random.choice(shields) user_data["Armor"] = random.choice(armor) user_data["Religion"] = random.choice(fighter_religions) elif user_class == "Monk": if random.random() > 0.8: user_data["Armor"] = armor[random.randrange(0, 3)] if random.random() > 0.8: user_data["Shield"] = shields[random.randrange(0, 3)] user_data["Weapon"] = random.choice(monk_weapons) user_data["Alignment"] = "Lawful " + random.choice(alignment2) if random.random() > 0.3: user_data["Religion"] = random.choice(monk_religions) else: user_data["Religion"] = random.choice(religions) elif user_class == "Paladin": user_data["Armor"] = random.choice(armor) user_data["Shield"] = random.choice(shields) if random.random() > 0.5: user_data["Weapon"] = random.choice(ranged_weapons) else: user_data["Weapon"] = random.choice(melee_weapons) user_data["Alignment"] = "Lawful Good" if random.random() > 0.7: user_data["Religion"] = "Heironeous" elif random.random() > 0.6: user_data["Religion"] = "Pelor" elif user_class == "Ranger": user_data["Armor"] = armor[random.randrange(0, 3)] user_data["Shield"] = shields[random.randrange(0, 3)] user_data["Weapon"] = random.choice(ranged_weapons) if random.random() > 0.7: if random.random() > 0.5: user_data["Religion"] = "Ehlonna" else: user_data["Religion"] = "Obad Hai" elif random.random() > 0.6: user_data["Religion"] = random.choice(religions) elif user_class == "Rogue": user_data["Armor"] = armor[random.randrange(0, 3)] user_data["Weapon"] = random.choice(rogue_weapons) user_data["Religion"] = random.choice(religions) elif user_class == "Sorcerer": if random.random() > 0.5: user_data["Weapon"] = random.choice(ranged_weapons) else: user_data["Weapon"] = random.choice(melee_weapons) if random.random() > 0.5: user_data["Religion"] = random.choice(religions) user_data["Familiar"] = random.choice(familiars) if user_data["Familiar"] == "Toad": del user_data["Health"] user_data["Health"] = 7 + pb("con") elif user_class == "Wizard": user_data["Weapon"] = random.choice(wizard_weapons) if random.random() > 0.8: user_data["Feat"] = "Spell Mastery" if random.random > 0.6 and "evil" not in user_data["Alignment"]: user_data["Religion"] = "Boccob" elif random.random() > 0.3: user_data["Religion"] = "Nerull" ''' if pb(int) > 1: user_languages += random.choice(languages) while len(user_languages) != len(set(user_languages)): user_languages.pop() user_languages += random.choice(languages) additional languages ''' points_to_spend = class_xp[user_class] + pb("int") if points_to_spend < 1: points_to_spend = 1 if user_race == "Human": points_to_spend += 1 if points_to_spend > len(skill_list[user_class]) - 1: points_to_spend = skill_list[user_class] if user_data["str"] > 12 and random.random() > 0.4: user_skills += ["Power Attack"] points_to_spend -= 1 if user_data["dex"] > 12 and random.random() > 0.3: user_skills += ["Dodge"] points_to_spend -= 1 if user_data["int"] > 12 and random.random() > 0.4: user_skills += ["Combat Experience"] points_to_spend -= 1 if user_data["dex"] > 14 and random.random() > 0.2: user_skills += ["Two Weapon Fighting"] points_to_spend -= 1 user_skills += random.sample(skill_list[user_class], points_to_spend) formatted_user_skills = ", ".join(str(x) for x in user_skills) user_data["Feat"] = random.choice(feats) user_data["Armor Class"] = 10 if "Armor" in user_data: x = user_data["Armor Class"] del user_data["Armor Class"] user_data["Armor Class"] = x + armor_data[user_data["Armor"]]["Armor Bonus"] if "Shield" in user_data: x = user_data["Armor Class"] del user_data["Armor Class"] user_data["Armor Class"] = x + armor_data[user_data["Shield"]]["Armor Bonus"] if "Alignment" not in user_data: user_data["Alignment"] = random.choice(alignment1) + " " + random.choice(alignment2) if user_data["Alignment"] == "Neutral Neutral": del user_data["Alignment"] user_data["Alignment"] = "True Neutral" print("Name: {}".format(user_data["Name"])) print("Age: {} \n".format(user_data["Age"])) print("Character Type: Level 1 {} {}".format(user_race, user_class)) print("Alignment: {}".format(user_data["Alignment"])) print("Languages : {}".format(user_languages)) print("Feat: {}\n".format(user_data["Feat"])) print("Weapon: {}".format(user_data["Weapon"])) if "Armor" in user_data: print("Armor: {} Armor".format(user_data["Armor"])) else: user_data["Armor"] = "None" print("Armor Class: {}".format(user_data["Armor Class"])) if weapon_data[user_data["Weapon"]]["Handed"] == 1 and "Shield" in user_data: print("Shield: {} Shield".format(user_data["Shield"])) print("\nHealth Points: {}\n".format(user_data["Health"])) print("Strength: {} ({})".format(user_data["str"], pb("str"))) print("Dexterity: {} ({})".format(user_data["dex"], pb("dex"))) print("Constitution: {} ({})".format(user_data["con"], pb("con"))) print("Intelligence: {} ({})".format(user_data["int"], pb("int"))) print("Wisdom: {} ({})".format(user_data["wis"], pb("wis"))) print("Charisma: {} ({}) \n".format(user_data["cha"], pb("cha"))) print("Size: {}, Height: {}'{}, Weight: {} lbs.\n".format(user_data["Size"], user_data["Height"] // 12, user_data["Height"] % 12, user_data["Weight"])) if "Religion" in user_data: print("Religion: {}\n".format(user_data["Religion"])) if user_data["Size"] == "Medium": print("Load: {} lbs".format(weapon_data[user_data["Weapon"]]["Weight"] + armor_data[user_data["Armor"]]["Weight"])) elif user_data["Size"] == "Small": print("Load: {} lbs".format((weapon_data[user_data["Weapon"]]["Weight"] + armor_data[user_data["Armor"]]["Weight"]) // 2)) print("Skills: {}".format(formatted_user_skills)) """ TODO: figure out why languages are fucked figure out class languages fix feats figure out different types of attacks remove cost of armor/weapons from total gold weight feats/skills to different classes create an app Class Stuff: cleric: aura/spells Bonus Languages: A cleric’s bonus language options include Celestial, Abyssal, and Infernal druid: Spells: Spells: A druid casts divine spells (the same type of spells available to the cleric, paladin, and ranger), which are drawn from the druid spell list (page 189). Her alignment may restrict her from casting certain spells opposed to her moral or ethical beliefs; see Chaotic, Evil, Good, and Lawful Spells, below. A druid must choose and prepare her spells in advance (see below). To prepare or cast a spell, the druid must have a wis score equal to at least 10 + the spell level (Wis 10 for 0-level spells, Wis 11 for 1st-level spells, and so forth). The Difficulty Class for a saving throw against a druid’s spell is 10 + the spell level + the druid’s wis modifier. ok so just go through all of the class pages, theres a lot. """
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question