打怪游戏 勇者打恶龙1.6

这次勇者打恶龙迎来了重大更新!

1.优化界面

2.增加好几个选择

所以说,这次更新算的上是1.7版本了!

#include <bits/stdc++.h>
#include <windows.h>
#include <time.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <stdio.h>
using std::cout;
using std::string;
using namespace std;

long long zhujuegongji=5,zhujueshengming=5,sxsm=5,zhujuefangyv=0;//主角设置
string htmm,htmm2;//后台密码
int baoji=0,fangyv=0,baojizhi=4,fangyvzhi=3;//攻击防御
long long sjsjb=0,sjsjb2=0;//金币
int gwzhi=0,ntgs=0,gljs=0;//怪物
int htz=0;//商店进阶
int hst=0,pldhyf=0,cqdhkz=0,hx=0,hr=0,sdjj=0;//商店
int htmmpd=0,htmmcs=5;//后台密码判断
int xbfllq1=0,xbfllq2=0,xbfllq3=0,xbfllq4=0;//新兵
int dhmpd=0,dhmpd2=0;//兑换码

void color(int a);
void ks();
void zd();
void gwck();
void kszd();
void huosheng();
void sd();
void zt();
void ht();
void gotoxy(short x, short y);//移动光标
void sd2();
void kg();
void bb();
void hd();
void sz();
void xbfl();
void dhm();
void dflx();

