小游戏1.8.7

#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
int jjj;
int hjk;
int wuqidian;
bool bbbb=true;
string a1,a2,a3,qm;
long long b1,b2,b3,qm1;
bool c1=true,c2=true,c3=true;
bool tianti=true;
int fg=1;
int qwera;
int ss=1;
int ppo=1000;
int hh;
string menpai;
string gdp;
int kj;
int youxi;
int hj=1;
int kk=0;
int df;
int i;
int qws;
int wait;
int ddd;
bool ll=true;
int qq=0;
bool rumen=true;
bool bif=true;
int mima,chongzhi,ww=0;
long long qigong;
long long xueliang;
long long zongxueliang;
long long menpai2;
long long liliang=10;
long long zhihui=10;
long long money=50;
long long neili=0;
long long zengfu=0;
long long fangyu=0;
long long xueliang2=0;
long long zhanli=0;
long long jingyan=0;
long long yishu=0;
long long tili=40;
bool ceshi=true;
int qwer;
void zhandou(int p1) {
xueliang2=p1110;
zhanli=p1
9;
long long gongji=0;
gongji=liliang1.5+0.5zhihui+zengfu+0.2neili;
while (1){
if (gongji>=xueliang2){
cout <<“您真是太厉害了” <<endl;
neili+=p1;
zongxueliang=200+1.5
neili;
money+=p1;
bif=true;
hjk=0;
break;
}else{
xueliang2=xueliang2-gongji;
xueliang=xueliang-zhanli+fangyu;
if (rand()%7==2){
cout <<“触发”<<qm<<endl;
xueliang2-=qm1;
}
cout << “您还有” <<xueliang << “点血量” << endl;
cout << “敌人还有” <<xueliang2<< “点血量” <<endl;
if(xueliang<=0){
ceshi=true;
cout << “你死了”<<endl;
break;
}
}
}
}
int renwu=1;

int hy1=0,hy2=0,hy3=0;

void renwu1(int ggg)
{

	cout << "第一阶段任务"<<endl;
	cout << "提升实力:"<<endl;
	cout << "1.提升力量,力量大于500点"<<endl;
	cout <<"完成情况:" ;
	if (liliang>=500){
		cout <<"yes"<<endl;
		hy1=1;
	} else {
		cout <<"no"<<endl; 
	}
	cout << "2.提升内力,内力大于2000点"<<endl;
	cout <<"完成情况:" ;
	if (neili>=200){
		cout <<"yes"<<endl;
		hy2=1;
	} else {
		cout <<"no"<<endl; 
	}
	cout << "3.毕业测试"<<endl;
	cout << "输入1参加测试"<<endl;

	cin>>qwer;
	if (qwer==1){
	hjk=1;
	zhandou (100);
	if (hjk==0){
	 	hy3=1;
	 	ceshi=false;
	 }
	 
	 }

if (b1==1&&b2==1&&b3==1){
	cout << "你已经完成了学业,是时候出去闯荡了" <<endl;
	cout << "创建自己的宗门吧,输入它的名字" <<endl;
	cin>>menpai;
}
}

void d1(int fff){
if (neili<500){
cout << “内力不足”<<endl;
} else if(rumen==true) {
cout <<“请选择加入分院”<<endl;
cout <<“1.医学院”<<endl;
cout <<“2.武学院”<<endl;
cout <<“3.离开”<<endl;
cin >> qq;
if(qq=1&&yishu>=100){
cout << “欢迎加入医学院”<<endl;
rumen=false;
ceshi=true;
} else if(qq=2&&neili>=800){

				cout << "欢迎加入武学院"<<endl;
				ceshi=true; 
				rumen=false;
			 
			} else 
			cout << "条件不符合,请继续努力"<<endl; 

}
}
void d2(int iuyu){

cout << “1.任务”<<endl;
cout << “2.特殊商店开启密码”<<endl;
cin>>qq;
if (qq2){
cout << “密码为:”<<ddd <<endl;
}
if (qq
1){
if (renwu==1)
{
renwu1(renwu);
}

			}
		}

