版本比较
yx
正文
增加 125 行删除 125 行
9 行未改动1011121314141516161718181920202122232324252625262728292930313132333434353637385 行未改动4445464748484950515228 行未改动818283848585868787888990909192939495929394959697989997989910010110210210310410510626 行未改动13313413513613713713813914014014114214314314414514614714814914915015115215345 行未改动19920020120220320420320420520620720814 行未改动22322422522622722722822923023123223323423523623223323423523623723823924024124224324424524623924024124224324424524624724824925029 行未改动2802812822832842842852862872884 行未改动2932942952962972972982993003014 行未改动306307308309310310311312313314402 行未改动全部展开7177187197207217217227237247247257267277287297297307317327337347357367377377387397407407417427437447457457467477487497507517517527537547557557567577577587597607615 行未改动7677687697707717717727737747757 行未改动78378478578678778778878979079179279379479579679779779879980080125 行未改动8278288298308318318328338348352 行未改动83883984084184284284384484584617 行未改动86486586686786886886987087187211 行未改动884885886887888888889890891892104 行未改动全部展开997998999100010011001100210031004100533 行未改动103910401041104210431043104410451046104745 行未改动1093109410951096109710971098109911001101232 行未改动全部展开133413351336133713381338133913401341134213431343134413451346134713481349135013511351135213531354135513551356135713581358135913601361136227 行未改动139013911392139313941394139513961397139847 行未改动14461447144814491450145014511452145214531454145514566 行未改动14631464146514661467146714681469147014715 行未改动14771478147914801481148114821483148414854 行未改动14901491149214931494149414951496149714981499150015001501150215031504647 行未改动全部展开2152215321542155215621562157215821592160306 行未改动全部展开2467246824692470247124712472247324742475456 行未改动全部展开29322933293429352936293629372938293929403 行未改动29442945294629472948294829492950295129528 行未改动29612962296329642965296529662967296829692970297029712972297329742975297629762977297829792980298129822983298329842985298629872988298929902989299029912992299329942994299529962997299854 行未改动305330543055305630573057305830593060306128 行未改动309030913092309330943094309530963097309850 行未改动3149315031513152315331533154315531563157315831593160316131613162316331643164316531663167316731683169317031713172317331743175317531763177317731783179318031813181318231833184318531863187318831893189319031913191319231933194319510 行未改动32063207320832093210321032113212321332143215321632173218321832193220322132223223322432253225322632273228322832293230323132322 行未改动323532363237323832393239324032413242324320 行未改动326432653266326732683268326932703271327247 行未改动332033213322332333243324332533263327332833293329333033313332333382 行未改动341634173418341934203420342134223423342487 行未改动351235133514351535163516351735183519352087 行未改动360836093610361136123612361336143615361643 行未改动3660366136623663366436643665366636673668269 行未改动全部展开393839393940394139423942394339443945394646 行未改动399339943995399639973997399839994000400127 行未改动4029403040314032403340334034403540364037403740384039404040414042404340444045404640464047404840494050132 行未改动全部展开418341844185418641874187418841894190419141924193419341944195419641974198419942004201420242034203420442054206420725 行未改动42334234423542364237423742384239423942404241424242434244424542464247424742484249425042514251425242534254425522 行未改动427842794280428142824282428342844285428626 行未改动431343144315431643174317431843194320432116 行未改动43384339434043414342434243439 行未改动}Frame;
void Color(int a){ //白 //白 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 == -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, 250, 1, "石头", false}, {2, "▓ ", 7, 75, 0, "泥土", false}, {3, "▓ ", 6, 75, 0, "砂砾", false}, {0, "□", 0, 2000000000, 100, "基岩", false},{1, "■", 6, 250, 1, "石头", false},{2, "▓ ", 7, 75, 0, "泥土", false},{3, "▓ ", 6, 75, 0, "砂砾", false},{4, "■", 5, 80, 0, "木头", false},{5, "※", 0, 500, 2, "铁矿石", false}, {6, "∷", 0, 500, 2, "铁块", false}, {7, "※", 5, 600, 3, "金矿石", false}, {5, "※", 0, 500, 2, "铁矿石", false},{6, "∷", 0, 500, 2, "铁块", false},{7, "※", 5, 600, 3, "金矿石", false},{8, "∷", 5, 600, 3, "金块", false},{9, "※", 3, 900, 3, "钻石矿石", false},{10, "∷", 3, 900, 3, "钻石块", false}, {10, "∷", 3, 900, 3, "钻石块", false},{11, "▓ ", 1, 20, 0, "树叶", false},{12, "■", 3, 2000000000, 100, "水", true},{13, "□", 2, 2000000000, 100, "岩浆", true},{14, "□", 0, 2000, 4, "真正的基岩", false},26 行未改动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, 20, 1, "木镐", 0},{2, 5, 0, 1, "木剑", 0},{3, 3, 40, 2, "石镐", 0},{4, 6, 0, 2, "石剑", 0}, {4, 6, 0, 2, "石剑", 0},{5, 0, 0, 0, "铁锭", 0},{6, 4, 80, 3, "铁镐", 0},{7, 9, 0, 3, "铁剑", 0},{8, 0, 0, 0, "金锭", 1},45 行未改动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[] = //效果{14 行未改动"获得护盾 每级提升1点免伤值","负面效果 每级每个构造刻受到1点伤害"};
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]; //物品栏ARMOR kjl = armor[0]; //盔甲栏 做出盔甲立即替换 const int xgmax = 5; //可获得的效果总数 BUFF xgl[xgmax]; //效果栏 int xgnum; //已拥有BUFF int fknum[5], wpnum[5]; //数量(max:64) 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; //冒险者 坐标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是否受伤 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是否受伤
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},402 行未改动全部展开 } }}
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;}232 行未改动全部展开 } }}
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++) {47 行未改动 fin >> gamemode; fin >> level >> xp >> max_health;}
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++)5 行未改动 fout << gamemode << endl; fout << level << endl << xp << endl << max_health << 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') {456 行未改动全部展开 system("cls"); while(1) { Sleep(100); //时刻流逝 //时刻流逝 short_tick++; if(short_tick == 10) { short_tick = 0;3 行未改动 if(zhongdulevel > 0) attack(zhongdulevel, "玩家中毒而死"); } if(jianweitishi) jianweitishi--; if(wajuetishi) wajuetishi--; //处理药水效果 //处理药水效果 buff_merge(); buff_live();
//处理生命溢出8 行未改动 { i++; xp -= 100 + (level + 1) * 10; level++; if(level % 2 == 0) max_health++; //每两级加一滴血 if(level % 2 == 0) max_health++; //每两级加一滴血 }
SetPos(0, 0); cout << "世界与我 Craft And My"; 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(69, 2); //输出玩家坐标 for(int i = 2;i <= kjl.defease;i += 2) cout << "▼"; //盔甲 SetPos(69, 2); //输出玩家坐标 cout << "X:" << playerx; SetPos(69, 4); cout << "Y:" << playery; for(int i = 0;i < 5;i++) //打印物品栏 方块栏 for(int i = 0;i < 5;i++) //打印物品栏 方块栏 { SetPos(69, 6 + i * 2); if(now == i) Color(5); else if(wajuetishi) Color(2);54 行未改动 cout << "S键保存当前存档"; if(gamemode == 0 || gamemode == 2) { SetPos(0, 28); cout << "Q键摧毁手持物品"; cout << "Q键摧毁手持物品"; } else { SetPos(0, 28);28 行未改动 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>";50 行未改动 { health++; if(health > the_mx) health = the_mx; } //重力下落 //重力下落 if(zhuiluo < 4 && (tick * 10 + short_tick) % 3 == 0) { if(world[playerx][playery - 1].fluid) { playery--; zhuiluo++; } else //落地 else //落地 { if(zhuiluo > 9) attack((zhuiluo - 9), "玩家摔死了");//摔落伤害 zhuiluo = 0; zhuiluo = 0; } } //快速下落 //快速下落 else if(zhuiluo >= 4 && zhuiluo < 8 && short_tick % 2 == 0) { if(world[playerx][playery - 1].fluid) { playery--; zhuiluo++; } else //落地 else //落地 { if(zhuiluo > 9) attack((zhuiluo - 9), "玩家摔死了"); //摔落伤害 if(zhuiluo > 9) attack((zhuiluo - 9), "玩家摔死了"); //摔落伤害 zhuiluo = 0; } } //危险下落 //危险下落 else if(zhuiluo >= 8 && short_tick % 3 <= 1) { if(world[playerx][playery - 1].fluid) { playery--; zhuiluo++; } else //落地 else //落地 { if(zhuiluo > 9) attack(sqrt(zhuiluo - 9), "玩家摔死了"); //摔落伤害 if(zhuiluo > 9) attack(sqrt(zhuiluo - 9), "玩家摔死了"); //摔落伤害 zhuiluo = 0; } } //岩浆10 行未改动 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++;2 行未改动 else energy = 0; if(energy < 0) energy = 0; } char x; if(_kbhit()) //按键点击 if(_kbhit()) //按键点击 { x = _getch(); if(x == 'a') {20 行未改动 { now = x - '0'; wjjd = 0; } else if(x == 'i') //挖掘上方方块/放置方块在上方 else if(x == 'i') //挖掘上方方块/放置方块在上方 { //桶的收集判定 if(now >= 5 && wpl[now - 5].id == 18) {47 行未改动 block_copy(playerx, playery + 1, 32); Sleep(1000); bomb(playerx, playery + 1, 4); } //其它判定 //其它判定 if(world[playerx][playery + 1].fluid && now <= 4) { wajuetishi = 20; if(fknum[now] > 0 && fkl[now].id != 0) { { block_copy(playerx, playery + 1, fkl[now].id); block_delete(fkl[now]); } }82 行未改动 block_copy(playerx, playery - 1, 32); Sleep(1000); bomb(playerx, playery - 1, 4); } //其它判定 //其它判定 if(world[playerx][playery - 1].fluid && now <= 4) { wajuetishi = 20; if(fknum[now] > 0 && fkl[now].id != 0)87 行未改动 block_copy(playerx - 1, playery, 32); Sleep(1000); bomb(playerx - 1, playery, 4); } //其它判定 //其它判定 if(world[playerx - 1][playery].fluid && now <= 4) { wajuetishi = 20; if(fknum[now] > 0 && fkl[now].id != 0)87 行未改动 block_copy(playerx + 1, playery, 32); Sleep(1000); bomb(playerx + 1, playery, 4); } //其它判定 //其它判定 if(world[playerx + 1][playery].fluid && now <= 4) { wajuetishi = 20; if(fknum[now] > 0 && fkl[now].id != 0)43 行未改动 print_data(); } else if(x == 'q') { if(gamemode == 1) item_choose(); //创造物品选择器 if(gamemode == 1) item_choose(); //创造物品选择器 else if(now >= 4) wpnum[now - 5]--; } else if(x == 'z') {269 行未改动全部展开 SetPos(2, 8); cout << "现在向左移动"; x = input('a', 'a'); SetPos(44, 6); Color(5), cout << "d"; Color(5), cout << "d"; SetPos(2, 8); cout << "现在向右移动"; x = input('d', 'd'); SetPos(2, 8);46 行未改动 Color(cnt[2]), cout << "l"; SetPos(62, 8); Color(cnt[3]), cout << "k"; char y = ' '; if(_kbhit()) y = input(); if(_kbhit()) y = input(); if(y == 'i') cnt[0] = max(cnt[0] - 1, 0); if(y == 'j') cnt[1] = max(cnt[1] - 1, 0); if(y == 'l') cnt[2] = max(cnt[2] - 1, 0); if(y == 'k') cnt[3] = max(cnt[3] - 1, 0);27 行未改动}
int main(){ //世界准备 //世界准备 system("mode con cols=130 lines=35"); srand(time(0)); HideCursor(); SetConsoleTitle("世界与我 0.8_v2.3"); SetConsoleTitle("世界与我 0.8_v2.3");cundang: cout << "Craft and My: 世界与我" << endl; cout << "1 使用原先存档" << endl; cout << "2 重置新的世界" << endl; cout << "3 查看更新日志" << endl; cout << "4 新手教程("; Color(5), cout << "新人必看"; Color(0), cout << ")" << endl; cout << "版本: 测试版0.8_v2.3" << endl; cout << "版本: 测试版0.8_v2.3" << endl; char n = input('1', '4'); if(n == '1') input_data(); else if(n == '2') {132 行未改动全部展开 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;16 行未改动 system("cls"); jiaocheng(); } minecraft(); return 0; return 0;}