home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / ARSRC21.ZIP / AR256SO.CPP < prev    next >
C/C++ Source or Header  |  1995-06-01  |  1KB  |  89 lines

  1. //
  2. //to be brutally honest I dont think this needs comments.
  3. //
  4. #include <dos.h>
  5. #include "ar256h.cpp"
  6. #include "ar256ex.h"
  7.  
  8.  
  9. void bip(int a)
  10.     {
  11.     if(noisy==1){
  12.     sound(a*100);
  13.     delay(20);
  14.     nosound();}
  15. }
  16.  
  17. void risingbip(int a)
  18.     {
  19.     int b;
  20.     if(noisy==1){
  21.     for (b=800-a*100;b<800+a*100;b+=100)
  22.         {
  23.         sound(b);
  24.         delay(10);
  25.         nosound();
  26.         delay(50);
  27.         }
  28.     }
  29. }
  30.  
  31. void downbip(int a)
  32.     {
  33.     if(noisy==1){
  34.     sound(100*a+400);delay(20);
  35.     sound(100*a+200);delay(20);
  36.     sound(100*a);delay(20);
  37.     nosound();
  38.     }
  39. }
  40.  
  41. void lowbip(int a)
  42.     {
  43.     if(noisy==1){
  44.     sound(20*a);
  45.     delay(100);
  46.     nosound();}
  47. }
  48.  
  49.  
  50. void tripbip(int a)
  51.     {
  52.     if(noisy==1){
  53.     a+=2;
  54.     sound (a*100);
  55.     delay(40);
  56.     nosound();
  57.     delay(20);
  58.     sound (a*100);
  59.     delay(40);
  60.     nosound();
  61.     delay(20);
  62.     sound ((a+5)*100);
  63.     delay(120);
  64.     nosound();}
  65. }
  66.  
  67. monster::power()
  68.     {
  69.     int pow,i;
  70.     pow=(attack+defend)*mmoves;
  71.     if (mshots) pow+=(5+range/3);
  72.     if(fly)pow+=5;
  73.     pow+=spellnum*2;
  74.     if(spellnum)
  75.         {
  76.         for(i=0;i<spellnum;++i)
  77.             {
  78.             if(spells[i]==0)pow-=2;
  79.             }
  80.         }
  81.     if(status==3) pow*=1.5;
  82.     pow+=15; //flatten the curve out a bit...
  83.     if(status==2) pow*=0.2;
  84.     if(status==0) pow=0;
  85.     if(status==0x11) pow=1;// cos corpses can be useful.
  86.     return(pow);
  87.  
  88. }
  89.