Changeset 582 for abuse/trunk/data-frabs
- Timestamp:
- May 6, 2011, 12:47:14 AM (12 years ago)
- Location:
- abuse/trunk/data-frabs
- Files:
-
- 70 edited
Legend:
- Unmodified
- Added
- Removed
-
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 1126 1126 (set_state dieing) 1127 1127 (play_sound GRENADE_SND 127 (x) (y)) … … 1131 1131 ) 1132 1132 1133 ) 1133 ) 1134 1134 ) 1135 (progn 1135 (progn 1136 1136 (if (eq (mod (state_time) 5) 0) 1137 1137 (play_sound ASHIP_SND 127 (x) (y)) … … 1140 1140 (progn 1141 1141 (set_xvel (+ (xvel) 1)) 1142 (if (> (xvel) max_xvel) 1142 (if (> (xvel) max_xvel) 1143 1143 (set_xvel max_xvel) 1144 1144 ) … … 1150 1150 ) 1151 1151 ) 1152 (if (< (with_object (bg) (x)) (x)) 1152 (if (< (with_object (bg) (x)) (x)) 1153 1153 (progn 1154 1154 (set_xvel (- (xvel) 1)) 1155 (if (< (xvel) (- 0 max_xvel)) 1155 (if (< (xvel) (- 0 max_xvel)) 1156 1156 (set_xvel (- 0 max_xvel)) 1157 1157 ) … … 1179 1179 ) 1180 1180 1181 (if (eq (random 5) 0) 1181 (if (eq (random 5) 0) 1182 1182 (set_xvel (+ (xvel) 1)) 1183 1183 (if (eq (random 5) 0) … … 1188 1188 (set_yvel (- (yvel) 1)))) 1189 1189 1190 (if (next_picture) T (set_state running)) 1191 1190 (if (next_picture) T (set_state running)) 1191 1192 1192 (bounce_move '(set_xvel (/ (xvel) 8)) '(set_xvel (/ (xvel) 8)) 1193 1193 '(set_yvel (/ (yvel) 8)) '(set_yvel (/ (yvel) 8)) nil) 1194 1195 (if (> fire_time 0) 1194 1195 (if (> fire_time 0) 1196 1196 (progn 1197 1197 (setq fire_time (- fire_time 1)) 1198 1198 (if (eq fire_time 0) 1199 (progn 1199 (progn 1200 1200 (setq burst_left burst_total) 1201 1201 (setq burst_wait 0)))) … … 1214 1214 (setq burst_left (- burst_left 1))) 1215 1215 (setq burst_wait burst_delay) 1216 (fire_object (me) (aitype) firex firey angle (bg)) 1216 (fire_object (me) (aitype) firex firey angle (bg)) 1217 1217 ))))) 1218 (setq burst_wait (- burst_wait 1)))) 1218 (setq burst_wait (- burst_wait 1)))) 1219 1219 T))) 1220 1220 … … 1222 1222 1223 1223 (defun antship_damage (amount from hitx hity push_xvel push_yvel) 1224 (if (and from (with_object from (and (> (total_objects) 0) 1225 (with_object (get_object 0) 1224 (if (and from (with_object from (and (> (total_objects) 0) 1225 (with_object (get_object 0) 1226 1226 (or (eq (otype) FLYER) 1227 1227 (eq (otype) GREEN_FLYER)) … … 1254 1254 )))) 1255 1255 1256 (defun antship_cons () 1256 (defun antship_cons () 1257 1257 (setq fire_delay 30) 1258 1258 (setq burst_delay 8) … … 1268 1268 (funs (ai_fun antship_ai) 1269 1269 (constructor antship_cons) 1270 (get_cache_list_fun explo_damage_cache) 1270 (get_cache_list_fun explo_damage_cache) 1271 1271 (damage_fun antship_damage) 1272 1272 );; end funs 1273 1273 1274 (abilities (start_hp 300) 1274 (abilities (start_hp 300) 1275 1275 );; end abilities 1276 1276 1277 (flags (hurtable T) 1277 (flags (hurtable T) 1278 1278 (can_block T) 1279 1279 (unactive_shield T) … … 1282 1282 (range 400 200) 1283 1283 1284 (vars fire_delay 1285 burst_delay 1286 burst_total 1287 burst_wait 1288 burst_left 1289 max_xvel 1290 max_yvel 1291 smoke_time 1284 (vars fire_delay 1285 burst_delay 1286 burst_total 1287 burst_wait 1288 burst_left 1289 max_xvel 1290 max_yvel 1291 smoke_time 1292 1292 fire_time 1293 1293 );; end vars 1294 1294 1295 (states "addon/claudio/antship.spe" 1295 (states "addon/claudio/antship.spe" 1296 1296 (stopped "s0001.pcx") 1297 1297 (running (seq "s" 2 6)) … … 1300 1300 );; end states 1301 1301 1302 );; end def_char 1302 );; end def_char 1303 1303 1304 1304 … … 1310 1310 1311 1311 (defun dskull_ai () 1312 (if (not (eq smoke_time 0)) 1312 (if (not (eq smoke_time 0)) 1313 1313 (progn 1314 1314 (setq smoke_time (- smoke_time 1)) … … 1319 1319 ) 1320 1320 1321 (if (eq (aistate) 0) 1321 (if (eq (aistate) 0) 1322 1322 (if (or (eq (total_objects) 0) (not (eq (with_object (get_object 0) (aistate)) 0))) 1323 1323 (if (next_picture) T … … 1330 1330 (set_state stopped) 1331 1331 T)) 1332 (if (eq (hp) 0) 1332 (if (eq (hp) 0) 1333 1333 (progn 1334 1334 (play_sound GRENADE_SND 127 (x) (y)) … … 1337 1337 (add_object EXPLODE1 (x) (+ (- (y) (random 20)) -20) 4) 1338 1338 nil) 1339 (progn 1340 (if (eq (mod (state_time) 10) 0) 1339 (progn 1340 (if (eq (mod (state_time) 10) 0) 1341 1341 (play_sound SKULL_SND 127 (x) (y))) 1342 (if (> (with_object (bg) (x)) (x)) 1342 (if (> (with_object (bg) (x)) (x)) 1343 1343 (progn 1344 1344 (set_xvel (+ (xvel) 1)) … … 1348 1348 (set_direction 1) 1349 1349 (set_state turn_around)))) 1350 (if (< (with_object (bg) (x)) (x)) 1350 (if (< (with_object (bg) (x)) (x)) 1351 1351 (progn 1352 1352 (set_xvel (- (xvel) 1)) … … 1366 1366 (set_yvel (- (yvel) 1))))) 1367 1367 1368 (if (eq (random 5) 0) 1368 (if (eq (random 5) 0) 1369 1369 (set_xvel (+ (xvel) 1)) 1370 1370 (if (eq (random 5) 0) … … 1375 1375 (set_yvel (- (yvel) 1)))) 1376 1376 1377 (if (next_picture) T (set_state running)) 1378 1377 (if (next_picture) T (set_state running)) 1378 1379 1379 (bounce_move '(set_xvel (/ (xvel) 2)) '(set_xvel (/ (xvel) 2)) 1380 1380 '(set_yvel (/ (yvel) 2)) '(set_yvel (/ (yvel) 2)) nil) 1381 1382 (if (> fire_time 0) 1381 1382 (if (> fire_time 0) 1383 1383 (progn 1384 1384 (setq fire_time (- fire_time 1)) 1385 1385 (if (eq fire_time 0) 1386 (progn 1386 (progn 1387 1387 (setq burst_left burst_total) 1388 1388 (setq burst_wait 0)))) … … 1401 1401 (setq burst_left (- burst_left 1))) 1402 1402 (setq burst_wait burst_delay) 1403 (fire_object (me) (aitype) firex firey angle (bg)) 1403 (fire_object (me) (aitype) firex firey angle (bg)) 1404 1404 ))))) 1405 (setq burst_wait (- burst_wait 1)))) 1405 (setq burst_wait (- burst_wait 1)))) 1406 1406 T)))) 1407 1407 1408 1408 1409 1409 (defun dskull_damage (amount from hitx hity push_xvel push_yvel) 1410 (if (and from (with_object from (and (> (total_objects) 0) 1411 (with_object (get_object 0) 1410 (if (and from (with_object from (and (> (total_objects) 0) 1411 (with_object (get_object 0) 1412 1412 (or (eq (otype) FLYER) 1413 1413 (eq (otype) GREEN_FLYER)) … … 1429 1429 )))) 1430 1430 1431 (defun dskull_cons () 1431 (defun dskull_cons () 1432 1432 (setq fire_delay 20) 1433 1433 (setq burst_delay 5) … … 1441 1441 (funs (ai_fun dskull_ai) 1442 1442 (constructor dskull_cons) 1443 (get_cache_list_fun explo_damage_cache) 1443 (get_cache_list_fun explo_damage_cache) 1444 1444 (damage_fun dskull_damage) 1445 1445 );; end funs 1446 1446 1447 (abilities (start_hp 100) 1447 (abilities (start_hp 100) 1448 1448 );; end abilities 1449 1449 1450 (flags (hurtable T) 1450 (flags (hurtable T) 1451 1451 (can_block T) 1452 1452 (unactive_shield T) … … 1455 1455 (range 300 100) 1456 1456 1457 (vars fire_delay 1458 burst_delay 1459 burst_total 1460 burst_wait 1461 burst_left 1462 max_xvel 1463 max_yvel 1464 smoke_time 1457 (vars fire_delay 1458 burst_delay 1459 burst_total 1460 burst_wait 1461 burst_left 1462 max_xvel 1463 max_yvel 1464 smoke_time 1465 1465 fire_time 1466 1466 );; end vars 1467 1467 1468 (states "addon/claudio/skull.spe" 1468 (states "addon/claudio/skull.spe" 1469 1469 (stopped "s0001.pcx") 1470 (running '("s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1471 "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" 1472 "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1470 (running '("s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1471 "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" 1472 "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1473 1473 "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx")) 1474 1474 (flinch_up (seq "s" 2 18)) … … 1477 1477 );; end states 1478 1478 1479 );; end def_char 1479 );; end def_char 1480 1480 1481 1481 (def_explo 'EXPLODE0 "addon/claudio/bigexp.spe" "fire" 7) … … 1490 1490 (load_tiles 1491 1491 "addon/claudio/pal81f.spe" ;; space foretiles 1, numbered from 2200, palette space1 1492 "addon/claudio/pal82f.spe" ;; space foretiles 2, numbered from 2250, palette space2 1493 ;; "addon/claudio/pal83.spe" ;; space foretiles 3, numbered from 8300, palette space3 1492 "addon/claudio/pal82f.spe" ;; space foretiles 2, numbered from 2250, palette space2 1493 ;; "addon/claudio/pal83.spe" ;; space foretiles 3, numbered from 8300, palette space3 1494 1494 "addon/claudio/pal90.spe" ;; stars backtiles 1, numbered from 475, 1495 1495 "addon/claudio/pal2.spe" ;; sewers backtiles, numbered from 380, 1496 "addon/claudio/pal21.spe" ;; stars backtiles 2, numbered from 500, 1497 "addon/claudio/pal5.spe" ;; corallo backtiles, numbered from 430, 1496 "addon/claudio/pal21.spe" ;; stars backtiles 2, numbered from 500, 1497 "addon/claudio/pal5.spe" ;; corallo backtiles, numbered from 430, 1498 1498 ;; "addon/claudio/extiles.spe" ;; extra foretiles, numbered from 10000, palette extra1 1499 1499 ) … … 1512 1512 ;; Contact these authors if you want to get more infor about their work. ;; 1513 1513 ;; Otherwise, deactivate ;; 1514 ;; the following section as indicated below in order to use the characters ;; 1514 ;; the following section as indicated below in order to use the characters ;; 1515 1515 ;; and tiles by Claudio Bolzoni only. ;; 1516 1516 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -
abuse/trunk/data-frabs/addon/claudio/oldclaud.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 564 563 );; end def_char WALK_ROB 564 565 565 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 566 566 ;; ;; … … 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") … … 878 878 (def_char LAMP_SMALL ;; original art by Craig Redinger 879 879 (funs (ai_fun slamp_ai)) 880 (states "addon/craig/craig.spe" 880 (states "addon/craig/craig.spe" 881 881 (stopped "lamp_off") 882 882 (running "lamp_on") … … 890 890 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 891 891 892 (defun antihp_up () 892 (defun antihp_up () 893 893 (next_picture) 894 894 … … 921 921 (funs (ai_fun switcher_ai) 922 922 (reload_fun lower_reload)) 923 (range 0 0) 923 (range 0 0) 924 924 (states "addon/claudio/sswitch.spe" 925 925 (stopped '("ssw0001" "ssw0002")) … … 946 946 947 947 (defun dumbrel_ai () 948 949 (if (not (eq smoke_time 0)) 948 949 (if (not (eq smoke_time 0)) 950 950 (progn 951 951 (setq smoke_time (- smoke_time 1)) … … 953 953 (add_object SMALL_DARK_CLOUD (x) (y))))) 954 954 955 (if (eq (aistate) 0) 955 (if (eq (aistate) 0) 956 956 (if (or (eq (total_objects) 0) (not (eq (with_object (get_object 0) (aistate)) 0))) 957 957 (if (next_picture) T … … 964 964 (set_state stopped) 965 965 T)) 966 (if (eq (hp) 0) 966 (if (eq (hp) 0) 967 967 (progn 968 968 (play_sound GRENADE_SND 127 (x) (y)) … … 971 971 (add_object EXPLODE1 (x) (+ (- (y) (random 20)) -20) 4) 972 972 nil) 973 (progn 974 (if (eq (mod (state_time) 5) 0) 973 (progn 974 (if (eq (mod (state_time) 5) 0) 975 975 (play_sound DRILL_SND 127 (x) (y))) 976 (if (> (with_object (bg) (x)) (x)) 976 (if (> (with_object (bg) (x)) (x)) 977 977 (progn 978 978 (set_xvel (+ (xvel) 1)) … … 982 982 (set_direction 1) 983 983 (set_state turn_around)))) 984 (if (< (with_object (bg) (x)) (x)) 984 (if (< (with_object (bg) (x)) (x)) 985 985 (progn 986 986 (set_xvel (- (xvel) 1)) … … 1000 1000 (set_yvel (- (yvel) 1))))) 1001 1001 1002 (if (eq (random 5) 0) 1002 (if (eq (random 5) 0) 1003 1003 (set_xvel (+ (xvel) 1)) 1004 1004 (if (eq (random 5) 0) … … 1009 1009 (set_yvel (- (yvel) 1)))) 1010 1010 1011 (if (next_picture) T (set_state running)) 1012 1011 (if (next_picture) T (set_state running)) 1012 1013 1013 (bounce_move '(set_xvel (/ (xvel) 2)) '(set_xvel (/ (xvel) 2)) 1014 1014 '(set_yvel (/ (yvel) 2)) '(set_yvel (/ (yvel) 2)) nil) 1015 1015 1016 1016 (if (> fire_time 0) ;; if we need to wait till next burst 1017 1017 (progn 1018 1018 (setq fire_time (- fire_time 1)) 1019 1019 (if (eq fire_time 0) 1020 (progn 1020 (progn 1021 1021 (setq burst_left burst_total) 1022 1022 (setq burst_wait 0)))) … … 1035 1035 (setq burst_left (- burst_left 1))) 1036 1036 (setq burst_wait burst_delay) 1037 (fire_object (me) (aitype) firex firey angle (bg)) 1037 (fire_object (me) (aitype) firex firey angle (bg)) 1038 1038 ))))) 1039 (setq burst_wait (- burst_wait 1)))) 1039 (setq burst_wait (- burst_wait 1)))) 1040 1040 T)))) 1041 1041 1042 1042 (defun dumbrel_damage (amount from hitx hity push_xvel push_yvel) 1043 (if (and from (with_object from (and (> (total_objects) 0) 1044 (with_object (get_object 0) 1043 (if (and from (with_object from (and (> (total_objects) 0) 1044 (with_object (get_object 0) 1045 1045 (or (eq (otype) FLYER) 1046 1046 (eq (otype) GREEN_FLYER)) … … 1070 1070 )))) 1071 1071 1072 (defun dumbrel_cons () 1072 (defun dumbrel_cons () 1073 1073 (setq fire_delay 20) 1074 1074 (setq burst_delay 5) … … 1082 1082 (funs (ai_fun dumbrel_ai) 1083 1083 (constructor dumbrel_cons) 1084 (get_cache_list_fun explo_damage_cache) 1084 (get_cache_list_fun explo_damage_cache) 1085 1085 (damage_fun dumbrel_damage) 1086 1086 );; end funs 1087 1087 1088 (abilities (start_hp 100) 1088 (abilities (start_hp 100) 1089 1089 );; end abilities 1090 1090 1091 (flags (hurtable T) 1091 (flags (hurtable T) 1092 1092 (can_block T) 1093 1093 (unactive_shield T) … … 1096 1096 (range 300 100) 1097 1097 1098 (vars fire_delay 1099 burst_delay 1100 burst_total 1101 burst_wait 1102 burst_left 1103 max_xvel 1104 max_yvel 1105 smoke_time 1098 (vars fire_delay 1099 burst_delay 1100 burst_total 1101 burst_wait 1102 burst_left 1103 max_xvel 1104 max_yvel 1105 smoke_time 1106 1106 fire_time 1107 1107 );; end vars 1108 1108 1109 (states "addon/claudio/umbrel3.spe" 1109 (states "addon/claudio/umbrel3.spe" 1110 1110 (stopped "u0001.pcx") 1111 1111 (running (seq "u" 1 4)) … … 1113 1113 );; end states 1114 1114 1115 );; end def_char 1115 );; end def_char 1116 1116 1117 1117 … … 1124 1124 (defun antship_ai () 1125 1125 1126 (if (not (eq smoke_time 0)) 1126 (if (not (eq smoke_time 0)) 1127 1127 (progn 1128 1128 (setq smoke_time (- smoke_time 1)) … … 1148 1148 T) 1149 1149 ) 1150 1150 1151 1151 (if (<= (hp) 0) 1152 1152 1153 1153 (progn 1154 1154 … … 1156 1156 (next_picture) 1157 1157 1158 (progn 1158 (progn 1159 1159 (set_state dieing) 1160 1160 (play_sound GRENADE_SND 127 (x) (y)) … … 1164 1164 ) 1165 1165 1166 ) 1166 ) 1167 1167 ) 1168 (progn 1168 (progn 1169 1169 (if (eq (mod (state_time) 5) 0) 1170 1170 (play_sound ASHIP_SND 127 (x) (y)) … … 1173 1173 (progn 1174 1174 (set_xvel (+ (xvel) 1)) 1175 (if (> (xvel) max_xvel) 1175 (if (> (xvel) max_xvel) 1176 1176 (set_xvel max_xvel) 1177 1177 ) … … 1183 1183 ) 1184 1184 ) 1185 (if (< (with_object (bg) (x)) (x)) 1185 (if (< (with_object (bg) (x)) (x)) 1186 1186 (progn 1187 1187 (set_xvel (- (xvel) 1)) 1188 (if (< (xvel) (- 0 max_xvel)) 1188 (if (< (xvel) (- 0 max_xvel)) 1189 1189 (set_xvel (- 0 max_xvel)) 1190 1190 ) … … 1212 1212 ) 1213 1213 1214 (if (eq (random 5) 0) 1214 (if (eq (random 5) 0) 1215 1215 (set_xvel (+ (xvel) 1)) 1216 1216 (if (eq (random 5) 0) … … 1221 1221 (set_yvel (- (yvel) 1)))) 1222 1222 1223 (if (next_picture) T (set_state running)) 1224 1223 (if (next_picture) T (set_state running)) 1224 1225 1225 (bounce_move '(set_xvel (/ (xvel) 8)) '(set_xvel (/ (xvel) 8)) 1226 1226 '(set_yvel (/ (yvel) 8)) '(set_yvel (/ (yvel) 8)) nil) 1227 1228 (if (> fire_time 0) 1227 1228 (if (> fire_time 0) 1229 1229 (progn 1230 1230 (setq fire_time (- fire_time 1)) 1231 1231 (if (eq fire_time 0) 1232 (progn 1232 (progn 1233 1233 (setq burst_left burst_total) 1234 1234 (setq burst_wait 0)))) … … 1247 1247 (setq burst_left (- burst_left 1))) 1248 1248 (setq burst_wait burst_delay) 1249 (fire_object (me) (aitype) firex firey angle (bg)) 1249 (fire_object (me) (aitype) firex firey angle (bg)) 1250 1250 ))))) 1251 (setq burst_wait (- burst_wait 1)))) 1251 (setq burst_wait (- burst_wait 1)))) 1252 1252 T))) 1253 1253 … … 1255 1255 1256 1256 (defun antship_damage (amount from hitx hity push_xvel push_yvel) 1257 (if (and from (with_object from (and (> (total_objects) 0) 1258 (with_object (get_object 0) 1257 (if (and from (with_object from (and (> (total_objects) 0) 1258 (with_object (get_object 0) 1259 1259 (or (eq (otype) FLYER) 1260 1260 (eq (otype) GREEN_FLYER)) … … 1287 1287 )))) 1288 1288 1289 (defun antship_cons () 1289 (defun antship_cons () 1290 1290 (setq fire_delay 30) 1291 1291 (setq burst_delay 8) … … 1301 1301 (funs (ai_fun antship_ai) 1302 1302 (constructor antship_cons) 1303 (get_cache_list_fun explo_damage_cache) 1303 (get_cache_list_fun explo_damage_cache) 1304 1304 (damage_fun antship_damage) 1305 1305 );; end funs 1306 1306 1307 (abilities (start_hp 300) 1307 (abilities (start_hp 300) 1308 1308 );; end abilities 1309 1309 1310 (flags (hurtable T) 1310 (flags (hurtable T) 1311 1311 (can_block T) 1312 1312 (unactive_shield T) … … 1315 1315 (range 400 200) 1316 1316 1317 (vars fire_delay 1318 burst_delay 1319 burst_total 1320 burst_wait 1321 burst_left 1322 max_xvel 1323 max_yvel 1324 smoke_time 1317 (vars fire_delay 1318 burst_delay 1319 burst_total 1320 burst_wait 1321 burst_left 1322 max_xvel 1323 max_yvel 1324 smoke_time 1325 1325 fire_time 1326 1326 );; end vars 1327 1327 1328 (states "addon/claudio/antship.spe" 1328 (states "addon/claudio/antship.spe" 1329 1329 (stopped "s0001.pcx") 1330 1330 (running (seq "s" 2 6)) … … 1333 1333 );; end states 1334 1334 1335 );; end def_char 1335 );; end def_char 1336 1336 1337 1337 … … 1343 1343 1344 1344 (defun dskull_ai () 1345 (if (not (eq smoke_time 0)) 1345 (if (not (eq smoke_time 0)) 1346 1346 (progn 1347 1347 (setq smoke_time (- smoke_time 1)) … … 1352 1352 ) 1353 1353 1354 (if (eq (aistate) 0) 1354 (if (eq (aistate) 0) 1355 1355 (if (or (eq (total_objects) 0) (not (eq (with_object (get_object 0) (aistate)) 0))) 1356 1356 (if (next_picture) T … … 1363 1363 (set_state stopped) 1364 1364 T)) 1365 (if (eq (hp) 0) 1365 (if (eq (hp) 0) 1366 1366 (progn 1367 1367 (play_sound GRENADE_SND 127 (x) (y)) … … 1370 1370 (add_object EXPLODE1 (x) (+ (- (y) (random 20)) -20) 4) 1371 1371 nil) 1372 (progn 1373 (if (eq (mod (state_time) 10) 0) 1372 (progn 1373 (if (eq (mod (state_time) 10) 0) 1374 1374 (play_sound SKULL_SND 127 (x) (y))) 1375 (if (> (with_object (bg) (x)) (x)) 1375 (if (> (with_object (bg) (x)) (x)) 1376 1376 (progn 1377 1377 (set_xvel (+ (xvel) 1)) … … 1381 1381 (set_direction 1) 1382 1382 (set_state turn_around)))) 1383 (if (< (with_object (bg) (x)) (x)) 1383 (if (< (with_object (bg) (x)) (x)) 1384 1384 (progn 1385 1385 (set_xvel (- (xvel) 1)) … … 1399 1399 (set_yvel (- (yvel) 1))))) 1400 1400 1401 (if (eq (random 5) 0) 1401 (if (eq (random 5) 0) 1402 1402 (set_xvel (+ (xvel) 1)) 1403 1403 (if (eq (random 5) 0) … … 1408 1408 (set_yvel (- (yvel) 1)))) 1409 1409 1410 (if (next_picture) T (set_state running)) 1411 1410 (if (next_picture) T (set_state running)) 1411 1412 1412 (bounce_move '(set_xvel (/ (xvel) 2)) '(set_xvel (/ (xvel) 2)) 1413 1413 '(set_yvel (/ (yvel) 2)) '(set_yvel (/ (yvel) 2)) nil) 1414 1415 (if (> fire_time 0) 1414 1415 (if (> fire_time 0) 1416 1416 (progn 1417 1417 (setq fire_time (- fire_time 1)) 1418 1418 (if (eq fire_time 0) 1419 (progn 1419 (progn 1420 1420 (setq burst_left burst_total) 1421 1421 (setq burst_wait 0)))) … … 1434 1434 (setq burst_left (- burst_left 1))) 1435 1435 (setq burst_wait burst_delay) 1436 (fire_object (me) (aitype) firex firey angle (bg)) 1436 (fire_object (me) (aitype) firex firey angle (bg)) 1437 1437 ))))) 1438 (setq burst_wait (- burst_wait 1)))) 1438 (setq burst_wait (- burst_wait 1)))) 1439 1439 T)))) 1440 1440 1441 1441 1442 1442 (defun dskull_damage (amount from hitx hity push_xvel push_yvel) 1443 (if (and from (with_object from (and (> (total_objects) 0) 1444 (with_object (get_object 0) 1443 (if (and from (with_object from (and (> (total_objects) 0) 1444 (with_object (get_object 0) 1445 1445 (or (eq (otype) FLYER) 1446 1446 (eq (otype) GREEN_FLYER)) … … 1462 1462 )))) 1463 1463 1464 (defun dskull_cons () 1464 (defun dskull_cons () 1465 1465 (setq fire_delay 20) 1466 1466 (setq burst_delay 5) … … 1474 1474 (funs (ai_fun dskull_ai) 1475 1475 (constructor dskull_cons) 1476 (get_cache_list_fun explo_damage_cache) 1476 (get_cache_list_fun explo_damage_cache) 1477 1477 (damage_fun dskull_damage) 1478 1478 );; end funs 1479 1479 1480 (abilities (start_hp 100) 1480 (abilities (start_hp 100) 1481 1481 );; end abilities 1482 1482 1483 (flags (hurtable T) 1483 (flags (hurtable T) 1484 1484 (can_block T) 1485 1485 (unactive_shield T) … … 1488 1488 (range 300 100) 1489 1489 1490 (vars fire_delay 1491 burst_delay 1492 burst_total 1493 burst_wait 1494 burst_left 1495 max_xvel 1496 max_yvel 1497 smoke_time 1490 (vars fire_delay 1491 burst_delay 1492 burst_total 1493 burst_wait 1494 burst_left 1495 max_xvel 1496 max_yvel 1497 smoke_time 1498 1498 fire_time 1499 1499 );; end vars 1500 1500 1501 (states "addon/claudio/skull.spe" 1501 (states "addon/claudio/skull.spe" 1502 1502 (stopped "s0001.pcx") 1503 (running '("s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1504 "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" 1505 "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1503 (running '("s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1504 "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" "s0002.pcx" 1505 "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" "s0001.pcx" 1506 1506 "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx" "s0024.pcx")) 1507 1507 (flinch_up (seq "s" 2 18)) … … 1510 1510 );; end states 1511 1511 1512 );; end def_char 1512 );; end def_char 1513 1513 1514 1514 (def_explo 'EXPLODE0 "addon/claudio/bigexp.spe" "fire" 7) … … 1523 1523 (load_tiles 1524 1524 "addon/claudio/pal81.spe" ;; space foretiles 1, numbered from 8100, palette space1 1525 "addon/claudio/pal82.spe" ;; space foretiles 2, numbered from 8200, palette space2 1526 ;; "addon/claudio/pal83.spe" ;; space foretiles 3, numbered from 8300, palette space3 1525 "addon/claudio/pal82.spe" ;; space foretiles 2, numbered from 8200, palette space2 1526 ;; "addon/claudio/pal83.spe" ;; space foretiles 3, numbered from 8300, palette space3 1527 1527 "addon/claudio/pal90.spe" ;; stars backtiles 1, numbered from 9000, 1528 1528 "addon/claudio/pal2.spe" ;; sewers backtiles, numbered from 2000, 1529 "addon/claudio/pal21.spe" ;; stars backtiles 2, numbered from 2100, 1530 "addon/claudio/pal5.spe" ;; corallo backtiles, numbered from 5000, 1529 "addon/claudio/pal21.spe" ;; stars backtiles 2, numbered from 2100, 1530 "addon/claudio/pal5.spe" ;; corallo backtiles, numbered from 5000, 1531 1531 "addon/claudio/extiles.spe" ;; extra foretiles, numbered from 10000, palette extra1 1532 1532 ) … … 1545 1545 ;; Contact these authors if you want to get more infor about their work. ;; 1546 1546 ;; Otherwise, deactivate ;; 1547 ;; the following section as indicated below in order to use the characters ;; 1547 ;; the following section as indicated below in order to use the characters ;; 1548 1548 ;; and tiles by Claudio Bolzoni only. ;; 1549 1549 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -
abuse/trunk/data-frabs/addon/deathmat/deathmat.lsp
r566 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-frabs/addon/deathmat/dstartup.lsp
r566 r582 10 10 (load "addon/deathmat/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 "addon/deathmat/cur_lev.lsp" "wb" 14 (open_file "addon/deathmat/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 "addon/deathmat/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-frabs/addon/deathmat/large.lsp
r566 r582 1 (select (random 4) 2 (0 (setq net_levels 1 (select (random 4) 2 (0 (setq net_levels 3 3 '("netlevel/limeston.spe" 4 4 "netlevel/bugs.spe" 5 5 "netlevel/jdm3.spe"))) 6 (1 (setq net_levels 6 (1 (setq net_levels 7 7 '("netlevel/bugs.spe" 8 8 "netlevel/limeston.spe" 9 9 "netlevel/jdm3.spe"))) 10 (2 (setq net_levels 10 (2 (setq net_levels 11 11 '("netlevel/limeston.spe" 12 12 "netlevel/jdm3.spe" 13 13 "netlevel/bugs.spe"))) 14 (3 (setq net_levels 14 (3 (setq net_levels 15 15 '("netlevel/jdm3.spe" 16 16 "netlevel/bugs.spe" 17 "netlevel/limeston.spe"))) 18 ) 17 "netlevel/limeston.spe"))) 18 ) -
abuse/trunk/data-frabs/addon/deathmat/medium.lsp
r566 r582 1 (select (random 4) 2 (0 (setq net_levels 1 (select (random 4) 2 (0 (setq net_levels 3 3 '("netlevel/spacymed.spe" 4 4 "netlevel/teardrop.spe" … … 8 8 "netlevel/bugsmed.spe" 9 9 "netlevel/00dm.spe"))) 10 (1 (setq net_levels 10 (1 (setq net_levels 11 11 '("netlevel/aquarius.spe" 12 12 "netlevel/madrace.spe" … … 16 16 "netlevel/00dm.spe" 17 17 "netlevel/spacymed.spe"))) 18 (2 (setq net_levels 18 (2 (setq net_levels 19 19 '("netlevel/laazrckt.spe" 20 20 "netlevel/00dm.spe" … … 24 24 "netlevel/teardrop.spe" 25 25 "netlevel/madrace.spe"))) 26 (3 (setq net_levels 26 (3 (setq net_levels 27 27 '("netlevel/teardrop.spe" 28 28 "netlevel/laazrckt.spe" … … 32 32 "netlevel/madrace.spe" 33 33 "netlevel/aquarius.spe"))) 34 ) 34 ) -
abuse/trunk/data-frabs/addon/deathmat/small.lsp
r566 r582 1 (select (random 4) 2 (0 (setq net_levels 1 (select (random 4) 2 (0 (setq net_levels 3 3 '("netlevel/alitlhot.spe" 4 4 "netlevel/getcross.spe" … … 10 10 "netlevel/ruins.spe" 11 11 "netlevel/occult.spe" 12 "netlevel/cistern.spe"))) 13 (1 (setq net_levels 12 "netlevel/cistern.spe"))) 13 (1 (setq net_levels 14 14 '("netlevel/treesmal.spe" 15 15 "netlevel/cistern.spe" … … 21 21 "netlevel/ruins.spe" 22 22 "netlevel/kotcross.spe" 23 "netlevel/alitlhot.spe"))) 24 (2 (setq net_levels 23 "netlevel/alitlhot.spe"))) 24 (2 (setq net_levels 25 25 '("netlevel/kotcross.spe" 26 26 "netlevel/spacytdm.spe" … … 32 32 "netlevel/getcross.spe" 33 33 "netlevel/ruins.spe" 34 "netlevel/bugssml.spe"))) 35 (3 (setq net_levels 34 "netlevel/bugssml.spe"))) 35 (3 (setq net_levels 36 36 '("netlevel/ruins.spe" 37 37 "netlevel/getcross.spe" … … 43 43 "netlevel/spacytdm.spe" 44 44 "netlevel/occult.spe" 45 "netlevel/bugssml.spe"))) 46 ) 45 "netlevel/bugssml.spe"))) 46 ) -
abuse/trunk/data-frabs/addon/leon/leon.lsp
r566 r582 14 14 (progn 15 15 (print "Please make sure you unzipped the game with the -d option") 16 (print "so that all directories get created properly.") 17 (print "example : pkunzip -d abusXXXX.zip") 16 (print "so that all directories get created properly.") 17 (print "example : pkunzip -d abusXXXX.zip") 18 18 (quit))) 19 19 (setq load_warn T) … … 22 22 (load "lisp/common.lsp") 23 23 (load "lisp/userfuns.lsp") 24 (load "lisp/options.lsp") 24 (load "lisp/options.lsp") 25 25 (load "lisp/startup.lsp") 26 26 (if (not (local_load "lisp/input.lsp")) ; get local copy first … … 64 64 65 65 66 (setq bad_guy_list (list DARNEL ANT_ROOF TRACK_GUN SPRAY_GUN JUGGER ROB1 WHO ROCKET FLYER GREEN_FLYER BOSS_ANT 66 (setq bad_guy_list (list DARNEL ANT_ROOF TRACK_GUN SPRAY_GUN JUGGER ROB1 WHO ROCKET FLYER GREEN_FLYER BOSS_ANT 67 67 ANT ANT_JUMPER ANT_PRED ANT_GREATER2 NJUGGER)) 68 68 -
abuse/trunk/data-frabs/addon/leon/lisp/deco.lsp
r566 r582 7 7 T 8 8 ) 9 10 9 10 11 11 (def_char ANTBODY 12 12 (funs (ai_fun antbody_ai) … … 14 14 (flags (unlistable T)(add_front T)) ;; This class is obsolete, just keeping it here for compatibility 15 15 (states "art/ant.spe" (stopped (seq "adib" 1 16)))) 16 16 17 17 (def_char DECO_ANTBODY 18 18 (funs (ai_fun antbody_ai) -
abuse/trunk/data-frabs/addon/leon/lisp/grenade.lsp
r566 r582 36 36 ) 37 37 (if (and (eq tk 8) (> yv 0) ) 38 (progn 38 (progn 39 39 (set_yvel (- 0 yv) ) 40 40 (set_xvel (* (/ xv 7) 5) ) … … 42 42 (set_xvel 0) 43 43 nil ) 44 (set_gravity 1) 44 (set_gravity 1) 45 45 (play_sound (aref GREN_SND (random 2)) 127 (x) (y)) 46 46 ) … … 48 48 ) 49 49 ) 50 (if (or (> (yvel) 0) (< (yvel) 0) (> (xvel) 0) (< (xvel) 0) ) 50 (if (or (> (yvel) 0) (< (yvel) 0) (> (xvel) 0) (< (xvel) 0) ) 51 51 (next_picture) 52 52 nil … … 54 54 (if (> (total_objects) 0) 55 55 (let ( (mex (x)) (mey (y)) ) 56 (if (with_object (get_object 0) (find_object_in_area (- mex 7) 57 (- mey 7) 58 (+ mex 7) 56 (if (with_object (get_object 0) (find_object_in_area (- mex 7) 57 (- mey 7) 58 (+ mex 7) 59 59 (+ mey 7) bad_guy_list)) 60 60 61 61 (set_hp 31) 62 62 nil … … 65 65 ) 66 66 (if (> (hp) 30) 67 (progn 67 (progn 68 68 (do_explo 40 36) 69 69 nil 70 70 ) 71 (progn 71 (progn 72 72 (add_hp 1) 73 73 T -
abuse/trunk/data-frabs/addon/leon/lisp/lmisc.lsp
r566 r582 2 2 (if (eq (random 75) 0) (play_sound LAVA_SND 24 (x) (y)) ) 3 3 (select (aistate) 4 (0 4 (0 5 5 (if (eq (state_time) dam_spd) 6 6 (progn … … 36 36 (if (and (touching_bg) (with_object (bg) (pressing_action_key))) 37 37 (set_aistate 2))) 38 (2 (set_state running) 38 (2 (set_state running) 39 39 (set_aistate 3)) 40 (3 (set_aistate 4)) 41 (4 40 (3 (set_aistate 4)) 41 (4 42 42 (let ((spot (get_save_slot))) 43 43 (set_state stopped) … … 59 59 ))) 60 60 T) 61 61 62 62 63 63 (def_char LRESTART_POSITION … … 94 94 95 95 96 (defun Med_ai () 96 (defun Med_ai () 97 97 (if (eq0 (aistate)) (progn 98 98 (try_move 0 10) … … 111 111 (states "addon/leon/lmisc.spe" (stopped "medkit.pcx" ))) 112 112 113 (defun none_ai () 113 (defun none_ai () 114 114 (next_picture) 115 (if (touching_bg) 116 (progn (with_object (bg) 115 (if (touching_bg) 116 (progn (with_object (bg) 117 117 (progn 118 118 (setq special_power NO_POWER) … … 142 142 (set_y nowy))) 143 143 T) 144 144 145 145 146 146 (defun sensbeam_draw () … … 158 158 (states "art/misc.spe" 159 159 (stopped "force_field"))) 160 160 161 161 162 162 (defun swtele_ai () ;; teleporting door ai … … 167 167 (let ((otherx (+ (with_object (get_object 1) (x)) (- (with_object player (x) ) (x) ) ) ) 168 168 (othery (+ (with_object (get_object 1) (y)) (- (with_object player (y) ) (y) ) ) )) 169 (with_object player (progn 170 (set_x otherx) 169 (with_object player (progn 170 (set_x otherx) 171 171 (set_y othery) 172 172 (bottom_draw) 173 173 ;; (with_object (get_object 0) 174 174 ;; (progn 175 ;; (set_x otherx) 175 ;; (set_x otherx) 176 176 ;; (set_y othery) 177 177 ;; (top_ai) … … 191 191 (stopped "switch_mover"))) 192 192 193 (setq AMB_SOUNDS2 (make-array 3 :initial-contents (list 193 (setq AMB_SOUNDS2 (make-array 3 :initial-contents (list 194 194 (def_sound "addon/leon/sfx/ambship1.wav") ;; 0 195 195 (def_sound "addon/leon/sfx/ambship2.wav") ;; 1 … … 216 216 T))) 217 217 218 219 (defun ambs_cons2 () 218 219 (defun ambs_cons2 () 220 220 (set_xvel 10) ;; delay time to 10 221 221 (set_yvel 127)) ;; set volume default to 127 … … 228 228 (range 500 500) 229 229 (fields ("aitype" amb_num) 230 ("yvel" amb_vol) 230 ("yvel" amb_vol) 231 231 ("xvel" amb_rep) 232 232 ("xacel" amb_rand)) -
abuse/trunk/data-frabs/addon/leon/lisp/lnant.lsp
r566 r582 1 (setq ant_tints (make-array 14 :initial-contents (list 1 (setq ant_tints (make-array 14 :initial-contents (list 2 2 (def_tint "art/tints/ant/green.spe") 3 (def_tint "art/tints/ant/blue.spe") 3 (def_tint "art/tints/ant/blue.spe") 4 4 (def_tint "art/tints/ant/brown.spe") 5 5 (def_tint "art/tints/ant/egg.spe") … … 27 27 (let ((d (direction)) 28 28 (type (aitype))) 29 (if (or (eq create_total 0) (eq create_total 1)) 29 (if (or (eq create_total 0) (eq create_total 1)) 30 30 (set_current_frame 4) 31 31 (progn … … 44 44 (2 (next_picture)))) 45 45 T) 46 46 47 47 48 48 … … 76 76 (defun anthole_ai () 77 77 (select (aistate) 78 (0 78 (0 79 79 (if (and (activated) (< (total_objects) (+ (xvel) 1) ) ) 80 80 (go_state 2) 81 81 ) 82 82 ) 83 (3 83 (3 84 84 (if (and (activated) (< (total_objects) (+ (xvel) 1) ) ) 85 (progn 85 (progn 86 86 (if (eq (current_frame) 4) 87 87 (set_current_frame 1) … … 101 101 ) 102 102 103 (1 103 (1 104 104 (if (eq (state_time) (yvel)) 105 105 (select (otype) (ANTHOLE (go_state 0)) … … 189 189 (range 250 20) 190 190 (draw_range 40 40) 191 (funs (ai_fun ,aifun) 191 (funs (ai_fun ,aifun) 192 192 (draw_fun ,drawfun) 193 193 (constructor ant_cons) … … 204 204 (push_xrange 1) 205 205 (jump_top_speed (+ jumpyvel jumpxvel) )) 206 207 (flags 206 207 (flags 208 208 (hurtable T) 209 209 (force_health T)) 210 210 211 (states "art/ant.spe" 211 (states "art/ant.spe" 212 212 (hanging (rep "ant" 2)) 213 213 214 214 (fall_start "affc0001.pcx") 215 215 (falling "affc0002.pcx") 216 216 217 217 (stopped "awlk0001.pcx") 218 218 (running (seq "awlk" 1 10)) … … 240 240 241 241 242 (setq ai_ammo (make-array 15 :initial-contents (list MBULLET_ICON5 243 MBULLET_ICON5 242 (setq ai_ammo (make-array 15 :initial-contents (list MBULLET_ICON5 243 MBULLET_ICON5 244 244 GRENADE_ICON2 245 ROCKET_ICON2 245 ROCKET_ICON2 246 246 PLASMA_ICON20 247 MBULLET_ICON5 248 MBULLET_ICON5 249 MBULLET_ICON5 247 MBULLET_ICON5 248 MBULLET_ICON5 249 MBULLET_ICON5 250 250 MBULLET_ICON5 251 251 MBULLET_ICON20 … … 259 259 260 260 (if (and (not (eq (state) dead)) 261 (or (not from) 262 (with_object from (if (eq (total_objects) 0) 261 (or (not from) 262 (with_object from (if (eq (total_objects) 0) 263 263 (not (eq (otype) ANT_ROOF)) 264 264 (with_object (get_object 0) (not (eq (otype) ANT_ROOF))))))) … … 270 270 (damage_fun amount from hitx hity push_xvel push_yvel) 271 271 (play_sound APAIN_SND 127 (x) (y)) 272 (setq need_to_dodge 1) 272 (setq need_to_dodge 1) 273 273 (if (<= (hp) 0) 274 274 (progn … … 293 293 (let ((d (direction)) 294 294 (type (aitype))) 295 (with_object (add_object ANTBODY (x) (y)) 295 (with_object (add_object ANTBODY (x) (y)) 296 296 (progn 297 297 (set_aitype type) … … 303 303 (let ((d (direction)) 304 304 (type (aitype))) 305 (with_object (add_object DECO_ANTBODY (x) (y)) 305 (with_object (add_object DECO_ANTBODY (x) (y)) 306 306 (progn 307 307 (set_aitype type) … … 321 321 322 322 (defun pred_draw () 323 (if (edit_mode) 324 (ant_draw) 323 (if (edit_mode) 324 (ant_draw) 325 325 (draw_predator))) 326 326 … … 339 339 (let ((d (direction)) 340 340 (type (aitype))) 341 (with_object (add_object GRANTBODY (x) (y)) 341 (with_object (add_object GRANTBODY (x) (y)) 342 342 (progn 343 343 (set_aitype type) … … 359 359 T 360 360 ) 361 362 361 362 363 363 (def_char GRANTBODY 364 364 (funs (ai_fun grantbody_ai) … … 410 410 (let ((d (direction)) 411 411 (type (aitype))) 412 (with_object (add_object ANTBODY (x) (y)) 412 (with_object (add_object ANTBODY (x) (y)) 413 413 (progn 414 414 (set_aitype type) -
abuse/trunk/data-frabs/addon/leon/lisp/nextlev3.lsp
r566 r582 7 7 (request_level_load (concatenate 'string "addon/leon/level" (digstr (aistate) 2) ".spe"))))) 8 8 T) 9 9 10 10 11 11 (def_char NEXT_LEVEL3 12 (funs (ai_fun next_level3_ai)) 12 (funs (ai_fun next_level3_ai)) 13 13 (flags (can_block T)) 14 14 (fields ("aistate" next_level)) … … 29 29 (def_char SW_ENDLEV 30 30 (funs (ai_fun sw_endlev_ai) 31 (draw_fun dev_draw)) 31 (draw_fun dev_draw)) 32 32 (fields ("aistate" next_level)) 33 33 (states "art/misc.spe" -
abuse/trunk/data-frabs/addon/leon/lisp/nguns.lsp
r566 r582 10 10 (setq sgb_bright_color (find_rgb 255 245 235)) 11 11 (setq sgb_medium_color (find_rgb 150 145 140)) 12 (if creator 12 (if creator 13 13 (progn 14 14 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 31 31 (setq sgb_bright_color (find_rgb 255 255 200)) 32 32 (setq sgb_medium_color (find_rgb 150 150 0)) 33 (if creator 33 (if creator 34 34 (progn 35 35 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 45 45 (setq sgb_lasty (y)) 46 46 (setq sgb_angle angle) 47 47 48 48 (setq sgb_bright_color (find_rgb 255 128 64)) 49 49 (setq sgb_medium_color (find_rgb 255 0 0)) 50 (if creator 50 (if creator 51 51 (progn 52 52 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 58 58 (play_sound GRENADE_THROW 127 x y) 59 59 (set_course angle 20) 60 (if creator 60 (if creator 61 61 (progn 62 62 (link_object creator) … … 64 64 (set_yvel (+ (yvel) (with_object creator (yvel)))) 65 65 )) 66 66 67 67 (set_frame_angle 0 359 angle) 68 68 ))) … … 74 74 75 75 (if (and target ;; don't link if not in line of site 76 (can_see (x) (y) 76 (can_see (x) (y) 77 77 (with_object target (x)) 78 78 (with_object target (y)) nil)) … … 92 92 (setq sgb_lastx (x)) 93 93 (setq sgb_lasty (y)) 94 (if creator 94 (if creator 95 95 (link_object creator)) 96 96 (set_course angle 200) … … 100 100 (if (not (eq bx T)) 101 101 (if (eq bx nil) 102 (add_object EXPLODE5 (- (x) (random 5)) 102 (add_object EXPLODE5 (- (x) (random 5)) 103 103 (- (y) (random 5)) 0) 104 104 (progn 105 (add_object EXPLODE3 (- (x) (random 5)) 105 (add_object EXPLODE3 (- (x) (random 5)) 106 106 (- (y) (random 5)) 0) 107 (do_damage 10 bx (* (cos sgb_angle) 20) 107 (do_damage 10 bx (* (cos sgb_angle) 20) 108 108 (* (sin sgb_angle) 10))))) 109 109 (setq sgb_lastx (x)) … … 118 118 (play_sound FIREBOMB_SND 127 (x) (y)) 119 119 (set_course angle 20) 120 (if creator 120 (if creator 121 121 (progn 122 122 (link_object creator) … … 129 129 (set_course angle 25) 130 130 (set_aistate angle) 131 (if creator 131 (if creator 132 132 (link_object creator)) 133 133 (dfris_ai) … … 139 139 (setq sgb_lastx (x)) 140 140 (setq sgb_lasty (y)) 141 (if creator 141 (if creator 142 142 (link_object creator)) 143 143 (set_course angle 45) … … 145 145 (if (not (eq bx T)) 146 146 (if (not (eq bx nil)) 147 (do_damage 30 bx (* (cos sgb_angle) 20) 147 (do_damage 30 bx (* (cos sgb_angle) 20) 148 148 (* (sin sgb_angle) 10))))) 149 149 ))) 150 150 151 151 152 152 (9 (with_object (add_object STRAIT_ROCKET x y) 153 153 (progn 154 154 (play_sound MGUN_SND 127 (x) (y)) 155 (if creator 155 (if creator 156 156 (link_object creator)) 157 157 (set_aistate angle) … … 169 169 (setq sgb_bright_color (find_rgb 255 0 0)) 170 170 (setq sgb_medium_color (find_rgb 150 0 0)) 171 (if creator 171 (if creator 172 172 (progn 173 173 (setq sgb_speed (+ sgb_speed (/ (xvel) 2))) … … 193 193 (zap 6 16 x y (- angle 30)) 194 194 ) 195 ) 195 ) 196 196 ) 197 197 … … 199 199 (setq sgb_lastx (x)) 200 200 (setq sgb_lasty (y)) 201 (set_course sgb_angle sgb_speed) 201 (set_course sgb_angle sgb_speed) 202 202 (if (eq sgb_lifetime 0) 203 203 nil … … 215 215 216 216 (def_char LASR_BULLET 217 (vars sgb_speed sgb_angle sgb_lastx sgb_lasty 217 (vars sgb_speed sgb_angle sgb_lastx sgb_lasty 218 218 sgb_bright_color sgb_medium_color sgb_lifetime sgb_dam) 219 219 (funs (ai_fun las_ai) -
abuse/trunk/data-frabs/addon/leon/lisp/njug.lsp
r566 r582 11 11 (playerx (+ (with_object (bg) (x)) (with_object (bg) (* (xvel) 1)))) 12 12 (playery (+ (- (with_object (bg) (y)) 15) (with_object (bg) (* (yvel) 1))))) 13 13 14 14 (if (and (can_see (x) (y) firex firey nil) (can_see firex firey playerx playery nil)) 15 15 (progn … … 27 27 (set_state dieing)) 28 28 (if (activated) 29 (progn 29 (progn 30 30 (set_targetable T) 31 31 (push_char 35 40) 32 (select (aistate) 32 (select (aistate) 33 33 (0 ;; prepare to walk toward player 34 34 (if (eq stationary 0) … … 46 46 (set_direction (toward)) 47 47 (let ((curx (x));; save position in case we fall off a cliff 48 (cury (y))) 49 (if (next_picture) 48 (cury (y))) 49 (if (next_picture) 50 50 (if (eq (current_frame) 8) 51 51 (play_sound JSTOMP_SND 127 (x) (y))) … … 74 74 (3 ;; wait for fire animation 75 75 (if (next_picture) nil (set_aistate 0)))) 76 T) 76 T) 77 77 (progn (set_targetable nil) 78 78 T)))) … … 81 81 (setq throw_xvel 3) 82 82 (setq throw_yvel -10) 83 (set_aitype 1)) 83 (set_aitype 1)) 84 84 85 85 (def_char NJUGGER … … 101 101 ("aistate" ai_state)) 102 102 103 (states "art/jug.spe" 103 (states "art/jug.spe" 104 104 (stopped "robo0001.pcx") 105 105 (running (seq "rwlk" 1 13)) -
abuse/trunk/data-frabs/addon/leon/lisp/rain.lsp
r566 r582 32 32 33 33 (select (aistate) 34 (0 34 (0 35 35 (set_yvel (+ 100 (random 500) ) ) 36 36 (set_yacel (random 3) ) 37 37 (set_aistate 6) 38 38 ) 39 (4 (if (activated) 39 (4 (if (activated) 40 40 (go_state 0) 41 41 ) … … 43 43 (6 (if (eq (state_time) (yvel) ) 44 44 (progn 45 (add_object THUNDER (with_object (bg) (x)) (with_object (bg) (y))) 45 (add_object THUNDER (with_object (bg) (x)) (with_object (bg) (y))) 46 46 (set_aistate 2) 47 47 ) … … 87 87 (stopped "latter"))) 88 88 89 (setq THUNDER_SOUNDS (make-array 5 :initial-contents (list 89 (setq THUNDER_SOUNDS (make-array 5 :initial-contents (list 90 90 (def_sound "addon/leon/sfx/thunder.wav") ;; 0 91 91 (def_sound "addon/leon/sfx/thunder2.wav") ;; 1 … … 110 110 (stopped "latter"))) 111 111 112 (setq RAIN_SOUNDS (make-array 4 :initial-contents (list 112 (setq RAIN_SOUNDS (make-array 4 :initial-contents (list 113 113 (def_sound "addon/leon/sfx/rain.wav") ;; 0 114 114 (def_sound "addon/leon/sfx/rain2.wav") ;; 1 -
abuse/trunk/data-frabs/addon/leon/lisp/slavesw.lsp
r566 r582 1 1 (def_char SWITCH_SLAVE 2 2 (funs (ai_fun swslave_ai)) 3 (states "art/misc.spe" 3 (states "art/misc.spe" 4 4 (stopped "0_indicator") 5 5 (on_state "1_indicator"))) 6 6 7 7 (defun swslave_ai () 8 8 (if (> (total_objects) 0) -
abuse/trunk/data-frabs/addon/leon/lisp/text.lsp
r566 r582 3 3 ; Please keep all strings below shorter than the above line. 4 4 ; Add as many strings as you like. 5 6 5 6 7 7 (defun get_message (message_num) 8 (select message_num 8 (select message_num 9 9 (0 "Dammit! I gotta get out of here!") 10 10 (1 "What the...") … … 24 24 ; (if (local_player) ;; Doesnt work for some reason 25 25 ; (show_help (get_message (aitype)))) 26 )) 26 )) 27 27 (set_aistate 1) 28 28 T) -
abuse/trunk/data-frabs/addon/newart/newart.lsp
r566 r582 2 2 3 3 (load_tiles 4 "addon/newart/frabs_1.spe" 5 "addon/newart/frabs_2.spe" 4 "addon/newart/frabs_1.spe" 5 "addon/newart/frabs_2.spe" 6 6 "addon/newart/final.spe" 7 7 "addon/newart/mtile.spe" 8 8 "addon/newart/stones.spe" 9 ) 9 ) 10 10 11 11 ;; Background 12 12 13 13 (load_tiles 14 "addon/newart/frbsblue.spe" 15 "addon/newart/blcave.spe" 14 "addon/newart/frbsblue.spe" 15 "addon/newart/blcave.spe" 16 16 "addon/newart/space.spe" 17 ) 17 ) -
abuse/trunk/data-frabs/addon/pong/common.lsp
r44 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) … … 92 92 (let ((last (get_object (- x 1)))) ; see if the last object has the same position as us 93 93 (if (and (eq (with_object last (x)) (x)) (eq (with_object last (y)) (y))) 94 (if (eq (aistate) 1) 94 (if (eq (aistate) 1) 95 95 (if (eq (with_object last (fade_count)) 0) 96 96 (set_aistate 1) … … 107 107 T) 108 108 109 (defun respwan_cons () (set_xvel 50)) 109 (defun respwan_cons () (set_xvel 50)) 110 110 111 111 112 (def_char RESPAWN 112 (def_char RESPAWN 113 113 (funs (ai_fun respawn_ai) 114 (draw_fun dev_draw) 114 (draw_fun dev_draw) 115 115 (constructor respwan_cons)) 116 116 (flags (unlistable T)) -
abuse/trunk/data-frabs/addon/pong/pong.lsp
r566 r582 24 24 ;;;; called lisp :-) 25 25 26 ;;;; Please do not ask me for docs on how to code with the abuse engine, there are 26 ;;;; Please do not ask me for docs on how to code with the abuse engine, there are 27 27 ;;;; none at this time and there won't be any until networked abuse is available. 28 28 ;;;; ALL games written with the abuse engine are network ready with no additional 29 ;;;; work including this one, but there are some issues that need addressing 29 ;;;; work including this one, but there are some issues that need addressing 30 30 ;;;; that cannot be fully discussed until the net code is finished. When these 31 31 ;;;; docs are written they will be available at http://www.crack.com Estimated … … 58 58 (setq pong_dir "addon/pong/") ; in case we change the location of these files later 59 59 ; this is always a very good idea to do because the user of 60 ; this program may/may not be able to install into this directory 60 ; this program may/may not be able to install into this directory 61 61 (setq pong_art (concatenate 'string pong_dir "pong.spe")) ; all artwork is in this file 62 62 … … 106 106 (let ((this-digit (/ score digs_left))) 107 107 (put_image x y (aref nums this-digit)) 108 (show_score (+ x (image_width (aref nums this-digit))) y 108 (show_score (+ x (image_width (aref nums this-digit))) y 109 109 (/ digs_left 10) (- score (* digs_left this-digit)))))) 110 110 … … 143 143 (blow_up_tile tilex (+ tiley 1)) 144 144 (blow_up_tile (+ tilex 1) tiley))) 145 145 146 146 (with_object (bg) (add_hp 10)) ; give player points 147 147 … … 155 155 (defun check_collide (status) ;; returns T if we hit something 156 156 (if (not (eq status T)) ; did we hit anything? 157 (if (eq (car (cdr status)) 'object) ; did we hit an object? 157 (if (eq (car (cdr status)) 'object) ; did we hit an object? 158 158 (let ((object (car (cdr (cdr status))))) 159 159 (if (eq (with_object object (otype)) PADDLE) ; did we hit the paddle? … … 163 163 (if (> 20 (aistate)) (set_aistate 20) 164 164 (if (< 160 (aistate)) (set_aistate 160))) 165 T) 165 T) 166 166 nil) 167 167 nil) … … 185 185 (defun move_ball () ;; returns status of move 186 186 (let ((status (float_tick))) 187 (if (not (eq status T)) ; T means we did not hit anything 187 (if (not (eq status T)) ; T means we did not hit anything 188 188 (let ((block_flags (car status))) 189 189 (if (or (blocked_left block_flags) (blocked_right block_flags)) ; bounce left/right … … 208 208 (select (aitype) 209 209 (0 ; normal play, bounce around and stuff.. 210 (check_collide (move_ball)) 210 (check_collide (move_ball)) 211 211 (if (> (y) 240) ; check to see if we are dead 212 212 (progn … … 221 221 T))) 222 222 T)) 223 223 224 224 (1 ; ball is dead - go to paddle and fade in 225 225 (set_x (with_object (bg) (x))) … … 229 229 (set_aitype 0)) 230 230 T))) 231 231 232 232 233 233 (def_char BALL … … 253 253 (mover xm 0 0) 254 254 0)) 255 255 256 256 257 257 (def_char PADDLE … … 280 280 (next_picture) 281 281 (if (touching_bg) ; are we touching the paddle 282 (progn 282 (progn 283 283 (add_score 1000) 284 284 (with_object (add_object BALL (x) (y) 1) (progn (set_fade_count 15) (set_aistate 80))) … … 327 327 (create_players PADDLE) 328 328 (set_first_level (get_level_name current_level)) 329 (gc) ; garbage collect 329 (gc) ; garbage collect 330 330 (tmp-space) 331 331 -
abuse/trunk/data-frabs/addon/pong/userfuns.lsp
r44 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-frabs/addon/twist/f2ai.lsp
r566 r582 57 57 58 58 (defun gravity_sensor_draw () 59 (if (edit_mode) 59 (if (edit_mode) 60 60 (progn 61 61 (draw) … … 94 94 95 95 (defun health_sensor_draw () 96 (if (edit_mode) 96 (if (edit_mode) 97 97 (progn 98 98 (draw) … … 130 130 131 131 (defun level_sensor_draw () 132 (if (edit_mode) 132 (if (edit_mode) 133 133 (progn 134 134 (draw) … … 149 149 (setq fire_time (- fire_time 1)) 150 150 (if (eq fire_time 0) 151 (progn 151 (progn 152 152 (setq burst_left burst_total) 153 153 (setq burst_wait 0)))) … … 162 162 163 163 164 (defun wrob2_cons () 164 (defun wrob2_cons () 165 165 (setq fire_delay 4) 166 166 (setq burst_delay 1) … … 186 186 (set_aistate 1)))) 187 187 (1;; stop and fire 188 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 188 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 189 189 (if (> (direction) 0) 190 190 (mod (- 375 (/ (* burst_left 30) burst_total)) 360) … … 206 206 (set_state running) 207 207 (set_aistate 1)) 208 208 209 209 (if (with_object (bg) (pressing_action_key)) 210 210 (progn … … 218 218 (y (- (y) 16)) 219 219 (fade (if (< (current_frame) 16) (current_frame) 15))) 220 (with_object (get_object 1) 220 (with_object (get_object 1) 221 221 (progn 222 (set_x x) 223 (set_y y) 222 (set_x x) 223 (set_y y) 224 224 (user_fun SET_FADE_COUNT fade) 225 225 (setq is_teleporting 1) 226 226 ))) 227 227 228 228 (let ((x (with_object (get_object 0) (x))) 229 (y (with_object (get_object 0) (- (y) 16)))) 229 (y (with_object (get_object 0) (- (y) 16)))) 230 230 (with_object (get_object 1) 231 (progn 231 (progn 232 232 (set_x x) 233 233 (set_y y) … … 246 246 247 247 (defun teleport_sensor_draw () 248 (if (edit_mode) 248 (if (edit_mode) 249 249 (progn 250 250 (draw) -
abuse/trunk/data-frabs/addon/twist/f2chars.lsp
r566 r582 74 74 (flags (hurtable T)) 75 75 (abilities (start_hp 40)) 76 (vars fire_delay burst_delay burst_total burst_wait burst_left 76 (vars fire_delay burst_delay burst_total burst_wait burst_left 77 77 max_xvel max_yvel smoke_time fire_time) 78 78 (fields ("fire_delay" who_fdelay) … … 84 84 ("aitype" ai_type) 85 85 ("aistate" ai_state)) 86 86 87 87 (range 200 200) 88 88 (states "addon/twist/art/robs.spe" … … 95 95 (def_char WALK_ROB2 96 96 (funs (ai_fun wrob2_ai) 97 (constructor wrob2_cons) 97 (constructor wrob2_cons) 98 98 (damage_fun guner_damage)) 99 99 (abilities (run_top_speed 12) … … 101 101 (flags (hurtable T)) 102 102 (range 300 100) 103 (vars fire_delay burst_delay burst_total burst_wait burst_left 103 (vars fire_delay burst_delay burst_total burst_wait burst_left 104 104 max_xvel max_yvel smoke_time fire_time) 105 105 (fields ("fire_delay" wrob_fdelay) … … 111 111 ("aistate" ai_state)) 112 112 113 (states "art/rob2.spe" 113 (states "art/rob2.spe" 114 114 (stopped "wwlk0001.pcx") 115 115 (running (seq "wwlk" 1 10)) -
abuse/trunk/data-frabs/addon/twist/lisp/ai.lsp
r566 r582 8 8 9 9 10 (defun mantrack_ai () 10 (defun mantrack_ai () 11 11 (if (<= (total_objects) 0) 12 12 nil … … 31 31 (- angle pangle) 32 32 (+ angle (- 360 pangle))))) 33 (let ((closest_dist (if (> clock_dist 180) 33 (let ((closest_dist (if (> clock_dist 180) 34 34 (- 360 clock_dist) 35 35 clock_dist))) … … 40 40 (track_set_angle (mod (+ angle angle_add) 360)) 41 41 (track_set_angle (mod (+ (- angle angle_add) 360) 360))) 42 (if (< angle_add 5);; pretty close to target, FIRE! 42 (if (< angle_add 5);; pretty close to target, FIRE! 43 43 (track_fire)))))) 44 44 (setq fire_delay_left (- fire_delay_left 1))) … … 71 71 (set_state stopped)))) 72 72 (1;; unfold 73 (if (next_picture) T 73 (if (next_picture) T 74 74 (progn (set_aistate 3) 75 75 (set_state spray.aim) … … 78 78 ))) 79 79 (2;; fold up 80 (if (next_picture) T 80 (if (next_picture) T 81 81 (progn (set_state stopped) 82 82 (set_aistate 0)))) … … 116 116 (set_aistate 1))) 117 117 (next_picture)) 118 (1 (next_picture) 118 (1 (next_picture) 119 119 (if (eq (state_time) 5) 120 120 (progn … … 195 195 196 196 (defun music_sensor_draw () 197 (if (edit_mode) 197 (if (edit_mode) 198 198 (progn 199 199 (draw) … … 228 228 229 229 (defun gravity_sensor_draw () 230 (if (edit_mode) 230 (if (edit_mode) 231 231 (progn 232 232 (draw) … … 265 265 266 266 (defun health_sensor_draw () 267 (if (edit_mode) 267 (if (edit_mode) 268 268 (progn 269 269 (draw) … … 301 301 302 302 (defun level_sensor_draw () 303 (if (edit_mode) 303 (if (edit_mode) 304 304 (progn 305 305 (draw) … … 433 433 (setq fire_time (- fire_time 1)) 434 434 (if (eq fire_time 0) 435 (progn 435 (progn 436 436 (setq burst_left burst_total) 437 437 (setq burst_wait 0)))) … … 446 446 447 447 448 (defun wrob_cons () 448 (defun wrob_cons () 449 449 (setq fire_delay 4) 450 450 (setq burst_delay 1) … … 471 471 (set_aistate 1)))) 472 472 (1;; stop and fire 473 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 473 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 474 474 (if (> (direction) 0) 475 475 (mod (- 375 (/ (* burst_left 30) burst_total)) 360) … … 491 491 (set_state running) 492 492 (set_aistate 1)) 493 493 494 494 (if (with_object (bg) (pressing_action_key)) 495 495 (progn … … 503 503 (y (- (y) 16)) 504 504 (fade (if (< (current_frame) 16) (current_frame) 15))) 505 (with_object (get_object 1) 505 (with_object (get_object 1) 506 506 (progn 507 (set_x x) 508 (set_y y) 507 (set_x x) 508 (set_y y) 509 509 (user_fun SET_FADE_COUNT fade) 510 510 (setq is_teleporting 1) 511 511 ))) 512 512 513 513 (let ((x (with_object (get_object 0) (x))) 514 (y (with_object (get_object 0) (- (y) 16)))) 514 (y (with_object (get_object 0) (- (y) 16)))) 515 515 (with_object (get_object 1) 516 (progn 516 (progn 517 517 (set_x x) 518 518 (set_y y) … … 531 531 532 532 (defun teleport_sensor_draw () 533 (if (edit_mode) 533 (if (edit_mode) 534 534 (progn 535 535 (draw) -
abuse/trunk/data-frabs/addon/twist/lisp/chars.lsp
r566 r582 15 15 (range 250 20) 16 16 (draw_range 40 40) 17 (funs (ai_fun ant_ai) 17 (funs (ai_fun ant_ai) 18 18 (draw_fun man_draw) 19 19 (constructor ant_cons) … … 30 30 (push_xrange 1) 31 31 (jump_top_speed 20)) 32 32 33 33 (flags (hurtable T) 34 34 (force_health T)) 35 35 36 (states "art/cop.spe" 36 (states "art/cop.spe" 37 37 (hanging (seq "stopped" 1 6)) 38 38 39 39 (fall_start "jump_down") 40 40 (falling "jump_down") 41 41 42 42 (stopped (seq "stopped" 1 6)) 43 43 (running (seq "4wlk" 1 10)) … … 80 80 ("aistate" ai_state)) 81 81 82 (states "addon/twist/art/legs.spe" 82 (states "addon/twist/art/legs.spe" 83 83 (stopped (seq "stopped" 1 6)) 84 84 (running (seq "4wlk" 1 10)) … … 95 95 (flags (hurtable T)) 96 96 (abilities (start_hp 100)) 97 (vars fire_delay burst_delay burst_total burst_wait burst_left 97 (vars fire_delay burst_delay burst_total burst_wait burst_left 98 98 max_xvel max_yvel smoke_time fire_time) 99 99 (fields ("fire_delay" who_fdelay) … … 105 105 ("aitype" ai_type) 106 106 ("aistate" ai_state)) 107 107 108 108 (range 200 200) 109 109 (states "art/cop.spe" … … 115 115 116 116 (def_char MAN_BODYTRACK 117 (vars 117 (vars 118 118 fire_delay 119 119 fire_delay_left … … 130 130 (constructor track_cons) 131 131 (draw_fun man_draw) 132 (damage_fun guner_damage)) 132 (damage_fun guner_damage)) 133 133 134 134 (flags (can_block T) … … 170 170 spray.end_angle 171 171 spray.angle_speed 172 spray.angle) 172 spray.angle) 173 173 174 174 (fields ("hp" ai_health) … … 307 307 (flags (hurtable T)) 308 308 (abilities (start_hp 40)) 309 (vars fire_delay burst_delay burst_total burst_wait burst_left 309 (vars fire_delay burst_delay burst_total burst_wait burst_left 310 310 max_xvel max_yvel smoke_time fire_time) 311 311 (fields ("fire_delay" who_fdelay) … … 317 317 ("aitype" ai_type) 318 318 ("aistate" ai_state)) 319 319 320 320 (range 200 200) 321 321 (states "addon/twist/art/robs.spe" … … 328 328 (def_char WALK_ROB 329 329 (funs (ai_fun wrob_ai) 330 (constructor wrob_cons) 330 (constructor wrob_cons) 331 331 (damage_fun guner_damage)) 332 332 (abilities (run_top_speed 12) … … 334 334 (flags (hurtable T) (can_block (not T))) 335 335 (range 300 100) 336 (vars fire_delay burst_delay burst_total burst_wait burst_left 336 (vars fire_delay burst_delay burst_total burst_wait burst_left 337 337 max_xvel max_yvel smoke_time fire_time) 338 338 (fields ("fire_delay" wrob_fdelay) … … 344 344 ("aistate" ai_state)) 345 345 346 (states "art/rob2.spe" 346 (states "art/rob2.spe" 347 347 (stopped "wwlk0001.pcx") 348 348 (running (seq "wwlk" 1 10)) -
abuse/trunk/data-frabs/addon/twist/lisp/english.lsp
r566 r582 13 13 14 14 (defun get_train_msg (message_num) 15 (select message_num 15 (select message_num 16 16 ; 0123456789012345678901234567890123456789012345678901234567890123456789 17 17 ; "--------------------------------------------------------------------" ; V-A … … 32 32 33 33 (setq plot_start 34 (concatenate 'string 34 (concatenate 'string 35 35 " Nick Vrenna has pulled the switch and diverted the water supply. The spread " 36 36 "of Abuse may be over. He has gotten himself into the deepest underground prision " 37 "levels and battled against the mutants to save the outside world.\\n" 37 "levels and battled against the mutants to save the outside world.\\n" 38 38 " As he leaves the Control Room, a mutant leaped onto him and slashed his wrist. " 39 39 "He gave the mutant a lethal blow in the head. He took a look at his wrist. There was " … … 46 46 "Profound Corp ")) 47 47 (setq plot_middle 48 (concatenate 'string 48 (concatenate 'string 49 49 "You have survived the initial outbreak, but you are still lost deep " 50 "within the prison. So far it's been suspiciously easy. \\n" 50 "within the prison. So far it's been suspiciously easy. \\n" 51 51 "If you want to break out - the real ABUSE lies ahead. ")) 52 52 (setq plot_end 53 (concatenate 'string 53 (concatenate 'string 54 54 "You've survived impossible odds and made it to the Control Room. " 55 55 "By pulling the switch, you have diverted the water supply and stopped the spread of Abuse!\\n " -
abuse/trunk/data-frabs/addon/twist/lisp/f2ai.lsp
r566 r582 69 69 70 70 (defun music_sensor_draw () 71 (if (edit_mode) 71 (if (edit_mode) 72 72 (progn 73 73 (draw) … … 102 102 103 103 (defun gravity_sensor_draw () 104 (if (edit_mode) 104 (if (edit_mode) 105 105 (progn 106 106 (draw) … … 139 139 140 140 (defun health_sensor_draw () 141 (if (edit_mode) 141 (if (edit_mode) 142 142 (progn 143 143 (draw) … … 175 175 176 176 (defun level_sensor_draw () 177 (if (edit_mode) 177 (if (edit_mode) 178 178 (progn 179 179 (draw) … … 307 307 (setq fire_time (- fire_time 1)) 308 308 (if (eq fire_time 0) 309 (progn 309 (progn 310 310 (setq burst_left burst_total) 311 311 (setq burst_wait 0)))) … … 320 320 321 321 322 (defun wrob_cons () 322 (defun wrob_cons () 323 323 (setq fire_delay 4) 324 324 (setq burst_delay 1) … … 345 345 (set_aistate 1)))) 346 346 (1;; stop and fire 347 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 347 (burst_fire (+ (x) (* (direction) 28)) (- (y) 35) 348 348 (if (> (direction) 0) 349 349 (mod (- 375 (/ (* burst_left 30) burst_total)) 360) … … 365 365 (set_state running) 366 366 (set_aistate 1)) 367 367 368 368 (if (with_object (bg) (pressing_action_key)) 369 369 (progn … … 377 377 (y (- (y) 16)) 378 378 (fade (if (< (current_frame) 16) (current_frame) 15))) 379 (with_object (get_object 1) 379 (with_object (get_object 1) 380 380 (progn 381 (set_x x) 382 (set_y y) 381 (set_x x) 382 (set_y y) 383 383 (user_fun SET_FADE_COUNT fade) 384 384 (setq is_teleporting 1) 385 385 ))) 386 386 387 387 (let ((x (with_object (get_object 0) (x))) 388 (y (with_object (get_object 0) (- (y) 16)))) 388 (y (with_object (get_object 0) (- (y) 16)))) 389 389 (with_object (get_object 1) 390 (progn 390 (progn 391 391 (set_x x) 392 392 (set_y y) … … 405 405 406 406 (defun teleport_sensor_draw () 407 (if (edit_mode) 407 (if (edit_mode) 408 408 (progn 409 409 (draw) -
abuse/trunk/data-frabs/addon/twist/lisp/f2chars.lsp
r566 r582 15 15 (range 250 20) 16 16 (draw_range 40 40) 17 (funs (ai_fun ant_ai) 17 (funs (ai_fun ant_ai) 18 18 (draw_fun man_draw) 19 19 (constructor ant_cons) … … 30 30 (push_xrange 1) 31 31 (jump_top_speed 20)) 32 32 33 33 (flags (hurtable T) 34 34 (force_health T)) 35 35 36 (states "art/cop.spe" 36 (states "art/cop.spe" 37 37 (hanging (seq "stopped" 1 6)) 38 38 39 39 (fall_start "jump_down") 40 40 (falling "jump_down") 41 41 42 42 (stopped (seq "stopped" 1 6)) 43 43 (running (seq "4wlk" 1 10)) … … 80 80 ("aistate" ai_state)) 81 81 82 (states "addon/twist/art/legs.spe" 82 (states "addon/twist/art/legs.spe" 83 83 (stopped (seq "stopped" 1 6)) 84 84 (running (seq "4wlk" 1 10)) … … 95 95 (flags (hurtable T)) 96 96 (abilities (start_hp 100)) 97 (vars fire_delay burst_delay burst_total burst_wait burst_left 97 (vars fire_delay burst_delay burst_total burst_wait burst_left 98 98 max_xvel max_yvel smoke_time fire_time) 99 99 (fields ("fire_delay" who_fdelay) … … 105 105 ("aitype" ai_type) 106 106 ("aistate" ai_state)) 107 107 108 108 (range 200 200) 109 109 (states "art/cop.spe" … … 115 115 116 116 (def_char MAN_BODYTRACK 117 (vars 117 (vars 118 118 fire_delay 119 119 fire_delay_left … … 130 130 (constructor track_cons) 131 131 (draw_fun man_draw) 132 (damage_fun guner_damage)) 132 (damage_fun guner_damage)) 133 133 134 134 (flags (can_block T) … … 170 170 spray.end_angle 171 171 spray.angle_speed 172 spray.angle) 172 spray.angle) 173 173 174 174 (fields ("hp" ai_health) … … 307 307 (flags (hurtable T)) 308 308 (abilities (start_hp 40)) 309 (vars fire_delay burst_delay burst_total burst_wait burst_left 309 (vars fire_delay burst_delay burst_total burst_wait burst_left 310 310 max_xvel max_yvel smoke_time fire_time) 311 311 (fields ("fire_delay" who_fdelay) … … 317 317 ("aitype" ai_type) 318 318 ("aistate" ai_state)) 319 319 320 320 (range 200 200) 321 321 (states "addon/twist/art/robs.spe" … … 328 328 (def_char WALK_ROB 329 329 (funs (ai_fun wrob_ai) 330 (constructor wrob_cons) 330 (constructor wrob_cons) 331 331 (damage_fun guner_damage)) 332 332 (abilities (run_top_speed 12) … … 334 334 (flags (hurtable T)) 335 335 (range 300 100) 336 (vars fire_delay burst_delay burst_total burst_wait burst_left 336 (vars fire_delay burst_delay burst_total burst_wait burst_left 337 337 max_xvel max_yvel smoke_time fire_time) 338 338 (fields ("fire_delay" wrob_fdelay) … … 344 344 ("aistate" ai_state)) 345 345 346 (states "art/rob2.spe" 346 (states "art/rob2.spe" 347 347 (stopped "wwlk0001.pcx") 348 348 (running (seq "wwlk" 1 10)) -
abuse/trunk/data-frabs/addon/twist/lisp/input.lsp
r566 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 … … 101 101 (eq (with_object (bg) (state)) climbing) 102 102 (eq (with_object (bg) (state)) climb_off) 103 (eq (with_object (bg) (state)) climb_on) ))) 103 (eq (with_object (bg) (state)) climb_on) ))) 104 104 (progn 105 105 (setq dray_has_fired 1) … … 111 111 112 112 (let ((mstat (mouse_stat))) 113 (list (if (local_key_pressed left-key) -1 (if (local_key_pressed right-key) 1 0)) ;; xv 113 (list (if (local_key_pressed left-key) -1 (if (local_key_pressed right-key) 1 0)) ;; xv 114 114 (if (local_key_pressed up-key) -1 (if (local_key_pressed down-key) 1 0)) ;; yv 115 115 (eq (fourth mstat) 1) ;; special button 116 116 (eq (third mstat) 1) ;; fire button 117 (if (or (eq (fifth mstat) 1) 117 (if (or (eq (fifth mstat) 1) 118 118 (local_key_pressed weapon-left-key)) -1 ;; weapon toggle 119 119 (if (local_key_pressed weapon-right-key) 1 0)) -
abuse/trunk/data-frabs/addon/twist/lisp/light.lsp
r566 r582 14 14 15 15 (def_char QUICK_EXP_LIGHT 16 (funs (ai_fun quick_explo_light) 16 (funs (ai_fun quick_explo_light) 17 17 (draw_fun dev_draw)) 18 18 (flags (unlistable T)) -
abuse/trunk/data-frabs/addon/twist/lisp/mario.lsp
r566 r582 31 31 (set_state dieing)) 32 32 (if (activated) 33 (progn 33 (progn 34 34 (set_targetable T) 35 35 (push_char 35 40) 36 (select (aistate) 36 (select (aistate) 37 37 (0 ;; prepare to walk toward player 38 38 (if (eq stationary 0) … … 50 50 (set_direction (toward)) 51 51 (let ((curx (x));; save position in case we fall off a cliff 52 (cury (y))) 53 (if (next_picture) 52 (cury (y))) 53 (if (next_picture) 54 54 (if (eq (current_frame) 99) ;; The sound wont play anyway 55 55 (play_sound JSTOMP_SND 127 (x) (y)));; bc there's 9 frames … … 73 73 (xspeed (* throw_xvel (direction))) 74 74 (yspeed throw_yvel)) 75 (with_object (add_object MARIO_FIREBALL (+ (x) (* (direction) 20)) (- (y) 5) 1) 75 (with_object (add_object MARIO_FIREBALL (+ (x) (* (direction) 20)) (- (y) 5) 1) 76 76 (progn 77 77 (user_fun myself) … … 82 82 (3 ;; wait for fire animation 83 83 (if (next_picture) nil (set_aistate 0)))) 84 T) 84 T) 85 85 (progn (set_targetable nil) 86 86 T)))) … … 105 105 (progn 106 106 (next_picture) 107 (set_yvel (+ (yvel) 1)) 107 (set_yvel (+ (yvel) 1)) 108 108 (let ((old_yv (yvel)) 109 109 (old_xv (xvel)) … … 120 120 (set_y new_y)) 121 121 (hurt_radius (x) (y) 20 10 (me) 15) 122 (if (not (eq status T));; T means we did not hit anything 122 (if (not (eq status T));; T means we did not hit anything 123 123 (let ((block_flags (car status))) 124 124 (if (or (blocked_up block_flags) (blocked_down block_flags));; bounce up/down … … 203 203 (next_picture) 204 204 (if (and (eq (direction) 1) (blocked_right (move 1 0 0))) (set_direction -1)) 205 (if (and (eq (direction) -1) (blocked_left (move -1 0 0))) (set_direction 1)) 205 (if (and (eq (direction) -1) (blocked_left (move -1 0 0))) (set_direction 1)) 206 206 T) )) 207 207 … … 294 294 ("aistate" ai_state)) 295 295 296 (states "addon/twist/art/mario.spe" 296 (states "addon/twist/art/mario.spe" 297 297 (stopped "ms.bmp") 298 298 (running '("mr0001.bmp" "mr0002.bmp" "mr0003.bmp" … … 320 320 ("aistate" ai_state)) 321 321 322 (states "addon/twist/art/mario.spe" 322 (states "addon/twist/art/mario.spe" 323 323 (stopped "ls.bmp") 324 324 (running '("lr0001.bmp" "lr0002.bmp" "lr0003.bmp" … … 339 339 (range 200 200) 340 340 (abilities (start_hp 1)) 341 (fields ("xvel" ai_xvel) 341 (fields ("xvel" ai_xvel) 342 342 ("yvel" ai_yvel) 343 343 ("hp" ai_health) … … 352 352 (hurtable T)) 353 353 (abilities (start_hp 2)) 354 (fields ("aitype" "Power 0=nil,1=cn,2=fl,3=td,4=st") 354 (fields ("aitype" "Power 0=nil,1=cn,2=fl,3=td,4=st") 355 355 ("yacel" "Fade Count")) 356 356 (states "addon/twist/art/mario.spe" … … 373 373 (hurtable T)) 374 374 (abilities (start_hp 2)) 375 (fields ("aitype" "Power 0=nil,1=cn,2=fl,3=td,4=st") 375 (fields ("aitype" "Power 0=nil,1=cn,2=fl,3=td,4=st") 376 376 ("yacel" "Fade Count")) 377 377 (states "addon/twist/art/mario.spe" -
abuse/trunk/data-frabs/addon/twist/lisp/startup.lsp
r566 r582 7 7 (setq load_warn nil) 8 8 9 (if (local_load "addon/deathmat/username.lsp") 9 (if (local_load "addon/deathmat/username.lsp") 10 10 (set_login username)) 11 11 12 (if (local_load "addon/deathmat/gamename.lsp") 12 (if (local_load "addon/deathmat/gamename.lsp") 13 13 (set_game_name gamename) 14 14 (set_game_name "Munir's Game")) -
abuse/trunk/data-frabs/addon/twist/lisp/tints.lsp
r566 r582 3 3 4 4 5 (setq man_tints (make-array 11 :initial-contents (list 5 (setq man_tints (make-array 11 :initial-contents (list 6 6 normal_tint 7 7 (def_tint "art/tints/cop/pinkish.spe") -
abuse/trunk/data-frabs/addon/twist/lisp/userfuns.lsp
r566 r582 8 8 (reverse-seqbmp name first last))) 9 9 10 (defun forward-seqbmp (name first last) 11 (if (> first last) 12 nil 13 (cons (concatenate 'string name (digstr first 4) ".bmp") 10 (defun forward-seqbmp (name first last) 11 (if (> first last) 12 nil 13 (cons (concatenate 'string name (digstr first 4) ".bmp") 14 14 (forward-seqbmp name (+ 1 first) last)))) 15 15 16 (defun reverse-seqbmp (name last first) 17 (if (< last first) 18 nil 19 (cons (concatenate 'string name (digstr last 4) ".bmp") 16 (defun reverse-seqbmp (name last first) 17 (if (< last first) 18 nil 19 (cons (concatenate 'string name (digstr last 4) ".bmp") 20 20 (reverse-seqbmp name (- last 1) first)))) -
abuse/trunk/data-frabs/addon/twist/lisp/weapons.lsp
r566 r582 71 71 (c2 (find_rgb 70 59 67)) 72 72 (c3 (find_rgb 147 155 195))) 73 (let ((target (with_object (me) (find_object_in_area 73 (let ((target (with_object (me) (find_object_in_area 74 74 (- (x) 50) (- (y) 50) 75 75 (+ (x) 50) (+ (y) 50) object_destroyable_list)))) … … 79 79 (draw_line (with_object target (x)) (with_object target (-(y)(/(picture_height)2))) (x) (-(y)10) 187) 80 80 (draw_line (with_object target (+ (x) 1)) (with_object target (-(y)(/(picture_height)2))) (+(x)1) (-(y)10) 239) 81 (add_object EXPDRL (with_object target (-(+(x)10)(random 20))) (with_object target (- (+ (-(y)(/(picture_height)2)) 10) (random 20))) 1) 81 (add_object EXPDRL (with_object target (-(+(x)10)(random 20))) (with_object target (- (+ (-(y)(/(picture_height)2)) 10) (random 20))) 1) 82 82 (hurt_radius (with_object target (x)) (with_object target (y)) 1 2 (bg) 15) 83 83 ) … … 90 90 91 91 (defun death_ray_cache (type) 92 (list (list EXPDRAY QUICK_EXP_LIGHT) 92 (list (list EXPDRAY QUICK_EXP_LIGHT) 93 93 (list DEATH_RAY_SND))) 94 94 … … 129 129 (let ((amount (get_ability start_hp))) 130 130 (with_object (bg) 131 (progn 131 (progn 132 132 (if (and (not (has_weapon type)) change_on_pickup) 133 133 (progn 134 134 (if (or (get_option "-f") (eq enableammoandweapons 1)) (give_weapon type)) 135 135 (if (or (get_option "-f") (eq enableammoandweapons 1)) (set_current_weapon type)) 136 ) 136 ) 137 137 (if (or (get_option "-f") (eq enableammoandweapons 1)) (give_weapon type)) 138 138 ) … … 142 142 (let ((amount (get_ability start_hp))) 143 143 (with_object (bg) 144 (progn 144 (progn 145 145 (if (and (not (has_weapon type)) change_on_pickup) 146 146 (progn 147 147 (give_weapon type) 148 (set_current_weapon type)) 148 (set_current_weapon type)) 149 149 (give_weapon type)) 150 150 (add_ammo type amount))))) 151 151 152 152 153 (defun weapon_icon_ai () 153 (defun weapon_icon_ai () 154 154 (if (eq0 (aistate)) 155 155 (if (activated) … … 159 159 (set_aistate 1)) 160 160 161 (if (touching_bg) 161 (if (touching_bg) 162 162 (progn 163 163 (play_sound AMMO_SND 127 (x) (y)) … … 165 165 (MBULLET_ICON5 (giver 0));; these numbers correspond to status bar position 166 166 (MBULLET_ICON20 (giver 0)) 167 (GRENADE_ICON2 (giver 1)) 167 (GRENADE_ICON2 (giver 1)) 168 168 (GRENADE_ICON10 (giver 1)) 169 169 … … 191 191 T)) 192 192 T) 193 (if (touching_bg) 193 (if (touching_bg) 194 194 (progn 195 195 (play_sound AMMO_SND 127 (x) (y)) … … 197 197 (MBULLET_ICON5 (giver 0));; these numbers correspond to status bar position 198 198 (MBULLET_ICON20 (giver 0)) 199 (GRENADE_ICON2 (giver 1)) 199 (GRENADE_ICON2 (giver 1)) 200 200 (GRENADE_ICON10 (giver 1)) 201 201 … … 224 224 225 225 226 (defun weapon_iconweap_ai () 226 (defun weapon_iconweap_ai () 227 227 (if (eq0 (aistate)) 228 228 (if (activated) … … 232 232 (set_aistate 1)) 233 233 234 (if (touching_bg) 234 (if (touching_bg) 235 235 (progn 236 236 (play_sound AMMO_SND 127 (x) (y)) 237 237 (select (otype) 238 238 (WEAP_MBULLET (giverweap 0));; these numbers correspond to status bar position 239 (WEAP_GRENADE (giverweap 1)) 239 (WEAP_GRENADE (giverweap 1)) 240 240 (WEAP_ROCKET (giverweap 2)) 241 241 (WEAP_FBOMB (giverweap 3)) … … 248 248 T)) 249 249 T) 250 (if (touching_bg) 250 (if (touching_bg) 251 251 (progn 252 252 (play_sound AMMO_SND 127 (x) (y)) 253 253 (select (otype) 254 254 (WEAP_MBULLET (giverweap 0));; these numbers correspond to status bar position 255 (WEAP_GRENADE (giverweap 1)) 255 (WEAP_GRENADE (giverweap 1)) 256 256 (WEAP_ROCKET (giverweap 2)) 257 257 (WEAP_FBOMB (giverweap 3)) … … 263 263 nil) 264 264 T))) 265 265 266 266 267 267 (defun ammo_cache (type) ;; tells what other chars to load in with this character … … 273 273 (MBULLET_ICON20 `(,SHOTGUN_BULLET ,MGUN_TOP)) 274 274 (ROCKET_ICON2 `(,ROCKET ,ROCKET_TOP)) 275 (ROCKET_ICON5 `(,ROCKET ,ROCKET_TOP)) 275 (ROCKET_ICON5 `(,ROCKET ,ROCKET_TOP)) 276 276 (FBOMB_ICON1 `(,FIREBOMB ,FIREBOMB_TOP)) 277 277 (FBOMB_ICON5 `(,FIREBOMB ,FIREBOMB_TOP)) 278 278 279 279 (PLASMA_ICON20 `(,PLASMAGUN_BULLET)) 280 (PLASMA_ICON50 `(,PLASMAGUN_BULLET)) 280 (PLASMA_ICON50 `(,PLASMAGUN_BULLET)) 281 281 282 282 (LSABER_ICON50 `(,LSABER_BULLET ,PGUN_TOP)) … … 305 305 306 306 (defun make_ammo_icon (symbol icon_name increment) 307 (eval (list 'def_char symbol 307 (eval (list 'def_char symbol 308 308 '(funs (ai_fun weapon_icon_ai) 309 309 (get_cache_list_fun ammo_cache) … … 315 315 316 316 (defun make_ammoweap_icon (symbol icon_name increment) 317 (eval (list 'def_char symbol 317 (eval (list 'def_char symbol 318 318 '(funs (ai_fun weapon_iconweap_ai) 319 319 (get_cache_list_fun ammoweap_cache) -
abuse/trunk/data-frabs/addon/twist/twist.lsp
r566 r582 9 9 (progn 10 10 (print "Please make sure you unzipped the game with the -d option") 11 (print "so that all directories get created properly.") 12 (print "example : pkunzip -d abusXXXX.zip") 11 (print "so that all directories get created properly.") 12 (print "example : pkunzip -d abusXXXX.zip") 13 13 (quit))) 14 14 (setq load_warn T) … … 18 18 (load "lisp/userfuns.lsp") 19 19 (load "addon/twist/lisp/userfuns.lsp") 20 (load "addon/twist/lisp/options.lsp") 20 (load "addon/twist/lisp/options.lsp") 21 21 (load "addon/twist/lisp/startup.lsp") 22 22 (if (not (local_load "addon/twist/lisp/input.lsp")) ; get local copy first -
abuse/trunk/data-frabs/lisp/ant.lsp
r566 r582 2 2 ;; See licensing information for more details on usage rights 3 3 4 (setq ant_tints (make-array 13 :initial-contents (list 4 (setq ant_tints (make-array 13 :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") … … 18 18 ))) 19 19 20 /* 20 /* 21 21 ------ this code has been compiled -------- 22 22 (defun no_fall_move (xm ym but) … … 37 37 0) 38 38 ret)))) 39 40 39 40 41 41 (defun will_fall_if_jump () 42 42 nil) … … 62 62 63 63 (defun strait_rocket_ai () 64 (set_course (aistate) 64 (set_course (aistate) 65 65 (select difficulty 66 66 ('easy 12) … … 74 74 (progn 75 75 (if (not (eq stat nil)) 76 (progn 76 (progn 77 77 (add_object EXPLODE3 (+ (x) (random 5)) (+ (y) (random 5)) 0) 78 78 (add_object EXPLODE2 (+ (x) (random 5)) (+ (y) (random 5)) 2) … … 84 84 (with_object (add_object EG_EXPLO (x) (y)) (user_fun myself (car stat))))) 85 85 nil)))) 86 86 87 87 88 88 (def_char STRAIT_ROCKET … … 99 99 (if (or (blocked_left block_flags) (blocked_right block_flags)) 100 100 (set_state blocking)))) 101 101 102 102 (def_char EG_EXPLO 103 103 (funs (ai_fun animate_ai) … … 109 109 (blocking (seq "bilw" 1 4)))) 110 110 111 /* 111 /* 112 112 ------ this code has been compiled -------- 113 113 (defun alien_wait_time () 114 (select difficulty 114 (select difficulty 115 115 ('easy 6) 116 116 ('medium 4) … … 133 133 nil 134 134 T))) 135 136 135 136 137 137 (defun roof_above () (not (can_see (x) (y) (x) (- (y) 120) nil))) 138 138 … … 142 142 (playerx (+ (with_object (bg) (x)) (with_object (bg) (* (xvel) 8)))) 143 143 (playery (+ (- (with_object (bg) (y)) 15) (with_object (bg) (* (yvel) 2))))) 144 144 145 145 (if (and (can_see (x) (y) firex firey nil) (can_see firex firey playerx playery nil)) 146 146 (progn … … 154 154 (defun ant_dodge () 155 155 (if (eq need_to_dodge 1) 156 (progn 156 (progn