Esempio n. 1
0
 def __init__(self, char):
     BaseClass.__init__(self, char.level)
     MagicChr.__init__(self)
     cant_ct = 2
     self.level = int(char.level)
     self.set_magic(self.level, cant_ct, "bard")
     self.str_mod = char.strength
     self.dex_mod = char.dexterity
     self.wis_mod = char.wisdom
     self.int_mod = char.intelligence
     self.cha_mod = char.charisma
     self.con_mod = char.constitution
     self.level_scores([3, 7, 11, 15, 18])
     self.expert_skills = []
     all_skills = list(
         set(utilities.valid_skills()) - set(char.race.skills))
     archetype_opts = [
         "glamour", "lore", "satire", "sword", "valor", "whisper"
     ]
     level_features = [[1, ["Jack of all Trades", "Song of Rest"]],
                       [2, ["Expertise"]], [4, ["Font of Inspiration"]],
                       [5, ["Countercharm"]], [9, "Magical Secrets"],
                       [13, "Magical Secrets x2"],
                       [17, "Magical Secrets x3"],
                       [19, ["Superior Inspiration"]]]
     equip_opts = [[
         "rapier", "longsword", "any other simple weapon (please input)"
     ]]
     non_wpn_equip = [["Diplomats pack", "Entertainers pack"],
                      [
                          "a lute",
                          "any other musical instrument (please input)"
                      ]]
     self.saving_throws = ["dexterity", "charisma"]
     self.magic_throw = "charisma"
     self.magic_dc = 8 + self.prof_bonus + self.cha_mod
     utilities.append_features(
         self,
         ["Ritual Casting", "Spellcasting Focus", "Bardic Inspiration"])
     utilities.append_proficiencies(self, [
         "light armor", "simple weapons", "hand crossbows", "longswords",
         "rapiers", "shortswords"
     ])
     self.add_instrument(3)
     self.set_equip(equip_opts, True)
     self.set_equip(non_wpn_equip, False)
     self.armor.append(["leather", "11"])
     utilities.equip(self, "dagger")
     utilities.set_skills(self, 3, all_skills)
     self.init_hit_dice(8)
     self.init_hp(8, "constitution", 8)
     self.level_features(level_features)
     if self.level > 2:
         arch_choice = self.init_archetype(archetype_opts)
         self.set_arch(arch_choice, char)
         self.set_expertise(char, 2)
     if self.level > 9:
         self.set_expertise(char, 2)
Esempio n. 2
0
    def __init__(self, char):
        BaseClass.__init__(self, char.level)
        self.level = int(char.level)
        self.str_mod = char.strength
        self.dex_mod = char.dexterity
        self.wis_mod = char.wisdom
        self.int_mod = char.intelligence
        self.cha_mod = char.charisma
        self.con_mod = char.constitution
        self.level_scores([3, 7, 11, 15, 18])
        all_skills = list({"acrobatics", "athletics", "history", "insight", "religion", "stealth"} - set(char.race.skills))
        archetype_opts = ["drunken master", "four elements", "kensei", "long death", "open hand", "shadow", "sun soul", "tranquility"] # base hotel and casino
        level_features = [[0, ["Unarmored Defense", "Martial Arts"]], [1, ["Ki", "Unarmored Movement"]], [2, "Deflect Missiles"],
                          [3, "Slow Fall"],  [4, "Extra Attack"],
                          [5, "Ki-Empowered Strikes"], [6, ["Evasion", "Stillness of Mind"]],
                          [12, "Tongue of the Sun and Moon"], [13, "Diamond Soul"],
                          [14, "Timeless Body"]]
        ki_features = [[1, ["Flurry of Blows", "Patient Defense", "Step of the Wild"]],
                       [4, "Stunning Strike"], [13, "Diamond Soul"], [17, "Empty Body"], [19, "Perfect Self"]]

        for item in ["disease", "poison"]:
            if self.level > 9:
                self.resistances.append(item)
        if self.level > 12:
            self.languages.append("All Languages (Monk Feature)")
        if self.level > 13:
            self.saving_throws = ["strength", "wisdom", "dexterity", "intelligence", "charisma", "constitution"]
        else:
            self.saving_throws = ["strength", "dexterity"]
        self.ki_features = []
        self.ki_dc = 0
        self.elem_feat = []
        wpn_opts = [["shortsword", "any simple weapon (please input)"]]
        eqp_opts = [["dungeoneer's pack", "explorer's pack"]]
        prof = utilities.get_from_list(["artisans tools", "musical instrument"], 1, "proficiency")
        if prof == "musical instrument":
            prof = input("Which instrument do you want to be proficient in?\n")
        utilities.append_proficiencies(self, ["simple weapons", "shortswords", prof])
        self.set_equip(wpn_opts, True)
        self.set_equip(eqp_opts, False)
        utilities.equip(self, "10 darts")
        utilities.set_skills(self, 2, all_skills)
        self.init_hit_dice(8)
        self.init_hp(10, "constitution", 8)
        self.level_features(level_features)
        for item in ki_features:
            lvl = item[0]
            ch = item[1]
            if self.level > int(lvl):
                if isinstance(ch, list):
                    for feat in ch:
                        self.ki_features.append(feat)
                else:
                    self.ki_features.append(ch)
        if self.level > 1:
            self.ki_dc = 8 + self.prof_bonus + self.wis_mod
        arch_choice = self.init_archetype(archetype_opts)
        self.set_arch(arch_choice)
