1;;----------------------------------------------------------------------------
2;; Constants
3;;----------------------------------------------------------------------------
4(define kalc-lvl 6)
5(define kalc-species sp_human)
6(define kalc-occ oc_wizard)
7
8;;----------------------------------------------------------------------------
9;; Schedule
10;;
11;; Kalcifax travels (notionally by the moon gates)
12;; to many places, carrying messages and such.
13;;----------------------------------------------------------------------------
14(define kalc-bed cheerful-bed-2)
15(define kalc-mealplace )
16(define kalc-workplace )
17(define kalc-leisureplace )
18(kern-mk-sched 'sch_kalc
19               (list 0  0 kalc-bed          "sleeping")
20               (list 7  0 bilge-water-seat-5 "eating")
21               (list 8  0 enchtwr-hall       "idle")
22               (list 11 0 g-fountain         "idle")
23               (list 12 0 ghg-s6             "eating")
24               (list 13 0 eng-workshop       "idle")
25               (list 16 0 trigrave-tavern-hall "idle")
26               (list 17 0 trigrave-tavern-table-3b "eating")
27               (list 19 0 gt-ws-hall           "idle")
28               (list 23 0 kalc-bed          "sleeping")
29               )
30
31;;----------------------------------------------------------------------------
32;; Gob
33;;----------------------------------------------------------------------------
34(define (kalc-mk) nil)
35
36;;----------------------------------------------------------------------------
37;; Conv
38;;
39;; Kalcifax is a female wizard with considerable knowledge of the moon gates.
40;; She travels to many places (notionally by use of the gates),
41;; carrying messages and such.
42;; Kalcifax is a potential party member.
43;;----------------------------------------------------------------------------
44
45;; Basics...
46(define (kalc-hail knpc kpc)
47  (meet "You meet a cute wizard.")
48  (say knpc "Well met, fellow traveler.")
49  )
50
51(define (kalc-name knpc kpc)
52  (say knpc "I'm Kalcifax. And you are...?")
53  (kern-conv-get-reply kpc)
54  (say knpc "It's nice to meet you.")
55  )
56
57(define (kalc-join knpc kpc)
58  (if (is-player-party-member? knpc)
59      (say knpc "I've already joined you!")
60      (begin
61        (say knpc "Ok, this will be fun!")
62        (join-player knpc)
63        (kern-conv-end)
64        )
65  ))
66
67(define (kalc-job knpc kpc)
68  (say knpc "I travel the gates, running errands for people.")
69  )
70
71(define (kalc-bye knpc kpc)
72  (say knpc "I'm sure we'll meet again!")
73  )
74
75(define (kalc-gate knpc kpc)
76  (say knpc "The moongates! Do you know how they work?")
77  (if (yes? kpc)
78      (say knpc "I don't know why more people don't do it.")
79      (say knpc "The phase of Lumis decides where you can enter, "
80           "the phase of Ord decides where you emerge!")))
81
82(define (kalc-lumi knpc kpc)
83  (say knpc "Lumis is the yellow slow-moving moon."))
84
85(define (kalc-ord knpc kpc)
86  (say knpc "Ord is the blue fast-moving moon."))
87
88(define (kalc-engi knpc kpc)
89  (say knpc "I'm one of the only people who ever visits the Engineer! "
90       "You have to use a moongate to get to his place. "
91       "Enter when Ord has waxed almost full."))
92
93(define (kalc-peop knpc kpc)
94  (say knpc "I deliver messages and packages for the Engineer, the Enchanter, city officials. "
95       "Anyone who needs something delivered safely and fast, and is willing to pay!"))
96
97(define (kalc-pay knpc kpc)
98  (say knpc "I do pretty good."))
99
100(define kalc-conv
101  (ifc basic-conv
102
103       ;; basics
104       (method 'hail kalc-hail)
105       (method 'bye  kalc-bye)
106       (method 'job  kalc-job)
107       (method 'name kalc-name)
108       (method 'join kalc-join)
109
110       (method 'gate kalc-gate)
111       (method 'lumi kalc-lumi)
112       (method 'ord  kalc-ord)
113       (method 'engi kalc-engi)
114       (method 'peop kalc-peop)
115       (method 'erra kalc-peop)
116       (method 'pay  kalc-pay)
117       ))
118
119(define (mk-kalcifax)
120  (bind
121   (kern-mk-char
122    'ch_kalc           ; tag
123    "Kalcifax"             ; name
124    kalc-species         ; species
125    kalc-occ              ; occ
126    s_blue_wizard
127    faction-men      ; starting alignment
128    0 7 0            ; str/int/dex
129    (/ pc-hp-off 2)  ; hp bonus
130    (/ pc-hp-gain 2) ; hp per-level bonus
131    pc-mp-off        ; mp bonus
132    pc-mp-gain       ; mp per-level bonus
133    max-health ; hp
134    -1  ; xp
135    max-health ; mp
136    0
137    kalc-lvl
138    #f               ; dead
139    'kalc-conv         ; conv
140    sch_kalc           ; sched
141    'townsman-ai              ; special ai
142    nil              ; container
143    (list            ;; readied
144     t_staff
145     )
146    )
147   (kalc-mk)))
148