diff options
author | colin <colin@cicadas.surf> | 2023-04-01 09:48:08 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-04-01 09:48:08 -0700 |
commit | cc3f850c514967ae2f9effef7e68e1d4965c6865 (patch) | |
tree | 6d0b52c3a65d53f247f4c8272667aca5a4e05bac /src/game/hazard.lisp | |
parent | 56a584ab1b13ff9510dd5145a778000169901a76 (diff) |
Refactor to make cooperative hacking nicer
Diffstat (limited to 'src/game/hazard.lisp')
-rw-r--r-- | src/game/hazard.lisp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/game/hazard.lisp b/src/game/hazard.lisp new file mode 100644 index 0000000..c6ad58d --- /dev/null +++ b/src/game/hazard.lisp @@ -0,0 +1,28 @@ +(in-package :dnd) + +(defclass hazard (game-object) + ((quest + :accessor quest-of + :index-type idx:hash-index + :index-reader hazards-in-quest + :documentation "The quest to which this hazard belongs. Initially it is unbound. It becomes boudn when the hazard is added to a quest.") + (description + :accessor description + :initarg :description + :initform "" + :type string + :documentation "") + (overcomep + :accessor is-overcome + :initform nil + :documentation "indicates whether or not this hazard has been overcome.") + (imminence + :accessor imminence-of + :type priority + :documentation "") + (menace ;; difficulty + :accessor menace-of + :type integer + :documentation "How dangerous the hazard is." )) + (:metaclass db:persistent-class) + (:documentation "Hazard is a superclass for all hazards encountered in a quest. It's chronicle includes data about which heroes fought and which overcame.")) |