Esempio n. 3
0
 def __init__(self, char):
     BaseClass.__init__(self, char.level)
     MagicChr.__init__(self)
     cant_ct = 0
     self.level = int(char.level)
     self.set_magic(self.level, cant_ct, "ranger")
     self.str_mod = char.strength
     self.dex_mod = char.dexterity
     self.wis_mod = char.wisdom
     self.int_mod = char.intelligence
     self.cha_mod = char.charisma
     self.con_mod = char.constitution
     self.level_scores([3, 7, 11, 15, 18])
     all_skills = list({
         "animal handling", "athletics", "insight", "investigation",
         "nature", "perception", "stealth", "survival"
     } - set(char.race.skills))
     archetype_opts = [
         "Beast Master", "Gloom Stalker", "Horizon Walker", "Hunter",
         "Monster Slayer", "Primeval Guardian"
     ]
     level_features = [[0, ["Favored Enemy", "Natural Explorer"]],
                       [1, "Spellcasting"], [2, "Primeval Awareness"],
                       [4, "Extra Attack"], [7, "Land's Stride"],
                       [9, "Hide in Plain Sight"], [13, "Vanish"],
                       [17, "Feral Senses"], [19, "Foe Slayer"]]
     wpn_opts = [[
         "Two shortswords", "Two simple martial weapons (please input)"
     ]]
     eqp_opts = [["Dungeoneer's Pack", "Explorer's Pack"]]
     amor = utilities.get_from_list(["Scale Mail", "Leather Armor"], 1,
                                    "armor")
     if amor == "Scale Mail":
         self.armor.append(["Scale Mail", "14"])
     else:
         self.armor.append(["Leather Armor", "11"])
     self.saving_throws = ["strength", "dexterity"]
     self.magic_throw = "wisdom"
     self.magic_dc = self.prof_bonus + self.wis_mod + 8
     utilities.set_skills(self, 3, all_skills)
     self.init_hit_dice(10)
     self.init_hp(10, "constitution", 10)
     self.styles = []
     utilities.append_proficiencies(self, [
         "light armor", "medium armor", "shields", "simple weapons",
         "martial weapons"
     ])
     self.set_equip(wpn_opts, True)
     self.set_equip(eqp_opts, False)
     utilities.equip(self, "Longbow and Quiver of 20 arrows")
     self.level_features(level_features)
     if self.level > 1:
         self.set_style()
     if self.level > 2:
         arch_choice = self.init_archetype(archetype_opts)
         self.set_arch(arch_choice)
