for(int i=1;i<=EmptyBlock;i++)
TP(NewX+5,NewY-5+FullBlock+i,fgray+bblack,\'O\');
/*Print the blood/fullblood number*/
/*Due to %06d we can\'t use TP*/
gto(NewX+6,NewY-6),color(fgray+bblack),printf("%06d",Blood);
TP(NewX+6,NewY,OC,\'/\');
gto(NewX+6,NewY+1),color(fgray+bblack),printf("%06d",FullBlood);
}
/*Move the plane to a new place*/
void MovePrint(int NewX,int NewY,int flag=1){
/*Insure that player can control the plane when the mouse is out of screen*/
NewX=min(NewX,WINDOWC-7);
NewY=min(max(NewY,6),WINDOWW-7);
if(flag&&NewX==x&&NewY==y)
return;
//gto(WINDOWC-1,0),color(OC),printf("%3d %3d",NewX,NewY);//Debug
/*Clear the plane in the old position*/
TP(x,y,OC,\' \');
TP(x+1,y-1,OC,\' \'),TP(x+1,y+1,OC,\' \');
for(int i=y-5;i<=y+5;i++) TP(x+2,i,OC,\' \');
TP(x+3,y,OC,\' \');
TP(x+4,y-1,OC,\' \'),TP(x+4,y,OC,\' \'),TP(x+4,y+1,OC,\' \');
/*Move the blood line*/
BloodRefresh(NewX,NewY);
/*Print in the new position*/
x=NewX,y=NewY;
TP(x,y,OC,\'^\');
TP(x+1,y-1,OC,\'/\'),TP(x+1,y+1,OC,\'\\\');
TP(x+2,y-5,OC,\'|\');for(int i=y-4;i<=y+4;i++)TP(x+2,i,OC,\'-\');TP(x+2,y+5,OC,\'|\');
TP(x+3,y,OC,\'|\');
TP(x+4,y-1,OC,\'-\'),TP(x+4,y,OC,\'-\'),TP(x+4,y+1,OC,\'-\');
/*Refresh the bullets*/
}
void Shot{
/*Buff 5*/
/*Faster shot*/
int t=clock;
if(Buffs[5]==1)
ShotSpeed+=100,Buffs[5]=-1;
if(Buffs[5]==-1&&t-GetBuffTime[5]>=ConstBuffLastTime[5]){
ShotSpeed-=100;
Buffs[5]=0;
GetBuffTime[5]=0;
}
if(!ShotSpeed||LastShotTime>=t-(1000-ShotSpeed*AddShotSpeed))
return;
LastShotTime=t;
if(x>0){
OwnShotTimes++;
int Type=1;
/*Buff 3*/
/*Get bullets more powerful*/
if(Buffs[3]){
if(t-GetBuffTime[3]>=ConstBuffLastTime[3])
Buffs[3]=0,GetBuffTime[3]=0;
else
Type=3;
}
Ammo.insert(new Bullet(1,x-1,y,Type,-1,0));
/*Buff 1*/
/*5 lines of bullets*/
if(Buffs[1]){
if(t-GetBuffTime[1]>=ConstBuffLastTime[1]){
Buffs[1]=0;
GetBuffTime[1]=0;
return;
}
Ammo.insert(new Bullet(1,x-1,y-2,Type,-1,0));
Ammo.insert(new Bullet(1,x-1,y-1,Type,-1,0));
Ammo.insert(new Bullet(1,x-1,y+1,Type,-1,0));
Ammo.insert(new Bullet(1,x-1,y+2,Type,-1,0));
}
}
}
}Own;
struct Buff{
int x,y;
int Type;
int DisappearTime;
Buff{}
Buff(int t){x=rand%(WINDOWC-3)+1,y=rand%(WINDOWW-2)+1,Type=t,DisappearTime=clock+ConstBuffAppearTime[t];}
};
set<Buff*> BuffIn;
int LastBuffAppearTime;
int BuffAppearCD=3000;
void BuffRefresh{
int T=clock;
/*New buff in the screen*/
if(LastBuffAppearTime+BuffAppearCD<=T){
int id=rand;
int t=ConstBuffAppearPossibility[BossFlag][id%10];
if(t)
BuffIn.insert(new Buff(t));
LastBuffAppearTime=T;
}
vector<set<Buff*>::iterator> Throw;
for(set<Buff*>::iterator it=BuffIn.begin;it!=BuffIn.end;it++){
Buff *p=*it;
TP(p->x,p->y,ConstBuffColor[p->Type],ConstBuffName[p->Type]);
if(Own.Hit(p->x,p->y)){
/*Buff 2*/
/*Recover 100 blood*/
if(p->Type==2){
Own.Blood=min(Own.Blood+100,Own.FullBlood);
Own.BloodRefresh(Own.x,Own.y);
}
else{
Own.Buffs[p->Type]=1;
Own.GetBuffTime[p->Type]=T;
}
Throw.push_back(it);
TP(p->x,p->y,OC,\' \');
}
else if(T>=p->DisappearTime){
Throw.push_back(it);
TP(p->x,p->y,OC,\' \');
}
}
for(int i=0;i<int(Throw.size);i++)
BuffIn.erase(Throw[i]);
//for(int i=1;i<=MAX_BUFF_NUM;i++)
// if(Own.Buffs[i]&&clock-Own.GetBuffTime[i]>=ConstBuffLastTime[i])
// Own.Buffs[i]=0;
}
const char CHART[15]={\'|\',\'?\',\'^\',\'&\',\'=\',\'!\',\'@\',\':\',\'p\',\'\\\'};
void GameOver{
color(OC);
system("cls");
/*Get max score before*/
LL MaxScore=0;
LL num=((MaxScore*18-2)*38-1314)/2*100+52;
ifstream R("./MaxScore.sc");
- 顺玩游戏 顺网游戏中心
- windows7网络和共享中心打不开 win7系统网络和共享中心打不开
- 森林控制台代码能给好友使用吗 森林控制台作弊码大全
- 汤尼简介 汤尼国际语言中心培训
- 广州汽车维修培训中心 广州汽车维修专业学校
- 天津流浪猫狗收容中心 天津狗狗网
- 英雄联盟头像领取中心 LOL领取头像
- 阿里巴巴将与俄罗斯出口中心联合推出俄产品对华出口项目
- 亚马逊电话 400 卓越亚马逊客服中心电话
- 12306铁路客户服务电话 全国铁路客户服务中心 12306官网
特别声明:本站内容均来自网友提供或互联网,仅供参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
