Back to index

freedink-data  1.08.20080920
APOTION.c
Go to the documentation of this file.
00001 //adds one to all stats
00002 
00003 void main( )
00004 {
00005 preload_seq(55);
00006 preload_seq(56);
00007 preload_seq(57);
00008 
00009 sp_touch_damage(&current_sprite, -1);
00010 sp_seq(&current_sprite, 75);
00011 sp_brain(&current_sprite, 6);
00012 
00013 }
00014 
00015 void touch( void )
00016 {
00017 &magic += 1;
00018 &strength += 1;
00019 &defense += 1;
00020 say("Megapotion!  All stats raised by one.",1);
00021 Playsound(10,22050,0,0,0);
00022 //shrink to this percent then die
00023 sp_brain_parm(&current_sprite, 200);
00024 sp_brain(&current_sprite, 12);
00025 sp_touch_damage(&current_sprite, 0);
00026 sp_timing(&current_sprite, 0);
00027 
00028   int &hold = sp_editor_num(&current_sprite);
00029   if (&hold != 0)
00030     {
00031      //this was placed by the editor, lets make it not come back
00032      editor_type(&hold, 1); 
00033      //kill food forever
00034     }
00035 
00036 }
00037