OSDN Git Service

151c5856533a49a572fa9548decd4bb0f9828b20
[nazghul-jp/nazghul-jp.git] / worlds / haxima-1.002 / jorn.scm
1 ;;----------------------------------------------------------------------------
2 ;; Constants
3 ;;----------------------------------------------------------------------------
4 (define jorn-lvl 5)
5 (define jorn-species sp_human)
6 (define jorn-occ oc_wrogue)
7
8 ;;----------------------------------------------------------------------------
9 ;; Schedule
10 ;; 
11 ;; In Green Tower.
12 ;;----------------------------------------------------------------------------
13 (define jorn-bed gt-jorn-bed)
14 (define jorn-mealplace gt-ws-tbl1)
15 (define jorn-workplace gt-jorn-hut)
16 (define jorn-leisureplace gt-ws-hall)
17 (kern-mk-sched 'sch_jorn
18                (list 0  0 jorn-bed          "sleeping")
19                (list 11 0 jorn-mealplace    "eating")
20                (list 12 0 jorn-workplace    "working")
21                (list 18 0 jorn-mealplace    "eating")
22                (list 19 0 jorn-leisureplace "idle")
23                (list 24 0 jorn-workplace    "working")               
24                )
25
26 ;;----------------------------------------------------------------------------
27 ;; Gob
28 ;;----------------------------------------------------------------------------
29 (define (jorn-mk) nil)
30
31 (define (jorn-on-death knpc)
32         (kern-obj-put-at (kern-mk-obj t_skull_ring_j 1) (kern-obj-get-location knpc))
33         )
34
35 ;;----------------------------------------------------------------------------
36 ;; Conv
37 ;; 
38 ;; Jorn is a bravo and former pirate, currently living in Green Tower.
39 ;; He was once a member of the crew of the Merciful Death, 
40 ;; and is sought for vengeance by the ghost Ghertie.
41 ;;----------------------------------------------------------------------------
42
43 ;; Basics...
44 (define (jorn-hail knpc kpc)
45   (say knpc "[You meet a rough-looking, surly man] What do you want?"))
46
47 (define (jorn-default knpc kpc)
48   (say knpc "Go bother someone else."))
49
50 (define (jorn-name knpc kpc)
51   (say knpc "I'm Jorn. Heard of me?")
52    (quest-data-update 'questentry-ghertie 'jorn-loc 1)
53   (if (yes? kpc)
54       (say knpc "Good, then you've been warned.")
55       (say knpc "Too bad. Don't make me make an example out of you.")))
56
57 (define (jorn-join knpc kpc)
58   (say knpc "[He laughs coarsely]"))
59
60 (define (jorn-job knpc kpc)
61   (say knpc "None of your business."))
62
63 (define (jorn-bye knpc kpc)
64   (say knpc "[He ignores your departure]"))
65
66
67 ;; Town & Townspeople
68
69 ;; Quest-related
70 (define (jorn-pira knpc kpc)
71   (say knpc "You're starting to get on my nerves."))
72
73 (define (jorn-ring knpc kpc)
74       (quest-data-update 'questentry-ghertie 'jorn-loc 1)
75         (say knpc "[He gives you a cold look] What of it? Do you want it?")
76         (if (no? kpc)
77             (say knpc "Then quit staring at it.")
78             (begin
79               (say knpc "Well, you're going to have to cut it off my finger "
80                    "to get it. What do you think of that? Are you ready to "
81                    "try and cut it off my finger?")
82               (if (no? kpc)
83                   (say knpc "[He sneers] I didn't think so.")
84                   (begin
85                     (say knpc "[With a roar, too fast for you to see, "
86                          "he draws his sword and thrusts at you in the same "
87                          "motion!]")
88                     (kern-being-set-base-faction knpc faction-outlaw)
89                     (kern-conv-end))))))
90
91 (define jorn-conv
92   (ifc basic-conv
93
94        ;; basics
95        (method 'default jorn-default)
96        (method 'hail jorn-hail)
97        (method 'bye  jorn-bye)
98        (method 'job  jorn-job)
99        (method 'name jorn-name)
100        (method 'join jorn-join)
101        
102        ;; other responses
103        (method 'pira jorn-pira)
104        (method 'gher jorn-pira)
105        (method 'merc jorn-pira)
106        (method 'ring jorn-ring)
107
108        ))
109
110 (define (mk-jorn)
111         (let ((knpc
112                 (kern-mk-char 
113                         'ch_jorn           ; tag
114                         "Jorn"             ; name
115                         jorn-species     ; species
116                         jorn-occ         ; occ
117                         s_brigand        ; sprite
118                         faction-men      ; starting alignment
119                         2 0 1            ; str/int/dex
120                         0 0              ; hp mod/mult
121                         0 0              ; mp mod/mult
122                         max-health ; hp
123                         -1                ; xp
124                         max-health ; mp
125                         0
126                         jorn-lvl
127                         #f               ; dead
128                         'jorn-conv       ; conv
129                         sch_jorn           ; sched
130                         'spell-sword-ai  ; special ai
131
132                         ;; container
133                         (mk-inventory (list
134                                 (list 1 t_sword_2)
135                                 (list 1 t_dagger_4)
136                                 (list 1 t_armor_leather_2)
137                                 (list 1 t_leather_helm_2)
138                                 (list 67 t_gold_coins)
139                                 (list 3 t_picklock)
140                                 (list 3 t_heal_potion)
141                         ))
142                         nil              ; readied
143                 )))
144                 (bind knpc  (jorn-mk))
145                 (kern-char-force-drop knpc #t)
146                 (kern-char-arm-self knpc)
147                 (kern-obj-add-effect knpc 
148                         ef_generic_death
149                         'jorn-on-death)
150                 knpc
151         ))