该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
for(;n_s<4;n_s++,pdr++)
{
if(!(pdr->hp))php+=1;printf("现在与你对决的是[%s]\n",pdr->drname);
for(;*php>=0&&(pdr->hp)>=0;)
{
printf("%s\n体力:",name);
for(i=0;i
printf("\n真气:");
for(i=0;i
printf("\n破绽:0\n观察:0\n招式:\n\t(a)攻击\n\t(d)防御\n\t(f)剑气\n\t(s)闪避\n"); printf("\n%s\n体力:",pdr->drname);
for(i=0;ihp;i++) printf("%c",3);
printf("\n真气:");
for(i=0;imp;i++) printf("%c",6);
printf("\n");
if(!(*php))
{
printf("\n敌人实力太强,扯呼!\n");
break;
}
else
for(;;)
{
int x,zs_s;
char n_s;
//for(j=0;j<4;j++){n[j]=rand()%4;continue;}
for(x=0;;x++)
{
//if(x>3)for(j=0;j<4;j++){n[j]=rand()%4;break;}
if(*php==0)break;
scanf("%s",&n_s);
switch(n_s)
{
case 'a':zs_s=1;//攻击
case 'd':zs_s=2;//防御
case 'f':zs_s=3;//剑气
case 's':zs_s=4;//闪避
}
x=rand()%4;
switch(zs_s)
{
case 1:
{
if(x==0)
{
*php-=2;
pdr->hp-=2;
continue;
}
else if(x==1)
{
pdr->hp-=1;
pdr->gc+=1;
pz+=1;
continue;
}
else if(x==2)
{
pdr->hp-=2*2;
pdr->gc-=1;
pdr->mp-=3;
*php-=2;
pz+=1;
continue;
}
else if(x==3)
{
pdr->hp-=2;
pdr->gc-=1;
if(pdr->mp>1)pdr->mp-=1;
pz+=1;
continue;
}
}
case 2:
{
if(x==0)
{
pdr->pz+=1;
*php-=2;
gc+=1;
continue;
}
else if(x==1)
{
pdr->hp+=1;
*php+=1;
continue;
}
else if(x==2)
{
pdr->pz+=1;
pdr->mp-=3;
*php-=2*2;
gc+=1;
continue;
}
else if(x==3)
{
pdr->mp-=1;
pdr->hp+=1;
continue;
}
}
case 3:
{
if(x==0)
{
pdr->hp-=2;
pdr->pz+=1;
*php-=2*2;
gc+=1;
mp-=3;
continue;
}
else if(x==1)
{
pdr->hp-=2*2;
pdr->gc+=1;
mp-=2;
gc-=1;
continue;
}
else if(x==2)
{
pdr->hp-=2;
pdr->mp-=3;
*php-=2;
mp-=3;
continue;
}
else if(x==3)
{
pdr->hp+=1;
pdr->mp-=1;
mp-=3;
continue;
}
}
case 4:
{
if(x==0)
{
pdr->pz+=1;
*php-=2;
gc-=1;
mp-=1;
continue;
}
else if(x==1)
{
mp-=1;
continue;
}
else if(x==2)
{
pdr->mp-=3;
*php+=1;
mp-=1;
continue;
}
}
}
}
break;
}
continue;
}
}
}
return 0;
}
}
太晚了,头有点晕,明晚再来检查 跳出循环的错误..
感谢大神帮忙!!