From 53435b4322147e2dd86f3bdca17433a35e86be75 Mon Sep 17 00:00:00 2001 From: James Miller Date: Thu, 23 Apr 2020 18:14:38 -0500 Subject: [PATCH 1/4] begin work on items. Add items.yaml. Add itemcategories --- data/yaml/items.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 data/yaml/items.yaml diff --git a/data/yaml/items.yaml b/data/yaml/items.yaml new file mode 100644 index 0000000..d58a14a --- /dev/null +++ b/data/yaml/items.yaml @@ -0,0 +1,21 @@ +itemcategories: +- Alchemical Items +- Ammunition +- Apex Items +- Armor +- Companion items +- Consumables +- Held Items +- Materials +- Oils +- Potions +- Runes +- Scrolls +- Shields +- Snares +- Staves +- Structures +- Talismans +- Wands +- Weapons +- Worn Items From 6c1d7d587b7564e7e6cfd277ea94232e0a0df8c8 Mon Sep 17 00:00:00 2001 From: James Miller Date: Fri, 24 Apr 2020 15:07:08 -0500 Subject: [PATCH 2/4] working on staves --- data/yaml/{items.yaml => itemcategories.yaml} | 0 data/yaml/tmp-sql-staves-to-yaml.py | 99 +++++++++++++++++++ 2 files changed, 99 insertions(+) rename data/yaml/{items.yaml => itemcategories.yaml} (100%) create mode 100644 data/yaml/tmp-sql-staves-to-yaml.py diff --git a/data/yaml/items.yaml b/data/yaml/itemcategories.yaml similarity index 100% rename from data/yaml/items.yaml rename to data/yaml/itemcategories.yaml diff --git a/data/yaml/tmp-sql-staves-to-yaml.py b/data/yaml/tmp-sql-staves-to-yaml.py new file mode 100644 index 0000000..e8f0f5b --- /dev/null +++ b/data/yaml/tmp-sql-staves-to-yaml.py @@ -0,0 +1,99 @@ +import sqlite3 +import yaml +import pprint + +def main(): + pp = pprint.PrettyPrinter(indent=1, width=180) + conn = sqlite3.connect('../deprecated/pf2.db') + conn.row_factory = sqlite3.Row + + q = """ + SELECT * FROM staff; + """ + + c = conn.cursor() + c.execute(q) + data = [dict(row) for row in c.fetchall()] + + for i in data: + # ADD THE ITEM CATEGORY + i['itemcategory'] = "Staves" + + # convert gp prices to cp prices to avoid float issues + if i['price'] == '': + i['price'] = '0' + i['price_cp'] = int(float(i['price']) * 100) + del i['price'] + + # make bulk a string + i['bulk'] = str(i['bulk']) + + # handle source entries + i['source'] = [ + { + 'abbr': 'CRB', + 'page_start': int(i['source_pages']), + 'page_stop': int(i['source_pages']) + } + ] + del i['source_id'] + del i['source_pages'] + + # Get staffactivations and effects + qq = """ + SELECT activation, effect FROM staffactivations + INNER JOIN + staff_staffactivations ON + staffactivations.staffactivations_id = staff_staffactivations.staffactivations_id + INNER JOIN + staff ON staff.staff_id = staff_staffactivations.staff_id + WHERE staff.staff_id = ?; + """ + + # Get staffactivations + cc = conn.cursor() + cc.execute(qq, (i['staff_id'],)) + res = cc.fetchall() + # print("\n\nStaff: {}".format(i['name'])) + slist = [] + for j in res: + x = tuple(j)[0] + y = tuple(j)[1] + xy = {'activation': x, 'effect': y} + slist.append(xy) + if len(slist) > 0: + i['staffactivations'] = slist + else: + i['staffactivations'] = None + + # Get traits + qq = """ + SELECT traits.short_name + FROM traits + INNER JOIN + staff_trait ON traits.trait_id = staff_trait.trait_id + INNER JOIN + staff ON staff.staff_id = staff_trait.staff_id + WHERE staff.staff_id = ?; + """ + cc = conn.cursor() + cc.execute(qq, (i['staff_id'],)) + res = cc.fetchall() + # print("\n\nWeapon: {}".format(i['name'])) + tlist = [] + for j in res: + x = tuple(j)[0] + tlist.append(x) + if len(tlist) > 0: + i['traits'] = tlist + else: + i['traits'] = None + + # DO THIS LAST + del i['staff_id'] + + pp.pprint(data) + + +if __name__ == '__main__': + main() From 2e4aaca325a3c287a7955c6030cd779de14d75bc Mon Sep 17 00:00:00 2001 From: James Miller Date: Fri, 24 Apr 2020 15:42:17 -0500 Subject: [PATCH 3/4] staves added, levels and prices and source pages proofread --- data/yaml/items-staves.yaml | 1845 +++++++++++++++++++++++++++ data/yaml/tmp-sql-staves-to-yaml.py | 34 +- 2 files changed, 1878 insertions(+), 1 deletion(-) create mode 100644 data/yaml/items-staves.yaml diff --git a/data/yaml/items-staves.yaml b/data/yaml/items-staves.yaml new file mode 100644 index 0000000..d2313ac --- /dev/null +++ b/data/yaml/items-staves.yaml @@ -0,0 +1,1845 @@ +staves: +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff is topped with carved animal and monster heads. While wielding + the staff, you gain a +2 circumstance bonus to Nature checks to identify animals. + item_bonus: 2 + itemcategory: Staves + level: 4 + name: Animal Staff + price_cp: 9000 + source: + - abbr: CRB + page_start: 592 + page_stop: 592 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Know Direction + - level: 1 + name: Magic Fang + - level: 1 + name: Summon Animal + traits: + - Divination + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff is topped with carved animal and monster heads. While wielding + the staff, you gain a +2 circumstance bonus to Nature checks to identify animals. + item_bonus: 2 + itemcategory: Staves + level: 8 + name: Animal Staff (Greater) + price_cp: 46000 + source: + - abbr: CRB + page_start: 592 + page_stop: 592 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Know Direction + - level: 1 + name: Magic Fang + - level: 1 + name: Summon Animal + - level: 2 + name: Animal Messenger + - level: 2 + name: Speak with Animals + - level: 2 + name: Summon Animal + - level: 3 + name: Animal Form + - level: 3 + name: Summon Animal + traits: + - Divination + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff is topped with carved animal and monster heads. While wielding + the staff, you gain a +2 circumstance bonus to Nature checks to identify animals. + item_bonus: 2 + itemcategory: Staves + level: 12 + name: Animal Staff (Major) + price_cp: 190000 + source: + - abbr: CRB + page_start: 592 + page_stop: 592 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Know Direction + - level: 1 + name: Magic Fang + - level: 1 + name: Summon Animal + - level: 2 + name: Animal Messenger + - level: 2 + name: Speak with Animals + - level: 2 + name: Summon Animal + - level: 3 + name: Animal Form + - level: 3 + name: Summon Animal + - level: 4 + name: Summon Animal + - level: 5 + name: Animal Form + - level: 5 + name: Moon Frenzy + - level: 5 + name: Summon Animal + traits: + - Divination + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This polished wooden staff bears a swirling motif reminiscent of the + folds of a brain. While wielding the staff, you gain a +2 circumstance bonus to + checks to identify mental magic. + item_bonus: 2 + itemcategory: Staves + level: 4 + name: Mentalist's Staff + price_cp: 9000 + source: + - abbr: CRB + page_start: 592 + page_stop: 593 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Daze + - level: 1 + name: Mindlink + - level: 1 + name: Phantom Pain + traits: + - Divination + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This polished wooden staff bears a swirling motif reminiscent of the + folds of a brain. While wielding the staff, you gain a +2 circumstance bonus to + checks to identify mental magic. + item_bonus: 2 + itemcategory: Staves + level: 8 + name: Mentalist's Staff (Greater) + price_cp: 45000 + source: + - abbr: CRB + page_start: 592 + page_stop: 593 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Daze + - level: 1 + name: Mindlink + - level: 1 + name: Phantom Pain + - level: 2 + name: Paranoia + - level: 3 + name: Hypercognition + - level: 3 + name: Phantom Pain + traits: + - Divination + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This polished wooden staff bears a swirling motif reminiscent of the + folds of a brain. While wielding the staff, you gain a +2 circumstance bonus to + checks to identify mental magic. + item_bonus: 2 + itemcategory: Staves + level: 12 + name: Mentalist's Staff (Major) + price_cp: 180000 + source: + - abbr: CRB + page_start: 592 + page_stop: 593 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Daze + - level: 1 + name: Mindlink + - level: 1 + name: Phantom Pain + - level: 2 + name: Paranoia + - level: 3 + name: Hypercognition + - level: 3 + name: Phantom Pain + - level: 4 + name: Modify Memory + - level: 4 + name: Telepathy + - level: 5 + name: Phantom Pain + - level: 5 + name: Synaptic Pulse + - level: 5 + name: Synesthesia + traits: + - Divination + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This intricately carved wooden staff is warm to the touch and thrums + with inner energy. While wielding the staff, you gain a +2 circumstance bonus + to checks to identify abjuration magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Abjuration + price_cp: 23000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Shield + - level: 1 + name: Alarm + - level: 1 + name: Feather Fall + - level: 2 + name: Dispel Magic + - level: 2 + name: Endure Elements + - level: 2 + name: Resist Energy + traits: + - Abjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This intricately carved wooden staff is warm to the touch and thrums + with inner energy. While wielding the staff, you gain a +2 circumstance bonus + to checks to identify abjuration magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Abjuration (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Shield + - level: 1 + name: Alarm + - level: 1 + name: Feather Fall + - level: 2 + name: Dispel Magic + - level: 2 + name: Endure Elements + - level: 2 + name: Resist Energy + - level: 3 + name: Alarm + - level: 3 + name: Glyph of Warding + - level: 4 + name: Dimensional Anchor + - level: 4 + name: Dispel Magic + - level: 4 + name: Resist Energy + traits: + - Abjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This intricately carved wooden staff is warm to the touch and thrums + with inner energy. While wielding the staff, you gain a +2 circumstance bonus + to checks to identify abjuration magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Abjuration (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Shield + - level: 1 + name: Alarm + - level: 1 + name: Feather Fall + - level: 2 + name: Dispel Magic + - level: 2 + name: Endure Elements + - level: 2 + name: Resist Energy + - level: 3 + name: Alarm + - level: 3 + name: Glyph of Warding + - level: 4 + name: Dimensional Anchor + - level: 4 + name: Dispel Magic + - level: 4 + name: Resist Energy + - level: 5 + name: Banishment + - level: 5 + name: Endure Elements + - level: 6 + name: Dispel Magic + - level: 6 + name: Repulsion + traits: + - Abjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This ash staff is decorated with animals; wielding it, you gain a +2 + circumstance bonus to checks to identify conjuration magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Conjuration + price_cp: 23000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Tanglefoot + - level: 1 + name: Summon Construct + - level: 1 + name: Unseen Servant + - level: 2 + name: Obscuring Mist + - level: 2 + name: Phantom Steed + - level: 2 + name: Summon Construct + - level: 2 + name: Summon Elemental + traits: + - Conjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This ash staff is decorated with animals; wielding it, you gain a +2 + circumstance bonus to checks to identify conjuration magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Conjuration (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Tanglefoot + - level: 1 + name: Summon Construct + - level: 1 + name: Unseen Servant + - level: 2 + name: Obscuring Mist + - level: 2 + name: Phantom Steed + - level: 2 + name: Summon Construct + - level: 2 + name: Summon Elemental + - level: 3 + name: Stinking Cloud + - level: 3 + name: Summon Construct + - level: 3 + name: Summon Elemental + - level: 4 + name: Creation + - level: 4 + name: Illusory Creature + - level: 4 + name: Summon Construct + - level: 4 + name: Summon Elemental + traits: + - Conjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This ash staff is decorated with animals; wielding it, you gain a +2 + circumstance bonus to checks to identify conjuration magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Conjuration (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Tanglefoot + - level: 1 + name: Summon Construct + - level: 1 + name: Unseen Servant + - level: 2 + name: Obscuring Mist + - level: 2 + name: Phantom Steed + - level: 2 + name: Summon Construct + - level: 2 + name: Summon Elemental + - level: 3 + name: Stinking Cloud + - level: 3 + name: Summon Construct + - level: 3 + name: Summon Elemental + - level: 4 + name: Creation + - level: 4 + name: Illusory Creature + - level: 4 + name: Summon Construct + - level: 4 + name: Summon Elemental + - level: 5 + name: Black Tentacles + - level: 5 + name: Summon Construct + - level: 5 + name: Summon Elemental + - level: 6 + name: Phantom Steed + - level: 6 + name: Summon Construct + - level: 6 + name: Summon Elemental + traits: + - Conjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Semiprecious gemstones emerge, seemingly at random, from the surface + of this gnarled wooden staff. While wielding it, you gain a +2 circumstance bonus + to checks to identify divination magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Divination + price_cp: 23000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Detect Magic + - level: 1 + name: True Strike + - level: 2 + name: Comprehend Language + - level: 2 + name: Darkvision + - level: 2 + name: Telepathy + traits: + - Abjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Semiprecious gemstones emerge, seemingly at random, from the surface + of this gnarled wooden staff. While wielding it, you gain a +2 circumstance bonus + to checks to identify divination magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Divination (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Detect Magic + - level: 1 + name: True Strike + - level: 2 + name: Comprehend Language + - level: 2 + name: Darkvision + - level: 2 + name: Telepathy + - level: 3 + name: Clairaudience + - level: 3 + name: Darkvision + - level: 4 + name: Clairvoyance + - level: 4 + name: Comprehend Language + - level: 4 + name: Telepathy + traits: + - Abjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Semiprecious gemstones emerge, seemingly at random, from the surface + of this gnarled wooden staff. While wielding it, you gain a +2 circumstance bonus + to checks to identify divination magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Divination (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Detect Magic + - level: 1 + name: True Strike + - level: 2 + name: Comprehend Language + - level: 2 + name: Darkvision + - level: 2 + name: Telepathy + - level: 3 + name: Clairaudience + - level: 3 + name: Darkvision + - level: 4 + name: Clairvoyance + - level: 4 + name: Comprehend Language + - level: 4 + name: Telepathy + - level: 5 + name: Prying Eye + - level: 5 + name: Sending + - level: 5 + name: Telepathy + - level: 5 + name: True Seeing + traits: + - Abjuration + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: A mesmerizing gemstone caps the head of this handsomely crafted wooden + staff. While wielding the staff, you gain a +2 circumstance bonus to checks to + identify enchantment magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Enchantment + price_cp: 23000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Daze + - level: 1 + name: Charm + - level: 1 + name: Command + - level: 2 + name: Hideous Laughter + - level: 2 + name: Touch of Idiocy + traits: + - Enchantment + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: A mesmerizing gemstone caps the head of this handsomely crafted wooden + staff. While wielding the staff, you gain a +2 circumstance bonus to checks to + identify enchantment magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Enchantment (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Daze + - level: 1 + name: Charm + - level: 1 + name: Command + - level: 2 + name: Hideous Laughter + - level: 2 + name: Touch of Idiocy + - level: 3 + name: Paralyze + - level: 4 + name: Charm + - level: 4 + name: Confusion + - level: 4 + name: Suggestion + traits: + - Enchantment + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: A mesmerizing gemstone caps the head of this handsomely crafted wooden + staff. While wielding the staff, you gain a +2 circumstance bonus to checks to + identify enchantment magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Enchantment (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Daze + - level: 1 + name: Charm + - level: 1 + name: Command + - level: 2 + name: Hideous Laughter + - level: 2 + name: Touch of Idiocy + - level: 3 + name: Paralyze + - level: 4 + name: Charm + - level: 4 + name: Confusion + - level: 4 + name: Suggestion + - level: 5 + name: Command + - level: 5 + name: Crushing Dispair + - level: 6 + name: Dominate + - level: 6 + name: Feeblemind + traits: + - Enchantment + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff is tapered at the base and carved into a gem-studded twist + at the top. While wielding the staff, you gain a +2 circumstance bonus to checks + to identify evocation magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Evocation + price_cp: 23000 + source: + - abbr: CRB + page_start: 593 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Ray of Frost + - level: 1 + name: Magic Missile + - level: 1 + name: Shocking Grasp + - level: 2 + name: Acid Arrow + - level: 2 + name: Glitterdust + traits: + - Evocation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff is tapered at the base and carved into a gem-studded twist + at the top. While wielding the staff, you gain a +2 circumstance bonus to checks + to identify evocation magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Evocation (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 593 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Ray of Frost + - level: 1 + name: Magic Missile + - level: 1 + name: Shocking Grasp + - level: 2 + name: Acid Arrow + - level: 2 + name: Glitterdust + - level: 3 + name: Lightning Bolt + - level: 3 + name: Magic Missile + - level: 4 + name: Fireball + - level: 4 + name: Weapon Storm + traits: + - Evocation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff is tapered at the base and carved into a gem-studded twist + at the top. While wielding the staff, you gain a +2 circumstance bonus to checks + to identify evocation magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Evocation (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 593 + page_stop: 594 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Ray of Frost + - level: 1 + name: Magic Missile + - level: 1 + name: Shocking Grasp + - level: 2 + name: Acid Arrow + - level: 2 + name: Glitterdust + - level: 3 + name: Lightning Bolt + - level: 3 + name: Magic Missile + - level: 4 + name: Fireball + - level: 4 + name: Weapon Storm + - level: 5 + name: Cone of Cold + - level: 5 + name: Magic Missile + - level: 5 + name: Chain Lightning + - level: 5 + name: Wall of Force + traits: + - Evocation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff resembles a blackened and burned length of ashen wood. It + smells faintly of soot and glows as if lit by embers. You can use an Interact + action to touch the tip of this staff to a torch, tinder, or a flammable substance + to ignite a flame. + item_bonus: null + itemcategory: Staves + level: 3 + name: Staff of Fire + price_cp: 6000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Produce Flame + - level: 1 + name: Burning Hands + traits: + - Evocation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff resembles a blackened and burned length of ashen wood. It + smells faintly of soot and glows as if lit by embers. You can use an Interact + action to touch the tip of this staff to a torch, tinder, or a flammable substance + to ignite a flame. + item_bonus: null + itemcategory: Staves + level: 8 + name: Staff of Fire (Greater) + price_cp: 45000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Produce Flame + - level: 1 + name: Burning Hands + - level: 2 + name: Burning Hands + - level: 2 + name: Flaming Sphere + - level: 3 + name: Flaming Sphere + - level: 3 + name: Fireball + traits: + - Evocation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff resembles a blackened and burned length of ashen wood. It + smells faintly of soot and glows as if lit by embers. You can use an Interact + action to touch the tip of this staff to a torch, tinder, or a flammable substance + to ignite a flame. + item_bonus: null + itemcategory: Staves + level: 12 + name: Staff of Fire (Major) + price_cp: 180000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Produce Flame + - level: 1 + name: Burning Hands + - level: 2 + name: Burning Hands + - level: 2 + name: Flaming Sphere + - level: 3 + name: Flaming Sphere + - level: 3 + name: Fireball + - level: 4 + name: Fire Shield + - level: 4 + name: Fireball + - level: 4 + name: Wall of Fire + - level: 5 + name: Fireball + - level: 5 + name: Wall of Fire + traits: + - Evocation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Made of smooth, white wood, this staff is capped at each end with a + golden cross adorned with a multitude of ruby cabochons. A staff of healing grants + an item bonus to the Hit Points you restore anytime you cast the heal spell using + your own spell slots or using charges from the staff. + item_bonus: 1 + itemcategory: Staves + level: 4 + name: Staff of Healing + price_cp: 9000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Stabilize + - level: 1 + name: Heal + traits: + - Necromancy + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Made of smooth, white wood, this staff is capped at each end with a + golden cross adorned with a multitude of ruby cabochons. A staff of healing grants + an item bonus to the Hit Points you restore anytime you cast the heal spell using + your own spell slots or using charges from the staff. + item_bonus: 2 + itemcategory: Staves + level: 8 + name: Staff of Healing (Greater) + price_cp: 47000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Stabilize + - level: 1 + name: Heal + - level: 2 + name: Heal + - level: 2 + name: Restoration + - level: 2 + name: Restore Senses + - level: 3 + name: Heal + - level: 3 + name: Remove Disease + traits: + - Necromancy + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Made of smooth, white wood, this staff is capped at each end with a + golden cross adorned with a multitude of ruby cabochons. A staff of healing grants + an item bonus to the Hit Points you restore anytime you cast the heal spell using + your own spell slots or using charges from the staff. + item_bonus: 3 + itemcategory: Staves + level: 12 + name: Staff of Healing (Major) + price_cp: 180000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Stabilize + - level: 1 + name: Heal + - level: 2 + name: Heal + - level: 2 + name: Restoration + - level: 2 + name: Restore Senses + - level: 3 + name: Heal + - level: 3 + name: Remove Disease + - level: 4 + name: Heal + - level: 4 + name: Restoration + - level: 5 + name: Breath of Life + - level: 5 + name: Heal + - level: 5 + name: Remove Disease + traits: + - Necromancy + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Made of smooth, white wood, this staff is capped at each end with a + golden cross adorned with a multitude of ruby cabochons. A staff of healing grants + an item bonus to the Hit Points you restore anytime you cast the heal spell using + your own spell slots or using charges from the staff. + item_bonus: 4 + itemcategory: Staves + level: 16 + name: Staff of Healing (True) + price_cp: 920000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Stabilize + - level: 1 + name: Heal + - level: 2 + name: Heal + - level: 2 + name: Restoration + - level: 2 + name: Restore Senses + - level: 3 + name: Heal + - level: 3 + name: Remove Disease + - level: 4 + name: Heal + - level: 4 + name: Restoration + - level: 5 + name: Breath of Life + - level: 5 + name: Heal + - level: 5 + name: Remove Disease + - level: 6 + name: Heal + - level: 6 + name: Restoration + - level: 6 + name: Restore Senses + - level: 7 + name: Heal + - level: 7 + name: Regenerate + - level: 7 + name: Remove Disease + traits: + - Necromancy + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This simple iron staff is capped with a faceted, clear gem. + item_bonus: null + itemcategory: Staves + level: 8 + name: Staff of Illumination + price_cp: 42500 + source: + - abbr: CRB + page_start: 594 + page_stop: 594 + staffactivations: + - activation: Interact + effect: The gem at the top of the staff glows as a torch, shedding bright light + in a 20-foot radius (and dim light to the next 20 feet) for 10 minutes. + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Light + - level: 2 + name: Continual Flame + - level: 3 + name: Continual Flame + - level: 3 + name: Searing Light + traits: + - Evocation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This ornately designed metal staff shines with precious inlays of gold. + When you Cast a Spell from the staff, the illusory image of something you desire + flashes across its surface. While wielding the staff, you gain a +2 circumstance + bonus to checks to identify illusion magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Illusion + price_cp: 23000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Ghost Sound + - level: 1 + name: Illusory Disguise + - level: 1 + name: Illusory Object + - level: 2 + name: Illusory Creature + - level: 2 + name: Item Facade + traits: + - Illusion + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This ornately designed metal staff shines with precious inlays of gold. + When you Cast a Spell from the staff, the illusory image of something you desire + flashes across its surface. While wielding the staff, you gain a +2 circumstance + bonus to checks to identify illusion magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Illusion (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Ghost Sound + - level: 1 + name: Illusory Disguise + - level: 1 + name: Illusory Object + - level: 2 + name: Illusory Creature + - level: 2 + name: Item Facade + - level: 3 + name: Illusory Disguise + - level: 3 + name: Embrace the Pit + - level: 4 + name: Illusory Creature + - level: 4 + name: Veil + traits: + - Illusion + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This ornately designed metal staff shines with precious inlays of gold. + When you Cast a Spell from the staff, the illusory image of something you desire + flashes across its surface. While wielding the staff, you gain a +2 circumstance + bonus to checks to identify illusion magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Illusion (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Ghost Sound + - level: 1 + name: Illusory Disguise + - level: 1 + name: Illusory Object + - level: 2 + name: Illusory Creature + - level: 2 + name: Item Facade + - level: 3 + name: Illusory Disguise + - level: 3 + name: Embrace the Pit + - level: 4 + name: Illusory Creature + - level: 4 + name: Veil + - level: 5 + name: Illusory Scene + - level: 5 + name: Veil + - level: 6 + name: Hallucination + - level: 6 + name: Mislead + traits: + - Illusion + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This twisted and grim-looking staff is adorned with hideous skull and + bone motifs. While wielding the staff, you gain a +2 circumstance bonus to checks + to identify necromancy magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Necromancy + price_cp: 23000 + source: + - abbr: CRB + page_start: 594 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Chill Touch + - level: 1 + name: Grim Tendrils + - level: 1 + name: Ray of Enfeeblement + - level: 2 + name: Deafness + - level: 2 + name: Gentle Repose + traits: + - Necromancy + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This twisted and grim-looking staff is adorned with hideous skull and + bone motifs. While wielding the staff, you gain a +2 circumstance bonus to checks + to identify necromancy magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Necromancy (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 594 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Chill Touch + - level: 1 + name: Grim Tendrils + - level: 1 + name: Ray of Enfeeblement + - level: 2 + name: Deafness + - level: 2 + name: Gentle Repose + - level: 3 + name: Blindness + - level: 3 + name: Vampiric Touch + - level: 4 + name: Grim Tendrils + traits: + - Necromancy + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This twisted and grim-looking staff is adorned with hideous skull and + bone motifs. While wielding the staff, you gain a +2 circumstance bonus to checks + to identify necromancy magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Necromancy (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 594 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Chill Touch + - level: 1 + name: Grim Tendrils + - level: 1 + name: Ray of Enfeeblement + - level: 2 + name: Deafness + - level: 2 + name: Gentle Repose + - level: 3 + name: Blindness + - level: 3 + name: Vampiric Touch + - level: 4 + name: Grim Tendrils + - level: 5 + name: Cloudkill + - level: 5 + name: Gentle Repose + - level: 6 + name: Grim Tendrils + - level: 6 + name: Vampiric Exsanguination + traits: + - Necromancy + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This staff of magically hardened wood is topped with a silver sculpture + depicting magical runic symbols. When used as a weapon, a staff of power is a + +2 greater striking staff.\n\nVoluntarily destroying a staff of power unleashes + an incredible blast of energy. When wielding the staff, you can Interact to break + it. This releases a 30-foot-burst magical explosion centered on the staff. This + deals 2d8 force damage per charge remaining in the staff (DC 40 basic Reflex save). + You automatically critically fail your save. A creature reduced to 0 Hit Points + by this damage dies instantly; this is a death effect. + item_bonus: null + itemcategory: Staves + level: 16 + name: Staff of Power + price_cp: 1000000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Interact + effect: This releases a 30-foot-burst magical explosion centered on the staff. + This deals 2d8 force damage per charge remaining in the staff (DC 40 basic Reflex + save). You automatically critically fail your save. A creature reduced to 0 + Hit Points by this damage dies instantly; this is a death effect. + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 1 + name: Ray of Enfeeblement + - level: 2 + name: Continual Flame + - level: 3 + name: Levitate + - level: 4 + name: Globe of Invulnerability + - level: 4 + name: Paralyze + - level: 5 + name: Magic Missile + - level: 6 + name: Wall of Force + - level: 7 + name: Cone of Cold + - level: 7 + name: Fireball + - level: 7 + name: Lightning Bolt + traits: + - Evocation + - Magical + - Staff + - Rare + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: Sigils and runes of ancient and powerful magic cover the iron cladding + on this long wooden staff. A staff of the magi is a +3 major striking staff, and + when wielding it you gain a +1 circumstance bonus to saving throws against spells.\n\nVoluntarily + destroying a staff of the magi unleashes a truly devastating wave of arcane energy + that surges out, dissipating with distance. When wielding the staff, you can break + it using an Interact action. This releases a 30-foot‑burst magical explosion centered + on the staff. This deals 2d10 force damage per charge remaining in the staff (DC + 40 basic Reflex save), You automatically critically fail your save. The explosion + continues to echo beyond the initial blast zone, dealing half as much damage to + creatures beyond 30 feet but within a 60-foot burst. A creature reduced to 0 Hit + Points by this damage dies instantly; this is a death effect. + item_bonus: null + itemcategory: Staves + level: 20 + name: Staff of the Magi + price_cp: 9000000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Interact + effect: This releases a 30-foot‑burst magical explosion centered on the staff. + This deals 2d10 force damage per charge remaining in the staff (DC 40 basic + Reflex save), You automatically critically fail your save. The explosion continues + to echo beyond the initial blast zone, dealing half as much damage to creatures + beyond 30 feet but within a 60-foot burst. A creature reduced to 0 Hit Points + by this damage dies instantly; this is a death effect. + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Detect Magic + - level: 0 + name: Light + - level: 0 + name: Mage Hand + - level: 0 + name: Telekinetic Projectile + - level: 1 + name: Lock + - level: 2 + name: Enlarge + - level: 2 + name: Glitterdust + - level: 2 + name: Invisibility + - level: 2 + name: Knock + - level: 2 + name: Telekinetic Manuever + - level: 2 + name: Web + - level: 3 + name: Dispel Magic + - level: 3 + name: Fireball + - level: 3 + name: Lightning Bolt + - level: 4 + name: Invisibility + - level: 4 + name: Enlarge + - level: 4 + name: Fireball + - level: 4 + name: Wall of Fire + - level: 4 + name: Web + - level: 5 + name: Cone of Cold + - level: 5 + name: Passwall + - level: 5 + name: Telekinetic Haul + - level: 6 + name: Disintegrate + - level: 6 + name: Dispel Magic + - level: 6 + name: Fireball + - level: 6 + name: Lightning Bolt + - level: 7 + name: Cone of Cold + - level: 7 + name: Passwall + - level: 7 + name: Plane Shift + - level: 7 + name: Wall of Fire + - level: 8 + name: Fireball + - level: 8 + name: Mage Armor + - level: 9 + name: Dispel Magic + - level: 9 + name: Meteor Swarm + - level: 9 + name: Summon Dragon + traits: + - Evocation + - Magical + - Staff + - Rare + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: A glass orb atop this metal staff contains fine, undulating sand. While + wielding the staff, you gain a +2 circumstance bonus to checks to identify transmutation + magic. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Staff of Transmutation + price_cp: 23000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Sigil + - level: 1 + name: Fleet Step + - level: 1 + name: Jump + - level: 2 + name: Enlarge + - level: 2 + name: Humanoid Form + traits: + - Transmutation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: A glass orb atop this metal staff contains fine, undulating sand. While + wielding the staff, you gain a +2 circumstance bonus to checks to identify transmutation + magic. + item_bonus: 2 + itemcategory: Staves + level: 10 + name: Staff of Transmutation (Greater) + price_cp: 90000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Sigil + - level: 1 + name: Fleet Step + - level: 1 + name: Jump + - level: 2 + name: Enlarge + - level: 2 + name: Humanoid Form + - level: 3 + name: Feet to Fins + - level: 3 + name: Jump + - level: 4 + name: Gaseous Form + - level: 4 + name: Shape Stone + traits: + - Transmutation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: A glass orb atop this metal staff contains fine, undulating sand. While + wielding the staff, you gain a +2 circumstance bonus to checks to identify transmutation + magic. + item_bonus: 2 + itemcategory: Staves + level: 14 + name: Staff of Transmutation (Major) + price_cp: 400000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Sigil + - level: 1 + name: Fleet Step + - level: 1 + name: Jump + - level: 2 + name: Enlarge + - level: 2 + name: Humanoid Form + - level: 3 + name: Feet to Fins + - level: 3 + name: Jump + - level: 4 + name: Gaseous Form + - level: 4 + name: Shape Stone + - level: 5 + name: Humanoid Form + - level: 6 + name: Baleful Polymorph + - level: 6 + name: Dragon Form + - level: 6 + name: Flesh to Stone + traits: + - Transmutation + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This oak branch grows leaves in spring that change color in autumn + and shed in winter. While wielding it, you gain a +2 circumstance bonus to Nature + checks to identify plants. + item_bonus: 2 + itemcategory: Staves + level: 6 + name: Verdant Staff + price_cp: 22500 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Tanglefoot + - level: 1 + name: Shillelagh + - level: 2 + name: Barkskin + - level: 2 + name: Entangle + - level: 2 + name: Shape Wood + - level: 2 + name: Tree Shape + traits: + - Divination + - Magical + - Staff + usage: held in one hand +- bulk: '1' + craft_requirements: Supply one casting of all listed levels of all listed spells. + description: This oak branch grows leaves in spring that change color in autumn + and shed in winter. While wielding it, you gain a +2 circumstance bonus to Nature + checks to identify plants. + item_bonus: 2 + itemcategory: Staves + level: 12 + name: Verdant Staff (Greater) + price_cp: 175000 + source: + - abbr: CRB + page_start: 595 + page_stop: 595 + staffactivations: + - activation: Cast a Spell + effect: You expend a number of charges from the staff to cast a spell from its + list. + staffspells: + - level: 0 + name: Tanglefoot + - level: 1 + name: Shillelagh + - level: 2 + name: Barkskin + - level: 2 + name: Entangle + - level: 2 + name: Shape Wood + - level: 2 + name: Tree Shape + - level: 3 + name: Wall of Thorns + - level: 4 + name: Barkskin + - level: 4 + name: Speak with Plants + - level: 5 + name: Plant Form + - level: 5 + name: Wall of Thorns + traits: + - Divination + - Magical + - Staff + usage: held in one hand diff --git a/data/yaml/tmp-sql-staves-to-yaml.py b/data/yaml/tmp-sql-staves-to-yaml.py index e8f0f5b..a89ab36 100644 --- a/data/yaml/tmp-sql-staves-to-yaml.py +++ b/data/yaml/tmp-sql-staves-to-yaml.py @@ -89,11 +89,43 @@ def main(): else: i['traits'] = None + # Get staff spells + qq = """ + SELECT spells.name, staff_spell.level + FROM spells + INNER JOIN + staff_spell ON staff_spell.spell_id = spells.spells_id + INNER JOIN + staff ON staff_spell.staff_id = staff.staff_id + WHERE staff.staff_id = ?; + """ + + cc = conn.cursor() + cc.execute(qq, (i['staff_id'],)) + res = cc.fetchall() + # print("\n\nStaff: {}".format(i['name'])) + slist = [] + for j in res: + x = tuple(j)[0] + y = tuple(j)[1] + xy = {'name': x, 'level': y} + slist.append(xy) + if len(slist) > 0: + i['staffspells'] = slist + else: + i['staffspells'] = None + # DO THIS LAST del i['staff_id'] - pp.pprint(data) + # pp.pprint(data) + fdata = {'staves': data} + final = yaml.safe_dump(fdata, allow_unicode=True) + with open('tmp--items-staves.yaml', 'w') as f: + f.write(final) + for i in data: + print("Staff Name: {}\tPrice (copper): {}".format(i['name'], i['price_cp'])) if __name__ == '__main__': main() From da99e3fa2aecf1209b67888396912655a0bb936f Mon Sep 17 00:00:00 2001 From: James Miller Date: Fri, 24 Apr 2020 15:42:42 -0500 Subject: [PATCH 4/4] mv file to deprecated --- data/yaml/{ => deprecated}/tmp-sql-staves-to-yaml.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename data/yaml/{ => deprecated}/tmp-sql-staves-to-yaml.py (100%) diff --git a/data/yaml/tmp-sql-staves-to-yaml.py b/data/yaml/deprecated/tmp-sql-staves-to-yaml.py similarity index 100% rename from data/yaml/tmp-sql-staves-to-yaml.py rename to data/yaml/deprecated/tmp-sql-staves-to-yaml.py