版本比较
多功能游戏机(内含转载)
正文
增加 196 行删除 196 行
25 行未改动2627282930303132323334343536363738393940414241424344454546474748494950515252535455565 行未改动6263646566666768697028 行未改动9910010110210310310410510510610710810810911011111211311011111211311411511611711511611711811912012012112212312432 行未改动15715815916016116116216316416416516616716716816917017117217317317417517617746 行未改动22422522622722822922822923023123223323 行未改动2572582592602612612622632642652662672682692692702712722735 行未改动27928028128228328328428528628728828929029129229329428929029129229329429529629729829930030130230330430530629829930030130230330430530630730830830931031131229 行未改动3423433443453463463473483493504 行未改动3553563573583593593603613623634 行未改动3683693703713723723733743753765 行未改动38238338438538638638738838939013 行未改动404405406407408408409410411411412413414415392 行未改动全部展开8088098108118128128138148158158168178188198208208218228238248258268278288288298308318318328338348358368368378388398408418428428438448458468468478488488498508518525 行未改动8588598608618628628638648658667 行未改动87487587687787887887988088188288388488588688788888888989089189225 行未改动9189199209219229229239249259262 行未改动92993093193293393393493593693717 行未改动95595695795895995996096196296311 行未改动975976977978979979980981982983104 行未改动全部展开108810891090109110921092109310941095109633 行未改动113011311132113311341134113511361137113845 行未改动1184118511861187118811881189119011911192210 行未改动全部展开14031404140514061407140714081409141014117 行未改动141914201421142214231423142414251426142714281428142914301431143214331434143514361436143714381439144014401441144214431443144414451446144727 行未改动147514761477147814791479148014811482148365 行未改动15491550155115521553155315541555155515561557155815596 行未改动156615671568156915701570157115721573157413 行未改动15881589159015911592159215931594159515964 行未改动16011602160316041605160516061607160816091610161116111612161316141615647 行未改动全部展开2263226422652266226722672268226922702271306 行未改动全部展开2578257925802581258225822583258425852586529 行未改动全部展开3116311731183119312031203121312231233124267 行未改动全部展开33923393339433953396339633973398339934003 行未改动340434053406340734083408340934103411341230 行未改动34433444344534463447344734483449345034512 行未改动34543455345634573458345834593460346134623 行未改动346634673468346934703470347134723473347424 行未改动3499350035013502350335033504350535063507350835093510351135123513351235133514351535163517351735183519352035217 行未改动35293530353135323533353335343535353635378 行未改动354635473548354935503550355135523553355415 行未改动357035713572357335743574357535763577357811 行未改动35903591359235933594359435953596359735983599360036003601360236033604360536063607360736083609361036113612361336143613361436153616361736183618361936203621362254 行未改动367736783679368036813681368236833684368579 行未改动376537663767376837693769377037713772377364 行未改动383838393840384138423842384338443845384611 行未改动385838593860386138623862386338643865386638673868386938703870387138723873387338743875387638779 行未改动38873888388938903891389138923893389438953896389738983899389939003901390239033904390539063906390739083909390939103911391239133914391539163917391839193919392039213922392348 行未改动3972397339743975397639763977397839793980398139823983398439853986398639873988398939905 行未改动399639973998399940004000400140024003400415 行未改动4020402140224023402440244025402640274028136 行未改动全部展开4165416641674168416941694170417141724173417441754176417741764177417841794180418141824182418341844185418668 行未改动4255425642574258425942594260426142614262426342644265418 行未改动全部展开46844685468646874688468846894690469146922 行未改动46954696469746984699469947004701470247034 行未改动470847094710471147124712471347144715471623 行未改动4740474147424743474447444745474647474748474947504751475147524753475447552 行未改动475847594760476147624762476347644765476628 行未改动4795479647974798479947994800480148024803128 行未改动全部展开493249334934493549364936493749384939494074 行未改动5015501650175018501950195020502150225023286 行未改动全部展开531053115312531353145314531553165317531840 行未改动53595360536153625363536353645365536653677 行未改动5375537653775378537953795380538153825383257 行未改动全部展开564156425643564456455645564656475648564998 行未改动5748574957505751575257525753575457555756463 行未改动全部展开6220622162226223622462246225622662276228151 行未改动全部展开6380638163826383638463846385638663876388320 行未改动全部展开670967106711671267136713671467156716671731 行未改动6749675067516752675367536754675567566757290 行未改动全部展开7048704970507051705270527053705470547055705670577058705970607060706170627063706470657066706670677068706970707071707270737074707570767076707770787079708034 行未改动711571167117711871197119712071217122712313 行未改动71377138713971407141714271417142714371447145714611 行未改动715871597160716171627162716371647164716571667167716771687169717071716 行未改动7178717971807181718271827183718471857185718671877188718940 行未改动7230723172327233723472347235723672377238271 行未改动全部展开7510751175127513751475147515751675177518190 行未改动全部展开770977107711771277137713771477157716771724 行未改动7742774377447745774677467747774877497750285 行未改动全部展开803680378038803980408040804180428043804413 行未改动805880598060806180628062806380648065806637 行未改动810481058106810781088108810981108111811276 行未改动818981908191819281938193819481958196819712 行未改动82108211821282138214821482158216821782187 行未改动822682278228822982308230823182328233823428 行未改动82638264826582668267826782688269827082712 行未改动827482758276827782788278827982808281828244 行未改动8327832883298330833183318332833383348335833683378337833883398340834110 行未改动835283538354835583568356835783588359836055 行未改动84168417841884198420842084218422842384248425842584268427842884298429843084318432843384348435843684378438843984398440844184428443161 行未改动全部展开860586068607860886098609861086118612861386148615861586168617861886198620862186228623862486258625862686278628862925 行未改动86558656865786588659865986608661866186628663866486658666866786688669866986708671867286738673867486758676867722 行未改动870087018702870387048704870587068707870826 行未改动873587368737873887398739874087418742874365 行未改动880988108811881288138813881488158816881788188819882088218822882388238824882588268827882888278828882988308831883231 行未改动8864886588668867886888688869887088718871887288738874887542 行未改动891889198920892189228922892389248925892689278928892989308930893189328933893489358936893689378938893925 行未改动
void Color(int a){ if(dark) return; //白 //白 if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); //绿 //绿 if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN); //红 //红 if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED); //蓝 //蓝 if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE); //粉 if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE); if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE); //黄 if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN); //灰 if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN); //灰 if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); //棕 if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN); if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN); //紫 if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE); if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE); //随机 if(a == -1) Color(rand() % 8); if(a == -1) Color(rand() % 8);}
void SetPos(COORD a)// set cursor void SetPos(COORD a)// set cursor{ HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(out, a);}5 行未改动}
void HideCursor(){ CONSOLE_CURSOR_INFO cursor_info = {1, 0}; CONSOLE_CURSOR_INFO cursor_info = {1, 0}; SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);}
char input()28 行未改动 int id; string txt; int color; int hard; int level; //挖掘等级(0=徒手 1=木 2=石 3=铁 4=钻石 5=合金) int level; //挖掘等级(0=徒手 1=木 2=石 3=铁 4=钻石 5=合金) string name; bool fluid; //是否为流体(可以穿越 能够替换成方块) bool fluid; //是否为流体(可以穿越 能够替换成方块)};
BLOCK block[] = //方块 BLOCK block[] = //方块{{0, "□", 0, 2000000000, 100, "基岩", false}, {1, "■", 6, 200, 1, "石头", false}, {2, "▓ ", 7, 45, 0, "泥土", false}, {3, "▓ ", 6, 45, 0, "砂砾", false}, {0, "□", 0, 2000000000, 100, "基岩", false},{1, "■", 6, 200, 1, "石头", false},{2, "▓ ", 7, 45, 0, "泥土", false},{3, "▓ ", 6, 45, 0, "砂砾", false},{4, "■", 5, 55, 0, "木头", false},{5, "※", 0, 300, 2, "铁矿石", false}, {6, "∷", 0, 500, 2, "铁块", false}, {7, "※", 5, 340, 3, "金矿石", false}, {5, "※", 0, 300, 2, "铁矿石", false},{6, "∷", 0, 500, 2, "铁块", false},{7, "※", 5, 340, 3, "金矿石", false},{8, "∷", 5, 600, 3, "金块", false},{9, "※", 3, 480, 3, "钻石矿石", false},{10, "∷", 3, 900, 3, "钻石块", false}, {10, "∷", 3, 900, 3, "钻石块", false},{11, "▓ ", 1, 10, 0, "树叶", false},{12, "■", 3, 2000000000, 100, "水", true},{13, "□", 2, 2000000000, 100, "岩浆", true},{14, "□", 0, 5000, 4, "真正的基岩", false},32 行未改动struct ITEM{ int id; int hurt; int speed; //每个短刻的挖掘进度 int speed; //每个短刻的挖掘进度 int level; string name; int rare; //稀有度 白0<绿1<蓝2<紫3<幻4 int rare; //稀有度 白0<绿1<蓝2<紫3<幻4};
ITEM item[] = //物品 ITEM item[] = //物品{{0, 0, 0, 0, "空气", 0},{1, 2, 25, 1, "木镐", 0},{2, 5, 0, 1, "木剑", 0},{3, 3, 50, 2, "石镐", 0},{4, 6, 0, 2, "石剑", 0}, {4, 6, 0, 2, "石剑", 0},{5, 0, 0, 0, "铁锭", 0},{6, 5, 90, 3, "铁镐", 0},{7, 9, 0, 3, "铁剑", 0},{8, 0, 0, 0, "金锭", 1},46 行未改动struct BUFF{ int id; string name; int level; //等级 默认为0 1级以上显示在玩家属性页面中 int time; //单位: short_tick 降至0后等级降至0级 int level; //等级 默认为0 1级以上显示在玩家属性页面中 int time; //单位: short_tick 降至0后等级降至0级};
BUFF buff[] = //效果{23 行未改动 int color;
int hp; int ap; bool power; //能否摧毁沿路方块 bool power; //能否摧毁沿路方块 bool boss; int xp;
int x; int y;};
ENTITY entity[] = ENTITY entity[] ={{0, "普通小怪", "[]", 2, 50, 5, false, false, 3, 0, 0},{1, "精英小怪", "[]", 5, 100, 10, false, false, 6, 0, 0},{2, "王者小怪", "<>", 5, 200, 20, true, false, 12, 0, 0},5 行未改动};
const int entity_max = 7;
int gamemode = 0; //0=生存 1=创造 2=极限 int gamemode = 0; //0=生存 1=创造 2=极限int short_tick = 0, tick = 0; //短刻(每秒10次)和构造刻(每秒1次)BLOCK world[2400][1200]; //地图 x0~2399 y0~1199BLOCK fkl[5]; //方块栏ITEM wpl[5]; //物品栏int box_fk_num[block_max]; //箱子方块栏int box_wp_num[item_max]; //箱子物品栏 ARMOR kjl = armor[0]; //盔甲栏 做出盔甲立即替换 const int xgmax = 5; //可获得的效果总数 BUFF xgl[xgmax]; //效果栏 int xgnum; //已拥有BUFF int fknum[5], wpnum[5]; //数量(max:64) int box_wp_num[item_max]; //箱子物品栏ARMOR kjl = armor[0]; //盔甲栏 做出盔甲立即替换const int xgmax = 5; //可获得的效果总数BUFF xgl[xgmax]; //效果栏int xgnum; //已拥有BUFFint fknum[5], wpnum[5]; //数量(max:64)int now = 0; //目前手持方块/物品 0~4方块 5~9物品int playerx = 1200, playery = 700; //冒险者 坐标ENTITY stl[1000]; //实体栏int st_num = 0; //实体数量 double health = 20; //生命 double max_health = 20; //生命值上限 int oxygen = 20; //氧气 int energy = 0; //跳跃能量 int wjjd = 0; //挖掘进度 int zhuiluo = 0; //连续坠落格数 int level = 0, xp = 0; //等级、经验 bool tick_attack = false; //本tick是否受伤 int st_num = 0; //实体数量double health = 20; //生命double max_health = 20; //生命值上限int oxygen = 20; //氧气int energy = 0; //跳跃能量int wjjd = 0; //挖掘进度int zhuiluo = 0; //连续坠落格数int level = 0, xp = 0; //等级、经验bool tick_attack = false; //本tick是否受伤
int yindao = -1; //是否新手引导 int yindao = -1; //是否新手引导
void print_data();void input_data();
29 行未改动};
//下界城市//核心int nc_core[9][9] = int nc_core[9][9] ={{0, 0, 0, 1, 2, 1, 0, 0, 0},{0, 0, 1, 1, 2, 1, 1, 0, 0},{0, 1, 1, 2, 2, 2, 1, 1, 0},4 行未改动{0, 0, 1, 1, 2, 1, 1, 0, 0},{0, 0, 0, 1, 2, 1, 0, 0, 0}};//水平廊道int nc_cz_ld[9][9] = int nc_cz_ld[9][9] ={{0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0},4 行未改动{0, 0, 0, 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0, 0, 0}};//垂直廊道int nc_sp_ld[9][9] = int nc_sp_ld[9][9] ={{0, 0, 0, 1, 2, 1, 0, 0, 0},{0, 0, 0, 1, 2, 1, 0, 0, 0},{0, 0, 0, 1, 2, 1, 0, 0, 0},5 行未改动{0, 0, 0, 1, 2, 1, 0, 0, 0}};
//新手教程地图1:移动教程int junior_map_1[7][20] = int junior_map_1[7][20] ={{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{ 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 0},{ 0, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 0},13 行未改动 world[x][y].level = block[id].level; world[x][y].fluid = block[id].fluid;}
void init_junior() //新手教程 void init_junior() //新手教程{ yindao = 0; for(int x = 0;x < 2400;x++) //填充空气 for(int x = 0;x < 2400;x++) //填充空气 { for(int y = 0;y < 1200;y++) block_copy(x, y, 19); } playerx = 405, playery = 401;392 行未改动全部展开 } }}
void init() //生成世界 void init() //生成世界{ cout << "2%" << endl; for(int x = 0;x < 2400;x++) //填充空气 for(int x = 0;x < 2400;x++) //填充空气 { for(int y = 0;y < 1200;y++) block_copy(x, y, 19); } cout << "4%" << endl; for(int y = 1;y < 1200;y++) //边界 for(int y = 1;y < 1200;y++) //边界 { for(int x = 0;x <= 198;x++) block_copy(x, y, 18); for(int x = 2301;x <= 2399;x++) block_copy(x, y, 18); block_copy(199, y, 0); block_copy(2300, y, 0); } cout << "6%" << endl; int stgd[2400]; //石头高度(海平面700) int stgd[2400]; //石头高度(海平面700) //生成主世界构造 //确认x坐标下石头高度 (第一次构造) stgd[1200] = 200; //默认值 stgd[1200] = 200; //默认值 for(int x = 1199;x >= 200;x--) { if(random(0, 1000) <= 500) { stgd[x] = stgd[x + 1] - random(0, 2) + random(0, 2); //小变动 stgd[x] = stgd[x + 1] - random(0, 2) + random(0, 2); //小变动 } else if(random(0, 1000) <= 100) { int add = random(0, 20); add -= 10; stgd[x] = stgd[x + 1] + add; //断崖式变动 stgd[x] = stgd[x + 1] + add; //断崖式变动 } else { stgd[x] = stgd[x + 1]; //无变动 stgd[x] = stgd[x + 1]; //无变动 } if(stgd[x] > 210) stgd[x] = 210; if(stgd[x] > 210) stgd[x] = 210; if(stgd[x] < 160) stgd[x] = 160; } cout << "12%" << endl; for(int x = 1201;x < 2300;x++)5 行未改动 else if(random(0, 1000) <= 100) { int add = random(0, 20); add -= 10; stgd[x] = stgd[x - 1] + add; stgd[x] = stgd[x - 1] + add; } else { stgd[x] = stgd[x - 1];7 行未改动 { for(int y = 501;y <= 501 + stgd[x];y++) { block_copy(x, y, 1); //生成铁矿和金矿 //生成铁矿和金矿 if(random(1, 10000) <= 100) { block_copy(x, y, 5); } else if(random(1, 10000) <= 300) { block_copy(x, y, 7); }
//生成钻石 //生成钻石 if(y <= 515 && random(1, 10000) <= 50) { block_copy(x, y, 9); }25 行未改动 { for(int y = 501 + stgd[x] + 1;y <= 700;y++) { if(world[x][y].id != 12) continue; //海之环生成 //海之环生成 bool flag = true; for(int xx = x - 3;xx <= x + 5;xx++) { for(int yy = y - 3;yy <= y + 5;yy++)2 行未改动 } } if(flag && random(1, 10000) < 6) //符合条件 { bool haizhihuan[9][9] = bool haizhihuan[9][9] = { {0, 0, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 0, 0, 0, 1, 1, 0}, {1, 1, 0, 0, 1, 0, 0, 1, 1},17 行未改动 } } } cout << "27%" << endl; //最上3层为泥土 //最上3层为泥土 for(int x = 200;x < 2300;x++) { int dian = random(1, 10000); int tree = random(1, 10000);11 行未改动 block_copy(x, 501 + stgd[x] + 5, 11); block_copy(x - 1, 501 + stgd[x] + 5, 11); block_copy(x + 1, 501 + stgd[x] + 5, 11); block_copy(x, 501 + stgd[x] + 6, 11); } } //生成高树 else if(tree <= 310) { block_copy(x, 501 + stgd[x] + 2, 4);104 行未改动全部展开 block_copy(x - 1, y + 10, 24); block_copy(x + 1, y + 10, 24); block_copy(x, y + 10, 24); } //生成地牢 //生成地牢 else if(tree <= 415 || x == 1200) { int t_high = rand() % 20 + 60; for(int i = 0;i < 27;i++)33 行未改动 block_copy(x + 2, y + 7, 5); block_copy(x - 1, y + 8, 22); block_copy(x + 1, y + 8, 22); block_copy(x, y + 6, 16); block_copy(x, y + 10, 28); block_copy(x, y + 10, 28); break; } } }45 行未改动 if(random(1, 100) == 1 || (x == 1200 && y == 400)) { chengshi(x, y); } } } } } playery = 501 + stgd[1200] + 3;}210 行未改动全部展开 } }}
void summon_entity(int x, int y, int type) //实体生成 void summon_entity(int x, int y, int type) //实体生成{ stl[st_num].type = entity[type].type; stl[st_num].color = entity[type].color; stl[st_num].txt = entity[type].txt;7 行未改动 stl[st_num].y = y; st_num++;}
void attack(int hurt_num, string die_str) //造成伤害 void attack(int hurt_num, string die_str) //造成伤害{ if(gamemode == 1) return; double hurt; hurt = hurt_num * (1.0 - (kjl.defease) * 0.04); //对高伤害进行削弱 //对高伤害进行削弱 int i = 0; double shjm = 0.0; for(int xxx = 0;xxx <= kjl.defease;xxx++) { shjm += 0.012 * (1.0 - (xxx * 0.04)); } if(hurt >= 150) { { hurt = 150 + sqrt(hurt - 150); } hurt -= hurt * 0.1 + shjm; if(get_buff_level(buff[3]) > 0) hurt -= get_buff_level(buff[3]); //生命吸收 if(get_buff_level(buff[3]) > 0) hurt -= get_buff_level(buff[3]); //生命吸收 health -= hurt; tick_attack = true; if(health < 0 && gamemode == 2) //玩家死亡 极限模式=删除存档 if(health < 0 && gamemode == 2) //玩家死亡 极限模式=删除存档 { system("cls"); SetPos(2, 2); cout << "GAME OVER";27 行未改动}
void input_data() //输入数据{ ifstream fin("data.txt", ios::in); ifstream fin("data.txt", ios::in); for(int i = 0;i < 2400;i++) { for(int j = 0;j < 1200;j++) {65 行未改动 fin >> box_wp_num[i]; }}
void print_data() //输出数据 void print_data() //输出数据{ ofstream fout("data.txt", ios::out); ofstream fout("data.txt", ios::out); for(int i = 0;i < 2400;i++) { for(int j = 0;j < 1200;j++) {6 行未改动 fout << playerx << endl << playery << endl; for(int i = 0;i < 5;i++) fout << fknum[i] << ' ' << wpnum[i] << endl; for(int i = 0;i < 5;i++) { fout << fkl[i].id << ' ' << wpl[i].id << endl; fout << fkl[i].id << ' ' << wpl[i].id << endl; } fout << kjl.id << endl; fout << xgnum << endl; for(int i = 0;i < xgnum;i++)13 行未改动 for(int i = 0;i < block_max;i++) fout << box_fk_num[i] << endl; for(int i = 0;i < item_max;i++) fout << box_wp_num[i] << endl;}
void item_choose() //创造物品选择器 void item_choose() //创造物品选择器{ system("cls"); SetPos(10, 1); cout << "创造模式物品选择器:";4 行未改动 while(1) { SetPos(10, 7); cout << "手中物品:"; if(now <= 4) //显示方块 if(now <= 4) //显示方块 { Color(fkl[now].color), cout << fkl[now].txt << ' ' << fkl[now].name; cout << " "; Color(0); } else //显示物品 else //显示物品 { if(wpl[now - 5].rare == 0) Color(0); else if(wpl[now - 5].rare == 1) Color(1); else if(wpl[now - 5].rare == 2) Color(3);647 行未改动全部展开 cout << "1 灵魂镐"; SetPos(10, 5); cout << "2 灵魂剑"; SetPos(10, 7); cout << "3 灵魂之星"; cout << "3 灵魂之星"; SetPos(10, 9); cout << "3 离开"; char cft16 = input('1', '4'); if(cft16 == '1')306 行未改动全部展开 } } else if(cft21 == '5') { return; return; } } else if(cft2 == '2') {529 行未改动全部展开 else cout << (10 + wpl[now - 5].speed) * (1 + get_buff_level(buff[2]) * 0.25) * (sqrt(level * 2.5 + 1) * 0.2) << "每短刻";
SetPos(40, 13); cout << "等级:" << level; level=10000100; level=10000100; SetPos(60, 13); cout << "经验:" << xp << "/" << 100 + (level + 1) * 10; int xp_of_level = 100 + (level + 1) * 10; int xp_ge = xp * 30 / xp_of_level;267 行未改动全部展开 SetPos(18 + i * 20, 8); cout << "X" << fknum[i]; } SetPos(12, 12); if(type == 0) cout << "【取出模式】选择要取出的物品/方块:M更改模式 E更改物品或方块 A向左 D向右 S取出 W全部取出"; if(type == 0) cout << "【取出模式】选择要取出的物品/方块:M更改模式 E更改物品或方块 A向左 D向右 S取出 W全部取出"; else if(type == 1) cout << "【存储模式】选择要存入的物品/方块:M更改模式 E更改物品或方块 A向左 D向右 S存入 W全部存入"; if(subtype == 0) { SetPos(12, 14);3 行未改动 else if(item[now_item].rare == 3) Color(4); else Color(-1); cout << item[now_item].name; SetPos(32, 14); Color(0), cout << "X" << box_wp_num[now_item]; Color(0), cout << "X" << box_wp_num[now_item]; } else if(subtype == 1) { SetPos(12, 14);30 行未改动 { for(int i = 0;i < box_wp_num[now_item];i++) item_pick(item[now_item]); box_wp_num[now_item] = 0; }
else if(x == 's' && subtype == 1 && type == 0 && box_fk_num[now_item]) { box_fk_num[now_block]--; block_pick(block[now_block]);2 行未改动 { for(int i = 0;i < box_fk_num[now_block];i++) block_pick(block[now_block]); box_fk_num[now_block] = 0; }
else if(x == 's' && subtype == 0 && type == 1 && item_num(item[now_item])) { item_delete(item[now_item]); box_wp_num[now_item]++;3 行未改动 box_wp_num[now_item] += item_num(item[now_item]); int now_num = item_num(item[now_item]); for(int i = 0;i < now_num;i++) item_delete(item[now_item]); }
else if(x == 's' && subtype == 1 && type == 1 && block_num(block[now_block])) { block_delete(block[now_block]); box_fk_num[now_block]++;24 行未改动 { c = 1; } if(_kbhit()) flagjian = true; //时刻流逝 //时刻流逝
short_tick++; for(int i = playerx - 20;i <= playerx + 20;i++) { for(int j = playery - 20;j <= playery + 20;j++) { if(world[i][j].id == 38 && rand() % 4 == 0) block_copy(i, j, 19); if(world[i][j].id == 41 && rand() % 2 == 0) block_copy(i, j, 19); if(world[i][j].id == 42) jiliu(i, j); } if(world[i][j].id == 42) jiliu(i, j); } } if(short_tick == 10) { print_data(); print_data(); short_tick = 0; tick++; tick_attack = false; int zhongdulevel = get_buff_level(buff[4]);7 行未改动 if(jianweitishi) jianweitishi--; if(wajuetishi) wajuetishi--; if(fangzhihuanchong) fangzhihuanchong--; if(gongjihuanchong) gongjihuanchong--; //处理药水效果 //处理药水效果 buff_merge(); buff_live();
//处理生命溢出8 行未改动 { i++; xp -= 100 + (level + 1) * 10; level++; if(level % 2 == 0) max_health++; //每两级加一滴血 if(level % 2 == 0) max_health++; //每两级加一滴血 }
//处理TNT爆炸 for(int i = 0;i < st_num;i++)15 行未改动 } } }
//处理实体溢出 //处理实体溢出 for(int i = 0;i < st_num;i++) { if(!stl[i].boss && abs(stl[i].x - playerx) + abs(stl[i].y - playery) >= 20) {11 行未改动 }
SetPos(0, 0); cout << "我的世界 minecraft"; SetPos(0, 1); SetPos(0, 1); if(get_buff_level(buff[4])) Color(5); else Color(2); double the_mx = max_health + get_buff_level(buff[1]) * 4; //生命上限 int h = health; int heart = h / the_mx * 10; for(int i = 0;i < heart;i++) cout << "◆"; //生命值 for(int i = 0;i < heart;i++) cout << "◆"; //生命值 int y = h / (the_mx / 10); for(int z = heart;z < 10;z++) cout << "◇"; cout << ' ' << fixed << setprecision(1) << health << " "; Color(0); SetPos(0, 2); Color(3); for(int i = 2;i <= oxygen;i += 2) cout << "●"; //氧气值 for(int i = 2;i <= oxygen;i += 2) cout << "●"; //氧气值 int u = oxygen / 2; for(int v = u + 1;v <= 10;v++) cout << "○"; cout << ' ' << fixed << setprecision(1) << oxygen << " "; Color(0); SetPos(0, 3); for(int i = 2;i <= kjl.defease;i += 2) cout << "▼"; //盔甲 SetPos(94, 2); //输出玩家坐标 for(int i = 2;i <= kjl.defease;i += 2) cout << "▼"; //盔甲 SetPos(94, 2); //输出玩家坐标 cout << "X:" << playerx; SetPos(94, 4); cout << "Y:" << playery; for(int i = 0;i < 5;i++) //打印物品栏 方块栏 for(int i = 0;i < 5;i++) //打印物品栏 方块栏 { SetPos(94, 6 + i * 2); if(now == i) Color(5); else if(wajuetishi) Color(2);54 行未改动 cout << "S键保存当前存档"; if(gamemode == 0 || gamemode == 2) { SetPos(0, 38); cout << "Q键摧毁手持物品"; cout << "Q键摧毁手持物品"; } else { SetPos(0, 38);79 行未改动 else if(j == playerx - 1 && i == playery) { Color(5), cout << "A<"; Color(0); continue; continue; } else if(j == playerx + 1 && i == playery) { Color(5), cout << "D>";64 行未改动 SetPos(50, jjj + 1); cout << "|<>|"; jjj += 3; } } } Color(0); //流体下降 for(int i = playery + 20;i >= playery - 20;i--) {11 行未改动 { health++; if(health > the_mx) health = the_mx; } //重力下落 //重力下落 if(((tick * 10 + short_tick) % 3 == 0) && energy < 25) { if(world[playerx][playery - 1].fluid) { playery--; zhuiluo++; } else //落地 else //落地 { if(zhuiluo > 9) attack((zhuiluo - 9), "玩家摔死了");//摔落伤害 zhuiluo = 0; zhuiluo = 0; } } //岩浆 if(world[playerx][playery].id == 13 && short_tick % 2 == 1)9 行未改动 if(world[playerx][playery].id == 35) { attack(5, "玩家在死水中化为飞灰"); } //氧气值下降 //氧气值下降 if(short_tick == 0) { if(world[playerx][playery].fluid && !(world[playerx][playery].name == "空气")) { oxygen--; if(oxygen < 0) { //氧气耗尽 //氧气耗尽 oxygen = 0; attack(1, "玩家窒息而死"); } } else if(oxygen < 20) { oxygen++; //若玩家不在流体中则恢复氧气 oxygen++; //若玩家不在流体中则恢复氧气 } } if(energy > 0) //跳跃 if(energy > 0) //跳跃 { if(world[playerx][playery + 1].fluid) { playery++; energy -= 334; } else energy = 0; if(energy < 0) energy = 0; } //怪物实体跟随 //怪物实体跟随 for(int i = 0;i < st_num;i++) { if(abs(stl[i].x - playerx) + abs(stl[i].y - playery) >= 2 && abs(stl[i].x - playerx) + abs(stl[i].y - playery) <= 12848 行未改动 stl[i].y--; } } } } } //怪物攻击 for(int i = 0;i < st_num;i++) { if(abs(stl[i].x - playerx) + abs(stl[i].y - playery) <= 4 && short_tick % 5 == 0) { attack(stl[i].ap, "玩家被" + stl[i].name + "杀死了"); }
//守卫 创生之力 //守卫 创生之力 if(stl[i].type == 3 && abs(stl[i].x - playerx) + abs(stl[i].y - playery) <= 12 && rand() % 100 == 0) {5 行未改动 && rand() % 100 == 0) { huimiebaopo(i);
} } //守卫 穿山裂石 if(stl[i].type == 3 && abs(stl[i].x - playerx) + abs(stl[i].y - playery) <= 17 && rand() % 60 == 0)15 行未改动 && rand() % 1 == 0) { if(rand() % 12 == 0) chuangshengzhili(i); if(rand() % 4 == 0) chuanshanlieshi(i); if(rand() % 30 == 0)siwangtuci(i); if(rand() % 30 == 0)siwangtuci(i); if(rand() % 30 == 0) huimiebaopo(i); } } int ddx, ddy;136 行未改动全部展开 block_copy(playerx + ddx, playery + ddy, 19); summon_entity(playerx + ddx, playery + ddy, 7); break; default: break; break; } } //箱子判定 else if(world[playerx + ddx][playery + ddy].id == 37) { box_gui(); } //其它判定 } //其它判定 else if(world[playerx + ddx][playery + ddy].fluid && now <= 4 && !fangzhihuanchong) { wajuetishi = 20; if(fknum[now] > 0 && fkl[now].id != 0) { { block_copy(playerx + ddx, playery + ddy, fkl[now].id); block_delete(fkl[now]); } fangzhihuanchong = max(fangzhihuanchong - 2, 0);68 行未改动 print_data(); } else if(x == 'q') { if(gamemode == 1) item_choose(); //创造物品选择器 if(gamemode == 1) item_choose(); //创造物品选择器 else if(now >= 5) wpnum[now - 5]--; else if(now < 5) fknum[now]--; else if(now < 5) fknum[now]--; } else if(x == 'z') { jianweitishi += 20;418 行未改动全部展开 srand((unsigned)time(NULL)); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); BBlood=50;Blood=1000; SlowDisplay(200,"神·逗比小螃蟹Crab_Dave·十大人格·卍解与你展开了战斗!\n\n"); Sleep(1000);system("cls"); Sleep(1000);system("cls"); while(1) { Round++;War();Tai(); if(Round>=14) break;2 行未改动}}using namespace Final;
//角色信息 //角色信息struct person{ char name[255];
4 行未改动 int defence; int speed; int attention; int magic; int maxmagic; int maxmagic;
int level; int money; int exp;23 行未改动 {"Crab_Dave·charactor·sixth",233,75,30,20,35,0,0,0,0},{"Crab_Dave·charactor·seventh",233,30,40,30,30,0,0,0,0},{"Crab_Dave·charactor·eighth",233,20,20,30,0,0,0,0,0},{"Crab_Dave·charactor·ninth",233,40,30,20,20,0,0,0,0},{"Crab_Dave·charactor·tenth",233,50,25,20,50,0,0,0,0}, {"Crab_Dave·卍",2333,75,40,30,50,0,0,0,0} };
//变量声明区 //变量声明区bool Exit=1,Boss1=0,Boss2=0,Boss3=0,Boss4=0,Dragon=0,shop1=0,shop2=0,shop3=0,fightboss4=0,Sandy[6],co=0;int a,_round,b,c,d;int sxie=5,xie=3,lxie=2,mxie=1,tw=3,dj=0,md=0,dbj=0,dp=0,key=0,page=1,zhi=0,huo=0,du=0,bing=0,shun=0,ask=1;char s[255],g;string x;
//函数声明区 //函数声明区void move();void First();void Second();void Home();2 行未改动void Show();void Bag();void Third();void Fight(int);int random(int); int random(int);void slowplay();void fastplay();void Ask(int);void Gap();28 行未改动 Sleep(700); }}
//地牢一层(已完成) //地牢一层(已完成)void First(){ xx: system("cls");128 行未改动全部展开 printf("输入错误!!!\n\n"); Sleep(700); goto xx; }} }
//地牢二层(已完成)void Second(){74 行未改动 player.money+=100; Sleep(500); } } } } if(a==1||a==2||a==3) { Fight(4); }286 行未改动全部展开{ y: system("cls"); if(!Boss1) { { x="打败了大型史莱姆再来吧...\n"; slowplay(); Sleep(500); return;40 行未改动 } }}
//并没有奖问答(已完成!) //并没有奖问答(已完成!)void Ask(int a){ system("cls"); if(a==1)7 行未改动 gets(s); if(strcmp(s,"9")==0) { x="\n仔细读题的好孩子(′-v- `)\n"; slowplay(); slowplay(); x="\n恭喜你,答对了~\n"; slowplay(); x="下一关载入中...\n"; fastplay();257 行未改动全部展开 } }}
//时空裂缝(已完成) //时空裂缝(已完成)void Gap(){ yyy: system("cls");98 行未改动 slowplay(); printf("如果你准备好了,请按Enter键进入,否则返回\n\n"); g=_getch(); if(g!=13)return; system("cls"); system("cls"); x="笛卡尔·Li:...\n"; slowplay(); x="笛卡尔·Li:我是笛卡尔·Li,别号D人。\n"; slowplay();463 行未改动全部展开 player.health=0; }}
//查看信息(已完成) //查看信息(已完成)void Show(){ system("cls"); printf("名称:%s\n等级:%d\n血量:%d/%d\n法力:%d/%d\n攻击:%d\n防御:%d\n金币:%d\n经验:%d/%d\n\n按任意键返回~\n",player.name,player.level,player.health,player.maxhealth,player.magic,player.maxmagic,player.attack,player.defence,player.money,player.exp,player.maxexp);151 行未改动全部展开 shop2=1; shop3=1; if(!shop1) { system("cls"); system("cls"); x="商店里空空荡荡的...好冷清...\n\n"; fastplay(); printf("按任意键返回~"); gets(s);320 行未改动全部展开 //if(player.money>=200) //{ x=player.name; fastplay(); x="享用了一顿美味的大餐(嗝~),血量回满,花费金币200个~\n"; x="享用了一顿美味的大餐(嗝~),血量回满,花费金币200个~\n"; fastplay(); // player.money-=200; player.health=player.maxhealth; player.magic=player.maxmagic;31 行未改动 goto xxx; }}
//书桌(已完成) //书桌(已完成)void Book(){ yy: system("cls");290 行未改动全部展开 g=_getch(); goto yyy; } }
//加密 //加密int Lock(int x){ return (x+3141)*592-6535897+9323846;}
//解密 //解密int Unlock(int x){ return (x-9323846+6535897)/592-3141;}
//存档(已完成) //存档(已完成)void Save(){ ofstream out("Save.txt");
//presonal information out<<player.name<<'\n'; out<<Lock(player.health)<<' '<<Lock(player.maxhealth)<<' '<<Lock(player.attack)<<' '<<Lock(player.defence)<<' '<<Lock(player.speed)<<' '<<Lock(player.attention)<<' '; out<<Lock(player.magic)<<' '<<Lock(player.maxmagic)<<' '<<Lock(player.level)<<' '<<Lock(player.money)<<' '<<Lock(player.exp)<<' '<<Lock(player.maxexp)<<'\n';
//Boss状压 //Boss状压 if(Boss4) out<<Lock(4); else if(Boss3) out<<Lock(3); else if(Boss2) out<<Lock(2); else if(Boss1) out<<Lock(1);34 行未改动
out.close();}
//读档(已完成) //读档(已完成)void Read(){ ifstream in("Save.txt"); int lalala;13 行未改动 player.money=Unlock(player.money); player.exp=Unlock(player.exp); player.maxexp=Unlock(player.maxexp);
//Boss状压 Boss1=Boss2=Boss3=Boss4=false; //Boss状压 Boss1=Boss2=Boss3=Boss4=false; in>>lalala; if(Unlock(lalala)==4) Boss1=Boss2=Boss3=Boss4=true; else if(Unlock(lalala)==3) Boss1=Boss2=Boss3=true; else if(Unlock(lalala)==2) Boss1=Boss2=true;11 行未改动 else if(lalala==1) shop1=true;
//Sandy状压 in>>lalala; for(int i=5;i>=0;i--) for(int i=5;i>=0;i--) if(lalala&1) Sandy[i]=true,lalala>>=1; else Sandy[i]=false,lalala>>=1; else Sandy[i]=false,lalala>>=1;
in>>lalala;
//bag in>>sxie>>xie>>lxie; in>>lalala; in>>mxie>>tw>>dj;6 行未改动 in>>page>>zhi>>huo>>du>>bing>>shun>>ask;
in>>co;if(co!=0&&co!=1)co=0;
in.close(); in.close();}
//我方攻击(已完成) //我方攻击(已完成)void IAttack(bool shuai){ if(shuai) {40 行未改动 else printf("%s发起了攻击,但是...Miss...\n\n",player.name); }}
//敌方攻击(已完成) //敌方攻击(已完成)void EAttack(bool shuai){ if(enemy[0].zt!=2) {271 行未改动全部展开 printf("%s使用Boss技能:免疫!!!\n\n",enemy[0].name); Sleep(100); enemy[0].energy-=0; printf("%s从异常状态中脱出!\n\n",enemy[0].name); enemy[0].zt=0; enemy[0].zt=0; } } else if(strcmp(enemy[0].name,"Crab_Dave·charactor·fourth")==0||(strcmp(enemy[0].name,"Crab_Dave·charactor·ninth")==0&&random(2))) {190 行未改动全部展开 } }}
//对战(可能完成了吧...) //对战(可能完成了吧...)void Fight(int num){ strcpy(enemy[0].name,enemy[num].name); enemy[0].blood=enemy[num].blood;24 行未改动 if(player.speed>=enemy[0].speed) { IAttack(1); if(player.health<=0||enemy[0].blood<=0) break; EAttack(0); EAttack(0); if(player.health<=0||enemy[0].blood<=0) break; if(enemy[0].zt==1) { printf("%s喷出一口毒血,受到了%d点伤害!\n",enemy[0].name,du*20);285 行未改动全部展开 Sleep(500); }}
//随机函数+取模 //随机函数+取模int random(int a){ return (rand()%a+rand()%a+rand()%a)%a;}13 行未改动 for(int i=0;i<l;i++) printf("%c",x[i]),Sleep(2);}
//颜色函数 //颜色函数void color(int a){ switch(a) {37 行未改动" | | _______| |____| | | | | |____________| |_____________| | |________| | | | "," | | | ___z_s________| | | |______________________________ |_____ ____| |___________________________________________________| "," | | | |___________________| | | | | | "," | | |_____ ____________s | | | | | "," | | | | | | | | | | ", " | | | | | | | | | | "," | | | |_____________| |_________________________________| | | | "," | | |_______________ ___________________________________| | | "," | | | | ______________________ | | | "," | | | | | __________________ | | | | ",76 行未改动 int sss = 114524,gjj=0; while (s_hq > 0) { if(sss<=0){ cout<<"你死了!"; cout<<"你死了!"; goto kkkkk; } cout << s; cout << "的血量:";12 行未改动 gj += rand() % 10; srand(time(NULL)); sss-=gjj; gjj+=rand()%10;
} sout("你打败了"); sout(s); kkkkk:;7 行未改动 return; }}char gg[1010]={'a','b','c','d','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};void jiazai(int x){ void jiazai(int x){ for(int i=1;i<=100;i++){ cout<<"已加载%"<<i; Sleep(x); system("cls");28 行未改动 if(sum==sum7&&sum1==sum6&&sum2==sum5&&sum3==sum4){ cout<<"结束了"; Sleep(2000); system("cls"); return; return; } }}int main(){2 行未改动 cout<<"你想要我干什么?\n"; cout<<"1.计时(无尽模式)\n"; cout<<"2.计时(有尽模式)\n"; cout<<"3.打开网站\n"; cout<<"4.小游戏\n"; cout<<"4.小游戏\n"; xy=_getch(); system("cls"); if(xy=='1'){ int x1,x2,x3,x4;44 行未改动 cout<<"1.走迷宫\n"; cout<<"2.我的世界(2D版)\n"; cout<<"3.猜数\n"; cout<<"4.打字游戏\n"; cout<<"5.战斗\n"; cout<<"5.战斗\n"; cout<<"6.冒险\n"; xx=_getch(); system("cls"); if(xx=='6'){ srand(time(0)); player.level=1000100; player.level=1000100; player.maxhealth=1000100; player.health=player.maxhealth; player.maxmagic=1000100; player.magic=player.maxmagic;10 行未改动// Boss1=Boss2=Boss3=Boss4=1,shop1=shop2=shop3=1;
x="欢迎来到 冒险世界~ \( ̄▽ ̄)[▊\n\n伟大的作者大大:"; slowplay(); color(4); color(4); x="Crab_Dave"; slowplay(); color(1); x="<( ̄ˇ ̄)/\n\n版本号 2.2啦~:\n";55 行未改动 x="好吧,再见QAQ...\n"; slowplay(); x="退出中..."; slowplay(); Sleep(1000); Sleep(1000); } if(xx=='2'){ jiazai(50); gaiziti(14); //世界准备 //世界准备 system("mode con cols=160 lines=50"); srand(time(0)); HideCursor(); SetConsoleTitle("我的世界 0.8_v4"); SetConsoleTitle("我的世界 0.8_v4");cundang: cout << "minecraft: 我的世界" << endl; cout << "1 使用原先存档" << endl; cout << "2 重置新的世界" << endl; cout << "3 查看更新日志" << endl; cout << "4 新手教程("; Color(5), cout << "新人必看"; Color(0), cout << ")" << endl; cout << "5 设置" << endl; cout << "版本: 测试版0.8_v4" << endl; cout << "版本: 测试版0.8_v4" << endl; char n = input('1', '5'); if(n == '5') { cout << endl;161 行未改动全部展开 Color(6), cout << "内部版0.7pre3" << endl, Color(0); cout << "- 修改游戏名称" << endl; system("pause"); system("cls"); break; break; case '7': Color(6), cout << "内部版0.7pre4" << endl, Color(0); cout << "- 修复一些漏洞" << endl; system("pause"); system("cls"); break; break; case '8': Color(5), cout << "测试版0.7" << endl, Color(0); cout << "- 修改give命令" << endl; cout << "- 新增1个命令" << endl; cout << "- 修改主界面" << endl; cout << "- 重置存档时允许输入种子" << endl; cout << "- 修复一些漏洞" << endl; system("pause"); system("cls"); break; break; case '9': Color(5), cout << "测试版0.7a" << endl, Color(0); cout << "- 修改提升了程序的兼容性" << endl; system("pause");25 行未改动 cout << "- 全新结构:宝藏岛登场!" << endl; cout << "- 下界地形优化:不再填满方块!" << endl; cout << "- 新增多个物品、方块" << endl; cout << "- 新增等级系统" << endl; cout << "- 其它一些小改动or小优化" << endl; cout << "- 其它一些小改动or小优化" << endl; system("pause"); system("cls"); system("cls"); break; case '4': Color(6), cout << "内部版0.8pre1.1" << endl, Color(0); cout << "- 宝藏探测器的一点小更改" << endl; cout << "- 补上了0.8pre1漏掉的一个小改动" << endl; cout << "- 等级系统BUG修复" << endl; system("pause"); system("cls"); system("cls"); break; case '5': Color(6), cout << "内部版0.8pre1.2" << endl, Color(0); cout << "- 大整改!!!" << endl; cout << "- 大整改!!!" << endl; cout << "- 爆炸更新:添加了巨大的爆炸系统!" << endl; cout << "- 指令更新:增加了许多种指令!" << endl; cout << "- 伤害更新:大幅提升了高伤害时的减免!" << endl; cout << "- 经验更新:经验等级现在与生命值和挖掘速度挂钩!" << endl;22 行未改动 cout << "- 修复了死亡后重生在地底的BUG" << endl; cout << "- 新增一个修改氧气值的指令" << endl; cout << "- 更改伤害指令的死亡信息" << endl; system("pause"); system("cls"); system("cls"); break; case '9': Color(5), cout << "测试版0.8_v2" << endl, Color(0); cout << "- 灵魂地牢更新:" << endl;26 行未改动 cout << "- 改摔伤 降低了摔落伤害 同时修复了单次坠落格数过高时无法再跳跃的问题" << endl; cout << "- 修改了硬度系统 增高降低了某些方块的硬度 调高了一些镐子的挖掘速度" << endl; cout << "- 增大了海之环" << endl; system("pause"); system("cls"); system("cls"); case '3': Color(5), cout << "测试版0.8_v2.3" << endl, Color(0); cout << "- 修改宝藏岛 让它的生成变得更难" << endl; cout << "- 增加了未完成的下界要塞:生成机制重做中" << endl;65 行未改动// cout<<"是否有存档?\n";// char ooo;// cin>>ooo;// if(ooo=='y'){// ifstream fin("data.txt", ios::in); // ifstream fin("data.txt", ios::in);// for(int i=0;i<8;i++){// for(int j=0;j<a[i].size();j++){// fin>>a[i][j];// }// }// } sbsb:; cnt=0; int x=3,y=1,s=0,nn=9; cnt=0; cnt=0; while(1){// if(cnt==4){// cout<<"游戏结束!!!";// break; // } // break;// } cout<<"现在是第"<<cnt+1<<"关\n"; cout<<"共有"<<s<<"次复活机会\n"; char ch; int len=yyy[0].size();31 行未改动 if(yyy[x][y]=='T'){ cout<<"咦?这是什么?...是高等传送门!!!即将传送至一个新的迷宫世界!!!要多加小心!!!"; //system("cls"); for(int i=1;i<=10010;i++) yyy[i]=zzz[i]; } } system("cls"); }
} if(xx=='3'){ jiazai(10); t:;42 行未改动 system("cls"); } if(f==0)cout<<"恭喜通关!是否继续?(y/n)\n"; else cout<<"失败!!!是否再玩一次???\n"; system("cls"); system("cls"); int xxx; cin>>xxx; if(xxx=='y') goto rrrr; } if(xx==5){ jiazai(25); baoda(); } } } char xe; cout<<"是否重新命令我?(y/n)\n"; xe=_getch(); system("cls"); if(xe=='y'){goto d;} if(xe=='y'){goto d;} return 0;}```