话不多说,上代码。
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
using namespace std;
int main(int argc, char** argv) {
cout<<" kk游戏 "<<endl;
cout<<" 作者:kk "<<endl;
cout<<" 剧情:19 "<<endl;
cout<<" 特别感谢:24 "<<endl;
char a;
cout << "----------欢迎来到帽子火箭----------" << endl;
sleep(1) ;
cout << "你是一位冒险家," << endl;
sleep(1) ;
cout << "有一天,你在河道里探险时," << endl;
sleep(1) ;
cout << "突然你晕了过去" << endl;
sleep(1) ;
cout << "你晕倒了......" << endl;
sleep (1.5);
system("cls");
cout << "你醒来时, 发现你在一个火箭中," << endl;
sleep(1) ;
cout << "只见屏幕的旁边刻着四个大字:" << endl;
sleep(1) ;
cout << " 帽子火箭" << endl;
sleep(1) ;
cout << "突然旁跑出来个人" << endl;
sleep(1);
cout << "他是保安" << endl;
sleep(1);
cout << "你要:" << endl;
sleep(1);
cout << "a:向他问路 b:打死他 c:逃跑 d:给他一枪" << endl;
cin >> a;
if (a == 'a'){
cout << "你向他问路,没想到他却说:陌生人不许进," << endl;
sleep(1);
cout << "然后把你给杀了。" << endl;
}
if (a == 'c'){
cout << "你在逃跑时撞到了BOSS," << endl;
sleep(1);
cout << "死了......" << endl;
}
if (a == 'd'){
cout << "小孩子,不能伤人" << endl;
sleep(1);
while (true)
cout << "去学习";
sleep(1);
}
if (a == 'b'){
system("cls");
cout << "你把他杀了," << endl;
sleep(1);
cout << "还在他身上发现了科技手臂," << endl;
sleep(1);
cout << "你属性提高了" << endl;
sleep(1);
cout << "你走到了一个驾驶室," << endl;
sleep(1);
cout << "你刚要走进去,却被BOSS挡住了去路," << endl;
sleep(1);
cout << "你从地图上得知它叫主宰。" << endl;
sleep(1);
cout << "你要:" << endl;
sleep(1);
cout << "a:自杀 b:打它 c:逃跑 d:站在那里一动不动" << endl;
cin >> a;
if (a == 'a'){
cout << "你死了......";
}
if (a == 'b'){
cout << "你把主宰打生气了," << endl;
sleep(1);
cout << "你被主宰给杀了......";
}
if (a == 'd'){
cout << "主宰看你不跑," << endl;
sleep(1);
cout << "把你给吃了......";
}
if (a == 'c'){
cout << "你在逃跑的过程中摔了一跤," << endl;
sleep(1);
cout << "晕过去了......";
system("cls");
cout << "等你醒来时,已经是晚上了," << endl;
sleep(1);
cout << "你回去了驾驶室," << endl;
sleep(1);
cout << "发现主宰已经走了" << endl;
sleep(1);
cout << "你走进了" << endl;
sleep(1);
cout << "发现驾驶室的深处有个门" << endl;
sleep(1);
cout << "怎么打开" << endl;
sleep(1);
cout << "a:炸开 b:敲门 c:传送 d:卡BUG" << endl;
sleep(1);
cin >> a;
if (a == 'a' | a == 'c') {
cout << "机器坏了 爆炸了" << endl;
sleep(1);
cout << "爆炸声太大,把招在找了过来你被杀了......" << endl;
sleep(1);
}
if (a == 'd') {
cout << "敢卡BUG" << endl;
sleep(1);
while (true)
cout << "123456" << endl;
sleep(1);
if (a == 'b')
cout << "有人开门,你把他制服了" << endl;
sleep(1);
cout << "办公室里有两个按钮" << endl;
sleep(1);
cout << "主宰回来了" << endl;
sleep(1);
cout << "他说红色是发射,蓝色是停止" << endl;
sleep(1);
cout << "a:红 b:蓝" << endl;
cin >> a;
if (a == 'a'){
cout << "黑老大让你做2把手 ————故事结束了——————";
}
if (a == 'b'){
cout << "黑老大被阻止了,你是人名英雄" << endl;
sleep(1);
cout << "——————故事结束了——————";
}
}
}
}
return 0;
}
制作不易,求个点赞