Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint, choice
- class fifthEdCharacterGenerator:
- def dice(self):
- """This function rolls dice for the second function"""
- X = [randint(1, 6) for n in range(4)]
- X.sort
- X = X[1:]
- return sum(X)
- def character(self):
- """This function actually makes a goddamned character"""
- x_arr = [self.dice() for n in range(6)]
- x_arr = sorted(x_arr)
- char = randint(1, 13)
- if char == 1:
- char_class = "Bard"
- x = randint(1, 4)
- if x == 1:
- sub_class = "College of Valor"
- elif x == 2:
- sub_class = "College of Lore"
- elif x == 3:
- sub_class = "College of Swords"
- else:
- sub_class = "College of Satire"
- Cha = x_arr[5]
- Dex = x_arr[4]
- Con = x_arr[3]
- Wis = x_arr[2]
- Int = x_arr[1]
- Str = x_arr[0]
- elif char == 2:
- char_class = "Barbarian"
- x = randint(1, 3)
- if x == 1:
- sub_class = "Berserker"
- elif x == 2:
- sub_class = "Totem Barbarian"
- else:
- sub_class = "Battlerager"
- Str = x_arr[5]
- Con = x_arr[4]
- Dex = x_arr[3]
- Wis = x_arr[2]
- Cha = x_arr[1]
- Int = x_arr[0]
- elif char == 3:
- char_class = "Cleric"
- x = randint(1, 8)
- if x == 1:
- sub_class = "Life Domain"
- elif x == 2:
- sub_class = "Knowledge Domain"
- elif x == 3:
- sub_class = "Light Domain"
- elif x == 4:
- sub_class = "Nature Domain"
- elif x == 5:
- sub_class = "Tempest Domain"
- elif x == 6:
- sub_class = "Trickery Domain"
- elif x == 7:
- sub_class = "War Domain"
- else:
- sub_class = "Arcane Domain"
- Wis = x_arr[5]
- Con = x_arr[4]
- Str = x_arr[3]
- Cha = x_arr[2]
- Int = x_arr[1]
- Dex = x_arr[0]
- elif char == 4:
- char_class = "Druid"
- x = randint(1, 2)
- if x == 1:
- sub_class = "Circle of the Land"
- else:
- sub_class = "Circle of the Moon"
- Wis = x_arr[5]
- Con = x_arr[4]
- Int = x_arr[3]
- Cha = x_arr[2]
- Str = x_arr[1]
- Dex = x_arr[0]
- elif char == 5:
- char_class = "Fighter"
- Str = x_arr[5]
- Con = x_arr[4]
- x = randint(1, 2)
- if x == 1:
- x = randint(1, 5)
- if x == 1:
- sub_class = "Champion"
- elif x == 2:
- sub_class = "Battlemaster"
- elif x == 3:
- sub_class = "Cavalier"
- elif x == 4:
- sub_class = "Scout"
- else:
- sub_class = "Monster Hunter"
- Dex = x_arr[3]
- Wis = x_arr[2]
- Int = x_arr[1]
- else:
- x = randint(1, 6)
- if x == 1:
- sub_class = "Champion"
- elif x == 2:
- sub_class = "Battlemaster"
- elif x == 3:
- sub_class = "Cavalier"
- elif x == 4:
- sub_class = "Scout"
- elif x == 4:
- sub_class = "Eldritch Knight"
- else:
- sub_class = "Monster Hunter"
- Int = x_arr[4]
- Dex = x_arr[3]
- Wis = x_arr[2]
- Cha = x_arr[0]
- elif char == 6:
- char_class = "Monk"
- x = randint(1, 5)
- if x == 1:
- sub_class = "Way of the Open Palm"
- elif x == 2:
- sub_class = "Way of the Shadow"
- elif x == 3:
- sub_class = "Way of the Four Elements"
- elif x == 4:
- sub_class = "Way of the Long Death"
- else:
- sub_class = "Way of the Sun Soul"
- Dex = x_arr[5]
- Con = x_arr[4]
- Wis = x_arr[3]
- Str = x_arr[2]
- Cha = x_arr[1]
- Int = x_arr[0]
- elif char == 7:
- char_class = "Paladin"
- x = randint(1, 4)
- if x == 1:
- sub_class = "Oath of Devotion"
- elif x == 2:
- sub_class = "Oath of the Ancients"
- elif x == 3:
- sub_class = "Oath of Vengeance"
- else:
- sub_class = "Oath of the Crown"
- Str = x_arr[5]
- Cha = x_arr[4]
- Con = x_arr[3]
- Wis = x_arr[2]
- Int = x_arr[1]
- Dex = x_arr[0]
- elif char == 8:
- x = randint(1, 2)
- if x == 1:
- char_class = "Ranger (Base)"
- x = randint(1, 3)
- if x == 1:
- sub_class = "Hunter"
- elif x == 2:
- sub_class = "Beastmaster"
- else:
- sub_class = "Deep Stalker"
- else:
- char_class = "Ranger (Variant)"
- x = randint(1, 3)
- if x == 1:
- sub_class = "Guardian"
- elif x == 2:
- sub_class = "Seeker"
- else:
- sub_class = "Stalker"
- Dex = x_arr[5]
- Wis = x_arr[4]
- Con = x_arr[3]
- Str = x_arr[2]
- Cha = x_arr[1]
- Int = x_arr[0]
- elif char == 9:
- char_class = "Rogue"
- Dex = x_arr[5]
- x = randint(1, 2)
- if x == 1:
- x = randint(1, 4)
- if x == 1:
- sub_class = "Thief"
- elif x == 2:
- sub_class = "Assassin"
- elif x == 3:
- sub_class = "Mastermind"
- else:
- sub_class = "Swashbuckler"
- Cha = x_arr[4]
- Con = x_arr[3]
- Int = x_arr[2]
- else:
- x = randint(1, 4)
- if x == 1:
- sub_class = "Thief"
- elif x == 2:
- sub_class = "Assassin"
- elif x == 3:
- sub_class = "Mastermind"
- else:
- sub_class = "Arcane Trickster"
- Int = x_arr[4]
- Cha = x_arr[3]
- Con = x_arr[2]
- Wis = x_arr[1]
- Str = x_arr[0]
- elif char == 10:
- char_class = "Sorcerer"
- x = randint(1, 5)
- if x == 1:
- sub_class = "Dragon Ancestry"
- sub_select = randint(1, 10)
- if sub_select == 1:
- sub_class = "Dragon Ancestry (Black)"
- elif sub_select == 2:
- sub_class = "Dragon Ancestry (Blue)"
- elif sub_select == 3:
- sub_class = "Dragon Ancestry (Brass)"
- elif sub_select == 4:
- sub_class = "Dragon Ancestry (Bronze)"
- elif sub_select == 5:
- sub_class = "Dragon Ancestry (Copper)"
- elif sub_select == 6:
- sub_class = "Dragon Ancestry (Gold)"
- elif sub_select == 7:
- sub_class = "Dragon Ancestry (Green)"
- elif sub_select == 8:
- sub_class = "Dragon Ancestry(Red)"
- elif sub_select == 9:
- sub_class = "Dragon Ancestry (Silver)"
- else:
- sub_class = "Dragon Ancestry (White)"
- elif x == 2:
- sub_class = "Wild Magic"
- elif x == 3:
- sub_class = "Favoured Soul"
- elif x == 4:
- sub_class = "Storm Bloodline"
- else:
- sub_class = "Shadow Bloodline"
- Cha = x_arr[5]
- Con = x_arr[4]
- Dex = x_arr[3]
- Wis = x_arr[2]
- Int = x_arr[1]
- Str = x_arr[0]
- elif char == 11:
- char_class = "Warlock"
- x = randint(1, 3)
- if x == 1:
- pact = "Blade"
- elif x == 2:
- pact = "Book"
- else:
- pact = "Chain"
- x = randint(1, 5)
- if x == 1:
- sub_class = "Fiend, with the Pact of the " + pact
- elif x == 2:
- sub_class = "Archfey, with the Pact of the " + pact
- elif x == 3:
- sub_class = "Great Old One, with the Pact of the " + pact
- elif x == 4:
- sub_class = "Undying, with the Pact of the " + pact
- else:
- sub_class = "Undying Light, with the Pact of the " + pact
- Cha = x_arr[5]
- Con = x_arr[4]
- Dex = x_arr[3]
- Wis = x_arr[2]
- Int = x_arr[1]
- Str = x_arr[0]
- elif char == 12:
- char_class = "Wizard"
- x = randint(1, 10)
- if x == 1:
- sub_class = "School of Abjuration"
- elif x == 2:
- sub_class = "School of Conjuration"
- elif x == 3:
- sub_class = "School of Divination"
- elif x == 4:
- sub_class = "School of Enchantment"
- elif x == 5:
- sub_class = "School of Evocation"
- elif x == 6:
- sub_class = "School of Illusion"
- elif x == 7:
- sub_class = "School of Necromancy"
- elif x == 8:
- sub_class = "School of Transmutation"
- elif x == 9:
- sub_class = "School of Artificery"
- else:
- sub_class = "Bladesinger"
- Int = x_arr[5]
- Con = x_arr[4]
- Dex = x_arr[3]
- Wis = x_arr[2]
- Cha = x_arr[1]
- Str = x_arr[0]
- else:
- char_class = "Mystic"
- x = randint(1, 2)
- if x == 1:
- sub_class = "Order of the Awakened"
- else:
- sub_class = "Order of the Immortal"
- Int = x_arr[5]
- Con = x_arr[4]
- Dex = x_arr[3]
- Wis = x_arr[2]
- Cha = x_arr[1]
- Str = x_arr[0]
- gender = choice(["Female", "Male"])
- race_select = randint(1, 17)
- if race_select == 1:
- race = "Aasimar" # no fucken Revenant 4u
- Cha = Cha + 2
- Wis = Wis + 1
- elif race_select == 2:
- race = "Dragonborn"
- Str = Str + 2
- Cha = Cha + 1
- sub_select = randint(1, 11)
- if sub_select == 1:
- race = "Dragonborn (Black)"
- elif sub_select == 2:
- race = "Dragonborn (Blue)"
- elif sub_select == 3:
- race = "Dragonborn (Brass)"
- elif sub_select == 4:
- race = "Dragonborn (Bronze)"
- elif sub_select == 5:
- race = "Dragonborn (Copper)"
- elif sub_select == 6:
- race = "Dragonborn (Gold)"
- elif sub_select == 7:
- race = "Dragonborn (Green)"
- elif sub_select == 8:
- race = "Dragonborn (Red)"
- elif sub_select == 9:
- race = "Dragonborn (Silver)"
- elif sub_select == 10:
- race = "Dragonborn (White)"
- else:
- race = "Dragonborn (Revenant)"
- Con = Con + 1
- Str = Str - 1
- elif race_select == 3:
- Con = Con + 2
- sub_select = randint(1, 4)
- if sub_select == 1:
- race = "Dwarf (Hill)"
- Wis = Wis + 1
- elif sub_select == 2:
- race = "Dwarf (Mountain)"
- Str = Str + 2
- elif sub_select == 3:
- race = "Dwarf (Duergar)"
- Str = Str + 1
- else:
- race = "Dwarf (Revenant)"
- Con = Con + 1
- elif race_select == 4:
- Dex = Dex + 2
- sub_select = randint(1, 5)
- if sub_select == 1:
- race = "Elf (High)"
- Int = Int + 1
- elif sub_select == 2:
- race = "Elf (Wood)"
- Wis = Wis + 1
- elif sub_select == 3:
- race = "Elf (Drow)"
- Cha = Cha + 1
- elif sub_select == 4:
- race = "Elf (Eladrin)"
- Int = Int + 1
- else:
- race = "Elf (Revenant)"
- Con = Con + 1
- elif race_select == 5:
- Int = Int + 2
- sub_select = randint(1, 4)
- if sub_select == 1:
- race = "Gnome (Forest)"
- Dex = Dex + 1
- elif sub_select == 2:
- race = "Gnome (Rock)"
- Con = Con + 1
- elif sub_select == 3:
- race = "Gnome (Revenant)"
- Con = Con + 1
- else:
- race = "Gnome (Deep)"
- Dex = Dex + 1
- elif race_select == 6:
- Cha = Cha + 2
- sub_select = randint(1, 5)
- if sub_select == 1:
- race = "Half-Elf (High)"
- elif sub_select == 2:
- race = "Half-Elf (Wood)"
- elif sub_select == 3:
- race = "Half-Elf (Drow)"
- elif sub_select == 4:
- race = "Half-Elf (Aquatic)"
- else:
- race = "Half-Elf (Revenant)"
- Con = Con + 1
- elif race_select == 7:
- race = "Half-Orc" # no fucken Revenant 4u
- Con = Con + 1
- Str = Str + 2
- elif race_select == 8:
- Dex = Dex + 2
- sub_select = randint(1, 4)
- if sub_select == 1:
- race = "Halfling (Lightfoot)"
- Cha = Cha + 1
- elif sub_select == 2:
- race = "Halfling (Stout)"
- Con = Con + 1
- elif sub_select == 3:
- race = "Halfling (Ghostwise)"
- Wis = Wis + 1
- else:
- race = "Halfling (Revenant)"
- Con = Con + 1
- elif race_select == 9:
- race = "Human"
- sub_select = randint(1, 3)
- if sub_select == 1:
- race = "Human (Standard)"
- Str = Str + 1
- Dex = Dex + 1
- Con = Con + 1
- Int = Int + 1
- Wis = Wis + 1
- Cha = Cha + 1
- elif sub_select == 2:
- race = "Human (Variant)"
- if char == 1:
- Cha = Cha + 1
- Dex = Dex + 1
- elif char == 2:
- Str = Str + 1
- Con = Con + 1
- elif char == 3:
- Wis = Wis + 1
- Con = Con + 1
- elif char == 4:
- Wis = Wis + 1
- Con = Con + 1
- elif char == 5:
- Str = Str + 1
- Con = Con + 1
- elif char == 6:
- Dex = Dex + 1
- Con = Con + 1
- elif char == 7:
- Str = Str + 1
- Cha = Cha + 1
- elif char == 8:
- Dex = Dex + 1
- Wis = Wis + 1
- elif char == 9:
- Dex = Dex + 1
- if x == 1:
- Cha = Cha + 1
- else:
- Int = Int + 1
- elif char == 10:
- Cha = Cha + 1
- Con = Con + 1
- elif char == 11:
- Cha = Cha + 1
- Con = Con + 1
- else:
- Int = Int + 1
- Con = Con + 1
- else:
- race = "Human (Revenant)"
- Con = Con + 1
- if char == 1:
- Cha = Cha + 1
- Dex = Dex + 1
- elif char == 2:
- Str = Str + 1
- Con = Con + 1
- elif char == 3:
- Wis = Wis + 1
- Con = Con + 1
- elif char == 4:
- Wis = Wis + 1
- Con = Con + 1
- elif char == 5:
- Str = Str + 1
- Con = Con + 1
- elif char == 6:
- Dex = Dex + 1
- Con = Con + 1
- elif char == 7:
- Str = Str + 1
- Cha = Cha + 1
- elif char == 8:
- Dex = Dex + 1
- Wis = Wis + 1
- elif char == 9:
- Dex = Dex + 1
- if x == 1:
- Cha = Cha + 1
- else:
- Int = Int + 1
- elif char == 10:
- Cha = Cha + 1
- Con = Con + 1
- elif char == 11:
- Cha = Cha + 1
- Con = Con + 1
- else:
- Int = Int + 1
- Con = Con + 1
- elif race_select == 10:
- race = "Tiefling"
- if Dex > Cha:
- Dex = Dex + 2
- else:
- Cha = Cha + 2
- sub_select = randint(1, 3)
- if sub_select == 1:
- race = "Tiefling (Infernal)"
- Int = Int + 1
- elif sub_select == 2:
- race = "Tiefling (Abyssal)"
- Con = Con + 1
- else:
- race = "Tiefling (Revenant)"
- Con = Con + 1
- elif race_select == 11:
- race = "Changeling" # no fucken Revenant 4u
- Dex = Dex + 1
- Cha = Cha + 1
- elif race_select == 12:
- race = "Shifter"
- Dex = Dex + 1
- sub_select = randint(1, 7)
- if sub_select == 1:
- race = "Shifter (Beasthide)"
- Con = Con + 1
- elif sub_select == 2:
- race = "Shifter (Cliffwalk)"
- Dex = Dex + 1
- elif sub_select == 3:
- race = "Shifter (Longstride)"
- Dex = Dex + 1
- elif sub_select == 4:
- race = "Shifter (Longtooth)"
- Str = Str + 1
- elif sub_select == 5:
- race = "Shifter (Razorclaw)"
- Dex = Dex + 1
- elif sub_select == 6:
- race = "Shifter (Wildhunt)"
- Wis = Wis + 1
- else:
- race = "Shifter (Revenant)"
- Con = Con + 1
- elif race_select == 13:
- race = "Warforged" # no fucken Revenant 4u
- Str = Str + 1
- Con = Con + 1
- elif race_select == 14:
- race = "Genasi"
- Con = Con + 2
- sub_select = randint(1, 5)
- if sub_select == 1:
- race = "Genasi (Air)"
- Dex = Dex + 1
- elif sub_select == 2:
- race = "Genasi (Earth)"
- Str = Str + 1
- elif sub_select == 3:
- race = "Genasi (Fire)"
- Int = Int + 1
- elif sub_select == 4:
- race = "Genasi (Water)"
- Wis = Wis + 1
- else:
- race = "Genasi (Revenant)"
- Con = Con + 1
- elif race_select == 15: # no fucken Revenant 4u
- race = "Goliath"
- Str = Str + 2
- Con = Con + 1
- elif race_select == 16:
- race = "Aarakocra" # no fucken Revenant 4u
- Dex + Dex + 2
- Wis = Wis + 1
- else:
- race = "Minotaur" # no fucken Revenant 4u
- Str = Str + 1
- if 2*Str > Int + Wis:
- Str = Str + 1
- elif 2*Int > Str + Wis:
- Int = Int + 1
- else:
- Wis = Wis + 1
- result = ["Your gender is ", gender,
- "\nYour race is ", race,
- "\nYour class is ", char_class,
- "\nYour sub-class is ", sub_class,
- "\nYour STR is ", Str,
- "\nYour DEX is ", Dex,
- "\nYour CON is ", Con,
- "\nYour INT is ", Int,
- "\nYour WIS is ", Wis,
- "\nYour CHA is ", Cha]
- return ''.join(str(n) for n in result)
- gen = fifthEdCharacterGenerator()
- print(gen.character())
Advertisement
Add Comment
Please, Sign In to add comment