Changeset 582 for abuse/trunk
- Timestamp:
- May 6, 2011, 12:47:14 AM (12 years ago)
- Location:
- abuse/trunk
- Files:
-
- 144 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/data-abuse/abuse.lsp
r581 r582 10 10 (progn 11 11 (print "Please make sure you unzipped the game with the -d option") 12 (print "so that all directories get created properly.") 13 (print "example : pkunzip -d abusXXXX.zip") 12 (print "so that all directories get created properly.") 13 (print "example : pkunzip -d abusXXXX.zip") 14 14 (quit))) 15 15 (setq load_warn T) … … 18 18 (load "lisp/common.lsp") 19 19 (load "lisp/userfuns.lsp") 20 (load "lisp/options.lsp") 20 (load "lisp/options.lsp") 21 21 (load "lisp/startup.lsp") 22 22 (if (not (local_load "lisp/input.lsp")) ; get local copy first -
abuse/trunk/data-abuse/addon/deathmat/deathmat.lsp
r54 r582 6 6 (defun net_file (x) (concatenate 'string net_dir x)) 7 7 (load (net_file "dstartup.lsp")) 8 (load "lisp/options.lsp") 8 (load "lisp/options.lsp") 9 9 10 10 (load "lisp/input.lsp") -
abuse/trunk/data-abuse/addon/deathmat/dstartup.lsp
r566 r582 10 10 (load "config/cur_lev.lsp") 11 11 (set_first_level (nth current_net_level net_levels))) 12 12 13 13 ;; save the level we are so joining clients know which one to load 14 (open_file "config/cur_lev.lsp" "wb" 14 (open_file "config/cur_lev.lsp" "wb" 15 15 (print `(setq current_net_level ,current_net_level)))) 16 16 17 17 18 18 ;; this is a simple check to see if they player has an engine version … … 32 32 (progn 33 33 (print "\nPlease make sure you unzipped the game with the -d option") 34 (print "so that all directories get created properly.") 35 (print "example : pkunzip -d abusXXXX.zip") 34 (print "so that all directories get created properly.") 35 (print "example : pkunzip -d abusXXXX.zip") 36 36 (quit))) 37 37 (setq load_warn T) … … 52 52 (print (list 'setq 'server_version_major (major_version) )) 53 53 (print (list 'setq 'server_version_minor (minor_version))))) 54 54 55 55 56 56 (if (not (am_a_client)) … … 59 59 ;(let ((input (nice_input "DEATHMATCH : Enter your name below" "Name" username))) 60 60 ; (open_file "config/username.lsp" "wb" 61 ; (print (list 'setq 'username 61 ; (print (list 'setq 'username 62 62 ; (concatenate 'string '(#\") input '(#\")))))) 63 63 … … 82 82 (defun display_player (player text_x text_y) 83 83 (if player 84 (with_object player 85 (put_string (get_main_font) text_x text_y 86 (concatenate 'string (digstr (kills) 2) " " (player_name) 87 (if (local_player) 84 (with_object player 85 (put_string (get_main_font) text_x text_y 86 (concatenate 'string (digstr (kills) 2) " " (player_name) 87 (if (local_player) 88 88 " <<" 89 89 "")) -
abuse/trunk/data-abuse/addon/deathmat/large.lsp
r54 r582 1 (setq net_levels 1 (setq net_levels 2 2 '("netlevel/8play1.spe" 3 3 "netlevel/8play2.spe" -
abuse/trunk/data-abuse/addon/deathmat/medium.lsp
r54 r582 1 (setq net_levels 1 (setq net_levels 2 2 '( 3 3 "netlevel/4play1.spe" -
abuse/trunk/data-abuse/addon/deathmat/small.lsp
r54 r582 1 (setq net_levels 1 (setq net_levels 2 2 '("netlevel/2play1.spe" 3 3 "netlevel/2play2.spe" -
abuse/trunk/data-abuse/addon/example/example.lsp
r54 r582 11 11 ;;;; if you do not already have the directory c:\abuse\addon, make it now. 12 12 13 ;;;; If you created foretiles for abuse (using Satan Paint) you should 13 ;;;; If you created foretiles for abuse (using Satan Paint) you should 14 14 ;;;; start numbering them at 1200 because the last of the registered 15 15 ;;;; tiles end at 1100 something. Backtiles should start numbering at 350. … … 36 36 ;;;; ****************** CREATING PACKAGES ******************* 37 37 ;;;; to archive this package you should do the following 38 ;;;; DOS : 38 ;;;; DOS : 39 39 ;;;; cd c:\abuse\addon 40 40 ;;;; pkzip -rp example.zip example\*.* … … 57 57 58 58 ;;;; Now the meat of this package : 59 ;;;; Note that slashes should be FORWARD slashes even if 59 ;;;; Note that slashes should be FORWARD slashes even if 60 60 ;;;; you are using DOS 61 61 62 62 ;; load up some tiles I made. You can add more filenames 63 63 ;; if you wish, but they should all be loaded from 'your' dir. 64 (load_tiles "addon/example/example.spe") 64 (load_tiles "addon/example/example.spe") 65 65 66 66 ;; set the first level to the one I made 67 (set_first_level "addon/example/example.lvl") 67 (set_first_level "addon/example/example.lvl") 68 68 69 69 ;; load up the normal abuse startup file 70 (load "abuse.lsp") 70 (load "abuse.lsp") 71 71 72 72 -
abuse/trunk/data-abuse/lisp/ant.lsp
r54 r582 2 2 ;; See licensing information for more details on usage rights 3 3 4 (setq ant_tints (make-array 11 :initial-contents (list 4 (setq ant_tints (make-array 11 :initial-contents (list 5 5 (def_tint "art/tints/ant/green.spe") 6 (def_tint "art/tints/ant/blue.spe") 6 (def_tint "art/tints/ant/blue.spe") 7 7 (def_tint "art/tints/ant/brown.spe") 8 8 (def_tint "art/tints/ant/egg.spe") … … 16 16 ))) 17 17 18 /* 18 /* 19 19 ------ this code has been compiled -------- 20 20 (defun no_fall_move (xm ym but) … … 35 35 0) 36 36 ret)))) 37 38 37 38 39 39 (defun will_fall_if_jump () 40 40 nil) … … 60 60 61 61 (defun strait_rocket_ai () 62 (set_course (aistate) 62 (set_course (aistate) 63 63 (select difficulty 64 64 ('easy 12) … … 72 72 (progn 73 73 (if (not (eq stat nil)) 74 (progn 74 (progn 75 75 (add_object EXPLODE3 (+ (x) (random 5)) (+ (y) (random 5)) 0) 76 76 (add_object EXPLODE2 (+ (x) (random 5)) (+ (y) (random 5)) 2) … … 82 82 (with_object (add_object EG_EXPLO (x) (y)) (user_fun myself (car stat))))) 83 83 nil)))) 84 84 85 85 86 86 (def_char STRAIT_ROCKET … … 97 97 (if (or (blocked_left block_flags) (blocked_right block_flags)) 98 98 (set_state blocking)))) 99 99 100 100 (def_char EG_EXPLO 101 101 (funs (ai_fun animate_ai) … … 107 107 (blocking (seq "bilw" 1 4)))) 108 108 109 /* 109 /* 110 110 ------ this code has been compiled -------- 111 111 (defun alien_wait_time () 112 (select difficulty 112 (select difficulty 113 113 ('easy 6) 114 114 ('medium 4) … … 131 131 nil 132 132 T))) 133 134 133 134 135 135 (defun roof_above () (not (can_see (x) (y) (x) (- (y) 120) nil))) 136 136 … … 140 140 (playerx (+ (with_object (bg) (x)) (with_object (bg) (* (xvel) 8)))) 141 141 (playery (+ (- (with_object (bg) (y)) 15) (with_object (bg) (* (yvel) 2))))) 142 142 143 143 (if (and (can_see (x) (y) firex firey nil) (can_see firex firey playerx playery nil)) 144 144 (progn … … 152 152 (defun ant_dodge () 153 153 (if (eq need_to_dodge 1) 154 (progn 154 (progn 155 155 (setq need_to_dodge 0) 156 156 (if (eq (random 2) 1) … … 159 159 (go_state 6)) ;; jump at player 160 160 (if (roof_above) 161 (progn 162 (set_yvel -17) ;; jump up 161 (progn 162 (set_yvel -17) ;; jump up 163 163 (set_xvel 0) 164 164 (go_state 12)) … … 190 190 (set_aistate 16))) 191 191 192 (15 ;; hanging on the roof waiting for the main character 192 (15 ;; hanging on the roof waiting for the main character 193 193 (if (next_picture) T (set_state hanging)) 194 194 (if (if (eq (total_objects) 0);; no sensor, wait for guy 195 195 (and (< (distx) 130) (< (y) (with_object (bg) (y)))) 196 196 (not (eq (with_object (get_object 0) (aistate)) 0))) 197 (progn 197 (progn 198 198 (set_state fall_start) (set_direction (toward)) 199 199 (set_aistate 1)))) … … 204 204 (and (< (distx) 130) (< (y) (with_object (bg) (y)))) 205 205 (not (eq (with_object (get_object 0) (aistate)) 0))) 206 (progn 206 (progn 207 207 (set_state fall_start) (set_direction (toward)) 208 208 (set_aistate 1)))) … … 219 219 (9 ;; landing / turn around (gerneal finish animation state) 220 220 (if (next_picture) T 221 (if (try_move 0 2) 221 (if (try_move 0 2) 222 222 (progn 223 223 (set_gravity 1) 224 224 (set_aistate 1)) 225 (progn (set_state stopped) 225 (progn (set_state stopped) 226 226 (go_state 2))))) ;; running 227 227 … … 254 254 (set_state turn_around) 255 255 (set_aistate 9))))) 256 256 257 257 (4 ;; wait for pounce 258 258 (if (ant_dodge) T … … 266 266 (go_state 6)))))) 267 267 268 (6 ;; jump 268 (6 ;; jump 269 269 (setq need_to_dodge 0) 270 270 (if (blocked_down (move (direction) -1 0)) … … 273 273 274 274 (8 ;; fire at player 275 (if (ant_dodge) T 275 (if (ant_dodge) T 276 276 (if (eq (state) fire_wait) 277 277 (if (next_picture) … … 304 304 (13 ;; roof walking 305 305 (scream_check) 306 (if (or (and (< (y) (with_object (bg) (y))) 307 (< (distx) 10) (eq (random 8) 0)) 306 (if (or (and (< (y) (with_object (bg) (y))) 307 (< (distx) 10) (eq (random 8) 0)) 308 308 (eq need_to_dodge 1)) ;; shooting at us, fall down 309 309 (progn … … 321 321 (- 0 (get_ability run_top_speed))))) 322 322 (if (and (can_see (x) (- (y) 31) (+ (x) xspeed) (- (y) 31) nil) 323 (not (can_see (+ (x) xspeed) (- (y) 31) 323 (not (can_see (+ (x) xspeed) (- (y) 31) 324 324 (+ (x) xspeed) (- (y) 32) nil))) 325 325 (progn 326 326 (set_x (+ (x) xspeed)) 327 (if (not (next_picture)) 327 (if (not (next_picture)) 328 328 (set_state top_walk))) 329 329 (set_aistate 1))))))) 330 330 331 331 332 332 (14 ;; cieling shoot 333 333 (if (next_picture) … … 339 339 340 340 ))) 341 341 342 342 T) 343 */ 343 */ 344 344 345 345 … … 380 380 'electric_part 381 381 'normal_part) 382 382 383 383 (defun get_dead_part (from) 384 384 (if from … … 397 397 398 398 (if (and (not (eq (state) dead)) 399 (or (not from) 400 (with_object from (if (eq (total_objects) 0) 399 (or (not from) 400 (with_object from (if (eq (total_objects) 0) 401 401 (not (eq (otype) ANT_ROOF)) 402 402 (with_object (get_object 0) (not (eq (otype) ANT_ROOF))))))) … … 408 408 (damage_fun amount from hitx hity push_xvel push_yvel) 409 409 (play_sound APAIN_SND 127 (x) (y)) 410 (setq need_to_dodge 1) 410 (setq need_to_dodge 1) 411 411 (if (<= (hp) 0) 412 412 (progn … … 460 460 (range 250 20) 461 461 (draw_range 40 40) 462 (funs (ai_fun ant_ai) 462 (funs (ai_fun ant_ai) 463 463 (draw_fun ant_draw) 464 464 (constructor ant_cons) … … 475 475 (push_xrange 1) 476 476 (jump_top_speed 20)) 477 477 478 478 (flags (hurtable T) 479 479 (force_health T)) 480 480 481 (states "art/ant.spe" 481 (states "art/ant.spe" 482 482 (hanging (rep "ant" 2)) 483 483 484 484 (fall_start "affc0001.pcx") 485 485 (falling "affc0002.pcx") 486 486 487 487 (stopped "awlk0001.pcx") 488 488 (running (seq "awlk" 1 10)) … … 516 516 (states "art/ant.spe" (stopped "hidden"))) 517 517 518 518 519 519 520 520 … … 530 530 (let ((d (direction)) 531 531 (type (aitype))) 532 (if (or (eq create_total 0) (eq create_total 1)) 532 (if (or (eq create_total 0) (eq create_total 1)) 533 533 (set_current_frame 4) 534 534 (progn … … 547 547 (2 (next_picture)))) 548 548 T) 549 549 550 550 551 551 (defun crack_cons () … … 574 574 (bounce_move T T T '(progn (set_state dieing) (set_aistate 1)) T) 575 575 (or (< (state_time) 15) 576 (not (frame_panic)))) 576 (not (frame_panic)))) 577 577 (1 ;; hit the ground 578 578 nil) 579 579 )) 580 580 581 (setq ant_dead_parts (make-array (* 3 4) :initial-contents 581 (setq ant_dead_parts (make-array (* 3 4) :initial-contents 582 582 '((AD_1 "adbn") (AD_2 "adha") (AD_3 "adla") ; disapear 583 583 (AD_4 "adaf") (AD_5 "adah") (AD_6 "adlf") ; flaming … … 607 607 (do ((i 0 (setq i (+ i 1)))) 608 608 ((>= i 12) nil) 609 (setq (aref ant_dead_parts i) 609 (setq (aref ant_dead_parts i) 610 610 (make_dead_part (car (aref ant_dead_parts i)) 611 611 (car (cdr (aref ant_dead_parts i))) 4 "art/ant.spe" 'ant_draw))) -
abuse/trunk/data-abuse/lisp/chat.lsp
r54 r582 8 8 (player_name)))) 9 9 (if (search "/help" str) 10 (if (local_player) 10 (if (local_player) 11 11 (chat_print "Commands : /nick name, /help")) 12 12 (if (local_player) -
abuse/trunk/data-abuse/lisp/common.lsp
r54 r582 2 2 ;; See licensing information for more details on usage rights 3 3 4 ; draw function for characters only displayed during edit mode 4 ; draw function for characters only displayed during edit mode 5 5 ; such as start, etc. 6 6 ; (defun dev_draw () (if (edit_mode) (draw) nil)) -- compiled C function -- … … 11 11 (draw) 12 12 (set_y y))) 13 13 14 14 15 15 … … 38 38 nil) 39 39 T) 40 40 41 41 42 42 … … 44 44 (funs (ai_fun lhold_ai) 45 45 (draw_fun dev_draw)) 46 (states "art/misc.spe" 46 (states "art/misc.spe" 47 47 (stopped "lhold"))) 48 48 49 49 50 50 51 (def_char OBJ_MOVER 51 (def_char OBJ_MOVER 52 52 (funs (ai_fun mover_ai) 53 53 (constructor mover_cons) … … 58 58 (states "art/misc.spe" (stopped '("mover" "mover" )))) 59 59 60 /* Compiled C 60 /* Compiled C 61 61 (defun mover_ai () 62 62 (if (eq (total_objects) 2) 63 63 (let ((dest (get_object 0)) 64 64 (mover (get_object 1))) 65 (if (< (aistate) 2) ; transfer object to next mover 65 (if (< (aistate) 2) ; transfer object to next mover 66 66 (progn 67 (with_object dest 67 (with_object dest 68 68 (progn 69 69 (link_object mover) 70 70 (set_aistate (aitype)))) 71 71 (remove_object mover)) 72 (progn 72 (progn 73 73 (set_aistate (- (aistate) 1)) 74 74 (let ((newx (- (with_object dest (x)) (/ (* (- (with_object dest (x)) (x)) (aistate)) (aitype)))) 75 75 (newy (- (with_object dest (y)) (/ (* (- (with_object dest (y)) (y)) (aistate)) (aitype))))) 76 (with_object mover 77 (progn 76 (with_object mover 77 (progn 78 78 (platform_push (- newx (x)) (- newy (y))) 79 79 (set_x newx) … … 93 93 (let ((last (get_object (- x 1)))) ; see if the last object has the same position as us 94 94 (if (and (eq (with_object last (x)) (x)) (eq (with_object last (y)) (y))) 95 (if (eq (aistate) 1) 95 (if (eq (aistate) 1) 96 96 (if (eq (with_object last (fade_count)) 0) 97 97 (set_aistate 1) … … 110 110 111 111 112 (defun respwan_cons () (set_xvel 50)) 112 (defun respwan_cons () (set_xvel 50)) 113 113 114 114 115 (def_char RESPAWN 115 (def_char RESPAWN 116 116 (funs (ai_fun respawn_ai) 117 (draw_fun dev_draw) 117 (draw_fun dev_draw) 118 118 (constructor respwan_cons)) 119 119 ; (flags (unlistable T)) -
abuse/trunk/data-abuse/lisp/doors.lsp
r54 r582 2 2 ;; See licensing information for more details on usage rights 3 3 4 (defun general_door_ai (push?) 4 (defun general_door_ai (push?) 5 5 (select (aistate) 6 6 (0 (if (> (total_objects) 0) ; are we linked to a key? … … 16 16 nil))) 17 17 (1 (if (not (next_picture)) ; wait till open animation finishes 18 (progn 18 (progn 19 19 (set_state stopped) ; set opened animation 20 (go_state 2)))) 20 (go_state 2)))) 21 21 22 22 (2 (if (> (total_objects) 0) ; wait till level editor links us to a key 23 (progn 23 (progn 24 24 (set_state blocking) 25 25 (go_state 0)) … … 45 45 (1 ; opening 46 46 (if (next_picture) nil 47 (progn 47 (progn 48 48 (set_state blocking) 49 49 (set_aistate 2)))) … … 59 59 (set_aistate 0)))) 60 60 ) 61 61 62 62 63 63 T) … … 83 83 (bgy (with_object who (y)) (y))) 84 84 (if (and (>= bgy (y)) (<= bgy (+ end_y 20)) 85 (< (abs (- bgx (x))) xamount)) 85 (< (abs (- bgx (x))) xamount)) 86 86 (let ((amount (if (> bgx (x)) 87 87 (- xamount (- bgx (x))) … … 106 106 (ff_push (first_focus) 35))) 107 107 T) 108 108 109 109 110 110 (defun ff_draw () … … 126 126 (states "art/misc.spe" 127 127 (stopped "force_field"))) 128 128 129 129 130 130 (defun hwall_ai () 131 (if (or (eq (hp) 0) 131 (if (or (eq (hp) 0) 132 132 (and (eq (total_objects) 1) 133 133 (with_object (get_object 0) (not (eq (aistate) 0))))) … … 140 140 141 141 (defun big_wall_ai () 142 (if (or (eq (hp) 0) 142 (if (or (eq (hp) 0) 143 143 (and (eq (total_objects) 1) 144 144 (with_object (get_object 0) (not (eq (aistate) 0))))) … … 165 165 (set_hp 25))) 166 166 167 167 168 168 (defun make_hidden_wall_char (name start end ai) 169 169 (eval `(def_char ,name -
abuse/trunk/data-abuse/lisp/duong.lsp
r54 r582 1 1 ;; Copyright 1995 Crack dot Com, All Rights reserved 2 2 ;; See licensing information for more details on usage rights 3 3 4 4 5 5 (defun mine_ai () … … 89 89 (set_y oldy)) 90 90 nil))) 91 92 93 91 92 93 94 94 (def_char BOMB 95 95 (funs (ai_fun bomb_ai) … … 111 111 (states "art/chars/mine.spe" 112 112 (stopped '("abomb0001.pcx+" "abomb0002.pcx+")))) 113 113 114 114 115 115 … … 141 141 (0 ;; wait for switch to go off 142 142 (if (not (eq (with_object (get_object 0) (aistate)) 0)) 143 (progn 143 (progn 144 144 (set_state running) 145 145 (go_state 1)))) … … 149 149 (set_state blocking) 150 150 (set_aistate 2)))) 151 (2 ;; just stay here 151 (2 ;; just stay here 152 152 T))) 153 153 T) 154 154 155 155 156 156 (defun strap_door_ai () … … 201 201 (running (seq "lite" 1 9)) 202 202 (stopped "lite0001.pcx"))) 203 203 204 204 205 205 … … 245 245 (y (- (y) 16)) 246 246 (fade (if (< (current_frame) 16) (current_frame) 15))) 247 (with_object (get_object 1) 247 (with_object (get_object 1) 248 248 (progn 249 (set_x x) 250 (set_y y) 249 (set_x x) 250 (set_y y) 251 251 (user_fun SET_FADE_COUNT fade) 252 252 (setq is_teleporting 1) 253 253 ))) 254 254 255 255 (let ((x (with_object (get_object 0) (x))) 256 (y (with_object (get_object 0) (- (y) 16)))) 256 (y (with_object (get_object 0) (- (y) 16)))) 257 257 (with_object (get_object 1) 258 (progn 258 (progn 259 259 (set_x x) 260 260 (set_y y) … … 265 265 (set_aistate 0)))))) 266 266 T) 267 268 267 268 269 269 270 270 (def_char TELE2 … … 274 274 (stopped "close") 275 275 (running (seq "elec" 1 15)))) 276 276 277 277 278 278 (defun bolder_ai () … … 294 294 (progn 295 295 (next_picture) 296 (set_yvel (+ (yvel) 1)) 296 (set_yvel (+ (yvel) 1)) 297 297 (let ((old_yv (yvel)) 298 298 (old_xv (xvel)) … … 309 309 (set_y new_y)) 310 310 (hurt_radius (x) (y) 19 30 (me) 15) 311 (if (not (eq status T));; T means we did not hit anything 311 (if (not (eq status T));; T means we did not hit anything 312 312 (let ((block_flags (car status))) 313 313 (if (or (blocked_up block_flags) (blocked_down block_flags));; bounce up/down … … 325 325 T)) 326 326 T)) 327 327 328 328 329 329 (defun bolder_cons () … … 332 332 333 333 334 (defun bold_dam (amount from hitx hity push_xvel push_yvel) 334 (defun bold_dam (amount from hitx hity push_xvel push_yvel) 335 335 (add_object EXPLODE3 (+ (x) (- 10 (random 20))) (- (y) (random 30)) 0) 336 336 (damage_fun amount from hitx hity (/ push_xvel 10) (/ push_yvel 2))) … … 345 345 (range 200 200) 346 346 (abilities (start_hp 40)) 347 (fields ("xvel" ai_xvel) 347 (fields ("xvel" ai_xvel) 348 348 ("yvel" ai_yvel) 349 349 ("hp" ai_health) 350 350 ) 351 351 (states "art/bold.spe" 352 (stopped '("bold0001.pcx" "bold0001.pcx" "bold0001.pcx" 352 (stopped '("bold0001.pcx" "bold0001.pcx" "bold0001.pcx" 353 353 "bold0002.pcx" "bold0002.pcx" "bold0002.pcx" 354 354 "bold0003.pcx" "bold0003.pcx" "bold0003.pcx" … … 359 359 (old_xv (xvel)) 360 360 (status (float_tick))) 361 (if (not (eq status T)) ;; T means we did not hit anything 362 (let ((block_flags (car status))) 361 (if (not (eq status T)) ;; T means we did not hit anything 362 (let ((block_flags (car status))) 363 363 (if (blocked_up block_flags) ;; bounce up/down 364 364 (progn … … 386 386 (eval right_stub))))))) 387 387 (eval nothing_stub)))) 388 388 389 389 390 390 … … 392 392 (next_picture) 393 393 (set_yvel (+ (yvel) 1)) 394 (bounce_move T T T 395 '(progn (add_object EXPLODE1 (+ (x) (random 10)) (- (+ (random 5) (y)) 10) 0) 394 (bounce_move T T T 395 '(progn (add_object EXPLODE1 (+ (x) (random 10)) (- (+ (random 5) (y)) 10) 0) 396 396 (add_object EXPLODE1 (- (x) (random 10)) (- (- (y) (random 5)) 10) 2) 397 397 (play_sound P_EXPLODE_SND 127 (x) (y)) … … 400 400 nil) 20) 401 401 nil) T)) 402 402 403 403 404 404 (def_char SMALL_BOLDER … … 407 407 (flags (add_front T) 408 408 (unlistable T)) 409 409 410 410 (states "art/bold.spe" 411 411 (stopped "bsmall"))) -
abuse/trunk/data-abuse/lisp/english.lsp
r221 r582 5 5 ;; Latest version of this file is "V-E" (version E=1.47) 6 6 7 (select section 7 (select section 8 8 ('game_section 9 9 … … 31 31 (setq New? "New?") 32 32 (setq l_EDIT "EDIT") 33 33 34 34 35 35 /********** New for Version D (1.46) **************/ … … 104 104 (setq sens_cs "current state") 105 105 (setq tp_amb "ambient setting") 106 107 108 106 107 108 109 109 (setq ai_xvel "Xvel ") 110 110 (setq ai_yvel "Yvel ") … … 118 118 (setq ai_state "ai state") 119 119 (setq ai_fade "fade 0-15") 120 120 121 121 (setq a_ambient "Ambient ") 122 122 (setq a_aspeed "Ambient speed") … … 133 133 (setq ap_pal "Add palette") 134 134 (setq mouse_at "Mouse at location %d, %d\n") 135 135 136 136 137 137 (setq l_links "Links") … … 156 156 (setq edit_top "Edit") 157 157 (setq window_top "Windows") 158 (setq menu1_load "Load Level") 158 (setq menu1_load "Load Level") 159 159 (setq menu1_save "Save Level (S)") 160 160 (setq menu1_saveas "Save level as") … … 201 201 (setq level_size "Level size") 202 202 ; 012345678901234567 (please keep same allignment of Name level & total) 203 (setq score_header "Name Level Total") ; V-E 203 (setq score_header "Name Level Total") ; V-E 204 204 (setq space_cont "Press SPACEBAR to continue") ; V-E 205 205 (setq no_saved "No saved game") … … 218 218 219 219 (defun get_train_msg (message_num) 220 (select message_num 220 (select message_num 221 221 ; 0123456789012345678901234567890123456789012345678901234567890123456789 222 222 ; "--------------------------------------------------------------------" ; V-A … … 294 294 (setq to_be_continued "To be continued.....") 295 295 (setq no_edit "This version of ABUSE does not have editing features") 296 (setq no_hirez "Hi-rez is only available for edit mode (-edit)") 296 (setq no_hirez "Hi-rez is only available for edit mode (-edit)") 297 297 (setq no2 "Cannot use -2 with -edit") 298 298 (setq no_pals "No palettes defined") … … 304 304 (setq d_nosel "No selected object or light to delete.") 305 305 (setq forward? "Forward which object?") 306 (setq back? "Back which object?") 306 (setq back? "Back which object?") 307 307 (setq aitype? "Ai type for who?") 308 308 (setq prof_off "Cache profiling is now off.") … … 315 315 (setq quit_title "Quit?") 316 316 (setq YES "YES") 317 (setq NO "NO") 317 (setq NO "NO") 318 318 (setq seqs_off "Sequential screen shots off\n") 319 319 (setq seqs_on "Sequential screen shots on (1 per 5 sec)\n") … … 336 336 337 337 338 (setq net_not_reg 338 (setq net_not_reg 339 339 (concatenate 'string "Sorry, this server is running REGISTERED ABUSE and you are not.\n" 340 340 "Ask the server operator to run with -share option or better yet,\n" … … 359 359 360 360 (setq plot_start 361 (concatenate 'string 361 (concatenate 'string 362 362 "You are Nick Vrenna. It is the year 2009. You have been falsely incarcerated " 363 363 "inside a high security underground prison where illegal genetic experiments " 364 "are taking place.\\n" 364 "are taking place.\\n" 365 365 "Alan Blake, the head research scientist, has isolated the specific gene which " 366 366 "causes violence and aggression in humans. This genetic sequence, called " … … 378 378 379 379 (setq plot_middle 380 (concatenate 'string 380 (concatenate 'string 381 381 "You have survived the initial outbreak, but you are still lost deep " 382 "within the prison. So far it's been suspiciously easy. \\n" 382 "within the prison. So far it's been suspiciously easy. \\n" 383 383 "If you want to break out - the real ABUSE lies ahead. ")) 384 384 385 385 386 386 (setq plot_end 387 (concatenate 'string 387 (concatenate 'string 388 388 "You've survived impossible odds and made it to the Control Room. " 389 389 "By pulling the switch, you have diverted the water supply and stopped the spread of Abuse!\\n " 390 "CONGRATULATIONS! YOU'RE HOWLING!!!"))) 390 "CONGRATULATIONS! YOU'RE HOWLING!!!"))) 391 391 ) -
abuse/trunk/data-abuse/lisp/explo.lsp
r54 r582 13 13 T)))) 14 14 15 (defun do_small_explo (radius amount) 15 (defun do_small_explo (radius amount) 16 16 (add_object EXPLODE3 (+ (x) (random 5)) (+ (y) (random 5)) 0) 17 17 (add_object EXPLODE2 (+ (x) (random 5)) (+ (y) (random 5)) 2) … … 50 50 51 51 (def_char EXP_LIGHT 52 (funs (ai_fun explo_light) 52 (funs (ai_fun explo_light) 53 53 (draw_fun dev_draw)) 54 54 (flags (unlistable T)) … … 58 58 59 59 60 (defun exp_ai () 61 (if (eq (aitype) 0) (next_picture) 60 (defun exp_ai () 61 (if (eq (aitype) 0) (next_picture) 62 62 (progn (set_aitype (- (aitype) 1)) 63 63 T))) … … 65 65 66 66 (defun exp_draw () 67 (if (eq (aitype) 0) 67 (if (eq (aitype) 0) 68 68 (middle_draw))) 69 69 -
abuse/trunk/data-abuse/lisp/flyer.lsp
r54 r582 27 27 (add_object EXPLODE1 (x) (+ (- (y) (random 20)) -20) 4) 28 28 nil) 29 (progn 29 (progn 30 30 (if (eq (mod (state_time) 5) 0) ;; make flyer noise every 5 ticks 31 31 (play_sound FLYER_SND 127 (x) (y))) … … 66 66 67 67 (if (next_picture) T (set_state running)) ;; reset animation when done 68 68 69 69 (bounce_move '(set_xvel (/ (xvel) 2)) '(set_xvel (/ (xvel) 2)) 70 70 '(set_yvel (/ (yvel) 2)) '(set_yvel (/ (yvel) 2)) nil) 71 71 72 72 (if (> fire_time 0) ;; if we need to wait till next burst 73 73 (progn 74 74 (setq fire_time (- fire_time 1)) 75 75 (if (eq fire_time 0) 76 (progn 76 (progn 77 77 (setq burst_left burst_total) 78 78 (setq burst_wait 0)))) … … 91 91 (setq burst_left (- burst_left 1))) 92 92 (setq burst_wait burst_delay) 93 (fire_object (me) (aitype) firex firey angle (bg)) 93 (fire_object (me) (aitype) firex firey angle (bg)) 94 94 ))))) 95 (setq burst_wait (- burst_wait 1)))) 95 (setq burst_wait (- burst_wait 1)))) 96 96 T)))) 97 97 98 98 99 99 100 (defun flyer_cons () 100 (defun flyer_cons () 101 101 (setq fire_delay 20) 102 102 (setq burst_delay 3) … … 108 108 109 109 (defun flyer_damage (amount from hitx hity push_xvel push_yvel) 110 (if (and from (with_object from (and (> (total_objects) 0) 111 (with_object (get_object 0) 110 (if (and from (with_object from (and (> (total_objects) 0) 111 (with_object (get_object 0) 112 112 (or (eq (otype) FLYER) 113 113 (eq (otype) GREEN_FLYER)) -
abuse/trunk/data-abuse/lisp/french.lsp
r566 r582 6 6 7 7 8 (select section 8 (select section 9 9 ('game_section 10 10 … … 108 108 (setq sens_cs "Etat actuel") 109 109 (setq tp_amb "Rglage ambiance") 110 111 112 110 111 112 113 113 (setq ai_xvel "Xvel ") 114 114 (setq ai_yvel "Yvel ") … … 122 122 (setq ai_state "Etat IA ") 123 123 (setq ai_fade "Fondu 0-15") 124 124 125 125 (setq a_ambient "Ambiant ") 126 126 (setq a_aspeed "Vitesse ambiante") … … 137 137 (setq ap_pal "Ajouter palette") 138 138 (setq mouse_at "Position la souris %d, %d\n") 139 139 140 140 141 141 (setq l_links "Liens") … … 148 148 149 149 (setq SHOW? "AFFICHER ?") 150 (setq back_loss (concatenate 'string "Ce taux de dfilement diminue la taille de la care d'arrire 150 (setq back_loss (concatenate 'string "Ce taux de dfilement diminue la taille de la care d'arrire 151 151 plan \n" 152 152 "Des dalles risquent d'tre perdues, tes-vous sr(e) de vouloir le faire ?\n")) … … 164 164 (setq edit_top "Editer") 165 165 (setq window_top "Fentres") 166 (setq menu1_load "Lancer niveau") 166 (setq menu1_load "Lancer niveau") 167 167 (setq menu1_save "Sauvegarder niveau (S)") 168 168 (setq menu1_saveas "Enregistrer sous") … … 209 209 (setq level_size "Taille du niveau") 210 210 ; 012345678901234567 (please keep same allignment of Name level & total) 211 (setq score_header "Nom Total du niveau") ; V-E 211 (setq score_header "Nom Total du niveau") ; V-E 212 212 (setq space_cont "Appuyez sur la BARRE D'ESPACE pour continuer") ; V-E 213 213 (setq no_saved "Pas de jeu sauvegard") … … 229 229 230 230 (defun get_train_msg (message_num) 231 (select message_num 231 (select message_num 232 232 (0 "Pointez le canon avec la souris, tirez avec le bouton gauche") 233 233 (1 "Rcuprez des munitions pour augmenter votre cadence de tir") … … 290 290 (setq client "Participer au jeu en cours ?") 291 291 (setq single_play " Un seul joueur ") 292 (setq single_play " Sortir du jeu sur rseau ") ; V-A 292 (setq single_play " Sortir du jeu sur rseau ") ; V-A 293 293 (setq cancel_net " Annuler ") 294 294 … … 311 311 (setq to_be_continued "A suivre.....") 312 312 (setq no_edit "Cette version du jeu est dpourvue de l'diteur") 313 (setq no_hirez "La haute rsolution n'est disponible qu'avec le mode diter (-edit)") 313 (setq no_hirez "La haute rsolution n'est disponible qu'avec le mode diter (-edit)") 314 314 (setq no2 "Ne peut pas utiliser -2 avec -edit") 315 315 (setq no_pals "Aucune palette dfinie") … … 322 322 effacer.") 323 323 (setq forward? "Avancer quel objet ?") 324 (setq back? "Reculer quel objet ?") 324 (setq back? "Reculer quel objet ?") 325 325 (setq aitype? "Type IA pour qui ?") 326 326 (setq prof_off "Cache dsactiv") … … 333 333 (setq quit_title "Sortir ?") 334 334 (setq YES "OUI") 335 (setq NO "NON") 335 (setq NO "NON") 336 336 (setq seqs_off "Squences photos off\n") 337 337 (setq seqs_on "Squences photos on (1 toutes les 5 sec)\n") … … 375 375 (setq load_warn nil) 376 376 (if (not (load "register/english.lsp")) 377 (setq end_msg 378 (concatenate 'string 377 (setq end_msg 378 (concatenate 'string 379 379 "* Editer LISP/OPTIONS.LSP pour configurer quelques options pour ABUSE.\n\n" 380 "* Procurez-vous la version commerciale d'ABUSE qui sera en vente fin mars 96, et\n" 380 "* Procurez-vous la version commerciale d'ABUSE qui sera en vente fin mars 96, et\n" 381 381 " sera jouable sur rseau IPX supportant huit joueurs. Elle comportera un diteur\n" 382 382 " de niveau intgr, 17 niveaux un seul joueur (plus 12 niveaux sur le\n" … … 390 390 " ALLEMAGNE 05241 / 24307\n" 391 391 " AUSTRALIE +61(75)911 388\n" 392 " JAPON 03-5410-3100\n\n"))) 392 " JAPON 03-5410-3100\n\n"))) 393 393 394 394 (setq load_warn T) 395 395 396 396 (setq plot_start 397 (concatenate 'string 397 (concatenate 'string 398 398 "Vous tes Nick Vrenna. C'est l'anne 2009. A tort, vous avez t incarcr " 399 399 "dans une prison souterraine de haute surveillance o ont lieu des expriences gntiques " 400 " illgales.\\n" 400 " illgales.\\n" 401 401 "Alan Blake, 402 la tte de la recherche scientifique, a isol le gne qui provoque " 402 la tte de la recherche scientifique, a isol le gne qui provoque " 403 403 "violence et agression chez les humains. Cette squence gntique appele " 404 '(#\") "Abuse" '(#\") " est extrmement infectieuse, elle engendre des transformations " 404 '(#\") "Abuse" '(#\") " est extrmement infectieuse, elle engendre des transformations " 405 405 "horribles et provoque de monstrueux effets secondaires. " 406 406 "Vous tes la seule personne immunise contre ces effets. \\n" 407 407 "Une meute commence et dans ce dsordre, toutes les portes de " 408 "prison s'ouvrent. Trs vite, les gardes, ainsi que les dtenus " 408 "prison s'ouvrent. Trs vite, les gardes, ainsi que les dtenus " 409 409 "sont contamins et transforms en une horde de mutants qui envahissent le " 410 410 "btiment.\\n" 411 "Votre seule chance pour vous enfuir est de vous revtir d'une armure " 411 "Votre seule chance pour vous enfuir est de vous revtir d'une armure " 412 412 "de combat et d'aller 413 413 la Salle des commandes " 414 "qui se trouve au niveau le plus loign de la structure. Mais d'abord, vous devez " 414 "qui se trouve au niveau le plus loign de la structure. Mais d'abord, vous devez " 415 415 "empcher l'approvisionnement d'eau qui a t infect par Abuse de contaminer " 416 416 "le monde extrieur. La libert et le sort de l'humanit sont maintenant entre vos mains. " )) 417 417 418 418 (setq plot_middle 419 (concatenate 'string 419 (concatenate 'string 420 420 "Vous avez survcu la vague initiale de contamination, mais vous tes " 421 421 "encore perdu au fin fond de la prison " 422 "Jusqu'ici, c'tait d'une facilit suspecte. \\n" 422 "Jusqu'ici, c'tait d'une facilit suspecte. \\n" 423 423 "Si vous voulez vous chapper, ne manquez pas de jouer 424 424 Abuse dans son intgralit. ")) … … 426 426 427 427 (setq plot_end 428 (concatenate 'string 428 (concatenate 'string 429 429 "Flicitations ! Vous avez russi 430 survivre dans une situation incroyable et " 430 survivre dans une situation incroyable et " 431 431 "vous tes 432 432 la Salle de commandes. " -
abuse/trunk/data-abuse/lisp/gates.lsp
r54 r582 27 27 ("aistate" ai_state) 28 28 ) 29 (states "art/misc.spe" 29 (states "art/misc.spe" 30 30 (stopped "0_delay") 31 31 (on_state "1_delay"))) … … 35 35 (funs (ai_fun or_ai) 36 36 (draw_fun dev_draw)) 37 (states "art/misc.spe" 37 (states "art/misc.spe" 38 38 (stopped "0_or_gate") 39 39 (on_state "1_or_gate"))) 40 40 41 41 (def_char GATE_AND 42 42 (funs (ai_fun and_ai) 43 43 (draw_fun dev_draw)) 44 (states "art/misc.spe" 44 (states "art/misc.spe" 45 45 (stopped "0_and_gate") 46 46 (on_state "1_and_gate"))) 47 48 47 48 49 49 (def_char GATE_NOT 50 50 (funs (ai_fun not_ai) 51 51 (draw_fun dev_draw)) 52 (states "art/misc.spe" 52 (states "art/misc.spe" 53 53 (stopped "0_not_gate") 54 54 (on_state "1_not_gate"))) 55 55 56 56 57 57 (def_char GATE_XOR 58 58 (funs (ai_fun xor_ai) 59 59 (draw_fun dev_draw)) 60 (states "art/misc.spe" 60 (states "art/misc.spe" 61 61 (stopped "0_xor_gate") 62 62 (on_state "1_xor_gate"))) … … 72 72 (on_state "1_pulse"))) 73 73 74 74 75 75 (def_char INDICATOR 76 76 (funs (ai_fun indicator_ai)) 77 (states "art/misc.spe" 77 (states "art/misc.spe" 78 78 (stopped "0_indicator") 79 79 (on_state "1_indicator"))) 80 80 81 81 (defun indicator_ai () 82 82 (if (> (total_objects) 0) … … 111 111 (or_check (- last_object 1)) 112 112 T))) 113 113 114 114 (defun or_ai () 115 115 (if (or_check (- (total_objects) 1)) … … 121 121 (set_aistate 0))) T) 122 122 123 123 124 124 (defun and_check (last_object) 125 125 (if (< last_object 0) … … 128 128 nil 129 129 (and_check (- last_object 1))))) 130 131 130 131 132 132 (defun and_ai () 133 133 (if (and_check (- (total_objects) 1)) -
abuse/trunk/data-abuse/lisp/general.lsp
r54 r582 25 25 26 26 (defun spring_cons () (set_yvel -15)) 27 (defun spring_ai () 27 (defun spring_ai () 28 28 (if (or (eq (total_objects) 0) (not (eq (with_object (get_object 0) (aistate)) 0))) 29 29 (select (aistate) … … 32 32 (let ((add_yvel (yvel))) 33 33 (play_sound SPRING_SOUND 127 (x) (y)) 34 (with_object (bg) 34 (with_object (bg) 35 35 (progn 36 36 (set_yvel (+ (yvel) add_yvel)) … … 58 58 (running (rep "spri0001.pcx" 4)))) 59 59 60 (defun pr_draw () 60 (defun pr_draw () 61 61 (draw_predator) 62 62 63 63 ) 64 64 65 65 66 66 (defun train_ai () … … 70 70 (with_object (bg) 71 71 (progn 72 (if (local_player) 72 (if (local_player) 73 73 (show_help (get_train_msg (aitype)))) 74 (freeze_player 100))) 74 (freeze_player 100))) 75 75 (set_aistate 1) 76 76 T) … … 91 91 (states "art/misc.spe" 92 92 (stopped "bubble"))) 93 93 94 94 (defun sball_damage (amount from hitx hity push_xvel push_yvel) ; transfer damage to lower half 95 95 (if (eq (state) stopped) … … 103 103 (ai_fun do_nothing)) 104 104 (flags (hurtable T)) 105 (states "art/misc.spe" 105 (states "art/misc.spe" 106 106 (stopped (seq "swit" 1 9)) 107 107 (running (seq "swit" 10 18)))) … … 112 112 (stopped "pointer"))) 113 113 114 (defun shifter_cons () 115 (set_xvel 300) 116 (set_yvel 300) 117 (set_xacel 0) 114 (defun shifter_cons () 115 (set_xvel 300) 116 (set_yvel 300) 117 (set_xacel 0) 118 118 (set_yacel -1)) 119 119 120 120 (defun holder_ai () 121 121 (select (total_objects) 122 (2 122 (2 123 123 (let ((newx (+ (with_object (get_object 1) (x)) (xvel))) 124 124 (newy (+ (with_object (get_object 1) (y)) (yvel)))) … … 127 127 (set_y newy) 128 128 T)) 129 (3 129 (3 130 130 (if (with_object (get_object 2) (not (eq (aistate) 0))) 131 131 (let ((newx (+ (with_object (get_object 1) (x)) (xvel))) … … 135 135 (set_y newy) 136 136 T) 137 (if (eq (xacel) 1) 137 (if (eq (xacel) 1) 138 138 nil 139 139 T))) … … 143 143 (0 nil) 144 144 (1 nil))) 145 145 146 146 147 147 (def_char OBJ_HOLDER -
abuse/trunk/data-abuse/lisp/german.lsp
r566 r582 6 6 7 7 8 (select section 8 (select section 9 9 ('game_section 10 10 … … 104 104 (setq sens_cs "Jetztstatus") 105 105 (setq tp_amb "Umgebung") 106 107 108 106 107 108 109 109 (setq ai_xvel "Xvel ") 110 110 (setq ai_yvel "Yvel ") … … 118 118 (setq ai_state "AI-Status") 119 119 (setq ai_fade "Transparenz 0-15") 120 120 121 121 (setq a_ambient "Umgebung ") 122 122 (setq a_aspeed "Umgeb.-Tempo") … … 133 133 (setq ap_pal "Palette hinzu") 134 134 (setq mouse_at "Maus an Punkt %d, %d\n") 135 135 136 136 137 137 (setq l_links "Link") … … 152 152 (setq y_div "Y div") 153 153 154 /*********** New for Version 1.45 ***********************/ 155 156 157 ;; Weitere Einzelheiten zu den Benutzerrechten unter Lizenzrechte. 154 /*********** New for Version 1.45 ***********************/ 155 156 157 ;; Weitere Einzelheiten zu den Benutzerrechten unter Lizenzrechte. 158 158 159 159 … … 161 161 (setq edit_top "Bearbeiten") 162 162 (setq window_top "Fenster") 163 (setq menu1_load "Level laden") 163 (setq menu1_load "Level laden") 164 164 (setq menu1_save "Level speichern (S)") 165 165 (setq menu1_saveas "Level speichern als") … … 206 206 (setq level_size "Levelgráe") 207 207 ; 012345678901234567 (please keep same allignment of Name level & total) 208 (setq score_header "Name Level gesamt") ; V-E 208 (setq score_header "Name Level gesamt") ; V-E 209 209 (setq space_cont "LEERTASTE, um fortzufahren ") ; V-E 210 210 (setq no_saved "Kein gespeichertes Spiel") … … 221 221 (setq gamma_msg "Klicken Sie die dunkelste Farbe \nauf Ihrem Monitor an, und klicken Sie OK.") 222 222 (setq telep_msg "Pfeiltaste (unten) drcken, um zu teleportieren.") 223 224 223 225 224 (defun get_train_msg (message_num) 226 (select message_num 225 (select message_num 227 226 (0 "Mit der Maus zielen und mit Linksklick feuern.") 228 227 (1 "Munition sammeln, um Schuárate zu erhhen.") … … 237 236 (10 "Kugel anschieáen, um zu aktivieren.") 238 237 (11 "Pfeiltaste (unten) drcken, um zu teleportieren."))) 239 238 240 239 (setq not_there "Spiel luft nicht mehr ") 241 240 (setq max_error "Max Spielerzahl sollte gleich oder mehr als Min Spielerzahl sein ") ; V-C changed … … 270 269 " - TSR's u. fr ABUSE nicht bentigte Treiber beseitigen\n" 271 270 " - Machen Sie mehr Speicher frei\n")) 272 271 273 272 (setq no_mem (concatenate 'string "Nicht gengend Speicher verfgbar\n" 274 273 " Vorschlge...\n" 275 274 " - Startdiskette erstellen (Info im Handbuch)\n" 276 275 " - TSR's u. fr ABUSE nicht bentigte Treiber beseitigen\n" 277 278 276 " - Machen Sie mehr Speicher frei\n")) 279 277 … … 311 309 (setq to_be_continued "Fortsetzung folgt.....") 312 310 (setq no_edit "Diese Abuse-Version hat keine Edit-Funktionen") 313 (setq no_hirez "High-Res. gibt es nur im Edit-Modus (-edit)") 311 (setq no_hirez "High-Res. gibt es nur im Edit-Modus (-edit)") 314 312 (setq no2 "-2 kann nicht mit -edit zusammen benutzt werden") 315 313 (setq no_pals "Paletten sind nicht definiert") … … 321 319 (setq d_nosel "Kein Objekt oder Licht zum Lschen ausgewhlt.") 322 320 (setq forward? "Welches Objekt mitnehmen?") 323 (setq back? "Welches Objekt zurcklegen?") 321 (setq back? "Welches Objekt zurcklegen?") 324 322 (setq aitype? "AI ndern wofr?") 325 323 (setq prof_off "Cache-Profiling ist jetzt aus.") … … 332 330 (setq quit_title "Abbrechen") 333 331 (setq YES "JA") 334 (setq NO "NEIN") 332 (setq NO "NEIN") 335 333 (setq seqs_off "Kontinuierliche Bildsequenzen aus\n") 336 334 (setq seqs_on " Kontinuierliche Bildsequenzen an (1 Bild alle 5 Sek)\n") … … 352 350 (setq SAVE "SPEICHERN") ; don't let this get too long 353 351 354 (setq net_not_reg 352 (setq net_not_reg 355 353 (concatenate 'string "Dieser Server betreibt die REGISTRIERTE ABUSE Version, Sie aber nicht.\n" 356 354 "Bitten Sie den Betreiber des Servers, mit der Shareware-Version zu spielen,\n" … … 367 365 (setq load_warn nil) 368 366 (if (not (load "register/english.lsp")) 369 (setq end_msg 370 (concatenate 'string 371 "* ndern Sie LISP/OPTIONS.LSP, um einige Optionen fr ABUSE zu 372 " 367 (setq end_msg 368 (concatenate 'string 369 "* ndern Sie LISP/OPTIONS.LSP, um einige Optionen fr ABUSE zu\n" 373 370 " konfigurieren.\n\n" 374 "* Halten Sie beim Einkaufsbummel die Augen auf, denn Ende Mrz '96 erscheint die " 371 "* Halten Sie beim Einkaufsbummel die Augen auf, denn Ende Mrz '96 erscheint die " 375 372 " kommerzielle Version von ABUSE fr acht Spieler, IPX-Netzwerk untersttzt, \n" 376 " mit einem eingebauten Level-Editor, 17 Einzelspieler-Level plus 12 Exklusiv- 377 " 373 " mit einem eingebauten Level-Editor, 17 Einzelspieler-Level plus 12 Exklusiv-\n" 378 374 " Netzwerk- \n Level, todbringenderen Waffen, extra Powerups, \n" 379 " strkeren Feinden, besseren Soundeffekten und noch mehr knstlerischen 380 " 375 " strkeren Feinden, besseren Soundeffekten und noch mehr knstlerischen\n" 381 376 " Effekten.\n\n" 382 377 … … 394 389 395 390 (setq plot_start 396 (concatenate 'string 397 "Ihr Name ist Nick Vrenna. Wir schreiben das Jahr 2009. Sie werden zu Unrecht in 398 " 391 (concatenate 'string 392 "Ihr Name ist Nick Vrenna. Wir schreiben das Jahr 2009. Sie werden zu Unrecht in \n" 399 393 "einem streng bewachten unterirdischen Gefngnis festgehalten, " 400 394 "wo illegale genetische Experimente durchgefhrt werden.\\n" 401 395 "Alan Blake, der leitende Wissenschaftler der Forschungsabteilung, hat das Gen isoliert, " 402 396 "das in Menschen Gewalt und Aggressionen hervorruft. Diese genetische Sequenz, die " 403 '(#\") "Abuse" '(#\") " heiát, ist hochansteckend und verursacht schreckliche " 397 '(#\") "Abuse" '(#\") " heiát, ist hochansteckend und verursacht schreckliche " 404 398 "Transformationen und groteske Nebenwirkungen. " 405 399 "Sie sind die einzige Person, die dagegen immun ist. \\n" 406 "Im Gefngnis bricht ein Aufstand aus, und whrend dieses wilden Durcheinanders werden " 400 "Im Gefngnis bricht ein Aufstand aus, und whrend dieses wilden Durcheinanders werden " 407 401 "alle Zellentren geffnet. Bald sind alle, sowohl Wrter als auch Strflinge, infiziert " 408 402 "und werden in Mutanten transformiert, " 409 403 "die das Gebude in ihre Gewalt bringen.\\n" 410 404 "Ihre einzige Chance zu entkommen ist es, den Kampfanzug anzuziehen und mglichst " 411 "schnell zum Kontroll-Raum zu gelangen, der im untersten Geschoá des Gebudes liegt. " 405 "schnell zum Kontroll-Raum zu gelangen, der im untersten Geschoá des Gebudes liegt. " 412 406 "Erst mssen Sie jedoch die Wasserversorgung des Gefngnisses unterbrechen, damit " 413 407 "das Abuse-infizierte Wasser nicht auch noch die Auáenwelt vergiften kann. Freiheit und " … … 417 411 418 412 (setq plot_middle 419 (concatenate 'string 413 (concatenate 'string 420 414 "Sie haben den anfnglichen Aufstand berlebt, haben sich aber im Gefngnis komplett " 421 "verirrt. Bis jetzt war es verdchtig einfach. \\n" 422 "Wenn Sie ausbrechen wollen - liegt das wirkliche ABUSE noch vor Ihnen. ")) 415 "verirrt. Bis jetzt war es verdchtig einfach. \\n" 416 "Wenn Sie ausbrechen wollen - liegt das wirkliche ABUSE noch vor Ihnen. ")) 423 417 424 418 425 419 (setq plot_end 426 (concatenate 'string 420 (concatenate 'string 427 421 "Glckwunsch! Sie haben das Undenkbare berlebt und sind bis in den Kontroll-Raum " 428 422 "vorgedrungen. Sie haben den Schalter umgelegt, somit die Wasserversorgung " 429 "umgeleitet und der Verbreitung von Abuse Einhalt geboten! "))) 423 "umgeleitet und der Verbreitung von Abuse Einhalt geboten! "))) 430 424 ) 431 425 -
abuse/trunk/data-abuse/lisp/guns.lsp
r54 r582 3 3 4 4 5 (setq gun_tints (make-array 11 :initial-contents (list 5 (setq gun_tints (make-array 11 :initial-contents (list 6 6 normal_tint 7 7 (def_tint "art/tints/guns/orange.spe") ; orange … … 17 17 18 18 19 (setq ai_ammo (make-array 9 :initial-contents (list MBULLET_ICON5 20 MBULLET_ICON5 19 (setq ai_ammo (make-array 9 :initial-contents (list MBULLET_ICON5 20 MBULLET_ICON5 21 21 GRENADE_ICON2 22 ROCKET_ICON2 22 ROCKET_ICON2 23 23 PLASMA_ICON20 24 MBULLET_ICON5 25 MBULLET_ICON5 26 MBULLET_ICON5 24 MBULLET_ICON5 25 MBULLET_ICON5 26 MBULLET_ICON5 27 27 MBULLET_ICON5))) 28 28 … … 45 45 (setq sgb_bright_color (find_rgb 255 255 200)) 46 46 (setq sgb_medium_color (find_rgb 150 150 0)) 47 (if creator 47 (if creator 48 48 (progn 49 49 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 59 59 (setq sgb_lasty (y)) 60 60 (setq sgb_angle angle) 61 61 62 62 (setq sgb_bright_color (find_rgb 255 128 64)) 63 63 (setq sgb_medium_color (find_rgb 255 0 0)) 64 (if creator 64 (if creator 65 65 (progn 66 66 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 72 72 (play_sound GRENADE_THROW 127 x y) 73 73 (set_course angle 20) 74 (if creator 74 (if creator 75 75 (progn 76 76 (link_object creator) … … 78 78 (set_yvel (+ (yvel) (with_object creator (yvel)))) 79 79 )) 80 80 81 81 (set_frame_angle 0 359 angle) 82 82 ))) … … 88 88 89 89 (if (and target ;; don't link if not in line of site 90 (can_see (x) (y) 90 (can_see (x) (y) 91 91 (with_object target (x)) 92 92 (with_object target (y)) nil)) … … 106 106 (setq sgb_lastx (x)) 107 107 (setq sgb_lasty (y)) 108 (if creator 108 (if creator 109 109 (link_object creator)) 110 110 (set_course angle 200) … … 114 114 (if (not (eq bx T)) 115 115 (if (eq bx nil) 116 (add_object EXPLODE5 (- (x) (random 5)) 116 (add_object EXPLODE5 (- (x) (random 5)) 117 117 (- (y) (random 5)) 0) 118 118 (progn 119 (add_object EXPLODE3 (- (x) (random 5)) 119 (add_object EXPLODE3 (- (x) (random 5)) 120 120 (- (y) (random 5)) 0) 121 (do_damage 10 bx (* (cos sgb_angle) 20) 121 (do_damage 10 bx (* (cos sgb_angle) 20) 122 122 (* (sin sgb_angle) 10))))) 123 123 (setq sgb_lastx (x)) … … 132 132 (play_sound FIREBOMB_SND 127 (x) (y)) 133 133 (set_course angle 20) 134 (if creator 134 (if creator 135 135 (progn 136 136 (link_object creator) … … 143 143 (set_course angle 25) 144 144 (set_aistate angle) 145 (if creator 145 (if creator 146 146 (link_object creator)) 147 147 (dfris_ai) … … 153 153 (setq sgb_lastx (x)) 154 154 (setq sgb_lasty (y)) 155 (if creator 155 (if creator 156 156 (link_object creator)) 157 157 (set_course angle 45) … … 159 159 (if (not (eq bx T)) 160 160 (if (not (eq bx nil)) 161 (do_damage 30 bx (* (cos sgb_angle) 20) 161 (do_damage 30 bx (* (cos sgb_angle) 20) 162 162 (* (sin sgb_angle) 10))))) 163 163 ))) 164 164 165 165 166 166 (9 (with_object (add_object STRAIT_ROCKET x y) 167 167 (progn 168 168 (play_sound MGUN_SND 127 (x) (y)) 169 (if creator 169 (if creator 170 170 (link_object creator)) 171 171 (set_aistate angle) … … 183 183 (setq sgb_bright_color (find_rgb 255 0 0)) 184 184 (setq sgb_medium_color (find_rgb 150 0 0)) 185 (if creator 185 (if creator 186 186 (progn 187 187 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 190 190 ))) 191 191 192 ) 192 ) 193 193 ) 194 194 … … 222 222 223 223 (1;; unfold 224 (if (next_picture) T 224 (if (next_picture) T 225 225 (progn (set_aistate 3) 226 226 (set_state spray.aim) … … 230 230 231 231 (2;; fold up 232 (if (next_picture) T 232 (if (next_picture) T 233 233 (progn (set_state stopped) 234 234 (set_aistate 0)))) 235 235 236 236 237 237 (3;; swivel down 238 238 (if (> (state_time) spray.fire_delay) … … 263 263 (set_state stopped) 264 264 T)))) 265 266 267 268 269 (defun spray_gun_cons () 265 266 267 268 269 (defun spray_gun_cons () 270 270 (setq spray.bullet_speed 20) 271 271 (setq spray.angle_speed 10) … … 289 289 spray.end_angle 290 290 spray.angle_speed 291 spray.angle) 291 spray.angle) 292 292 293 293 (fields ("hp" ai_health) … … 311 311 312 312 (def_char TRACK_GUN 313 (vars 313 (vars 314 314 fire_delay ; how long between each shot 315 315 fire_delay_left … … 328 328 (constructor track_cons) 329 329 (draw_fun gun_draw) 330 (damage_fun guner_damage)) 330 (damage_fun guner_damage)) 331 331 332 332 (flags (can_block T) … … 384 384 (setq angle new_angle)))) 385 385 386 (defun track_ai () 386 (defun track_ai () 387 387 (if (eq (hp) 0) ;; are we dead? 388 388 nil … … 407 407 (- angle pangle) 408 408 (+ angle (- 360 pangle))))) 409 (let ((closest_dist (if (> clock_dist 180) 409 (let ((closest_dist (if (> clock_dist 180) 410 410 (- 360 clock_dist) 411 411 clock_dist))) … … 416 416 (track_set_angle (mod (+ angle angle_add) 360)) 417 417 (track_set_angle (mod (+ (- angle angle_add) 360) 360))) 418 (if (< angle_add 5);; pretty close to target, FIRE! 418 (if (< angle_add 5);; pretty close to target, FIRE! 419 419 (track_fire)))))) 420 420 (setq fire_delay_left (- fire_delay_left 1))) … … 427 427 (set_targetable nil) 428 428 (set_state stopped) 429 T)))) 430 431 432 433 434 429 T)))) 430 431 432 433 434 -
abuse/trunk/data-abuse/lisp/input.lsp
r54 r582 28 28 ;; "Home","End","Del","F1","F2","F3","F4","F5","F6", 29 29 ;; "F7","F8","F9","F10","Insert" 30 ;; "a", "b", "c", ... 30 ;; "a", "b", "c", ... 31 31 ;; though not all of these keys will work on all operating systems 32 32 … … 46 46 (defun get_local_input () 47 47 (let ((mstat (mouse_stat))) 48 (list (if (local_key_pressed left-key) -1 (if (local_key_pressed right-key) 1 0)) ;; xv 48 (list (if (local_key_pressed left-key) -1 (if (local_key_pressed right-key) 1 0)) ;; xv 49 49 (if (local_key_pressed up-key) -1 (if (local_key_pressed down-key) 1 0)) ;; yv 50 50 (eq (fourth mstat) 1) ;; special button 51 51 (eq (third mstat) 1) ;; fire button 52 53 (if (or (eq (fifth mstat) 1) 52 53 (if (or (eq (fifth mstat) 1) 54 54 (local_key_pressed weapon-left-key)) -1 ;; weapon toggle 55 55 (if (local_key_pressed weapon-right-key) 1 0)) … … 59 59 60 60 61 62 63 64 61 65 62 66 63 64 65 66 -
abuse/trunk/data-abuse/lisp/jugger.lsp
r54 r582 8 8 (set_state dieing)) 9 9 (if (activated) 10 (progn 10 (progn 11 11 (set_targetable T) 12 12 (push_char 35 40) 13 (select (aistate) 13 (select (aistate) 14 14 (0 ;; prepare to walk toward player 15 15 (if (eq stationary 0) … … 27 27 (set_direction (toward)) 28 28 (let ((curx (x));; save position in case we fall off a cliff 29 (cury (y))) 30 (if (next_picture) 29 (cury (y))) 30 (if (next_picture) 31 31 (if (eq (current_frame) 8) 32 32 (play_sound JSTOMP_SND 127 (x) (y))) … … 50 50 (xspeed (* throw_xvel (direction))) 51 51 (yspeed throw_yvel)) 52 (with_object (add_object GRENADE (x) (- (y) 24) 1) 52 (with_object (add_object GRENADE (x) (- (y) 24) 1) 53 53 (progn 54 54 (user_fun myself) … … 59 59 (3 ;; wait for fire animation 60 60 (if (next_picture) nil (set_aistate 0)))) 61 T) 61 T) 62 62 (progn (set_targetable nil) 63 63 T)))) 64 64 65 65 (defun jug_cons () 66 66 (setq throw_xvel 13) … … 88 88 ("aistate" ai_state)) 89 89 90 (states "art/jug.spe" 90 (states "art/jug.spe" 91 91 (stopped "robo0001.pcx") 92 92 (running (seq "rwlk" 1 13)) … … 109 109 (set_targetable T) ;; can lock into us 110 110 (push_char 30 55))) ;; push player away 111 111 112 112 (if (or (< (total_objects) 1) ;; if not linked or link is on 113 113 (not (eq (with_object (get_object 0) (aistate)) 0))) … … 130 130 131 131 (if (<= (hp) 0) ;; are we dead, if so blow up 132 (progn 133 (add_object EXPLODE1 (+ (x) 5) (- (y) 10) 0) 132 (progn 133 (add_object EXPLODE1 (+ (x) 5) (- (y) 10) 0) 134 134 (add_object EXPLODE1 (+ (x) -5) (- (y) 15) 2) ;; wait 2 frames before appearing 135 135 (add_object EXPLODE1 (+ (x) 10) (- (y) 2) 1) … … 144 144 (push_char 30 55) 145 145 (< (state_time) 3)))) ;; return nil (dead) if we've been in this state for 3 frames 146 147 148 149 (defun explo_damage (amount from hitx hity push_xvel push_yvel) 146 147 148 149 (defun explo_damage (amount from hitx hity push_xvel push_yvel) 150 150 (add_object EXPLODE6 (+ (x) (- 10 (random 20))) (- (y) (random 30)) 0) 151 151 (damage_fun amount from hitx hity 0 0) … … 163 163 (flags (hurtable T) 164 164 (can_block T)) 165 (abilities (run_top_speed 4) 165 (abilities (run_top_speed 4) 166 166 (start_hp 70) 167 167 (push_xrange 1)) … … 171 171 ("rob_hiden" rob_hide) 172 172 ("hp" ai_health)) 173 (states "art/rob1.spe" 173 (states "art/rob1.spe" 174 174 (rob_hiding "hiding") 175 175 (stopped (seq "clen" 1 10)))) … … 191 191 nil nil nil) 192 192 T))) 193 193 194 194 (defun who_cache (type) `((,STRAIT_ROCKET) nil)) 195 195 … … 203 203 (flags (hurtable T)) 204 204 (abilities (start_hp 20)) 205 (vars fire_delay burst_delay burst_total burst_wait burst_left 205 (vars fire_delay burst_delay burst_total burst_wait burst_left 206 206 max_xvel max_yvel smoke_time fire_time) 207 207 (fields ("fire_delay" who_fdelay) … … 213 213 ("aistate" ai_state)) 214 214 215 (states "art/rob2.spe" 215 (states "art/rob2.spe" 216 216 (stopped (seq "wgo" 1 3)) 217 217 (running (seq "wgo" 1 3)) … … 227 227 (setq fire_time (- fire_time 1)) 228 228 (if (eq fire_time 0) 229 (progn 229 (progn 230 230 (setq burst_left burst_total) 231 231 (setq burst_wait 0)))) … … 240 240 241 241 242 (defun wrob_cons () 242 (defun wrob_cons () 243 243 (setq fire_delay 4) 244 244 (setq burst_delay 1) … … 263 263 (set_aistate 1)))) 264 264 (1;; stop and fire 265 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 265 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 266 266 (if (> (direction) 0) 267 267 (mod (- 375 (/ (* burst_left 30) burst_total)) 360) … … 270 270 (set_aistate 0)))) 271 271 T))) 272 273 272 273 274 274 275 275 276 276 (def_char WALK_ROB 277 277 (funs (ai_fun wrob_ai) 278 (constructor wrob_cons) 278 (constructor wrob_cons) 279 279 (damage_fun guner_damage)) 280 280 (abilities (run_top_speed 12)) 281 281 (flags (hurtable T) (can_block T)) 282 282 (range 300 100) 283 (vars fire_delay burst_delay burst_total burst_wait burst_left 283 (vars fire_delay burst_delay burst_total burst_wait burst_left 284 284 max_xvel max_yvel smoke_time fire_time) 285 285 (fields ("fire_delay" wrob_fdelay) … … 291 291 ("aistate" ai_state)) 292 292 293 (states "art/rob2.spe" 293 (states "art/rob2.spe" 294 294 (stopped "wwlk0001.pcx") 295 295 (running (seq "wwlk" 1 10)) -
abuse/trunk/data-abuse/lisp/ladder.lsp
r54 r582 40 40 (stopped "step") 41 41 (running "step_gone"))) 42 43 44 42 43 -
abuse/trunk/data-abuse/lisp/light.lsp
r54 r582 9 9 (eq (with_object (get_object 0) (aistate)) 0) 10 10 nil))) 11 11 12 12 13 13 (defun dim_ai () … … 70 70 (flags (unlistable T)) 71 71 (fields ("aistate" ai_state) 72 ("xvel" dimmer_step_amount) 73 ("yvel" dimmer_steps) 72 ("xvel" dimmer_step_amount) 73 ("yvel" dimmer_steps) 74 74 ("aitype" dimmer_dist) 75 75 ("xacel" dimmer_dedist) … … 85 85 (constructor dim_cons)) 86 86 (fields ("aistate" ai_state) 87 ("xvel" dimmer_step_amount) 87 ("xvel" dimmer_step_amount) 88 88 ("yvel" dimmer_steps) 89 89 ("yacel" dimmer_silent)) -
abuse/trunk/data-abuse/lisp/options.lsp
r54 r582 50 50 51 51 ; this option allows the game to exit a idle game after 1 minute 52 ; and go into a demo 52 ; and go into a demo 53 53 54 54 ; (demo_break_enable) -
abuse/trunk/data-abuse/lisp/people.lsp
r54 r582 3 3 4 4 (setq bright_tint (def_tint "art/tints/cop/bright.spe")) ;; used when the player fires a weapon 5 (setq player_tints (make-array 8 :initial-contents (list 5 (setq player_tints (make-array 8 :initial-contents (list 6 6 0 ; 0 this is not used 7 7 (def_tint "art/tints/cop/blue.spe") ; 1 bright blue … … 15 15 ))) 16 16 17 (setq player_text_color (make-array 8 :initial-contents (list 17 (setq player_text_color (make-array 8 :initial-contents (list 18 18 43 ; 0 brown 19 19 216 ; 1 blue … … 25 25 192))) ; 7 purple 26 26 27 (setq cop_dead_parts (make-array (* 4 3) :initial-contents 27 (setq cop_dead_parts (make-array (* 4 3) :initial-contents 28 28 ; head arm leg 29 29 '((CP_1 "4dha") (CP_2 "4daa") (CP_3 "4dba") ; disapear … … 35 35 (do ((i 0 (setq i (+ i 1)))) 36 36 ((>= i 12) nil) 37 (setq (aref cop_dead_parts i) 38 (make_dead_part (car (aref cop_dead_parts i)) 37 (setq (aref cop_dead_parts i) 38 (make_dead_part (car (aref cop_dead_parts i)) 39 39 (car (cdr (aref cop_dead_parts i))) 4 "art/cop.spe" 'dead_cop_part_draw))) 40 40 … … 49 49 50 50 51 51 52 52 53 53 (defun give_player_health (amount) … … 70 70 T))) 71 71 ) 72 72 73 73 74 74 … … 122 122 nil 123 123 (select signal 124 (SET_SNEAKY_TIME 125 (progn 124 (SET_SNEAKY_TIME 125 (progn 126 126 (set_sneaky_time value) 127 127 (with_obj0 (set_sneaky_time value)))) 128 128 (SET_VISOR_TIME (set_visor_time value)) 129 (SET_FAST_TIME 130 (progn 129 (SET_FAST_TIME 130 (progn 131 131 (set_fast_time value) 132 132 (with_obj0 (set_fast_time value)))) 133 (SET_FADE_COUNT (set_fade_count value) 133 (SET_FADE_COUNT (set_fade_count value) 134 134 (with_obj0 (set_fade_count value))) 135 135 136 136 ))) 137 137 138 138 139 139 (defun cop_adjust_top (return) … … 165 165 (if (> ym 0) 166 166 (progn 167 (if (eq (current_frame) 0) (set_current_frame 9) 167 (if (eq (current_frame) 0) (set_current_frame 9) 168 168 (set_current_frame (- (current_frame) 1))) 169 169 (set_y (+ (y) 3))) … … 188 188 189 189 0) 190 (if (and (>= (yvel) 0) (or (> ym 0) 190 (if (and (>= (yvel) 0) (or (> ym 0) 191 191 (and (< ym 0) (> yd 8)))) 192 192 (progn … … 202 202 (cop_adjust_top (mover xm ym but)))) 203 203 )))) 204 205 204 205 206 206 (defun undo_special_power (xm ym but) 207 207 (select special_power … … 222 222 (set_yvel (- (yvel) 1))) 223 223 ) 224 225 226 (FAST_POWER 224 225 226 (FAST_POWER 227 227 (setq used_special_power 1) 228 228 (setq last1_x (x)) … … 230 230 (if (> (total_objects) 0) 231 231 (with_obj0 232 (if (> fire_delay1 0) 232 (if (> fire_delay1 0) 233 233 (setq fire_delay1 (- fire_delay1 1))))) 234 234 235 235 236 236 (let ((in_area in_climbing_area) 237 237 (old_yvel (yvel))) … … 240 240 (if (and (< ym 0) (eq old_yvel 0) (< (yvel) 0)) 241 241 (set_yvel (+ (yvel) (/ (yvel) 3)))) 242 242 243 243 ) 244 244 … … 246 246 (setq last2_y (y))) 247 247 248 (SNEAKY_POWER (if (<= used_special_power 15) 248 (SNEAKY_POWER (if (<= used_special_power 15) 249 249 (setq used_special_power (+ used_special_power 1)))) 250 250 )) … … 261 261 (climb_handler xm ym but))) 262 262 263 /*(defun cop_mover (xm ym but) 264 (if (> (yvel) 10) 265 (progn 263 /*(defun cop_mover (xm ym but) 264 (if (> (yvel) 10) 265 (progn 266 266 (set_yacel 0) 267 267 (set_yvel (- (yvel) 1)))) ;; terminal velocity 268 268 (select (aistate) 269 (JUST_START 270 (if (eq but 0) ; wait till user lets go of button before moving 269 (JUST_START 270 (if (eq but 0) ; wait till user lets go of button before moving 271 271 (progn 272 272 (set_aistate NORMAL_PLAY) … … 299 299 (do_special_power xm ym but) 300 300 (undo_special_power xm ym but)) 301 301 302 302 (let ((ret (player_move xm ym but)) 303 303 (other (me))) 304 (with_obj0 304 (with_obj0 305 305 (progn 306 306 (set_x (with_object other (x))) 307 (set_y (- (- (with_object other (y)) -29) 307 (set_y (- (- (with_object other (y)) -29) 308 308 (with_object other (picture_height)))) 309 309 )) … … 311 311 (not (eq (state) dead)) (not (eq (state) dieing))) 312 312 (let ((ammo (ammo_total (current_weapon_type)))) 313 (add_ammo (current_weapon_type) (with_obj0 313 (add_ammo (current_weapon_type) (with_obj0 314 314 (user_fun 'FIRE ammo))) 315 315 nil)) … … 365 365 ;; save the level we are so joining clients know which one to load 366 366 (if (not (am_a_client)) 367 (open_file "config/cur_lev.lsp" "wb" 367 (open_file "config/cur_lev.lsp" "wb" 368 368 (print `(setq current_net_level ,current_net_level)))) 369 369 … … 376 376 377 377 378 ))) 378 ))) 379 379 ) 380 380 … … 383 383 (JUST_START T) 384 384 (NORMAL_PLAY T))) 385 385 386 386 (defun change_mode (new_mode) 387 387 (setq disable_top_draw (if (should_draw_top? new_mode) 0 1)) … … 392 392 (put_image (- (view_x2) 20) (+ (view_y1) 5) fast_image)) 393 393 (if (eq used_special_power 1) 394 (if (> (total_objects) 0) 394 (if (> (total_objects) 0) 395 395 (let ((nowx (x)) 396 396 (nowy (y)) … … 431 431 432 432 (defun player_draw (num) 433 (if (eq num 0) 433 (if (eq num 0) 434 434 (if (eq just_fired 1) ;; if they just fired a weapon, draw them lite up.. use the bright tint 435 435 (progn … … 439 439 ; (draw_tint (aref player_tints (aitype))) 440 440 ) 441 (if (eq just_fired 1) 441 (if (eq just_fired 1) 442 442 (progn 443 443 (draw_double_tint (aref player_tints num) bright_tint) 444 (setq just_fired 0)) ;; ok to change this in the draw function only if it is not accessed anywhere else! 444 (setq just_fired 0)) ;; ok to change this in the draw function only if it is not accessed anywhere else! 445 445 (draw_tint (aref player_tints num))))) 446 446 … … 468 468 (setq b_ramp 0))) 469 469 470 (if (local_player) 470 (if (local_player) 471 471 (tint_palette r_ramp g_ramp b_ramp)))) 472 472 … … 474 474 (select (aistate) 475 475 (JUST_START (player_draw (player_number))) 476 (NORMAL_PLAY 476 (NORMAL_PLAY 477 477 (select special_power 478 478 (NO_POWER (player_draw (player_number))) … … 481 481 (put_image (- (view_x2) 20) (+ (view_y1) 5) health_image))) 482 482 (FAST_POWER (draw_fast) (player_draw (player_number))) 483 (FLY_POWER (player_draw (player_number)) 483 (FLY_POWER (player_draw (player_number)) 484 484 (if (local_player) 485 485 (put_image (- (view_x2) 20) (+ (view_y1) 5) fly_image))) 486 (SNEAKY_POWER 486 (SNEAKY_POWER 487 487 (if (local_player) 488 488 (put_image (- (view_x2) 20) (+ (view_y1) 5) sneaky_image)) … … 503 503 504 504 (if (eq (total_players) 1) ;; is this a single player game? 505 (request_level_load (if (eq has_saved_this_level 0) 505 (request_level_load (if (eq has_saved_this_level 0) 506 506 (progn 507 507 (set_hp 100) … … 514 514 515 515 516 (defun start_cache (type) 516 (defun start_cache (type) 517 517 `((,DARNEL) nil)) 518 518 … … 539 539 (aref player_text_color (player_number))))) 540 540 (p_compass_draw (next_focus player))))) 541 541 542 542 543 543 (defun compass_draw () … … 626 626 )) 627 627 628 628 629 629 (defun clone_ai () 630 630 (if (and (< (state_time) 200) (not (eq (state) dead))) … … 636 636 (-1 (if (blocked_left (move -1 0 0)) 637 637 (set_direction 1) 638 nil))) 638 nil))) 639 639 (if (or (> (state_time) 185) (eq (state) dieing)) 640 640 (set_fade_count (+ (fade_count) 1)) 641 nil) 641 nil) 642 642 T) 643 643 nil)) … … 649 649 650 650 (or (eq state stopped) (eq state running) 651 (eq state run_jump) (eq state run_jump_fall) 651 (eq state run_jump) (eq state run_jump_fall) 652 652 (eq state end_run_jump))) 653 653 … … 655 655 (if (> (total_objects) 0) 656 656 (let ((other (get_object 0))) 657 (if (or (with_object other (morphing)) 657 (if (or (with_object other (morphing)) 658 658 (eq (with_object other disable_top_draw) 1) 659 659 (not (top_draw_state (with_object other (state))))) … … 664 664 (with_object other (player_number))) 665 665 (let ((nowx (x)) 666 (nowy (y))) 666 (nowy (y))) 667 667 (set_x (with_object other (if (> (direction) 0) (x) (+ (x) 2)))) 668 668 (set_y (- (- (with_object other (y)) -29) (with_object other (picture_height)))) … … 695 695 (defun player_fire_weapon (type target) 696 696 (let ((angle (with_obj0 (player_angle_suggestion)))) 697 697 698 698 (let ((firex (+ (x) (* (cos angle) 17) (xvel))) 699 699 (firey (+ (- (y) (* (sin angle) 16) 20) (yvel)))) 700 (if (can_see (x) (- (y) 16) firex firey nil) 700 (if (can_see (x) (- (y) 16) firex firey nil) 701 701 (progn 702 702 (fire_object (get_object 0) type firex firey angle target) … … 704 704 nil)))) 705 705 706 /* (defun top_ai () 706 /* (defun top_ai () 707 707 (if (> (total_objects) 0) 708 708 (let ((myself (get_object 0))) 709 709 710 710 (set_state rotate) 711 (let ((angle (with_object myself 711 (let ((angle (with_object myself 712 712 (if (> (direction) 0) 713 713 (player_angle_suggestion) … … 722 722 (select (aistate) 723 723 (2 ; start fire up 724 (progn 724 (progn 725 725 (set_state rotate_fire) 726 (set_frame_angle 0 359 (with_object myself 726 (set_frame_angle 0 359 (with_object myself 727 727 (if (> (direction) 0) 728 728 (player_angle_suggestion) … … 735 735 ;; (let ((otype (otype))) 736 736 ;; (with_object myself (add_ammo otype -1))) 737 ;; (with_object (add_object (ammo_type) (x) (- (y) 16) 1) 737 ;; (with_object (add_object (ammo_type) (x) (- (y) 16) 1) 738 738 ;; (user_fun myself)) 739 739 (set_aistate 3))) … … 752 752 ))) 753 753 (set_otype (with_object myself (weapon_to_type (current_weapon_type))))))) 754 (move 0 0 0) 754 (move 0 0 0) 755 755 T) 756 756 … … 762 762 (select signal 763 763 ('FIRE (if (eq (aistate) 0) ;; not already firing 764 (if (> value 0) ;; have ammo 765 (progn 764 (if (> value 0) ;; have ammo 765 (progn 766 766 (setq fire_delay1 3) 767 767 (set_aistate 2) … … 769 769 -1 770 770 0)) 771 (progn 771 (progn 772 772 (setq fire_delay1 7) 773 773 (set_aistate 2) … … 775 775 776 776 0)) 777 0)) 777 0)) 778 778 ('RESET_FIRE_OK (>= (state_time) fire_delay1)))) 779 779 … … 812 812 (setq fire_delay1 12) 813 813 (set_aistate 2) 814 (if (player_fire_weapon (ammo_type) 815 (with_obj0 (find_object_in_area 814 (if (player_fire_weapon (ammo_type) 815 (with_obj0 (find_object_in_area 816 816 (- (x) 160) (- (y) 160) 817 (+ (x) 160) (+ (y) 160) 817 (+ (x) 160) (+ (y) 160) 818 818 bad_guy_list))) 819 819 -1 0)) … … 835 835 (DFRIS_TOP (list DFRIS_BULLET)) 836 836 nil))) 837 837 838 838 839 839 (defun make_top_char (symbol base ufun dfun) … … 850 850 (stopped (seq ,base 1 24)))))) 851 851 852 852 853 853 854 854 (make_top_char 'MGUN_TOP "4gma" 'laser_ufun 'top_draw) … … 869 869 (if (and (touching_bg) (with_object (bg) (pressing_action_key))) 870 870 (set_aistate 2))) 871 (2 (set_state running) 871 (2 (set_state running) 872 872 (set_aistate 3)) 873 (3 (set_aistate 4)) 874 (4 873 (3 (set_aistate 4)) 874 (4 875 875 (let ((spot (get_save_slot))) 876 876 (set_state stopped) … … 892 892 ))) 893 893 T) 894 894 895 895 896 896 (def_char RESTART_POSITION … … 910 910 (request_level_load (concatenate 'string "levels/level" (digstr (aistate) 2) ".spe"))))) 911 911 T) 912 912 913 913 914 914 (def_char NEXT_LEVEL 915 (funs (ai_fun next_level_ai)) 915 (funs (ai_fun next_level_ai)) 916 916 (flags (can_block T)) 917 917 (fields ("aistate" next_level)) … … 948 948 (set_direction 1)) 949 949 (set_fade_count (- (fade_count) 1))))) 950 951 950 951 952 952 (def_char TELE_BEAM 953 953 (funs (ai_fun tele_beam_ai)) -
abuse/trunk/data-abuse/lisp/platform.lsp
r54 r582 48 48 (let ((speed (plat_speed))) 49 49 (let ((newx (- destx (/ (* (- destx sourcex) (xvel)) speed))) 50 (newy (- desty (/ (* (- desty sourcey) (xvel)) speed)))) 50 (newy (- desty (/ (* (- desty sourcey) (xvel)) speed)))) 51 51 (progn 52 52 (platform_push (- newx (x)) (- newy (y))) … … 57 57 (defun platform_ai () 58 58 (if (or (eq (total_objects) 2) ;; no switch to listen to processed as normal 59 (and (eq (total_objects) 3) 59 (and (eq (total_objects) 3) 60 60 (not (eq (with_object (get_object 2) (aistate)) 0)))) ;; see if switch is active 61 61 (progn … … 78 78 (play_sound PLAT_A_SND 127 (x) (y)) 79 79 (set_aitype (- 1 (aitype))) 80 (set_xvel (plat_speed));; steps to go 80 (set_xvel (plat_speed));; steps to go 81 81 (go_state 3)) 82 82 83 83 (3 ;; go to dest 84 (if (eq (xvel) 6) 84 (if (eq (xvel) 6) 85 85 (play_sound PLAT_D_SND 127 (x) (y))) 86 86 (platform_move (get_object (aitype)) (get_object (- 1 (aitype))))) … … 88 88 (set_state stopped)) 89 89 T) 90 91 90 92 91 … … 120 119 121 120 121 -
abuse/trunk/data-abuse/lisp/playwav.lsp
r54 r582 9 9 nil 10 10 (progn 11 (print (concatenate 'string "Playing " (argv arg_on) 11 (print (concatenate 'string "Playing " (argv arg_on) 12 12 ", type c <ENTER> to continue")) 13 13 (play_sound (def_sound (argv arg_on))) -
abuse/trunk/data-abuse/lisp/powerup.lsp
r54 r582 2 2 ;; See licensing information for more details on usage rights 3 3 4 (defun key_ai () (if (touching_bg) 5 (progn 4 (defun key_ai () (if (touching_bg) 5 (progn 6 6 (play_sound YEAH_SOUND 127 (x) (y)) 7 7 nil) T)) 8 8 9 (defun hp_up () 9 (defun hp_up () 10 10 (next_picture) 11 11 … … 37 37 (states "art/compass.spe" (stopped "compass" ))) 38 38 39 (defun fast_ai () 39 (defun fast_ai () 40 40 (next_picture) 41 (if (touching_bg) 42 (progn (with_object (bg) 41 (if (touching_bg) 42 (progn (with_object (bg) 43 43 (progn 44 44 (setq special_power FAST_POWER) -
abuse/trunk/data-abuse/lisp/sfx.lsp
r566 r582 47 47 (def_sound 'TICK_SND (sfxdir "timerfst.wav")) 48 48 49 (setq PLAYER_PAIN (make-array 4 :initial-contents 49 (setq PLAYER_PAIN (make-array 4 :initial-contents 50 50 (list (def_sound (sfxdir "plpain01.wav")) 51 51 (def_sound (sfxdir "plpain02.wav")) … … 58 58 (def_sound (sfxdir "pldeth05.wav")) 59 59 (def_sound (sfxdir "pldeth07.wav"))))) 60 60 61 61 62 62 ;; jugger stomp … … 80 80 81 81 ;; shotgun/laser taking from the lava sample 82 (def_sound 'ZAP_SND (sfxdir "zap2.wav")) 82 (def_sound 'ZAP_SND (sfxdir "zap2.wav")) 83 83 84 84 ;; rocket launch sound … … 93 93 94 94 ;; machine gun hitting the floor, sounds 1 & 2, played randomly 95 (def_sound 'MG_HIT_SND1 (sfxdir "mghit01.wav")) 95 (def_sound 'MG_HIT_SND1 (sfxdir "mghit01.wav")) 96 96 (def_sound 'MG_HIT_SND2 (sfxdir "mghit02.wav")) 97 97 … … 131 131 ;; electricity shooting up from the ground 132 132 (def_sound 'ELECTRIC_SND (sfxdir "elect02.wav")) 133 133 134 134 ;; rocket being fired 135 135 (def_sound 'ROCKET_SND (sfxdir "rocket02.wav")) … … 185 185 186 186 187 (setq AMB_SOUNDS (make-array 17 :initial-contents (list 187 (setq AMB_SOUNDS (make-array 17 :initial-contents (list 188 188 (def_sound (sfxdir "ambtech1.wav")) ;; 0 189 189 (def_sound (sfxdir "ambtech2.wav")) ;; 1 … … 224 224 T))) 225 225 226 227 (defun ambs_cons () 226 227 (defun ambs_cons () 228 228 (set_xvel 100) ;; delay time to 100 229 229 (set_yvel 127)) ;; set volume default to 127 230 230 231 (def_char AMBIENT_SOUND 231 (def_char AMBIENT_SOUND 232 232 (funs (ai_fun amb_sound_ai) 233 233 (draw_fun dev_draw) … … 236 236 (range 500 500) 237 237 (fields ("aitype" amb_num) 238 ("yvel" amb_vol) 238 ("yvel" amb_vol) 239 239 ("xvel" amb_rep) 240 240 ("xacel" amb_rand)) 241 241 (states "art/misc.spe" 242 242 (stopped "sfx_player"))) 243 243 244 244 (setq song_list '("music/abuse01.hmi" "music/abuse02.hmi")) 245 245 (setq current_song song_list) … … 251 251 (break) 252 252 (setq current_song (cdr current_song)) 253 (if (not current_song) 253 (if (not current_song) 254 254 (setq current_song song_list)) 255 255 (break) 256 256 ))) 257 257 258 258 259 259 (defun level_loaded (name) 260 260 (trace) -
abuse/trunk/data-abuse/lisp/startup.lsp
r54 r582 6 6 (setq load_warn nil) 7 7 8 (if (local_load "config/username.lsp") 8 (if (local_load "config/username.lsp") 9 9 (set_login username)) 10 10 11 (if (local_load "config/gamename.lsp") 11 (if (local_load "config/gamename.lsp") 12 12 (set_game_name gamename) 13 13 (set_game_name "Abuse Net Game")) -
abuse/trunk/data-abuse/lisp/switch.lsp
r54 r582 2 2 ;; See licensing information for more details on usage rights 3 3 4 (defun switcher_ai () 4 (defun switcher_ai () 5 5 (next_picture) 6 6 (select (aistate) … … 9 9 (progn 10 10 (play_sound SWITCH_SND 127 (x) (y)) 11 (set_state running) 11 (set_state running) 12 12 (set_aistate 1)))) 13 (1 ; wait for player to let go of button 13 (1 ; wait for player to let go of button 14 14 (if (not (with_object (bg) (pressing_action_key))) 15 15 (set_aistate 2))) … … 19 19 (play_sound SWITCH_SND 127 (x) (y)) 20 20 (set_state stopped) 21 (set_aistate 4)))) 21 (set_aistate 4)))) 22 22 (4 ; wait for player to let go of button 23 23 (if (not (with_object (bg) (pressing_action_key))) … … 25 25 ) 26 26 T) 27 28 29 (defun switch_once_ai () 27 28 29 (defun switch_once_ai () 30 30 (select (aistate) 31 31 (0 ; waiting for player to press, then turn to on … … 38 38 (set_aistate 1))))) 39 39 T) 40 40 41 41 (defun lower_reload () (lower)) ;; move object below all other objects 42 42 43 43 (def_char SWITCH 44 44 (funs (ai_fun switcher_ai) 45 45 (reload_fun lower_reload)) 46 (range 0 0) 46 (range 0 0) 47 47 (states "art/misc.spe" 48 48 (stopped '("switch_off1" "switch_off2")) … … 52 52 (funs (ai_fun switch_once_ai) 53 53 (reload_fun lower_reload)) 54 (range 0 0) 54 (range 0 0) 55 55 (states "art/misc.spe" 56 56 (stopped '("switch_off1" "switch_off2")) … … 67 67 (vars reset_time) 68 68 (fields ("reset_time" switch_reset)) 69 (range 0 0) 69 (range 0 0) 70 70 (states "art/misc.spe" 71 71 (stopped '("switch_off1" "switch_off2")) … … 99 99 (if (> (total_objects) 1) 100 100 (select (aistate) 101 (0 (if (not (eq (with_object (get_object 0) (aistate)) 0)) 101 (0 (if (not (eq (with_object (get_object 0) (aistate)) 0)) 102 102 (let ((mex (x)) 103 103 (mey (y))) … … 124 124 (with_object (get_object 1) (set_fade_count (- count 1))) 125 125 T))))) 126 126 127 127 nil)) 128 128 … … 138 138 (set_aitype 1) 139 139 (add_hp -10)) 140 140 141 141 142 142 /* -- compiled code … … 144 144 (if (eq (aistate) 0) 145 145 (if (and (< (distx) (xvel)) (< (disty) (yvel))) 146 (progn 146 (progn 147 147 (if (eq (hp) 0) ;; don't time out 148 148 (set_aistate 1) … … 152 152 153 153 (if (eq (hp) 0) 154 (if (or (> (distx) (xacel)) (> (disty) (yacel))) 154 (if (or (> (distx) (xacel)) (> (disty) (yacel))) 155 155 (set_aistate 0)) 156 156 (set_aistate (- (aistate) 1)))) … … 158 158 159 159 (defun sensor_draw () 160 (if (edit_mode) 160 (if (edit_mode) 161 161 (progn 162 162 (draw) … … 216 216 (stopped "off") 217 217 (blocking "on"))) 218 218 219 219 /* 220 220 (defun sensor_linker_ai () 221 221 (if (eq (aistate) 0) 222 222 (if (and (< (distx) (xvel)) (< (disty) (yvel))) 223 (progn 223 (progn 224 224 (if (eq (hp) 0) ;; don't time out 225 225 (set_aistate 1) … … 229 229 230 230 (if (eq (hp) 0) 231 (if (or (> (distx) (xacel)) (> (disty) (yacel))) 231 (if (or (> (distx) (xacel)) (> (disty) (yacel))) 232 232 (set_aistate 0)) 233 233 (set_aistate (- (aistate) 1))))) … … 251 251 (stopped "off") 252 252 (blocking "on"))) 253 253 254 254 */ 255 255 … … 258 258 (let ((st (with_object (get_object current) (state)))) 259 259 (if (or (eq st dead) (eq st blown_back_dead)) 260 (let ((dead_guy (get_object current))) 260 (let ((dead_guy (get_object current))) 261 261 (remove_object (get_object current)) 262 262 dead_guy) … … 268 268 (let ((find (dead_object (- (total_objects) 1)))) 269 269 (if find 270 (add_object (with_object (get_object 0) (otype)) 270 (add_object (with_object (get_object 0) (otype)) 271 271 (with_object find (x)) 272 272 (with_object find (y)))))) 273 273 274 274 T) 275 275 … … 282 282 283 283 284 (defun death_sen_ai () 284 (defun death_sen_ai () 285 285 (if (eq (total_objects) 0) 286 286 (progn -
abuse/trunk/data-abuse/lisp/teleport.lsp
r54 r582 7 7 (with_object (get_object 0) 8 8 (if (eq (otype) TP_DOOR) 9 (if (eq is_opening 0) 9 (if (eq is_opening 0) 10 10 (if (and (< (distx) 100) (< (disty) 80)) 11 11 T … … 32 32 (play_sound DOOR_DOWN 127 (x) (y))) 33 33 (set_current_frame (- (current_frame) 1))))) 34 34 35 35 36 36 (defun tpd_ai () ;; teleporting door ai … … 49 49 (othery (with_object (get_object 0) (y)))) 50 50 (with_object (get_object 0) (link_object player)) 51 (with_object player (progn 52 (set_x otherx) 51 (with_object player (progn 52 (set_x otherx) 53 53 (set_y othery))))))) 54 54 T) … … 56 56 57 57 (defun tp_door_cons () (set_xvel -1)) 58 (defun tp_door_draw () (set_ambient_light (bg) (xvel)) (draw)) 58 (defun tp_door_draw () (set_ambient_light (bg) (xvel)) (draw)) 59 59 60 60 (def_char TP_DOOR -
abuse/trunk/data-abuse/lisp/userfuns.lsp
r54 r582 8 8 (set_lives first x) 9 9 (set_all_lives (next_focus first) x)))) 10 11 10 12 (defun select_place (x place) 11 12 (defun select_place (x place) 13 13 (- (/ x place) (* (/ x (* place 10)) 10))) 14 14 15 (defun dig2char (x) 15 (defun dig2char (x) 16 16 (code-char (+ x (char-code "0")))) 17 17 … … 24 24 (reverse-seq name first last)) 25 25 ) 26 (defun forward-seq (name first last) 27 (if (> first last) 28 nil 29 (cons (concatenate 'string name (digstr first 4) ".pcx") 26 (defun forward-seq (name first last) 27 (if (> first last) 28 nil 29 (cons (concatenate 'string name (digstr first 4) ".pcx") 30 30 (forward-seq name (+ 1 first) last)))) 31 (defun reverse-seq (name last first) 32 (if (< last first) 33 nil 34 (cons (concatenate 'string name (digstr last 4) ".pcx") 31 (defun reverse-seq (name last first) 32 (if (< last first) 33 nil 34 (cons (concatenate 'string name (digstr last 4) ".pcx") 35 35 (reverse-seq name (- last 1) first)))) 36 36 -
abuse/trunk/data-abuse/lisp/weapons.lsp
r54 r582 9 9 (if (eq bx T) 10 10 T 11 (progn 11 (progn 12 12 (if (null bx) 13 13 (if (eq (random 2) 0) … … 20 20 (progn 21 21 ; (add_panim EXPLO2 (x) (y) (direction)) 22 ; (add_object EXP_LIGHT (x) (y) 80) 22 ; (add_object EXP_LIGHT (x) (y) 80) 23 23 (do_damage 5 bx (if (> 0 (direction)) -10 10) 0) 24 24 )) … … 29 29 (if (and (eq (tick) 0) 30 30 (if (< (total_objects) 1) 31 nil 31 nil 32 32 (let ((mex (x)) 33 33 (mey (y))) 34 (not (with_object (get_object 0) (find_object_in_area (- mex 7) 35 (- mey 7) 36 (+ mex 7) 34 (not (with_object (get_object 0) (find_object_in_area (- mex 7) 35 (- mey 7) 36 (+ mex 7) 37 37 (+ mey 7) bad_guy_list)))))) 38 38 (progn (next_picture) T) … … 44 44 45 45 (add_object EXPLODE1 (- (x) (random 5)) (+ (y) (random 20)) 0) 46 (hurt_radius (x) (y) 60 40 (if (> (total_objects) 0) (get_object 0) nil) 10) 46 (hurt_radius (x) (y) 60 40 (if (> (total_objects) 0) (get_object 0) nil) 10) 47 47 48 48 (and (or (< (state_time) 3) (not (eq (xvel) 0))) 49 49 (< (state_time) 20) 50 50 (select (direction) 51 (1 (progn ;(set_xvel 30) 51 (1 (progn ;(set_xvel 30) 52 52 (not (blocked_right (move 0 0 0))) 53 53 )) 54 (-1 (progn ;(set_xvel -30) 54 (-1 (progn ;(set_xvel -30) 55 55 (not (blocked_left (move 0 0 0)))))))) 56 57 58 59 60 61 (defun mbullet_ufun (creator) 56 57 58 59 60 61 (defun mbullet_ufun (creator) 62 62 (set_direction (with_object creator (direction))) 63 63 … … 76 76 77 77 78 (defun firebomb_ufun (creator) 78 (defun firebomb_ufun (creator) 79 79 (set_direction (with_object creator (direction))) 80 80 (link_object creator) … … 83 83 84 84 85 (defun player_mine_ufun (creator) 85 (defun player_mine_ufun (creator) 86 86 (set_x (with_object creator (x))) 87 87 (set_y (with_object creator (y))) … … 94 94 (select (aistate) 95 95 (0 96 ;; wait till no player (just in case), or player lets go of fire button 97 (if (or (eq 0 (total_objects)) 96 ;; wait till no player (just in case), or player lets go of fire button 97 (if (or (eq 0 (total_objects)) 98 98 (and (eq (with_object (get_object 0) (player_b1_suggest)) 0) 99 99 (eq (with_object (get_object 0) (player_b2_suggest)) 0))) … … 107 107 (do_explo 50 40) 108 108 )))) 109 109 110 110 111 111 (def_char MBULLET 112 (funs (ai_fun mbullet_ai) 112 (funs (ai_fun mbullet_ai) 113 113 (draw_fun dev_draw) ; you can't see the bullets 114 114 (user_fun mbullet_ufun)) … … 118 118 119 119 120 (defun grenade_ufun (creator) 120 (defun grenade_ufun (creator) 121 121 (set_direction (with_object creator (direction))) 122 122 (play_sound GRENADE_THROW 127 (x) (y)) 123 123 (select (aitype) 124 (1 (progn (set_xvel (if (> (direction) 0) 125 (+ 13 (random 2)) 124 (1 (progn (set_xvel (if (> (direction) 0) 125 (+ 13 (random 2)) 126 126 (+ -13 (random 2)))) (set_yvel -4))) 127 (2 (progn (set_xvel (if (> (direction) 0) 128 (+ 7 (random 2)) 127 (2 (progn (set_xvel (if (> (direction) 0) 128 (+ 7 (random 2)) 129 129 (+ -7 (random 2)))) (set_yvel -10)))) 130 130 (set_xvel (+ (xvel) (with_object creator (xvel)))) … … 133 133 134 134 (defun grenade_cache (type) 135 (list (list EXPLODE1 EXP_LIGHT) 135 (list (list EXPLODE1 EXP_LIGHT) 136 136 (list GRENADE_SND))) 137 137 138 138 139 139 (def_char GRENADE 140 (funs (ai_fun grenade_ai) 140 (funs (ai_fun grenade_ai) 141 141 (get_cache_list_fun grenade_cache) 142 142 (user_fun grenade_ufun)) … … 147 147 148 148 (def_char FIREBOMB 149 (funs (ai_fun firebomb_ai) 149 (funs (ai_fun firebomb_ai) 150 150 (user_fun firebomb_ufun) 151 151 (get_cache_list_fun grenade_cache) … … 162 162 (let ((amount (get_ability start_hp))) 163 163 (with_object (bg) 164 (progn 164 (progn 165 165 (if (and (not (has_weapon type)) change_on_pickup) 166 166 (progn 167 167 (give_weapon type) 168 (set_current_weapon type)) 168 (set_current_weapon type)) 169 169 (give_weapon type)) 170 170 (add_ammo type amount))))) 171 171 172 172 173 (defun weapon_icon_ai () 173 (defun weapon_icon_ai () 174 174 (if (eq0 (aistate)) 175 175 (if (activated) … … 179 179 (set_aistate 1)) 180 180 181 (if (touching_bg) 181 (if (touching_bg) 182 182 (progn 183 183 (play_sound AMMO_SND 127 (x) (y)) … … 185 185 (MBULLET_ICON5 (giver 0));; these numbers correspond to status bar position 186 186 (MBULLET_ICON20 (giver 0)) 187 (GRENADE_ICON2 (giver 1)) 187 (GRENADE_ICON2 (giver 1)) 188 188 (GRENADE_ICON10 (giver 1)) 189 189 … … 208 208 T)) 209 209 T) 210 (if (touching_bg) 210 (if (touching_bg) 211 211 (progn 212 212 (play_sound AMMO_SND 127 (x) (y)) … … 214 214 (MBULLET_ICON5 (giver 0));; these numbers correspond to status bar position 215 215 (MBULLET_ICON20 (giver 0)) 216 (GRENADE_ICON2 (giver 1)) 216 (GRENADE_ICON2 (giver 1)) 217 217 (GRENADE_ICON10 (giver 1)) 218 218 … … 235 235 nil) 236 236 T))) 237 237 238 238 (defun on_draw () 239 239 (if (activated) 240 240 (draw) 241 241 (dev_draw))) 242 242 243 243 244 244 (defun ammo_cache (type) ;; tells what other chars to load in with this character … … 250 250 (MBULLET_ICON20 `(,SHOTGUN_BULLET ,MGUN_TOP)) 251 251 (ROCKET_ICON2 `(,ROCKET ,ROCKET_TOP)) 252 (ROCKET_ICON5 `(,ROCKET ,ROCKET_TOP)) 252 (ROCKET_ICON5 `(,ROCKET ,ROCKET_TOP)) 253 253 (FBOMB_ICON1 `(,FIREBOMB ,FIREBOMB_TOP)) 254 254 (FBOMB_ICON5 `(,FIREBOMB ,FIREBOMB_TOP)) 255 255 256 256 (PLASMA_ICON20 `(,PLASMAGUN_BULLET)) 257 (PLASMA_ICON50 `(,PLASMAGUN_BULLET)) 257 (PLASMA_ICON50 `(,PLASMAGUN_BULLET)) 258 258 259 259 (LSABER_ICON50 `(,LSABER_BULLET ,PGUN_TOP)) … … 265 265 266 266 (defun make_ammo_icon (symbol icon_name increment) 267 (eval (list 'def_char symbol 267 (eval (list 'def_char symbol 268 268 '(funs (ai_fun weapon_icon_ai) 269 269 (get_cache_list_fun ammo_cache) … … 288 288 289 289 290 (defun guner_cons () 290 (defun guner_cons () 291 291 (set_xvel 7) ;; fire speed 292 292 (set_yvel 50) ;; speed of bullet … … 309 309 (progn 310 310 (play_sound BLOWN_UP 127 (x) (y)) 311 (add_object EXPLODE1 (- hitx (random 10)) (- hity (random 25)) 0) 312 (add_object EXPLODE1 (+ hitx (random 10)) (+ hity (random 25)) 1) 313 (add_object EXPLODE1 (- hitx (random 10)) (- hity (random 10)) 2) 311 (add_object EXPLODE1 (- hitx (random 10)) (- hity (random 25)) 0) 312 (add_object EXPLODE1 (+ hitx (random 10)) (+ hity (random 25)) 1) 313 (add_object EXPLODE1 (- hitx (random 10)) (- hity (random 10)) 2) 314 314 (add_object EXPLODE1 (+ hitx (random 10)) (+ hity (random 10)) 3) )))) 315 315 ) … … 319 319 320 320 321 321 322 322 (defun shot_ai () (eq (bmove nil) T)) 323 323 (defun gun_ai () … … 336 336 (progn 337 337 (with_object (add_object VIS_SHOT 338 (+ (x) (* (cos a) 10)) 338 (+ (x) (* (cos a) 10)) 339 339 (- (y) (+ 10 (* (sin a) 10)))) 340 340 (progn … … 352 352 353 353 354 (defun rocket_ai () 354 (defun rocket_ai () 355 355 (if (not (frame_panic)) 356 356 (let ((rand (rand_on))) 357 (with_object (add_object SMALL_LIGHT_CLOUD (+ (x) (random 3)) 357 (with_object (add_object SMALL_LIGHT_CLOUD (+ (x) (random 3)) 358 358 (- (y) (random 3) (/ (picture_height) 2))) 359 359 (set_fade_count 11)) … … 366 366 (- (aistate) angle) 367 367 (+ (aistate) (- 360 angle))))) 368 (let ((closest_dist (if (> clock_dist 180) 368 (let ((closest_dist (if (> clock_dist 180) 369 369 (- 360 clock_dist) 370 370 clock_dist))) … … 383 383 (set_frame_angle 0 359 (aistate)) 384 384 (if (or (eq (hp) 0) 385 (not (eq (bmove (if (> (total_objects) 0) (get_object 0) nil)) T)) 386 (and (> (total_objects) 1) 385 (not (eq (bmove (if (> (total_objects) 0) (get_object 0) nil)) T)) 386 (and (> (total_objects) 1) 387 387 (< (abs (- (with_object (get_object 1) (x)) (x) )) 10) 388 388 (< (abs (- (- (with_object (get_object 1) (y)) (y)) 15 )) 10))) … … 391 391 nil) 392 392 T)) 393 394 395 (defun rocket_ufun (creator) 393 394 395 (defun rocket_ufun (creator) 396 396 (link_object creator) 397 397 (play_sound ROCKET_SND 127 (x) (y)) 398 398 399 (let ((target (with_object creator (find_object_in_area 399 (let ((target (with_object creator (find_object_in_area 400 400 (- (x) 160) (- (y) 160) 401 401 (+ (x) 160) (+ (y) 160) bad_guy_list)))) … … 412 412 (def_char ROCKET 413 413 (funs (ai_fun rocket_ai) 414 (get_cache_list_fun rocket_cache) 414 (get_cache_list_fun rocket_cache) 415 415 (get_cache_list_fun grenade_cache) 416 416 (user_fun rocket_ufun)) … … 429 429 (setq sgb_lasty (y)) 430 430 (setq sgb_speed (/ (* sgb_speed 6) 5)) 431 (set_course sgb_angle sgb_speed) 431 (set_course sgb_angle sgb_speed) 432 432 (if (eq sgb_lifetime 0) 433 433 nil … … 458 458 459 459 460 (defun sgun_ufun (creator) 460 (defun sgun_ufun (creator) 461 461 (set_direction (with_object creator (direction))) 462 462 (set_y (- (y) 4)) … … 472 472 (< (abs (- (y) (with_object target (y)))) 100)) 473 473 (setq sgb_angle (site_angle target)) 474 (if (> (direction) 0) 474 (if (> (direction) 0) 475 475 (setq sgb_angle 0) 476 476 (setq sgb_angle 180))))) … … 480 480 481 481 (def_char SHOTGUN_BULLET 482 (vars sgb_speed sgb_angle sgb_lastx sgb_lasty 482 (vars sgb_speed sgb_angle sgb_lastx sgb_lasty 483 483 sgb_bright_color sgb_medium_color sgb_lifetime) 484 484 (funs (ai_fun sgun_ai) -
abuse/trunk/data-frabs/abuse.lsp
r581 r582 10 10 (progn 11 11 (print "Please make sure you unzipped the game with the -d option") 12 (print "so that all directories get created properly.") 13 (print "example : pkunzip -d abusXXXX.zip") 12 (print "so that all directories get created properly.") 13 (print "example : pkunzip -d abusXXXX.zip") 14 14 (quit))) 15 15 (setq load_warn T) … … 18 18 (load "lisp/common.lsp") 19 19 (load "lisp/userfuns.lsp") 20 (load "lisp/options.lsp") 20 (load "lisp/options.lsp") 21 21 (load "lisp/startup.lsp") 22 22 (if (not (local_load "addon/twist/lisp/input.lsp")) -
abuse/trunk/data-frabs/addon/aliens/alichars.lsp
r566 r582 45 45 46 46 (defun alien_wait_time () 47 (select difficulty 47 (select difficulty 48 48 ('easy 6) 49 49 ('medium 4) … … 59 59 nil 60 60 T))) 61 62 61 62 63 63 (defun roof_above () (not (can_see (x) (y) (x) (- (y) 120) nil))) 64 64 65 65 (defun ali_dodge () 66 66 (if (eq need_to_dodge 1) 67 (progn 67 (progn 68 68 (setq need_to_dodge 0) 69 69 (if (eq (random 2) 1) … … 113 113 (and (< (distx) 130) (< (y) (with_object (bg) (y)))) 114 114 (not (eq (with_object (get_object 0) (aistate)) 0))) 115 (progn 115 (progn 116 116 (set_state fall_start) (set_direction (toward)) 117 117 (set_aistate 1)))) … … 128 128 (9 ;; landing / turn around (general finish animation state) 129 129 (if (next_picture) T 130 (if (try_move 0 2) 130 (if (try_move 0 2) 131 131 (progn 132 132 (set_gravity 1) 133 133 (set_aistate 1)) 134 (progn (set_state stopped) 134 (progn (set_state stopped) 135 135 (go_state 2))))) ;; running 136 136 … … 159 159 (set_state turn_around) 160 160 (set_aistate 9))))) 161 161 162 162 (4 ;; wait for pounce 163 163 (if (ali_dodge) T … … 171 171 (go_state 6)))))) 172 172 173 (6 ;; jump 173 (6 ;; jump 174 174 (setq need_to_dodge 0) 175 175 (if (blocked_down (move (direction) -1 0)) … … 192 192 (damage_fun amount from hitx hity push_xvel push_yvel) 193 193 (play_sound ALPAIN_SND 127 (x) (y)) 194 (setq need_to_dodge 1) 194 (setq need_to_dodge 1) 195 195 (if (<= (hp) 0) 196 196 (progn … … 238 238 (push_xrange 1) 239 239 (jump_top_speed 15)) 240 240 241 241 (flags (hurtable T) 242 242 (force_health T)) 243 243 244 244 (states "addon/aliens/aliens.spe" 245 (stopped "fhwk0001.pcx") 245 (stopped "fhwk0001.pcx") 246 246 (fall_start "fhattack.pcx") 247 247 (falling "fhattack.pcx") … … 266 266 (with_object (get_object 0) (not (eq (aistate) 0)))) 267 267 (set_aistate 1)) 268 (select (current_frame) 268 (select (current_frame) 269 269 (12 (set_current_frame 13) 270 270 (with_object (add_object_after FACE_HUGGER (+ (x) (* (toward) 20)) (y)) … … 290 290 ))) 291 291 T) 292 292 293 293 294 294 (def_char FACE_HUGGER_EGG … … 318 318 (stopped "eggunh.pcx"))) 319 319 320 (defun fh_d_egg_ai () 320 (defun fh_d_egg_ai () 321 321 (progn 322 322 (try_move 0 10) … … 328 328 (stopped "afhj0001.pcx"))) 329 329 330 (defun d_fh_jar_ai () 330 (defun d_fh_jar_ai () 331 331 (progn 332 332 (lower))) … … 334 334 (def_char FACE_HUGGER_JAR_ALIVE 335 335 (funs (ai_fun a_fh_jar_ai) 336 (damage_fun jar_damage)) 336 (damage_fun jar_damage)) 337 337 (flags (hurtable T)) 338 338 (states "addon/aliens/aliens.spe" … … 348 348 ))) 349 349 350 (defun a_fh_jar_ai () 350 (defun a_fh_jar_ai () 351 351 (if (eq (aistate) 0) 352 352 (progn … … 376 376 (defun ad_dodge () 377 377 (if (eq need_to_dodge 1) 378 (progn 378 (progn 379 379 (setq need_to_dodge 0) 380 380 (if (eq (random 2) 1) … … 383 383 (go_state 6)) ;; jump at player 384 384 (if (roof_above) 385 (progn 386 (set_yvel -17) ;; jump up 385 (progn 386 (set_yvel -17) ;; jump up 387 387 (set_xvel 0) 388 388 (go_state 12)) … … 406 406 (playerx (+ (with_object (bg) (x)) (with_object (bg) (* (xvel) 8)))) 407 407 (playery (+ (- (with_object (bg) (y)) 15) (with_object (bg) (* (yvel) 2))))) 408 408 409 409 (if (and (can_see (x) (y) firex firey nil) (can_see firex firey playerx playery nil)) 410 410 (progn … … 428 428 (setq sgb_bright_color (find_rgb 255 255 200)) 429 429 (setq sgb_medium_color (find_rgb 150 150 0)) 430 (if creator 430 (if creator 431 431 (progn 432 432 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 442 442 (setq sgb_lasty (y)) 443 443 (setq sgb_angle angle) 444 444 445 445 (setq sgb_bright_color (find_rgb 255 128 64)) 446 446 (setq sgb_medium_color (find_rgb 255 0 0)) 447 (if creator 447 (if creator 448 448 (progn 449 449 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 455 455 (play_sound GRENADE_THROW 127 x y) 456 456 (set_course angle 20) 457 (if creator 457 (if creator 458 458 (progn 459 459 (link_object creator) … … 461 461 (set_yvel (+ (yvel) (with_object creator (yvel)))) 462 462 )) 463 463 464 464 (set_frame_angle 0 359 angle) 465 465 ))) … … 471 471 472 472 (if (and target ;; don't link if not in line of site 473 (can_see (x) (y) 473 (can_see (x) (y) 474 474 (with_object target (x)) 475 475 (with_object target (y)) nil)) … … 489 489 (setq sgb_lastx (x)) 490 490 (setq sgb_lasty (y)) 491 (if creator 491 (if creator 492 492 (link_object creator)) 493 493 (set_course angle 200) … … 497 497 (if (not (eq bx T)) 498 498 (if (eq bx nil) 499 (add_object EXPLODE5 (- (x) (random 5)) 499 (add_object EXPLODE5 (- (x) (random 5)) 500 500 (- (y) (random 5)) 0) 501 501 (progn 502 (add_object EXPLODE3 (- (x) (random 5)) 502 (add_object EXPLODE3 (- (x) (random 5)) 503 503 (- (y) (random 5)) 0) 504 (do_damage 10 bx (* (cos sgb_angle) 20) 504 (do_damage 10 bx (* (cos sgb_angle) 20) 505 505 (* (sin sgb_angle) 10))))) 506 506 (setq sgb_lastx (x)) … … 515 515 (play_sound FIREBOMB_SND 127 (x) (y)) 516 516 (set_course angle 20) 517 (if creator 517 (if creator 518 518 (progn 519 519 (link_object creator) … … 526 526 (set_course angle 25) 527 527 (set_aistate angle) 528 (if creator 528 (if creator 529 529 (link_object creator)) 530 530 (dfris_ai) … … 536 536 (setq sgb_lastx (x)) 537 537 (setq sgb_lasty (y)) 538 (if creator 538 (if creator 539 539 (link_object creator)) 540 540 (set_course angle 45) … … 542 542 (if (not (eq bx T)) 543 543 (if (not (eq bx nil)) 544 (do_damage 30 bx (* (cos sgb_angle) 20) 544 (do_damage 30 bx (* (cos sgb_angle) 20) 545 545 (* (sin sgb_angle) 10))))) 546 546 ))) 547 547 548 548 549 549 (9 (with_object (add_object STRAIT_ROCKET x y) 550 550 (progn 551 551 (play_sound MGUN_SND 127 (x) (y)) 552 (if creator 552 (if creator 553 553 (link_object creator)) 554 554 (set_aistate angle) … … 566 566 (setq sgb_bright_color (find_rgb 255 0 0)) 567 567 (setq sgb_medium_color (find_rgb 150 0 0)) 568 (if creator 568 (if creator 569 569 (progn 570 570 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 583 583 (setq sgb_bright_color (find_rgb 170 210 50)) 584 584 (setq sgb_medium_color (find_rgb 120 180 70)) 585 (if creator 585 (if creator 586 586 (progn 587 587 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 611 611 (and (< (distx) 130) (< (y) (with_object (bg) (y)))) 612 612 (not (eq (with_object (get_object 0) (aistate)) 0))) 613 (progn 613 (progn 614 614 (set_state fall_start) (set_direction (toward)) 615 615 (set_aistate 1)))) … … 626 626 (9 ;; landing / turn around (general finish animation state) 627 627 (if (next_picture) T 628 (if (try_move 0 2) 628 (if (try_move 0 2) 629 629 (progn 630 630 (set_gravity 1) 631 631 (set_aistate 1)) 632 (progn (set_state stopped) 632 (progn (set_state stopped) 633 633 (go_state 2))))) ;; running 634 634 … … 661 661 (set_state turn_around) 662 662 (set_aistate 9))))) 663 663 664 664 (4 ;; wait for pounce 665 665 (if (ad_dodge) T … … 673 673 (go_state 6)))))) 674 674 675 (6 ;; jump 675 (6 ;; jump 676 676 (setq need_to_dodge 0) 677 677 (if (blocked_down (move (direction) -1 0)) … … 680 680 681 681 (8 ;; fire at player 682 (if (ad_dodge) T 682 (if (ad_dodge) T 683 683 (if (eq (state) fire_wait) 684 684 (if (next_picture) … … 711 711 (13 ;; roof walking 712 712 (alscream_check) 713 (if (or (and (< (y) (with_object (bg) (y))) 714 (< (distx) 10) (eq (random 8) 0)) 713 (if (or (and (< (y) (with_object (bg) (y))) 714 (< (distx) 10) (eq (random 8) 0)) 715 715 (eq need_to_dodge 1)) ;; shooting at us, fall down 716 716 (progn … … 728 728 (- 0 (get_ability run_top_speed))))) 729 729 (if (and (can_see (x) (- (y) 21) (+ (x) xspeed) (- (y) 21) nil) 730 (not (can_see (+ (x) xspeed) (- (y) 21) 730 (not (can_see (+ (x) xspeed) (- (y) 21) 731 731 (+ (x) xspeed) (- (y) 22) nil))) 732 732 (progn 733 733 (set_x (+ (x) xspeed)) 734 (if (not (next_picture)) 734 (if (not (next_picture)) 735 735 (set_state top_walk))) 736 736 (set_aistate 1))))))) 737 737 738 738 (14 ;; cieling shoot 739 739 (if (next_picture) … … 778 778 (push_xrange 2) 779 779 (jump_top_speed 16)) 780 780 781 781 (flags (hurtable T) 782 782 (force_health T)) … … 833 833 (and (< (distx) 130) (< (y) (with_object (bg) (y)))) 834 834 (not (eq (with_object (get_object 0) (aistate)) 0))) 835 (progn 835 (progn 836 836 (set_state fall_start) (set_direction (toward)) 837 837 (set_aistate 1)))) … … 848 848 (9 ;; landing / turn around (general finish animation state) 849 849 (if (next_picture) T 850 (if (try_move 0 2) 850 (if (try_move 0 2) 851 851 (progn 852 852 (set_gravity 1) 853 853 (set_aistate 1)) 854 (progn (set_state stopped) 854 (progn (set_state stopped) 855 855 (go_state 2))))) ;; running 856 856 … … 883 883 (set_state turn_around) 884 884 (set_aistate 9))))) 885 885 886 886 (4 ;; wait for pounce 887 887 (if (ali_dodge) T … … 895 895 (go_state 6)))))) 896 896 897 (6 ;; jump 897 (6 ;; jump 898 898 (setq need_to_dodge 0) 899 899 (if (blocked_down (move (direction) -1 0)) … … 902 902 903 903 (8 ;; fire at player 904 (if (ad_dodge) T 904 (if (ad_dodge) T 905 905 (if (eq (state) fire_wait) 906 906 (if (next_picture) … … 946 946 (push_xrange 2) 947 947 (jump_top_speed 12)) 948 948 949 949 (flags (hurtable T) 950 950 (force_health T)) -
abuse/trunk/data-frabs/addon/aliens/powerold.lsp
r566 r582 5 5 ;; New Power Up objects 6 6 7 (defun shlmp_ai () 7 (defun shlmp_ai () 8 8 (try_move 0 10) 9 9 (next_picture) … … 47 47 (constructor slamp_cons) 48 48 (draw_fun dev_draw)) 49 (states "art/misc.spe" 49 (states "art/misc.spe" 50 50 (stopped "lhold"))) 51 51 … … 113 113 (setq b_ramp (+ b_ramp 7)) 114 114 (setq b_ramp 0))) 115 (if (local_player) 115 (if (local_player) 116 116 (tint_palette r_ramp g_ramp b_ramp)))) 117 117 … … 138 138 (progn 139 139 (setq min2 (+ min2 1)) 140 (setq min1 0))) 140 (setq min1 0))) 141 141 (if (eq min2 10) 142 142 (setq min2 0)) … … 150 150 (if (local_player) 151 151 (put_image (- (view_x2) 20) (+ (view_y1) 5) fly_image))) 152 (SNEAKY_POWER 152 (SNEAKY_POWER 153 153 (if (local_player) 154 154 (put_image (- (view_x2) 20) (+ (view_y1) 5) sneaky_image)) -
abuse/trunk/data-frabs/addon/aliens/powerups.lsp
r566 r582 5 5 ;; New Power Up objects 6 6 7 (defun shlmp_ai () 7 (defun shlmp_ai () 8 8 (try_move 0 10) 9 9 (next_picture) … … 47 47 (constructor slamp_cons) 48 48 (draw_fun dev_draw)) 49 (states "art/misc.spe" 49 (states "art/misc.spe" 50 50 (stopped "lhold"))) 51 51 -
abuse/trunk/data-frabs/addon/claudio/claudio.lsp
r566 r582 56 56 (push_char 35 40) 57 57 (select (aistate) 58 58 59 59 (0 ;; prepare to walk toward player 60 60 (if (eq stationary 0) … … 79 79 (curx (x));; save position in case we fall off a cliff 80 80 (cury (y)) 81 ) 82 (if (next_picture) 81 ) 82 (if (next_picture) 83 83 (if (eq (current_frame) 8) 84 84 (play_sound DROIDMOV_SND 127 (x) (y)) … … 115 115 (yspeed throw_yvel) 116 116 ) 117 (with_object 118 (add_object GRENADE (+ (x) (* (direction) 16)) (- (y) 24) 1) 117 (with_object 118 (add_object GRENADE (+ (x) (* (direction) 16)) (- (y) 24) 1) 119 119 (progn 120 120 (user_fun myself) … … 139 139 );; end * if 140 140 );; end droidjug_ai () 141 141 142 142 (defun jug_cons () 143 143 (setq throw_xvel 13) … … 165 165 ("aistate" ai_state)) 166 166 167 (states "addon/claudio/droid.spe" 167 (states "addon/claudio/droid.spe" 168 168 (stopped "ds0002.pcx") 169 169 (running (seq "d" 1 4)) … … 183 183 (setq fire_time (- fire_time 1)) 184 184 (if (eq fire_time 0) 185 (progn 185 (progn 186 186 (setq burst_left burst_total) 187 187 (setq burst_wait 0)))) … … 195 195 (setq burst_wait (- burst_wait 1))))) 196 196 197 (defun wrob_cons () 197 (defun wrob_cons () 198 198 (setq fire_delay 4) 199 199 (setq burst_delay 1) … … 213 213 ) 214 214 215 (if (activated) ;; ** 215 (if (activated) ;; ** 216 216 (progn ;;*** 217 217 (set_targetable T) … … 233 233 ) 234 234 );; end aistate 0 235 235 236 236 (1;; stop and fire 237 (burst_fire (+ (x) (* (direction) 16)) (- (y) 22) 237 (burst_fire (+ (x) (* (direction) 16)) (- (y) 22) 238 238 (if (> (direction) 0) 239 239 (mod (- 375 (/ (* burst_left 30) burst_total)) 360) … … 248 248 249 249 (if (<= (hp) 0) ;; are we dead, if so blow up 250 (progn 251 (add_object EXPLODE6 (+ (x) 5) (- (y) 10) 0) 250 (progn 251 (add_object EXPLODE6 (+ (x) 5) (- (y) 10) 0) 252 252 (add_object EXPLODE6 (+ (x) -5) (- (y) 15) 2) ;; wait 2 frames before appearing 253 253 (add_object EXPLODE6 (+ (x) 10) (- (y) 2) 1) … … 260 260 ) 261 261 ) 262 262 263 263 T);; end of *** progn 264 264 T);; end of ** if activated 265 265 );; end of * if 266 );; end of ai 267 266 );; end of ai 267 268 268 (def_char DROID 269 269 270 270 (funs (ai_fun droid_ai) 271 271 (constructor wrob_cons) 272 (get_cache_list_fun explo_damage_cache) 272 (get_cache_list_fun explo_damage_cache) 273 273 (damage_fun explo_damage) 274 274 );; end funs … … 278 278 );; end abilities 279 279 280 (flags (hurtable T) 280 (flags (hurtable T) 281 281 (can_block T) 282 282 (unactive_shield T) … … 285 285 (range 300 100) 286 286 287 (vars fire_delay 288 burst_delay 289 burst_total 290 burst_wait 291 burst_left 292 max_xvel 293 max_yvel 294 smoke_time 287 (vars fire_delay 288 burst_delay 289 burst_total 290 burst_wait 291 burst_left 292 max_xvel 293 max_yvel 294 smoke_time 295 295 fire_time 296 296 );; end vars … … 306 306 );; end fields 307 307 308 (states "addon/claudio/droid.spe" 308 (states "addon/claudio/droid.spe" 309 309 (stopped "ds0001.pcx") 310 310 (running (seq "d" 1 10)) … … 335 335 ) 336 336 337 (if (activated) ;; ** 337 (if (activated) ;; ** 338 338 (progn ;;*** 339 339 (set_targetable T) … … 342 342 (select (aistate) 343 343 (0;; walk toward player 344 (if (or (< (disty) -5) (> (disty) 5) (< (distx) -10) (> (distx) 10) (not (eq (direction) (toward))) ) 344 (if (or (< (disty) -5) (> (disty) 5) (< (distx) -10) (> (distx) 10) (not (eq (direction) (toward))) ) 345 345 (progn 346 346 (if (eq (mod (state_time) 6) 0) ;; play sound every 6 ticks … … 358 358 ) 359 359 );; end aistate 0 360 360 361 361 (1;; stop and eat 362 (if (or (< (disty) -5) (> (disty) 5) (< (distx) -10) (> (distx) 10) (not (eq (direction) (toward))) ) 362 (if (or (< (disty) -5) (> (disty) 5) (< (distx) -10) (> (distx) 10) (not (eq (direction) (toward))) ) 363 363 (set_aistate 0) 364 364 (progn … … 370 370 ) 371 371 (with_object (bg) 372 (if (< (hp)0) 372 (if (< (hp)0) 373 373 (set_state stopped) 374 374 ) 375 375 ) 376 376 );; end aistate 1 377 );; end select 377 );; end select 378 378 T);; end of *** progn 379 379 T);; end of ** if activated 380 380 );; end of * if 381 );; end of ai 381 );; end of ai 382 382 383 383 (def_char T_REX … … 385 385 (funs (ai_fun trex_ai) 386 386 ;; (constructor wrob_cons) 387 ;; (get_cache_list_fun explo_damage_cache) 387 ;; (get_cache_list_fun explo_damage_cache) 388 388 ;; (damage_fun explo_damage) 389 389 );; end funs … … 393 393 );; end abilities 394 394 395 (flags (hurtable T) 395 (flags (hurtable T) 396 396 (can_block T) 397 397 (unactive_shield T) … … 400 400 (range 300 100) 401 401 402 (vars fire_delay 403 burst_delay 404 burst_total 405 burst_wait 406 burst_left 407 max_xvel 408 max_yvel 409 smoke_time 402 (vars fire_delay 403 burst_delay 404 burst_total 405 burst_wait 406 burst_left 407 max_xvel 408 max_yvel 409 smoke_time 410 410 fire_time 411 411 );; end vars 412 412 413 (fields 413 (fields 414 414 ("hp" ai_health) 415 415 ("aistate" ai_state) 416 416 );; end fields 417 417 418 (states "addon/claudio/trex1.spe" 418 (states "addon/claudio/trex1.spe" 419 419 (stopped "stand") 420 420 (running (seq "w" 1 10)) … … 444 444 (defun wrob_ai () 445 445 (if (<= (hp) 0) ;; * 446 446 447 447 nil ;; inactivate this "nil" and activate the following if-section when using versions 2 and 3 448 448 … … 452 452 ;; ) 453 453 454 (if (activated) ;; ** 454 (if (activated) ;; ** 455 455 (progn ;;*** 456 456 (set_targetable T) … … 472 472 ) 473 473 );; end aistate 0 474 474 475 475 (1;; stop and fire 476 (burst_fire (+ (x) (* (direction) 16)) (- (y) 22) 476 (burst_fire (+ (x) (* (direction) 16)) (- (y) 22) 477 477 (if (> (direction) 0) 478 478 (mod (- 375 (/ (* burst_left 30) burst_total)) 360) … … 491 491 492 492 (if (<= (hp) 0) ;; are we dead, if so blow up 493 (progn 494 (add_object EXPLODE6 (+ (x) 5) (- (y) 10) 0) 493 (progn 494 (add_object EXPLODE6 (+ (x) 5) (- (y) 10) 0) 495 495 (add_object EXPLODE6 (+ (x) -5) (- (y) 15) 2) ;; wait 2 frames before appearing 496 496 (add_object EXPLODE6 (+ (x) 10) (- (y) 2) 1) … … 503 503 ) 504 504 ) 505 505 506 506 T);; end of *** progn 507 507 T);; end of ** if activated 508 508 );; end of * if 509 );; end of ai 509 );; end of ai 510 510 511 511 (def_char WALK_ROB … … 513 513 (funs (ai_fun wrob_ai) 514 514 (constructor wrob_cons) 515 (get_cache_list_fun explo_damage_cache) 515 (get_cache_list_fun explo_damage_cache) 516 516 (damage_fun explo_damage) 517 517 );; end funs 518 518 519 519 (abilities (run_top_speed 6) 520 (start_hp 70) 520 (start_hp 70) 521 521 );; end abilities 522 522 523 (flags (hurtable T) 523 (flags (hurtable T) 524 524 (can_block T) 525 525 (unactive_shield T) … … 528 528 (range 300 100) 529 529 530 (vars fire_delay 531 burst_delay 532 burst_total 533 burst_wait 534 burst_left 535 max_xvel 536 max_yvel 537 smoke_time 530 (vars fire_delay 531 burst_delay 532 burst_total 533 burst_wait 534 burst_left 535 max_xvel 536 max_yvel 537 smoke_time 538 538 fire_time 539 539 );; end vars … … 550 550 );; end fields 551 551 552 (states "addon/claudio/rob2.spe" 552 (states "addon/claudio/rob2.spe" 553 553 (stopped "wwlk0001.pcx") 554 554 (running (seq "wwlk" 1 10)) … … 561 561 );; end states 562 562 563 );; end def_char WALK_ROB 563 );; end def_char WALK_ROB 564 564 565 565 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; … … 574 574 (with_object (get_object 0) 575 575 (if (eq (otype) SPACE_DOOR) 576 (if (eq is_opening 0) 576 (if (eq is_opening 0) 577 577 (if (and (< (distx) 50) (< (disty) 40)) 578 578 T … … 599 599 (play_sound SWISH 70 (x) (y))) 600 600 (set_current_frame (- (current_frame) 1))))) 601 601 602 602 (defun tpdspace_ai () ;; teleporting door ai 603 603 (if (or (and (< (distx) 50) (< (disty) 40)) … … 615 615 (othery (with_object (get_object 0) (y)))) 616 616 (with_object (get_object 0) (link_object player)) 617 (with_object player (progn 618 (set_x otherx) 617 (with_object player (progn 618 (set_x otherx) 619 619 (set_y othery))))))) 620 620 T) … … 679 679 (do_damage 20 (bg))) 680 680 (select (aistate) 681 (0 681 (0 682 682 683 683 (if (eq (random 100) 0) … … 686 686 (set_aistate 1))) 687 687 (next_picture)) 688 (1 688 (1 689 689 690 690 (next_picture) … … 735 735 736 736 (defun sewer_ai () 737 737 738 738 (select (aistate) 739 (0 739 (0 740 740 741 741 (if (eq (random 100) 0) … … 744 744 (set_aistate 1))) 745 745 (next_picture)) 746 (1 746 (1 747 747 748 748 (next_picture) … … 759 759 (do_damage 2 (bg))) 760 760 (select (aistate) 761 (0 761 (0 762 762 763 763 (if (eq (random 100) 0) … … 766 766 (set_aistate 1))) 767 767 (next_picture)) 768 (1 768 (1 769 769 770 770 (next_picture) … … 777 777 (defun wfall_ai () 778 778 (select (aistate) 779 (0 779 (0 780 780 781 781 (if (eq (random 100) 0) … … 784 784 (set_aistate 1))) 785 785 (next_picture)) 786 (1 786 (1 787 787 788 788 (next_picture) … … 849 849 850 850 (def_char LAMP_EX1 851 851 852 852 (funs (ai_fun exlamp_ai)) 853 853 (flags (can_block T) … … 859 859 860 860 861 (defun slamp_ai () 861 (defun slamp_ai () 862 862 (if (activated) 863 863 (set_state running) … … 869 869 (def_char LAMP_BIG 870 870 (funs (ai_fun slamp_ai)) 871 (states "addon/claudio/lamp.spe" 871 (states "addon/claudio/lamp.spe" 872 872 (stopped "l0002.pcx") 873 873 (running "l0001.pcx") … … 892 892 (funs (ai_fun switcher_ai) 893 893 (reload_fun lower_reload)) 894 (range 0 0) 894 (range 0 0) 895 895 (states "addon/claudio/sswitch.spe" 896 896 (stopped '("ssw0001" "ssw0002")) … … 913 913 914 914 (defun dumbrel_ai () 915 916 (if (not (eq smoke_time 0)) 915 916 (if (not (eq smoke_time 0)) 917 917 (progn 918 918 (setq smoke_time (- smoke_time 1)) … … 920 920 (add_object SMALL_DARK_CLOUD (x) (y))))) 921 921 922 (if (eq (aistate) 0) 922 (if (eq (aistate) 0) 923 923 (if (or (eq (total_objects) 0) (not (eq (with_object (get_object 0) (aistate)) 0))) 924 924 (if (next_picture) T … … 931 931 (set_state stopped) 932 932 T)) 933 (if (eq (hp) 0) 933 (if (eq (hp) 0) 934 934 (progn 935 935 (play_sound GRENADE_SND 127 (x) (y)) … … 938 938 (add_object EXPLODE1 (x) (+ (- (y) (random 20)) -20) 4) 939 939 nil) 940 (progn 941 (if (eq (mod (state_time) 5) 0) 940 (progn 941 (if (eq (mod (state_time) 5) 0) 942 942 (play_sound DRILL_SND 127 (x) (y))) 943 (if (> (with_object (bg) (x)) (x)) 943 (if (> (with_object (bg) (x)) (x)) 944 944 (progn 945 945 (set_xvel (+ (xvel) 1)) … … 949 949 (set_direction 1) 950 950 (set_state turn_around)))) 951 (if (< (with_object (bg) (x)) (x)) 951 (if (< (with_object (bg) (x)) (x)) 952 952 (progn 953 953 (set_xvel (- (xvel) 1)) … … 967 967 (set_yvel (- (yvel) 1))))) 968 968 969 (if (eq (random 5) 0) 969 (if (eq (random 5) 0) 970 970 (set_xvel (+ (xvel) 1)) 971 971 (if (eq (random 5) 0) … … 976 976 (set_yvel (- (yvel) 1)))) 977 977 978 (if (next_picture) T (set_state running)) 979 978 (if (next_picture) T (set_state running)) 979 980 980 (bounce_move '(set_xvel (/ (xvel) 2)) '(set_xvel (/ (xvel) 2)) 981 981 '(set_yvel (/ (yvel) 2)) '(set_yvel (/ (yvel) 2)) nil) 982 982 983 983 (if (> fire_time 0) ;; if we need to wait till next burst 984 984 (progn 985 985 (setq fire_time (- fire_time 1)) 986 986 (if (eq fire_time 0) 987 (progn 987 (progn 988 988 (setq burst_left burst_total) 989 989 (setq burst_wait 0)))) … … 1002 1002 (setq burst_left (- burst_left 1))) 1003 1003 (setq burst_wait burst_delay) 1004 (fire_object (me) (aitype) firex firey angle (bg)) 1004 (fire_object (me) (aitype) firex firey angle (bg)) 1005 1005 ))))) 1006 (setq burst_wait (- burst_wait 1)))) 1006 (setq burst_wait (- burst_wait 1)))) 1007 1007 T)))) 1008 1008 1009 1009 (defun dumbrel_damage (amount from hitx hity push_xvel push_yvel) 1010 (if (and from (with_object from (and (> (total_objects) 0) 1011 (with_object (get_object 0) 1010 (if (and from (with_object from (and (> (total_objects) 0) 1011 (with_object (get_object 0) 1012 1012 (or (eq (otype) FLYER) 1013 1013 (eq (otype) GREEN_FLYER)) … … 1037 1037 )))) 1038 1038 1039 (defun dumbrel_cons () 1039 (defun dumbrel_cons () 1040 1040 (setq fire_delay 20) 1041 1041 (setq burst_delay 5) … … 1049 1049 (funs (ai_fun dumbrel_ai) 1050 1050 (constructor dumbrel_cons) 1051 (get_cache_list_fun explo_damage_cache) 1051 (get_cache_list_fun explo_damage_cache) 1052 1052 (damage_fun dumbrel_damage) 1053 1053 );; end funs 1054 1054 1055 (abilities (start_hp 100) 1055 (abilities (start_hp 100) 1056 1056 );; end abilities 1057 1057 1058 (flags (hurtable T) 1058 (flags (hurtable T) 1059 1059 (can_block T) 1060 1060 (unactive_shield T) … … 1063 1063 (range 300 100) 1064 1064 1065 (vars fire_delay 1066 burst_delay 1067 burst_total 1068 burst_wait 1069 burst_left 1070 max_xvel 1071 max_yvel 1072 smoke_time 1065 (vars fire_delay 1066 burst_delay 1067 burst_total 1068 burst_wait 1069 burst_left 1070 max_xvel 1071 max_yvel 1072 smoke_time 1073 1073 fire_time 1074 1074 );; end vars 1075 1075 1076 (states "addon/claudio/umbrel3.spe" 1076 (states "addon/claudio/umbrel3.spe" 1077 1077 (stopped "u0001.pcx") 1078 1078 (running (seq "u" 1 4)) … … 1080 1080 );; end states 1081 1081 1082 );; end def_char 1082 );; end def_char 1083 1083 1084 1084 … … 1091 1091 (defun antship_ai () 1092 1092 1093 (if (not (eq smoke_time 0)) 1093 (if (not (eq smoke_time 0)) 1094 1094 (progn 1095 1095 (setq smoke_time (- smoke_time 1)) … … 1115 1115 T) 1116 1116 ) 1117 1117 1118 1118 (if (<= (hp) 0) 1119 1119 1120 1120 (progn 1121 1121 … … 1123 1123 (next_picture) 1124 1124 1125 (progn 1125 (progn