canismarko / dungeon-sheets

A tool to create character sheets and GM session notes for Dungeons and Dragons fifth edition (D&D 5e).
https://dungeon-sheets.readthedocs.io/en/latest/
GNU General Public License v3.0
160 stars 66 forks source link

Homebrew: Cannot specify a weapon subclass #99

Closed DanRoscigno closed 3 years ago

DanRoscigno commented 3 years ago

I am trying to add a new weapon, and I would like to be able to mark it as a SimpleWeapon as my char is proficient with SimpleWeapons. I tried the below, but it fails, and I cannot figure out how to include SimpleWeapon. Is there a way to specify that a weapon is a simpleweapon?

class BlueSting(mechanics.SimpleWeapon):
    name = "Blue Sting"
    cost = "1000 gp"
    base_damage = "1d6"
    attack_bonus = 1
    damage_bonus = 1
    damage_type = "p"
    weight = 1
    ability = "dexterity"
DanRoscigno commented 3 years ago

I was able to add the proficiency:

 weapon_proficiencies = (BlueSting, MagicSpear)
canismarko commented 3 years ago

Adding it to the proficiences is a good workaround. For future convenience, I added SimpleWeapon and a few others to the mechanics module.