home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
ARSRC21.ZIP
/
AR256SO.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-06-01
|
1KB
|
89 lines
//
//to be brutally honest I dont think this needs comments.
//
#include <dos.h>
#include "ar256h.cpp"
#include "ar256ex.h"
void bip(int a)
{
if(noisy==1){
sound(a*100);
delay(20);
nosound();}
}
void risingbip(int a)
{
int b;
if(noisy==1){
for (b=800-a*100;b<800+a*100;b+=100)
{
sound(b);
delay(10);
nosound();
delay(50);
}
}
}
void downbip(int a)
{
if(noisy==1){
sound(100*a+400);delay(20);
sound(100*a+200);delay(20);
sound(100*a);delay(20);
nosound();
}
}
void lowbip(int a)
{
if(noisy==1){
sound(20*a);
delay(100);
nosound();}
}
void tripbip(int a)
{
if(noisy==1){
a+=2;
sound (a*100);
delay(40);
nosound();
delay(20);
sound (a*100);
delay(40);
nosound();
delay(20);
sound ((a+5)*100);
delay(120);
nosound();}
}
monster::power()
{
int pow,i;
pow=(attack+defend)*mmoves;
if (mshots) pow+=(5+range/3);
if(fly)pow+=5;
pow+=spellnum*2;
if(spellnum)
{
for(i=0;i<spellnum;++i)
{
if(spells[i]==0)pow-=2;
}
}
if(status==3) pow*=1.5;
pow+=15; //flatten the curve out a bit...
if(status==2) pow*=0.2;
if(status==0) pow=0;
if(status==0x11) pow=1;// cos corpses can be useful.
return(pow);
}