void shangcheng(int a){
wuqidian=0;
Beep(800,200);
cout<< “欢迎来到武器店”<<endl;
cout<< “1.攻击类”<<endl;
cout<< “2.防御类”<<endl;
cout<< “3.特殊类”<<endl;
int q;
cin>>q;
if (q==1){
cout<<“1、小刀(10元加2攻击力)”<<endl;
cout<<“2、短剑(20元加7攻击力)”<<endl;
cout<<“3、大砍刀(50元加20攻击力)”<<endl;
cout<<“4、双节棍(70元加30攻击力)”<<endl;
cout<<“5.离开” <<endl;

		cin>>wuqidian;
		if(wuqidian==1)
			if(money<10){
				cout<<"你的钱不够"<<endl;
				Beep(800,200);
				
			} 
			else {
				cout<<"购买成功!"<<endl;
				Beep(800,200); 
				zengfu +=2; 
				money-=10; 
		}
		if(wuqidian==2)
			if(money<20){
				Beep(800,200);
				cout<<"你的钱不够"<<endl;
			} 
			else {
				cout<<"购买成功!"<<endl; 
				zengfu +=7; 
				money-=20; 
			 Beep(800,200);
		} 
		if(wuqidian==3)
			 if(money<50){
				cout<<"你的钱不够"<<endl;
				Beep(800,200);
			} 
			else {
				cout<<"购买成功!"<<endl; 
				zengfu +=20; 
				money-=50; 
			 Beep(800,200);
		}
		if(wuqidian==4)
			 if(money<70){
				Beep(800,200);
				cout<<"你的钱不够"<<endl;
			} 
			else {
				cout<<"购买成功!"<<endl; 
				zengfu +=30; 
				money-=70; 
			 Beep(800,200);
		}
			if(wuqidian==5) {
			Beep(800,200);
			cout << "再见" << endl;
			
		}
}
else if (q==2){
	Beep(800,200);
		cout<< "1.布甲(加8防御,15元)"<<endl;
		cout<< "2.皮甲(加15防御,20元)"<<endl;
		cout<< "3.铁甲(加30防御,38元)"<<endl;
		cout <<"4.返回"<<endl; 
		cin>>wuqidian;
		if(wuqidian==1) 
			if(money<15){
			Beep(800,200);
				cout<<"你的钱不够"<<endl;
			} 
			else {
				Beep(800,200);
				cout<<"购买成功!"<<endl; 
				fangyu +=8; 
				money-=15; 
			
		}
		if(wuqidian==2)
			 if(money<20){
			Beep(800,200);
				cout<<"你的钱不够"<<endl;
			} 
			else {
				Beep(800,200);
				cout<<"购买成功!"<<endl; 
				fangyu +=15; 
				money-=20; 
			
		} 
		if(wuqidian==3)
			 if(money<38){
				Beep(800,200);
				cout<<"你的钱不够"<<endl;
			} 
			else {
				Beep(800,200);
				cout<<"购买成功!"<<endl; 
				fangyu +=30; 
				money-=38; 
			 
		}
			if(wuqidian==4)
			Beep(800,200);
			cout << "再见" <<endl;

}
else if (q3) {
cout << “请输入密码”<<endl;
cin>>mima;
jjj++;
if(mima
ddd){
cout << “1.全面增加”<<endl;
cout << “2.聪明水”<<endl;
cout << “3.功力丸”<<endl;
cout << “4.力量剂”<<endl;
cout << “5.离开”<<endl;
cin>>qq;
cout << “请输入金额”<<endl;
cin>> ww;
if(qq=1){
if (ww<=money){
zhihui+=ww;
money-=ww;
neili+=ww/2;
money-=ww;
jingyan+=ww*3;
money-=ww;
liliang+=ww/4;
money-=ww;
} else {
cout <<“钱不够”<<endl;
}
}
if (qq==2)
{
if (ww<=money){
zhihui+=ww;
money-=ww;

			} else {
				cout <<"钱不够"<<endl;
			}
			}
			if (qq==3){
			if (ww<=money){
			
			neili+=ww/2;
			money-=ww;
			
			} else {
				cout <<"钱不够"<<endl;
			}
			}
			if (qq==4){
				if (ww<=money){
			
			liliang+=ww/4;
			money-=ww;
			} else {
				cout <<"钱不够"<<endl;
			}
			}
			cout << "密码已重置"<<endl;
			jjj++;
	}else {
		cout << "密码错误" <<endl;
	} 
		
		
	}

}

