#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#define s Sleep(800);
using namespace std;
int live=5,strength=5;
string bag[100];
int bagi;
void village()
{
system("cls");
cout<<"1、村庄任务"<<endl;
cout<<"2、寻找村庄失踪人(未开放)"<<endl;
cout<<"3、打村庄封印怪(未开放)"<<endl;
cout<<"其他:走出村庄"<<endl;
char bbb;
bbb=getch();
if(bbb=='1')
{
while(1)
{
system("cls");
cout<<"1、帮助村民捕三条鱼——3点体力值"<<endl;
cout<<"其他:退出"<<endl;
char cc;
cc=getch();
if(cc=='1')
{
int ge=0;
while(1)
{
system("cls");
cout<<"地点:河流(番外篇)"<<endl;
cout<<"1、捞网 其他:退出"<<endl;
char fish;
fish=getch();
if(fish=='1')
{
int catch_or_not=rand()%100;
if(catch_or_not<33)
{
cout<<"你捞到了一条鱼"<<endl;
ge++;
}
else
{
cout<<"鱼跑了。"<<endl;
}
cout<<"按任意键继续";
char cccc;
cccc=getch();
}
else
{
break;
}
}
if(ge>=3)
{
cout<<"恭喜您完成任务!"<<endl;
strength+=3;
cout<<"按任意键继续";
char dddd;
dddd=getch();
}
}
else
{
break;
}
}
}
/*
if(bbb=='2')
{
cout<<"1、村长——+3格血"<<endl;
cout<<"2、神秘贸易员——+2格血"<<endl;
cout<<"3、律师——+1格血"<<endl;
char people;
people=getch();
while(people!='1'&&people!='2'&&people!='3')
{
cout<<"1、村长——+3格血"<<endl;
cout<<"2、神秘贸易员——+2格血"<<endl;
cout<<"3、律师——+1格血"<<endl;
people=getch();
}
if(people=='1')
{
while(1)
{
cout<<"向前:F 向后:B 向左:L 向右:R"<<endl;
char sit;
sit=getch();
while(sit!='F'&&sit!='B'&&sit!='L'&&sit!='R')
{
cout<<"向前:F 向后:B 向左:L 向右:R"<<endl;
sit=getch();
}
int cz=rand()%100;
if(sit=='F')
{
if(cz<5)
{
cout<<"恭喜你,找到了村长!!!,生命值+3"<<endl;
live+=3;
}
cout<<"按任意键继续"<<endl;
char yyds;
yyds=getch();
}
if(sit=='B')
{
if(cz<5)
{
cout<<"恭喜你,找到了村长!!&
1.1 C++小游戏——创造世界
最新推荐文章于 2023-01-06 13:56:18 发布