1(defun antbody_ai () 2 (if (< (hp) 16 ) (progn (next_picture) (set_hp (+ (hp) 1) ) ) nil ) 3 (if (eq0 (aistate)) (progn 4 (try_move 0 10) 5 (if (eq (second (see_dist (x) (y) (x) (+ (y) 1))) (y)) ; if we are on the floor, don't check falling anymore 6 (set_aistate 1)))) 7 T 8) 9 10 11(def_char ANTBODY 12 (funs (ai_fun antbody_ai) 13 (draw_fun ant_draw)) 14 (flags (unlistable T)(add_front T)) ;; This class is obsolete, just keeping it here for compatibility 15 (states "art/ant.spe" (stopped (seq "adib" 1 16)))) 16 17(def_char DECO_ANTBODY 18 (funs (ai_fun antbody_ai) 19 (draw_fun ant_draw)) 20 (flags (add_front T)) 21 (states "art/ant.spe" (stopped (seq "adib" 1 16)))) 22 23(def_char DECO_ANTBODY2 24 (funs (ai_fun do_nothing) 25 (draw_fun ant_draw)) 26 (states "addon/leon/lnant.spe" (stopped "asit0001.pcx"))) 27 28(def_char DECO_ANTBODY3 29 (funs (ai_fun do_nothing) 30 (draw_fun ant_draw)) 31 (states "art/ant.spe" (stopped (seq "adib" 6 16)))) 32 33 34(def_char DECO_ANTHANG 35 (funs (ai_fun sit_ai) 36 (draw_fun ant_draw)) 37 (states "art/ant.spe" (stopped (seq "hang" 1 4)))) 38 39(defun sit_ai () 40 (select (aistate) 41 (0 (set_hp (+ 20 (random 20) ) ) 42 (set_aistate 1) 43 ) 44 (1 (set_hp (- (hp) 1) ) 45 (if (eq (hp) 0) 46 (progn 47 (set_aistate 0) 48 (next_picture) 49 ) 50 ) 51 ) 52 ) 53 T 54) 55 56(def_char DECO_ANTSIT 57 (funs (ai_fun sit_ai) 58 (draw_fun ant_draw)) 59 (states "addon/leon/lnant.spe" (stopped (seq "asit" 1 2))))