void jianghu(int qwe){
int ff=rand();
if (ff%1234579||ff%67812){
tili–;
cout << “你在路上偶遇仙人,得仙人指点,内力大进”<<endl;
neili+=100;
} else if(ff%1271||ff%1275){
tili–;

	cout <<"你走在乡间的小路上,意外发现了一本武功秘籍,修炼后力量加10"<<endl;
	liliang+=10; 
} else if (ff%113==1){
	tili--;
	cout <<"你与朋友相约游玩,有感而发,写出千古绝唱,智力加8" <<endl;
	zhihui+=8; 
}else if (ff%99==1||ff%99==98||ff%99==34){
	tili--;
	cout <<"去酒馆,想找点乐子,却发现什么也没有"<<endl;
	money-=1; 
}else if (ff%79==37||ff%79==18){
	tili--;
	cout << "你帮助一只商队击退土匪,得到商队馈赠"<<endl;
	money+=3;
} else if(ff%33==13)
{
	tili--;
	cout <<"一群大汉不由分说暴打了你"<<endl;
	zongxueliang-=4; 
	xueliang-=4;
	jingyan+=8; 
}else if(ff%19==8){
	tili--;
	cout <<"你在路上捡到了钱"<<endl;
	money+=1; 
	jingyan+=2;
	}else if(ff%237==3) {
	tili--;
	cout <<"看到一老汉被殴打,感悟人生疾苦"<<endl; 
	jingyan+=999; 
}else {
	tili--;
	cout <<"什么也没发生"<<endl; 
	jingyan+=4; 
} 

}

