OSDN Git Service

9751a1647b82ad1d2c72e207d2e4c7dc0d2fb106
[nazghul-jp/nazghul-jp.git] / worlds / haxima-1.002 / hackle.scm
1 ;;----------------------------------------------------------------------------
2 ;; Schedule
3 ;;
4 ;; In Bole.
5 ;;----------------------------------------------------------------------------
6 (kern-mk-sched 'sch_hackle
7                (list 0  0  bole-hackles-hut "idle")
8                (list 2  0  bole-bed-hackle "sleeping")
9                (list 10 0  bole-hackles-hut "idle")
10                (list 20 0  bole-hackles-yard "idle")
11                )
12
13 ;;----------------------------------------------------------------------------
14 ;; Gob
15 ;;
16 ;; Quest flags, etc, go here.
17 ;;----------------------------------------------------------------------------
18 (define (hackle-mk) nil)
19
20 ;;----------------------------------------------------------------------------
21 ;; Conv
22 ;;
23 ;; Hackle is a female hedge-witch dwelling in Bole.
24 ;; Her mind was shattered by some misadventure with Gazer(s),
25 ;; though she is still capable of serving as a healer.
26 ;;----------------------------------------------------------------------------
27 (define (hackle-trade knpc kpc)
28   (say knpc "She can heal it, or one of its friends. She requires a piece of "
29        "gold for each piece of life! Does it agree?")
30   (define (hackle-heal)
31     (say knpc "Which shall she heal?")
32     (let ((kchar (kern-ui-select-party-member)))
33       (if (null? kchar)
34           (say knpc "How else can she help it?")
35           (let* ((gold (kern-player-get-gold))
36                  (pts (- (kern-char-get-max-hp kchar)
37                          (kern-char-get-hp kchar))))
38             (if (= 0 gold)
39                 (say knpc "No gold, no life! It is the law of the world!")
40                 (begin
41                   (if (= 0 pts)
42                       (say knpc "It is well! She can do nothing for it!")
43                       (let ((n (min gold pts)))
44                         (say knpc "She heals it!")
45                         (kern-obj-heal kchar n)
46                         (kern-player-set-gold (- gold n))))
47                   (say knpc "Will it heal another?")
48                   (if (kern-conv-get-yes-no? kpc)
49                       (hackle-heal)
50                       (say knpc "Then something else it wants.")
51                       )))))))
52   (if (kern-conv-get-yes-no? kpc)
53       (hackle-heal)
54       (say knpc "Have it its way!")))
55                    
56               
57         
58
59 ;; basics...
60 (define (hackle-default knpc kpc)
61   (say knpc "She cannot help it with that."))
62
63 (define (hackle-hail knpc kpc)
64   (if (in-player-party? 'ch_mesmeme)
65       (begin
66         (say knpc "[She shrinks back in horror at the sight of Mesmeme] AHHH! It frightens her!")
67         (aside kpc 'ch_mesmeme "No frighten.")
68         )
69       (say knpc "[You meet a disheveled, middle-aged woman] It comes to her! "
70            "It wants something!")
71   ))
72
73 (define (hackle-name knpc kpc)
74   (say knpc "She is Hackle."))
75
76 (define (hackle-job knpc kpc)
77   (say knpc "She is mad! But she can heal it!"))
78
79 (define (hackle-join knpc kpc)
80   (say knpc "She cannot join it! She must mind her sheep!"))
81
82 (define (hackle-bye knpc kpc)
83   (say knpc "She bids it farewell, but knows it will return!"))
84
85
86 ;; other characters & town...
87 (define (hackle-may knpc kpc)
88   (say knpc "It is a hard woman, hard but kind to Hackle!"))
89
90 (define (hackle-kath knpc kpc)
91   (say knpc "A woman clothed in red! A fiend clothed in woman!"))
92
93 (define (hackle-bill knpc kpc)
94   (say knpc "It is careless. Yes, the wood gods will have it for supper one "
95        "day."))
96
97 (define (hackle-thud knpc kpc)
98   (say knpc "[She laughs, a surprising, golden sound] That is no toy! They "
99        "called for a servant, but summoned a demon!"))
100
101 (define (hackle-melv knpc kpc)
102   (say knpc "It is a good soul."))
103
104 (define (hackle-bole knpc kpc)
105   (say knpc "Not Bole! Hole! The keyhole to the deep! She knows it!"))
106
107 ;; misc...
108 (define (hackle-mesm knpc kpc)
109   (say knpc "It is only a child. Deaf and dumb it is, to its own kind. "
110        "But the pet will make a pet of its master.")
111   (aside kpc 'ch_mesmeme "No pet")
112   )
113
114 (define (hackle-shee knpc kpc)
115   (say knpc "The sheep hides in wolf's clothing! How it howls when it "
116        "bleats!"))
117
118 (define (hackle-wood knpc kpc)
119   (say knpc "She has seen them sleeping in the old oaks. She wakes them "
120        "not! They do not like us, they do not like anyone! The goblins "
121        "appease them but she does not know the words."))
122
123 (define (hackle-mad knpc kpc)
124   (say knpc "The gazers caught her as a girl! She escaped, but her mind did "
125        "not!"))
126
127 (define (hackle-gaze knpc kpc)
128   (say knpc "If it meets one, it should kill one without question! They know "
129        "the answer to any question, and in the answer lies bondage!")
130   (aside kpc 'ch_mesmeme "[Blinks nervously]")
131 )
132
133 ;; thief quest...
134 (define (hackle-thie knpc kpc)
135   (say knpc "It is a mighty wrogue indeed that robs a mighty wizard!"))
136
137 (define (hackle-robs knpc kpc)
138   (say knpc "It robs and runs, down its little mouse-hole!"))
139
140 (define (hackle-hole knpc kpc)
141   (say knpc "Does it like riddles?\n"
142        "  An 'o' has a hole!\n"
143        "  And hole has an 'o'!\n"
144        "  And a mouse has both!\n"
145        "  In the middle of the night\n"
146        "  Down it will go!\n"
147        "Does it know what ^c+mreveals^c-?")
148   (if (kern-conv-get-yes-no? kpc)
149       (say knpc "Then let it ^c+mreveal^c- and understand my riddle!")
150       (begin
151         (say knpc "Wis Quas! The Red Bitch has a scroll, but has not the "
152              "wisdom.")))
153   )
154
155 (define (hackle-reve knpc kpc)
156   (say knpc "The Bill-boy knows where the mouse disappeared! "
157        "Let it ^c+mreveal^c- there!"))
158
159 (define (hackle-midd knpc kpc)
160   (say knpc "Yes! The middle of the night!"))
161
162 (define hackle-conv
163   (ifc basic-conv
164        ;; default if the only "keyword" which may (indeed must!) be longer than
165        ;; 4 characters. The 4-char limit arises from the kernel's practice of
166        ;; truncating all player queries to the first four characters. Default,
167        ;; on the other hand, is a feature of the ifc mechanism (see ifc.scm).
168        (method 'default hackle-default)
169        (method 'hail hackle-hail)
170        (method 'bye  hackle-bye)
171        (method 'job  hackle-job)       
172        (method 'name hackle-name)
173        (method 'join hackle-join)
174
175        (method 'trad hackle-trade)
176        (method 'buy hackle-trade)
177        (method 'sell hackle-trade)
178        (method 'heal hackle-trade)
179
180        (method 'bill hackle-bill)
181        (method 'kath hackle-kath)
182        (method 'red  hackle-kath)
183        (method 'bitc hackle-kath)
184        (method 'may  hackle-may)
185        (method 'melv hackle-melv)
186        (method 'thud hackle-thud)
187        
188        (method 'bole hackle-bole)
189        (method 'gaze hackle-gaze)
190        (method 'god  hackle-wood)
191        (method 'gods hackle-wood)
192        (method 'hole hackle-hole)
193        (method 'mad  hackle-mad)
194        (method 'mesm hackle-mesm)
195        (method 'migh hackle-robs)
196        (method 'mous hackle-hole)
197        (method 'reve hackle-reve)
198        (method 'rob  hackle-robs)
199        (method 'robs hackle-robs)
200        (method 'wrog hackle-robs)
201        (method 'wiza hackle-robs)
202        (method 'shee hackle-shee)
203        (method 'thie hackle-thie)
204        (method 'wood hackle-wood)
205        (method 'midd hackle-midd)
206        (method 'nigh hackle-midd)
207        ))
208
209 ;;----------------------------------------------------------------------------
210 ;; First-time constructor
211 ;;----------------------------------------------------------------------------
212 (define (mk-hackle)
213   (bind 
214    (kern-mk-char 'ch_hackle          ; tag
215                  "Hackle"            ; name
216                  sp_human            ; species
217                  nil                 ; occ
218                  s_beggar             ; sprite
219                  faction-men         ; starting alignment
220                  0 0 1            ; str/int/dex
221                  0 0                 ; hp mod/mult
222                  0 0                 ; mp mod/mult
223                  max-health -1 max-health 0 6  ; hp/xp/mp/AP_per_turn/lvl
224                  #f                  ; dead
225                  'hackle-conv        ; conv
226                  sch_hackle          ; sched
227                  'townsman-ai                 ; special ai
228                  nil                 ; container
229                  nil                 ; readied
230                  )
231    (hackle-mk)))