diff --git "a/\347\254\254\344\270\200\345\205\263" "b/\347\254\254\344\270\200\345\205\263" new file mode 100644 index 0000000000000000000000000000000000000000..8769a31d0ab75235cb8e0fe09b55b4ec0b08be77 --- /dev/null +++ "b/\347\254\254\344\270\200\345\205\263" @@ -0,0 +1,1982 @@ +/* +关于所有函数的解释 +main12:主界面 +main: 一开始进入的主界面 +board: 一些选项 +其它的可以百度一下,都是英文(有些是拼音) +有重要的变量 +option:通用选择 +游戏说明: +此游戏包含很多玩法 +有迷宫,技能,等级制,战斗等等 +可以自由去探索 +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; + +int main12(); +void start(); +void board(); +void maps(); +void bag();//bug 可以先看一下,不知道出了什么问题 +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(); +void zhuxian1(); +void x(const string f); +const int N=1e3+10; + +int zhuangbei[N]; +/* +最高级 神的庇护 +第二级: +荆棘护甲 熔岩拳套 流水灵甲 重金宝剑 土流盾 +第三级: +木藤鞭 熔岩枪 水灵环 金剑 +*/ + +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]= {0,1,0,0,0,0,0}; // +int grade=1; +int blood[101]= {0,100}; +int experience[101]; +string name; +int option,attribute[5],attributes,flag_box[N],flag_bag[N],exits,savage,times,attack[N],defense[N]; +int jinyan; +int baoji=5; +int sum_level[101]= {}; +bool ops[N]; +string head,body,trousers,shoes; +int zhuxiansum=1; +int shushen; +string shengfen; +void x(const string f) { + size_t len = f.size(); + for(int i = 0; i < f.size(); i++) { + cout << f[i]; + usleep(30000); + } + cout << endl; +} +int fang(string shengfen) { + if(shengfen[0] == '#') { + return 1; + } + int year = 0; + int a1 = (shengfen[6] - '0') * 1000; + int a2 = (shengfen[7] - '0') * 100; + int a3 = (shengfen[8] - '0') * 10; + int s4 = (shengfen[9] - '0') * 1; + year = a1 + a2 + a3 + s4; + cout << "你出生在:" << year << endl; + int len = 2021 - year; + cout << "你现在:" << len << endl; + if(len < 18) { + return 0; + } + return 1; +} +void zhuxian() { + x("注意:第一关和第二关是制作人本人为boss哦!"); + x("第一关,制作人-struct_cym"); + x("今天,你来到了求(狗)真(屎)六班"); + x("一位长得猥琐的plain and confident boy站在门口,这就是lszyym(道标-愚公的外号)"); + if(xingbie=='girl') { + x("因为你是女生,所以这个猥琐男直接扑了过来,你下意识的扇了一巴掌过去"); + x("但是这个猥琐男并没有气馁,堆满笑容的凑了过来"); + x("毕竟是个plain and confident boy"); + + } +} +int main() { + cout << "为了反映国家号召, 本游开设未成年人反沉迷系统, 请输入身份证号码" << endl; + cin >> shengfen; + if(!fang(shengfen)) { + cout << "未成年人, 禁止进入" << endl; + return 0; + } + start(); + pretreatment(); + cout<>attributes; + attribute[attributes]=1; + board(); + cin>>option; + if(option==1) { + maps(); + if(exits==1) { + return 0; + } + main12(); + } else if(option==2) { + bag(); + main12(); + } else if(option==3) { + cout<<"已删除" <>name; +} + +void pretreatment() { + int num=1; + for(int i=100; i<=10000; i+=100) { + blood[num]=i; + experience[num]=i; + attack[num]=5+(i/100)*2; + defense[num]+=i/100; + num++; + } +} + +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 if(option == 9) { + 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(1); + 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++; + } + while(jinyan>=experience[grade]&&grade<100) { + grade++; + jinyan-=experience[grade-1]; + } + if(exits==1) { + return 0; + } + board(); + cin>>option; + if(option==1) { + maps(); + system("cls"); + if(exits==1) { + return 0; + } + main12(); + } else if(option==2) { + bag(); + system("cls"); + main12(); + } else if(option==3) { + box(); + system("cls"); + main12(); + } else if(option==4) { + equips(); + system("cls"); + main12(); + } else if(option==5) { + skill_board(); + system("cls"); + main12(); + } else { + main12(); + } +} + +void lingdong() { + cout<<"欢迎来到灵洞"<>option; + if(option==1) { + cout<<"你遇见了——"<>times; + for(int i=1; i<=times; i++) { + cout<>option; + int exits1=0; + if(option==1) { + while(!exits1) { + cout<<"挖矿中..."<>option; + if(option==2) { + exits1=1; + } + } + } else { + cout<<"你遇到了---"<3) { + grade-=3; + } else { + grade=1; + } + shushen=0; + } + cout<<"1.撸树 2.闲逛(与恶魔干架)"; + cin>>option; + int exits1=0; + if(option==1) { + while(!exits1) { + cout<<"撸树中..."<>option; + if(option==1) { + cout<<"你成功逃跑"<>option; + if(option==2) { + exits1=1; + } + } + } else { + cout<<"你遇到了---"<> n; + if(n == 1) { + ten(); + } else if(n == 2) { + eleven(); + } else if(n == 3) { + twelve(); + } else if(n == 4) { + thirteen(); + } else if(n == 5) { + forteen(); + } +} +