为了此游戏,我花了6小时34分钟2秒的时间,终于做好了,后期接着更新
警告大家,游戏归游戏,禁止模仿
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<windows.h>
#include<cstring>
#include<algorithm>
#include<iomanip>
#include<conio.h>
#include<bits/stdc++.h>
using namespace std;
int main(){
int h,g,m,n;
m=0;
n=0;
srand(time(0));
cout<<"小偷模拟器"<<endl<<"*被警察抓住会在60秒后关机,输入110可解除但会罚款*%请勿模仿%";
Sleep(3000);
system("cls");
while(1){
cout<<"你有"<<m<<"元"<<endl<<"你有银行卡"<<n<<"张"<<endl;
cout<<"你要去哪里"<<endl;
cout<<"1,普通房"<<endl<<"2,防盗房"<<endl<<"3,普通房2*至少有1000元*"<<endl<<"4,防盗房2*至少有3000元*"<<endl<<"5,警察局*去一次花500元*"<<endl<<"6,取款机*需要银行卡*"<<endl;
cin>>h;
if(h==110){
system("shutdown -a");
if(m>=500){
m-=500;
}else{
m=0;
}
if(n>=1){
n--;
}
}
if(h==1){
system("cls");
g=rand()%10+1;
if(g>3){
cout<<"没人在家%90成功 *"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g!=1){
cout<<"成功"<<endl;
m+=100;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}else{
cout<<"有人在家%60成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>4){
cout<<"成功"<<endl;
m+=100;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}
}
if(h==2){
system("cls");
g=rand()%10+1;
if(g>5){
cout<<"没人在家%70成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g&&1&&g!=2&&g!=3){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}else{
cout<<"有人在家%40成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>6){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}
}
if(h==3&&m>=1000){
system("cls");
g=rand()%10+1;
if(g>9){
cout<<"没人在家%90成功 *"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g!=1){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}else{
cout<<"有人在家%60成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>4){
cout<<"成功"<<endl;
m+=300;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}
}
if(h==4&&m>=3000){
system("cls");
g=rand()%10+1;
if(g>9){
cout<<"没人在家%70成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g&&1&&g!=2&&g!=3){
cout<<"成功"<<endl;
m+=500;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}else{
cout<<"有人在家%40成功"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1){
g=rand()%10+1;
if(g>6){
cout<<"成功"<<endl;
m+=500;
}else{
cout<<"失败"<<endl;
system("shutdown -s -t 60");
}
}
}
}
if(h==5&&m>=500){
m=m-500;
system("cls");
cout<<"二十四小时有人在%30得到银行卡"<<endl<<"确定?1,Yes 2,No"<<endl;
cin>>h;
if(h==1||h==2||h==3){
g=rand()%10+1;
if(g==1){
cout<<"成功";
n++;
}else{
cout<<"失败";
system("shutdown -s -t 60");
}
}
}
if(h==6&&n>0){
system("cls");
cout<<"你得到了5000元";
m+=5000;
n--;
}
Sleep(2000);
system("cls");
}
return 0;
}