1 ;;----------------------------------------------------------------------------
5 ;;----------------------------------------------------------------------------
6 (kern-mk-sched 'sch_doris
7 (list 0 0 doris-bed "sleeping")
8 (list 8 0 white-stag-counter "working"))
10 ;;----------------------------------------------------------------------------
12 ;;----------------------------------------------------------------------------
13 (define (doris-mk) nil)
15 ;;----------------------------------------------------------------------------
18 ;; Doris is the female innkeeper of the White Stag Lodge in Green Tower.
19 ;;----------------------------------------------------------------------------
20 (define (doris-name kdoris kplayer)
21 (say kdoris "Hi, I'm Doris, innkeeper of the White Stag Lodge."))
23 (define (doris-default)
24 (say kdoris "Let me think... nope, can't help you there."))
26 (define (doris-join kdoris kplayer)
27 (say kdoris "[laughing] No thanks! I've got my hands full with the lodge."))
29 (define (doris-doris knpc kpc)
30 (say knpc "Yep. That's me."))
32 (define (doris-trade knpc kpc)
33 (let ((door (eval 'white-stag-door))
35 ;; is the room still open?
36 (if (not (door-locked? (kobj-gob door)))
37 ;; yes - remind player
38 (say knpc "Your room is still open, silly! You can use it as long as "
40 ;; no - ask if player needs a room
42 (say knpc "My room is " price " gold. I'll unlock the door and you "
43 "can use it for as long as you are in town. Agreed?")
44 (if (kern-conv-get-yes-no? kpc)
45 ;; yes - player agrees to the price
46 (let ((gold (kern-player-get-gold)))
47 ;; does player have enough gold?
49 ;; yes - player has enough gold
51 (kern-player-set-gold (- gold price))
52 (say knpc "Very well. Take the west passage. First room "
53 "at the end of the hall.")
54 (send-signal knpc door 'unlock)
57 ;; no - player does not have enouvh gold)
58 (say knpc "Seems you're short of funds. Why don't you "
59 "walk around and kill things until you loot enough "
60 "corpses? Or whatever you bold adventurers do. [She "
61 "smiles a bit too sweetly]")))
62 ;; no - player does not want the room
63 (say knpc "Maybe some other time, then"))))))
65 (define (doris-lodge knpc kpc)
66 (say knpc "Yep. It's all mine. It used to belong to my Daddy, God rest his "
67 "soul. Most of my customers are local folk, woodsman or travellers "
68 "wandering through."))
70 (define (doris-daddy knpc kpc)
71 (say knpc "Daddy hunted and trapped his way to a small fortune then he "
72 "built this lodge. When he died, I got the lodge."))
74 (define (doris-local knpc kpc)
75 (say knpc "The people here are varied, odd and secretive. They are also "
76 "trustworthy, competent and interesting. You will not find better "
77 "friends or worse enemies then the ones you make here."))
79 (define (doris-woodsman knpc kpc)
80 (say knpc "Hunters, lumberjacks and foragers usually pass through here if "
81 "they are in the area. Wealthier sport hunters from the city take "
82 "lodging here, but usually those who work in the woods camp in the "
83 "woods. They come here for a bit of drink, company and a decent meal."))
85 (define (doris-travelers knpc kpc)
86 (say knpc "Yes, folk like yourself."))
88 (define (doris-gen knpc kpc)
89 (say knpc "An old goblin-fighter. Something of a local legend. You can "
90 "find him pottering around in the woods, and he usually stops in at "
91 "night for a drink."))
93 (define (doris-deric knpc kpc)
94 (say knpc "Yes, Deric. Well, if you've met Deric then you know Deric. He's "
95 "competent enough but doesn't want to spend his life in the obscurity "
96 "of a frontier post."))
98 (define (doris-shroom knpc kpc)
99 (say knpc "Some say she is a witch, and that she knows some goblin magic. "
100 "She certainly is handy when anyone falls ill. She often takes her "
103 (define (doris-abe knpc kpc)
104 (say knpc "Some kind of scholar from Glasdrin. He spends all his time "
105 "studying the ruins. Bookish fellow."))
107 (define (doris-abigail knpc kpc)
108 (say knpc "She was orphaned, so I adopted her. I always wanted a child, "
109 "but that was not to be. I worry about her future... I know she "
110 "belongs among her own kind but I can't bear the thought of losing "
113 (define (doris-goblins knpc kpc)
114 (say knpc "They trade with the townsfolk, I even have one as a customer "
115 "from time-to-time. But they are forbidden by law to enter cities in "
116 "large numbers, so they're always outnumbered. Most of them are hasty "
117 "to conclude their business and get back into the woods."))
119 (define (doris-orphaned knpc kpc)
120 (say knpc "Shroom brought her to me when she was just a baby. Said she "
121 "found her in the woods besides her dead parents. I don't know what - "
122 "or who - killed them, Shroom wouldn't say. Perhaps I don't want to "
125 (define (doris-hail knpc kpc)
126 (say knpc "Welcome to the White Stag"))
128 (define (doris-bye knpc kpc)
129 (say knpc "Come back anytime"))
131 (define (doris-default knpc kpc)
132 (say knpc "Can't help you there"))
134 (define (doris-thie knpc kpc)
135 (say knpc "I haven't had any odd guests lately. Check with Deric, who gets "
136 "reports from ranger patrols. And Gen may have seen something in his "
139 (define (doris-band knpc kpc)
140 (say knpc "Travelers have been complaining about them! "
141 "I wish Deric would do something, they're bad for business!"))
144 (ifc green-tower-conv
145 (method 'band doris-band)
146 (method 'hail doris-hail)
147 (method 'bye doris-bye)
148 (method 'default doris-default)
149 (method 'name doris-name)
150 (method 'room doris-trade)
151 (method 'defa doris-default)
152 (method 'job doris-trade)
153 (method 'join doris-join)
154 (method 'dori doris-doris)
155 (method 'buy doris-trade)
156 (method 'innk doris-trade)
157 (method 'whit doris-lodge)
158 (method 'stag doris-lodge)
159 (method 'lodg doris-lodge)
160 (method 'dadd doris-daddy)
161 (method 'loca doris-local)
162 (method 'wood doris-woodsman)
163 (method 'trav doris-travelers)
164 (method 'gen doris-gen)
165 (method 'deri doris-deric)
166 (method 'shro doris-shroom)
167 (method 'abe doris-abe)
168 (method 'abig doris-abigail)
169 (method 'orph doris-orphaned)
170 (method 'gobl doris-goblins)
171 (method 'thie doris-thie)
174 ;;----------------------------------------------------------------------------
175 ;; First-time constructor
176 ;;----------------------------------------------------------------------------
177 (define (mk-doris tag)
179 (kern-mk-char tag ; tag
183 s_townswoman ; sprite
184 faction-men ; starting alignment
188 max-health -1 max-health 0 2 ; hp/xp/mp/AP_per_turn/lvl
192 'townsman-ai ; special ai
194 (list t_dagger) ; readied