1 ;;----------------------------------------------------------------------------
3 ;;----------------------------------------------------------------------------
5 ;;----------------------------------------------------------------------------
9 ;;----------------------------------------------------------------------------
10 (kern-mk-sched 'sch_patch
11 (list 0 0 gdp-bed "sleeping")
12 (list 7 0 ghg-s1 "eating")
13 (list 8 0 gh-ward "working")
14 (list 11 0 ghg-s1 "eating")
15 (list 12 0 gh-ward "working")
16 (list 17 0 ghg-s1 "eating")
17 (list 18 0 gc-hall "idle")
18 (list 21 0 gdp-hut "idle")
19 (list 22 0 gdp-bed "sleeping")
22 ;;----------------------------------------------------------------------------
24 ;;----------------------------------------------------------------------------
25 (define (patch-mk) (list 'townsman))
27 ;;----------------------------------------------------------------------------
30 ;; An old wizard living in Glasdrin, who works as a healer.
31 ;; He wears an eyepatch, and is known as "Doc Patch".
32 ;;----------------------------------------------------------------------------
35 (define (patch-hail knpc kpc)
36 (say knpc "[You meet a sprightly old wizard with an eyepatch] "
39 (define (patch-default knpc kpc)
40 (say knpc "I can't help you with that."))
42 (define (patch-name knpc kpc)
43 (say knpc "People call me Doc Patch."))
45 (define (patch-join knpc kpc)
46 (say knpc "No, my duty is here, Wanderer."))
48 (define (patch-job knpc kpc)
49 (say knpc "I run the hospital. Do you need healing?")
50 (if (kern-conv-get-yes-no? kpc)
51 (patch-trade knpc kpc)
52 (say knpc "Well if you ever do, I can fix you up.")))
54 (define (patch-bye knpc kpc)
55 (say knpc "Keep well!"))
58 (define (patch-trade knpc kpc)
59 (if (trade-services knpc kpc
61 (svc-mk "Heal" 30 heal-service)
62 (svc-mk "Cure" 30 cure-service)
63 (svc-mk "Resurrect" 100 resurrect-service)))
65 (say knpc "What else can I do for you?")
66 (patch-trade knpc kpc))
68 (say knpc "Will there be anything else?")
69 (if (kern-conv-get-yes-no? kpc)
70 (patch-trade knpc kpc)
71 (say knpc "Very well.")))))
74 (define (patch-patc knpc kpc)
75 (say knpc "I lost my eye in Kurpolis. It's so dark there I didn't really "
76 "need it. [He winks. With his good eye.]"))
78 (define (patch-kurp knpc kpc)
79 (say knpc "The paladins keep an outpost in the dungeon, and "
80 "I did a tour of duty down there in my youth."))
82 (define (patch-tour knpc kpc)
83 (say knpc "All citizens of Glasdrin are required to serve a tour of duty. "
86 (define (patch-medi knpc kpc)
87 (say knpc "A medik is a mage that specializes in healing arts. Paladin "
88 "squads are all assigned a medik to support them in battle. "
89 "We get some basic combat training, but I only had to use my dagger "
92 (define (patch-dagg knpc kpc)
93 (say knpc "Yep, I carried that dagger for six months and finally got to use "
94 "it... peeling potatoes for kitchen duty."))
96 (define (patch-dung knpc kpc)
97 (say knpc "Monsters breed in the deeps, and it's better to stop them there "
98 "before they can get to the surface. Don't you agree?")
99 (if (kern-conv-get-yes-no? kpc)
100 (say knpc "You're damned tootin'! So the paladins keep a company there "
101 "to patrol the middle levels. If you ever find yourself in need "
102 "of help down there, seek them out. They'll have a medik.")
103 (say knpc "Harumph! I suppose you'd rather let them run amok over "
104 "the countryside!")))
106 (define (patch-doc knpc kpc)
107 (say knpc "I'm a medik. Are you in need of healing?")
108 (if (kern-conv-get-yes-no? kpc)
109 (patch-trade knpc kpc)
110 (say knpc "Ok. Come by the hospital if you ever need assistance. "
111 "I know how you adventurers get torn up in fights!")))
113 (define (patch-hosp knpc kpc)
114 (say knpc "Yep. The paladins of Glasdrin are always getting in scraps. "
115 "I get the odd adventurer and sick villager in, too."))
123 (method 'default patch-default)
124 (method 'hail patch-hail)
125 (method 'bye patch-bye)
126 (method 'job patch-job)
127 (method 'name patch-name)
128 (method 'join patch-join)
131 (method 'trad patch-trade)
132 (method 'heal patch-trade)
133 (method 'cure patch-trade)
134 (method 'resu patch-trade)
135 (method 'help patch-trade)
138 (method 'patc patch-patc)
139 (method 'kurp patch-kurp)
140 (method 'tour patch-tour)
141 (method 'medi patch-medi)
142 (method 'dagg patch-dagg)
143 (method 'dung patch-dung)
144 (method 'doc patch-doc)
145 (method 'hosp patch-hosp)
146 (method 'outp patch-dung)
154 (kern-mk-char 'ch_patch ; tag
158 s_companion_wizard ; sprite
159 faction-glasdrin ; starting alignment
163 max-health -1 max-health 0 6 ; hp/xp/mp/AP_per_turn/lvl
167 'townsman-ai ; special ai
168 (mk-inventory (list (list 1 t_staff))) ; container
169 (list t_dagger) ; readied