Back to index

freedink-data  1.08.20080920
S7-BONG.c
Go to the documentation of this file.
00001 //Bonca..strong 
00002 
00003 void main( void )
00004 {
00005 //can't get out of screen until this dude is DEAD
00006 int &mcounter;
00007 screenlock(1);
00008 
00009 sp_brain(&current_sprite, 9);
00010 sp_speed(&current_sprite, 2);
00011 sp_nohit(&current_sprite, 0);
00012 sp_distance(&current_sprite, 50);
00013 sp_frame_delay(&current_sprite, 30);
00014 sp_range(&current_sprite, 30);
00015 sp_timing(&current_sprite, 0);
00016 sp_exp(&current_sprite, 120);
00017 sp_base_walk(&current_sprite, 600);
00018 sp_base_death(&current_sprite, 550);
00019 sp_base_attack(&current_sprite, 590);
00020 sp_defense(&current_sprite, 0);
00021 sp_strength(&current_sprite, 10);
00022 sp_touch_damage(&current_sprite, 5);
00023 sp_hitpoints(&current_sprite, 40);
00024 preload_seq(601);
00025 preload_seq(603);
00026 preload_seq(607);
00027 preload_seq(609);
00028 
00029 preload_seq(551);
00030 preload_seq(553);
00031 preload_seq(557);
00032 preload_seq(559);
00033 
00034 
00035 preload_seq(592);
00036 preload_seq(594);
00037 preload_seq(596);
00038 preload_seq(598);
00039 
00040 wait(500);
00041 int &mtarget = get_sprite_with_this_brain(9, &current_sprite);
00042 if (&mtarget > 0)
00043   {
00044    sp_target(&current_sprite, &mtarget);
00045   }
00046 
00047 set_callback_random("target",2000,0);
00048 
00049 }
00050 
00051 
00052 void target( void )
00053 {
00054 &mtarget = sp_target(&current_sprite, -1);
00055 
00056 if (&mtarget == 0)
00057    {
00058     //get new target
00059 
00060         &mtarget = get_sprite_with_this_brain(9, &current_sprite);
00061         if (&mtarget > 0)
00062           {
00063            sp_target(&current_sprite, &mtarget);
00064           }
00065 
00066    }
00067 
00068 }
00069 
00070 void hit( void )
00071 {
00072 playsound(29, 18050,0,&current_sprite, 0);
00073 
00074 sp_target(&current_sprite, &enemy_sprite);
00075 //lock on to the guy who just hit us
00076 //playsound
00077 
00078 }
00079 
00080 void die( void )
00081 {
00082 
00083 if (get_sprite_with_this_brain(9, &current_sprite) == 0)
00084  {
00085   //no more brain 9 monsters here, lets unlock the screen
00086 
00087   screenlock(0);
00088   playsound(43, 22050,0,0,0);
00089 
00090  }
00091 
00092 
00093 
00094   int &hold = sp_editor_num(&current_sprite);
00095   if (&hold != 0)
00096   editor_type(&hold, 6); 
00097 
00098 &save_x = sp_x(&current_sprite, -1);
00099 &save_y = sp_y(&current_sprite, -1);
00100 external("emake","large");
00101 }
00102 
00103 void attack( void )
00104 {
00105 playsound(31, 18050,0,&current_sprite, 0);
00106 &mcounter = random(2000,0);
00107 sp_attack_wait(&current_sprite, &mcounter);
00108 
00109 }
00110 
00111