新手光能
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
int xueliang=100;
cout<<"你正在宇宙中航行,请前往4546B星球"<<endl<<"在半空中只听到 嗖的一声......你坠机了";
Sleep(3000);
system("cls");
cout<<"这是一个水世界(世界上92%都是水)"<<endl<<"你需要找到逃生舱......";
Sleep(2000);
system("cls");
cout<<"正在寻找中请耐心等待"<<endl;
for(int i=1;i<=10;i++){
cout<<".";
Sleep(300);
}
system("cls");
cout<<"危险!鲨将军来袭,是否反击(1)逃跑(2)"<<endl;
int fanji;
cin>>fanji;
if(fanji==1){
cout<<"你赢了,损失70%血"<<endl;
xueliang-=70;
Sleep(2500);
}
else
cout<<"逃跑成功"<<endl;
Sleep(1000);
cout<<"逃生舱已找到请立即登舱";
Sleep(1500);
system("cls");
cout<<" "<<"第一章——寻找逃生舱已完成";
Sleep(1500);
system("cls");
cout<<"┏------┓"<<endl;
cout<<"|奖励勋章|"<<endl;
cout<<"| |"<<endl;
cout<<"|1000金币|"<<endl;
cout<<"| |"<<endl;
cout<<"| |"<<endl;
cout<<"| 系统 |"<<endl;
cout<<"┗------┛";
Sleep(2500);
system("cls");
while(1){
cout<<"1:打BOSS 2:探险 3:退出"<<endl;
cin>>fanji;
system("cls");
if(fanji==1){
cout<<"你碰到了潜行者,是否攻击(1)逃跑(0)?"<<endl;
Sleep(1500);
cin>>fanji;
if(fanji==1&&xueliang>=60){
cout<<"你死了!!!";
Sleep(1500);
}
if(fanji==0){
cout<<"逃跑成功,已自动回救生舱";
Sleep(1500);
}
}
system("cls");
if(fanji==2){
cout<<"你想去哪里探险?"<<endl;
cout<<"1.幽深洞穴(简单)2.海皇监狱(大神)"<<endl;
Sleep(3500);
cin>>fanji;
if(fanji==1){
cout<<"已经入幽深洞穴前面有一只变异蜘蛛强制攻击";
Sleep(1500);
cout<<"你赢了!掉落神品装备黄金玳瑁已自动穿戴";
Sleep(2500);
system("cls");
cout<<"过了一会儿" ;
for(int i=1;i<=10;i++){
cout<<".";
Sleep(300);
}
cout<<endl;
cout<<"装备如下:神品黄金反伤甲,神品黄金轻便腿,神品黄金飞毛靴";
Sleep(2500);
system("cls");
}
if(fanji==2){
cout<<"海皇利维坦正在等着你!!!!!!";
cout<<"经过无数次战斗,你赢了";
}
Sleep(2500);
system("cls");
}
if(fanji==3){
cout<<"宇宙飞船来接你了,已成功飞离4546B星球"<<endl<<" 作者:汤启恩";
Sleep(1500);
exit(0);
}
}
return 0;
}
有问题多多提出
汤启恩在2020-07-15 09:49:25追加了内容
2.0新鲜出炉
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
int xueliang=100;
bool f=0;
cout<<"你正在宇宙中航行,请前往4546B星球"<<endl<<"在半空中只听到 嗖的一声......你坠机了";
Sleep(3000);
system("cls");
cout<<"这是一个水世界(世界上92%都是水)"<<endl<<"你需要找到逃生舱......";
Sleep(2000);
system("cls");
cout<<"正在寻找中请耐心等待"<<endl;
for(int i=1;i<=10;i++){
cout<<".";
Sleep(300);
}
system("cls");
cout<<"危险!鲨将军来袭,是否反击(1)逃跑(2)"<<endl;
int fanji;
cin>>fanji;
if(fanji==1){
cout<<"你赢了,损失70%血"<<endl;
xueliang-=70;
Sleep(2500);
}
else
cout<<"逃跑成功"<<endl;
Sleep(1000);
cout<<"逃生舱已找到请立即登舱";
Sleep(1500);
system("cls");
cout<<"血量是"<<xueliang;
Sleep(1500);
system("cls");
cout<<"第一章——寻找逃生舱已完成";
Sleep(1500);
system("cls");
cout<<" ┏------┓"<<endl;
cout<<" |奖励勋章|"<<endl;
cout<<" | |"<<endl;
cout<<" |1000金币|"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | 系统 |"<<endl;
cout<<" ┗------┛";
Sleep(2500);
system("cls");
while(1){
cout<<"1:打BOSS 2:探险 3:退出"<<endl;
cin>>fanji;
system("cls");
if(fanji==1){
cout<<"你碰到了潜行者,是否攻击(1)逃跑(0)?"<<endl;
Sleep(1500);
cin>>fanji;
if(fanji==1&&xueliang<=60){
cout<<"你死了!!!";
xueliang=100;
Sleep(1500);
}
if(fanji==1&&xueliang>60)
cout<<"你赢了";
if(fanji==0){
cout<<"逃跑成功,已自动回救生舱";
Sleep(1500);
}
}
system("cls");
if(fanji==2){
cout<<"你想去哪里探险?"<<endl;
cout<<"1.幽深洞穴(简单)2.海皇监狱(大神)"<<endl;
Sleep(3500);
cin>>fanji;
if(fanji==1){
cout<<"已经入幽深洞穴前面有一只变异蜘蛛强制攻击"<<endl;
Sleep(1500);
cout<<"你赢了!掉落神品装备黄金玳瑁已自动穿戴";
Sleep(2500);
system("cls");
cout<<"过了一会儿" ;
for(int i=1;i<=10;i++){
cout<<".";
Sleep(300);
}
cout<<endl;
cout<<"装备如下:神品黄金反伤甲,神品黄金轻便腿,神品黄金飞毛靴"<<endl;
f=1;
xueliang+=1000;
Sleep(2500);
cout<<"血量是"<<xueliang;
Sleep(1500);
system("cls");
}
if(fanji==2){
cout<<"海皇利维坦正在等着你!!!!!!"<<endl;
if(f==1)
cout<<"经过无数次战斗,你赢了";
else
cout<<"连装备都没有,快去幽深洞穴打装备";
}
Sleep(2500);
system("cls");
}
if(fanji==3){
cout<<"宇宙飞船来接你了,已成功飞离4546B星球"<<endl<<" 作者:汤启恩";
Sleep(1500);
exit(0);
}
}
return 0;
}
更新:血量显示,攻击潜行者的一些bug
汤启恩在2020-07-21 15:02:45追加了内容
what?????????
汤启恩在2020-07-21 15:04:07追加了内容
???
汤启恩在2020-08-22 14:34:07追加了内容
3.0
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
int xueliang=100;
bool f=0;
cout<<"你正在宇宙中航行,请前往4546B星球"<<endl<<"在半空中只听到 嗖的一声......你坠机了";
Sleep(3000);
system("cls");
cout<<"这是一个水世界(世界上92%都是水)"<<endl<<"你需要找到逃生舱......";
Sleep(2000);
system("cls");
cout<<"正在寻找中请耐心等待"<<endl;
for(int i=1;i<=10;i++){
cout<<".";
Sleep(300);
}
system("cls");
cout<<"危险!鲨将军来袭,是否反击(1)逃跑(2)"<<endl;
int fanji;
cin>>fanji;
if(fanji==1){
cout<<"你赢了,损失70%血"<<endl;
xueliang-=70;
Sleep(2500);
}
else
cout<<"逃跑成功"<<endl;
Sleep(1000);
cout<<"逃生舱已找到请立即登舱";
Sleep(1500);
system("cls");
cout<<"血量是"<<xueliang;
Sleep(1500);
system("cls");
cout<<"第一章——寻找逃生舱已完成";
Sleep(1500);
system("cls");
cout<<" ┏------┓"<<endl;
cout<<" |奖励勋章|"<<endl;
cout<<" | |"<<endl;
cout<<" |1000金币|"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | 系统 |"<<endl;
cout<<" ┗------┛";
Sleep(2500);
system("cls");
while(1){
cout<<"1:打BOSS 2:探险 3:退出"<<endl;
cin>>fanji;
system("cls");
if(fanji==1){
cout<<"你碰到了潜行者,是否攻击(1)逃跑(0)?"<<endl;
Sleep(1500);
cin>>fanji;
if(fanji==1&&xueliang<=60){
cout<<"你死了!!!";
break;
Sleep(1500);
}
if(fanji==1&&xueliang>60)
cout<<"你赢了";
if(fanji==0){
cout<<"逃跑成功,已自动回救生舱";
Sleep(1500);
}
}
system("cls");
if(fanji==2){
cout<<"你想去哪里探险?"<<endl;
cout<<"1.幽深洞穴(简单)2.海皇监狱(大神)"<<endl;
Sleep(3500);
cin>>fanji;
if(fanji==1){
cout<<"已经入幽深洞穴前面有一只变异蜘蛛强制攻击"<<endl;
Sleep(2500);
cout<<"你赢了!掉落神品装备黄金潜水帽已自动穿戴";
Sleep(2500);
system("cls");
cout<<"过了一会儿" ;
for(int i=1;i<=10;i++){
cout<<".";
Sleep(300);
}
cout<<endl;
cout<<"装备如下:神品黄金反伤甲,神品黄金轻便腿,神品黄金飞毛靴"<<endl;
f=1;
xueliang+=1000;
Sleep(2500);
cout<<"血量是"<<xueliang;
Sleep(1500);
system("cls");
}
if(fanji==2){
system("color 40");
cout<<"海皇利维坦正在等着你!!!!!!"<<endl;
if(f==1)
cout<<"经过无数次战斗,你赢了";
else
cout<<"连装备都没有,快去幽深洞穴打装备";
}
Sleep(2500);
system("cls");
system("color 1");
}
if(fanji==3){
cout<<"宇宙飞船来接你了,已成功飞离4546B星球"<<endl<<" 作者:汤启恩";
Sleep(1500);
exit(0);
}
}
return 0;
}
资深光能
太渣渣了!
3.0版本已出炉,请品尝:
//Coding
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#include<conio.h>
#include<windows.h>
using namespace std;
#define wait(s) Sleep(s)
#define wait1s Sleep(1000)
#define end printf("\n");
#define cls system("cls");
#define input getch()-'0';
#define over retr()
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void retr(){//退出程序
HWND hWnd=GetForegroundWindow();
ShowWindow(hWnd,SW_HIDE);
exit(0);
}
void out(string s,bool f=true)
{
for(int i=0;i<s.length();i++)
{
printf("%c",s[i]);
wait(80);
}
if(f)end;
}
int main(){
cls;
color(1);
int xueliang=100;
bool f=0;
out("你正在宇宙中航行,请前往4546B星球");
out("在半空中只听到 嗖的一声......你坠机了");
wait1s;
cls;
out("这是一个水世界(世界上92%都是水)");
out("你需要找到逃生舱......");
wait1s;
cls;
out("正在寻找中请耐心等待",false);
for(int i=1;i<=5;i++)
{
cls;
cout<<"正在寻找中请耐心等待";
out("......");
wait1s;
}
cls
out("危险!鲨将军来袭,是否反击(1)逃跑(2)");
short fanji;
fanji=input;
if(fanji<1|fanji>2)out("输入错误!默认为:反击");
if(fanji==1|fanji<1|fanji>2){
out("你赢了,损失70%血");
xueliang-=70;
wait1s;
}
else
out("逃跑成功");
wait1s;
out("逃生舱已找到请立即登舱");
wait1s;
cls
cout<<"血量是"<<xueliang;
wait(1500);
cls;
color(2);
cout<<"第一章——寻找逃生舱已完成";
wait(1500);
cls;
cout<<" ┏------ ┓"<<endl;
cout<<" |奖励勋章|"<<endl;
cout<<" | |"<<endl;
cout<<" |1000金币|"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | 系统 |"<<endl;
cout<<" ┗------┛";
wait(2500);
cls;
color(1);
while(1){
cout<<"1:打BOSS 2:探险 3:退出"<<endl;
fanji=input;
cls
if(fanji==1){
cout<<"你碰到了潜行者,是否攻击(1)逃跑(0)?"<<endl;
Sleep(1500);
fanji=input;
if(fanji==1&&xueliang<=60){
out("你死了!!!");
xueliang=100;
wait1s;
}
if(fanji==1&&xueliang>60)
cout<<"你赢了";
if(fanji==0){
cout<<"逃跑成功,已自动回救生舱";
wait1s;
}
}
cls
if(fanji==2){
out("你想去哪里探险?");
wait1s;
cout<<"1.幽深洞穴(简单)2.海皇监狱(大神)"<<endl;
fanji=input;
if(fanji==1){
cout<<"已经入幽深洞穴前面有一只变异蜘蛛强制攻击"<<endl;
wait1s;
cout<<"你赢了!掉落神品装备黄金玳瑁已自动穿戴";
wait1s;
cls;
out("行走中",false);
for(int i=1;i<=5;i++)
{
cls;
cout<<"行走中";
out("......");
wait1s;
}
out("过了一会");
out("装备如下:神品黄金反伤甲,神品黄金轻便腿,神品黄金飞毛靴");
f=1;
xueliang+=1000;
wait1s;
cout<<"血量是"<<xueliang;
wait1s;
cls;
}
if(fanji==2){
out("海皇利维坦正在等着你!!!!!!");
if(f==1)
cout<<"经过无数次战斗,你赢了";
else
cout<<"连装备都没有,快去幽深洞穴打装备";
}
wait1s;
cls;
}
if(fanji==3){
out("宇宙飞船来接你了,已成功飞离4546B星球");
cout<<" 作者:汤启恩";
wait1s;
over;
}
}
}
我只能帮你到这了。你这个太渣了!
你就是小白!!!
孩子,你的路还长着呢!搜索五年长久看看有什么吧!