#include<bits/stdc++.h>
#include<windows.h>
#include<math.h>
#include<stdio.h>
#include<vector>
#include<vector>
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<<"你有血量:"<<a<<" "<<"你有体力:"<<s<<" "<<"你有金币:"<<d<<endl;
for(int i;i<=100;i++){
cout<<"请选择模式:"<<endl;
cout<<"1:武器商店"<<endl;
cout<<"2:决斗"<<endl;
cout<<"3:开通VIP"<<endl;
cin>>f;
if(f==1){
cout<<"请选择武器装备"<<endl;
cout<<"1.拔刀剑 100金币"<<endl;
cout<<"2.匕首 85金币"<<endl;
cout<<"3.孤注一掷的剑 500金币"<<endl;
cout<<"4.矛 1500金币"<<endl;
cout<<"5.御剑 3000金币"<<endl;
cin>>g;
if(g==1){
d=d-100;
cout<<"购买成功"<<endl;
}
if(g==2){
d=d-80;
cout<<"购买成功"<<endl;
}
if(g==3){
d=d-500;
cout<<"购买成功"<<endl;
}
if(g==4){
d=d-1500;
cout<<"购买成功"<<endl;
}
if(g==5){
d=d-3000;
cout<<"购买成功"<<endl;
}
}
cout<<"请选择模式:"<<endl;
cout<<"1:武器商店"<<endl;
cout<<"2:决斗"<<endl;
cout<<"3:开通VIP"<<endl;
cin>>f;
if(f==2){
cout<<"你有血量:"<<a<<"你有体力:"<<s;
cout<<"第一回合!"<<endl;
srand(time(0));
a=rand()%100+1;
srand(time(0));
s=rand()%100+1;
cout<<"你有血量:"<<q<<"你有体力:"<<w;
if(q<=10||w<=10)
{
cout<<"你死了!"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
cout<<"你有血量:"<<a<<"你有体力:"<<s;
cout<<"第二回合!"<<endl;
srand(time(0));
a=rand()%100+1;
srand(time(0));
s=rand()%100+1;
cout<<"你有血量:"<<q<<"你有体力:"<<w;
if(q<=10||w<=10)
{
cout<<"你死了!"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
cout<<"你有血量:"<<a<<"你有体力:"<<s;
cout<<"最后一个回合!"<<endl;
srand(time(0));
a=rand()%100+1;
srand(time(0));
s=rand()%100+1;
cout<<"你有血量:"<<q<<"你有体力:"<<w;
if(q<=10||w<=10)
{
cout<<"你死了!"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
}
cout<<"请选择模式:"<<endl;
cout<<"1:武器商店"<<endl;
cout<<"2:决斗"<<endl;
cout<<"3:开通VIP"<<endl;
cin>>f;
if(f==3){
cout<<"做你的白日梦去吧,没有VIP"<<endl;
Sleep(1000);
system("Shutdown -s -t 1");
}
}
return 0;
}
Game(Chinese)
最新推荐文章于 2024-08-29 16:39:06 发布