修复了手铐铐不住对面的问题
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int use,gqgl,a[2],j,ma,me,t,wo[9],ta[9];//1 fdjin 2 hzi 3 sju 4 xmgzhi 5 szuo 6 nzqi 7 gqypian
bool kill=true,sfwo,sfta,G3,q;
string name;
int main()
{
cout<<"Please sign the certificate of Life and death ..."<<endl;
cin>>name;
system("cls");
for(int i=1;i<=3;i++)
{
cout<<'I';
_sleep(250);
system("cls");
_sleep(250);
}
srand(time(0));
me=ma=rand()%4+2;
_sleep(1000);
system("cls");
srand(time(0));
while(1)
{
if(sfwo)
{
cout<<"Skip this";
_sleep(1000);
system("cls");
sfwo=false;
break;
}
kill=true;
system("cls");
cout<<"Props are being distributed..."<<endl;
_sleep(1000);
system("cls");
srand(time(0));
int man=rand()%3+1;
cout<<man<<" each...";
for(int i=1;i<=man;i++)
{
if(wo[i])
{
man++;
continue;
}
else
{
_sleep(1001);
srand(time(0));
wo[i]=rand()%7+1;
}
}
do
{
//
_sleep(1000);
srand(time(0));
a[1]=rand()%9+1;
if(ma<=0)
{
cout<<"You win,take you money";
return 0;
}
if(me<=0)
{
cout<<"die!";
system("shutdown -s -t 0");
}
system("cls");
cout<<"master:"<<ma<<endl<<name<<':'<<me;
_sleep(1300);
system("cls");
cout<<"shoots?"<<endl;
cout<<"1.you "<<"2.master "<<"3.use props"<<endl;
cin>>j;
if(j==3)
{
do
{
for(int i=1;i<=8;i++)
{
cout<<i<<' ';
if(wo[i]==1) cout<<"Magnifying glass"<<endl;
if(wo[i]==2) cout<<"Cigarettes"<<endl;
if(wo[i]==3) cout<<"Hand saw"<<endl;
if(wo[i]==4) cout<<"Beer"<<endl;
if(wo[i]==5) cout<<"Handcuffs"<<endl;
if(wo[i]==6) cout<<"Converter"<<endl;
if(wo[i]==7) cout<<"Expired pills"<<endl;
if(wo[i]==0) cout<<' '<<endl;
}
cin>>use;
cout<<endl;
if(wo[use]==1)
{
if(a[1]<=3) cout<<"This bullet... blank"<<endl;
else cout<<"This bullet... solid"<<endl;
_sleep(1000);
system("cls");
wo[use]=0;
}
if(wo[use]==2)
{
me++;
cout<<"nice"<<endl;
_sleep(1000);
system("cls");
wo[use]=0;
}
if(wo[use]==3)
{
G3=true;
cout<<"The muzzle of the gun was sawed off"<<endl;
_sleep(1000);
system("cls");
wo[use]=0;
}
if(wo[use]==4)
{
srand(time(0));
a[1]=rand()%9+1;
cout<<"The bullet has ejected from the gun"<<endl;
_sleep(1000);
system("cls");
wo[use]=0;
}
if(wo[use]==5)
{
sfta==true;
cout<<"He can't move"<<endl;
_sleep(1000);
system("cls");
wo[use]=0;
}
if(wo[use]==6)
{
if(a[1]<=3) a[1]==4;
else a[1]==1;
cout<<"The bullet type has been switched"<<endl;
_sleep(1000);
system("cls");
wo[use]=0;
}
if(wo[use]==7)
{
srand(time(0));
gqgl=rand()%10+1;
if(gqgl<=4)
{
me+=2;
cout<<"Alive again"<<endl;
_sleep(1000);
}
else
{
me--;
cout<<"Fuck"<<endl;
_sleep(1000);
}
system("cls");
wo[use]=0;
}
if(wo[use]==0) break;
else q=true;
}while(q);
}
if(j==1)
{
if(a[1]<=3)
{
system("cls");
_sleep(1000);
cout<<"You was shot!";
me--;
if(G3) me--;
G3=false;
_sleep(1000);
system("cls");
kill=false;
}
else
{
cout<<"no thing";
_sleep(1000);
system("cls");
srand(time(0));
a[1]=rand()%7+1;
G3=false;
}
}
if(j==2)
{
if(a[1]<=3)
{
cout<<"He was shot!";
ma--;
if(G3) ma--;
G3=false;
_sleep(1000);
system("cls");
}
else
{
cout<<"no thing";
_sleep(1000);
system("cls");
G3=false;
}
kill=false;
}
if(ma<=0)
{
cout<<"You win,take you money";
return 0;
}
if(me<=0)
{
cout<<"die!";
system("shutdown -s -t 0");
}
}while(kill);
bool jump=true;
//
do
{
if(sfta=false)
{
sfta=true;
cout<<"He can't mvoe";
break;
}
srand(time(0));
int jntm=rand()%6+1;
if(jntm>3)
{
cout<<"He shoots you ...";
_sleep(800);
system("cls");
if(a[1]<=3)
{
system("cls");
_sleep(2000);
cout<<"You was shot!";
me--;
_sleep(1000);
system("cls");
}
else
{
_sleep(1000);
cout<<"no thing";
_sleep(1000);
system("cls");
}
jump=false;
}
else
{
cout<<"He shoots him ...";
_sleep(800);
system("cls");
if(a[1]<=3)
{
_sleep(1000);
cout<<"He was shot!";
_sleep(1000);
system("cls");
ma--;
jump=false;
}
else
{
_sleep(2000);
cout<<"no thing";
_sleep(1000);
system("cls");
srand(time(0));
a[1]=rand()%7+1;
}
}
if(ma<=0) break;
if(me<=0) break;
}while(jump);
if(ma<=0)
{
cout<<"You win,take you money.";
return 0;
}
if(me<=0)
{
cout<<"die!";
system("shutdown -s -t 0");
}
}
}