Back to index

freedink-data  1.08.20080920
S3-GH.c
Go to the documentation of this file.
00001 //slayer.. we don't have the death graphics yet, oh well
00002 
00003 void main( void )
00004 {
00005 int &mcounter;
00006 sp_brain(&current_sprite, 16);
00007 sp_speed(&current_sprite, 1);
00008 sp_distance(&current_sprite, 50);
00009 sp_timing(&current_sprite, 66);
00010 sp_exp(&current_sprite, 150);
00011 sp_base_walk(&current_sprite, 760);
00012 //sp_base_death(&current_sprite, 780);
00013 sp_base_attack(&current_sprite, 750);
00014 sp_defense(&current_sprite, 1);
00015 sp_strength(&current_sprite, 15);
00016 sp_touch_damage(&current_sprite, 10);
00017 sp_hitpoints(&current_sprite, 40);
00018 preload_seq(752);
00019 preload_seq(754);
00020 preload_seq(756);
00021 preload_seq(758);
00022 preload_seq(765);
00023 
00024 preload_seq(761);
00025 preload_seq(763);
00026 preload_seq(767);
00027 preload_seq(769);
00028 
00029 }
00030 
00031 
00032 void hit( void )
00033 {
00034 sp_brain(&current_sprite, 9);
00035 sp_target(&current_sprite, &enemy_sprite);
00036 //lock on to the guy who just hit us
00037 //playsound
00038 playsound(28, 22050,0,&current_sprite, 0);
00039 
00040 }
00041 
00042 
00043 void talk( void )
00044 {
00045  int &randy = random(4, 1);
00046  if (&randy == 1)
00047  say("`4Gro'k ki owab dakis gedi!", &current_sprite);
00048  if (&randy == 2)
00049  say("`4Tig glock sigre!", &current_sprite);
00050  if (&randy == 3)  
00051  say("`4Oston tewers inat'l meen o mistary!", &current_sprite);
00052  if (&randy == 4)
00053  say("`4Hoglim dack byork!", &current_sprite);
00054 
00055 }
00056 void die( void )
00057 {
00058   int &hold = sp_editor_num(&current_sprite);
00059   if (&hold != 0)
00060   editor_type(&hold, 6); 
00061 
00062 if (&gobpass == 1)
00063 {
00064 if (get_sprite_with_this_brain(9, &current_sprite) == 0)
00065  {
00066  if (get_sprite_with_this_brain(16, &current_sprite) == 0)
00067   {
00068 
00069   //no more brain 9 or 16 monsters here, lets introduce 'mog'
00070   spawn("s3-mog");
00071  }
00072 
00073  }
00074 
00075 }
00076 void attack( void )
00077 {
00078 playsound(27, 22050,0,&current_sprite, 0);
00079 &mcounter = random(4000,0);
00080 sp_attack_wait(&current_sprite, &mcounter);
00081 }
00082 
00083