void gotoxy(short x, short y)
{
	COORD position = { x, y };
	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleCursorPosition(hOut, position);
}
void color (int a) {//颜色函数
	SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), a);
}
void ks()
{
	color(60);
	cout<<"===========================================    我的钱包:"<<sjsjb<<"\n";
    cout<<"|1.战斗  2.状态  3.背包  4.商店  5.后台   |        1      \n";
    cout<<"===========================================        .      \n";
    cout<<"                                                   7      \n";
    cout<<"===========================================        版     \n";
    cout<<"|6.活动  7.设置  8.武器打造               |        本     \n";
    cout<<"===========================================               \n";
    cout<<"输入>>>";
    string a1and4xz;
    cin>>a1and4xz;
    if(a1and4xz!="1"&&a1and4xz!="2"&&a1and4xz!="3"&&a1and4xz!="4"&&a1and4xz!="5"&&a1and4xz!="6"&&a1and4xz!="7"&&a1and4xz!="8")
    {
	    cout<<"别乱输!\n";
	    Sleep(700);
	    system("cls");
	    ks();
    }
    if(a1and4xz=="1")
    {
    	system("cls");
        zd();
	}
	if(a1and4xz=="2")
	{
		system("cls");
		zt();
	}
	if(a1and4xz=="3")
	{
		system("cls");
		bb();
	}
	if(a1and4xz=="4")
	{
		system("cls");
		sd();
	}
	if(a1and4xz=="5")
	{
		system("cls");
		ht();
	}
	if(a1and4xz=="6")
	{
		system("cls");
		hd();
	}
	if(a1and4xz=="7")
	{
		system("cls");
		sz();
	}
}
void zd()
{
	color(62);
	cout<<"====================================\n";
	cout<<"             战斗                   \n";
	cout<<"====================================\n";
	cout<<"【1.怪物查看   2.开始战斗    3.返回】\n";
	string zdxz1and2;
	cin>>zdxz1and2;
	if(zdxz1and2=="1")
	{
	    system("cls");
		gwck();	
	}
	if(zdxz1and2=="2")
	{
		system("cls");
		kszd();
	}
	if(zdxz1and2=="3")
	{
		system("cls");
		Sleep(700);
		ks();
	}
}
void gwck()
{
	color(62);
	cout<<"1.退出                   2.前往战斗                                     \n";
	cout<<"------------------------------------------------------------------------\n";
	cout<<"【1级怪物】牛头怪兽 Ta拥有较厚的血量,但是攻击却很低.|属性:攻击1,生命10|\n";
	if(ntgs!=1)
	cout<<"【2级怪物】              请先打败1级怪物才能查看2级怪物!               \n";
	if(ntgs==1)
	cout<<"【2级怪物】格伦巨石 Ta是个没有感情的石头,伤害较高.|属性:攻击6,生命12   \n";
	if(gljs!=1 || ntgs!=1)
	cout<<"【3级怪物】              请先打败2级怪物才能查看3级怪物!               \n";
	if(gljs==1 || ntgs==1)
	cout<<"【3级怪物】泽西恶魔 Ta是个噩魔!!|属性:攻击7,生命40,防御5              \n";
	
	string gwcktc;
	cin>>gwcktc;
	if(gwcktc=="1")
	{
		color(60);
		Sleep(700);
		system("cls");
	    zd();
    }
    if(gwcktc=="2")
	{
		color(60);
		Sleep(700);
		system("cls");
	    kszd();
    }
	if(gwcktc!="2"&&gwcktc!="1")
	{
		cout<<"别乱输!\n";
	    Sleep(700);
	    system("cls");
	    color(30);
	    gwck();
	}
	if(gwcktc!="1" && gwcktc!="2")
    {
	    cout<<"别乱输!\n";
	    Sleep(700);
	    system("cls");
	    gwck();
    }
}
void kszd()
{	
    color(62);
    if(sxsm==0||sxsm<0)
	{
		Sleep(2000);
		system("cls");
		cout<<"你没血量了!你可以购买生命药水\n";
		Sleep(2000);
		system("cls");
		zd();
	}
	cout<<"输入怪物等级[1到15级]\n";
	cout<<">>>";
	string gwdjzd;
	cin>>gwdjzd;
	string gwmz;
	int gwsm=0,gwgj=0,gwfy=0;
	if(gwdjzd=="1")
	{
	    gwmz="牛头怪兽";
	    gwsm+=10;
		gwgj+=1;
    }
    if(gwdjzd=="2")
    {
    	gwmz="格伦巨石";
		gwsm+=12;
		gwgj+=6;
	}
	if(gwdjzd=="3")
	{
		gwmz="泽西恶魔";
		gwsm+=40;
		gwgj+=7;
		gwfy+=5;
	}
	for(int i=1;i<=900;i++)
	{
		if(gwsm==0||gwsm<0)
		{
			if(gwdjzd=="1")ntgs++,gwzhi=1;
			if(gwdjzd=="2")gljs++;
			Sleep(2000);
			system("cls");
		    huosheng();
		}
	    cout<<"_____________________________________________________\n";
	    cout<<"*&&PK开始!你与"<<gwmz<<"战斗,现在是第"<<i<<"回合&&*\n";
    	cout<<"-----------------------------------------------------\n";
	    cout<<"怪物攻击力:"<<gwgj<<"    你的攻击力:"<<zhujuegongji<<endl;
	    cout<<"怪物生命:"<<gwsm<<"       你的生命:"<<sxsm<<endl;
	    cout<<"=====================================================\n";
	    cout<<"1.战斗                                         2.逃跑\n";
	    cout<<"输入>>>";
		string zhandouandtaopao;
		cin>>zhandouandtaopao;
		if(zhandouandtaopao=="1")
		{
			srand((int)time(0));
            for (int i=0;i<2;i++)
            {
                baoji+=rand()%3;
            }
            for (int i=0;i<2;i++)
            {
                fangyv+=rand()%3;
            }
			system("cls");               
		    if(fangyv>=fangyvzhi)
		    {
		    	if(zhujuefangyv==0||fangyv==0)
		    	{
		    		cout<<"\n\t虽然你使用了防御,但是你防御了怪物的0点伤害!\n";
				}
				if(zhujuefangyv!=0&&fangyv!=0)
				{
		    	    cout<<"\n\t你使用了防御!砰的一声怪物的攻击被你防御了!\n";
		        }
		    	if(zhujuefangyv<gwgj)
		    	{
		         	sxsm+=zhujuefangyv;
		        }
		    	if(zhujuefangyv>gwgj)
		    	{
		    		sxsm+=gwgj;
		        }
			}
			if(baoji>=baojizhi)
            {
            	cout<<"\n\t怪物使用了重击!砰的一声巨响你被打掉了"<<baoji<<"点血\n";
			    sxsm-=baoji;
		    }
			gwsm-=zhujuegongji;
			sxsm-=gwgj;
		    cout<<"\n你们打的不可开交,你们越打越累,就暂停休息了...\n";
		    cout<<"其中,你的生命剩下:"<<sxsm<<"点"<<endl;
		    cout<<"怪物生命剩下:"<<gwsm<<"点"<<endl<<endl<<endl;
		    system("pause");
		    baojizhi+=2;
			fangyvzhi+=2;
		}
		if(zhandouandtaopao=="2")
		{
			Sleep(700);
			system("cls");
			zd();
		}	
		if(sxsm==0||sxsm<0)
		{
			Sleep(2000);
			system("cls");
			cout<<"你输了!你可以尝试升级装备和恢复血量!\n";
			Sleep(2000);
			system("cls");
			zd();
		}
    }
}
void huosheng()
{
	color(62);
	if(sxsm==0||sxsm<0)
	{
		cout<<"你输了!你可以尝试升级装备和恢复血量!\n";
		Sleep(2000);
		system("cls");
		zd();
	}
	srand((int)time(0));
    for (int i=0;i<3;i++)
    {
        sjsjb2+=rand()%50;
    }
    sjsjb+=sjsjb2;
	cout<<"恭喜你获胜了!";
	cout<<"此次你的生命还有"<<sxsm;
	cout<<"点,你获得了"<<sjsjb2<<"金币!\n";
	cout<<"你总共有"<<sjsjb<<"金币!\n";
	cout<<"===========================================================\n";
	cout<<"1.返回                                     2.继续战斗\n";
	string huoshengsr;
	cin>>huoshengsr;
	sjsjb2=sjsjb2-sjsjb;
	if(huoshengsr=="1")
	{
		Sleep(700);
		system("cls");
		zd();
	}
	if(huoshengsr=="2")
	{
		Sleep(700);
		system("cls");
		kszd();
	}
}
void zt()
{
	color(61);
	cout<<"==================================\n";
	cout<<"211.退出\n";
	cout<<"==================================\n";
	cout<<"我的状态:\n";
	cout<<"总生命:"<<zhujueshengming<<"\n";
	cout<<"现在拥有的生命:"<<sxsm<<"\n";
	cout<<"防御:"<<zhujuefangyv<<"[有几率防御敌人的攻击]\n";
	cout<<"攻击:"<<zhujuegongji<<"\n";
	cout<<"==================================\n";
	string zttc;
	cin>>zttc;
	if(zttc=="211")
	{
		Sleep(700);
		system("cls");
		ks();
	}
}
void sd()
{
	color(61);
	string mdx;
	cout<<"============================================================\n";
	cout<<"   黑市商店\n";
	cout<<"你好啊,欢迎来到商店!                  211.退出\n";
	cout<<"你需要些什么呢?                        我的钱包:"<<sjsjb<<"元\n";
	cout<<"============================================================\n";
	if(hst==0)
	cout<<"1.黑手套        *39元 |生命加2点\n";
	if(hst==1)
	cout<<"1.黑手套        已卖光\n";
	if(pldhyf==0)
	cout<<"2.破了的黑衣服  *109元|生命加10点\n";
	if(pldhyf==1)
	cout<<"2.破了的黑衣服  已卖光\n";
	if(cqdhkz==0)
	cout<<"3.残缺的黑裤子  *90元 |防御加9点\n";
	if(cqdhkz==1)
	cout<<"3.残缺的黑裤子  已卖光\n";
	if(hx==0)
	cout<<"4.黑鞋          *50元 |生命加5点\n";
	if(hx==1)
	cout<<"4.黑鞋          已卖光\n";
	if(hr==0)
	cout<<"5.黑刃          *200元|攻击加20\n";
	if(hr==1)
	cout<<"5.黑刃          已卖光\n";
	cout<<"6.生命药水      *30元 |生命恢复加满\n";
	if(htz!=5)
	{
	    cout<<"============================================================\n";
	    cout<<"                请买完黑的套装才能买下一套                  \n";
	    cout<<"============================================================\n";
	}
	if(htz==5)
	{
		cout<<"============================================================\n";
	    cout<<"                翻到下一页请输入“翻页 ”                   \n";
	    cout<<"============================================================\n";
	}
	cout<<"输入>>>";
	cin>>mdx;
	if(mdx=="1")
	{
		if(hst==1)
		{
			cout<<"该商品已卖光!请购买别的商品!\n";
			Sleep(1000);
			system("cls");
			sd();
		}
		if(sjsjb>=39)
		{
			sjsjb-=39,htz++,hst++,zhujueshengming+=2,sdjj++;
		    cout<<"\n成功够买黑手套!您还剩下"<<sjsjb<<"元,欢迎再买!\n";
		    Sleep(1000);
		    system("cls");
		    sd();
		}
		else
		{
			cout<<"您钱不够,下次再来吧!\n";
			Sleep(2000);system("cls");
			ks();
		}
	}
	if(mdx=="2")
	{
		if(pldhyf==1)
		{
			cout<<"该商品已卖光!请购买别的商品!\n";
			Sleep(1000);
			system("cls");
			sd();
		}
		if(sjsjb>=109)
		{
			sjsjb-=109,htz++,pldhyf++,zhujueshengming+=10,sdjj++;
		    cout<<"\n成功够买破了的黑衣服!您还剩下"<<sjsjb<<"元,欢迎再买!\n";
		    Sleep(1000);
		    system("cls");
		    sd();
		}
		else
		{
			cout<<"您钱不够,下次再来吧!\n";
			Sleep(2000);system("cls");
			ks();
		}
	}
	if(mdx=="3")
	{
		if(cqdhkz==1)
		{
			cout<<"该商品已卖光!请购买别的商品!\n";
			Sleep(1000);
			system("cls");
			sd();
		}
		if(sjsjb>=90)
		{
			sjsjb-=90,htz++,cqdhkz++,zhujuefangyv+=9,fangyv+=9,sdjj++;
		    cout<<"\n成功够买残缺的黑裤子!您还剩下"<<sjsjb<<"元,欢迎再买!\n";
		    Sleep(1000);
		    system("cls");
		    sd();
		}
		else
		{
			cout<<"您钱不够,下次再来吧!\n";
			Sleep(2000);system("cls");
			ks();
		}
	}
	if(mdx=="4")
	{
		if(hx==1)
		{
			cout<<"该商品已卖光!请购买别的商品!\n";
			Sleep(1000);
			system("cls");
			sd();
		}
		if(sjsjb>=50)
		{
			sjsjb-=50,htz++,hx++,zhujueshengming+=5,sdjj++;
		    cout<<"\n成功够买黑鞋!您还剩下"<<sjsjb<<"元,欢迎再买!\n";
		    Sleep(1000);
		    system("cls");
		    sd();
		}
		else
		{
			cout<<"您钱不够,下次再来吧!\n";
			Sleep(2000);system("cls");
			ks();
		}
	}
	if(mdx=="5")
	{
		if(hr==1)
		{
			cout<<"该商品已卖光!请购买别的商品!\n";
			Sleep(1000);
			system("cls");
			sd();
		}
		if(sjsjb>=200)
		{
			sjsjb-=200,htz++,hr++,zhujuegongji+=20,sdjj++;
		    cout<<"\n成功够买黑刃!您还剩下"<<sjsjb<<"元,欢迎再买!\n";
		    Sleep(1000);
		    system("cls");
		    sd();
		}
		else
		{
			cout<<"您钱不够,下次再来吧!\n";
			Sleep(2000);system("cls");
			ks();
		}
	}
	if(mdx=="6")
	{
		if(sjsjb>=10)
		{
			sjsjb-=30,sdjj++;
			sxsm=(zhujueshengming-sxsm)+sxsm;
		    cout<<"\n成功够买生命药水!您还剩下"<<sjsjb<<"元,欢迎再买!\n";
		    Sleep(1000);
		    system("cls");
		    sd();
		}
		else
		{
			cout<<"您钱不够,下次再来吧!\n";
			Sleep(2000);system("cls");
			ks();
		}
	}
	if(mdx=="翻页")
	{
		if(htz!=5)
		{
			cout<<"您没凑齐黑套装,请您凑齐!\n";
			Sleep(1000);
			system("cls");
			sd();
		}
		if(htz==5)
		{
			Sleep(1000);
			system("cls");
			sd2();
		}
	}
	if(mdx=="211")
	{
		Sleep(700);
		system("cls");
		ks();
	}
}
void sd2()
{
	color(61);
	cout<<"============================================================\n";
	cout<<"   黑市商店[初级]\n";
	cout<<"你好啊,欢迎来到商店!                  211.退出\n";
	cout<<"你需要些什么呢?                        我的钱包:"<<sjsjb<<"元\n";
	cout<<"============================================================\n";
	
}
void ht()
{
	using namespace std;
	color(62);
	if(htmmpd==1)
	{
		system("cls");
		kg();
	}
	if(htmmcs!=5&&htmmcs!=4&&htmmcs!=3&&htmmcs!=2&&htmmcs!=1)
	{
		cout<<"您的次数用光!\n";
		Sleep(1000);
		system("cls");
		ks();
	}
	cout<<"=====*【后台管理 简称开挂 测试Bug】*=================================\n";
	cout<<"请输入管理者密码      想退出就在管理密码那输入211\n";
	cout<<"=====*【想要后台密码就问陈诺】*======================================\n";
	gotoxy(0,3);
	cout<<"管理密码:";
	gotoxy(10,3);
    /*这是一段类似于我们输入密码时,用*号屏蔽我们输入的密码的测试代码*/
	char c;
	char password[32];
	int i = 0;
	string pd;
	while (1)
	{
		c = _getch();
		if (c == '\r')
		{
			password[i] = '\0';
			break;
		}
		if (c == '\b')
		{
			if (i > 0)
			{
				i--;
				printf("\b \b");	
				password[i] = '\0';
				continue;
			}
		}
		else
		{
			
			printf("*");	
			password[i] = c;
			pd+=password[i];		
			if (i < 32) i++;
		}
		
		}
	printf("\n\n");
   
	if (i > 0)
	{
		if(pd=="cnsdsg")htmmpd++;
		if(pd=="211")
		{
			Sleep(2000);
			system("cls");
			ks();
		}
	}
	if(htmmpd==1)
	{
	     cout<<"输入正确!\n";
	     Sleep(700);
	     system("cls");
	     kg();
    }
	if(htmmpd!=1)
	{
		htmmcs-=1;
	    cout<<"输入错误!请检查!您还剩"<<htmmcs<<"次输入机会\n";
	    Sleep(1000);
	    system("cls");
	    ht();
    }
    if(htmmcs!=5&&htmmcs!=4&&htmmcs!=3&&htmmcs!=2&&htmmcs!=1)
    {
    	Sleep(700);
    	system("cls");
    	gotoxy(30,30);
    	cout<<"次数用光!\n";
    	Sleep(1000);
    	system("cls");
    	ks();
    	
	}
	Sleep(2000);
	system("cls");
	
}
void kg()
{
	color(62);
	cout<<"欢迎进入后台!\n";
	cout<<"后台服务:\n";
	cout<<"=======================\n";
	cout<<"1.金币加9999\n";
	cout<<"2.血量加9999\n";
	cout<<"3.现有血量加9999\n";
	cout<<"4.攻击加9999\n";
	cout<<"5.防御加9999\n";
	cout<<"211.退出\n";
	cout<<"=======================\n";
	cout<<"输入>>>";
	string htsr;
	cin>>htsr;
	if(htsr=="1")
	{
		cout<<"成功获得效果 *金币加9999\n";
		sjsjb+=9999;
		Sleep(1000);
		system("cls");
		kg();
	}
	if(htsr=="2")
	{
		cout<<"成功获得效果 *血量加9999\n";
		zhujueshengming+=9999;
		Sleep(1000);
		system("cls");
		kg();
	}
	if(htsr=="3")
	{
		cout<<"成功获得效果 *现有血量加9999\n";
		sxsm+=9999;
		Sleep(1000);
		system("cls");
		kg();
	}
	if(htsr=="4")
	{
		cout<<"成功获得效果 *攻击加9999\n";
		zhujuegongji+=9999;
		Sleep(1000);
		system("cls");
		kg();
	}
	if(htsr=="5")
	{
		cout<<"成功获得效果 *防御加9999\n";
		zhujuefangyv+=9999;
		Sleep(1000);
		system("cls");
		kg();
	}
	if(htsr=="211")
	{
		cout<<"成功退出\n";
		Sleep(1000);
		system("cls");
		ks();
	}
}
void bb()
{
	color(63);
	string bbxz;
	string st="没有",yf="没有",kz="没有",xz="没有",d="没有",q="没有";
	if(hst==1)st="黑手套";
	if(pldhyf==1)yf="破了的黑衣服";
	if(cqdhkz==1)kz="残缺的黑裤子";
	if(hr==1)d="黑刃";
	if(hx==1)xz="黑鞋";
	cout<<"=====================================================================\n";
	cout<<"输入211退出         我的背包\n";
	cout<<"=====================================================================\n";
	cout<<"---------           ---------      \n";
	cout<<"|  手套 |           | 裤子  |      \n";
	cout<<"  "<<st<<"               "<<kz<<"        \n";
	cout<<"|       |           |       |      \n";
	cout<<"---------           ---------      \n";
	cout<<"=====================================================================\n";	
	cout<<"---------           ---------      \n";
	cout<<"|  衣服 |           | 鞋子  |      \n";
	cout<<"  "<<yf<<"                "<<xz<<"        \n";
	cout<<"|       |           |       |      \n";
	cout<<"---------           ---------      \n";
	cout<<"=====================================================================\n";
	cout<<"---------           ---------      \n";
	cout<<"|  刀   |           | 枪    |      \n";
	cout<<"  "<<d<<"                  "<<q<<"        \n";
	cout<<"|       |           |       |      \n";
	cout<<"---------           ---------      \n";
	cout<<"=====================================================================\n";
	cout<<"注:可以在“武器打造”中换你使用的东西!\n";
	cin>>bbxz;
	if(bbxz=="211")
	{
		Sleep(2000);
		system("cls");
		ks();
	}
}
void hd()
{
    color(61);
	cout<<"========================================|                          \n";
	cout<<"               活动    211.退出         |                          \n";
	cout<<"========================================|                          \n";
	cout<<"1.新兵福利               |         冬   |             *            \n";
	cout<<"2.兑换码                 |     风       |           * * *          \n";
	cout<<"3.冬风来袭               |         来   |          *******         \n";
	cout<<"4.挂机福利               |     袭       |      *    * * *    *     \n";
	cout<<"5.武器碎片兑换           |         穿   |    * * *    *    * * *   \n";
	cout<<"6.公告                   |     好       |  * * * * * * * * * * * * \n";
	cout<<"7.<3.0版本揭晓>          |         棉   |    * * *    *    * * *   \n";
	cout<<"8.<3.0版本揭晓>          |     衣       |      *    * * *    *     \n";
	cout<<"9.<3.0版本揭晓>          |              |          *******         \n";
	cout<<"10.<3.5版本揭晓>         |              |           * * *          \n";
	cout<<"========================================|             *            \n";
	cout<<"输入>>>";
	string hdxz;
	cin>>hdxz;
	if(hdxz=="211")
	{
		Sleep(2000);system("cls");
		color(60);
		ks();
	}
	if(hdxz=="1")
	{
		Sleep(2000);
		system("cls");
		xbfl();
	}
	if(hdxz=="2")
	{
		Sleep(2000);
		system("cls");
		dhm();
	}
	if(hdxz=="3")
	{
		Sleep(1000);
		system("cls");
		dflx();
	}
}
void sz()
{
	cout<<"__            设置中心     211.退出               __\n";
	cout<<"__        画质      高清                          __\n";
	cout<<"__        画面      彩色RPG                       __\n";
	cout<<"输入>>>";
	string shezhishuru;
	cin>>shezhishuru;
	if(shezhishuru=="211")
	{
		Sleep(2000);
		system("cls");
		ks();
	}
}
void xbfl()
{
	color(62);
	cout<<"新兵福利   211.退出\n";
	cout<<"====================================================================\n";
	if(xbfllq1!=1)
	cout<<"1.登录游戏           奖励*10金币       领取输入1\n";
	if(xbfllq1!=0)
	cout<<"1.登录游戏           奖励*10金币       已领取!\n";
	if(xbfllq2!=1)
	cout<<"2.打败1级Boss一次    奖励*20金币       领取输入2\n";	
	if(xbfllq2!=0)
	cout<<"2.打败1级Boss一次    奖励*20金币       已领取!\n";
	if(xbfllq3!=1)
	cout<<"3.去黑市买一次装备   奖励*30金币       领取输入3\n";
	if(xbfllq3!=0)
	cout<<"3.去黑市买一次装备   奖励*30金币       已领取\n";
	if(xbfllq4!=1)
	cout<<"4.获得金币一次       奖励*10金币       领取输入4\n";
	if(xbfllq4!=0)
	cout<<"4.获得金币一次       奖励*10金币       已领取!\n";
	cout<<"====================================================================\n";
	cout<<"输入>>>";
	string xbflsr;
	cin>>xbflsr;
	if(xbflsr=="211")
	{
		Sleep(2000);system("cls");
		hd();
	}
	if(xbflsr=="1")
	{
		if(xbfllq1!=0)
		{
			cout<<"已领取!请勿重复!\n";
			Sleep(2000);system("cls");
			xbfl();
		}
		sjsjb+=10,xbfllq1++;
		cout<<"领取成功!\n";
		Sleep(2000);system("cls");
		xbfl();
	}
	if(xbflsr=="2")
	{
		if(xbfllq2!=0)
		{
			cout<<"已领取!请勿重复!\n";
			Sleep(2000);system("cls");
			xbfl();
		}
		if(gwzhi==0)
		{
			cout<<"没有达到条件!\n";
			Sleep(2000);system("cls");
			xbfl();
		}
		if(gwzhi!=0)
		{
		    sjsjb+=20,xbfllq2++;
		    cout<<"领取成功!\n";
		    Sleep(2000);system("cls");
		    xbfl();
		}
	}
	if(xbflsr=="3")
	{
		if(xbfllq3!=0)
		{
			cout<<"已领取!请勿重复!\n";
			Sleep(2000);system("cls");
			xbfl();
		}
		if(sdjj==0)
		{
			cout<<"没有达到条件!\n";
			Sleep(2000);system("cls");
			xbfl();
		}
		if(sdjj!=0)
		{
		    sjsjb+=30,xbfllq3++;
		    cout<<"领取成功!\n";
		    Sleep(2000);system("cls");
		    xbfl();
		}
	}
	if(xbflsr=="4")
	{
		if(xbfllq4!=0)
		{
			cout<<"已领取!请勿重复!\n";
			Sleep(2000);system("cls");
			xbfl();
		}
		if(sjsjb==0)
		{
			cout<<"没有达到条件!\n";
			Sleep(2000);system("cls");
			xbfl();
		}
		if(sjsjb>0)
		{
		    sjsjb+=10,xbfllq4++;
		    cout<<"领取成功!\n";
		    Sleep(2000);system("cls");
		    xbfl();
		}
	}
}
void dflx()
{
     cout<<"东风来袭!\n";
     cout<<"================================\n";
     
}
void dhm()
{
	color(62);
	cout<<"------------------>兑换码<------------------\n";
	cout<<"_____|     请输入兑换码!  211.退出   |_____\n";
	cout<<"输入:";
	string dhmsr;
	cin>>dhmsr;
	if(dhmsr=="211")
	{
		Sleep(1000);system("cls");
		hd();
	}
	if(dhmsr!="cnyyds"&&dhmsr!="yxnb"&&dhmsr!="211")
	{
		cout<<"兑换码错误!\n";
		Sleep(2000);
		system("cls");
		dhm();
	}
	if(dhmsr=="cnyyds")
	{
		if(dhmpd==1)
		{
			cout<<"已兑换!\n";
			Sleep(1000);
			system("cls");
			dhm();
		}
		dhmpd++,sjsjb+=100;
		cout<<"成功兑换!\n";
		cout<<"获得奖励*100金币\n";
		Sleep(2000);
		system("cls");
		dhm();
	}
	if(dhmsr=="yxnb")
	{
		if(dhmpd2==1)
		{
			cout<<"已兑换!\n";
			Sleep(1000);
			system("cls");
			dhm();
		}
		dhmpd2++,sjsjb+=50;
		cout<<"成功兑换!\n";
		cout<<"获得奖励*50金币\n";
		Sleep(2000);
		system("cls");
		dhm();
	}
}
int main()
{
	color(8);
	cout<<"作者:陈诺\n\n\n";
	color(30);
	cout<<"---->&勇者打恶龙(测试版1.7)&<------\n\n\n";
	color(15);
	cout<<"    >&控制:按数字和回车    &<\n";
	cout<<"    >&数字是选择,回车是确定&<\n\n\n";
	color(30);
	cout<<"---->&按回车开始游戏!&<------------\n\n";
	color(15);
	int ksyxjm=cin.get();
	color(60);
	system("cls");
	ks();
	return 0;
}

上一篇:Python selenium PIL 全网页滚动截屏 && headless全网页截屏


下一篇:GFL: Generalized Focal Loss