#include<iostream>
#include<windows.h>//延迟效果的函数需要用到windows.h
#include<stdlib.h>//清屏代码所需要用到的头文件
#include<cstdlib>//随机函数所需要的头文件
#include<time.h> //随机种子设置时间不同需要的头文件
#include<cstdio>
using namespace std;
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
int main()
{
system("cls");
system("color 0F");
cout<<"“啊...头好晕啊...”"<<endl;
Sleep(1000);
cout<<"“这里是...后室!?”"<<endl;
Sleep(1000);
zhu:
int n,b,i,hp,a,c,ty,re,wc,tj=0,xrs=0,mj=0,dg=0,zsj=0,sj=0,fdj=0,sb,guxl,qi,jl,dj,sr,jb,zbxh,xu,mm,dh,du,sq,ceng,xz,shit=0;
hp=100;
i=4;
//刷新一下 hhh
system("pause");
system("cls");
system("color 60");
cout<<"\n\n\n 逃离后室\n";
cout<<" ESCAPE FROM THE BACK ROOM\n";
for(int i2=0;i2<=20;i2++){
cout<<endl;
}
cout<<"选择层级:1. “level 5” 2. “level !” \n请输入你的选择:";
cin>>ceng;
if(ceng==1)
goto level5;
else
if(ceng==2)
goto levelfun;
else{
system("cls");
system("color 4F");
goto levelfun4;
}
level5:
system("color 60");
cout<<"提示1:第1次开始探索后室的时候需要按一次1键换行并再按一次1键才行哦"<<endl;
Sleep(2000);
system("cls");
cout<<"系统:“流浪者,你好”"<<endl;
Sleep(2000);
cout<<"“你很幸运,来到了level 5,危险等级是简单”"<<endl;
Sleep(2000);
cout<<"“这是一把木剑,你拿着”"<<endl;
Sleep(1000);
cout<<"是否捡起?"<<endl;
Sleep(700);
cout<<"1.捡起 2.不捡起"<<endl;
cin>>n;//n代表木剑的选择
if(n==1)
{
i=i+4;
mj++;//木剑的数量
cout<<"攻击力+4"<<endl;
}
else
cout<<"攻击不加不减,还是4"<<endl;
Sleep(1500);
cout<<"是否开始探索后室?"<<endl;
cout<<"按1开始探索"<<endl;
srand(time(0));//先设置随机种子的时间再生成随机函数
cin>>qi;//按1输入循环
if(qi>=0&&qi<=114514)
{
for(ty=0;ty<=114514;ty++)
{
cout<<"请再次按1探索……"<<endl;
cin>>a;
if(a==1)
{
system("cls");
cout<<"探索中";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<".";
Sleep(1000);
cout<<"."<<endl;
c=rand()%9;
if(shit>=1){
c=4;
shit=0;
}
Sleep(1000);
// if语句是可选择性的循环
if(c==0)
{
system("cls");
cout<<"你看见了一扇白色的门"<<endl;
Sleep(1000);
cout<<"你要跳进去吗?"<<endl;
Sleep(1000);
cout<<"1.跳进去 2.不跳"<<endl;
cout<<"请你输入选项"<<endl;
cin>>re;//re代表跳不跳
if(re==1)//对应c==1,离开的选项
{
system("cls");
cout<<"你眼前一亮..."<<endl;
Sleep(1000);
system("color F0");
cout<<"原神,启动!!!"<<endl;
Sleep(3000);
system("color 0F");
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
cout<<"ohohohohohohohohohohohohohohoh!"<<endl;
Sleep(2000);
cout<<"你逃了出去!!!"<<endl;
Sleep(2000);
cout<<"磨难终于结束了!!!"<<endl;
cout<<"按3结束,否则按其它键继续探索"<<endl;
int kk;
cin>>kk;
if(kk==3)
break;
}
if(re>=2)
{
system("cls");
cout<<"突然,红骑士出现了,危险等级五"<<endl;
Sleep(1000);
cout<<"你发现自己动不了"<<endl;
Sleep(1000);
system("color 04");
cout<<"你死了!";
Sleep(2000);
system("color 0F");
cout<<"可你奇怪的复活了..."<<endl;
Sleep(1000);
}
}
if(c==1)
{
system("cls");
cout<<"你发现了幸存者的哨站!"<<endl;
Sleep(2200);
cout<<"问题就在于这是废弃的..."<<endl;
Sleep(2000);
cout<<"你要离开还是探索?"<<endl;
Sleep(500);
cout<<"1.探索 2.离开"<<endl;
cin>>wc;//wc代表探索
if(wc==1)
{
system("cls");
Sleep(4000);
cout<<"你找到了1瓶杏仁水,一把铁剑"<<endl;
tj++;//tj代表铁剑
xrs++;//xrs代表杏仁水
Sleep(1000);
cout<<"你现在有"<<mj<<"把木剑 "<<tj<<"把铁剑 "<<xrs<<"瓶杏仁水 "<<sj<<"把石剑 "<<zsj<<"把钻石剑 "<<dg<<"块蛋糕 "<<fdj<<"件防弹甲"<<sq<<"把手枪"<<endl;
Sleep(2000);
cout<<"你离开了哨站"<<endl;
}
}
if(c==2)
{
system("cls");
cout<<"你找到了1瓶杏仁水"<<endl;
cout<<"emmmmm...无法加载图画..."<<endl;
xrs++;
Sleep(2000);
cout<<"你现在有"<<mj<<"把木剑 "<<tj<<"把铁剑 "<<xrs<<"瓶杏仁水 "<<sj<<"把石剑 "<<zsj<<"把钻石剑 "<<dg<<"块蛋糕 "<<fdj<<"件防弹甲"<<sq<<"把手枪"<<endl;
}
if(c==3)
{
system("cls");
cout<<"那是什么?——\n";
Sleep(2000);
cout<<"啊啊啊!实体!!看啥呢?快跑啊!——";
shit=1;
}
if(c==4){
system("cls");
int shens;
shens=rand()%9;
if(shens<=7)
cout<<"你逃过了刚刚那个实体的追杀!";
Sleep(2000);
goto sha;
}
if(c==5)
{
system("cls");
cout<<" , "<<endl;
cout<<" / \ "<<endl;
cout<<" { } "<<endl;
cout<<" p ! "<<endl;
cout<<" ; : ; "<<endl;
cout<<" | : | "<<endl;
cout<<" | : | "<<endl;
cout<<" l ; l "<<endl;
cout<<" l ; l "<<endl;
cout<<" I ; I "<<endl;
cout<<" I ; I "<<endl;
cout<<" I ; I "<<endl;
cout<<" I ; I "<<endl;
cout<<" d | b "<<endl;
cout<<" H | H "<<endl;
cout<<" H | H "<<endl;
cout<<" H I H "<<endl;
cout<<",;, H I H ,;, "<<endl;
cout<<";H@H; ;_H_;, ;H@H; "<<endl;
cout<<"`\Y/d_,;|4H@HK|;,_b\Y/' "<<endl;
cout<<" '\;MMMMM$@@@$MMMMM;/' "<<endl;
cout<<" \~~~*;!8@8!;*~~~/ "<<endl;
cout<<" ;888; "<<endl;
cout<<" ;888; "<<endl;
cout<<" ;888; "<<endl;
cout<<" ;888; "<<endl;
cout<<" d8@8b "<<endl;
cout<<" O8@8O "<<endl;
cout<<" T808T "<<endl;
cout<<" `~` "<<endl;
cout<<"你找到了1把石剑"<<endl;
system("color 08");
sj++;
Sleep(2000);
cout<<"你现在有"<<mj<<"把木剑 "<<tj<<"把铁剑 "<<xrs<<"瓶杏仁水 "<<sj<<"把石剑 "<<zsj<<"把钻石剑 "<<dg<<"块蛋糕 "<<fdj<<"件防弹甲"<<sq<<"把手枪"<<endl;
}
if(c==6)
{
system("cls");
cout<<" , "<<endl;
cout<<" / \ "<<endl;
cout<<" { } "<<endl;
cout<<" p ! "<<endl;
cout<<" ; : ; "<<endl;
cout<<" | : | "<<endl;
cout<<" | : | "<<endl;
cout<<" l ; l "<<endl;
cout<<" l ; l "<<endl;
cout<<" I ; I "<<endl;
cout<<" I ; I "<<endl;
cout<<" I ; I "<<endl;
cout<<" I ; I "<<endl;
cout<<" d | b "<<endl;
cout<<" H | H "<<endl;
cout<<" H | H "<<endl;
cout<<" H I H "<<endl;
cout<<",;, H I H ,;, "<<endl;
cout<<";H@H; ;_H_;, ;H@H; "<<endl;
cout<<"`\Y/d_,;|4H@HK|;,_b\Y/' "<<endl;
cout<<" '\;MMMMM$@@@$MMMMM;/' "<<endl;
cout<<" \~~~*;!8@8!;*~~~/ "<<endl;
cout<<" ;888; "<<endl;
cout<<" ;888; "<<endl;
cout<<" ;888; "<<endl;
cout<<" ;888; "<<endl;
cout<<" d8@8b "<<endl;
cout<<" O8@8O "<<endl;
cout<<" T808T "<<endl;
cout<<" `~` "<<endl;
cout<<"你找到了1把钻石剑"<<endl;
system("color 09");
Sleep(2000);
zsj++;
cout<<"你现在有"<<mj<<"把木剑 "<<tj<<"把铁剑 "<<xrs<<"瓶杏仁水 "<<sj<<"把石剑 "<<zsj<<"把钻石剑 "<<dg<<"块蛋糕 "<<fdj<<"件防弹甲"<<sq<<"把手枪"<<endl;
}
if(c==7)
{
system("cls");
cout<<"你遇到了笑餍!"<<endl;
Sleep(1000);
guxl=50;//笑魇的血量
for(dj=1;dj<=guxl;dj++)//以下是循环中
{
dj=1;
cout<<"怎么办?"<<endl;
cout<<"1.攻击 2.防御 3.逃跑"<<endl;
cin>>sb;
if(sb==1)
{
cout<<"你对它造成了"<<i<<"点伤害"<<endl;
guxl=guxl-i;
cout<<"它对你造成了5点伤害"<<endl;
Sleep(100);
system("color 04");
Sleep(100);
system("color 0F");
hp=hp-5;//笑魇每次攻击减5
Sleep(1000);
cout<<"你还剩"<<hp<<"点生命值"<<endl;
Sleep(1000);
cout<<"他还剩"<<guxl<<"点生命值"<<endl;
}
if(sb==2)
{
jl=rand()%2;
if(jl==1)
{
cout<<"你防御了它的攻击!"<<endl;
}
if(jl==0)
{
cout<<"它狡猾的躲过了你的防御!直接老六偷袭!"<<endl;
Sleep(100);
system("color 04");
Sleep(100);
system("color 0F");
hp=hp-10;//这里需要一个等式
Sleep(1000);
cout<<"你还剩"<<hp<<"点生命值"<<endl;
}
}
if(sb>=3)
{
cout<<"逃跑失败!你不能做懦夫!"<<endl;
Sleep(100);
system("color 04");
Sleep(100);
system("color 0F");
hp=hp-10;//这里需要一个等式
Sleep(1000);
cout<<"你还剩"<<hp<<"点生命值"<<endl;
}
if(hp<=0)//你的生命为0
{
cout<<"你死了!"<<endl;
Sleep(3300);
cout<<"复活中"<<endl;
Sleep(2000);
cout<<"已复活!"<<endl; //除了血量,全部清零
hp=100;
mj=0;
i=4;
zsj=0;
dg=0;
tj=0;
xrs=0;
sj=0;
fdj=0;
sq=0;
}
}
if(guxl<=1)
{
cout<<"你击败了它!"<<endl;
}
}
if(c==8)
{
system("cls");
cout<<"你寻找了一会儿,啥也没找到(—_—)..."<<endl;
}
}//for语句的结束端
}
return 0;
}
levelfun:
system("cls");
Sleep(1000);
system("color 0F");
Sleep(1000);
cout<<"系统:“流浪者,你好”"<<endl;
Sleep(2000);
cout<<"“你来到了level! : ";
cout<<"Run for you live”"<<endl;
Sleep(2500);
cout<<"“祝你好运” \n";
Sleep(2000);
system("cls");
system("color 4F");
cout<<"你眼前是一条红色的长廊,还有一些障碍物";
Sleep(2000);
system("cls");
Sleep(2000);
cout<<"“eng";
Sleep(200);
for(int i2=0;i2<=20;i2++){
Sleep(10);
cout<<"-";
}
cout<<"”";
Sleep(1000);
cout<<"\n—— 一阵刺耳的警报声响起 \n";
Sleep(2000);
cout<<"此时你: 1.待在原地 2.随便探索 3.赶紧往前跑\n";
cout<<"你的选择:";
cin>>xz;
system("cls");
Sleep(500);
if(xz==1||xz==2){
sha:
system("cls");
system("color 0F");
Sleep(200);
system("color 7F");
Sleep(200);
system("color 0F");
Sleep(2000);
cout<<"你被实体杀死了!!!";
Sleep(2000);
system("cls");
cout<<"1.在本层级复活 2.在主页复活\n";
int fh=0;
cin>>fh;
if(fh==1){
if(ceng==1)
goto level5;
else
goto levelfun;
}else
goto zhu;
}else
Sleep(1000);
cout<<"你发现后面都是实体!你拔腿就跑 \n";
Sleep(2000);
levelfun4:
cout<<"(快长按↑键(上箭头 键)模拟奔跑,快!不要松开,停下就会死!)";
while(1){
if(KEY_DOWN(VK_UP)){
goto levelfun2;
}
Sleep(100);
}
levelfun2:
system("cls");
int bu=0,b2=0,si=0;
xz=0;
system("color 4F");
cout<<"████████████████████";
while(1){
j:
if(KEY_DOWN(VK_UP)){
bu++;
if(bu-b2>=100){
system("cls");
b2=bu;
system("color 42");
for(int i3=0;i3<=bu/100;i3++){
cout<<"██";
}
system("color 4F");
for(int i3=0;i3<=10-(bu/100);i3++){
cout<<"██";
}
}
if(bu==700){
system("cls");
system("color 4F");
cout<<"你发现了一个画着叉的门,你会:1.打开 2.继续跑\n";
cin>>xz;
if(xz==1){
system("cls");
cout<<"打开门后,里面冲出来许多笑餍!";
Sleep(2000);
system("cls");
goto sha;
}else
system("cls");
cout<<"(快继续长按↑键(上箭头 键)模拟奔跑,快!不要松开,停下就会死!)";
while(1){
if(KEY_DOWN(VK_UP)){
system("cls");
goto j;
}
}
}
if(bu>=1000){
cout<<'\a';
Sleep(500);
goto levelfun3;
}
}else{
si++;
if(si>=75){
goto sha;
}
}
Sleep(20);
}
levelfun3:
system("cls");
cout<<"你找到了出口!!你逃出了level !";
while(1){
int abc;
}
}