Esempio n. 4
0
 def __init__(self, char):
     BaseClass.__init__(self, char.level)
     MagicChr.__init__(self)
     cant_ct = 4
     self.level = int(char.level)
     self.set_magic(self.level, cant_ct, "sorcerer")
     self.str_mod = char.strength
     self.dex_mod = char.dexterity
     self.wis_mod = char.wisdom
     self.int_mod = char.intelligence
     self.cha_mod = char.charisma
     self.con_mod = char.constitution
     self.level_scores([3, 7, 11, 15, 18])
     all_skills = list(
         {"arcana", "deception", "insight", "persuasion", "religion"} -
         set(char.race.skills))
     archetype_opts = [
         "Divine Soul", "Draconic Bloodline", "Giant Soul",
         "Phoenix Sorcery", "Sea Sorcery", "Shadow Magic", "Stone Sorcery",
         "Storm Sorcery", "Wild Magic", "Pyromancer"
     ]
     level_features = [[0, "Spellcasting Focus"],
                       [1, ["Sorcery Points", "Flexible Casting"]],
                       [2, "Metamagic"], [19, "Sorcerous Restoration"]]
     wpn_opts = [[
         "A Light crossbow with 20 bolts",
         "Any simple weapon (please input)"
     ]]
     eqp_opts = [["Dungeoneer's pack", "Explorer's Pack"],
                 ["Component Pouch", "Arcane Focus"]]
     self.saving_throws = ["constitution", "charisma"]
     self.magic_throw = "charisma"
     self.magic_dc = 8 + self.prof_bonus + self.cha_mod
     utilities.append_proficiencies(
         self,
         ["daggers", "darts", "slings", "quarterstaffs", "light crossbows"])
     self.set_equip(wpn_opts, True)
     self.set_equip(eqp_opts, False)
     utilities.set_skills(self, 2, all_skills)
     self.init_hit_dice(6)
     self.init_hp(6, "constitution", 6)
     utilities.equip(self, "two daggers")
     self.level_features(level_features)
     self.metamagic_features = []
     self.color = ""
     self.fly_speed = 0
     for level in [2, 2, 9, 16]:
         if self.level > level:
             self.set_metamagic()
     if self.level > 2:
         self.sorcery_pts = self.level
         arch_choice = self.init_archetype(archetype_opts)
         self.set_arch(arch_choice, char)
Esempio n. 5
0
 def __init__(self, char):
     BaseClass.__init__(self, char.level)
     self.level = int(char.level)
     self.str_mod = char.strength
     self.dex_mod = char.dexterity
     self.wis_mod = char.wisdom
     self.int_mod = char.intelligence
     self.cha_mod = char.charisma
     self.con_mod = char.constitution
     self.level_scores([3, 7, 11, 15, 18])
     all_skills = list({
         "acrobatics", "athletics", "deception", "insight", "intimidation",
         "investigation", "perception", "performance", "persuasion",
         "sleight of hand", "stealth"
     } - set(char.race.skills))
     archetype_opts = [
         "Arcane Trickster", "Assassin", "Inquisitive", "Mastermind",
         "Scout", "Swashbuckler", "Thief"
     ]
     level_features = [[0, ["Thieves' Cant", "Sneak Attack"]],
                       [1, "Cunning Action"], [4, "Uncanny Dodge"],
                       [6, "Evasion"], [10, "Reliable Talent"],
                       [13, "Blindsense"], [17, "Elusive"],
                       [19, "Stroke of Luck"]]
     wpn_opts = [["Shortsword", "Shortbow and quiver of 20 arrows"],
                 ["Shortsword", "Rapier"]]
     eqp_opts = [["Burglar's Pack", "Dungeoneer's Pack", "Explorer's Pack"]]
     self.saving_throws = ["dexterity", "intelligence"]
     if self.level > 15:
         self.saving_throws.append("wisdom")
     utilities.append_proficiencies(self, [
         "light armor", "simple weapons", "hand crossbow", "longswords",
         "rapiers", "shortswords", "thieves' tools"
     ])
     self.set_equip(wpn_opts, True)
     self.set_equip(eqp_opts, False)
     utilities.equip(self, "Two daggers")
     self.equipment.append("Thieves' tools")
     self.armor = ["Leather armor", "11"]
     utilities.set_skills(self, 4, all_skills)
     self.init_hit_dice(8)
     self.init_hp(8, "constitution", 8)
     self.sneak_dmg = 0
     self.expert_skills = []
     self.level_features(level_features)
     if self.level > 0:
         self.set_expertise(char, 2)
     if self.level > 2:
         arch_choice = self.init_archetype(archetype_opts)
         self.set_arch(arch_choice)
     if self.level > 5:
         self.set_expertise(char, 2)
     self.set_sneak_attack_dmg()
