From 313b580e3f05a9361bb3afaa0fd7305d98870821 Mon Sep 17 00:00:00 2001 From: bw-mutley Date: Wed, 30 Mar 2022 01:03:25 -0300 Subject: [PATCH] Added char files for testing Companions and Weight --- examples/kits.py | 34 ++++++++++++++++++++++++++++---- examples/sorcerer_ranger_test.py | 5 +++-- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/examples/kits.py b/examples/kits.py index 0d6c198..c306091 100644 --- a/examples/kits.py +++ b/examples/kits.py @@ -6,15 +6,41 @@ Created on Tue Feb 22 01:04:23 2022 @author: mauricio """ -explorers_pack = """backpack, bedroll, mess kit, tinderbox, {torches} torches, -{rations} days of rations, waterskin, {rope} feet of hempen rope""" + + +burglars_pack = """backpack, {ball_bearings} ball bearings, +{string} feet of string, bell, {candles} candles, crowbar, hammer, +{pitons} pitons, hooded lantern, +{oil} flasks of oil, {rations} days of rations, tinderbox, waterskin, +{rope} feet of hempen rope.""" +diplomats_pack = """chest, {cases} cases for maps and scrolls, +fine clothes, bottle of ink, ink pen, lamp, {oil} flasks of oil, +{paper} paper sheet, vial of perfume, sealing wax, soap.""" dungeoneers_pack = """backpack, crowbar, hammer, {pitons} pitons, {torches} torches, tinderbox, {rations} days of rations, waterskin, {rope} feet of hempen rope""" +entertainers_pack = """backpack, bedroll, {costumes} costumes, +{candles} candles, {rations} days of rations, waterskin, disguise kit""" +explorers_pack = """backpack, bedroll, mess kit, tinderbox, {torches} torches, +{rations} days of rations, waterskin, {rope} feet of hempen rope""" priests_pack = """backpack, blanket, {candles} candles, tinderbox, alms box, {incense} blocks of incense, censer, vestments, {rations} days of rations, waterskin""" scholars_pack = """backpack, book of lore, bottle of ink, ink pen, {parchment} sheets of parchment, little bag of sand, small knife""" -entertainers_pack = """backpack, bedroll, {costumes} costumes, -{candles} candles, {rations} days of rations, waterskin, disguise kit""" + + +if __name__ == "__main__": + from dungeonsheets.equipment_reader import equipment_weight_parser + quantities = {"ball_bearings":350, "string": 23, "candles": 4, + "pitons":18, "oil":3, "rations":2, "rope":15, + "cases":3, "paper":5, "torches":7, "costumes":2, + "incense":3, "parchment":17} + for kit in (burglars_pack, diplomats_pack, dungeoneers_pack, + entertainers_pack, explorers_pack, priests_pack, + scholars_pack): + equip = kit.format(**quantities) + print("EQUIPMENT: " + equip) + equip_weight = equipment_weight_parser(equip) + print("WEIGHT: " + str(equip_weight) + " lbs.") + print("="*15) diff --git a/examples/sorcerer_ranger_test.py b/examples/sorcerer_ranger_test.py index 9ef7002..3ae548b 100644 --- a/examples/sorcerer_ranger_test.py +++ b/examples/sorcerer_ranger_test.py @@ -8,6 +8,7 @@ sheet by running ``makesheets`` from the command line. # To add your own content, write a .py file with your definitions. # Then, import here using the 'import_homebrew' function. from dungeonsheets import import_homebrew +# from dungeonsheets.equipment_reader import explorers_pack HB_races = import_homebrew("HB_races.py") kits = import_homebrew("kits.py") @@ -82,7 +83,7 @@ shield = "" # Eg "shield" # calculated and added. equipment = kits.explorers_pack.format(rations=9, torches=3, pitons=10, rope=50) + \ - ", human skin mask, sacrificial knife." + ", human skin mask, sacrificial knife, 10 arrows." # If the weight of an item is undetermined, you can include it # in the equipment_weight_dict @@ -112,7 +113,7 @@ wild_shapes = ("Ape", "Wolf", "Mastiff", "Giant Spider", "Tiger", "Dire Wolf", "Brown Bear","Cat") # Ex: ('ape', 'wolf', 'ankylosaurus') # List any monsters whose reference can come at hand # for spells like Find Familiar -companions = ["owl", "poisonous snake"] +companions = ["owl", "poisonous snake", "panther"] # Rangers Beast for Beast Master ranger_beast = "Panther"