#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main ()
{
int a=100,s=100,d=500,f,g,k,q,w,e; //a=血量 s=体力 d=金币 g=1项目 f=小项目 k=仓库 q=随机血量 w=随机体力
cout<<"You have blood"<<a<<" "<<"You have strength"<<s<<" "<<"You have gold coins"<<d<<endl;
for(int i;i<=100;i++){
cout<<"Please select mode:"<<endl;
cout<<"1:Shopping mall"<<endl;
cout<<"2:Battle"<<endl;
cout<<"3:OpenVIP"<<endl;
cin>>f;
if(f==1){
cout<<"Please select equipment"<<endl;
cout<<"1.Draw a sword 100yuan"<<endl;
cout<<"2.Dagger 85yuan"<<endl;
cout<<"3.Desperate sword 500yuan"<<endl;
cout<<"4.Spear 1500yuan"<<endl;
cout<<"5.Imperial sword 3000yuan"<<endl;
cin>>g;
if(g==1){
d=d-100;
cout<<"Purchase successful"<<endl;
}
if(g==2){
d=d-80;
cout<<"Purchase successful"<<endl;
}
if(g==3){
d=d-500;
cout<<"Purchase successful"<<endl;
}
if(g==4){
d=d-1500;
cout<<"Purchase successful"<<endl;
}
if(g==5){
d=d-3000;
cout<<"Purchase successful"<<endl;
}
}
cout<<"Please select mode:"<<endl;
cout<<"1:Shopping mall"<<endl;
cout<<"2:Battle"<<endl;
cout<<"3:OpenVIP"<<endl;
cin>>f;
if(f==2){
cout<<"You have blood"<<a<<"You have strength"<<s;
cout<<"First Leg!"<<endl;
srand(time(0));
a=rand()%100+1;
srand(time(0));
s=rand()%100+1;
cout<<"You have blood"<<q<<"You have strength"<<w;
if(q<=10||w<=10)
{
cout<<"You Died"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
cout<<"You have blood"<<a<<"You have strength"<<s;
cout<<"Second Leg!"<<endl;
srand(time(0));
a=rand()%100+1;
srand(time(0));
s=rand()%100+1;
cout<<"You have blood"<<q<<"You have strength"<<w;
if(q<=10||w<=10)
{
cout<<"You Died"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
cout<<"You have blood"<<a<<"You have strength"<<s;
cout<<"Last Leg!"<<endl;
srand(time(0));
a=rand()%100+1;
srand(time(0));
s=rand()%100+1;
cout<<"You have blood"<<q<<"You have strength"<<w;
if(q<=10||w<=10)
{
cout<<"You Died"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
}
cout<<"Please select mode:"<<endl;
cout<<"1:Shopping mall"<<endl;
cout<<"2:Battle"<<endl;
cout<<"3:OpenVIP"<<endl;
cin>>f;
if(f==3){
cout<<"Do your daydream, no VIP"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
}
return 0;
}
Game(English)
最新推荐文章于 2024-08-28 14:35:43 发布