Esempio n. 6
0
 def set_equip(self, opts, wpn_armor):
     """
     sets character equipment based on list of list of options given
     [[wpn1, wpn2], [armor1, armor2], etc]
     :param wpn_armor: if the list contains weapons: if so, they need to be in equip + wpns, otherwise only equipment
     :param opts: list of list, shown above. possibly refactored in the future
     """
     for lists in opts:
         print("\nWhich do you want to equip?\n")
         for item in lists:
             print(item)
         choice = input("")
         if wpn_armor:
             utilities.equip(self, choice)
         else:
             self.equipment.append(choice)
Esempio n. 7
0
 def __init__(self, char):
     BaseClass.__init__(self, char.level)
     self.level = int(char.level)
     self.str_mod = char.strength
     self.dex_mod = char.dexterity
     self.wis_mod = char.wisdom
     self.int_mod = char.intelligence
     self.cha_mod = char.charisma
     self.con_mod = char.constitution
     self.level_scores([3, 5, 7, 11, 13, 15, 18])
     all_skills = list({
         "acrobatics", "animal handling", "athletics", "history", "insight",
         "intimidation"
     } - set(char.race.skills))
     archetype_opts = [
         "arcane", "battle", "brute", "cavalier", "champion", "eldritch",
         "monster", "purple", "samurai", "scout", "sharpshooter"
     ]
     level_features = [[0, "Second Wind"], [1, "Action Surge"],
                       [4, "Extra Attack"], [8, "Indomitable"]]
     wpn_opts = [["A martial weapon and a shield", "Two martial weapons"],
                 ["A light crossbow and 20 bolts", "Two handaxes"]]
     eqp_opts = [["Dungeoneer's Pack", "Explorer's Pack"]]
     self.saving_throws = ["strength", "constitution"]
     utilities.append_proficiencies(
         self, ["All armors", "All shields", "All weapons"])
     self.set_equip(wpn_opts, True)
     self.set_equip(eqp_opts, False)
     spnch = utilities.get_from_list(
         ["leather armor and longbow", "chain mail"], 1)
     if spnch == "leather armor and longbow":
         utilities.equip(self, "Longbow with 20 arrows")
         self.armor = ["Leather Armor", "11"]
     else:
         self.armor = ["Chain Mail", "16"]
     utilities.set_skills(self, 2, all_skills)
     self.init_hit_dice("10")
     self.init_hp(10, "constitution", "10")
     self.maneuvers = []
     self.styles = []
     self.sup_dice_ct = None
     self.sup_dice = None
     self.level_features(level_features)
     self.set_style()
     if self.level > 2:
         arch_choice = self.init_archetype(archetype_opts)
         self.set_arch(arch_choice, char)
