class LargeSack(Container): name = "Large Sack" price = coins.Gold(1) size = Size.Medium volume_limit = units.CubicFeet(4) weight = units.Pound(0.1) weight_limit = units.Pound(40)
class SmallSack(Container): name = "Small Sack" price = coins.Silver(5) size = Size.Small volume_limit = units.CubicFeet(2) weight = units.Pound(0.1) weight_limit = units.Pound(20)
class Saddlebags(Container): name = "Saddlebags" price = coins.Gold(4) size = Size.Small volume_limit = units.CubicFeet(1) weight = units.Pound(7) weight_limit = units.Pound(10)
class SmallBackpack(Container): name = "Small Backpack" price = coins.Gold(4) size = Size.Small volume_limit = units.CubicFeet(1.5) wear_locations = WearLocation.Back, weight = units.Pound(0.1) weight_limit = units.Pound(30)
class BeltPouch(Container): name = "Belt Pouch" price = coins.Gold(1) size = Size.Small volume_limit = units.CubicFeet(1) wear_locations = WearLocation.Belt, weight = units.Pound(0.1) weight_limit = units.Pound(10)
class Backpack(Container): name = "Backpack" price = coins.Gold(4) size = Size.Medium volume_limit = units.CubicFeet(3) wear_locations = WearLocation.Back, weight = units.Pound(0.1) weight_limit = units.Pound(40)
class Chest(Container): name = "Chest" container_type = Container price = coins.Gold(10) size = Size.Medium volume_limit = units.CubicFeet(8) wear_locations = None weight = units.Pound(10) weight_limit = units.Pound(80)
class Pony(Horse): name = "Pony" attack_bonus = AttackBonusTable.get_by_hit_dice(1) attack_sets = [AttackSet(Bite(dice.D4(1)))] base_armor_class = 13 carry_capacity = CarryCapacity(units.Pound(275), units.Pound(550)) hit_dice = dice.D8(2) morale = 6 movement = movement.MovementSet(walk=units.FeetPerGameTurn(40), turning_distance=units.Feet(10)) no_appearing = None save_as = Fighter.level_table.levels[1].saving_throws_set special_abilities = None treasure_type = None xp = 25
class Donkey(Horse): name = "Donkey" attack_bonus = AttackBonusTable.get_by_hit_dice(2) attack_sets = [AttackSet(Bite(dice.D2(1)))] base_armor_class = 13 carry_capacity = CarryCapacity(units.Pound(400), units.Pound(800)) hit_dice = dice.D8(2) morale = 7 movement = movement.MovementSet(walk=units.FeetPerGameTurn(40), turning_distance=units.Feet(10)) no_appearing = AppearingSet(dice_wild=dice.D4(2)) save_as = Fighter.level_table.levels[2].saving_throws_set special_abilities = None treasure_type = None xp = 75
class DraftHorse(Horse): name = "Draft Horse" attack_bonus = AttackBonusTable.get_by_hit_dice(3) attack_sets = [AttackSet(Hoof(dice.D4(1)), amount=2)] base_armor_class = 13 carry_capacity = CarryCapacity(units.Pound(350), units.Pound(700)) hit_dice = dice.D8(3) morale = 7 movement = movement.MovementSet(walk=units.FeetPerGameTurn(60), turning_distance=units.Feet(10)) no_appearing = None save_as = Fighter.level_table.levels[3].saving_throws_set special_abilities = None treasure_type = None xp = 145
class Shortsword(Sword): name = "Shortsword" melee_damage = dice.D6(1) price = coins.Gold(6) size = Size.Small weight = units.Pound(3)
class DryRations(Food): name = "Dry Rations (One Week)" price = coins.Gold(10) size = Size.Medium wear_locations = tuple() weight = units.Pound(14)
class Dwarf(Race): name = "Dwarf" average_height = units.Feet(4) average_weight = units.Pound(120) average_lifespan = timedelta(days=36500) restriction_set = restrictions.RestrictionSet( ability_score=restrictions.AbilityScoreRestrictionSet( minimum_set=abilityscores.AbilityScoreSet(constitution=9), maximum_set=abilityscores.AbilityScoreSet(charisma=17), ), classes=restrictions.ClassRestrictionSet(included=(classes.Cleric, classes.Fighter, classes.Thief)), weapons=restrictions.WeaponRestrictionSet(excluded=( bflib.items.weapons.melee.swords.TwoHandedSword, bflib.items.weapons.melee.polearms.Polearm, bflib.items.weapons.ranged.bows.Longbow, ))) racial_language = languages.Dwarvish special_ability_set = specialabilities.SpecialAbilitySet(( specialabilities.Darkvision, specialabilities.DetectNewConstructions, specialabilities.DetectShiftingWalls, specialabilities.DetectSlantingPassages, specialabilities.DetectTraps, )) saving_throw_set = savingthrows.SavingThrowSet(death_poison=-4, dragon_breath=-3, paralysis_stone=-4, spells=-4, wands=-4)
class WalkingStaff(Staff): name = "Walking Staff" melee_damage = dice.D4(1) price = coins.Silver(2) size = Size.Medium weight = units.Pound(1)
class Quarterstaff(Staff): name = "Quarterstaff" melee_damage = dice.D6(1) price = coins.Gold(2) size = Size.Large weight = units.Pound(4)
class PotionOfHealing(Potion): name = "Potion of Healing" effect = effects.Healing(units.CombatRound(0), dice.D6(1, 1)) price = None size = Size.Small weight = units.Pound(0.5)
class TwoHandedSword(MeleeWeapon): name = "Two-Handed Sword" melee_damage = dice.D10(1) price = coins.Gold(18) size = Size.Large weight = units.Pound(10)
class HeavyQuarrel(Bolt): name = "Heavy Quarrel" ammunition_type = Bolt ammunition_damage = dice.D8(1) price = coins.Silver(4) weight = units.Pound(0.1)
class Coin(Item): __slots__ = ["amount"] value_in_copper = 0 weight = units.Pound(0.1) def __init__(self, amount): self.amount = amount def as_copper(self): return Copper(self.amount * self.value_in_copper) def as_silver(self): return Silver( (self.amount * self.value_in_copper) / Silver.value_in_copper) def as_electrum(self): return Electrum( (self.amount * self.value_in_copper) / Electrum.value_in_copper) def as_gold(self): return Gold( (self.amount * self.value_in_copper) / Gold.value_in_copper) def as_platinum(self): return Platinum( (self.amount * self.value_in_copper) / Platinum.value_in_copper)
class LongbowArrow(Arrow): name = "Longbow Arrow" ammunition_type = Arrow ammunition_damage = dice.D6(1) price = coins.Silver(1) weight = units.Pound(0.1)
class SlingBullet(Bullet): name = "Sling Bullet" ammunition_type = Bullet ammunition_damage = dice.D4(1) price = coins.Silver(1) weight = units.Pound(0.1)
class Cloak(Clothing): name = "Cloak" armor_type = Clothing price = coins.Gold(2) wear_locations = WearLocation.Back, weight = units.Pound(1)
class Longsword(Sword): name = "Longsword" melee_damage = dice.D8(1) price = coins.Gold(10) size = Size.Medium weight = units.Pound(4)
class Polearm(MeleeWeapon): name = "Polearm" melee_damage = dice.D10(1) price = coins.Gold(9) size = Size.Large weight = units.Pound(15)
class Scimitar(Sword): name = "Scimitar" melee_damage = dice.D8(1) price = coins.Gold(10) size = Size.Medium weight = units.Pound(4)
class Halfling(Race): name = "Halfling" average_height = units.Feet(3) average_weight = units.Pound(60) average_lifespan = timedelta(days=109500) restriction_set = restrictions.RestrictionSet( ability_score=restrictions.AbilityScoreRestrictionSet( minimum_set=abilityscores.AbilityScoreSet(dexterity=9), maximum_set=abilityscores.AbilityScoreSet(strength=17), ), classes=restrictions.ClassRestrictionSet(included=(classes.Cleric, classes.Fighter, classes.Thief), ), hit_dice_max_size=restrictions.HitDiceMaxSizeRestriction(dice.D6), weapon_size=restrictions.WeaponSizeRestrictionSet( large=restrictions.WeaponSizeRestrictionSet.keywords.CannotWield, medium=restrictions.WeaponSizeRestrictionSet.keywords. NeedsTwoHands, small=restrictions.WeaponSizeRestrictionSet.keywords.CanWield, )) racial_language = languages.Halfling special_ability_set = specialabilities.SpecialAbilitySet( (specialabilities.HalflingHide, specialabilities.InitiativeBonus(1), specialabilities.MeleeDefenseBonus(2), specialabilities.RangedWeaponAccuracyBonus(1))) saving_throw_set = savingthrows.SavingThrowSet(death_poison=-4, dragon_breath=-3, paralysis_stone=-4, spells=-4, wands=-4)
class Goblin(Race): name = "Goblin" average_height = units.Feet(3) average_weight = units.Pound(45) average_lifespan = timedelta(days=18250) restriction_set = restrictions.RestrictionSet( ability_score=restrictions.AbilityScoreRestrictionSet( minimum_set=abilityscores.AbilityScoreSet(dexterity=9), maximum_set=abilityscores.AbilityScoreSet(strength=16, constitution=16), ), weapon_size=restrictions.WeaponSizeRestrictionSet( large=restrictions.WeaponSizeRestrictionSet.keywords.CannotWield, medium=restrictions.WeaponSizeRestrictionSet.keywords. NeedsTwoHands, small=restrictions.WeaponSizeRestrictionSet.keywords.CanWield, )) racial_language = languages.Goblin special_ability_set = specialabilities.SpecialAbilitySet(( specialabilities.Darkvision, specialabilities.FeebleConstitution(1), specialabilities.MeleeDefenseBonus(2), specialabilities.DetectNewConstructions, specialabilities.DetectSecretDoor, specialabilities.DetectShiftingWalls, specialabilities.DetectSlantingPassages, specialabilities.DetectTraps, specialabilities.OpenLock(10), specialabilities.RemoveTraps(10), ))
class Gnoll(Race): name = "Gnoll" average_height = units.Feet(7) average_weight = units.Pound(300) average_lifespan = timedelta(days=27375) racial_class = racialclass.Gnoll restriction_set = restrictions.RestrictionSet( ability_score=restrictions.AbilityScoreRestrictionSet( minimum_set=abilityscores.AbilityScoreSet(strength=13, constitution=11), maximum_set=abilityscores.AbilityScoreSet(charisma=15, intelligence=15), ), classes=restrictions.ClassRestrictionSet(included=(classes.Cleric, classes.Fighter, classes.MagicUser)), ) racial_language = languages.Bugbear special_ability_set = specialabilities.SpecialAbilitySet(( specialabilities.Darkvision, specialabilities.PowerfulScent, )) saving_throw_set = savingthrows.SavingThrowSet( death_poison=-4, paralysis_stone=-4, )
class Dagger(MeleeWeapon): name = "Dagger" melee_damage = dice.D4(1) price = coins.Gold(2) size = Size.Small weight = units.Pound(1)
class Spear(MeleeWeapon): name = "Spear" melee_damage = dice.D6(1) price = coins.Gold(5) size = Size.Medium weight = units.Pound(5)