;;;; abstract.lisp -- classes meant to be inherited (in-package :dnd) ;;; PERSISTENT MIXINS (defclass can-equip () ((equipment-table :initform nil :type list :documentation "A PLIST mapping 'equipment slots' to instances of LOOT. Equipment slots are things like :head, :torso, :left-ring, etc") (equipment-slot-names :initform +standard-humanoid-equipment+ :initarg :slot-names :type (list keyword) :documentation "The list of slots available to this entity.")) (:metaclass db:persistent-class)) (defclass has-bag () ((bag :reader bag :initform nil :type list :documentation "A list of items that this entity is carrying.")) (:metaclass db:persistent-class)) (defclass has-chronicle () ((chronicle :accessor chronicle :initform nil)) (:metaclass db:persistent-class) (:documentation "A chronicle is a general purpose log of events.")) (defparameter +standard-humanoid-equipment+ '(:head :neck :torso :waist :legs :feet :arms :left-fingers :right-fingers :left-holding :right-holding :cloak) "The equipment slots for standard humanoids") ;;; ABSTRACT CLASSES (defclass game-object (db:store-object has-uid has-chronicle) () (:metaclass db:persistent-class))