Esempio n. 8
0
 def __init__(self, char):
     BaseClass.__init__(self, char.level)
     self.level = int(char.level)
     self.rage_ct = 2
     self.rage_dmg = 2
     self.str_mod = char.strength
     self.dex_mod = char.dexterity
     self.wis_mod = char.wisdom
     self.int_mod = char.intelligence
     self.cha_mod = char.charisma
     self.con_mod = char.constitution
     self.level_scores([3, 7, 11, 15, 18])
     all_skills = list({
         "animal handling", "athletics", "intimidation", "nature",
         "perception", "survival"
     } - set(char.race.skills))
     archetype_opts = [
         "cannibal", "ancestor", "berserker", "storm", "totem", "zealot"
     ]
     if char.race_name == "dwarf":
         archetype_opts.append("battlerager")
     level_features = [[1, ["Reckless Attack", "Danger Sense"]],
                       [4, ["Extra Attack", "Fast Movement"]],
                       [6, ["Feral Instinct"]], [8, ["Brutal Critical"]],
                       [10, ["Relentless Rage"]], [14, ["Persistant Rage"]],
                       [17, ["Indomitable Might"]],
                       [20, ["Primal Champion"]]]
     utilities.append_features(self, ["Rage", "Unarmored Defense"])
     utilities.append_proficiencies(self, [
         "light armor", "medium armor", "shields", "simple weapons",
         "martial weapons"
     ])
     equip_opts = [[
         "greataxe", "any other martial melee weapon (please input)"
     ], ["two handaxes", "any other simple melee weapon (please input)"]]
     self.saving_throws = ["strength", "constitution"]
     if self.level > 1:
         self.advantages.append("Dexterity against effects you can see")
     if self.level > 2:
         arch_choice = self.init_archetype(archetype_opts)
         self.rage_ct = 3
         self.set_arch(arch_choice)
     if self.level > 5:
         self.rage_ct = 4
     if self.level > 6:
         self.advantages.append("Initiative rolls")
     if self.level > 8:
         self.rage_dmg = 3
     if self.level > 11:
         self.rage_ct = 5
     if self.level > 15:
         self.rage_dmg = 4
     if self.level > 16:
         self.rage_ct = 6
     if self.level > 19:
         self.str_mod += 4
         self.con_mod += 4
         self.rage_ct = 7
     utilities.set_skills(self, 2, all_skills)
     self.init_hit_dice(12)
     self.init_hp(12, "charisma", 12)
     self.level_features(level_features)
     self.set_equip(equip_opts, True)
     utilities.equip(self, "Javelin x4")
     self.equipment.append("Explorer's Pack")
Esempio n. 9
0
 def __init__(self, char):
     BaseClass.__init__(self, char.level)
     MagicChr.__init__(self)
     cant_ct = 2
     self.level = int(char.level)
     self.set_magic(self.level, cant_ct, "warlock")
     self.str_mod = char.strength
     self.dex_mod = char.dexterity
     self.wis_mod = char.wisdom
     self.int_mod = char.intelligence
     self.cha_mod = char.charisma
     self.con_mod = char.constitution
     self.level_scores([3, 7, 11, 15, 18])
     all_skills = list({
         "arcana", "deception", "history", "intimidation", "nature",
         "religion"
     } - set(char.race.skills))
     archetype_opts = [
         "Archfey", "Celestial", "Fiend", "Ghost in the Machine",
         "Great Old One", "Hexblade", "Raven Queen", "Seeker", "Undying"
     ]
     level_features = [[10, "Mystic Arcanum"], [19, "Eldritch Master"]]
     wpn_opts = [[
         "Light crossbow with 20 bolts", "Any simple weapon (please input)"
     ]]
     eqp_opts = [["Dungeoneer's pack", "Scholar's pack"],
                 ["Component pouch", "Arcane focus"]]
     self.saving_throws = ["wisdom", "charisma"]
     self.magic_throw = "charisma"
     self.magic_dc = 8 + self.prof_bonus + self.cha_mod
     utilities.append_proficiencies(self, ["light armor", "simple weapons"])
     self.set_equip(wpn_opts, True)
     self.set_equip(eqp_opts, False)
     utilities.set_skills(self, 2, all_skills)
     self.init_hit_dice(8)
     self.init_hp(8, "constitution", 8)
     for item in [
             "two daggers",
             input(
                 "Initialization: What simple weapon do you want to have?\n"
             )
     ]:
         utilities.equip(self, item)
     self.armor = ["leather armor", "11"]
     self.invocations = []
     self.pact = ""
     self.pact_desc = []
     self.level_features(level_features)
     arch_choice = self.init_archetype(archetype_opts)
     self.set_arch(arch_choice)
     if self.level > 1:
         self.set_pact()
     if self.level == 1:
         self.invocation_ct = 2
     elif 2 < self.level < 11:
         self.invocation_ct = int(math.ceil(self.level / 2))
     elif self.level > 10:
         self.invocation_ct = 5
     elif self.level > 11:
         self.invocation_ct = 6
     elif self.level > 14:
         self.invocation_ct = 7
     elif self.level > 17:
         self.invocation_ct = 8
     for x in range(0, int(self.invocation_ct)):
         self.choose_inv()