OSDN Git Service

8a167e5c7ce5b15c4aac166c0a1231c0fdcdab7e
[nazghul-jp/nazghul-jp.git] / worlds / haxima-1.002 / lia.scm
1 ;; Reagent-seller
2 ;;----------------------------------------------------------------------------
3 ;; Constants
4 ;;----------------------------------------------------------------------------
5
6 ;;----------------------------------------------------------------------------
7 ;; Schedule
8 ;; 
9 ;; In Oparine.
10 ;;----------------------------------------------------------------------------
11 (kern-mk-sched 'sch_lia
12                (list 0  0  sea-witch-bed        "sleeping")
13                (list 6  0  sea-witch-beach      "idle")
14                (list 8  0  sea-witch-counter    "working")
15                (list 20 0  sea-witch-beach      "idle")
16                )
17
18 ;;----------------------------------------------------------------------------
19 ;; Gob
20 ;;----------------------------------------------------------------------------
21 (define (lia-mk) nil)
22
23 ;;----------------------------------------------------------------------------
24 ;; Conv
25 ;; 
26 ;; Lia is a female wizard and reagent-seller who dwells in Oparine,
27 ;; so that she may remain in the proximity to her true love,
28 ;; the Nixie prince Fing.
29 ;; 
30 ;; She is said to be under a curse, of obscure nature.
31 ;; One likely interpretation is that she is only in human form through 
32 ;; having been transformed, being born a Nixie or some other water-folk.
33 ;;----------------------------------------------------------------------------
34
35 ;; Basics...
36 (define (lia-hail knpc kpc)
37   (say knpc "[You meet a haunting beauty] Welcome."))
38
39 (define (lia-default knpc kpc)
40   (say knpc "I cannot help you with that."))
41
42 (define (lia-name knpc kpc)
43   (say knpc "I am Lia."))
44
45 (define (lia-join knpc kpc)
46   (say knpc "I cannot leave these shores."))
47
48 (define (lia-job knpc kpc)
49   (say knpc "I sell reagents, including the rare black pearl."))
50
51 (define (lia-bye knpc kpc)
52   (say knpc "Goodbye, Wanderer."))
53
54 ;; Trade...
55 (define lia-merch-msgs
56   (list "My shop is open from 8:00AM to 8:00PM."
57         "Here are my wares."
58         "I will buy rare ingredients if they are a good value."
59         "Do you wish to buy or do you have something to sell?"
60         "A blessing on your magic."
61         "Very well."
62         "I will be happy to purchase more."
63         "I only offer what is fair."
64         "May the gods of the deep favour you."
65         "As you wish."
66    ))
67
68 (define lia-catalog
69   (list
70    (list sulphorous_ash         (*  2 reagent-price-mult) "This ash comes from the bed of dragons in the Fire Sea.")
71    (list garlic                 (*  4 reagent-price-mult) "Garlic is a common enough herb, but useful in spells.")
72    (list ginseng                (*  4 reagent-price-mult) "I grow this ginseng myself alongside mandrake.")
73    (list black_pearl            (*  4 reagent-price-mult) "These come from my own special source. You will find no others like them.")
74    (list blood_moss             (*  6 reagent-price-mult) "It is difficult to get blood moss here.")
75    (list nightshade             (* 11 reagent-price-mult) "The nightshade is rare in these parts.")
76    (list mandrake               (* 11 reagent-price-mult) "I grow mandrake with my ginseng.")
77    
78    (list t_in_an_scroll         (*  3 base-scroll-cost) "When faced with magic stronger than your own, use this to even the score.")
79    (list t_in_mani_corp_scroll  (*  8 base-scroll-cost) "You need not mourn a fallen companion when you carry one of these.")
80    (list t_vas_rel_por_scroll   (*  3 base-scroll-cost) "You can travel great distances or escape dire circumstances with this gate scroll.")
81    (list t_vas_mani_scroll      (*  2 base-scroll-cost) "When sorely wounded this will restore you to health.")
82    (list t_wis_quas_scroll      (*  2 base-scroll-cost) "This scroll will open your eyes to the invisible world.")
83    ))
84
85 (define (lia-trade knpc kpc)  (conv-trade knpc kpc "trade" lia-merch-msgs lia-catalog))
86 (define (lia-buy knpc kpc)  (conv-trade knpc kpc "buy" lia-merch-msgs lia-catalog))
87 (define (lia-sell knpc kpc)  (conv-trade knpc kpc "sell" lia-merch-msgs lia-catalog))
88
89 (define (lia-pear knpc kpc)
90   (say knpc "I have my own source for the rare black pearl. "
91        "Would you like to purchase some?")
92   (if (kern-conv-get-yes-no? kpc)
93       (lia-buy knpc kpc)
94       (say knpc "You won't get this quality anywhere else!")))
95
96 ;; Shores...
97 (define (lia-shor knpc kpc)
98   (say knpc "I must stay by the shore so I can be near my love."))
99
100 (define (lia-love knpc kpc)
101   (say knpc "My beloved cannot leave the sea, "
102        "he is a prince among the Sea People. "
103        "He is bold and true, and has not left me despite my curse."
104        ))
105
106 ;; Sea
107 (define (lia-sea knpc kpc)
108   (say knpc "How I long to return to my home! "
109        "I miss the courtyards of the deep, "
110        "and watching the ships cross my ceiling, "
111        "and hearing the conversations of Men as only a distant murmur."))
112
113 (define (lia-curs knpc kpc)
114   (say knpc "I'd prefer not to speak of it."))
115
116 ;; Townspeople...
117 (define (lia-opar knpc kpc)
118   (say knpc "All cities of Men are too dry for my liking."))
119
120 (define (lia-gher knpc kpc)
121   (say knpc "The scavengers of the sea used to follow her ship. "
122        "They were well-fed with her victims."))
123
124 (define (lia-alch knpc kpc)
125   (say knpc "He sometimes visits me, and we discuss magic. "
126        "I have few other friends among Men."))
127
128 (define (lia-osca knpc kpc)
129   (say knpc "I know little of him, except that he has never been to sea."))
130
131 (define (lia-henr knpc kpc)
132   (say knpc "He was a fine sailor once. The great ones of the deep sometimes "
133        "spoke of his courage."))
134
135 (define (lia-bart knpc kpc)
136   (say knpc "His ships are well-respected, but all ships are clumsy and "
137        "ponderous in my sight."))
138
139 (define lia-conv
140   (ifc basic-conv
141
142        ;; basics
143        (method 'default lia-default)
144        (method 'hail lia-hail)
145        (method 'bye  lia-bye)
146        (method 'job  lia-job)
147        (method 'name lia-name)
148        (method 'join lia-join)
149        
150        ;; Shores
151        (method 'shor lia-shor)
152        (method 'love lia-love)
153        (method 'sea  lia-sea)
154        (method 'deep lia-sea)
155        (method 'curs lia-curs)
156
157        ;; trade
158        (method 'trad lia-trade)
159        (method 'reag lia-buy)
160        (method 'buy  lia-buy)
161        (method 'sell lia-sell)
162        (method 'blac lia-buy)
163        (method 'pear lia-buy)
164
165        ;; town & people
166        (method 'opar lia-opar)
167        (method 'alch lia-alch)
168        (method 'gher lia-gher)
169        (method 'osca lia-osca)
170        (method 'henr lia-henr)
171        (method 'bart lia-bart)
172        (method 'fing lia-love)
173
174        ))
175
176 (define (mk-lia)
177   (bind 
178    (kern-mk-char 'ch_lia           ; tag
179                  "Lia"             ; name
180                  sp_human            ; species
181                  oc_wizard           ; occ
182                  s_townswoman        ; sprite
183                  faction-men         ; starting alignment
184                  0 2 1               ; str/int/dex
185                  0 0                 ; hp mod/mult
186                  0 0                 ; mp mod/mult
187                  max-health -1 max-health 0 3  ; hp/xp/mp/AP_per_turn/lvl
188                  #f                  ; dead
189                  'lia-conv         ; conv
190                  sch_lia           ; sched
191                  'townsman-ai                 ; special ai
192                  (mk-inventory (list (list 1 t_dagger)))    ; container
193                  nil                 ; readied
194                  )
195    (lia-mk)))