OSDN Git Service

Nazghul-0.7.1
[nazghul-jp/nazghul-jp.git] / worlds / haxima-1.002 / special.scm
1 ;;----------------------------------------------------------------------------
2 ;; Special -- one-off stuff that needs to be kern-loaded and doesn't really fit
3 ;; anywhere else.
4 ;;----------------------------------------------------------------------------
5
6 (kern-mk-sprite-set 'ss_special 32 32 3 3 0 0 "special.png")
7
8 (kern-mk-sprite 's_gold_skull ss_special 1 0 #f 0)
9 (kern-mk-sprite 's_power_core ss_special 1 1 #f 0)
10
11 ;;----------------------------------------------------------------------------
12 ;; Bandit-Hideout generator -- 
13 ;; procedure invoked by a step trigger to place the bandit hideout on the world map.
14 ;; Should return true iff it triggers to remove the step generator that invokes it.
15 ;;----------------------------------------------------------------------------
16 (define bandit-hideout-loc (list 'p_shard 72 63))
17 (define (mk-bandit-hideout kbeing)
18   (if (eqv? kbeing 
19             (kern-get-player))
20       (begin
21         (kern-log-msg "You stumble upon a hidden forest glade.\nKnavish figures skulk about with drawn blades!")
22         (kern-place-set-subplace p_bandit_hideout_l1
23                                  (eval-loc bandit-hideout-loc))
24         (kern-map-set-dirty)
25         #t)
26       #f))
27
28
29 ;;----------------------------------------------------------------------------
30 ;; Angriss Lair generator -- procedure invoked by a step trigger to create
31 ;; Angriss's Lair. Should return true iff it triggers to remove the step
32 ;; generator that invokes it.
33 ;;----------------------------------------------------------------------------
34 (define angriss-lair-loc (list 'p_shard 88 69))
35 (define (mk-angriss-lair kbeing)
36   (if (eqv? kbeing 
37             (kern-get-player))
38       (begin
39         (kern-log-msg "The forest grows wild...\nThe trees here are choked with webbing, and horrid wrapped HUSKS dangle.\nYou have found the entrance to Angriss's Lair!")
40         (kern-place-set-subplace p_angriss_lair 
41                                  (eval-loc angriss-lair-loc))
42         (kern-map-set-dirty)
43         #t)
44       #f))
45
46
47 ;;----------------------------------------------------------------------------
48 ;; Mans-Hideout generator -- 
49 ;; procedure invoked by a step trigger to place the MAN's hideout on the world map.
50 ;; Should return true iff it triggers to remove the step generator that invokes it.
51 ;;----------------------------------------------------------------------------
52 (define the-mans-hideout-loc (list 'p_shard 92 10))
53 (define (mk-mans-hideout kbeing)
54   (if (eqv? kbeing 
55             (kern-get-player))
56       (begin
57         (kern-log-msg "You find a hidden entrance to a secure, undisclosed location!")
58         (kern-place-set-subplace p_mans_hideout
59                                  (eval-loc the-mans-hideout-loc))
60         (kern-map-set-dirty)
61         #t)
62       #f))
63
64
65 ;;----------------------------------------------------------------------------
66 ;; Brundegardt generator -- 
67 ;; procedure invoked by a step trigger to place Brundegardt on the world map.
68 ;; Should return true iff it triggers to remove the step generator that invokes it.
69 ;;----------------------------------------------------------------------------
70 (define brundegardt-loc (list 'p_shard 76 40))
71 (define (mk-brundegardt kbeing)
72   (if (eqv? kbeing 
73             (kern-get-player))
74       (begin
75         (kern-log-msg "Through a hidden track, you find a strange forested nook in the mountainside!")
76         (kern-place-set-subplace p_brundegardt
77                                  (eval-loc brundegardt-loc))
78         (kern-map-set-dirty)
79         #t)
80       #f))
81
82
83 ;; ----------------------------------------------------------------------------
84 ;; The Warritrix's note
85 ;; ----------------------------------------------------------------------------
86 (mk-reusable-item 
87  't_warritrix_orders "Military Orders" s_lexicon norm
88  (lambda (klexicon kuser)
89    (kern-ui-page-text
90    "Orders to the Warritrix"
91    "Ever faithful servant of Glasdrin,"
92    "we suspect a coven of the Accursed are hiding"
93    "in the deeps of the Lost Halls. Proceed at"
94    "once to investigate. Leave no cavern"
95    "unexplored.\n"
96    "--Commander Jeffries\n"
97    "P.S. These orders are to be destroyed."
98    )))
99
100
101 ;; Kraken lakes kraken trigger
102 (define (spawn-kraken-lakes-sea-serpent kbeing)
103   (kern-log-msg "Your disturb something in the water...")
104   (kern-obj-put-at (spawn-npc 'kraken 8) (mk-loc p_deepness 31 34))
105   (kern-obj-put-at (spawn-npc 'kraken 8) (mk-loc p_deepness 32 35))
106   (kern-obj-put-at (spawn-npc 'kraken 8) (mk-loc p_deepness 30 29))
107   #t)
108
109 ;; Locations referred to more than once
110 (define lost-halls-loc (list 'p_shard 39 75))
111
112 ;; Power core for voidship
113 (mk-quest-obj-type 't_power_core "ancient power core" s_power_core layer-item obj-ifc)
114
115 ;; Luximene begins the game as a Lich King, when defeated he drops his skull,
116 ;; which can be used with the Necromancer to summon his shade.
117 (mk-quest-obj-type 't_lich_skull "King Luximenes skull" s_gold_skull layer-item obj-ifc)
118
119 ;; grow -- trigger hook fx to create items (eg, growing reagents, hence the name)
120 (define (grow-trig ktrig ktype-tag dice)
121   (println "grow-trig")
122   (println "  ktrig=" ktrig)
123   (println "  ktype-tag=" ktype-tag)
124   (println "  dice=" dice)
125   (kern-obj-put-at (kern-mk-obj (eval ktype-tag) (kern-dice-roll 
126                                        dice))
127                    (kern-obj-get-location ktrig)))