自己做的小游戏--原创--不可转载

#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include<windows.h>
#include<ctime>
#include<stdio.h>
using namespace std;
typedef long long ll;
typedef int ii;
typedef char cc;
typedef double dd;
typedef bool bb;
typedef string ss;
typedef void vv;
typedef long double ld;
bb flag = false;
ss gggg = "泡泡", yd = ",欢迎来到药店!n您现在拥有:m元\n现在您来看看吧:n1,血量上限增加药剂:增加自身最大血量的8%血量上限(不增加血量)需要t元n2,血量增加药剂:增加自身最大血量10%(不增加血量上限)需要%元n3,购买急救包(在打怪时使用),需要d元n4,综合超级药店大礼包:血量上限+9000000000000000000,血量+4500000000000000000,需要5000000000000000000元n5,防御套装:防御*3,需要l元n0退出", yyy = "我一定会努力的!!!", wq = ",欢迎来到武器店!n您当前有%元钱n下面是商品,请您自己查看哦:n1,短剑:攻击变成20,需要5块钱n2,长剑:攻击变成40,需要20块钱n3,钻石剑:攻击变成600,需要300块钱n4,小型合金剑:攻击变成1500,需要900块钱n5,大型合金剑:攻击变成2w,需要11k元n6,毁灭合金剑:攻击变成7w,需要5w元n7,无敌合金剑:攻击+9000000000000000000,需要4500000000000000000元n0,退出";
ll money1 = 9000000000000000000, xx1 = 9000000000000000000, ff1 = 9000000000000000000, gg1 = 9000000000000000000, xl1 = 9000000000000000000, jjb1 = 9000000000000000000;
ll money = 5, xx = 100, ff = 8, gg = 10, jjb = 0, xl = 100, jy = 0, dj = 1, xjy = 100, tjy = 0;//钱,血量,防御,攻击 ,急救包数量 ,血量上限 ,经验,等级 ,降级经验 
vv qk() {//清空 
	system("cls");
	return;
}
vv wait(ld jjjjj) {
	Sleep(jjjjj * 1000 - 10);
	return;
}
void Insertaneedleintoaseam()
{
	qk();
	ii n = 1;
	cerr << "请在绿灯时按下1键!";
	Sleep(1000);
	while (n <= 700)
	{
		system("cls");
		HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
		SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN);
		cerr << "绿灯";
		Sleep(500);
		system("cls");
		SetConsoleTextAttribute(hConsole, FOREGROUND_RED);
		cerr << "红灯";
		Sleep(8000);
		n++;
	}
}
vv dc() {
	qk();
	ii n;
	cerr << "1,使用滴滴打车功能,付款8元\n2,走路去,需要30秒\n";
	cin >> n;
	if (n == 1) {
		if (money - 8 < 0) {
			cerr << "现金不够哦!";
			Sleep(2000);
			return;
		}
		cerr << "成功打车到达此地点!现金-8";
		Sleep(2000);
		money -= 8;
		return;
	}
	else {
		for (ii i = 30; i >= 1; i--) {
			qk();
			cerr << i;
			Sleep(999);
		}
		cerr << "已到达";
		return;
	}

}
vv zxj() {
	ii n, y, z, z1, z2;
	while (true) {
		qk();
		cerr << "主页\n星洋学校简介请按1,在线客服请按2,班级人数请按3,退出请按5\n";
		cin >> n;
		if (n == 1) {
			system("cls");
			cerr << "星洋学校简介\n";
			cerr << "星洋学校为公立全日制九年一贯制学校,是苏州工业园区管委会直属事业单位。学校地处园区湖东核心板块吴淞江源,东临桑田岛国际科技园,西接苏州奥林匹克体育中心;紧临近轨交1、2号线和中环,交通便捷。学校以港田路为界,分南北两个校区,北校区于2012年启用;南校区于2016年9月正式投入使用, 南北校区天桥贯通,一体化发展。目前学校中小学南北校区共有117个教学班,在校学生4828人,专任教师343人,其中正高级、省名师及区级以上骨干教师占比23%,硕士率26.16%,平均年龄29.4岁,团队年轻融洽,富有朝气。学校以“立德立人立天下”为校训,以“至融致远”为校风,以“为师为范”为教风,以“知行合一”为学风,以“让信任和激励成为我们共同而持久的行动”为理念,以办人民满意的教育,建师生幸福校园为愿景,倾力打造精彩纷呈的魅力校园、秀美和谐的文化校园、融合创新的智慧校园,梦想成真的理想校园;让师生在关爱与分享中共同学习、成长!努力让学习更快乐,让教育更幸福,让人生更精彩!学校是国家数字化学习工程技术研究中心授予的智慧校园示范校、“智慧教育大数据应用示范区”基地校、“智慧教育数字化学习示范区”实验校、全国青少年校园足球特色学校、江苏省生态文明示范学校、江苏省健康促进学校(银牌)、";
			cerr << "苏州市有效教学实验学校、苏州市义务教育学校管理标准特色学校、苏州市优秀家长学校,苏州市优秀家长课程项目学校、苏州市艺术教育特色学校、苏州市篮球排球传统项目学校、苏州市达";
			cerr << "标心理辅导室、苏州市书法特色学校、苏州市语言文字规范化达标学校、园区教育先进单位、园区教育五星绿色评价A等学校、园区德育先进学校、园区教育科研型学校、园区融合教育示范校和园区体卫艺先进学校。学校积极探索课程与评价改革,已建构具有校本特色的课程图谱与五星评价体系,在创优版画、武术等传统特色的同时,开设“1+N”系列拓展课程,旨在促进师生的全面发展与个性发展;同时立足教育信息化,引入“互联网+”思维,应用云技术、大数据、移动智能互联等技术,构建网络化、数字化、个性化、终身化的“互联网+”教育创新生态,积极打造面向未来的“智慧校园”,服务师生全面且更具个性的发展。学校在江苏省智慧校园评审中获区域总分第一。星洋教育与您携手,预见未来!";
			cerr << "\n\n\n\n返回主页请按任意数字\n";
			cin >> z2;
		}
		else if (n == 2) {
			qk();
			z1 = rand() % 300 + 100;
			cerr << "正在呼叫........正在排队,前方排队人数:" << z1;
			cerr << "\n是否终止?如需终止请按1,否则按2!!!";
			cerr << "\n是否终止?如需终止请按1,否则按2!!!";
			cerr << "\n是否终止?如需终止请按1,否则按2!!!\n";
			cin >> n;
			if (n == 1) {
				continue;
			}
			system("cls");
			for (ii i = 1; i <= z1; i++) {
				Sleep(100000.00 / z1);
				cerr << "正在呼叫........正在排队,前方排队人数:" << z1 - i;
				Sleep(1000 * 4);
				system("cls");
			}
			cerr << "呼叫失败";
		}
		else if (n == 3) {
			system("cls");
			cin >> y >> z;
			cerr << rand() % 5 + 40 << "人";
			cerr << "\n返回主页请按任意数字\n";
			cerr << "\n返回主页请按任意数字\n";
			cerr << "\n返回主页请按任意数字\n";
			cerr << "\n返回主页请按任意数字\n";
			cin >> n;
		}
		else {
			cerr << "感谢您的访问!再见!";
			return;
		}
	}
}
void judge(int me, string you)//石头剪子布判断 
{
	string s1 = "平局", s2 = "你赢了!", s3 = "你输了!";
	if (me == 1 && you == "石头" or me == 2 && you == "剪刀" or me == 3 && you == "布")
	{
		cerr << s3 << endl;
	}
	else if (me == 1 && you == "布" or me == 2 && you == "石头" or me == 3 && you == "剪刀")
	{
		cerr << s2 << endl;
	}
	else
	{
		cerr << s1 << endl;
	}
	cerr << "对手出牌:" << you << endl;
	Sleep(1000);
	return;
}
void StoneScissorCloth()//石头剪子布 
{
	while (true)
	{
		system("cls");
		printf("欢迎游玩石头剪刀布,请出牌(剪刀出1,布出2,石头出3)\n");
		int n;
		cin >> n;
		srand(time(0));
		int num = rand() % 57858 % 679 % 6 % 4 % 3;
		string s;
		if (num == 0)
		{
			s = "石头";
		}
		if (num == 1)
		{
			s = "剪刀";
		}
		if (num == 2)
		{
			s = "布";
		}
		judge(n, s);
		cerr << "还要再玩一局吗?(请输入1(玩)或2(不玩))\n";
		string k;
		cin >> k;
		if (k == "2")
		{
			cerr << "即将返回\n";
			Sleep(1000);
			system("cls");
			return;
		}
		else
		{
			cerr << "游戏将在1秒后继续";
			Sleep(1000);
		}
	}
}
void MathematicaMind()//数学风暴 
{
	system("cls");
	cerr << "欢迎来到头脑风暴!请在无数数学题的攻击中生存下来!";
	Sleep(1000);
	int now = 1;
	long long cnt = 10;
	while (cnt <= 10000000)
	{
		system("cls");
		printf("当前波数:%d\n", now);
		srand(time(0));
		int a = rand() % cnt + 1, b = rand() % cnt + 1;
		long long ans = a * b;
		printf("当前题目:%d*%d=", a, b);
		int n;
		cin >> n;
		if (n == ans)
		{
			cerr << "答对了!继续加油!\n";
			now++;
			cnt++;
			Sleep(1000);
		}
		else
		{
			cerr << "答错了!游戏结束了!\n正确答案:" << ans << endl;
			Sleep(1000);
			return;
		}
	}
	cerr << "牛逼啊你!成为首个通关的人!!!";
	Sleep(3000);
}
void DigitalBomb()
{
	system("cls");
	cerr << "欢迎来到数字炸弹!范围:1~100\n";
	int now, l = 1, r = 100;
	bool ans = 0;
	srand(time(0));
	int num = rand() % 100;
	bool f = false;
	while (l <= r)
	{
		system("cls");
		if (f == false)
		{
			cerr << "你的回合:\n当前范围:" << l << "~" << r << endl;
			int n, m;
			cin >> m;
			if (!(l <= m && m <= r)) {
				continue;
			}
			n = m;
			if (n == num)
			{
				cerr << "炸弹爆炸了!你输了!\n炸弹是" << num << endl;
				Sleep(1000);
				return;
			}
			else
			{
				if (n > num)
				{
					r = n - 1;
				}
				if (n < num)
				{
					l = n + 1;
				}
				cerr << "炸弹未爆炸,游戏继续……\n";
			}
			f = true;
		}
		else
		{
			cerr << "对手回合:\n对手正在出牌……\n";
			int n, cnt = 0;
			while (!(n >= l && n <= r))
			{
				srand(time(0));
				n = rand() % r;
				cnt++;
				if (cnt == 10000000)
				{
					n = (l + r) / 2;
					break;
				}
			}
			cerr << "当前范围:" << l << "~" << r << endl;
			if (n == num)
			{
				cerr << "炸弹爆炸了!你赢了!\n炸弹是" << num << endl;
				Sleep(7000);
				return;
			}
			else
			{
				if (n > num)
				{
					r = n - 1;
				}
				if (n < num)
				{
					l = n + 1;
				}
				cerr << "炸弹未爆炸,游戏继续……\n";
			}
			f = false;
		}
		Sleep(5000);
	}
}
vv qt() {
	while (true) {
		qk();
		cerr << "按1石头剪刀布,按2头脑风暴,按3数字炸弹,按4见缝插针,按5返回游戏\n(此游戏版权:复仇的甄嬛)";
		cerr << endl;
		ii n;
		cin >> n;
		if (n == 1) {
			StoneScissorCloth();
		}
		else if (n == 2) {
			MathematicaMind();
		}
		else if (n == 3) {
			DigitalBomb();
		}
		else if (n == 4) {
			Insertaneedleintoaseam();
		}
		else {
			return;
		}
	}
}
ii l2() {
	system("cls");
	cerr << "请输入,按“时 分 秒”输入\n";
	long long s, f, m, x, hdj;
	cin >> s >> f >> m;
	system("cls");
	if ((m > 60 || f > 60) && s >= 1000) {
		cerr << "Error and Not within the operating range" << endl << "The operating range is within 1000 hours";
	}
	else if (m > 60 || f > 60) {
		cerr << "Error";
	}
	else {
		for (long long i = s * 3600 + f * 60 + m - 1; i >= 0; i--) {
			system("cls");
			if (m == 0 && f > 0) {
				m = 60;
				f--;
			}
			if (m == 0 && f == 0) {
				s--;
				m = 60;
				f = 59;
			}
			if (f == 0 && s > 0) {
				f = 60;
				s--;
			}
			m--;
			if (m <= 9 && s <= 9 && f <= 9) {
				cerr << "0" << s << " 0" << f << " 0" << m << endl;
			}
			else if (m <= 9 && s <= 9) {
				cerr << "0" << s << " " << f << " 0" << m << endl;
			}
			else if (f <= 9 && s <= 9) {
				cerr << "0" << s << " 0" << f << " " << m << endl;
			}
			else if (m <= 9 && f <= 9) {
				cerr << s << " 0" << f << " 0" << m << endl;
			}
			else if (m <= 9) {
				cerr << s << " " << f << " 0" << m << endl;
			}
			else if (s <= 9) {
				cerr << "0" << s << " " << f << " " << m << endl;
			}
			else if (f <= 9) {
				cerr << s << " 0" << f << " " << m << endl;
			}
			else {
				cerr << s << " " << f << " " << m << endl;
			}
			Sleep(1000);
		}
	}
	for (ii i = 1; i <= 100000; i++) {
		cerr << "叮铃铃!!!";
	}
}
ii l3() {
	system("cls");
	long long s = 0, f = 0, m = 0, x;
	for (long long i = 0; i >= 0; i++) {
		system("cls");
		if (m == 60 && f > 60) {
			m = 0;
			f++;
		}
		if (m == 60 && f == 60) {
			s++;
			m = -1;
			f = 0;
		}
		if (f == 60 && s > 60) {
			f = 0;
			s++;
		}
		m++;
		if (m <= 9 && s <= 9 && f <= 9) {
			cerr << "0" << s << " 0" << f << " 0" << m << endl;
		}
		else if (m <= 9 && s <= 9) {
			cerr << "0" << s << " " << f << " 0" << m << endl;
		}
		else if (f <= 9 && s <= 9) {
			cerr << "0" << s << " 0" << f << " " << m << endl;
		}
		else if (m <= 9 && f <= 9) {
			cerr << s << " 0" << f << " 0" << m << endl;
		}
		else if (m <= 9) {
			cerr << s << " " << f << " 0" << m << endl;
		}
		else if (s <= 9) {
			cerr << "0" << s << " " << f << " " << m << endl;
		}
		else if (f <= 9) {
			cerr << s << " 0" << f << " " << m << endl;
		}
		else {
			cerr << s << " " << f << " " << m << endl;
		}
		Sleep(1000);
	}
}
ii c() {
	ii hghg;
	system("cls");
	cerr << "正计时按1,倒计时按2";
	cin >> hghg;
	if (hghg == 1) {
		l3();
	}
	else {
		l2();
	}
}
void a1(long long x) {
	system("cls");
	ii hjker;
	cerr << x;
	if (x <= 1) {
		cerr << "不是质数\n" << "退出按任意数字\n";
		cin >> hjker;
	}
	else {
		for (int i = 2; 1ll * i * i < x; i++) {
			if (x % i == 0) {
				cerr << "不是质数\n退出按任意数字\n";
				cin >> hjker;
				return;
			}
		}
		cerr << "是质数\n退出按任意数字\n";
		cin >> hjker;
		return;
	}
}
vv a9(int a, int b) {
	ii h;
	system("cls");
	for (int i = 1; i <= 300; i++) {
		for (int i = 1; i <= 30000; i++) {
			if (a % i == 0 && b % i == 0) {
				a /= i;
				b /= i;
			}
		}
	}
	printf("%d/%d\n", a, b);
	cerr << "退出按任意数字\n";
	cin >> h;
	return;
}
vv a() {
	ll bbb, f, bg;
	system("cls");
	cerr << "                                         番外主页\n" << "                 如需计时请按1,校园主页按2,判断质数按3,化简分数请按4,退出按6。\n";
	cin >> bbb;
	if (bbb == 1) {
		c();
	}
	else if (bbb == 2) {
		zxj();
	}
	else if (bbb == 3) {
		system("cls");
		cerr << "请输入判断什么质数\n";
		cin >> bbb;
		a1(bbb);
	}
	else if (bbb == 4) {
		system("cls");
		cerr << "请输入化简分数 以“分子 分母”输入\n";
		cin >> f >> bg;
		a9(f, bg);
	}
	else {
		system("cls");
		cerr << "感谢您的访问!再见!";
		return;
	}
	a();
}
vv daguai() {
	dc();
	qk();
	cerr << "请输入需要几级怪物???";
	ll n;
	cin >> n;
	ll guaixue = n * 50 + 10, guaifang = n * 10, guaigong = n * 15, guaijy = n * 100, bdq = n * 8, kjy = n * 80;
	while (true) {
		qk();
		cerr << "怪物当前血量:" << guaixue << endl;
		cerr << "怪物攻击:" << guaigong << endl;
		cerr << "怪物防御:" << guaifang << endl;
		printf("当前血量:%lld\n当前攻击:%lld\n当前防御:%lld\n当前急救包数量:%lld个\n", xx, gg, ff, jjb);
		printf("1,攻击\n2,不攻击,当前回合防御*2\n3,使用急救包:当前急救包拥有%lld个\n4,逃跑(有50%几率可以逃跑)", jjb);
		cerr << endl;
		cin >> n;
		ll dadiao;
		ll koudiao;
		if (n == 1) {
			if (gg - guaifang < 0) {
				dadiao = 0;
			}
			else {
				dadiao = gg - guaifang;
			}
			if (guaigong - ff < 0) {
				koudiao = 0;
			}
			else {
				koudiao = guaigong - ff;
			}
			guaixue = guaixue - dadiao;
			xx = xx - koudiao;
			cerr << "你对怪物造成了" << dadiao << "的伤害\n";
			cerr << "怪物对你造成了" << koudiao << "的伤害\n";
		}
		else if (n == 3) {
			if (jjb > 0) {
				jjb--;
				cerr << "您已使用急救包,血量增加10%";
				if (xl / 10.0 + xx > xl) {
					xx = xl;
				}
				else {
					xx = xl / 10.0 + xx;
				}
				if (gg - guaifang < 0) {
					dadiao = 0;
				}
				else {
					dadiao = gg - guaifang;
				}
				cerr << "怪物对你造成了" << dadiao << "的伤害\n";
				Sleep(2000);
			}
		}
		else if (n == 4) {
			ii s = rand() % 2;
			if (s == 0) {
				cerr << "成功逃跑!";
				Sleep(2000);
				return;
			}
			else {
				cerr << "逃跑失败,怪物暴怒,你被凶猛的怪物杀死了!";
				Sleep(2000);
				xx = 0;
				return;
			}
		}
		else if (n == 2) {
			if (flag != true) {
				ff *= 2;
			}
			if (guaigong - ff < 0) {
				koudiao = 0;
			}
			else {
				koudiao = guaigong - ff;
			}
			xx -= koudiao;
			cerr << "怪物对你造成了" << koudiao << "的伤害\n";
			if (flag != true) {
				ff /= 2;
			}
		}
		if (guaixue <= 0) {
			cerr << "怪物被你杀死了!!!你获得了" << bdq << "元" << endl;
			jy += guaijy;
			money += bdq;
			Sleep(3000);
			return;
		}
		else if (xx <= 0) {
			cerr << "你被怪物杀死了!怪物掠夺了" << kjy << "经验" << endl;
			Sleep(3000);
			jy -= kjy;
			xx = 0;
			return;
		}
		else {
			Sleep(5000);
		}
	}
}
vv wuqidian() {
	dc();
	while (true) {
		qk();
		cerr << "亲";
		Sleep(300);
		cerr << "爱";
		Sleep(300);
		cerr << "的";
		Sleep(300);
		cerr << "冒";
		Sleep(300);
		cerr << "险";
		Sleep(300);
		cerr << "者";
		Sleep(300);
		for (ii i = 0; i < gggg.size(); i++) {
			cerr << gggg[i];
			Sleep(300);
		}
		for (ii i = 0; i < wq.size(); i++) {
			if (wq[i] == 'n') {
				cerr << endl;
			}
			else if (wq[i] == '%') {
				cerr << money;
			}
			else {
				cerr << wq[i];
			}
			wait(0.1);
		}
		ii n;
		cerr << endl;
		cin >> n;
		if (n == 1) {
			if (money >= 5) {
				gg += 20;
				cerr << "成功购买!";
				money -= 5;
			}
			else {
				cerr << "你没有这些钱哦";
			}
		}
		else if (n == 2) {
			if (money >= 20) {
				gg += 40;
				cerr << "成功购买!";
				money -= 20;
			}
			else {
				cerr << "你没有这些钱哦";
			}
		}
		else if (n == 3) {
			if (money >= 300) {
				gg += 600;
				money -= 300;
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
		}
		else if (n == 4) {
			if (money >= 900) {
				gg += 1500;
				money -= 900;
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
		}
		else if (n == 5) {
			if (money >= 11000) {
				money -= 11000;
				gg += 20000;
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
		}
		else if (n == 6) {
			if (money >= 50000) {
				gg += 70000;
				money -= 50000;
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
		}
		else if (n == 7) {
			if (money >= 4500000000000000000) {
				gg += 9000000000000000000;
				money -= 4500000000000000000;
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
		}
		else {
			cerr << "正在离开";
			Sleep(3000);
			return;
		}
		Sleep(2000);
	}
}
vv yaodian() {
	dc();
	while (true) {
		qk();
		cerr << "亲";
		Sleep(300);
		cerr << "爱";
		Sleep(300);
		cerr << "的";
		Sleep(300);
		cerr << "冒";
		Sleep(300);
		cerr << "险";
		Sleep(300);
		cerr << "者";
		Sleep(300);
		for (ii i = 0; i < gggg.size(); i++) {
			cerr << gggg[i];
			Sleep(300);
		}
		for (ii i = 0; i < yd.size(); i++) {
			if (yd[i] == 'n') {
				cerr << endl;
			}
			else if (yd[i] == 'm') {
				cerr << money;
			}
			else if (yd[i] == 't') {
				cerr << (money / 4 + 20);
			}
			else if (yd[i] == '%') {
				cerr << (money / 3 + 20);
			}
			else if (yd[i] == 'd') {
				cerr << (money / 10 + 20);
			}
			else if (yd[i] == 'l') {
				cerr << (money / 2 + 20);
			}
			else {
				cerr << yd[i];
			}
			wait(0.1);
		}
		ii n;
		cerr << endl;
		cin >> n;
		if (n == 1) {
			if (money >= money / 4 + 20) {
				xl += (xl / 100 * 8);
				cerr << "成功购买!";
				money -= (money / 4 + 20);
				Sleep(5000);
			}
			else {
				cerr << "你没有这些钱哦";
				Sleep(5000);
			}
		}
		else if (n == 2) {
			if (money >= (money / 3 + 20)) {
				if (xx + xx / 10 > xl) {
					xx = xl;
				}
				else {
					xx += (xx / 10);
				}
				cerr << "成功购买!";
				money -= (money / 3 + 20);
				Sleep(5000);
			}
			else {
				cerr << "你没有这些钱哦";
				Sleep(5000);
			}
		}
		else if (n == 3) {
			if (money > (money / 10 + 20)) {
				jjb++;
				money -= (money / 10 + 20);
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
			Sleep(5000);
		}
		else if (n == 4) {
			if (money > 5000000000000000000) {
				xl += 9000000000000000000;
				if (xx + 4500000000000000000 > xl) {
					xx = xl;
				}
				else {
					xx += 4500000000000000000;
				}
				money -= 5000000000000000000;
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
			Sleep(5000);
		}
		else if (n == 5) {
			if (money > (money / 2 + 20)) {
				if (flag == true) {
					ff = 9000000000000000000;
				}
				else {
					ff *= 2;
					money -= (money / 2 + 20);
				}
				cerr << "成功购买!";
			}
			else {
				cerr << "你没有这些钱哦";
			}
			Sleep(5000);
		}
		else {
			return;
		}
	}
}
vv gongzuo() {
	qk();
	cerr << "正在工作中...";
	Sleep(20000);
	qk();
	ll hd = rand() % (money - 30) + 30;
	if (flag == false) {
		cerr << "工作完毕,获得" << hd << "元钱";
		money += hd;
		Sleep(5000);
	}
	else {
		cerr << "尊敬的泡泡,您可以直接退出(5秒后自动退出),会把您的所有恢复成巅峰状态哦!!!";
		Sleep(5000);
	}
	return;
}
vv shuxing() {
	ss c;
	qk();
	cerr << "名字:" << gggg;
	printf("\n当前血量:%lld\n当前攻击:%lld\n当前防御:%lld\n血量上限:%lld\n当前您拥有:%lld元\n当前急救包数量:%lld个\n当前等级:%lld级\n您拥有:%lld经验\n需要:%lld经验", xx, gg, ff, xl, money, jjb, dj, jy, xjy);
	cerr << "\n按任意键退出\n";
	cin >> c;
	return;
}
vv kaishi() {
	while (true) {
		qk();
		ii n=1;
		if (flag == true) {
			cerr << "触发管理员权限,所有属性恢复至巅峰状态!!!";
			money = money1;
			cerr << endl;
			Sleep(1000);
			qk();
		}
		for (ll i = 1; i <= 100000000000000; i++) {
			if (jy >= xjy && jy - xjy > xjy * 1.01) {
				jy -= xjy;
				dj++;
				jjb++;
				xjy *= 1.01;
				tjy *= 1.01;
			}
			else if (jy >= xjy) {
				jy -= xjy;
				dj++;
				cerr << "                                                           您升级了!当前等级:" << dj << endl << "                                                           您获得了:急救包";
				cerr << endl;
				jjb++;
				xjy *= 1.01;
				tjy *= 1.01;
				Sleep(1000);
				qk();
			}
			else {
				break;
			}
		}
		for (ll i = 1; i <= 10000000000000; i++) {
			if (jy<0 && dj != -1 && tjy / 1.01>jy - tjy) {
				jy += tjy;
				dj--;
				gg = gg - gg / 100 * 8;
				xjy /= 1.01;
				tjy /= 1.01;
				qk();
			}
			else if (jy < 0 && dj != -1) {
				jy += tjy;
				dj--;
				cerr << "                                                           您降级了!当前等级:" << dj << endl << "                                                           您获得了:攻击-8%";
				cerr << endl;
				gg = gg - gg / 100 * 8;
				xjy /= 1.01;
				tjy /= 1.01;
				Sleep(500);
				qk();
			}
			else {
				break;
			}
		}
		if (dj < 0) {
			cerr << "您0级以下了!当前等级:" << dj << endl << "你堕落了!游戏结束!";
			return;
		}
		if (xx == 0) {
			cerr << "已复活";
			xx = xl;
			Sleep(2000);
			qk();
		}
		cerr << "                                                           末日之战" << endl;
		cerr << "                           按0打怪,按1工作,按2武器店,按3药店,按4查看属性,按5其它游戏,按6番外,按7退出\n";
		cin >> n;
		if (n == 0) {
			daguai();
		}
		else if (n == 1) {
			gongzuo();
		}
		else if (n == 2) {
			wuqidian();
		}
		else if (n == 3) {
			yaodian();
		}
		else if (n == 4) {
			shuxing();
		}
		else if (n == 5) {
			qt();
		}
		else if (n == 6) {
			a();
		}
		else {
			qk();
			cerr << "再见!!!";
			return;
		}
	}
}
int main()
{
	SetWindowTextA(GetConsoleWindow(), "pyz末日之战");
	ShellExecute(NULL, "open", "cmd.exe /c attrib file1.txt +h", NULL, NULL, SW_SHOWNORMAL);
	cerr << "正在加载...请稍等...";
	int  cx = GetSystemMetrics(SM_CXSCREEN);
	int  cy = GetSystemMetrics(SM_CYSCREEN);
	cerr << "屏幕大小:" << cx << "x" << cy << "\n";
	cerr << "正在调整为全屏模式~Loading...\n";
	system("mode con cols=300 lines=114");
	MessageBox(NULL, TEXT("您好,欢迎来到pyz末日之战"), TEXT("提示"), MB_OK);
	MessageBox(NULL, TEXT("点击右上角□即可调为全屏~"), TEXT("请调整为全屏模式"), MB_OK);
	ss n;
	cerr << "按下任意键,开始你的冒险吧!";
	cin >> n;
	if (n == "我是泡泡") {
		money = money1;
		flag = true;
		kaishi();
	}
	else {
		qk();
		cerr << "欢";
		Sleep(300);
		cerr << "迎";
		Sleep(300);
		cerr << "来";
		Sleep(300);
		cerr << "到";
		Sleep(300);
		cerr << "这";
		Sleep(300);
		cerr << "个";
		Sleep(300);
		cerr << "潘";
		Sleep(300);
		cerr << "誉";
		Sleep(300);
		cerr << "知";
		Sleep(300);
		cerr << "自";
		Sleep(300);
		cerr << "创";
		Sleep(300);
		cerr << "的";
		Sleep(300);
		cerr << "世";
		Sleep(300);
		cerr << "界";
		Sleep(300);
		cerr << "!";
		Sleep(300);
		cerr << "努";
		Sleep(300);
		cerr << "力";
		Sleep(300);
		cerr << "变";
		Sleep(300);
		cerr << "强";
		Sleep(300);
		cerr << "吧";
		Sleep(300);
		cerr << "!";
		Sleep(3000);
		qk();
		cerr << "你";
		Sleep(400);
		cerr << "的";
		Sleep(400);
		cerr << "老";
		Sleep(400);
		cerr << "师:";
		Sleep(400);
		cerr << "勇";
		Sleep(300);
		cerr << "士";
		Sleep(300);
		cerr << ",";
		Sleep(300);
		cerr << "你";
		Sleep(300);
		cerr << "叫";
		Sleep(300);
		cerr << "什";
		Sleep(300);
		cerr << "么";
		Sleep(300);
		cerr << "名";
		Sleep(300);
		cerr << "字";
		Sleep(300);
		cerr << "?" << endl;
		cin >> gggg;
		qk();
		cerr << "你";
		Sleep(400);
		cerr << "的";
		Sleep(400);
		cerr << "老";
		Sleep(400);
		cerr << "师";
		wait(0.4);
		cerr << ":";
		wait(0.4);
		for (ii i = 0; i < gggg.size(); i++) {
			cerr << gggg[i];
			Sleep(300);
		}
		cerr << ",";
		Sleep(300);
		cerr << "努";
		Sleep(300);
		cerr << "力";
		Sleep(300);
		cerr << "变";
		Sleep(300);
		cerr << "强";
		Sleep(300);
		cerr << "吧";
		Sleep(300);
		cerr << "!";
		cerr << endl;
		Sleep(300);
		cerr << "我";
		Sleep(300);
		cerr << "的";
		Sleep(300);
		cerr << "朋";
		Sleep(300);
		cerr << "友";
		Sleep(300);
		cerr << "的";
		Sleep(300);
		cerr << "武";
		Sleep(300);
		cerr << "器";
		Sleep(300);
		cerr << "店";
		Sleep(300);
		cerr << "和";
		Sleep(300);
		cerr << "药";
		Sleep(300);
		cerr << "店";
		Sleep(300);
		cerr << "有";
		Sleep(300);
		cerr << "好";
		Sleep(300);
		cerr << "东";
		Sleep(300);
		cerr << "西";
		Sleep(300);
		cerr << "哦";
		Sleep(300);
		cerr << "!";
		Sleep(300);
		cerr << "\n";
		Sleep(300);
		cerr << "我";
		Sleep(300);
		cerr << "要";
		Sleep(300);
		cerr << "亖";
		Sleep(300);
		cerr << "了";
		Sleep(300);
		cerr << ",";
		Sleep(300);
		cerr << "你";
		Sleep(300);
		cerr << "来";
		Sleep(300);
		cerr << "对";
		Sleep(300);
		cerr << "抗";
		Sleep(300);
		cerr << "凶";
		Sleep(300);
		cerr << "兽";
		Sleep(300);
		cerr << "吧";
		Sleep(300);
		cerr << "!";
		Sleep(300);
		cerr << "啊";
		Sleep(500);
		cerr << "!";
		Sleep(500);
		cerr << "!";
		Sleep(500);
		cerr << "!";
		Sleep(500);
		for (ii i = 1; i <= 10; i++) {
			cerr << ".";
			Sleep(700);
		}
		cerr << endl;
		for (ii i = 0; i < gggg.size(); i++) {
			cerr << gggg[i];
			Sleep(300);

		}
		cerr << ":";
		for (ii i = 0; i < yyy.size(); i++) {
			cerr << yyy[i];
			Sleep(500);
		}
		kaishi();
	}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值