source:
abuse/branches/lol/data/lisp/ladder.lsp
@
737
Last change on this file since 737 was 589, checked in by , 12 years ago | |
---|---|
File size: 1.3 KB |
Line | |
---|---|
1 | ;; Copyright 1995 Crack dot Com, All Rights reserved |
2 | ;; See licensing information for more details on usage rights |
3 | |
4 | ;; XXX: Mac Abuse reimplements this in C++ |
5 | (defun latter_check_area (first) |
6 | (if first |
7 | (progn |
8 | (if (and (<= (x) (with_object first (x))) |
9 | (<= (y) (with_object first (y))) |
10 | (>= (with_object (get_object 0) (x)) (with_object first (x))) |
11 | (>= (with_object (get_object 0) (y)) (with_object first (y)))) |
12 | (let ((yd (- (with_object first (y)) (y)))) |
13 | (if (eq (with_object first (state)) climbing) |
14 | (let ((newx (/ (+ (x) (with_object (get_object 0) (x))) 2))) |
15 | (with_object first (set_x newx)))) |
16 | (with_object first (setq in_climbing_area yd)))) |
17 | (latter_check_area (next_focus first))))) |
18 | |
19 | ;; XXX: Mac Abuse reimplements this in C++ |
20 | (defun latter_ai () |
21 | (if (> (total_objects) 0) |
22 | (latter_check_area (first_focus))) |
23 | T) |
24 | |
25 | (def_char LADDER |
26 | (funs (ai_fun latter_ai) |
27 | (draw_fun dev_draw)) |
28 | (range 50 800) |
29 | (states "art/misc.spe" (stopped "latter"))) |
30 | |
31 | (defun step_ai () |
32 | (if (or (eq (total_objects) 0) |
33 | (with_object (get_object 0) (not (eq (aistate) 0)))) |
34 | (set_state stopped) |
35 | (set_state running)) |
36 | T) |
37 | |
38 | (def_char STEP |
39 | (funs (ai_fun step_ai)) |
40 | (flags (can_block T)) |
41 | (states "art/chars/step.spe" |
42 | (stopped "step") |
43 | (running "step_gone"))) |
44 |
Note: See TracBrowser
for help on using the repository browser.