我现在发的是一个小游戏
最好点进去先全屏
剧情结束后就先看状态了解一下自己,我还在状态里放了公告
好多行呢!
看:
#include
#include
using namespace std;
int zhangjie;
long long yuanatk=10,yuandef=10,HP=100,money=0,maxHP=1000;
long long wuqiatk=0,kuijiadef=0;
long long atk=yuanatk+wuqiatk,def=yuandef+kuijiadef;
bool dun=false;
bool kuijia=false;
bool huifu=false;
int liliang=0,wudi=0,xuebao=0;
int bag=0;
int lv=0;
int exp_=0;
int xiaoguaiexp=0;
int daguaiexp=0;
int xiaoguailv=1;
int daguailv=1;
int xiaoguai_=1;
string name;
int lvexp[51]={0, 2, 3, 5 , 7, 11, 13, 17, 19, 23,
29, 31, 37, 41, 43, 47, 53, 59, 61, 67,
71, 73, 79, 83, 89, 97, 101, 103, 107, 109,
113, 127, 137, 139, 149, 151, 157, 163, 167, 173,
179, 181, 193, 197, 199, 211, 223, 227, 229, 233, 239};
void cls(){//清屏
system("cls");
return;
}
void con(){//按任意键继续
system("pause");
cls();
}
void kaishi(){
cout<<"很久很久以前\n";
cout<<"地球上生活着人类和怪物..."<>name;
con();
return;
}
void lvup(){
while(exp_>=lvexp[lv+1]){
exp_-=lvexp[lv+1];
lv+=1;
yuanatk+=10*lv;
yuandef+=10*lv;
HP+=30;
cout<<"你升级了!!升级了!!升级!!哦哦哦!!!";
}
atk=yuanatk+wuqiatk;
def=yuandef+kuijiadef;
return;
}
void xiaolvup(){
if(xiaoguaiexp>=lvexp[lv+1]){
xiaoguaiexp-=lvexp[lv+1];
xiaoguailv+=1;
}
return;
}
void dalvup(){
if(daguaiexp>=lvexp[lv+1]){
daguaiexp-=lvexp[lv+1];
daguailv+=1;
}
return;
}
void shop(){//商店功能
char a;
cout<<"老板:小兄弟,你来这里购买?太好了!"<>a;
cls();
switch(a){
case '1':
if(money>=10){
money-=10;
wuqiatk=40;
atk=yuanatk+wuqiatk;
cout<<"谢谢惠顾!"<=40){
money-=40;
wuqiatk=200;
atk=yuanatk+wuqiatk;
cout<<"谢谢惠顾!"<=10000){
money-=10000;
wuqiatk=60000;
atk=yuanatk+wuqiatk;
cout<<"谢谢惠顾!"<=40){
money-=40;
def+=20 ;
cout<<"谢谢惠顾!"<=500){
money-=500;
def+=300;
cout<<"谢谢惠顾!"<=700){
if(bag==8){
cout<<"包满啦"<=700){
if(bag==8){
cout<<"包满啦"<=400){
if(bag==8){
cout<<"包满啦"<=800){
money-=800;
def+=200;
cout<<"谢谢惠顾!"<=20091212){
money-=20091212;
atk=2147483647;
cout<<"谢谢惠顾!"<>a;
switch(a){
case 1:
cout<<"你感觉充满了力量!"<0&&guaiHP>0){
if(def_){
def_=false;
guaiatk+=def;
}
if(b){
b-=1;
if(!b){
atk_-=10000;
}
}
cout<<"你碰到了"<>a;
cls();
switch(a){
case 1:
guaiHP-=max(0,atk_);
cout<<"小怪扣除了"<maxHP)HP=maxHP;
}
con();
}
if(HP<=0)die();
if(run)return;
if(guaiHP<=0){
cout<<"你胜利了!"<0&&guaiHP>0){
if(def_){
def_=false;
guaiatk+=def;
}
if(b){
b-=1;
if(!b){
atk_-=10000;
}
}
cout<<"你碰到了"<>a;
cls();
switch(a){
case 1:
guaiHP-=max(0,atk_);
cout<<"大怪扣除了"<maxHP)HP=maxHP;
}
con();
}
if(HP<=0)die();
if(run)return;
if(guaiHP<=0){
cout<<"你胜利了!"<>a;
switch(a){
case 1:
cout<<"盖房子需要20s,获得1~10@";
Sleep(20000);
cls();
srand(time(0));
b=(rand()%10==0?10:rand()%10);
cout<<"你获得了"<3){
}
else{
cout<<"还没到呢,后面再说";
Sleep(3000);
cls();
}
return;
}
void mianban(){
while (true) {
atk=yuanatk+wuqiatk;
def=yuandef+kuijiadef;
int a;
cout<<" ____________________ "<>a;
switch(a){
case 1:
cls();
xiaoguai();
break;
case 2:
cls();
daguai();
break;
case 3:
cls();
shop();
break;
case 4:
cls();
dagong();
break;
case 5:
cls();
yuanzheng();
break;
case 6:
cls();
zhuangtai();
break;
}
}
}
void juqing(){
if(zhangjie==0){
kaishi();
zhangjie+=1;
}
if(zhangjie==1){
cout<<"章节一:"<
现在暑假了,好不容易有时间发呢
好了,我是大白,下次再见!