C++#include<bits/stdc++.h>
#include<windows.h>
#define okk <<endl
#define f(a, b) for(int i = a; i <= b; i++)
#define sp(a) Sleep(a)
using namespace std;
string mingzi, sfqd, xingbie = "无", sfsr = "否";
int qiandaotianshu = 0;
string qd001 = "否", qd002 = "否", qd003 = "否", qd004 = "否";
int nianling = -999;
int rwzt = 0;
int chengjiu[1000];
void qiandaobiao() {
cout << " -------------------------------------\n | 一 | 二 | 三 | 四 |\n -------------------------------------\n | " << qd001 << " | " << qd002 << " | " << qd003 << " | " << qd004 << " |\n -------------------------------------"okk;
return;
}
void qiandao() {
cout okk okk;
cout << "尊贵的 " << mingzi << " 用户, 您已经连续签到了 " << qiandaotianshu << " 天,是否签到?(yes或no)"okk;
qiandaobiao();
getline(cin, sfqd);
getline(cin, sfqd);
if (sfqd == "yes" || sfqd == "Yes") {
cout << "豪德"okk;
sp(800);
qiandaotianshu++;
if (qd001 == "否") {
qd001 = "是";
} else {
if (qd002 == "否") {
qd002 = "是";
} else {
if (qd003 == "否") {
qd003 = "是";
} else {
if (qd004 == "否") {
qd004 = "是";
} else {
cout << "等会,你已经签满四天到了,恭喜获得 #坚持不懈# 称号"okk;
chengjiu[2] = 1;
}
}
}
}
return;
} else if (sfqd == "no" || sfqd == "No") {
cout << "豪德"okk;
sp(800);
return;
} else {
cout << "你这孩子咋这么不听话呢"okk;
sp(1800);
return;
}
}
void chengjiulan() {
cout okk okk;
cout << "目前只能看成就数量……"okk;
sp(1500);
int num = 0;
for (int i = 0; i <= 999; i++) {
if (chengjiu[i] == 1) num++;
}
cout << " " << mingzi << " ,你目前获得的成就共有 " << num << " 个";
if (num <= 10) {
cout << ",加油!"okk;
} else {
cout okk;
}
return;
}
void shenfenzheng() {
cout << " -----------------------------------------------------------------"okk;
cout << " | ------------------- |"okk;
cout << " | - - 姓名:" << mingzi << " |"okk;
cout << " | - 头像 - 性别:" << xingbie << " |"okk;
cout << " | - 暂无 - 年龄:" << nianling << " |"okk;
cout << " | - - 是否是人:" << sfsr << " |"okk;
cout << " | ------------------- |"okk;
cout << " | |"okk;
cout << " | |"okk;
cout << " | |"okk;
cout << " | |"okk;
cout << " | |"okk;
cout << " | |"okk;
cout << " | |"okk;
cout << " | |"okk;
cout << " -----------------------------------------------------------------"okk;
cout << "是否登记信息?(yes或no)"okk;
string sfdj;
getline(cin, sfdj);
getline(cin, sfdj);
if (sfdj == "yes" || sfdj == "Yes") {
cout << "请输入姓名"okk;
cin >> mingzi;
cout << "ok"okk;
sp(1000);
cout << "请输入性别"okk;
cin >> xingbie;
cout << "ok"okk;
sp(1000);
cout << "请输入年龄"okk;
cin >> nianling;
cout << "ok"okk;
sp(1000);
cout << "请问你是否是人"okk;
cin >> sfsr;
cout << "ok"okk;
sp(1000);
cout << "感谢您的配合"okk;
}
sp(1800);
return;
}
void ditu(int x){
cout << "懒得做了";
sp(1800);
return;
}
void rwztl(){
}
void zhucheng(int x) {
while (1) {
cout okk okk;
string s003;
if (x == 1) {
cout << " 你现在的位置:主城一区"okk << " 签到(按a) 成就栏(按b) 身份证(按c) 你的游玩时长(按d)"okk;
cout << " 传送门---通往二区(按e) 传送门---通往三区(按f) 传送门---通往四区(按g) 地图(按h)"okk;
cout << " 传送门---通往夜市(按i) 菜单(按j) 任务状态栏(按k)" okk;
cout << " 你要去哪?";
cin >> s003;
if (s003 == "a") {
qiandao();
} else if (s003 == "b") {
chengjiulan();
} else if (s003 == "c") {
shenfenzheng();
} else if (s003 == "d") {
cout << "我不知道"okk;
sp(1800);
} else if (s003 == "e") {
cout << "前面的区域,以后再来探索吧"okk;
sp(1800);
} else if (s003 == "f") {
cout << "前面的区域,以后再来探索吧"okk;
sp(1800);
} else if (s003 == "g") {
cout << "前面的区域,以后再来探索吧"okk;
sp(1800);
} else if (s003 == "h") {
ditu(x);
} else if (s003 == "i") {
cout << "前面的区域,以后再来探索吧"okk;
sp(1800);
} else if (s003 == "j") {
cout << "前面的区域,以后再来探索吧"okk;
sp(1800);
} else if (s003 == "k") {
rwztl();
}
}
}
}
int main() {
int n001 = 711;
// while (n001--) {
// cout << "+";
// sp(1);
// }
string s002;
getline(cin, s002);
if (s002 != "20111227") {
cout << " 欢迎来到c++游戏! "okk;
sp(1800);
cout << " 这是一个开放性的游戏,包含了许多小游戏 "okk;
sp(1800);
cout << " 那么该怎么玩呢?"okk;
sp(1500);
cout << "#按下空格键继续#"okk;
string s001;
int y001 = 0;
while (getline(cin, s001)) {
if (s001 == " ") {
cout << " 勇士,你通过了考验"okk;
break;
} else {
cout << " 你故意找茬十八?"okk;
y001 = 1;
}
}
sp(1500);
cout << "那么为什么说是考验呢"okk;
sp(1800);
cout << " 因为这是辨别你是不是人机的测试( * \\/ *)---+"okk;
sp(1800);
cout << " (值得一提的是,如果你在输入空格键时输错了,对后面的游戏会有影响哦)"okk;
sp(1800);
cout << " " << y001;
sp(1800);
cout << " ←如果这个玩意是0,说明你不是人机"okk;
sp(1800);
cout << " 但如果是1呢,你就会被扣上人机的帽子"okk;
sp(1800);
cout okk;
if (y001 == 1) {
cout << "(已被系统检测到人鸡一枚)"okk;
sp(1800);
cout << "(恭喜玩家获得 #小人鸡# 成就称号! tips:成就栏已点亮)"okk;
chengjiu[0] = 1;
sp(1800);
cout << " 你竟然提前得到了一个成就!!!!!凸----(* /\\ * )"okk;
sp(1800);
cout << " 虽然听上去不是那么的友好(hhh)"okk;
sp(1800);
cout << " ………………好吧,提前恭喜你(真服了)";
sp(1800);
cout okk;
} else {
cout << "(已被系统检测到不是人机)"okk;
sp(1800);
cout << " 哦,真可惜,你竟然不是人机……"okk;
sp(1800);
cout << " 那么你就得不到一个成就了………………"okk;
sp(1800);
cout << " 不过别担心,以后还是有机会得到的!"okk;
sp(1800);
cout << " (还不感谢尊贵的游戏作者)"okk;
sp(1800);
cout okk;
}
cout << " 那么接下来,终于到我来介绍游戏规则了"okk;
sp(2000);
cout << " 首先,你会来到一个主界面"okk;
sp(1800);
cout << " 以后我们一般叫他主城"okk;
sp(1800);
cout << " 在这个主城里,有许多功能"okk;
sp(1800);
cout << " 例如:签到、游戏、c++学习区等等"okk;
sp(1800);
cout << " 而进入他们的方式则是按下相应的按键"okk;
sp(1800);
cout << " 除此之外,玩家还会无时无刻处在一个大环境里,比如你可以获得成就等"okk;
sp(1800);
cout okk;
sp(1800);
cout << " 游戏中还会有各种彩蛋,等着各位玩家去触发"okk;
sp(1800);
cout << " 那么接下来,就自己探索这片游戏大陆吧( * \\/ *)+++"okk;
sp(1800);
cout << " 还有一点:千万不要在旁白跟你说话的时候输入!!!"okk;
sp(1800);
cout << "#按下空格键继续#"okk;
y001 = 0;
while (getline(cin, s001)) {
if (s001 != "0") {
if (y001 == 3) {
cout << " 你为什么要这样做?"okk;
sp(1800);
cout << " (恭喜玩家获得 #天生反骨# 成就称号!tips:成就栏已点亮)"okk;
sp(1800);
cout << " 滚,下次不让你输出空格了"okk;
sp(1800);
chengjiu[1] = 1;
break;
} else {
cout << " 你这孩子咋这么反骨呢?"okk;
y001++;
}
} else break;
}
}
cout okk;
cout << "请先输入你的名字:";
getline(cin, mingzi);
rwzt++;
zhucheng(1);
return 0;
}