added doors and keys.
[uxul-world.git] / small-classes.lisp
1 ;;; Copyright 2009 Christoph Senjak
2
3 (in-package :uxul-world)
4
5 (defclass leaf (bottom)
6   ((animation :initarg :animation
7               :accessor animation
8               :initform (make-animation 0 |leaf|))
9    (width :initarg :width
10           :accessor :width
11           :initform 128)
12    (height :initarg :height
13            :accessor :height
14            :initform 3)
15    (animation-translation :initarg :animation-translation
16                           :accessor animation-translation
17                           :initform (make-xy -7 -30))
18    ))
19
20 (defclass tulip (standing-item)
21   ((animation :initarg :animation
22               :accessor animation
23               :initform (make-animation 10 |tulip| |tulip2| |tulip| |tulip3|))
24    (width :initarg :width
25           :accessor :width
26           :initform 128)
27    (height :initarg :height
28            :accessor :height
29            :initform 128)))
30
31 (defclass key (standing-item)
32   ((animation :initarg :animation
33               :accessor animation
34               :initform (make-animation 0 |key|))
35    (width :initarg :width
36           :accessor width
37           :initform 128)
38    (height :initarg :height
39            :accessor height
40            :initform 128)
41    (dungeon :initarg :dungeon
42             :accessor dungeon
43             :initform nil
44             :documentation "To provide information in which rooms this key can be used.")))
45
46 (defclass door (stone)
47   ((animation :initarg :animation
48               :accessor animation
49               :initform (make-animation 0 |door|))
50    (width :initarg :width
51           :accessor width
52           :initform 128)
53    (height :initarg :height
54            :accessor height
55            :initform 128)
56    (dungeon :initarg :dungeon
57             :accessor dungeon
58             :initform nil
59             :documentation "To provide information in which room this door is.")))