OSDN Git Service

d4cd76cc288fe2023b0d8e63b944b841d2ba4275
[nazghul-jp/nazghul-jp.git] / worlds / haxima-1.002 / gamestart.scm
1 (kern-load "gamestart-mech.scm")
2 (kern-load "gamestart-statues.scm")
3
4 (kern-mk-place 'p_char_setup "the Path"
5   s_shrine ;; sprite
6   (kern-mk-map 'm_char_setup 19 19 pal_expanded
7         (list
8           "xx xx xx xx xx xx x! xx xx xx xx xx x! xx xx xx xx xx xx "
9           "x! @@ @@ .C .H .O .O .S .E @@ @@ @@ .Y .O .U .R @@ @@ x! "
10           "xx @@ @@ @@ @@ @@ @@ .P .A .T .H @@ @@ @@ @@ @@ @@ @@ xx "
11           "xx ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, xx "
12           "xx ,, ,, ,, ,, ++ ,, ,, ,, ,, ,, ,, ,, ++ ,, ,, ,, ,, xx "
13           "xx ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, xx "
14           "xx ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, xx "
15           "xx ,, ,, ,, ,, ,, ,, ,, cx cx cx ,, ,, ,, ,, ,, ,, ,, xx "
16           "xx ,, ,, ,, ,, ,, ,, ,, cx cx cx ,, ,, ,, ,, ,, ,, ,, xx "
17           "xx ,, ,, cx cx cx ,, ,, cx cx cx ,, ,, cx cx cx ,, ,, xx "
18           "xx ,, ,, cx cx cx ,, ,, ,, ,, ,, ,, ,, cx cx cx ,, ,, xx "
19           "xx ,, ,, cx cx cx ,, ,, ,, ,, ,, ,, ,, cx cx cx ,, ,, xx "
20           "xx ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, xx "
21           "xx ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, xx "
22           "xx ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, xx "
23           "xx ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, xx "
24           "x! ,, ,, +s ,, ,, ,, ,, pp cc pp ,, ,, ,, ,, +s ,, ,, x! "
25           "xx ,, ,, ,, ,, ,, ,, pp ,, cc ,, pp ,, ,, ,, ,, ,, ,, xx "
26           "xx xx xx xx xx xx x! xx xx xx xx xx x! xx xx xx xx xx xx "
27         )
28         )
29
30   #f #t #f #f
31   ;; subplaces
32   nil
33   ;; neighbors
34   nil
35   
36  ;; *** contents of the place ***
37   (list
38    (put (mk-step-trig 'get-player-name nil) 9 16)
39    (put (kern-tag 'start-gate (mk-start-portal 'start-actual-game)) 9 4)
40    (put (kern-mk-obj F_illum_perm 1) 3 1)
41    (put (kern-mk-obj F_illum_perm 1) 15 1)
42    (put (kern-mk-obj F_illum_perm 1) 9 1)
43    (put (kern-mk-obj F_illum_perm 1) 10 4)
44    (put (kern-mk-obj F_illum_perm 1) 8 4)
45    )
46
47   nil ;; hooks
48   nil
49
50 )
51  
52 (define (obj-line objfactory yloc xloc xmax)
53         (kern-obj-put-at (objfactory xloc) (list p_char_setup xloc yloc))
54         (if (< xloc xmax)
55                 (obj-line objfactory yloc (+ xloc 1) xmax)
56         ))  
57  
58 ;; Note: start-gate must be a tag to survive saving/reloading.
59 (set-roomdata p_char_setup (list 6 6 6 'start-gate))
60
61 (obj-line (lambda (unused)
62         (mk-step-trig 'one-off-message "A portal beckons on the far side of the room" "intromes"))
63         15 8 10)
64         
65 (obj-line (lambda (unused)
66         (mk-step-trig 'gamestart-light-lamps nil "lamps"))
67         14 7 11)
68         
69 (kern-obj-put-at (mk-step-trig 'gamestart-light-lamps nil "lamps") (list p_char_setup 7 15))
70 (kern-obj-put-at (mk-step-trig 'gamestart-light-lamps nil "lamps") (list p_char_setup 11 15))
71 (kern-obj-put-at (mk-step-trig 'gamestart-light-lamps nil "lamps") (list p_char_setup 7 16))
72 (kern-obj-put-at (mk-step-trig 'gamestart-light-lamps nil "lamps") (list p_char_setup 11 16))
73
74 (define (mk-start-statue tag name sprite conv)
75   (let ((kchar (bind 
76                 (kern-mk-char 
77                  tag            ; tag
78                  name             ; name
79                  sp_statue         ; species
80                  nil              ; occ
81                  sprite     ; sprite
82                  faction-men      ; starting alignment
83                  0 0 0            ; str/int/dex
84                  999 0              ; hp mod/mult
85                  0 0              ; mp mod/mult
86                  max-health ; hp
87                  0                   ; xp
88                  max-health ; mp
89                  0
90                  9
91                  #f               ; dead
92                  conv         ; conv
93                  nil           ; sched
94                  'ankh-ai              ; special ai
95                  nil              ; container
96                  nil              ; readied
97                  )
98                 nil)))
99     (kern-char-set-known kchar #t)
100     ))
101
102 (kern-obj-put-at (mk-start-statue 'str_statue "Statue of Might" s_str_statue 'gs-str-conv) (list p_char_setup 4 10))
103 (kern-obj-put-at (mk-start-statue 'dex_statue "Statue of Agility" s_dex_statue 'gs-dex-conv) (list p_char_setup 9 8))
104 (kern-obj-put-at (mk-start-statue 'int_statue "Statue of Wisdom" s_int_statue 'gs-int-conv) (list p_char_setup 14 10))
105
106 (obj-line (lambda (unused)
107         (mk-step-trig 'gamestart-statue-speak 'str_statue "statspeak"))
108         10 1 6)
109 (obj-line (lambda (unused)
110         (mk-step-trig 'gamestart-statue-speak 'dex_statue "statspeak"))
111         9 6 12)
112 (obj-line (lambda (unused)
113         (mk-step-trig 'gamestart-statue-speak 'int_statue "statspeak"))
114         10 12 17)
115
116         
117 ;;(gamestart-field-circle F_fire_perm p_char_setup 4 10 4)
118 ;;(gamestart-field-circle F_acid_perm p_char_setup 9 8 4)
119 ;;(gamestart-field-circle F_energy_perm p_char_setup 14 10 4)
120