diff --git "a/\350\211\271.cpp" "b/\350\211\271.cpp" index a6e2c3481e83858bccb9173a76c22a31875e29a5..e73243adc37f2d9ec6f44a0664783aa342d92508 100644 --- "a/\350\211\271.cpp" +++ "b/\350\211\271.cpp" @@ -1,8 +1,732 @@ +/* +关于所有函数的解释 +main12:主界面 +main: 一开始进入的主界面 +board: 一些选项 +其它的可以百度一下,都是英文(有些是拼音) + + +有重要的变量 +option:通用选择 + + +游戏说明: + +此游戏包含很多玩法 +有迷宫,技能,等级制,战斗等等 + +可以自由去探索 + + + +*/ + +#include #include +#include +#include +#include +#include +#include +#include #include using namespace std; -void ten() -{ + +int main12(); +void start(); +void board(); +void maps(); +void bag();//bug 可以先看一下,不知道出了什么问题 +void box(); +void equips();//装备 未完成 +void skill_board();//技能板 未完成 +void lingdong(); +void zhanchang();//未完成 +void shenming(); +void huo(); +void bin();//未完成 +void jin();//未完成 +void shu();//未完成 +void lu();//未完成 +void equip_bag();//未完成 +int shanghai(double gong); +int jianshang(double fang); +int boss_shanghai(double gong); +void pretreatment(); +void ten(); +void eleven(); +void twelve(); +void thirteen(); +void fourteen(); +void fifteen(); +const int N=1e3+10; + +struct op{ + string name; + string lei; + string fangyu; + string gongji; +}equip_attributes[N]; + +struct xh{ + int cnn; + string bag; +}bags[N]; + +struct xu{ + int cnn; + string boxx; +}boxs[N]; + +bool jineng[100]; +int grade=1; +int blood[101]={0,100}; +int experience[101]; +string name; +int option,attribute,flag_box[N],flag_bag[N],exits,savage,times,attack=1,defense=1; +int jinyan; +int baoji=5; +int sum_level[101]={}; +bool ops[N]; +string head,body,trousers,shoes; + + +int main(){ + start(); + pretreatment(); + cout<>attribute; + board(); + cin>>option; + if(option==1){ + maps(); + if(exits==1){ + return 0; + } + main12(); + }else if(option==2){ + bag(); + main12(); + }else if(option==3){ + box(); + main12(); + }else if(option==4){ + equips(); + main12(); + }else if(option==5){ + skill_board(); + main12(); + } +} + + +void start(){ + cout<<"Welcome to AXX"; + cout<>name; +} + +void pretreatment(){ + int num=1; + for(int i=100;i<=10000;i+=100){ + blood[num]=i; + experience[num]=i; + num++; + } + for(int i=1;i<=100;i++){ + bags[i-1].cnn=i; + } +} + +void board(){ + cout<>option; + if(option==1){ + lingdong(); + main12(); + }else if(option==2){ + zhanchang(); + main12(); + }else if(option==3){ + shenming(); + main12(); + }else if(option==4){ + huo(); + main12(); + }else if(option==5){ + bin(); + main12(); + }else if(option==6){ + jin(); + main12(); + }else if(option==7){ + shu(); + main12(); + }else if(option==8){ + lu(); + main12(); + }else{ + exits=1; + } +} + +void bag(){ //bug + int sum=0; + for(int i=0;i<=20;i++){ + for(int j=0;j<5;j++){ + if(!flag_bag[i]) + cout<>option; + if(option==1){ + cout<<"请输入丢弃的序号"; + cin>>option; + for(int i=0;i<100;i++){ + if(option==bags[i].cnn){ + flag_bag[i]=1; + for(int j=i+1;j<100;j++){ + bags[j].cnn--; + } + cout<<"丢弃成功"; + return; + } + } + } +} + +void box(){ + int sum=0; + for(int i=0;i<20;i++){ + for(int j=0;j<5;j++){ + if(!flag_box[i]) + cout<>option; + if(option==1){ + Sleep(1000); + cout<<"请输入丢弃的序号"; + cin>>option; + for(int i=0;i<100;i++){ + if(option==bags[i].cnn){ + flag_box[i]=1; + for(int j=i+1;j<100;j++){ + bags[j].cnn--; + } + cout<<"丢弃成功"; + return; + } + } + } +} + +int main12(){ + if(grade==0){ + grade++; + } + if(jinyan>=experience[grade]){ + grade++; + jinyan-=experience[grade-1]; + } + if(exits==1){ + return 0; + } + board(); + cin>>option; + if(option==1){ + maps(); + if(exits==1){ + return 0; + } + main12(); + }else if(option==2){ + bag(); + main12(); + }else if(option==3){ + box(); + main12(); + }else if(option==4){ + equips(); + main12(); + }else if(option==5){ + skill_board(); + main12(); + } +} + +void lingdong(){ + cout<<"欢迎来到灵洞"<>option; + if(option==1){ + cout<<"你遇见了——"<>times; + for(int i=1;i<=times;i++){ + cout<>option; +// if(option==1){ +// bag2(); +// cout<<"请输入要替换的装备的名称"<>a; +// for(int i=0;i<100;i++){ +// if() +// } +// +// } +} + +void equip_bag(){ + cout<<"暂时为空"; +} + +void skill_board(){ + cout<<"暂时为空"; +} + +void zhanchang(){ + cout<<"删除"; +} + +void huo(){ + cout<<"流火之地"<>option; + int exits1=0; + if(option==1){ + while(!exits1){ + cout<<"挖矿中..."<>option; + if(option==2){ + exits1=1; + } + } + }else{ + cout<<"你遇到了---"<>option; + int exits1=0; + if(option==1){ + while(!exits1){ + cout<<"撸树中..."<>option; + if(option==2){ + exits1=1; + } + } + } +} + +void lu(){ + cout<<"阿努比斯的大陆沙漠"<> n; - if(n == 1) - { + if(n == 1){ ten(); } - else if(n == 2) - { + else if(n == 2){ eleven(); } - else if(n == 3) - { + else if(n == 3){ twelve(); } - else if(n == 4) - { + else if(n == 4){ thirteen(); } - else if(n == 5) - { + else if(n == 5){ forteen(); } - return 0; }