int main()
{
bool ceshi=true;
string asdf;
bbbb=false;
int qwert;
int hhh;
int ghf=1;
tianti=false;
jjj=1;

cout<<“欢迎来到本游戏”<<endl;
cout<<“请选择难度”<<endl;
cout << “1.简单”<<endl;
cout << “2.困难”<<endl;
cout << “3.地狱”<<endl;
cin>>asdf ;
if (asdf==“1”)
{
zongxueliang=600;
xueliang=600;
liliang=80;
zhihui=80;
tili=100;
}
if (asdf==“2”)
{
zongxueliang=300;
xueliang=300;
liliang=40;
zhihui=40;
tili=50;
}
if (asdf==“3”)
{
zongxueliang=100;
xueliang=100;
liliang=5;
zhihui=5;
tili=10;
}

while (1)
{
srand(jjj);
ddd=rand();
srand(jjj);
hhh=rand();
	Beep(800,200);
	
	cout<<"1.去武器店"<<endl; 
	cout<<"2.退出游戏"<<endl; 
	cout<<"3.显示你的状态"<<endl;  
	cout<<"4.门派"<<endl; 
	cout<<"5.行走江湖"<<endl;
	cout<<"6.决斗场" <<endl; 
	cout <<"7.医馆"<<endl; 
	cout <<"8.充值"<<endl; 
	cout <<"9.无"<<endl;
	cout <<"10.武馆"<<endl;
	cout <<"11.无限天梯"<<endl;
	cin>>youxi;
	if (youxi==2007411) {
			cout << "https://blog.csdn.net/wedfagg/article/details/96706645"<<endl;

		}
	if(youxi==10086&&ll==true){
		Beep(800,200);
		Beep(800,200);
		Beep(800,200);
		cout << "您已激活大礼包一份"<<endl;
		Beep(800,200);
		money+=60;
		ll=false; 
		
	}
	
	if(youxi==12345){
		cout << "金钱不够怎么办???"<<endl;
		cout << "输入“zuozhetaishuaile”我就告诉你充值密码"<<endl;
		cin>>gdp;
		if (gdp=="zuozhetaishuaile")
		{
			cout<<"密码"<<hhh<<endl; 
		} else {
			cout << "滚!!!"<<endl; 
		}
	}
	
	if (youxi==1){
		if (money<0){
			cout << "你欠债啦"<<endl;
		}
		shangcheng(youxi);
		Beep(800,200);
	}
	if (youxi==2) {
		cout << "再见" <<endl;
		Beep(800,200);
		break;
	}
	if (youxi==3){
		Beep(800,200);
		cout<<"你的生命力:"<<xueliang<<endl; 
		cout<<"你的力量:"<<liliang<<endl; 
		cout<<"你的防御力:"<<fangyu<<endl; 
		cout<<"你拥有的钱:"<<money<<endl;
		cout<<"你的智慧:"<<zhihui<<endl;
		cout<<"你的增幅:"<<zengfu<<endl; 
		cout<<"你的内力:"<<neili<<endl;
		cout<<"你的经验:"<<jingyan<<endl;
		cout<<"你的体力:"<<tili<<endl;
		cout<<"你的医术:"<<yishu<<endl;
		cout <<"你的宗门:"<<menpai2<<endl;
		int oiu=liliang*1.5+0.5*zhihui+zengfu+0.2*neili+fangyu+menpai2;
		if (oiu>=10000000){
			cout << "留名千古"<<endl;
		}
		else if (oiu>=1000000){
			cout << "闻名中外"<<endl;
		}
		 else if (oiu>=100000){
			cout << "小有名气"<<endl; 
		}
		else if (oiu>=10000){
			cout <<"斩头露角"<<endl;
		}
		else if (oiu>=1000){
			cout << "初出江湖"<<endl;
		} else cout << "战五渣"<<endl;
		if (yishu>=100000){
			cout <<"医神"<<endl;
		} else if (yishu>=10000){
			cout <<"医圣"<<endl;
		} else if (yishu>=1000){
			cout <<"医狂"<<endl;
		} else if (yishu>=100){
			cout <<"医师"<<endl;
		} else {
		 	cout << "医徒" <<endl;
		 } 
		 if (liliang>=100000){
		 	cout <<"力神"<<endl;
		 }
		 if (xueliang>=1000000){
		 	cout << "打不死的小强" <<endl;
		 }
		 if (zhihui>=100000){
		 	cout <<"智商爆表"<<endl;
		 }
		 if (money>=1000000){
		 	cout << "神豪"<<endl;
		 } else if (money>=100000){
		 	cout << "土豪"<<endl;
		 } else if (money>=10000){
		 	cout << "暴发户"<<endl;
		 } else if (money>=1000){
		 	cout << "平民"<<endl;
		 } else if (money<1000){
		 	cout << "无产阶级"<<endl;
		 } 
		 if (tili>=100000){
		 	cout <<"体力变态"<<endl;
		 } 
	}
if (youxi==6){
			for(int i=fg;i>=1;i++){
			if(tili<=0){
			cout << "体力不足"<<endl;
			break;
			break;
			}
			cout << "第"<<i <<"战"<<endl; 
			zhandou(i);
			tili--;
			if (xueliang<=0){
				break;
				break;
			}
			fg=i;
			cout <<"正在回血中。。。。" <<endl;

			xueliang=zongxueliang;

			cout<<"你的内力:"<<neili<<endl;
			cout<<"你的生命力:"<<xueliang<<endl;
			cout<<"你拥有的钱:"<<money<<endl;
			
	}
		
		cout << "你失败了,请再接再厉"<<endl; 
		Beep(800,200);
		xueliang=zongxueliang;
	}
	if (youxi==4){
			d1(1);
		    if (rumen==false&&ceshi==true){ 
				d2(1);
			}
			if (hy1==1&&hy2==1&&hy3==1){
			bbbb=true;
			cout << "现在你也是一宗之主了,这是宗门排名,你要成为第一!"<<endl;
			cout <<"1.招募成员"<<endl;
			cout <<"2.挑战"<<endl; 
			cout <<"3.离开"<<endl;
			cout <<"4.成员升级"<<endl;
			cin>>qwera;
			if (qwera==1){
				for (int ii=ss;ii*10<=money;ii++){
					money-=ii*10;
					menpai2+=ii*ii/2;
					ss=ii;
				}
				cout << "你的宗门有"<<ss<<"名成员" <<endl;
			}
			if (qwera==2){
				for (int ii=kk;ii<=1000;ii++){
					if (ppo==1){
					cout << "胜利!!!"<<endl;
					cout << "开放无限天梯"<<endl;
					tianti=true;
					break;
				}
					if (xueliang<=0){
						break;
					}
					int p1=ss; 
						xueliang2=p1*90;
zhanli=p1*8;
long long gongji=0;
gongji=liliang*1.5+0.5*zhihui+zengfu+0.2*neili;
while (1){
if (gongji>=xueliang2){
	cout <<"您真是太厉害了" <<endl;
	neili+=p1;
	zongxueliang=200+1.5*neili;
	money+=p1;
	bif=true;
	ceshi=false;
	ppo--; 
	break;
}else{
	xueliang2=xueliang2-gongji;
	xueliang=xueliang-zhanli+fangyu;
	if (rand()%7==2){
		cout <<"触发"<<qm<<endl;
		xueliang2-=qm1;
	}
	cout << "您还有" <<xueliang << "点血量" << endl;
	cout << "敌人还有" <<xueliang2<< "点血量" <<endl;
	if(xueliang<=0){
	ceshi=true;
	cout << "你死了"<<endl;
	break; 
	}
}

}
}
cout <<“您的排名”<<ppo<<endl;
}
}
if (qwera==4){
cout << “您的弟子将从”<<ghf<<“级升到”<<ghf+1<<“级”<<endl;
cout <<“您要支付”<<ghf100000-zhihui<<“元”<<endl;
if (money<ghf
10000-zhihui){
cout << “钱不够”<<endl;
} else {
money-=ghf100000-zhihui;
menpai2
=ghf;
ghf++;
}
}

}
if (youxi5)
{
df=0;
cout <<“您要出门几天?” <<endl;
Beep(800,200);
cin>>df;
while(df>=1){
if (tili<=0){
cout << “体力不足”<<endl;
cout <<“你要去医馆疗伤”<<endl;
break;
}
if (xueliang<=0){
cout << “你被人打死了”<<endl;
cout <<“你要去医馆疗伤”<<endl;
break;
}
jianghu(df);
df–;
}
}
if (youxi
7){
cout <<“1.学医”<<endl;
cout <<“2.疗伤”<<endl;
cout <<“3.打工”<<endl;
cin>>qws;
if(qws1){
for (int j=1;jingyan>=j;j++){
jingyan-=j;
yishu++;
}
cout << “您的医术等级为”<<yishu<<endl;
} else if (qws
2) {
cout <<“请付钱,缴款越多,体力越多”<<endl;
cin>>kj;
if (kj>money){
cout <<“你没有那么多钱”<<endl;

		}else{
		
		cout <<"正在回血,回体力中。。。。" <<endl;
		xueliang=zongxueliang;
		tili+=kj;
		money-=kj;
		}
		}else if(qws==3){
			if (yishu>=60){
			
			cout <<"开始为病人看病"<<endl;
			wait=0;
			for (int ty=1;ty<=10;ty++){
			cout <<"进度"<< ty*10<<"%"<<endl;
			while(wait<10000) 
			{ 
    			wait++; 
			} 
			}
			money+=yishu;
			}else {
				cout << "医术过低"<<endl; 
				Beep(800,200);
			}
		}
	}
	if (youxi==8){
		cout << "请输入密码"<<endl;
		mima=0;
		chongzhi=0;
		cin>>mima;
		if (mima==hhh){
			cout << "请输入充值金额"<<endl;
			cin>>chongzhi;
			money+=chongzhi;
			cout << "充值成功" <<endl; 
		} else {
			cout << "滚!!!"<<endl; 
		}
	} 
	if (youxi==9){
		cout <<"无"<<endl;
		} 
	if (youxi==100100100){
		cout << "请输入密码"<<endl;
		mima=0;
		cin>>mima;
		if(mima==11229900) {
		cout<<"你的生命力:"<<endl; 
		cin>>zongxueliang;
		cout<<"你的力量:"<<endl;
		cin>> liliang;
		cout<<"你的防御力:"<<endl; 
		cin>>fangyu;
		cout<<"你拥有的钱:"<<endl;
		cin>>money;
		cout<<"你的智慧:"<<endl;
		cin>>zhihui;
		cout<<"你的增幅:"<<endl;
		cin>> zengfu;
		cout<<"你的内力:"<<endl;
		cin>>neili;
		cout<<"你的经验:"<<endl;
		cin>>jingyan;
		cout << "你的体力:"<<endl;
		cin>>tili;
		cout <<"你的医术:"<<endl;
		cin>> yishu;
		}
		}
		if (youxi==10){
			cout<<"1.锻炼身体" <<endl;
			cout<<"2.气功之路"<<endl;
			cin>>qwera;
			if (qwera==1){
				cout << "输入金额"<<endl;
				cin>>qwera;
				if (money<qwera)
				{
					cout << "钱不够"<<endl;
				}else {
					money-=qwera;
					zongxueliang+=qwera;
				}
			}
			if (qwera==2)
			{
				if (neili<100000){
					cout <<"内力不足"<<endl;
				} else if (neili>=100000){
					qigong=neili/100000;
					cout << "欢迎来到气功商店,在这里你可以买到任何气功"<<endl;
					cout << "也可以自创气功"<<endl;
					cout << "每个人只能拥有1种气功"<<endl;
					cout << "可以自创气功,需消耗智慧"<<endl; 
					cout << "气功可以在战斗中给与敌人致命一击"<<endl;
					cout << "输入1自创气功"<<endl;
					cin>>wait;
					if (wait==1){
						
						cout <<"输入你要消耗的智慧数"<<endl;
						cin>>b1;
						if (zhihui<b1){
						cout << "智慧不足"<<endl;
						 
						} else{
						
						zhihui-=b1;
						qm1=b1*rand();
						cout <<"输入你自创的气功名"<<endl;
						cin>>qm; 
						cout <<"创建成功" <<endl;
						}
						}
		}
		}
	}
		if (youxi==11){
			wait=0;
			int ui=5000;
			while(1){
			zhandou(ui);
			xueliang=zongxueliang;
			ui+=5000;
			wait++;
			if (xueliang<0){
				cout <<"你死了"<<endl;
				cout<<"你撑住了第"<<wait<<"波"<<endl; 
				break;
			}
		}
		}		

}

return 0;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值