版本比较
游戏
正文
增加 125 行删除 125 行
10 行未改动1112131415151617171819192021212223242425262726272829303031323233343535363738395 行未改动4546474849495051525328 行未改动82838485868687888889909191929394959693949596979899100989910010110210310310410510610726 行未改动13413513613713813813914014114114214314414414514614714814915015015115215315445 行未改动20020120220320420520420520620720820914 行未改动22422522622722822822923023123223323423523623723323423523623723823924024124224324424524624724024124224324424524624724824925025129 行未改动2812822832842852852862872882894 行未改动2942952962972982982993003013024 行未改动307308309310311311312313314315402 行未改动全部展开7187197207217227227237247257257267277287297307307317327337347357367377387387397407417417427437447457467467477487497507517527527537547557567567577587587597607617625 行未改动7687697707717727727737747757767 行未改动78478578678778878878979079179279379479579679779879879980080180225 行未改动8288298308318328328338348358362 行未改动83984084184284384384484584684717 行未改动86586686786886986987087187287311 行未改动885886887888889889890891892893104 行未改动全部展开9989991000100110021002100310041005100633 行未改动104010411042104310441044104510461047104845 行未改动1094109510961097109810981099110011011102232 行未改动全部展开133513361337133813391339134013411342134313441344134513461347134813491350135113521352135313541355135613561357135813591359136013611362136327 行未改动139113921393139413951395139613971398139947 行未改动14471448144914501451145114521453145314541455145614576 行未改动14641465146614671468146814691470147114725 行未改动14781479148014811482148214831484148514864 行未改动14911492149314941495149514961497149814991500150115011502150315041505647 行未改动全部展开2153215421552156215721572158215921602161306 行未改动全部展开2468246924702471247224722473247424752476456 行未改动全部展开29332934293529362937293729382939294029413 行未改动29452946294729482949294929502951295229538 行未改动29622963296429652966296629672968296929702971297129722973297429752976297729772978297929802981298229832984298429852986298729882989299029912990299129922993299429952995299629972998299954 行未改动305430553056305730583058305930603061306228 行未改动309130923093309430953095309630973098309950 行未改动3150315131523153315431543155315631573158315931603161316231623163316431653165316631673168316831693170317131723173317431753176317631773178317831793180318131823182318331843185318631873188318931903190319131923192319331943195319610 行未改动32073208320932103211321132123213321432153216321732183219321932203221322232233224322532263226322732283229322932303231323232332 行未改动323632373238323932403240324132423243324420 行未改动326532663267326832693269327032713272327347 行未改动332133223323332433253325332633273328332933303330333133323333333482 行未改动341734183419342034213421342234233424342587 行未改动351335143515351635173517351835193520352187 行未改动360936103611361236133613361436153616361743 行未改动3661366236633664366536653666366736683669269 行未改动全部展开393939403941394239433943394439453946394746 行未改动399439953996399739983998399940004001400227 行未改动4030403140324033403440344035403640374038403840394040404140424043404440454046404740474048404940504051132 行未改动全部展开418441854186418741884188418941904191419241934194419441954196419741984199420042014202420342044204420542064207420825 行未改动42344235423642374238423842394240424042414242424342444245424642474248424842494250425142524252425342544255425622 行未改动427942804281428242834283428442854286428726 行未改动431443154316431743184318431943204321432216 行未改动4339434043414342434343434344434510 行未改动}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;}```