OSDN Git Service

Nazghul-0.7.1
[nazghul-jp/nazghul-jp.git] / worlds / haxima-1.002 / abe.scm
1 ;;----------------------------------------------------------------------------
2 ;; Constants
3 ;;----------------------------------------------------------------------------
4 (define abe-lvl 3)
5 (define abe-species sp_human)
6 (define abe-occ nil)
7
8 ;;----------------------------------------------------------------------------
9 ;; Schedule
10 ;; 
11 ;; In Green Tower
12 ;;----------------------------------------------------------------------------
13 (define abe-bed gt-abe-bed)
14 (define abe-mealplace gt-ws-tbl2)
15 (define abe-workplace gt-ruins)
16 (define abe-leisureplace gt-ws-hall)
17 (kern-mk-sched 'sch_abe
18                (list 0  0 abe-bed          "sleeping")
19                (list 7  0 abe-mealplace    "eating")
20                (list 8  0 abe-workplace    "working")
21                (list 12 0 abe-mealplace    "eating")
22                (list 13 0 abe-workplace    "working")
23                (list 18 0 abe-mealplace    "eating")
24                (list 19 0 abe-leisureplace "idle")
25                (list 22 0 abe-bed          "sleeping")
26                )
27
28 ;;----------------------------------------------------------------------------
29 ;; Gob
30 ;;----------------------------------------------------------------------------
31 (define (abe-mk) (list #f))
32 (define (abe-met? gob) (car gob))
33 (define (abe-met! gob) (set-car! gob #t))
34
35 ;;----------------------------------------------------------------------------
36 ;; Conv
37 ;; 
38 ;; Abe is a scholar who knows much of the runes.
39 ;; He fled from Absalot with the Alchemist, and now lives in Green Tower.
40 ;;----------------------------------------------------------------------------
41
42 ;; Basics...
43 (define (abe-hail knpc kpc)
44   (kern-print "You meet a young, bookish-looking fellow.\n")
45   (if (abe-met? (gob knpc))
46       (say knpc "Hello again.")
47       (begin
48         (abe-met! (gob knpc))
49         (say knpc "Hello. Say, aren't you a Wanderer?")
50         (if (yes? kpc)
51             (say knpc "I am most honored! I can't believe my good fortune. "
52                  "I have so many questions for you. When you get the time. "
53                  "If you don't mind.")
54             (say knpc "Oh, of course not. Sorry. I just thought... never mind.")))))
55
56 (define (abe-default knpc kpc)
57   (say knpc "I'll look that up in the archives when I get a chance."))
58
59 (define (abe-name knpc kpc)
60   (say knpc "Oh. Yes. I'm Abe."))
61
62 (define (abe-join knpc kpc)
63   (say knpc "Oh, no, I couldn't possibly... I'm not really that sort of person."))
64
65 (define (abe-job knpc kpc)
66   (say knpc "I'm a scholar. I'm studying the ruins here in Green Tower. Have you examined them?")
67   (if (no? kpc)
68       (say knpc "They're in the southwest corner of town. Fascinating.")
69       (begin
70         (say knpc "Did you know there are more below the surface?")
71         (yes? kpc)
72         (say knpc "Yes, just like Absalot!"))))
73
74 (define (abe-absa knpc kpc)
75   (say knpc "Not many know that beneath Absalot is an older city. "
76        "The ruins beneath Absalot are very similar to the ruins here in Green Tower. "
77        "I am certain they were built by the same civilization!"))
78
79 (define (abe-rune knpc kpc)
80   (if (any-in-inventory? kpc rune-types)
81       (begin
82          (say knpc "\n[He whistles softly]\n"
83              "You have some of the Eight Keys to the Demon Gate?\n"
84              "I shall examine them for you!")
85                 (quest-data-update 'questentry-runeinfo 'abe 1)
86          (quest-data-update-with 'questentry-runeinfo 'keys 1 (quest-notify (grant-party-xp-fn 20)))
87         (if (any-in-inventory? kpc (list t_rune_k))
88             (say knpc "[He examines a rune] This is the Rune of Knowledge!")
89             )
90         (if (any-in-inventory? kpc (list t_rune_p))
91             (say knpc "[He examines a rune] This is the Rune of Power!")
92             )
93         (if (any-in-inventory? kpc (list t_rune_s))
94             (say knpc "[He examines a rune] This is the Rune of Skill!")
95             )
96         (if (any-in-inventory? kpc (list t_rune_c))
97             (say knpc "[He examines a rune] This is the Rune of Curiousity!")
98             )
99         (if (any-in-inventory? kpc (list t_rune_f))
100             (say knpc "[He examines a rune] This is the Rune of Freedom!")
101             )
102         (if (any-in-inventory? kpc (list t_rune_w))
103             (say knpc "[He examines a rune] This is the Rune of Wisdom!")
104             )
105         (if (any-in-inventory? kpc (list t_rune_d))
106             (say knpc "[He examines a rune] This is the Rune of Discretion!")
107             )
108         (if (any-in-inventory? kpc (list t_rune_l))
109             (say knpc "[He examines a rune] This is the Rune of Leadership!")
110             )
111         (if (has-all-runes? kpc) 
112             (say knpc "This is incredible!\n"
113                  "You have all of the Eight Keys to the Demon Gate!!!\n"
114                  "What do you intend to do with them?")
115             )
116         )
117       (say knpc "There are many runes. Perhaps if you brought me an example...?")))
118
119 (define (abe-demo knpc kpc)
120   (say knpc "The Demon Gate was sealed shut by the Wise long ago. "
121        "Its location was blotted from all records, but legend puts it somewhere to the north. ")
122                 (quest-data-update 'questentry-runeinfo 'abe 1)
123              (quest-data-update 'questentry-runeinfo 'keys 1)
124                 (quest-data-update-with 'questentry-runeinfo 'gate 1 (quest-notify (grant-party-xp-fn 30)))
125        )
126
127 (define (abe-keys knpc kpc)
128   (say knpc "Yes, the Demon Gate was locked with eight locks and the keys separated. "
129        "Each takes the form of a powerful rune. "
130        "They've been lost or hidden since then."))
131        
132 (define (abe-eigh knpc kpc)
133         (say knpc "Legend says that there are eight runes in all, are you seeking the others?")
134         (if (yes? kpc)
135                 (say knpc "The old stories speak of some, such as King Clovis' charm, or the void temple.")
136                 (say knpc "Just idle curiosity? Believe me, I understand.")))
137
138 (define (abe-clov knpc kpc)
139      (say knpc "There's a legend that King Clovis carried one as a charm. "
140            "He fell in battle during the goblin wars, but it was never found on his body. "
141            "Perhaps someone (perhaps a ^c+mgoblin^c-!) looted his corpse and took it.")
142            (quest-data-assign-once 'questentry-rune-f)
143            )
144            
145 (define (abe-temp knpc kpc)
146         (say knpc "Northwest of Oparine, there is a temple floating in the void. No one can reach it,"
147                         " but legends say that a rune was sealed up there by the ancients.")
148                         (quest-data-assign-once 'questentry-rune-d)
149                         )
150       
151 (define (abe-void knpc kpc)
152   (say knpc "The Shard, the moons and the stars all habitate a great void. "
153        "The ancients could sail across the void in ships, the way we sail across a sea!")
154        (quest-data-update 'questentry-whereami 'shard 2)
155        )
156
157 (define (abe-ship knpc kpc)
158   (say knpc "I know of the void ships, but not how they worked. "
159        "Even the Master Wrights have lost the technique for making them."
160        (quest-data-update 'questentry-whereami 'shard 2)
161        ))
162
163 (define (abe-wrig knpc kpc)
164   (say knpc "Wrights specialize in the making of things. "
165        "The Engineer is the greatest living Wright."))
166
167 (define (abe-quee knpc kpc)
168   (say knpc "I'm not sure what you're insinuating."))
169
170 (define (abe-civi knpc kpc)
171   (say knpc "I don't know much about the civilization that built the ruins, but clues indicate it was quite wicked by our standards! Do you know what I mean?")
172   (if (yes? kpc)
173       (say knpc "Then I won't mention it!")
174       (say knpc "Human sacrifice, cannibalism, demon worship. Accursed practices!")))
175
176 (define (abe-accu knpc kpc)
177   (say knpc "Yes, the Accursed have a long history. They may be a convenient political bogeyman, "
178        "but there is enough evidence to suggest they do, or did, exist."))
179
180 (define (abe-bye knpc kpc)
181   (say knpc "Let me know if you find any more ruins!"))
182
183 (define (abe-alch knpc kpc)
184   (say knpc "Ah, how is the secretive old rascal? I haven't seen him since we were neighbors."))
185
186 (define (abe-neig knpc kpc)
187   (say knpc "In Absalot. Before we had to flee."))
188
189 (define (abe-flee knpc kpc)
190   (say knpc "[He sighs] It's a long story. Ask around. It doesn't matter anymore."))
191
192 (define (abe-gobl knpc kpc)
193   (say knpc "Ask Deric or Gen about goblins, they have a lot of experience with them."))
194
195 (define abe-conv
196   (ifc green-tower-conv
197
198        ;; basics
199        (method 'default abe-default)
200        (method 'hail abe-hail)
201        (method 'bye abe-bye)
202        (method 'job abe-job)
203        (method 'name abe-name)
204        (method 'join abe-join)
205        
206
207        (method 'absa abe-absa)
208        (method 'rune abe-rune)
209        (method 'demo abe-demo)
210        (method 'gate abe-demo)
211        (method 'keys abe-keys)
212        (method 'key  abe-keys)
213        (method 'eigh abe-eigh)
214        (method 'quee abe-quee)
215        (method 'king abe-clov)
216        (method 'clov abe-clov)
217        (method 'char abe-clov)
218        (method 'temp abe-temp)
219        (method 'civi abe-civi)
220        (method 'accu abe-accu)
221        (method 'bye  abe-bye)
222        (method 'ruin abe-job)
223
224        (method 'void abe-void)
225        (method 'ship abe-ship)
226        (method 'sail abe-ship)
227        (method 'wrig abe-wrig)
228        (method 'alch abe-alch)
229        (method 'neig abe-neig)
230        (method 'flee abe-flee)
231        (method 'gobl abe-gobl)
232        ))
233
234 (define (mk-abe)
235   (bind 
236    (kern-mk-char 
237     'ch_abe           ; tag
238     "Abe"             ; name
239     abe-species         ; species
240     abe-occ              ; occ
241     s_companion_wizard ; sprite
242     faction-men      ; starting alignment
243     2 1 1            ; str/int/dex
244     0 0              ; hp mod/mult
245     0 0              ; mp mod/mult
246     max-health ; hp
247     -1                   ; xp
248     max-health ; mp
249     0
250     abe-lvl
251     #f               ; dead
252     'abe-conv         ; conv
253     sch_abe           ; sched
254     'townsman-ai              ; special ai
255     nil              ; container
256     (list t_staff
257                                                  t_armor_leather
258                                                  )              ; readied
259     )
260    (abe-mk)))