[Move symbols used in the database to a separate package clinton@unknownlamer.org**20080425160355 Imported into all packages needed these symbols (characterclasses, spell schools, etc.). This makes life easier during conversion from an imported srd spell to the database class form. ] { hunk ./dnd-tools.asd 11 + (:file "symbols" :depends-on ("packages")) hunk ./dnd-tools.asd 13 - :depends-on ("database" "packages")) + :depends-on ("database" "symbols" "packages")) hunk ./dnd-tools.asd 16 - :depends-on ("packages" "database" "basic-classes")) + :depends-on ("packages" "symbols" + "database" "basic-classes")) hunk ./dnd-tools.asd 19 - :depends-on ("packages" "database" "spells" + :depends-on ("packages" "symbols" "database" "spells" hunk ./dnd-tools.asd 21 - (:file "srd-import" :depends-on ("packages"))))) + (:file "srd-import" :depends-on ("packages" + "symbols"))))) hunk ./src/initialize-database.lisp 3 -(defvar *character-classes* '(barbarian bard cleric druid fighter - monk paladin ranger rogue sorceror wizard)) - -(defvar *caster-classes* - '((bard 1 2 4 7 10 13 16) - (cleric 1 1 3 5 7 9 11 13 15 17) - (druid 1 1 3 5 7 9 11 13 15 17) - (paladin nil 4 8 11 14) - (ranger nil 4 8 11 14) - (sorceror 1 1 4 6 8 10 12 14 16 18) - (wizard 1 1 3 5 7 9 11 13 15 17)) - "Caster class keys and spell levels progression (nil means the - caster does not get spells of the level corresponding to that - position)") - -(defvar *cleric-domains* '(air animal chaos death destruction earth - evil fire good healing knowledge law luck - magic plant protection strength sun travel - trickery war water)) - -(defvar *spell-schools* '((abjuration) - (conjuration calling creation healing summoning - teleporation) - (divination scrying) - (enchantment charm compulsion) - (evocation) - (illusion figment glamer pattern phantasm shadow) - (necromancy) - (transmutation) - (universal)) - "(school . (subschools ...)") - -(defvar *spell-descriptors* '(acid air darkness death earth electricity fear - fire force language-dependent light mind-affecting - sonic water)) - -(defvar *alignments* '(good evil law chaos neutral)) - hunk ./src/packages.lisp 6 +(defpackage :org.unknownlamer.dnd-tools.db.symbols + (:use :common-lisp) + (:nicknames :dnd-db-symbols) + (:export :*character-classes* + :*caster-classes* + :*cleric-domains* + :*spell-schools* + :*spell-descriptors* + :*alignments* + :*spell-components*)) + hunk ./src/packages.lisp 18 - (:use :common-lisp :org.unknownlamer.dnd-tools.db :elephant :cells) + (:use :common-lisp :elephant :cells + :org.unknownlamer.dnd-tools.db :org.unknownlamer.dnd-tools.db.symbols) hunk ./src/packages.lisp 24 - (:use :common-lisp :org.unknownlamer.dnd-tools :cells :cells-gtk) + (:use :common-lisp :cells :cells-gtk + :org.unknownlamer.dnd-tools) hunk ./src/packages.lisp 28 - hunk ./src/packages.lisp 29 - (:use :common-lisp) + (:use :common-lisp + :org.unknownlamer.dnd-tools.db.symbols) addfile ./src/symbols.lisp hunk ./src/symbols.lisp 1 - +(in-package :org.unknownlamer.dnd-tools.db.symbols) + +(defun export-symbols-in-tree (tree) + (export (remove-if-not (lambda (v) (and (symbolp v) (not (null v)))) + (utils-kt:tree-flatten tree)))) + +(defmacro defvar* (name value &optional documentation) + `(progn + (defvar ,name ,value ,documentation) + (export-symbols-in-tree ,name))) + +(defvar* *character-classes* '(barbarian bard cleric druid fighter + monk paladin ranger rogue sorceror wizard)) + +(defvar* *caster-classes* + '((bard 1 2 4 7 10 13 16) + (cleric 1 1 3 5 7 9 11 13 15 17) + (druid 1 1 3 5 7 9 11 13 15 17) + (paladin nil 4 8 11 14) + (ranger nil 4 8 11 14) + (sorceror 1 1 4 6 8 10 12 14 16 18) + (wizard 1 1 3 5 7 9 11 13 15 17)) + "Caster class keys and spell levels progression (nil means the + caster does not get spells of the level corresponding to that + position)") + +(defvar* *cleric-domains* '(air animal chaos death destruction earth + evil fire good healing knowledge law luck + magic plant protection strength sun travel + trickery war water)) + +(defvar* *spell-schools* '((abjuration) + (conjuration calling creation healing summoning + teleporation) + (divination scrying) + (enchantment charm compulsion) + (evocation) + (illusion figment glamer pattern phantasm shadow) + (necromancy) + (transmutation) + (universal)) + "(school . (subschools ...)") + +(defvar* *spell-descriptors* '(acid air darkness death earth electricity fear + fire force language-dependent light mind-affecting + sonic water)) + +(defvar* *alignments* '(good evil law chaos neutral)) + +(defvar* *spell-components* '((verbal v) + (somatic s) + (material m) + (focus f) + (divine-focus df) + (xp-cost xp))) }