summaryrefslogtreecommitdiff
path: root/src/game/hazard.lisp
blob: ceb1ad07a0e8c5a792e6d1dbb3dc85dcde58abb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(in-package :dnd)

;;; MODEL CLASSES

(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."))

;;; HELPERS

;;; QUERIES

;;; TRANSACTIONS

;;; MODEL VIEWS

;;; PAGES & PAGE CLASSES

;;; ENDPOINT HELPERS

;;; ENDPOINT DEFINITIONS