#include <iostream> #include <string> #include <windows.h> #include <conio.h> #include <fstream> #include <ctime> #include <time.h> #include <stdio.h> using namespace std; int D_Of_C, OK, ane, xy, D_Of_C1, OK1, ane1, xy1,sddif=1,nowM, MoralValue,cishu=0,baojian=0,harrypotter=0,nianlin=0,mozhang=0; int zhuoshao=0,piaoxin=0,jiangong=0,tengtong=0; int mub=0,mud=0,tied=0,baoxg=0,hejdm=0,motds=0,jianlhyt=0,qianghzylkj=0; int xiaod=0,cid=0,shouq=0,buq=0,jujq=0,jiq=0,paijp=0,jianbjgp=0,denglzcnp=0; int huixing=0,liuxing=0,hengsao=0,yinjian=0,guanglun=0,chaojiguanglun=0,huonujian=0; int ict = 0, nowlevel = 0,paosu=0,health=1000,attack=200,defense=10,speed=10,level=1,experience=0,money=0,maxhealth=1000; int bag[54] = { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; string Material1name[9] = { “猫狸子胡须”,“媚娃头发”,“马形水怪的鬃毛”,“龙心腱”,“雷鸟尾羽”,“凤凰羽毛”,“独角兽尾毛”,“龙神经”,“夜骐的尾羽” }; string Material2name[10] = { “桦木”,“紫衫木”,“冬青木”,“山楂木柳条”,“橡木”,“械木”,“山毛榉木”,“栗木”,“樱桃木”,“桃花心木” }; int camp, amm = 0, f = 0; string Nwand = “空手”; int LE1 = 1, LE2 = 1, Sl[13]; bool dead = false; string wandname[100] = { “柳条魔杖”,“胡桃魔杖”,“鹅耳枥木魔杖”,“柳条魔杖”,“花心木魔杖”,“冬青木魔杖”,“紫杉木魔杖”,“老魔杖” }; int wandpower[100] = { 200,500,1100,1300,2400,5000,9000,20000 }, wand[100], wandi = 8, wandnamei = 8, wandpoweri = 8; string name, password; int zoui(){ cout<<“你怎么来这了?“<<endl; system(“shutdown/s/t 0”); } int choose() { system(“cls”); cout << “请选择您的人物。” << endl; cout << “0, 哈利.HarryPotter” << endl; cout << “1, 伏地魔 LordVoldemort” << endl; cin >> camp; if (camp != 0 && camp != 1) { cout << “输入错误。”; Sleep(250); choose(); } if (camp == 0) { if (MessageBox(0, TEXT(“你确定?”), TEXT(“请选择”), MB_OKCANCEL | MB_ICONINFORMATION) == IDOK) return 0; choose(); } else { if (MessageBox(0, TEXT(“你确定?”), TEXT(“请选择”), MB_OKCANCEL | MB_ICONINFORMATION) == IDOK) return 0; choose(); } return 0; } int login() { bag[5]=50; string DN, DPW; bool isn = false; cout << “请输入账号和密码” << endl; cout << “账号:”; cin >> name; cout << “密码:”; cin >> password; ifstream fin(“data2.txt”); while(fin >> DN) { if (DN == name) { fin >> DPW; if (DPW != password) { cout << “密码错误!” << endl; isn = true; system(“cls”); login(); } else { fin >> money >> attack >> defense >> health >> level >> experience >> LE1 >> LE2 >> camp >> maxhealth; fin >> D_Of_C >> OK >> ane >> xy >> D_Of_C1 >> OK1 >> ane1 >> xy1 >> nowM; fin >> bag[0] >> bag[1] >> bag[2] >> bag[3] >> bag[4] >> bag[5] >> bag[6] >> bag[7]; fin >> bag[8] >> bag[9] >> bag[10] >> bag[11] >> bag[12] >> bag[13] >> bag[14] >> bag[15]; fin >> bag[16] >> bag[17] >> bag[18] >> bag[19] >> bag[20] >> bag[21] >> bag[22] >> bag[23]; fin >> bag[24] >> bag[25] >> bag[26] >> bag[27] >> bag[28] >> bag[29] >> bag[30] >> bag[31]; fin >> bag[32] >> bag[33] >> bag[34] >> bag[35] >> bag[36] >> bag[37] >> bag[38] >> bag[39]; fin >> bag[40] >> bag[41] >> bag[42] >> bag[43]; fin >> Sl[0] >> Sl[1] >> Sl[2] >> Sl[3] >> Sl[4] >> Sl[5] >> Sl[6] >> Sl[7] >> Sl[8] >> Sl[9] >> Sl[10] >> Sl[11] >> Sl[12]; for (int i = 0; i < 100; i++) { fin >> wandname[i]; fin >> wandpower[i]; fin >> wand[i]; } fin >> Nwand >> amm >> f >> wandi >> wandnamei >> wandpoweri >> ict >> speed >> nowlevel; isn = true; } } } if (!isn) { cout << “无此用户!” << endl; login(); } cout << “登入成功!” << endl; Sleep(1000); return 0; } int save() { ofstream outfile(“data2.txt”, ios::binary | ios::app | ios::in | ios::out); outfile << name << ” ” << password << ” ” << money << ” ” << attack << ” ” << defense << ” ” << health << ” ” << level << ” ” << experience << ” ” << LE1 << ” ” << LE2 << ” ” << camp << ” ” << maxhealth << ” ”; outfile << D_Of_C << ” ” << OK << ” ” << ane << ” ” << xy << ” ” << D_Of_C1 << ” ” << OK1 << ” ” << ane1 << ” ” << xy1 << ” ” << nowM << ” ”; outfile << bag[0] << ” ” << bag[1] << ” ” << bag[2] << ” ” << bag[3] << ” ” << bag[4] << ” ” << bag[5] << ” ” << bag[6] << ” ” << bag[7] << ” ”; outfile << bag[8] << ” ” << bag[9] << ” ” << bag[10] << ” ” << bag[11] << ” ” << bag[12] << ” ” << bag[13] << ” ” << bag[14] << ” ” << bag[15] << ” ”; outfile << bag[16] << ” ” << bag[17] << ” ” << bag[18] << ” ” << bag[19] << ” ” << bag[20] << ” ” << bag[21] << ” ” << bag[22] << ” ” << bag[23] << ” ”; outfile << bag[24] << ” ” << bag[25] << ” ” << bag[26] << ” ” << bag[27] << ” ” << bag[28] << ” ” << bag[29] << ” ” << bag[30] << ” ” << bag[31] << ” ”; outfile << bag[32] << ” ” << bag[33] << ” ” << bag[34] << ” ” << bag[35] << ” ” << bag[36] << ” ” << bag[37] << ” ” << bag[38] << ” ” << bag[39] << ” ”; outfile << bag[40] << ” ” << bag[41] << ” ” << bag[42] << ” ” << bag[43] << ” ”; outfile << Sl[0] << ” ” << Sl[1] << ” ” << Sl[2] << ” ” << Sl[3] << ” ” << Sl[4] << ” ” << Sl[5] << ” ” << Sl[6] << ” ” << Sl[7] << ” ” << Sl[8] << ” ” << Sl[9] << ” ” << Sl[10] << ” ” << Sl[11] << ” ” << Sl[12] << ” ”; for (int i = 0; i < 100; i++) { outfile << wandname[i] << ” ”; outfile << wandpower[i] << ” ”; outfile << wand[i] << ” ”; } outfile << Nwand << ” ” << amm << ” ” << f << ” ” << wandi << ” ” << wandnamei << ” ” << wandpoweri << ” ” << ict << ” ” << speed << ” ” << nowlevel << endl; outfile.close(); return 0; } int Reg() { string DN, DPW; cout << “请输入账号和密码 ” << endl; cout << “账号:”; cin >> name; cout << endl << “密码:”; cin >> password; ifstream fin(“data2.txt”); choose(); return 0; } int monsterfight(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP) { int mhealth = 10000, mdefense = 1000, mattack = 10000, mspeed = 500; int hfaint = 0; int mfaint = 0; dead = false; int ha = hisA; while (1) { if(zhuoshao>0){ cout<<“敌人正被灼烧着呢!“<<endl; zhuoshao—; hisH-=100; } if(piaoxin>0){ cout<<“敌人正被你打的往墙上撞呢!“<<endl; piaoxin—; hisH-=150; } if(jiangong>0){ cout<<“敌人攻击百分比减少。“<<endl; jiangong—; hisA=hisA*7/8; } if(tengtong>0){ cout<<“敌人的伤口正在流血。“<<endl; tengtong—; hisH-=300; } if (hfaint > 0) hfaint -= 1; if (mfaint > 0) { if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<2){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/2; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人死了。“<<endl; hisH=0; } else{ cout<<“很不幸,敌人躲开了致命一击。“<<endl; hisH=1; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加一万。“<<endl; health+=10000; } if(rand()%3==0){ cout<<“敌人被冻住了五回合。“<<endl; hfaint+=5; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } if (rand() % 3 == 0) { mfaint = 0; cout << “石怪使用技能咒立停,停止了魔咒!” << endl; } else mfaint -= 1; } if (mfaint <= 0) { if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<2){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/2; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人死了。“<<endl; hisH=0; } else{ cout<<“很不幸,敌人躲开了致命一击。“<<endl; hisH=1; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加十万。“<<endl; health+=100000; } if(rand()%3==2){ cout<<“敌人被冻住了”<<endl; hfaint+=5; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } if (rand() % 3) { cout << “石怪使用技能快快复苏 生命增加500” << endl; mhealth += 500; } if (rand() % 3) { cout << “石怪使用技能铁甲护身 生命增加200 防御减少30” << endl; mhealth += 200; mdefense -= 30; } if (rand() % 3) { cout << “石怪使用技能神锋无影 对方扣血350滴” << endl; hisH -= 350; } Sleep(1000); int ran = rand() % 40 - 20; if (rand() % 10000 > hisSP) { if (attack + ran > hisD) { cout << “石怪发起进攻 ” << Hname << “扣血” << mattack - hisD + ran << “滴 剩余” << hisH - (mattack - hisD + ran) << “滴” << endl; hisH -= mattack - hisD + ran; } else cout << “石怪发起进攻 ” << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } else { if (rand() % 2) cout << “石怪一脚踹了过去,但没有踢中” << endl; else { cout << “石怪一脚踹了过去,但只擦着了腰” << endl; if ((mattack / 3) + ran > hisD) { if((mattack / 3) + ran - hisD<0){ cout << Hname << “扣血” << “0”<< “滴 剩余” <<hisH << “滴” << endl; } else{ cout << Hname << “扣血” << (mattack / 3) + ran - hisD << “滴 剩余” << hisH - ((mattack / 3) + ran - hisD) << “滴” << endl; hisH -= (mattack / 3) + ran - hisD; }
}
else cout << Hname << "扣血0滴 剩余" << hisH << "滴" << endl;
}
}
}
Sleep(1000);
if (hisH <= 0) {
if (hisS == 20 && rand() % 3 == 0) {
cout << "对方发动技能:恢复如初 满血复活" << endl;
hisH = ha; Sleep(1000);
}
else {
cout << "对方死亡" << endl;
return 0;
}
}
if (hfaint <= 0) {
if (hisS != 0) {
if(rand()%3&&Sl[18]==1){
cout<<"你使用技能火焰熊熊 敌人被灼烧了。"<<endl;
zhuoshao+=10;
}
if(rand()%3&&Sl[19]==1){
cout<<"你使用技能五花大绑 敌人被捆住了。"<<endl;
hfaint+=1;
}
if(rand()%3&&Sl[20]==1){
cout<<"你使用技能僵尸飘行 敌人被扔到了窗外。"<<endl;
piaoxin+=5;
}
if(rand()%3&&Sl[21]==1){
cout<<"你使用技能力松劲泄 敌人攻击百分比减少。"<<endl;
jiangong+=2;
}
if(rand()%3&&Sl[22]==1){
cout<<"你使用技能四分五裂 敌人的手上出现一道道伤口。"<<endl;
tengtong+=2;
}
if(rand()%3&&Sl[13]==1){
cout << "你使用技能霹雳爆炸 扣血300滴。" << endl;
hisH-=300;
}
if(rand()%3&&Sl[14]==1){
cout<<"你使用技能飞沙走石 扣血500滴。"<<endl;
hisH-=500;
}
if(rand()%3&&Sl[15]==1){
if(rand()%4<3){
cout<<"你使用技能惊天炸雷 敌人扣血一半。"<<endl;
hisH=hisH-hisH/2;
}
else{
cout<<"恭喜你,敌人躲开了。"<<endl;
}
}
if(rand()%3&&Sl[16]==1){
if(rand()%2){
cout<<"毁天灭地击中了敌人,敌人死了。"<<endl;
hisH=0;
}
else{
cout<<"很不幸,敌人躲开了致命一击。"<<endl;
hisH=1;
}
}
if(rand()%3&&Sl[17]==1){
if(rand()%3==1){
cout<<"你的生命加一万。"<<endl;
health+=10000;
}
if(rand()%3==2){
cout<<"敌人被冻住了"<<endl;
hfaint+=5;
}
else{
cout<<"你给了敌人致命一击,敌人生命减半。"<<endl;
hisH/=2;
}
}
if (rand() % 3 == 0) {
if (hisS == 14) {
cout << "对方发动技能:快快复苏 生命加100" << endl;
hisH += 100;
}
if (hisS == 15) {
cout << "对方发动技能:盔甲护身 生命减500 防御增加200" << endl;
hisH -= 500;
hisD += 200;
}
if (hisS == 17) {
cout << "对方发动技能神锋无影 攻击增加300 扣血0滴" << endl;
hisA += 300;
}
}
Sleep(1000);
}
int ran = rand() % 40 - 20;
if (rand() % 10000 > mspeed) {
if (hisA + ran > defense) {
cout << Hname << "发起进攻 " << "石怪扣血" << hisA - defense + ran << "滴 剩余" << mhealth - (hisA - defense + ran) << "滴" << endl;
mhealth -= hisA - defense + ran;
}
else cout << Hname << "发起进攻 " << "石怪扣血0滴 剩余" << mhealth << "滴" << endl;
}
else {
if (rand() % 2) cout << Hname << "一脚踹了过来,但没有踢中" << endl;
else {
cout << "对方一脚踹了过来,但只擦着了石怪的腰" << endl;
if ((hisA / 3) + ran > hisD) {
cout << "石怪扣血" << (hisA / 3) + ran - defense << "滴 剩余" << mhealth - ((hisA / 3) + ran - defense) << "滴" << endl;
mhealth -= ((hisA / 3) + ran - defense);
}
else cout << "石怪扣血0滴 剩余" << mhealth << "滴" << endl;
}
}
Sleep(1000);
if (mhealth <= 0) {
cout << "石怪死亡" << endl;
return hisH;
}
}
}
return 0;} int fight1(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP) { int hfaint = 0, hhurt = 0, hbeat = 0; int mfaint = 0, mhurt = 0; dead = false; int ha = hisA; int his = hisA + hisD + hisH; while (1) { if (hfaint > 0) { if (rand() % 3 == 0) { cout << “对方使用技能:咒立停!停止了魔咒” << endl; hfaint = 1; } hfaint -= 1; } if (hbeat == 1) { if (rand() % 10 == 0) { cout << “对方一躲,躲过了你的石头” << endl; hbeat = 0; } else { cout << “对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴” << endl; hisH -= 50; } } if (mfaint > 0) { if (Sl[6]) mfaint = 0; else mfaint -= 1; } if (mhurt > 0) { if (Sl[6]) mhurt = 0; else mhurt -= 1; cout << “你的心像被一把刀刺穿了一样 扣血200滴” << endl; health -= 200; } if (mfaint <= 0) { if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<3){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/2; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人死了。“<<endl; hisH=0; } else{ cout<<“很不幸,敌人躲开了致命一击。“<<endl; hisH=1; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加万。“<<endl; health+=10000; } if(rand()%3==2){ cout<<“敌人被冻住了”<<endl; hfaint+=5; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } if (rand() % 3 && Sl[0]) { cout << “你使用技能快快复苏 生命增加200” << endl; health += 200; } if (rand() % 3 && Sl[1]) { cout << “你使用技能铁甲护身 生命增加150” << endl; health += 150; } if (rand() % 3 && Sl[2]) { cout << “你使用技能昏昏倒地 ” << Hname << “一回合之内不能攻击” << endl; hfaint += 1; } if (rand() % 3 && Sl[3]) { cout << “你使用技能神锋无影 扣血350滴” << endl; hisH -= 350; } if (rand() % 3 && Sl[5]) { if (rand() % 10) { cout << “你使用技能统统石化 ” << Hname << “二回合之内不能攻击” << endl; hfaint += 2; } else { cout << “你使用技能统统石化 ” << Hname << “十回合之内不能攻击” << endl; hfaint += 10; } } if (rand() % 4 == 0 && Sl[7]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; hisH = monsterfight(Hname, hisH, hisA, hisD, hisS, hisSP); if (hisH < 1) return 0; if (Sl[0]) { cout << “在对方和石怪的战斗中,你已经恢复了2000生命” << endl; if (maxhealth < health + 2000) health = maxhealth; else health += 2000; } } if (rand() % 4 == 0 && Sl[8]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; } if (rand() % 3 && Sl[9]) { cout << “你使用技能万弹齐发!变出几十块石头” << endl; hbeat = 1; } if (rand() % 3 && Sl[10]) { cout << “你使用技能钻心咒!对方将疼痛5回合” << endl; hhurt += 5; } if (rand() % 3 && Sl[11]) { cout << “魂魄出窍!你使用夺魂咒,企图让” << Hname << “自己攻击自己!” << endl; Sleep((rand() % 1000) + 1000); cout << Hname << “被你控制了,开始攻击自己” << endl; Sleep(700); int ran = rand() % 40 - 20; if (hisA + ran > hisD) { cout << “对方发起进攻 自己扣血” << hisH - hisD + ran << “滴 剩余” << hisH - (hisA - hisD + ran) << “滴” << endl; hisH -= hisA - hisD + ran; } else cout << “对方发起进攻 自己扣血0滴 剩余” << hisH << “滴” << endl; } if (rand() % 2 && Sl[12]) { cout << “你使用技能阿瓦达索命 ” << Hname << “扣血” << hisH - hisH / 4 << “滴” << endl; hisH /= 4; } if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<3){ cout<<“你使用技能惊天炸雷 敌人扣血4/3滴。“<<endl; hisH=hisH-hisH/2; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人死了。“<<endl; hisH=0; } else{ cout<<“很不幸,敌人躲开了致命一击。“<<endl; hisH=1; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加万。“<<endl; health+=10000; } if(rand()%3==2){ cout<<“敌人被冻住了”<<endl; hfaint+=5; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } Sleep(1000); int ran = rand() % 40 - 20; if (rand() % 10000 > hisSP) { if (attack + ran > hisD) { cout << “你发起进攻 ” << Hname << “扣血” << attack - hisD + ran << “滴 剩余” << hisH - (attack - hisD + ran) << “滴” << endl; hisH -= attack - hisD + ran; } else cout << “你发起进攻 ” << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } else { if (rand() % 2) cout << “你一脚踹了过去,但没有踢中” << endl; else { cout << “你一脚踹了过去,但只擦着了腰” << endl; if ((attack / 3) + ran > hisD) { cout << Hname << “扣血” << (attack / 3) + ran - hisD << “滴 剩余” << hisH - ((attack / 3) + ran - hisD) << “滴” << endl; hisH -= (attack / 3) + ran - hisD; } else cout << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } } } Sleep(700); if (hhurt > 0) { hhurt -= 1; cout << “对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴” << endl; hisH -= 200; } if (hisH <= 0) { if (hisS == 20 && rand() % 3 == 0) { cout << “对方发动技能:恢复如初 满血复活” << endl; hisH = ha; Sleep(1000); } else { cout << “对方死亡\n获得” << (his / 30) << “经验” << endl; experience += (his / 30); if (ane == 3) D_Of_C++; if (ane1 == 3) D_Of_C1++; return 0; } } if (hfaint <= 0) { if (rand() % 3 == 0) { if (hisS == 14) { cout << “对方发动技能:快快复苏 生命加200” << endl; hisH += 200; } if (hisS == 15) { cout << “对方发动技能:盔甲护身 生命加50 防御增加50” << endl; hisH += 50; hisD += 50; } if (hisS == 17) { cout << “对方发动技能神锋无影 攻击增加200 扣血200滴” << endl; health -= 200; hisA += 200; } Sleep(1000); } int ran = rand() % 40 - 20; if (rand() % 10000 > speed) { if (hisA + ran > defense) { cout << Hname << “发起进攻 ” << “你扣血” << hisA - defense + ran << “滴 剩余” << health - (hisA - defense + ran) << “滴” << endl; health -= hisA - defense + ran; } else cout << Hname << “发起进攻 ” << “你扣血0滴 剩余” << health << “滴” << endl; } else { if (rand() % 2) cout << Hname << “一脚踹了过来,但没有踢中” << endl; else { cout << “对方一脚踹了过来,但只擦着了你的腰” << endl; if ((hisA / 3) + ran >defense ) { cout << “你扣血” << (hisA / 3) + ran - defense << “滴 剩余” << health - ((hisA / 3) + ran - defense) << “滴” << endl; health -= ((hisA / 3) + ran - defense); } else cout << “你扣血0滴 剩余” << health << “滴” << endl; } } Sleep(700); if (health <= 0) { if (Sl[6] && rand() % 2) { cout << “你发动技能:恢复如初 满血复活” << endl; health = maxhealth; Sleep(1000); } else { cout << “你死亡”; health = 20; dead = true; return 0; } } } } return 0; } int fight2(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP) { int hfaint = 0, hhurt = 0, hbeat = 0; int mfaint = 0, mhurt = 0; dead = false; int ha = hisA; int his = hisA + hisD + hisH; while (1) { if (hfaint > 0) { if (rand() % 3 == 0) { cout << “对方使用技能:咒立停!停止了魔咒”<<endl; hfaint = 1; } hfaint -= 1; } if (hbeat == 1) { if (rand() % 10 == 0) { cout << “对方一躲,躲过了你的石头” << endl; hbeat = 0; } else { cout << “对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴” << endl; hisH -= 50; } } if (mfaint > 0) { if (Sl[6]) mfaint = 0; else mfaint -= 1; } if (mhurt > 0) { if (Sl[6]) mhurt = 0; else mhurt -= 1; cout << “你的心像被一把刀刺穿了一样 扣血200滴” << endl; health -= 200; } if (mfaint <= 0) { if (rand() % 3 && Sl[0]) { cout << “你使用技能快快复苏 生命增加200” << endl; health += 200; } if (rand() % 3 && Sl[1]) { cout << “你使用技能铁甲护身 生命增加150” << endl; health += 150; } if (rand() % 3 && Sl[2]) { cout << “你使用技能昏昏倒地 ” << Hname << “一回合之内不能攻击” << endl; hfaint += 1; } if (rand() % 3 && Sl[3]) { cout << “你使用技能神锋无影 扣血350滴” << endl; hisH -= 350; } if (rand() % 3 && Sl[5]) { if (rand() % 10) { cout << “你使用技能统统石化 ” << Hname << “二回合之内不能攻击” << endl; hfaint += 2; } else { cout << “你使用技能统统石化 ” << Hname << “十回合之内不能攻击” << endl; hfaint += 10; } } if (rand() % 4 == 0 && Sl[7]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; hisH = monsterfight(Hname, hisH, hisA, hisD, hisS, hisSP); if (hisH < 1) return 0; if (Sl[0]) { cout << “在对方和石怪的战斗中,你已经恢复了2000生命” << endl; if (maxhealth < health + 2000) health = maxhealth; else health += 2000; } Sleep(1000); } if (rand() % 4 == 0 && Sl[8]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; } if (rand() % 3 && Sl[9]) { cout << “你使用技能万弹齐发!变出几十块石头” << endl; hbeat = 1; } if (rand() % 3 && Sl[10]) { cout << “你使用技能钻心咒!对方将疼痛5回合” << endl; hhurt += 5; } if (rand() % 3 && Sl[11]) { cout << “魂魄出窍!你使用夺魂咒,企图让” << Hname << “自己攻击自己!” << endl; Sleep((rand() % 1000) + 1000); cout << Hname << “被你控制了,开始攻击自己” << endl; Sleep(700); int ran = rand() % 40 - 20; if (hisA + ran > hisD) { cout << “对方发起进攻 自己扣血” << hisH - hisD + ran << “滴 剩余” << hisH - (hisA - hisD + ran) << “滴” << endl; hisH -= hisA - hisD + ran; } else cout << “对方发起进攻 自己扣血0滴 剩余” << hisH << “滴” << endl; } if (rand() % 2 && Sl[12]) { cout << “你使用技能阿瓦达索命 ” << Hname << “扣血” << hisH - hisH / 4 << “滴” << endl; hisH /= 4; } if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<3){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/2; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人死了。“<<endl; hisH=0; } else{ cout<<“很不幸,敌人躲开了致命一击。“<<endl; hisH=1; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加万。“<<endl; health+=10000; } if(rand()%3==2){ cout<<“敌人被冻住了”<<endl; hfaint+=5; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } Sleep(1000); int ran = rand() % 40 - 20; if (rand() % 10000 > hisSP) { if (attack + ran > hisD) { cout << “你发起进攻 ” << Hname << “扣血” << attack - hisD + ran << “滴 剩余” << hisH - (attack - hisD + ran) << “滴” << endl; hisH -= attack - hisD + ran; } else cout << “你发起进攻 ” << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } else { if (rand() % 2) cout << “你一脚踹了过去,但没有踢中” << endl; else { cout << “你一脚踹了过去,但只擦着了腰” << endl; if ((attack / 3) + ran > hisD) { cout << Hname << “扣血” << (attack / 3) + ran - hisD << “滴 剩余” << hisH - ((attack / 3) + ran - hisD) << “滴” << endl; hisH -= (attack / 3) + ran - hisD; } else cout << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } } } Sleep(700); if (hhurt > 0) { hhurt -= 1; cout << “对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴” << endl; hisH -= 200; } if (hisH <= 0) { if (hisS == 20 && rand() % 3 == 0) { cout << “对方发动技能:恢复如初 满血复活” << endl; hisH = ha; Sleep(1000); } else { cout << “对方死亡\n获得” << (his / 200) << “金币” << endl; money += (his / 200); if (ane == 3) D_Of_C++; if (ane1 == 3) D_Of_C1++; return 0; } } if (hfaint <= 0) { if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<3){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/2; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人死了。“<<endl; hisH=0; } else{ cout<<“很不幸,敌人躲开了致命一击。“<<endl; hisH=1; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加万。“<<endl; health+=10000; } if(rand()%3==2){ cout<<“敌人被冻住了”<<endl; hfaint+=5; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } if (rand() % 3 == 0) { if (hisS == 14) { cout << “对方发动技能:快快复苏 生命加200” << endl; hisH += 200; } if (hisS == 15) { cout << “对方发动技能:盔甲护身 生命加50 防御增加50” << endl; hisH += 50; hisD += 50; } if (hisS == 17) { cout << “对方发动技能神锋无影 攻击增加200 扣血200滴” << endl; health -= 200; hisA += 200; } Sleep(1000); } int ran = rand() % 40 - 20; if (rand() % 10000 > speed) { if (hisA + ran > defense) { cout << Hname << “发起进攻 ” << “你扣血” << hisA - defense + ran << “滴 剩余” << health - (hisA - defense + ran) << “滴” << endl; health -= hisA - defense + ran; } else cout << Hname << “发起进攻 ” << “你扣血0滴 剩余” << health << “滴” << endl; } else { if (rand() % 2) cout << Hname << “一脚踹了过来,但没有踢中” << endl; else { cout << “对方一脚踹了过来,但只擦着了你的腰” << endl; if ((hisA / 3) + ran > defense) { cout << “你扣血” << (hisA / 3) + ran - defense << “滴 剩余” << health - ((hisA / 3) + ran - defense) << “滴” << endl; health -= ((hisA / 3) + ran - defense); } else cout << “你扣血0滴 剩余” << health << “滴” << endl; } } Sleep(700); if (health <= 0) { if (Sl[6] && rand() % 2) { cout << “你发动技能:恢复如初 满血复活” << endl; health = maxhealth; Sleep(1000); } else { cout << “你死亡”; health = 20; dead = true; return 0; } } } } return 0; } int fight(string Hname, int hisH, int hisA, int hisD, int hisS, int hisSP) { int hfaint = 0, hhurt = 0, hbeat = 0; int mfaint = 0, mhurt = 0; dead = false; int ha = hisA; int his = hisA + hisD + hisH; while (1) { if (hfaint > 0) { if (rand() % 3 == 0) { cout << “对方使用技能:咒立停!停止了魔咒” << endl; hfaint = 0; } else hfaint -= 1; } if (hbeat == 1) { if (rand() % 10 == 0) { cout << “对方一躲,躲过了你的石头” << endl; hbeat = 0; } else { cout << “对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴” << endl; hisH -= 50; } } if (mfaint > 0) { if (Sl[6]) mfaint = 0; else mfaint -= 1; } if (mhurt > 0) { if (Sl[6]) mhurt = 0; else mhurt -= 1; cout << “你的心像被一把刀刺穿了一样 扣血200滴” << endl; health -= 200; } if (mfaint <= 0) { if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<3){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/2; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人死了。“<<endl; hisH=0; } else{ cout<<“很不幸,敌人躲开了致命一击”<<endl; hisH=1; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加万。“<<endl; health+=10000; } if(rand()%3==2){ cout<<“敌人被冻住了”<<endl; hfaint+=5; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } if (rand() % 3 && Sl[0]) { cout << “你使用技能快快复苏 生命增加200” << endl; health += 200; } if (rand() % 3 && Sl[1]) { cout << “你使用技能铁甲护身 生命增加150” << endl; health += 150; } if (rand() % 3 && Sl[2]) { cout << “你使用技能昏昏倒地 ” << Hname << “一回合之内不能攻击” << endl; hfaint += 1; } if (rand() % 3 && Sl[3]) { cout << “你使用技能神锋无影 扣血350滴” << endl; hisH -= 350; } if (rand() % 3 && Sl[5]) { if (rand() % 10) { cout << “你使用技能统统石化 ” << Hname << “二回合之内不能攻击” << endl; hfaint += 2; } else { cout << “你使用技能统统石化 ” << Hname << “十回合之内不能攻击” << endl; hfaint += 10; } } if (rand() % 4 == 0 && Sl[7]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; hisH = monsterfight(Hname, hisH, hisA, hisD, hisS, hisSP); if (hisH < 1) return 0; if (Sl[0]) { cout << “在对方和石怪的战斗中,你已经恢复了2000生命” << endl; if (maxhealth < health + 2000) health = maxhealth; else health += 2000; } } if (rand() % 4 == 0 && Sl[8]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; } if (rand() % 3 && Sl[9]) { cout << “你使用技能万弹齐发!变出几十块石头” << endl; hbeat = 1; } if (rand() % 3 && Sl[10]) { cout << “你使用技能钻心咒!对方将疼痛5回合” << endl; hhurt += 5; } if (rand() % 3 && Sl[11]) { cout << “魂魄出窍!你使用夺魂咒,企图让” << Hname << “自己攻击自己!” << endl; Sleep((rand() % 1000) + 1000); cout << Hname << “被你控制了,开始攻击自己” << endl; Sleep(700); int ran = rand() % 40 - 20; if (hisA + ran > hisD) { cout << “对方发起进攻 自己扣血” << hisH- hisD + ran << “滴 剩余” << hisH - (hisA - hisD + ran) << “滴” << endl; hisH -= hisA - hisD + ran; } else cout << “对方发起进攻 自己扣血0滴 剩余” << hisH << “滴” << endl; } if (rand() % 2 && Sl[12]) { cout << “你使用技能阿瓦达索命 ” << Hname << “扣血” << hisH - hisH / 4 << “滴” << endl; hisH /= 4; } Sleep(1000); int ran = rand() % 40 - 20; if (rand() % 10000 > hisSP) { if (attack + ran > hisD) { cout << “你发起进攻 ” << Hname << “扣血” << attack - hisD + ran << “滴 剩余” << hisH - (attack - hisD + ran) << “滴” << endl; hisH -= attack - hisD + ran; } else cout << “你发起进攻 ” << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } else { if (rand() % 2) cout << “你一脚踹了过去,但没有踢中” << endl; else { cout << “你一脚踹了过去,但只擦着了腰” << endl; if ((attack / 3) + ran > hisD) { cout << Hname << “扣血” << (attack / 3) + ran - hisD << “滴 剩余” << hisH - ((attack / 3) + ran - hisD) << “滴” << endl; hisH -= (attack / 3) + ran - hisD; } else cout << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } } } Sleep(700); if (hhurt > 0) { hhurt -= 1; cout << “对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴” << endl; hisH -= 200; } if (hisH <= 0) { if (hisS == 20 && rand() % 3 == 0) { cout << “对方发动技能:恢复如初 满血复活” << endl; hisH = ha; Sleep(1000); } else { cout << “对方死亡\n获得” << his / 30 << “元” << endl; money += his / 30; experience += (his / 30) * 10; if (ane == 3) D_Of_C++; if (ane1 == 3) D_Of_C1++; return 0; } } if (hfaint <= 0) { if (rand() % 3 == 0) { if (hisS == 14) { cout << “对方发动技能:快快复苏 生命加200” << endl; hisH += 200; } if (hisS == 15) { cout << “对方发动技能:盔甲护身 生命加50 防御增加50” << endl; hisH += 50; hisD += 50; } if (hisS == 17) { cout << “对方发动技能神锋无影 攻击增加200 扣血200滴” << endl; health -= 200; hisA += 200; } Sleep(1000); } int ran = rand() % 40 - 20; if (rand() % 10000 > speed) { if (hisA + ran > defense) { cout << Hname << “发起进攻 ” << “你扣血” << hisA - defense + ran << “滴 剩余” << health - (hisA - defense + ran) << “滴” << endl; health -= hisA - defense + ran; } else cout << Hname << “发起进攻 ” << “你扣血0滴 剩余” << health << “滴” << endl; } else { if (rand() % 2) cout << Hname << “一脚踹了过来,但没有踢中” << endl; else { cout << “对方一脚踹了过来,但只擦着了你的腰” << endl; if ((hisA / 3) + ran > defense) { cout <<“你扣血” << (hisA / 3) + ran - defense << “滴 剩余” << health - ((hisA / 3) + ran - defense) << “滴” << endl; health -= ((hisA / 3) + ran - defense); } else cout << “你扣血0滴 剩余” << health << “滴” << endl; } } Sleep(700); if (health <= 0) { if (Sl[6] && rand() % 2) { cout << “你发动技能:恢复如初 满血复活” << endl; health = maxhealth; Sleep(1000); } else { cout << “你死亡” << endl; health = 20; dead = true; return 0; } } } } return 0; } int street() { switch (rand() % 7) { case 0: if (camp) { int f; cout << “你遇到了一个路人” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“路人”, 600, 210, 10, 24, 1200); if (!dead && rand() % 2) { if (rand() % 4 == 0) { cout << “获得一瓶经验药水” << endl; bag[22] += 1; } else if (rand() % 4 == 1) { cout << “获得一瓶攻击药水” << endl; bag[21] += 1; } else if (rand() % 4 == 2) { cout << “获得一瓶生命药水” << endl; bag[19] += 1; } else { cout << “获得一瓶防御药水” << endl; bag[20] += 1; } } } } else { int f; cout << “你遇到了一个小混混” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“小混混”, 500, 110, 0, 15, 1000); if (!dead && rand() % 2) { if (rand() % 4 == 0) { cout << “获得一瓶经验药水” << endl; bag[20] += 1; } else if (rand() % 4 == 1) { cout << “获得一瓶攻击药水” << endl; bag[20] += 1; } else if (rand() % 4 == 2) { cout << “获得一瓶生命药水” << endl; bag[20] += 1; } else { cout << “获得一瓶防御药水” << endl; bag[20] += 1; } } } } break; case 1: if (camp) { int f; cout << “你遇到了一个警察” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“警察”, 3000, 700, 30, 25, 2000); if (!dead && rand() % 3 != 0) { if (rand() % 5 == 0) { cout << “获得两瓶经验药水” << endl; bag[22] += 2; } else if (rand() % 5 == 1) { cout << “获得两瓶攻击药水” << endl; bag[21] += 2; } else if (rand() % 5 == 2) { cout << “获得两瓶生命药水” << endl; bag[19] += 2; } else if (rand() % 5 == 3) { cout << “获得一瓶全幅药水” << endl; bag[23] += 1; } else { cout << “获得两瓶防御药水” << endl; bag[20] += 2; } } } } else { int f; cout << “你遇到了一个小食死徒” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“食死徒”, 2000, 500, 15, 15, 1000); if (!dead && rand() % 3 != 0) { if (rand() % 5 == 0) { cout << “获得两瓶经验药水” << endl; bag[20] += 2; } else if (rand() % 5 == 1) { cout << “获得两瓶攻击药水” << endl; bag[20] += 2; } else if (rand() % 5 == 2) { cout << “获得两瓶生命药水” << endl; bag[20] += 2; } else if (rand() % 5 == 3) { cout << “获得一瓶全幅药水” << endl; bag[20] += 1; } else { cout << “获得两瓶防御药水” << endl; bag[20] += 2; } } } } break; case 2: if (camp) { int f; cout << “你遇到了一个凤凰社成员” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“凤凰社成员”, 25000, 3000, 200, 80, 5000); if (!dead && rand() % 4 != 0) { if (rand() % 5 == 0) { cout << “获得三瓶经验药水” << endl; bag[22] += 3; } else if (rand() % 5 == 1) { cout << “获得三瓶攻击药水” << endl; bag[21] += 3; } else if (rand() % 5 == 2) { cout << “获得三瓶生命药水” << endl; bag[19] += 3; } else if (rand() % 5 == 3) { cout << “获得两瓶全幅药水” << endl; bag[23] += 2; } else { cout << “获得三瓶防御药水” << endl; bag[20] += 3; } } } } else { int f; cout << “你遇到了一个真食死徒” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“食死徒”, 5000, 700, 50, 15, 1500); if (!dead && rand() % 4 != 0) { if (rand() % 5 == 0) { cout << “获得三瓶经验药水” << endl; bag[20] += 3; } else if (rand() % 5 == 1) { cout << “获得三瓶攻击药水” << endl; bag[20] += 3; } else if (rand() % 5 == 2) { cout << “获得三瓶生命药水” << endl; bag[20] += 3; } else if (rand() % 5 == 3) { cout << “获得两瓶全幅药水” << endl; bag[20] += 2; } else { cout << “获得三瓶防御药水” << endl; bag[20] += 3; } } } } break; case 3: if (camp) { int f; cout << “你遇到了一个傲罗·穆迪” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“穆迪”, 35000, 4500, 1000, 100, 7000); if (!dead) { if (rand() % 3) { if (rand() % 2) { cout << “获得技能书神锋无影” << endl; bag[9]++; } else { cout << “获得技能书快快复苏” << endl; bag[6]++; } } if (rand() % 4) { if (rand() % 5 == 0) { cout << “获得四瓶经验药水” << endl; bag[22] += 4; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[22] += 4; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[22] += 4; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[22] += 3; } else { cout << “获得四瓶防御药水” << endl; bag[22] += 4; } } } } } else { int f; cout << “你遇到了卢修斯·马尔福” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“马尔福”, 10000, 1200, 250, 17, 2000); if (!dead) { if (rand() % 3) { if (rand() % 2) { cout << “获得技能书神锋无影” << endl; bag[9]++; } else { cout << “获得技能书快快复苏” << endl; bag[6]++; } } if (rand() % 4) { if (rand() % 5 == 0) { cout << “获得四瓶经验药水” << endl; bag[20] += 4; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[20] += 4; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[20] += 4; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[20] += 3; } else { cout << “获得四瓶防御药水” << endl; bag[20] += 4; } } } } } if (!dead) if (ane1 == 2) D_Of_C1++; break; case 4: if (camp) { int f; cout << “你遇到了卢平” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“卢平”, 500000, 60000, 12500, 150, 20000); if (!dead) { if (rand() % 3) { if (rand() % 2) { cout << “获得技能书恢复如初” << endl; bag[12]++; } else { cout << “获得技能书阿瓦达索命” << endl; bag[18]++; } } if (rand() % 5) { if (rand() % 5 == 0) { cout << “获得四瓶经验药水” << endl; bag[22] += 4; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[21] += 4; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[19] += 4; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[23] += 3; } else { cout << “获得四瓶防御药水” << endl; bag[20] += 4; } } } } } else { int f; cout << “你遇到了食死徒·卡卡洛夫” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“卡卡洛夫”, 100000, 12000, 2500, 170, 4000); if (!dead) { if (rand() % 2) { cout << “获得技能书恢复如初” << endl; bag[12]++; } else { cout << “获得技能书阿瓦达索命” << endl; bag[18]++; } if (rand() % 5) { if (rand() % 5 == 0) { cout << “获得四瓶经验药水” << endl; bag[20] += 4; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[20] += 4; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[10] += 4; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[20] += 3; } else { cout << “获得四瓶防御药水” << endl; bag[20] += 4; } } } } } break; case 5: if (camp) { int f; cout << “你遇到了西弗勒斯” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“西弗勒斯”, 1500000, 180000, 30000, 300, 50000); if (!dead) { if (rand() % 3) { if (rand() % 2) { cout << “获得技能书恢复如初” << endl; bag[12]++; } else { cout << “获得技能书阿瓦达索命” << endl; bag[18]++; } } if (rand() % 5) { if (rand() % 5 == 0) { cout << “获得四瓶经验药水” << endl; bag[22] += 4; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[21] += 4; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[19] += 4; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[23] += 3; } else { cout << “获得四瓶防御药水” << endl; bag[20] += 4; } } } } } else { int f; cout << “你遇到了莱斯特兰奇” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“莱斯特兰奇”, 300000, 36000, 7500, 20, 5000); if (!dead) { if (rand() % 3) { if (rand() % 2) { cout << “获得技能书恢复如初” << endl; bag[12]++; } else { cout << “获得技能书阿瓦达索命” << endl; bag[18]++; } } if (rand() % 5) { if (rand() % 5 == 0) { cout << “获得四瓶经验药水” << endl; bag[20] += 4; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[20] += 4; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[20] += 4; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[20] += 3; } else { cout << “获得四瓶防御药水” << endl; bag[20] += 4; } } } } } if (!dead) if (ane1 == 0) D_Of_C1++; break; case 6: if (camp) { int f; cout << “你遇到了邓布利多” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“邓布利多”, 9999999, 999999, 99999, 999, 99999); if (!dead) { if (rand() % 3) { if (rand() % 2) { cout << “获得技能书恢复如初” << endl; bag[12]++; } else { cout << “获得技能书阿瓦达索命” << endl; bag[18]++; } } if (rand() % 5) { if (rand() % 5 == 0) { cout << “获得四瓶经验药水” << endl; bag[22] += 4; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[21] += 4; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[19] += 4; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[23] += 3; } else { cout << “获得四瓶防御药水” << endl; bag[20] += 4; } } } } } else if(cishu==1){ int f; cout << “你遇到了戒指” << endl; cout << “1进攻/2逃跑” << endl; cin >> f; if (f == 1) { fight(“戒指”, 999999,99999, 9999, 999, 99999); if (!dead) { cishu++; if (rand() % 3) { if (rand() % 2) { cout << “获得技能书恢复如初” << endl; bag[12]++; } else { cout << “获得技能书阿瓦达索命” << endl; bag[18]++; } } if (rand() % 5) { if (rand() % 5 == 0) { cout << “获得五十瓶经验药水” << endl; bag[20] += 50; } else if (rand() % 5 == 1) { cout << “获得四瓶攻击药水” << endl; bag[20] += 50; } else if (rand() % 5 == 2) { cout << “获得四瓶生命药水” << endl; bag[20] += 50; } else if (rand() % 5 == 3) { cout << “获得三瓶全幅药水” << endl; bag[20] += 50; } else { cout << “获得四瓶防御药水” << endl; bag[20] += 50; } } } } } if (!dead) if (ane1 == 0) D_Of_C1++; break; } Sleep(1000); return 0; } int kuidiqi(){ cout<<“欢迎你来到魁地奇精品店!“<<endl; cout<<“你想要买什么?“<<endl; cout<<“0.返回”<<endl; cout<<“1.彗星260 5000元”<<endl; cout<<“2.流星 10000元”<<endl; cout<<“3.横扫七星 20000元”<<endl; cout<<“4.银箭 50000元”<<endl; cout<<“5.光轮2001 100000元”<<endl; cout<<“6.光轮2000 300000元”<<endl; if(nianlin>=14&&huonujian==0){ cout<<“恭喜你,解救了小天狼星!“<<endl; cout<<“小天狼星买了一把火弩箭送你!“<<endl; cout<<“你获得了火弩箭!“<<endl; huonujian=1; speed+=20000; cout<<“你的速度加两万!“<<endl; } int maixia; cin>>maixia; if(maixia==1){ if(huixing==0||liuxing==0||hengsao==0||yinjian==0||guanglun==0||chaojiguanglun==0||huonujian==0){ if(money>=5000){ cout<<“你获得了彗星260!“<<endl; cout<<“速度+300!“<<endl; money-=5000; speed+=300; huixing==1; } else{ cout<<“你装个死啊!没钱还买!“<<endl; cout<<“你被扔回了大街上!“<<endl; } } else{ cout<<“你有飞天扫帚了呀,滚!“<<endl; } } if(maixia==2){ if(huixing==0||liuxing==0||hengsao==0||yinjian==0||guanglun==0||chaojiguanglun==0||huonujian==0){ if(money>=10000){ cout<<“你获得了流星!“<<endl; cout<<“速度+500!“<<endl; money-=10000; speed+=500; liuxing==1; } else{ cout<<“你装个死啊!没钱还买!“<<endl; cout<<“你被扔回了大街上!“<<endl; } } else{ cout<<“你有飞天扫帚了呀,滚!“<<endl; } } if(maixia==3){ if(huixing==0||liuxing==0||hengsao==0||yinjian==0||guanglun==0||chaojiguanglun==0||huonujian==0){ if(money>=20000){ cout<<“你获得了横扫七星!“<<endl; cout<<“速度+800!“<<endl; money-=20000; speed+=800; hengsao==1; } else{ cout<<“你装个死啊!没钱还买!“<<endl; cout<<“你被扔回了大街上!“<<endl; } } else{ cout<<“你有飞天扫帚了呀,滚!“<<endl; } } if(maixia==4){ if(huixing==0||liuxing==0||hengsao==0||yinjian==0||guanglun==0||chaojiguanglun==0||huonujian==0){ if(money>=50000){ cout<<“你获得了银箭!“<<endl; cout<<“速度+1800!“<<endl; money-=50000; speed+=1800; yinjian==1; } else{ cout<<“你装个死啊!没钱还买!“<<endl; cout<<“你被扔回了大街上!“<<endl; } } else{ cout<<“你有飞天扫帚了呀,滚!“<<endl; } } if(maixia==5){ if(huixing==0||liuxing==0||hengsao==0||yinjian==0||guanglun==0||chaojiguanglun==0||huonujian==0){ if(money>=100000){ cout<<“你获得了光轮2001!“<<endl; cout<<“速度+3000!“<<endl; money-=100000; speed+=3000; guanglun==1; } else{ cout<<“你装个死啊!没钱还买!“<<endl; cout<<“你被扔回了大街上!“<<endl; } } else{ cout<<“你有飞天扫帚了呀,滚!“<<endl; } } if(maixia==6){ if(huixing==0||liuxing==0||hengsao==0||yinjian==0||guanglun==0||chaojiguanglun==0||huonujian==0){ if(money>=300000){ cout<<“你获得了光轮2000!“<<endl; cout<<“速度+7000!“<<endl; money-=300000; speed+=7000; chaojiguanglun==1; } else{ cout<<“你装个死啊!没钱还买!“<<endl; cout<<“你被扔回了大街上!“<<endl; } } else{ cout<<“你有飞天扫帚了呀,滚!“<<endl; } } if(maixia==0){ cout<<“再见!“<<endl; street(); } } int gulingge(){ cout<<“你是来干什么的!“<<endl; cout<<“1.抢劫 2.办业务”<<endl; int yinhang,cunqian=0,qianshu; cin>>yinhang; if(yinhang==1){ cout<<“滚吧,这可是作者的专属银行,你什么实力啊,还抢上了。“<<endl; cout<<“作为惩罚扣你三万滴血。“<<endl; health-=30000; } if(yinhang==2){ cout<<“哦,好的。“<<endl; cout<<“请问您是要存钱还是取钱?“<<endl; cout<<“1.存钱 2.取钱”<<endl; int yinxu; cin>>yinxu; if(yinxu==1){ cout<<“你要存多少?”; cout<<“请输入数量:“<<endl; cin>>qianshu; if(qianshu>money){ cout<<“不是,你装个死啊!“<<endl; cout<<“你又没那么多钱!“<<endl; street(); } else{ cout<<“好的,你已经存了”<<qianshu<<“加隆!“<<endl; cunqian+=qianshu; money-=qianshu; } } if(yinxu==2){ if(qianshu==0){ cout<<“滚吧,你又没钱,还取钱!“<<endl; street(); } else{ cout<<“好的,你取了”<<cunqian<<“加隆!“<<endl; cunqian=0; money=money+cunqian; } } } cout<<“再见!“<<endl; street(); } int shangdian(){ cout<<“终于迎来了你,你要买什么种类的?“<<endl; cout<<“1.攻击类 2.防御类 3.生命类 4.技能类”<<endl; int zhouxu; cin>>zhouxu; if(zhouxu==1){ cout<<“你想买什么?“<<endl; cout<<“1.小刀 3000元”<<endl; cout<<“2.刺刀 5000元”<<endl; cout<<“3.手枪 10000元”<<endl; cout<<“4.步枪 18000元”<<endl; cout<<“5.狙击枪 35000元”<<endl; cout<<“6.机枪 50000元”<<endl; cout<<“7.迫击炮 100000元”<<endl; cout<<“8.简便激光炮 250000元”<<endl; cout<<“9.等离子充能炮 500000元”<<endl; if(nianlin>=13){ cout<<“你获得了格兰分多的宝剑!“<<endl; cout<<“攻击加二十万!“<<endl; attack+=200000; } cout<<“请输出序号!“<<endl; int xuhao; cin>>xuhao; if(xuhao==1){ if(cid==1||xiaod==1){ cout<<“你已经有刀了,滚吧!“<<endl; street(); } else{ if(money<3000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了小刀一把!攻击加三百!“<<endl; xiaod=1; attack+=300; money-=3000; } } } if(xuhao==2){ if(cid==1||xiaod==1){ cout<<“你已经有刀了,滚吧!“<<endl; street(); } else{ if(money<5000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了刺刀一把!攻击加四百五十!“<<endl; cid=1; attack+=450; money-=5000; } } } if(xuhao==3){ if(shouq==1||buq==1||jujq==1||jiq==1){ cout<<“你已经有枪了,滚吧!“<<endl; street(); } else{ if(money<1000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了手枪一把!攻击加八百!“<<endl; shouq=1; attack+=800; money-=10000; } } } if(xuhao==4){ if(shouq==1||buq==1||jujq==1||jiq==1){ cout<<“你已经有枪了,滚吧!“<<endl; street(); } else{ if(money<18000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了步枪一把!攻击加一千三百!“<<endl; buq=1; attack+=1300; money-=18000; } } } if(xuhao==5){ if(shouq==1||buq==1||jujq==1||jiq==1){ cout<<“你已经有枪了,滚吧!“<<endl; street(); } else{ if(money<35000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了狙击枪一把!攻击加两千五!“<<endl; jujq=1; attack+=2500; money-=35000; } } } if(xuhao==6){ if(shouq==1||buq==1||jujq==1||jiq==1){ cout<<“你已经有枪了,滚吧!“<<endl; street(); } else{ if(money<50000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了机枪一架!攻击加三千五!“<<endl; jiq=1; attack+=3500; money-=50000; } } } if(xuhao==7){ if(paijp==1||jianbjgp==1||denglzcnp==1){ cout<<“你已经有炮了,滚吧!“<<endl; street(); } else{ if(money<100000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了迫击炮一架!攻击加六千!“<<endl; paijp=1; attack+=6000; money-=100000; } } } if(xuhao==8){ if(paijp==1||jianbjgp==1||denglzcnp==1){ cout<<“你已经有炮了,滚吧!“<<endl; street(); } else{ if(money<250000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了简便激光炮一架!攻击加一万五!“<<endl; jianbjgp=1; attack+=15000; money-=250000; } } } if(xuhao==9){ if(paijp==1||jianbjgp==1||denglzcnp==1){ cout<<“你已经有炮了,滚吧!“<<endl; street(); } else{ if(money<500000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了等离子充能炮一架!攻击加三万五!“<<endl; denglzcnp=1; attack+=35000; money-=500000; } } } } if(zhouxu==2){ cout<<“你想买什么?“<<endl; cout<<“1.木板 2000元”<<endl; cout<<“2.木盾 4500元”<<endl; cout<<“3.铁盾 8000元”<<endl; cout<<“4.保险柜 15000元”<<endl; cout<<“5.合金大门 28000元”<<endl; cout<<“6.摩天大厦 45000元”<<endl; cout<<“7.简陋核掩体 80000元”<<endl; cout<<“8.强互作用力铠甲 150000元”<<endl; if(nianlin>=13){ cout<<“你获得了凤凰的眼泪!“<<endl; cout<<“防御加五万!“<<endl; attack+=50000; } cout<<“请输出序号!“<<endl; int fxuhao; cin>>fxuhao; if(fxuhao==1){ if(money<2000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了木板一块!防御加五十!“<<endl; mub=1; defense+=50; money-=2000; } } if(fxuhao==2){ if(mud==1||tied==1){ cout<<“你已经有盾牌了,滚吧!“<<endl; street(); } else{ if(money<4500){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了木盾一个!防御加八十五!“<<endl; mud=1; defense+=85; money-=4500; } } } if(fxuhao==3){ if(mud==1||tied==1){ cout<<“你已经有盾牌了,滚吧!“<<endl; street(); } else{ if(money<8000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了铁盾一个!防御加一百五!“<<endl; tied=1; defense+=150; money-=8000; } } } if(fxuhao==4){ if(baoxg==1||hejdm==1){ cout<<“你已经有整体防御了,滚吧!“<<endl; street(); } else{ if(money<15000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了保险柜一个!防御加二百五!“<<endl; baoxg=1; defense+=250; money-=15000; } } } if(fxuhao==5){ if(baoxg==1||hejdm==1||motds==1||jianlhyt==1){ cout<<“你已经有整体防御了,滚吧!“<<endl; street(); } else{ if(money<28000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了合金大门一扇!防御加四百!“<<endl; hejdm=1; defense+=400; money-=28000; } } } if(fxuhao==6){ if(baoxg==1||hejdm==1||motds==1||jianlhyt==1){ cout<<“你已经有整体防御了,滚吧!“<<endl; street(); } else{ if(money<45000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了摩天大厦一栋!防御加六百五十!“<<endl; motds=1; defense+=650; money-=45000; } } } if(fxuhao==7){ if(baoxg==1||hejdm==1||motds==1||jianlhyt==1){ cout<<“你已经有整体防御了,滚吧!“<<endl; street(); } else{ if(money<80000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了简陋核掩体一座!防御加两千!“<<endl; jianlhyt=1; defense+=2000; money-=80000; } } } if(fxuhao==7){ if(money<150000){ cout<<“你就不能滚吗?没钱还买!“<<endl; street(); } else{ cout<<“你获得了强互作用力铠甲!防御加五千!“<<endl; qianghzylkj=1; defense+=5000; money-=150000; } } } if(zhouxu==3){ int sxuze; cout<<“请问你要买什么?“<<endl; cout<<“1.没有”<<endl; cout<<“2.没有”<<endl; cout<<“3.没有”<<endl; cout<<“4.没有”<<endl; cout<<“5.没有”<<endl; cout<<“6.没有”<<endl; cout<<“7.没有”<<endl; cout<<“8.没有”<<endl; cout<<“呵呵呵,由于作者没时间就不做了。“<<endl; street(); } if(zhouxu==4){ cout<<“滚啊!都说了作者没时间做!“<<endl; street(); } else{ cout<<“让我们去大街上逛逛吧!“<<endl; street(); } } int bojinboke(){ cout<<“这里都是黑魔法,不要在往前走了!“<<endl; int zouma; cout<<“1.走 2.不走”<<endl; cin>>zouma; if(rand()%100<99){ if(zouma==1){ cout<<“很有胆量,奖励你2000滴血!“<<endl; health+=2000; int haizou; cout<<“还走吗?“<<endl; cout<<“1.还走 2.不走”<<endl; cin>>haizou; if(haizou==1){ cout<<“你太鲁莽了,扣4000滴血!“<<endl; health-=4000; cout<<“滚回你的老家吧!“<<endl; street(); } if(haizou==2){ cout<<“还行,但是你扣了2000滴血。“<<endl; health-=2000; cout<<“再见!“<<endl; street(); } } if(zouma==2){ cout<<“再见!“<<endl; } } else{ cout<<“太好了,居然能遇见你!“<<endl; cout<<“看在你运气的份上,奖励你一条线索!“<<endl; cout<<“想要摧毁魂器需要格兰分多的宝剑哦!“<<endl; } } int duijiaoxiang(){ cout<<“欢迎欢迎,你怎么来对角巷了!“<<endl; cout<<“请问你要去哪里呢?“<<endl; cout<<“1.魁地奇精品店 2.古灵阁 3.咒语书商店 4.博金博客”<<endl; int qudedifang; cin>>qudedifang; if(qudedifang==1){ kuidiqi(); } if(qudedifang==2){ gulingge(); } if(qudedifang==3){ shangdian(); } if(qudedifang==4){ bojinboke(); } else{ cout<<“再见!“<<endl; street(); } } int xuanzerenwu(){ cout<<“你要当哈利波特吗?“<<endl; cout<<“1.当 2.不当”<<endl; int renxu; cin>>renxu; if(renxu==2){ cout<<“你连哈利波特都不当,你以为自己是谁呢!“<<endl; return 0; } else{ cout<<“好的,你是哈利波特。“<<endl; } } int xiaoshi(){ cout<<“你是一个无忧无虑的小男孩,在七月末尾出生了。“<<endl; cout<<“你在戛德里克山谷住了一年多。“<<endl; nianlin++; cout<<“但是在一天,一个叫做伏地魔的人突然闯进了你的家,杀死了你的父母,还想杀你但失败了。“<<endl; cout<<“过了一会,一个名叫海格的人闯了进来,把你带到了你姨父家。“<<endl; cout<<“你在小汇金区居住了十年,但汇金区却几乎没有变。“<<endl; nianlin=11; cout<<“有一天,弗农姨父一家要去动物园,你要去吗?“<<endl; cout<<“1.去 2.不去”<<endl; int yixuan; cin>>yixuan; if(yixuan==1){ cout<<“你太贪心了,上帝的惩罚降临!“<<endl; fight(“上帝”,2147483647,2147483647,2147483647,2147483647,2147483647); if(dead)return 0; cout<<“你竟然打败了上帝!“<<endl; cout<<“作者把你杀了。“<<endl; cout<<“唉,你死了”<<endl; return 0; } else{ cout<<“弗农姨父一家毫无选择把你带去了动物园。“<<endl; cout<<“但是在动物园发生了一起事故,弗农姨父想当然的把责任推到了你身上。“<<endl; cout<<“你被关进储藏间里一周。“<<endl; } cout<<“这天,弗农姨父让你去拿信,你要去拿吗?“<<endl; cout<<“1.你去 2.让达力去”<<endl; int erxuan; cin>>erxuan; if(erxuan==2){ cout<<“滚吧,你想让达力去,结果作者把你杀了。“<<endl; return 0; } else{ cout<<“你去拿了那封信,发现有一封写给你的信,但是立刻被弗农姨父抢走了。“<<endl; cout<<“你要打开吗?“<<endl; cout<<“1.打开 2.不打开”<<endl; int sanxuan; cin>>sanxuan; if(sanxuan==1){ cout<<“很可惜,你还没打开,信就被弗农姨父抢走了,但作者奖励你过人的勇气。“<<endl; health+=500; cout<<“你要去抢那封信吗?“<<endl; cout<<“1.抢 2.不抢”<<endl; int sixuan; cin>>sixuan; if(sixuan==1){ cout<<“请先打败弗农姨父。“<<endl; fight(“弗农姨父”,5000,500,50,5,300); if(dead)return 0; cout<<“你居然能打败弗农姨父,你打开了那封信,信的内容是这样的:“<<endl; cout<<“哈利波特先生收:“<<endl; cout<<” 你被霍格沃茨魔法学校录取了。一年级新生需要物品如下:“<<endl; cout<<“一件礼服长袍,一件工作袍,一件校袍。“<<endl; cout<<“一顶素面黑色帽。“<<endl; cout<<“三本咒语书。“<<endl; cout<<“一根魔杖。“<<endl; cout<<“一本魔法史。“<<endl; cout<<“前往霍格沃茨需乘坐于八月三十一日上午十一点开的九又四分之三站台的霍格沃茨特快列车。“<<endl; cout<<“请注意:“<<endl; cout<<“一年级新生不可自带飞天扫帚,可携带一只猫,或一只蟾蜍,或一只猫头鹰。“<<endl; cout<<” 你忠诚的麦格教授”<<endl; } } else{ cout<<“事情就怎么过去了。“<<endl; } } cout<<“第二天,十几封信从门缝下塞了进来,弗农姨父生气的把它们撕得粉碎。“<<endl; cout<<“弗农姨父生气的把缝隙钉死了。“<<endl; cout<<“又一天过去了,近百封信从窗口扔了进来。“<<endl; cout<<“弗农姨父气急败坏的把信扔进了搅拌机。“<<endl; cout<<“当大家都以为风平浪静时,事态开始失控。“<<endl; cout<<“无数封信从烟囱里弹了出来。“<<endl; cout<<“弗农姨父把所有人带到了郊外。“<<endl; cout<<“大家只能在郊外一个小木屋里过夜。“<<endl; cout<<“半夜十二点时,一个名叫海格的人把门打破后冲了进来。“<<endl; cout<<“告诉了你的真实身份:巫师!“<<endl; cout<<“你有点不敢相信,海格又递给你一封信,很眼熟。“<<endl; cout<<“你要打开看吗?“<<endl; cout<<“1.打开 2.不打开”<<endl; int wuxuan; cin>>wuxuan; if(wuxuan==2){ cout<<“滚,都说了你是个巫师!“<<endl; cout<<“于是你又在小汇金区住了一年。“<<endl; cout<<“但是这一年,伏地魔利用魔法石东山再起了,伏地魔闯进了你的家,杀死了你。“<<endl; cout<<“作者温馨提醒一句,你没看过小说就算了,你也真的会浪啊!“<<endl; return 0; } else{ cout<<“你打开了那封信。“<<endl; cout<<“信的内容是这样的:“<<endl; cout<<“哈利波特先生收:“<<endl; cout<<” 你被霍格沃茨魔法学校录取了。一年级新生需要物品如下:“<<endl; cout<<“一件礼服长袍,一件工作袍,一件校袍。“<<endl; cout<<“一顶素面黑色帽。“<<endl; cout<<“三本咒语书。“<<endl; cout<<“一根魔杖。“<<endl; cout<<“一本魔法史。“<<endl; cout<<“前往霍格沃茨需乘坐于八月三十一日上午十一点开的九又四分之三站台的霍格沃茨特快列车。“<<endl; cout<<“请注意:“<<endl; cout<<“一年级新生不可自带飞天扫帚,可携带一只猫,或一只蟾蜍,或一只猫头鹰。“<<endl; cout<<” 你忠诚的麦格教授”<<endl; cout<<“你要相信海格吗?“<<endl; cout<<“1.相信 2.不相信”<<endl; int liuxuan; cin>>liuxuan; if(liuxuan==2){ cout<<“不是,都说了你是个巫师,你被作者杀了。“<<endl; return 0; } else{ cout<<“很好,你是一个巫师,按照信上说的,明天你就要去买东西,后天上学。“<<endl; } } cout<<“你们来到了对角巷,你先去了古灵阁取钱。“<<endl; cout<<“你要取钱还是存钱,还是抢劫?“<<endl; cout<<“1.抢劫 2.取钱 3.存钱”<<endl; int qixuan; cin>>qixuan; if(qixuan==1){ cout<<“就你,还想抢古灵阁?做梦去吧!“<<endl; cout<<“看在你是哈利波特的份上,作者饶你一命!“<<endl; } if(qixuan==3){ cout<<“你现在又没钱,存个死啊!“<<endl; } else{ cout<<“你取出了所有的钱,一共50000元。“<<endl; money+=50000; } cout<<“你来到了奥利凡德魔杖店,你要买什么?“<<endl; cout<<“1.魔杖 500元”<<endl; cout<<“2.橡木魔杖 1000元”<<endl; cout<<“3.柳条魔杖 2000元”<<endl; cout<<“4.桃木魔杖 3500元”<<endl; cout<<“5.花心木魔杖 5000元”<<endl; cout<<“6.独角兽毛魔杖 8000元”<<endl; cout<<“7.龙神经魔杖 12000元”<<endl; cout<<“8.凤凰尾羽魔杖 20000元”<<endl; cout<<“9.紫衫木凤凰尾羽魔杖 35000元(伏地魔专属)“<<endl; cout<<“10.冬青木凤凰尾羽魔杖 50000元(哈利波特专属)“<<endl; cout<<“请输入序号。“<<endl; int baxuan; cin>>baxuan; if(baxuan==1){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money-=0; attack+=300; } if(baxuan==2){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==3){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==4){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==5){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==6){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==7){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==8){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==9){ cout<<“不好意思,但你是眼瞎吗,没看到最后一根魔杖哈利波特专属吗!“<<endl; cout<<“滚!“<<endl; cout<<“作者看你太笨了,好心的把魔杖买好了送你!”<<endl; mozhang=1; money=0; attack+=300; } if(baxuan==10){ cout<<“你刚拿起这根魔杖,一道金光闪过。“<<endl; cout<<“你不知为什么,发现这根魔杖很适合自己。“<<endl; cout<<“奥利凡德才告诉了你原因:“<<endl; cout<<“这根魔杖枚芯里的凤凰羽毛与伏地魔魔杖枚芯里的凤凰羽毛是同一只凤凰身上的。“<<endl; mozhang=1; money=0; attack+=500; } cout<<“你买好了魔杖,没想到你刚走进书店就有人送给你书的一整套。“<<endl; cout<<“海格也买了一只猫头鹰送你。“<<endl; cout<<“第二天,你高高兴兴的来到火车站,结果发现根本找不到九又四分之三站台。“<<endl; cout<<“你要找别人问吗?“<<endl; cout<<“1.问别人 2.不问”<<endl; int jiuxuan; cin>>jiuxuan; if(jiuxuan==1){ cout<<“你很快就找到了霍格沃茨特快列车。“<<endl; cout<<“火车出发了”<<endl; } else{ cout<<“滚吧!“<<endl; cout<<“你被作者杀了。“<<endl; return 0; } cout<<“你在火车上遇到了罗恩,你们俩高高兴兴的吃着馅饼。“<<endl; cout<<“这时一个叫纳威的男孩进来问你有没有看见他的蟾蜍。“<<endl; cout<<“1.看见 2.没看见”<<endl; int shixuan; cin>>shixuan; if(shixuan==1){ cout<<“你装尼马呢,还看到了。“<<endl; cout<<“你被作者修理了。“<<endl; return 0; } else{ cout<<“纳威伤心的走了,这时又一个女孩走了进来,她叫赫敏。“<<endl; cout<<“你还没意识到罗恩与赫敏将成为你此生最好的朋友。“<<endl; } cout<<“这时一个人带着两个人出现了。“<<endl; cout<<“这个人叫马尔福,是你未来最恨的人。“<<endl; cout<<“你要和他成为朋友吗?“<<endl; cout<<“1.成为 2.不成为”<<endl; int shiyi; cin>>shiyi; if(shiyi==1){ cout<<“你在打乱剧情!都说了他是你最恨的人!“<<endl; cout<<“接受最严厉的惩罚吧!“<<endl; return 0; } else{ cout<<“他很生气,要来抢你的糖果,你开始揍他。“<<endl; fight(“德拉科”,1000,100,20,10,300); if(dead)return 0; cout<<“他的两个伙伴出现了!“<<endl; fight(“克拉布”,1200,80,10,5,200); if(dead)return 0; fight(“高尔”,800,120,12,3,200); if(dead)return 0; cout<<“你打败了他们,生命拉满!“<<endl; health=maxhealth; } cout<<“你们就这样来到了霍格沃茨。“<<endl; cout<<“你们要开始分院了,四个学院的名字分别为:“<<endl; cout<<“格兰芬多 郝奇帕奇 拉文克劳 斯莱特林”<<endl; cout<<“你早就知道斯莱特林专门培育黑巫师,名声不好。“<<endl; cout<<“但分院帽偏偏对你说:“<<endl; cout<<“额,斯莱特林很适合你,你应该去斯莱特林!相信我的话吧,在你一念之间,斯莱特林会帮助你走向辉煌!你如果进斯莱特林会成大器的!“<<endl; cout<<“你最后会被分到格兰芬多,你要去吗?“<<endl; cout<<“1.去格兰芬多 2.去斯莱特林”<<endl; int shier; cin>>shier; if(shier==2){ cout<<“你真是太该死了,都说了你会被分到格兰分多!“<<endl; cout<<“唉,无知的人类啊!接受上帝的惩罚吧!“<<endl; return 0; } else{ cout<<“你被分到了格兰分多!“<<endl; maxhealth+=300; } cout<<“这月你过的很充实。“<<endl; cout<<“虽然在魔药课上斯内普教授故意找你碴,但其他课都很圆满。“<<endl; cout<<“在飞行课上,你获得了霍格沃茨百年来都没有的殊荣。“<<endl; cout<<“你成为了格兰芬多魁第奇球队最年轻的球员!“<<endl; cout<<“在吃早饭时,你也获得了一把光轮两千。“<<endl; cout<<“这天,你半夜三更溜出来,突然,管理员费尔奇出现了。“<<endl; cout<<“你们吓得魂不附体,溜到了三楼的走廊,你们刚走进去就知道邓布利多校长为什么不让你们来了。“<<endl; cout<<“一只三个脑袋的大狗看着你们,在死亡和费尔奇之间你要选择?“<<endl; cout<<“1.费尔奇 2.大狗”<<endl; int shisan; cin>>shisan; if(shisan==2){ cout<<“你被大狗吃掉了。“<<endl; return 0; } else{ cout<<“你们一溜烟跑回了宿舍。“<<endl; cout<<“你们发现大狗在看守什么东西。“<<endl; } cout<<“一天又一天过去了。“<<endl; cout<<“万圣节晚会时一只巨怪突然出现在了地下教师。“<<endl; cout<<“你们想起赫敏独自一人在走廊上。“<<endl; cout<<“你们去找赫敏了,结果发现巨怪在你们身后,你们只能仓促迎战了。“<<endl; fight(“巨怪”,1500,150,15,15,500); if(dead)return 0; cout<<“你打败了巨怪,救出了赫敏。“<<endl; health+=350; cout<<“突然你想起斯内普去了三楼的房间,他想偷那个东西!“<<endl; cout<<“你们根据海格不小心说漏嘴的线索,推断出那个东西就是魔法石。“<<endl; cout<<“魁第奇比赛临近了。“<<endl; cout<<“没想到比赛刚开始,你的扫帚就想把你甩下去。“<<endl; cout<<endl; cout<<endl; cout<<“现在切换视角,变为赫敏。“<<endl; cout<<endl; cout<<endl; cout<<“你用望远镜发现哈利的扫帚表现很奇怪。“<<endl; cout<<“你还发现斯内普教授在远处用魔杖指着哈利小声的念念有词。“<<endl; cout<<“你冲过去时候,在无意间把奇诺教授撞到了。“<<endl; cout<<“你用咒语把斯内普教授的长袍烧着了。“<<endl; cout<<“哈利的扫帚又平稳下来了。“<<endl; cout<<endl; cout<<endl; cout<<“现在切换视角,变为哈利。“<<endl; cout<<endl; cout<<endl; cout<<“你为格兰芬多赢得了比赛!“<<endl; cout<<“但是你也知道了斯内普教授想害你。“<<endl; cout<<“这天你在无意间发现了恩利斯魔镜。“<<endl; cout<<“但是你并不知道这一切都是邓布利多安排好的。“<<endl; cout<<“一周又一周过去了,你和朋友罗恩和赫敏发现海格竟然在他的小木屋里养了一只小火龙!”<<endl; cout<<“一段时间过去了,因为某些原因,你要关禁闭!“<<endl; cout<<“你刚进禁林就发现有一些怪物。“<<endl; fight(“小怪”,500,50,5,5,100); if(dead)return 0; fight(“小怪”,500,50,5,5,100); if(dead)return 0; fight(“小怪”,500,50,5,5,100); if(dead)return 0; cout<<“你打败了三只小怪,发现前方有一只死亡的独角兽。“<<endl; cout<<“你刚想走进看看,结果出现了一个黑影吸独角兽的血。“<<endl; cout<<“他看到你后,冲了上来,一个马人窜了上来,赶走了黑影。“<<endl; cout<<“经过一段时间的讨论,你才知道想偷魔法石的是-------伏地魔!“<<endl; cout<<“时间一天一天的过去,情势越来越棘手了。“<<endl; cout<<“你只有一个选择,赶在斯内普之前拿走魔法石!“<<endl; cout<<“你带着两位好友来到了三楼。“<<endl; cout<<“先说一句,看在你闯到了这里的份上,你解锁了技能------火焰熊熊!”<<endl; Sl[18]=1; cout<<“你们刚用音乐让大狗安静下来,一道魔鬼网朝你们袭来。“<<endl; fight(“魔鬼网”,800,50,20,10,200); if(dead)return 0; cout<<“你打败了魔鬼网。“<<endl; cout<<“还往前走吗?“<<endl; cout<<“1.走 2.不走”<<endl; int shisan; cin>>shisan; if(shisan==1){ cout<<“你真是好样的!“<<endl; } else{ return 0; } } int yinianji(){
} int ernianji(){
} int sannianji(){
} int sinianji(){
} int wunianji(){
} int liunianji(){
} int dabaifudimozhilv(){
} int buy(int p, int m) { if (money < m) { cout << “没钱,打出去!” << endl; cout << “1抢劫 2逃离” << endl; int a; cin >> a; if (a == 1) { fight(“员工”, 1000, 100, 10, 0, 1000); if (dead) return 0; cout << “另外一个员工冲了过来” << endl; fight(“员工”, 1000, 100, 10, 14, 1000); if (dead) return 0; cout << “另外一个员工冲了过来” << endl; fight(“员工”, 1000, 100, 10, 14, 2000); if (dead) return 0; cout << “员工头冲了过来” << endl; fight(“员工头”, 5000, 5000, 10, 14, 2000); if (dead) return 0; cout << “店主冲了过来” << endl; fight(“店主”, 10000, 1000, 100, 15, 4000); if (dead) return 0; cout << “获得100元” << endl; money += 100; if (rand() % 10 < 3) { Sleep(3000); cout << “你翻了半天,终于找到了你要卖的东西” << endl; bag[p]++; } else{ Sleep(3000); cout << “你翻了半天,还是没找到你要卖的东西” << endl; cout << “你要不要到大街上消消气(杀人)” << endl; cout << “1要! 2不必了” << endl; int q; cin >> q; if (q == 1)street(); } } } else { cout << “购买成功” << endl; bag[p]++; money -= m; if (ane == 1) D_Of_C++; if (ane1 == 1) D_Of_C1 += m; } Sleep(1000); return 0; } int buywand(int p, int m) { if (money < m) cout << “没钱,打出去!” << endl; else { cout << “购买成功” << endl; wand[p - 6]++; money -= m; if (ane == 1) D_Of_C++; if (ane1 == 1) D_Of_C1 += m; } Sleep(1000); return 0; } int make(int w1, int w2, int c1, int c2) { if (w1 < 24 || w2 < 33) { cout << “根本就没有这种材料,你眼瞎啊!” << endl; Sleep(1000); return 0; } if (c1 == 0||c2 == 0) { cout << “你想拿0个材料来造魔杖!没门!” << endl; Sleep(1000); return 0; } if (bag[w1] < c1) { if (bag[w2] < c2) cout << “你木材和杖芯都不够”; else cout << “杖芯不够”; } else if (bag[w2] < c2) cout << “木材不够”; else { cout << “制作成功” << endl; string wn; wn = Material1name[w1 - 24] + Material2name[w2 - 33] + “魔杖”; bag[w1] = bag[w1]-c110; bag[w2] = bag[w2]-c210; wand[wandi++]++; wandpower[wandpoweri++] = c1 * 20 w1 + c1 * 10 * (w2 - 1); wandname[wandnamei++] = wn; } Sleep(1000); return 0; } int levelup() { if (experience >= level * 100) { experience -= level * 100; level++; maxhealth += 100; health += 100; attack += 10; defense += 5; speed += 10; if (rand() % 2 && level > 4) bag[0] += 1; cout << “你升了1级” << endl; levelup(); if (ane1 == 4) D_Of_C1++; } return 0; } int Hos() { int a; if (health < maxhealth) { cout << “剩余生命:(” << health << ”/” << maxhealth << ”)” << endl; cout << “需要” << ((maxhealth) - health) / 500 << “元 是否恢复. 等级小于等于10免费恢复” << endl; cout << “1,是 2,否” << endl; cin >> a; if (a == 1) { if (level > 10) { if (money >= ((maxhealth) - health) / 16) { money -= ((maxhealth) - health) / 16; cout << “恢复成功\n剩余:” << money << “元”; if (ane == 2) D_Of_C++; if (ane1 == 1) D_Of_C1 += ((maxhealth) - health) / 16; health = maxhealth; } else cout << “钱不足” << endl; } else { health = maxhealth; cout << “恢复成功” << endl; if (ane == 2) D_Of_C++; } } else if (a == 2) return 0; else { cout << “请别乱输”; Hos(); } } else { cout << “生命已满”; Sleep(1000); } return 0; } int w() { int aaaa = 1; while (aaaa) { for (int i = 0; i < wandi; i++) { if (wandname[i] == Nwand) cout << “o”; else cout << ” ”; cout << i + 1 << ”,” << wandname[i] << ” ” << wand[i] << “个” << ” 力量:” << wandpower[i] << endl; } cout << “1,装备魔杖 2,卸下现有魔杖 0,退出” << endl; cin >> aaaa; if (aaaa == 1) { cout << “请输入魔杖编号” << endl; int bbbb; cin >> bbbb; if (wand[bbbb - 1]) { if (Nwand != “空手”) { cout << “已装备魔杖”; Sleep(1000); } else { cout << “装备成功”; Nwand = wandname[bbbb - 1]; attack += wandpower[bbbb - 1]; } } else { cout << “您还未拥有此魔杖”; } Sleep(1000); } else if (aaaa == 2) { for (int ia = 0; ia < wandi - 1; ia++) { if (Nwand == wandname[ia]) { cout << “成功卸下”; attack -= wandpower[ia]; break; } } Nwand = “空手”; Sleep(1000); } else if (aaaa == 0) break; else cout << “请别乱输”; levelup(); system(“cls”); cout << “魔法人士:” << name << endl; cout << “势力:”; if (camp) cout << “伏地魔” << endl; else cout << “哈利波特” << endl; cout << “生命:” << health << ”/” << maxhealth << endl; cout << “攻击:” << attack << endl; cout << “防御:” << defense << endl; cout << “速度:” << speed << endl; cout << “等级:” << level << endl; cout << “经验:” << experience << ”/” << level * 100 << endl; cout << “金币:” << money << endl; cout << “1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,”; if (camp) cout << “霍格沃茨(哈利波特不在) ”; else cout << “马尔福庄园(伏地魔不在) ”; cout << “4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,对角巷 11,古灵阁 12,终极任务 13,副本 14,保存 ”; if (camp) cout << “15, 医疗兵(伏地魔的)”; else cout << “15, 庞弗雷女士 ”; cout << “16,改变参数(测试专用 需要密码) 17,设置 ” << endl; if(camp==0&&nianlin<=17){ cout<<“18,霍格沃茨(学校)“<<endl; } cout<<“如果要去以下商店请先去对角巷。“<<endl; cout<<“19,魁地奇精品店 20,博金博客 21,咒语书商店 22,古灵阁”<<endl; cout<<“温馨提示:“<<endl; cout<<“要去对角巷请先服用药水。“<<endl; cout << “8” << endl; cout << “1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能” << endl; cout << “1” << endl; } if(cishu==2){ cout<<“恭喜你遇到了小金杯的洗礼!“<<endl; cout<<“小金杯召唤出了看守!“<<endl; fight(“看守”, 2000, 200, 20, 0, 1000); if (dead)return 0; fight(“看守”, 2000, 200, 20, 0, 1000); if (dead)return 0; cout<<“真不错!但小金杯召唤出了保安群!“<<endl; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; fight(“保安”, 3000, 300, 30, 5, 1500); if (dead)return 0; cout<<“什么!你居然能打败八个保安!小金杯召唤了妖精!“<<endl; fight(“妖精”, 7500, 750, 75, 13, 3800); if (dead)return 0; fight(“妖精”, 7500, 750, 75, 13, 3800); if (dead)return 0; fight(“妖精”, 7500, 750, 75, 13, 3800); if (dead)return 0; cout<<“巨怪出现了!“<<endl; fight(“巨怪”, 15000,1500, 150, 26, 7600); if (dead)return 0; fight(“巨怪”, 15000,1500, 150, 26, 7600); if (dead)return 0; cout<<“火龙来喽!“<<endl; fight(“火龙”, 60000,6000, 600, 104, 30400); if (dead)return 0; cout<<“好吧,你惹怒了金杯!“<<endl; fight(“金杯”, 1200000,120000,12000,2080,608000); if (dead)return 0; cout<<“你赢了,赢的当之无愧!!!”; cishu++; } return 0; } int e() { int bbbb = 1; while (bbbb){ cout << “1,经验石R ” << bag[1] << “个” << endl; cout << “2,经验石SR ” << bag[2] << “个” << endl; cout << “3,经验石SSR ” << bag[3] << “个” << endl; cout << “4,经验石SSS ” << bag[4] << “个” << endl; cout << “5,经验石X ” << bag[5] << “个” << endl; cout << “0,退出 6,一键使用”; int aaaa; cin >> bbbb; switch (bbbb) { case 1: cout << “几个?”; cin >> aaaa; if (bag[1] >= aaaa) { cout << “服用成功”; experience += aaaa * 100; bag[1] -= aaaa; Sleep(1000); break; } break; case 2: cout << “几个?”; cin >> aaaa; if (bag[2] >= aaaa) { cout << “服用成功”; experience += aaaa * 250; bag[2] -= aaaa; Sleep(1000); break; } break; case 3: cout << “几个?”; cin >> aaaa; if (bag[3] >= aaaa) { cout << “服用成功”; experience += aaaa * 500; bag[3] -= aaaa; Sleep(1000); break; } break; case 4: cout << “几个?”; cin >> aaaa; if (bag[4] >= aaaa) { cout << “服用成功”; experience += aaaa * 1200; bag[4] -= aaaa; Sleep(1000); break; } break; case 5: cout << “几个?”; cin >> aaaa; if (bag[5] >= aaaa) { cout << “服用成功”; experience += aaaa * 2500; bag[5] -= aaaa; Sleep(1000); break; } break; case 0: break; case 6: cout << “服用成功”; experience += bag[1] * 100; experience += bag[2] * 250; experience += bag[3] * 500; experience += bag[4] * 1200; experience += bag[5] * 2500; bag[1] = bag[2] = bag[3] = bag[4] = bag[5] = 0; break; default: cout << “请别乱输”; Sleep(1000); break; } levelup(); system(“cls”); cout << “魔法人士:” << name << endl; cout << “势力:”; if (camp) cout << “伏地魔” << endl; else cout << “哈利波特” << endl; cout << “生命:” << health << ”/” << maxhealth << endl; cout << “攻击:” << attack << endl; cout << “防御:” << defense << endl; cout << “速度:” << speed << endl; cout << “等级:” << level << endl; cout << “经验:” << experience << ”/” << level * 100 << endl; cout << “金币:” << money << endl; cout << “1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,”; if (camp) cout << “霍格沃茨(哈利波特不在) ”; else cout << “马尔福庄园(伏地魔不在) ”; cout << “4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,对角巷 11,古灵阁 12,终极任务 13,副本 14,保存 ”; if (camp) cout << “15, 医疗兵(伏地魔的)”; else cout << “15, 庞弗雷女士 ”; cout << “16,改变参数(测试专用 需要密码) 17,设置 ” << endl; if(camp==0&&nianlin<=17){ cout<<“18,霍格沃茨(学校)“<<endl; } cout<<“如果要去以下商店请先去对角巷。“<<endl; cout<<“19,魁地奇精品店 20,博金博客 21,咒语书商店 22,古灵阁”<<endl; cout<<“温馨提示:“<<endl; cout<<“要去对角巷请先服用药水。“<<endl; cout << “8” << endl; cout << “1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能” << endl; cout << “3” << endl; } return 0; } int p() { int bbbb = 1; while (bbbb) { cout << “1,生命药水 ” << bag[19] << “个” << endl; cout << “2,防御药水 ” << bag[20] << “个” << endl; cout << “3,攻击药水 ” << bag[21] << “个” << endl; cout << “4,经验药水 ” << bag[22] << “个” << endl; cout << “5,速度药水 ” << bag[23] << “个” << endl; cout << “6,全幅药水 ” << bag[23] << “个” << endl; cout << “0,退出 7,一键使用 8,去对角巷”; cin >> bbbb; int aaaa; switch (bbbb) { case 1: cout << “几个?”; cin >> aaaa; if (bag[19] >= aaaa) { cout << “服用成功”; health += aaaa * 50; maxhealth += aaaa * 50; bag[19] -= aaaa; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 2: cout << “几个?”; cin >> aaaa; if (bag[20] >= aaaa) { cout << “服用成功”; defense += aaaa * 10; bag[20] -= aaaa; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 3: cout << “几个?”; cin >> aaaa; if (bag[21] >= aaaa) { cout << “服用成功”; attack += aaaa * 25; bag[21] -= aaaa; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 4: cout << “几个?”; cin >> aaaa; if (bag[22] >= aaaa) { cout << “服用成功”; experience += aaaa * 200; bag[22] -= aaaa; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 5: cout << “几个?”; cin >> aaaa; if (bag[43] >= aaaa) { cout << “服用成功”; speed += aaaa; bag[43] -= aaaa; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 6: cout << “几个?”; cin >> aaaa; if (bag[23] >= aaaa) { cout << “服用成功”; health += aaaa * 50; maxhealth += aaaa * 50; defense += aaaa * 10; attack += aaaa * 25; experience += aaaa * 200; speed += aaaa; bag[23] -= aaaa; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 7: cout << “服用成功”; health += bag[19] * 50; maxhealth += bag[19] * 50; defense += bag[20] * 10; attack += bag[21] * 25; experience += bag[22] * 200; speed += bag[43]; health += bag[23] * 50; maxhealth += bag[23] * 50; defense += bag[23] * 10; attack += bag[23] * 25; experience += bag[23] * 200; speed += bag[23]; bag[19] = 0; bag[20] = 0; bag[21] = 0; bag[22] = 0; bag[23] = 0; bag[43] = 0; break; case 0: break; case 8: duijiaoxiang(); default: cout << “请别乱输”; Sleep(1000); break; } levelup(); system(“cls”); cout << “魔法人士:” << name << endl; cout << “势力:”; if (camp) cout << “伏地魔” << endl; else cout << “哈利波特” << endl; cout << “生命:” << health << ”/” << maxhealth << endl; cout << “攻击:” << attack << endl; cout << “防御:” << defense << endl; cout << “速度:” << speed << endl; cout << “等级:” << level << endl; cout << “经验:” << experience << ”/” << level * 100 << endl; cout << “金币:” << money << endl; cout << “1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,”; if (camp) cout << “霍格沃茨(哈利波特不在) ”; else cout << “马尔福庄园(伏地魔不在) ”; cout << “4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,对角巷 11,古灵阁 12,终极任务 13,副本 14,保存 ”; if (camp) cout << “15, 医疗兵(伏地魔的)”; else cout << “15, 庞弗雷女士 ”; cout << “16,改变参数(测试专用 需要密码) 17,设置 ” << endl; if(camp==0&&nianlin<=17){ cout<<“18,霍格沃茨(学校)“<<endl; } cout<<“如果要去以下商店请先去对角巷。“<<endl; cout<<“19,魁地奇精品店 20,博金博客 21,咒语书商店 22,古灵阁”<<endl; cout<<“温馨提示:“<<endl; cout<<“要去对角巷请先服用药水。“<<endl; cout << “8” << endl; cout << “1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能” << endl; cout << “2” << endl; } return 0; } int s() { int bbbb = 1; while (bbbb) { cout << “1,快快复苏 ” << bag[6] << “个” << endl; cout << “2,盔甲护身 ” << bag[7] << “个” << endl; cout << “3,昏昏倒地 ” << bag[8] << “个” << endl; cout << “4,神锋无影 ” << bag[9] << “个” << endl; cout << “5,咒立停 ” << bag[10] << “个” << endl; cout << “6,统统石化 ” << bag[11] << “个” << endl; cout << “7,恢复如初 ” << bag[12] << “个” << endl; cout << “8,召唤咒 ” << bag[13] << “个” << endl; cout << “9,一忘皆空 ” << bag[14] << “个” << endl; cout << “10,万箭齐发 ” << bag[15] << “个” << endl; cout << “11,钻心剜骨 ” << bag[16] << “个” << endl; cout << “12,魂魄出窍 ” << bag[17] << “个” << endl; cout << “13,阿瓦达索命 ” << bag[18] << “个” << endl; cout<<“14,霹雳爆炸 “<<bag[44]<<“个”<<endl; cout<<“15,飞沙走石 “<<bag[45]<<“个”<<endl; cout<<“16,惊天炸雷 “<<bag[46]<<“个”<<endl; cout<<“17,毁天灭地 “<<bag[47]<<“个”<<endl; cout<<“18,固若金汤 “<<bag[48]<<“个”<<endl; cout<<“19,火焰熊熊 “<<bag[49]<<“个”<<endl; cout<<“20,五花大绑 “<<bag[50]<<“个”<<endl; cout<<“21,僵尸飘行 “<<bag[51]<<“个”<<endl; cout<<“22,四分五裂 “<<bag[52]<<“个”<<endl; cout<<“23,力松劲泄 “<<bag[53]<<“个”<<endl; cout << “0,退出”; cin >> bbbb; switch (bbbb) { case 1: if (bag[6] >= 1) { cout << “学习成功” << endl; cout << “能够恢复200滴血” << endl; bag[6] -= 1; Sl[0] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 2: if (bag[7] >= 1) { cout << “学习成功” << endl; cout << “能恢复150滴血” << endl; bag[7] -= 1; Sl[1] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 3: if (bag[8] >= 1) { cout << “学习成功” << endl; cout << “能使对方暂停一回合” << endl; bag[8] -= 1; Sl[2] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 4: if (bag[9] >= 1) { cout << “学习成功” << endl; cout << “扣对方350滴血” << endl; bag[9] -= 1; Sl[3] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 5: if (bag[10] >= 1) { cout << “学习成功” << endl; cout << “能使对方对你施加的状态没用” << endl; bag[10] -= 1; Sl[4] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 6: if (bag[11] >= 1) { cout << “学习成功” << endl; cout << “%10概率能事对方冻结2回合” << endl; cout << “%90概率能事对方冻结10回合” << endl; bag[11] -= 1; Sl[5] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 7: if (bag[12] >= 1) { cout << “学习成功” << endl; cout << “%50概率能起死回生” << endl; bag[12] -= 1; Sl[6] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 8: if (bag[13] >= 1) { cout << “学习成功” << endl; cout << “能召唤生物进攻” << endl; bag[13] -= 1; Sl[7] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 9: if (bag[14] >= 1) { cout << “学习成功” << endl; cout << “%30能使对方无技能” << endl; cout << “%70能使对方防御除2” << endl; bag[14] -= 1; Sl[8] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 10: if (bag[15] >= 1) { cout << “学习成功” << endl; cout << “对方一直减1滴血直到对方躲过(%98躲过)” << endl; bag[15] -= 1; Sl[9] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 11: if (bag[16] >= 1) { cout << “学习成功” << endl; cout << “对方扣血3回合,每回合扣200滴” << endl; bag[16] -= 1; Sl[10] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 12: if (bag[17] >= 1) { cout << “学习成功” << endl; cout << “让对方自己攻击自己(当然不攻击你)” << endl; bag[17] -= 1; Sl[11] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 13: if (bag[18] >= 1) { cout << “学习成功” << endl; cout << “让对方直接扣四分之一的血” << endl; bag[18] -= 1; Sl[12] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 14: if(bag[44]>=1){ cout << “学习成功” << endl; cout << “造成300伤害” << endl; bag[44] -= 1; Sl[13] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 15: if(bag[45]>=1){ cout << “学习成功” << endl; cout << “造成400伤害” << endl; bag[45] -= 1; Sl[14] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 16: bag[46]=1; if(bag[46]>=1){ cout << “学习成功” << endl; cout << “有一半的概率扣一半的血” << endl; bag[46] -= 1; Sl[15] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 17: if(bag[47]>=1){ cout << “学习成功” << endl; cout << “可以杀死除了BOSS外所有敌人” << endl; bag[47] -= 1; Sl[16] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 18: if(bag[48]>=1){ cout << “学习成功” << endl; cout << “冷却敌人五回合” << endl; bag[48] -= 1; Sl[17] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 19: if(bag[49]>=1){ cout << “学习成功” << endl; cout << “敌人持续扣血十回合,每回合100滴血” << endl; bag[49] -= 1; Sl[18] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 20: if(bag[50]>=1){ cout << “学习成功” << endl; cout << “敌人无法攻击一回合” << endl; bag[50] -= 1; Sl[19] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 21: if(bag[51]>=1){ cout << “学习成功” << endl; cout << “敌人五回合扣血一百五十滴” << endl; bag[51] -= 1; Sl[20] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 22: if(bag[52]>=1){ cout << “学习成功” << endl; cout << “敌人两回合攻击减半” << endl; bag[52] -= 1; Sl[21] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 23: if(bag[53]>=1){ cout << “学习成功” << endl; cout << “敌人扣血300滴,两回合扣血100滴” << endl; bag[53] -= 1; Sl[22] = 1; Sleep(1000); break; } else cout << “物品不足” << endl; break; case 0: break; default: cout << “请别乱输”; Sleep(1000); break; } system(“cls”); cout << “魔法人士:” << name << endl; cout << “势力:”; if (camp) cout << “伏地魔” << endl; else cout << “哈利波特” << endl; cout << “生命:” << health << ”/” << maxhealth << endl; cout << “攻击:” << attack << endl; cout << “防御:” << defense << endl; cout << “速度:” << speed << endl; cout << “等级:” << level << endl; cout << “经验:” << experience << ”/” << level * 100 << endl; cout << “金币:” << money << endl; cout << “1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,”; if (camp) cout << “霍格沃茨(哈利波特不在) ”; else cout << “马尔福庄园(伏地魔不在) ”; cout << “4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,对角巷 11,古灵阁 12,终极任务 13,副本 14,保存 ”; if (camp) cout << “15, 医疗兵(伏地魔的)”; else cout << “15, 庞弗雷女士 ”; cout << “16,改变参数(测试专用 需要密码) 17,设置 ” << endl; if(camp==0&&nianlin<=17){ cout<<“18,霍格沃茨(学校)“<<endl; } cout<<“如果要去以下商店请先去对角巷。“<<endl; cout<<“19,魁地奇精品店 20,博金博客 21,咒语书商店 22,古灵阁”<<endl; cout<<“温馨提示:“<<endl; cout<<“要去对角巷请先服用药水。“<<endl; cout << “8” << endl; cout << “1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能” << endl; cout << “4” << endl; } return 0; } int LD() { cout << “剩余抽奖券:” << bag[0] << “张” << endl; cout << “1,抽奖 2,退出” << endl; int a; cin >> a; if (a == 1) { cout << “抽几次?”; int num; cin >> num; if (bag[0] >= num) { bag[0] -= num; int num1 = 0, num2 = 0, num3 = 0, num4 = 0, num5 = 0; int num6 = 0, num7 = 0, num8 = 0, num9 = 0, num10 = 0; int num11 = 0; for (int i = 0; i < num; i++) { switch (rand() % 20) { case 0: case 1: num1++; bag[1]++; break; case 2: case 3: num2++; bag[2]++; break; case 4: case 5: num3++; bag[3]++; break; case 6: case 7: num4++; bag[4]++; break; case 8: num5++; bag[5]++; break; case 9: case 10: num6++; bag[19]++; break; case 11: case 12: num7++; bag[20]++; break; case 13: case 14: num8++; bag[21]++; break; case 15: case 16: num9++; bag[22]++; break; case 17: num10++; bag[23]++; break; case 18: num11 += 50; money += 50; break; case 19: num11 += 100; money += 100; break; } } cout << “你获得了经验石R ” << num1 << “个” << endl; cout << “经验石SR ” << num2 << “个” << endl; cout << “经验石SSR ” << num3 << “个” << endl; cout << “经验石SSS ” << num4 << “个” << endl; cout << “经验石X ” << num5 << “个” << endl; cout << “生命药水 ” << num6 << “个” << endl; cout << “防御药水 ” << num7 << “个” << endl; cout << “攻击药水 ” << num8 << “个” << endl; cout << “经验药水 ” << num9 << “个” << endl; cout << “全幅药水 ” << num10 << “个” << endl; cout << “金币 ” << num11 << “个” << endl; } else cout << “您的抽奖券不足” << endl; } else if (a == 2) return 0; else { cout << “请别乱输。”; system(“cls”); LD(); } _getch(); return 0; } int dig() { cout << “进入挖矿状态”; Sleep(1000); system(“cls”); int x = 0; while (1) { system(“cls”); cout << “挖”;Sleep(200); cout << “矿”;Sleep(200); cout << “中”;Sleep(200); cout << ”.“;Sleep(100); cout << ”.“;Sleep(100); cout << ”.” << endl; x++;Sleep(500); int ad = rand() % 3; if (ad == 2) { ad = rand() % 11; if (ad < 3) { switch (rand() % 7) { case 0: cout << “你挖到了技能书铁甲咒!!!” << endl; bag[7]++; break; case 1: cout << “你挖到了技能书咒立停!!!” << endl; bag[10]++; break; case 2: cout << “你挖到了技能书石化咒!!!” << endl; bag[11]++; break; case 3: cout<<“你挖到了技能书爆炸咒!!!“<<endl; bag[44]++; break; case 4: cout<<“你挖到了技能书飞沙咒!!!“<<endl; bag[45]++; break; case 5: cout<<“你挖到了技能书惊天咒!!!“<<endl; bag[46]++; break; case 6: cout<<“你来到了神秘商店!!!“<<endl; cout<<“1.毁天灭地咒 50000000元!!!“<<endl; cout<<“2.固若金汤咒 30000000元!!!“<<endl; int asdf; cin>>asdf; if(asdf==1&&money>=50000000){ cout<<“你获得了技能书毁灭咒!!!“<<endl; money-=50000000; bag[47]++; } else if(asdf==2&&money>=30000000){ cout<<“你获得了技能书防御咒!!!“<<endl; money-=30000000; bag[48]++; } else{ cout<<“你是否要抢劫?“<<endl; cout<<“1.不要。“<<endl; cout<<“其他.要。“<<endl; int adsf; cin>>adsf; if(adsf==1){ cout<<“你真是个好孩子!“<<endl; cout<<“你遇到了奇诺”<<endl; fight(“奇诺”,200000,40000,3000,300,10000); if (dead)return 0; cout<<“你获得了魔法石!”; health-=20000; attack+=5000; defense+=3000; level+=50; } else{ cout<<“滚!你被作者打死了。“<<endl; return 0; } } } Sleep(500); } else if (ad>=3&&ad<7) { switch (rand() % 21) { case 0: cout << “你挖到了夜琪的尾羽!!!” << endl; bag[32]++; break; case 1: case 2: cout << “你挖到了独角兽尾毛!” << endl; bag[30]++; break; case 3: case 4: cout << “你挖到了龙神经!” << endl; bag[31]++; break; case 5: case 6: cout << “你挖到了凤凰羽毛!” << endl; bag[29]++; break; case 7: case 8: cout << “你挖到了龙心腱” << endl; bag[27]++; break; case 9: case 10: cout << “你挖到了雷鸟尾羽” << endl; bag[28]++; break; case 11: case 12: case 13: cout << “你挖到了马形水怪的鬃毛” << endl; bag[26]++; break; case 14: case 15: case 16: cout << “你挖到了猫狸子胡须” << endl; bag[24]++; break; case 17: case 18: case 19: cout << “你挖到了媚娃头发” << endl; bag[25]++; break; case 20: cout<<“你遇到了冠冕!他派出了两名食死徒!“<<endl; fight(“食死徒”,10000,1000, 100, 20, 600); if (dead)return 0; fight(“食死徒”,10000,1000, 100, 20, 600); if (dead)return 0; cout<<“冠冕派出了十名精选食死徒!“<<endl; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; fight(“精选食死徒”,20000,2000, 200, 40, 1200); if (dead)return 0; cout<<“既然你做死,那你自己去作死吧!“<<endl; fight(“冠冕”,1000000,100000, 10000, 2000, 60000); if (dead)return 0; cout<<“恭喜你又一次证明了自己的实力!“<<endl; sddif=1; } if(sddif==1){ cishu++; } Sleep(500); } else if (ad>=7&&ad<10) { switch (rand() % 12) { case 0: cout << “你挖到了桦木” << endl; bag[33]++; break; case 1: cout << “你挖到了紫衫木” << endl; bag[34]++; break; case 2: cout << “你挖到了冬青木” << endl; bag[35]++; break; case 3: cout << “你挖到了山楂木柳条” << endl; bag[36]++; break; case 4: cout << “你挖到了橡木” << endl; bag[37]++; break; case 5: cout << “你挖到了械木” << endl; bag[38]++; break; case 6: cout << “你挖到了山毛榉木” << endl; bag[39]++; break; case 7: cout << “你挖到了栗木” << endl; bag[40]++; break; case 8: cout << “你挖到了樱桃木” << endl; bag[41]++; break; case 9: cout << “你挖到了桃花心木” << endl; bag[42]++; break; case 10: if(cishu>1&&baojian==0){ cout<<“你获得了格兰分多的宝剑!但你付出了巨大的代价!“<<endl; baojian=1; health-=40000; } } Sleep(500); } else{ int as = rand() % 10 + 10; cout << “你挖到了” << as << “金币” << endl; money += as; Sleep(500); } } else if (ad == 1) { ad = rand() % 3; if (ad == 0) { cout << “你遇到了大老鼠” << endl; fight(“大老鼠”, 5000, 500, 50, 20, 1000); if (dead) { cout << “你死了” << endl; return 0; } } if (ad == 1) { cout<<“你遇到了食死徒” << endl; fight(“食死徒”, 10000, 1000, 100, 17, 1000); if (dead) { cout << “你死了” << endl; return 0; } } if (ad == 2) { cout << “你遇到了坏矿工” << endl; fight(“矿工”, 5000, 2000, 200, 17, 1000); if (dead) { cout << “你死了” << endl; return 0; } } cout << “是否继续挖矿?” << endl; cout << “1,是 2,否” << endl; int ans; cin >> ans; if (ans == 2) return 0; } } return 0; } int clearance() { system(“cls”); cout << “你在出口处发现了一张纸条,上面写着:”; if (camp) { cout << “伏地魔,我知道你在找我…我就告诉你吧,我在霍格沃茨等你!” << endl; cout << ” ————哈利·波特” << endl; } else { cout << “哈利·波特, 你看到这张纸条的时候, 你们的校已经掌握在我手中, 要么你前来送死,要么我就会把你的同们统统杀死!!!“<<endl; cout << ” ——伏地魔” << endl; } _getch(); f = 1; return 0; } int maze() { bool is[101][101]; for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) is[i][j] = false; int x = 8, y = 1; string a[100] = { ”##################################################”, “#I99999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#999999999999999999999999999999999999999999999999#”, “#99999999999999999999999999999999999999999999999o#”, ”##################################################”, }; while (1) { is[x - 1][y - 1] = true; is[x - 1][y] = true; is[x - 1][y + 1] = true; is[x][y - 1] = true; is[x][y] = true; is[x][y + 1] = true; is[x + 1][y - 1] = true; is[x + 1][y] = true; is[x + 1][y + 1] = true; system(“cls”); cout << “生命:” << health << ”/” << maxhealth << endl; for (int i = 0; i < 20; i++) { for (int j = 0; j < 50; j++) { if (is[i][j]) cout << a[i][j]; else cout << “0”; } cout << endl; } int ch; ch = _getch(); if (ch == ‘a’) { if (a[x][y - 1] == ’ ’) { a[x][y - 1] = ’@’; a[x][y] = ’ ’; y -= 1; } else if (‘0’ <= a[x][y - 1] && a[x][y - 1] <= ‘9’) { cout << “你遇到了” << (int)(a[x][y - 1] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 100000 * (a[x][y - 1] - ‘0’), 25000 * (a[x][y - 1] - ‘0’), 1000 * (a[x][y - 1] - ‘0’), 200, 500 * (a[x][y - 1] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x][y - 1] = ’@’; a[x][y] = ’ ’; y -= 1; a[x][y] = ’ ’; } else if (a[x][y - 1] == ‘I’) { cout << “你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x][y - 1] == ‘o’) { cout << “你通关了” << endl; _getch(); clearance(); } } if (ch == ‘d’) { if (a[x][y + 1] == ’ ’) { a[x][y + 1] = ’@’; a[x][y] = ’ ’; y += 1; } else if (‘0’ <= a[x][y + 1] && a[x][y + 1] <= ‘9’) { cout << “你遇到了” << (int)(a[x][y + 1] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 100000 * (a[x][y + 1] - ‘0’), 25000 * (a[x][y + 1] - ‘0’), 1000 * (a[x][y + 1] - ‘0’), 200, 500 * (a[x][y + 1] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x][y + 1] = ’@’; a[x][y] = ’ ’; y += 1; a[x][y] = ’ ’; } else if (a[x][y + 1] == ‘I’) { cout << “你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x][y + 1] == ‘o’) { cout << “你通关了” << endl; _getch(); clearance(); } } if (ch == ‘w’) { if (a[x - 1][y] == ’ ’) { a[x - 1][y] = ’@’; a[x][y] = ’ ’; x -= 1; } else if (‘0’ <= a[x - 1][y] && a[x - 1][y] <= ‘9’) { cout << “你遇到了” << (int)(a[x - 1][y] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 100000 * (a[x - 1][y] - ‘0’), 25000 * (a[x - 1][y] - ‘0’), 1000 * (a[x - 1][y] - ‘0’), 200, 500 * (a[x - 1][y] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x - 1][y] = ’@’; a[x][y] = ’ ’; x -= 1; a[x][y] = ’ ’; } else if (a[x - 1][y] == ‘I’) { cout << “你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x - 1][y] == ‘o’) { cout << “你通关了” << endl; _getch(); clearance(); } } if (ch == ‘s’) { if (a[x + 1][y] == ’ ’) { a[x + 1][y] = ’@’; a[x][y] = ’ ’; x += 1; } else if (‘0’ <= a[x + 1][y] && a[x + 1][y] <= ‘9’) { cout << “你遇到了” << (int)(a[x + 1][y] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 100000 * (a[x + 1][y] - ‘0’), 25000 * (a[x + 1][y] - ‘0’), 1000 * (a[x + 1][y] - ‘0’), 200, 500 * (a[x + 1][y] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x + 1][y] = ’@’; a[x][y] = ’ ’; x += 1; a[x][y] = ’ ’; } else if (a[x + 1][y] == ‘I’) { cout << “你是否要退出这个奇怪的世界,如果退出,你现在闯下的江湖都会重置” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x + 1][y] == ‘o’) { cout << “你通关了” << endl; _getch(); clearance(); } } } return 0; } int DriveOut() { switch (rand() % 3) { case 1: cout << “店主:没钱还敢卖!!!打出去!!!” << endl; break; case 2: cout << “店主:什么!没钱!!!” << endl; break; case 3: cout << “你:可不可以降一降价?” << endl; cout << “店主:不行!哪有那么简单!” << endl; break; } Sleep(1000); return 0; } int poisonshop() { system(“cls”); cout << “店主:这位客人,您要卖什么?” << endl; cout << “1,购买 |小生命药水+200| 100元” << endl; cout << “2,购买 ||大生命药水+500|| 200元” << endl; cout << “3,购买 |小防御药水 +20| 100元” << endl; cout << “4,购买 ||大防御药水 +50|| 200元” << endl; cout << “5,购买 |小攻击药水+100| 100元” << endl; cout << “6,购买 ||大攻击药水+250|| 200元” << endl; cout << “7,购买 |小全幅药水| 500元” << endl; cout << “8,购买 ||中全幅药水|| 1000元” << endl; cout << “9,购买 |||大全幅药水||| 2000元” << endl; cout << “10,购买 |||||极·全幅药水||||| 1000000元” << endl; cout << “你掏了掏自己的钱包,发现有” << money << “元” << endl; int which; cin >> which; switch (which) { case 1: if (money < 100) DriveOut(); else { money -= 100; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; health += 200; maxhealth += 200; } break; case 2: if (money < 200) DriveOut(); else { money -= 200; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; health += 500; maxhealth += 500; } break; case 3: if (money < 100) DriveOut(); else { money -= 100; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; defense += 20; } break; case 4: if (money < 200) DriveOut(); else { money -= 200; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; defense += 50; } break; case 5: if (money < 100) DriveOut(); else { money -= 100; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; attack += 100; } break; case 6: if (money < 200) DriveOut(); else { money -= 200; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; attack += 250; } break; case 7: if (money < 500) DriveOut(); else { money -= 500; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; health += 50; defense += 5; attack += 25; experience += 1000; } break; case 8: if (money < 1000) DriveOut(); else { money -= 1000; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; health += 150; defense += 15; attack += 75; experience += 3000; } break; case 9: if (money < 2000) DriveOut(); else { money -= 2000; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; health += 450; defense += 45; attack += 225; experience += 9000; } break; case 10: if (money < 1000000) DriveOut(); else { money -= 1000000; cout << “店主:一路走好!” << endl; cout << “你拿起药水就喝了下去。” << endl; health += 250000; defense += 25000; attack += 125000; experience += 5000000; } break; default: break; } Sleep(1000); return 0; } int bookshop() { system(“cls”); cout << “店主:这里是巫师们卖书的地方,您要卖什么?” << endl; cout << “1,购买 ||||恢复如初技能书|||| 40000元 现货大量供应” << endl; cout << “2,购买 ||遗忘咒技能书|| 10000元 已经售完” << endl; cout << “3,购买 |||钻心咒技能书||| 15000元 现货大量供应” << endl; cout << “4,购买 |||召唤咒技能书||| 20000元 现货大量供应” << endl; cout << “5,购买 |||||咒立停技能书||||| 25000元 现货大量供应” << endl; cout << “6,购买 ||||夺魂咒技能书|||| 20000元 现货大量供应” << endl; cout << “7,购买 ||万弹齐发技能书|| 15000元 现货大量供应” << endl; cout << “你掏了掏自己的钱包,发现有” << money << “元” << endl; int which; cin >> which; switch (which) { case 1: if (money < 40000) DriveOut(); else { money -= 40000; cout << “店主:一路走好!” << endl; bag[12]++; } break; case 2: money-=50000; cout << “店主:一路走好!” << endl; bag[14]++; break; case 3: if (money < 20000) DriveOut(); else { money -= 20000; cout << “店主:一路走好!” << endl; bag[16]++; } break; case 4: if (money < 20000) DriveOut(); else { money -= 20000; cout << “店主:一路走好!” << endl; bag[13]++; } break; case 5: if (money < 25000) DriveOut(); else { money -= 25000; cout << “店主:一路走好!” << endl; bag[10]++; } break; case 6: if (money < 20000) DriveOut(); else { money -= 20000; cout << “店主:一路走好!” << endl; bag[17]++; } break; case 7: if (money < 15000) DriveOut(); else { money -= 15000; cout << “店主:一路走好!” << endl; bag[15]++; } break; default: break; } return 0; } int NoticeBoard(int l, int x, int y) { if (l == 10 && x == 6 && y == 1) { system(“cls”); cout << “跟着''走” << endl; cout << ” ——作者” << endl; _getch(); } if (l == 10 && x == 8 && y == 12) { system(“cls”); cout << “走吧,谁叫你不听命令呢…” << endl; cout << ” ——作者” << endl; _getch(); } if (l == 12 && x == 3 && y == 1) { system(“cls”); cout << “杀出重围!” << endl; cout << ” ——作者” << endl; _getch(); } if (l == 12 && x < 4 && y == 20) { system(“cls”); cout << “恭喜通过一半!往下走继续…” << endl; cout << ” ——作者” << endl; _getch(); } if (l == 12 && x > 4 && y == 20) { system(“cls”); cout << “恭喜通过一半!往上走继续…” << endl; cout << ” ——作者” << endl; _getch(); } if (l == 12 && x == 10) { system(“cls”); cout << “拿走全部奖励吧!” << endl; cout << ” ——作者” << endl; _getch(); } else { system(“cls”); cout << “回去吧,你来错地方了…” << endl; _getch(); } return 0; } int checkpoint(int l) { bool is[101][101]; for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) is[i][j] = false; int x = 1, y = 1; string a[100]; if (l == 1) { a[0] = ”######”; a[1] = “I9999o”; a[2] = ”######”; } else if (l == 2) { a[0] = ”#######”; a[1] = “I99999#”; a[2] = “####9##”; a[3] = “##999##”; a[4] = “####9##”; a[5] = “#99999o”; a[6] = ”#######”; } else if (l == 3) { a[0] = ”#########”; a[1] = “I9#999#S#”; a[2] = “#9##9##9#”; a[3] = “#9999999#”; a[4] = “####9##9#”; a[5] = “#9999#o9#”; a[6] = ”#########”; } else if (l == 4) { a[0] = “#######o#######”; a[1] = “I9999999#99999#”; a[2] = “#9999999#####9#”; a[3] = “#9999999999999#”; a[4] = ”# ##### #”; a[5] = “#S # 2#”; a[6] = ”######### #####”; a[7] = “#P121 2 1 11P#”; a[8] = ”###############”; } else if (l == 5) { a[0] = ”###############”; a[1] = “I9999999#99999#”; a[2] = “#9#99999#####9#”; a[3] = “#999#999999999#”; a[4] = “#999#9#9#####9#”; a[5] = “#999#9#P#99999#”; a[6] = “#####9S##9###o#”; a[7] = “#99999#9999999#”; a[8] = ”###############”; } else if (l == 6) { a[0] = ”###############”; a[1] = “#9999999999999#”; a[2] = “#9999999999999#”; a[3] = “#9999999999999o”; a[4] = “I9999999999999#”; a[5] = “#9999999999999#”; a[6] = “#9999999999999#”; a[7] = “#9999999999999#”; a[8] = ”###############”; x = 4; } else if (l == 7) { a[0] = ”###############”; a[1] = “#999999999999B#”; a[2] = “#9999999999999#”; a[3] = “#9999999999999#”; a[4] = “I9999999999999o”; a[5] = “#9999999999999#”; a[6] = “#9999999999999#”; a[7] = “#9999999999999#”; a[8] = ”###############”; x = 4; } else if (l == 8) { a[0] = ”#################”; a[1] = “#999999999999999#”; a[2] = “#999999999999999#”; a[3] = “#999999999999999#”; a[4] = “#999999999999999#”; a[5] = “#999999999999999#”; a[6] = “#999999999999999#”; a[7] = “#999999999999999#”; a[8] = “I999999999999999o”; a[9] = “#999999999999999#”; a[10] = “#999999999999999#”; a[11] = “#999999999999999#”; a[12] = ”#################”; x = 8; } else if (l == 9) { a[0] = ”#################”; a[1] = “I999999999999999I”; a[2] = “#999999999999999#”; a[3] = “#999999999999999#”; a[4] = “#9999999o9999999#”; a[5] = “#999999999999999#”; a[6] = “#999999999999999#”; a[7] = “I999999999999999I”; a[8] = ”#################”; if (rand() % 2) x = 7; if (rand() % 2) y = 15; } else if (l == 10) { a[0] = ”#############################”; a[1] = “#999999999999999999999999999#”; a[2] = “#999999999999999999999999999#”; a[3] = “#999999999999999999999999999o”; a[4] = “#999999999999999999999999999#”; a[5] = “#999999999999999999999999999#”; a[6] = “#T99999999999999999999999999#”; a[7] = “Io9999999999999999999999999oI”; a[8] = “############T################”; x = 7; y = 1; } else if (l == 11) { a[0] = ”#############################”; a[1] = “#999999999999999999999999999#”; a[2] = “#999999999999999999999999999#”; a[3] = “#9999999999999999999999999999######################”; a[4] = “I999999999999999999999999999999999999999999999999o#”; a[5] = “#9999999999999999999999999999######################”; a[6] = “#999999999999999999999999999#”; a[7] = “#999999999999999999999999999#”; a[8] = ”#############################”; x = 4; y = 1; } else if (l == 12) { a[0] = ”###################################################”; a[1] = “#9999999999999999999999999999999999999999999999999#”; a[2] = “#9999999999999999999999999999999999999999999999999#”; a[3] = “#9999999999999999999999999999999999999999999999999#”; a[4] = “I9999999999999999999999999999999999999999999999999#”; a[5] = “#9999999999999999999999999999999999999999999999999#”; a[6] = “#9999999999999999999999999999999999999999999999999#”; a[7] = “#9999999999999999999999999999999999999999999999999#”; a[8] = “#9999999999999999999999999999999999999999999999999#”; a[9] = “#9999999999999999999999999999999999999999999999999o#”; a[10] = “#################################################T#”; x = 4; y = 1; } else if(l==13){ a[0] = ”#############################”; a[1] = “#TPPPPPPPPPPPPPPPPPPPPPPPPPP#”; a[2] = “#PPPPPPPPPPPPPPPPPPPPPPPPPPP#”; a[3] = “#PPPPPPPPPPPPPPPPPPPPPPPPPPP#”; a[4] = “#PPPPPPPPPPPPPPPPPPPPPPPPPPP#”; a[5] = “#PPPPPPPPPPPPPPPPPPPPPPPPPPP#”; a[6] = “#PPPPPPPPPPPPPPPPPPPPPPPPPPP#”; a[7] = “IPPPPPPPPPPPPPPPPPPPPPPPPPPT#”; a[8] = ”#############################”; x = 7; y = 1; for (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) is[i][j] = true; } else{ cishu++; } a[x][y] = ’@’; while (1) { is[x - 1][y - 1] = true; is[x - 1][y] = true; is[x - 1][y + 1] = true; is[x][y - 1] = true; is[x][y] = true; is[x][y + 1] = true; is[x + 1][y - 1] = true; is[x + 1][y] = true; is[x + 1][y + 1] = true; system(“cls”); cout << “生命:” << health << ”/” << maxhealth << endl; cout << “攻击:” << attack << endl; cout << “防御:” << defense << endl; for (int i = 0; i < 25; i++) { for (int j = 0; j < 50; j++) { if (is[i][j]) cout << a[i][j]; else cout << “0”; } cout << endl; } int ch; ch = _getch(); if (ch == ‘a’) { if (‘0’ < a[x][y - 1] && a[x][y - 1] <= ‘9’) { cout << “你遇到了” << (int)(a[x][y - 1] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 20000 * (a[x][y - 1] - ‘0’), 5000 * (a[x][y - 1] - ‘0’), 200 * (a[x][y - 1] - ‘0’),240, 50 * (a[x][y - 1] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x][y - 1] = ’@’; a[x][y] = ’ ’; y—; a[x][y] = ’ ’; } else if (a[x][y - 1] == ‘I’) { cout << “你是否要退出?” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x][y - 1] == ‘o’) { cout << “你通关了” << endl; if (nowlevel + 1 == l) { nowlevel++; } _getch(); return 0; } else if (a[x][y - 1] == ‘P’) { int m1 = rand() % 50; int m2 = rand() % 2; int m3 = rand() % 2; int m4 = rand() % 2; int m5 = rand() % 2; int m6 = rand() % 2; cout << “你获得了:” << endl; cout << m1 << “元” << endl; cout << m2 << “瓶生命药水” << endl; cout << m3 << “瓶防御药水” << endl; cout << m4 << “瓶攻击药水” << endl; cout << m5 << “瓶经验药水” << endl; cout << m6 << “瓶全幅药水” << endl; money += m1; bag[19] += m2; bag[20] += m3; bag[21] += m4; bag[22] += m5; bag[23] += m6; _getch(); a[x][y - 1] = ’@’; a[x][y] = ’ ’; y—; } else if (a[x][y - 1] == ‘S’) { poisonshop(); } else if (a[x][y - 1] == ‘B’) { bookshop(); } else if (a[x][y - 1] == ‘T’) { NoticeBoard(l, x, y - 1); } else if (a[x][y - 1] == ‘0’ && l == 10) { a[x][y] = ‘0’; x = 7; y = 12; a[x][y] = ’@’; } else if (a[x][y - 1] == ‘X’ && l == 12) { a[x][y] = ’ ’; x = 9; y = 49; a[x][y] = ’@’; } else if (a[x][y - 1] != ’#’) { a[x][y - 1] = ’@’; a[x][y] = ’ ’; y -= 1; } if (l == 9 && x == 4 && y == 12) { a[x][y - 2] = ’@’; a[x][y] = ’ ’; y -= 2; } } if (ch == ‘d’) { if (‘0’ < a[x][y + 1] && a[x][y + 1] <= ‘9’) { cout << “你遇到了” << (int)(a[x][y + 1] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 1000 * (a[x][y + 1] - ‘0’), 250 * (a[x][y + 1] - ‘0’), 10 * (a[x][y + 1] - ‘0’), 12, 50 * (a[x][y + 1] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x][y + 1] = ’@’; a[x][y] = ’ ’; y++; a[x][y] = ’ ’; } else if (a[x][y + 1] == ‘I’) { cout << “你是否要退出?” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x][y + 1] == ‘o’) { cout << “你通关了” << endl; if (nowlevel + 1 == l) { nowlevel++; } _getch(); return 0; } else if (a[x][y + 1] == ‘P’) { int m1 = rand() % 50; int m2 = rand() % 2; int m3 = rand() % 2; int m4 = rand() % 2; int m5 = rand() % 2; int m6 = rand() % 2; cout << “你获得了:” << endl; cout << m1 << “元” << endl; cout << m2 << “瓶生命药水” << endl; cout << m3 << “瓶防御药水” << endl; cout << m4 << “瓶攻击药水” << endl; cout << m5 << “瓶经验药水” << endl; cout << m6 << “瓶全幅药水” << endl; money += m1; bag[19] += m2; bag[20] += m3; bag[21] += m4; bag[22] += m5; bag[23] += m6; _getch(); a[x][y + 1] = ’@’; a[x][y] = ’ ’; y++; } else if (a[x][y + 1] == ‘S’) { poisonshop(); } else if (a[x][y + 1] == ‘B’) { bookshop(); } else if (a[x][y + 1] == ‘T’) { NoticeBoard(l, x, y + 1); } else if (a[x][y + 1] == ‘0’ && l == 10) { a[x][y] = ‘0’; x = 7; y = 12; a[x][y] = ’@’; } else if (a[x][y + 1] == ‘X’ && l == 12) { a[x][y] = ’ ’; x = 9; y = 49; a[x][y] = ’@’; } else if (a[x][y + 1] != ’#’) { a[x][y + 1] = ’@’; a[x][y] = ’ ’; y++; } if (l == 9 && x == 4 && y == 4) { a[x][y + 2] = ’@’; a[x][y] = ’ ’; y += 2; } } if (ch == ‘w’) { if (‘0’ < a[x - 1][y] && a[x - 1][y] <= ‘9’) { cout << “你遇到了” << (int)(a[x - 1][y] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 1000 * (a[x - 1][y] - ‘0’), 250 * (a[x - 1][y] - ‘0’), 10 * (a[x - 1][y] - ‘0’), 12, 50 * (a[x - 1][y] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x - 1][y] = ’@’; a[x][y] = ’ ’; x—; a[x][y] = ’ ’; } else if (a[x - 1][y] == ‘I’) { cout << “你是否要退出?” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x - 1][y] == ‘o’) { cout << “你通关了” << endl; if (nowlevel + 1 == l) { nowlevel++; } _getch(); return 0; } else if (a[x - 1][y] == ‘P’) { int m1 = rand() % 50; int m2 = rand() % 2; int m3 = rand() % 2; int m4 = rand() % 2; int m5 = rand() % 2; int m6 = rand() % 2; cout << “你获得了:” << endl; cout << m1 << “元” << endl; cout << m2 << “瓶生命药水” << endl; cout << m3 << “瓶防御药水” << endl; cout << m4 << “瓶攻击药水” << endl; cout << m5 << “瓶经验药水” << endl; cout << m6 << “瓶全幅药水” << endl; money += m1; bag[19] += m2; bag[20] += m3; bag[21] += m4; bag[22] += m5; bag[23] += m6; _getch(); a[x - 1][y] = ’@’; a[x][y] = ’ ’; x—; } else if (a[x - 1][y] == ‘S’) { poisonshop(); } else if (a[x - 1][y] == ‘B’) { bookshop(); } else if (a[x - 1][y] == ‘T’) { NoticeBoard(l, x - 1, y); } else if (a[x - 1][y] == ‘0’ && l == 10) { a[x][y] = ‘0’; x = 7; y = 12; a[x][y] = ’@’; } else if (a[x - 1][y] == ‘X’ && l == 12) { a[x][y] = ’ ’; x = 9; y = 49; a[x][y] = ’@’; } else if (a[x - 1][y] != ’#’) { a[x - 1][y] = ’@’; a[x][y] = ’ ’; x -= 1; } } if (ch == ‘s’) { if (a[x + 1][y] == ’ ’) { a[x + 1][y] = ’@’; a[x][y] = ’ ’; x += 1; } else if (‘0’ < a[x + 1][y] && a[x + 1][y] <= ‘9’) { cout << “你遇到了” << (int)(a[x + 1][y] - ‘0’) << “级怪物,迎战吧!”; fight(“怪物”, 20000 * (a[x + 1][y] - ‘0’), 5000 * (a[x + 1][y] - ‘0’), 200 * (a[x + 1][y] - ‘0’), 240, 50 * (a[x + 1][y] - ‘0’)); if (dead) { Sleep(1000); return 0; } a[x + 1][y] = ’@’; a[x][y] = ’ ’; x++; a[x][y] = ’ ’; } else if (a[x + 1][y] == ‘I’) { cout << “你是否要退出?” << endl; cout << “1确定 2取消” << endl; int num; cin >> num; if (num == 1) { break; } } else if (a[x + 1][y] == ‘o’) { cout << “你通关了” << endl; if (nowlevel + 1 == l) { nowlevel++; } _getch(); return 0; } else if (a[x + 1][y] == ‘P’) { int m1 = rand() % 50; int m2 = rand() % 2; int m3 = rand() % 2; int m4 = rand() % 2; int m5 = rand() % 2; int m6 = rand() % 2; cout << “你获得了:” << endl; cout << m1 << “元” << endl; cout << m2 << “瓶生命药水” << endl; cout << m3 << “瓶防御药水” << endl; cout << m4 << “瓶攻击药水” << endl; cout << m5 << “瓶经验药水” << endl; cout << m6 << “瓶全幅药水” << endl; money += m1; bag[19] += m2; bag[20] += m3; bag[21] += m4; bag[22] += m5; bag[23] += m6; _getch(); a[x + 1][y] = ’@’; a[x][y] = ’ ’; x++; } else if (a[x + 1][y] == ‘S’) { poisonshop(); } else if (a[x + 1][y] == ‘B’) { bookshop(); } else if (a[x + 1][y] == ‘T’) { NoticeBoard(l, x + 1, y); } else if (a[x + 1][y] == ‘0’ && l == 10) { a[x][y] = ‘0’; x = 7; y = 12; a[x][y] = ’@’; } else if (a[x + 1][y] == ‘X’ && l == 12) { a[x][y] = ’ ’; x = 9; y = 49; a[x][y] = ’@’; } else if (a[x + 1][y] != ’#’) { a[x + 1][y] = ’@’; a[x][y] = ’ ’; x++; } } } return 0; } int MM() { if (amm == 0) { int lie = 0; cout << ”…建议45级打,飘升80级…” << endl; cout << “攻击即可获得:” << endl; cout << “抽奖券100 技能书昏昏倒地或技能书铁甲咒 全幅药水50”; cout << ” 金币2000 经验石X500” << endl; cout << ” 1攻击 2变强后再来” << endl; int a; cin >> a; if (a == 1) { cout << “你来到了魔法部大门” << endl; Sleep(1000); cout << “魔法部大门看守:你来这干嘛!” << endl; Sleep(1000); cout << “1抢劫! 2办事的。” << endl; cin >> a; if (a == 1) cout << “魔法部大门看守:拦下他!” << endl; else { if (camp) cout << “魔法部大门看守:不可能,你是伏地魔的人!” << endl; else { cout << “魔法部大门看守仔细一看。” << endl; Sleep(1000); cout << “魔法部大门看守:他是哈利波特的人,抓了他问哈利波特下落!” << endl; } } Sleep(1000); fight(“大门看守”, 20000, 2000, 200, 20, 1000); if (dead) return 0; fight(“大门看守”, 20000, 2000, 200, 20, 1000); if (dead) return 0; cout << “减少100滴血” << endl; health -= 100; Sleep(1000); cout << “你踢开了大门” << endl; Sleep(1000); cout << “里面的几个雕像活了” << endl; Sleep(1000); fight(“雕像”, 100000, 2000, 200, 20, 5000); if (dead) return 0; fight(“雕像”, 100000, 2000, 200, 20, 5000); if (dead) return 0; fight(“雕像”, 100000, 2000, 200, 20, 5000); if (dead) return 0; cout << “减少500滴血” << endl; health -= 500; cout << “你杀死了雕像后, 正准备往楼上走” << endl; Sleep(1000); cout << “突然一群员工跑了过来” << endl; Sleep(1000); cout << “员工:这是你干你的吗” << endl; Sleep(1000); cout << “1,撒谎 其他,是!” << endl; cin >> a; if (a == 1) { cout << “员工:是谁干的?” << endl; Sleep(1000); cout << “你随便指了一个员工” << endl; Sleep(1000); cout << “他!” << endl; Sleep(1000); cout << “那群员工匆匆跑了过去” << endl; Sleep(1000); cout << “你赶快跑上楼梯” << endl; Sleep(1000); lie = 1; } else { cout << “员工:干掉他!” << endl; Sleep(1000); fight(“员工”, 30000, 2000, 1000, 140, 1000); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 140, 1000); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 140, 1000); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 150, 1000); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 170, 1000); if (dead) return 0; if (rand() % 3 == 0) { cout << “你获得了技能书铁甲咒” << endl; bag[7]++; Sleep(1000); } cout << “你赶快跑上楼梯” << endl; health -= 500; } Sleep(1000); cout << “你遇到了副部长” << endl; Sleep(1000); fight(“副部长”, 100000, 10000, 1000, 200, 30000); health -= 5000; if (dead) return 0; if (lie) { cout << “上次的员工跑了过来” << endl; Sleep(1000); cout << “员工:你,你骗了我们!” << endl; Sleep(1000); fight(“员工”, 30000, 2000, 1000, 140, 1000); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 140, 1000); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 140, 1000); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 150, 1500); if (dead) return 0; fight(“员工”, 30000, 2000, 1000, 170, 2000); if (dead) return 0; if (rand() % 3 == 0){ cout << “你获得了技能书铁甲咒” << endl; bag[7]++; Sleep(1000); } health -= 500; } cout << “你遇到了部长”; fight(“部长”, 150000, 15000, 1500, 200, 4000); if (dead) return 0; cout << “你获得:” << endl; cout << “抽奖券10 技能书昏昏倒地或技能书铁甲咒 全幅药水5”; cout << ” 金币200 经验石X5” << endl; bag[0] += 10; bag[8]++; bag[23] += 5; money += 200; bag[5] += 5; Sleep(3000); cout << “你遇到了金挂坠盒”; fight(“金挂坠盒”,500000,100000,3000,500,40000); if(dead)return 0; cout << “你获得:” << endl; cout << “抽奖券10 技能书昏昏倒地或技能书铁甲咒 全幅药水5”; cout << ” 金币200 经验石X30” << endl; bag[0] += 10; bag[8]++; bag[23] += 5; money += 200; bag[5] += 30; amm = 1;cishu++; Sleep(3000); } else if (a == 2) return 0; else { cout << “请勿乱输”; Sleep(1000); } } else { cout << “你已占领魔法部 可以进入以下地方” << endl; cout << “0,退出 1,泡温泉 2,矿洞 3,探险” << endl; int b; cin >> b; switch (b) { case 0: break; case 1: time_t c_start, t_start, c_end, t_end; c_start = clock(); t_start = time(NULL); cout << “正在泡温泉 按下任意键停止” << endl; _getch(); c_end = clock(); t_end = time(NULL); cout << “你获得” << (int)difftime(c_end, c_start) / 100 << “元” << endl; cout << “你获得” << (int)difftime(c_end, c_start) / 10 << “经验” << endl; experience += (int)difftime(c_end, c_start) / 10; money += (int)difftime(c_end, c_start) / 100; _getch(); paosu++; if(paosu>100&&baojian==1&&cishu==3){ cout<<“恭喜你遇到了纳吉尼!“<<endl; cout<<“它派出了20名食死徒!“<<endl; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 30, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; fight(“食死徒”, 15000, 3000, 300, 5, 750); if(dead)return 0; cout<<“纳吉尼的人数优势竟然淹没不了你!它派出了五名真食死徒!“<<endl; fight(“真食死徒”, 30000,6000, 600, 10, 1500); if(dead)return 0; fight(“真食死徒”, 30000,6000, 600, 10, 1500); if(dead)return 0; fight(“真食死徒”, 30000,6000, 600, 10, 1500); if(dead)return 0; fight(“真食死徒”, 30000,6000, 600, 10, 1500); if(dead)return 0; fight(“真食死徒”, 30000,6000, 600, 10, 1500); if(dead)return 0; cout<<“你怎么又赢了?三名精食死徒,上!“<<endl; fight(“精食死徒”, 90000,18000, 1800, 30, 4500); if(dead)return 0; fight(“精食死徒”, 90000,18000, 1800, 30, 4500); if(dead)return 0; fight(“精食死徒”, 90000,18000, 1800, 30, 4500); if(dead)return 0; cout<<“纳吉尼亲自上场!“<<endl; fight(“纳吉尼”, 900000,180000, 18000, 300, 45000); if(dead)return 0; cout<<“你不可思议的赢了?你差不多能打伏地魔了”; cishu++; } break; case 2: cout << “你走进矿洞” << endl; Sleep(1000); ict++; ict=5; if(ict>250){ cout<<“你怎么那么喜欢挖矿,你吸到了毒气。“<<endl; health-=5000; } if(ict>300){ cout<<“既然你那么坚持,那就扣十万滴血吧!“<<endl; if(health<=0){ cout<<“让你作死!“<<endl; return 0; } else{ cout<<“呵呵,你居然还没死!“<<endl; cout<<“上天奖励你哈利波特的血脉!“<<endl; harrypotter=1; } } if(ict>30&&cishu==4){ cout<<“你遇到了里德尔的日记本,跟它决战吧!“<<endl; cout<<“它召唤了蛇怪!“<<endl; fight(“蛇怪”,50000,3000,500,60,10000); if (dead)return 0; cout<<“太棒了!”<<endl; cout<<“日记本召唤了里德尔!“<<endl; fight(“里德尔”,300000,20000,3000,400,60000); if(dead)return 0; cout<<“太棒了!你击败了里德尔!“<<endl; cout<<“日记本被激怒了,你要和他决战!“<<endl; fight(“日记本”,1200000,80000,12000,2000,250000); if(dead)return 0; cout<<“你胜利了!”; cishu++; } if (ict == 5) cout << “你不小心靠在墙上,触发了机关” << endl; else if (ict > 5) cout << “你找到原来触发机关的地方,按下那块岩石,密道又出现了” << endl; cout << “0,退出 1,挖矿”; if (ict > 4) cout << ” 2,暗道”; cout << endl; int c; cin >> c; if (c == 1) dig(); else if (c == 2 && ict > 4) { cout << “你走进暗道” << endl; _getch(); cout << “你发现了一个完全不同的世界,里面充满了怪物” << endl; _getch(); cout << “每去一个地方都有可能遇到他们” << endl; _getch(); cout << “但你有一种直觉,穿过这个森林,就能找到某些东西” << endl; _getch(); MessageBox(0, TEXT(“建议 生命>60000 攻击>20000 防御>2000 速度>1000 时来打”), TEXT(“重要提示”), MB_OK); if (MessageBox(0, TEXT(“用 wasd 移动,o出口,I入口,@你”), TEXT(“重要提示”), MB_OKCANCEL | MB_ICONINFORMATION) != IDOK){ MessageBox(0, TEXT(“下次再来吧!”), TEXT(“重要提示”), MB_OK); return 0; }; cout << “开始吧!” << endl; maze(); } else cout << “请勿乱输” << endl; Sleep(1000); break; case 3: cout<<“你确定要探险吗?“<<endl; cout<<“1.要 2.不要”<<endl; int s; cin>>s; if(s==1){ cout<<“太好了!让我们前进吧!“<<endl; cout<<“请选择难度:“<<endl; cout<<“1.简单 2.正常 3.困难 ”; int ss; cin>>ss; if(ss==1){ if(rand()%3==0){ cout<<“你遇到了海格!“<<endl; cout<<“海格帮助你获得了一些能量!“<<endl; maxhealth+=500; cout<<“但是海格养的一些动物使你受到了伤害!“<<endl; health-=10000; cout<<“再见!“<<endl; } if(rand()%3==1){ cout<<“你遇到了怪兽!“<<endl; cout<<“杀死它吧!“<<endl; fight(“怪兽”,50000,3000,200,30,6000); if (dead) return 0; cout<<“你获得了一套铠甲!“<<endl; defense+=200; } else{ cout<<“你又遇到了海格!“<<endl; cout<<“海格遇到了麻烦,愿意帮助它吗?“<<endl; cout<<“他想养一只火龙,但是要先打败火龙才能哦!”; cout<<“1.要 2.不要”<<endl; int sss; cin>>sss; if(sss==1){ fight(“火龙”,120000,8000,1200,200,25000); if(dead)return 0; cout<<“你太棒了!海格送给了你一把宝剑!“<<endl; attack+=300; } if(sss=2){ cout<<“受死吧!“<<endl; return 0; } } } if(ss==2){ if(rand()%4==0){ cout<<“你遇到了西弗勒斯。“<<endl; cout<<“恭喜你,他故意找你碴,你受到了伤害!“<<endl; health-=5000; } if(rand()%4==1){ cout<<“你遇到了一面镜子,要看吗?“<<endl; cout<<“1.要 2.不要”<<endl; int ss; if(ss==1){ cout<<“你发现这面镜子找出了你内心最深处的渴望,决定第二天还来。“<<endl; cout<<“第二天你又来了,结果发现邓布利多早已在此等着你。“<<endl; int sss; cout<<“你要逃跑吗?“<<endl; cout<<“1.要 2.不要”<<endl; if(sss==1){ cout<<“你死了!“<<endl; return 0; } else{ cout<<“至此,你与邓布利多成为了好友!“<<endl; cout<<“作者决定奖励你!“<<endl; speed+=100; } } else{ cout<<“你死了!“<<endl; return 0; } } if(rand()%4==2){ cout<<“德拉科故意挑衅你,要揍他吗?“<<endl; int ss; cout<<“1.要 2.不要”<<endl; if(ss==1){ if(rand()%2==0){ cout<<“你被斯内普发现,被暴打了一顿!“<<endl; health-=10000; } else{ cout<<“你被麦格发现,被报答了一顿!“<<endl; attack+=500; } } } if(rand()%4==3){ if(attack>200000){ cout<<“你做了一个奇怪的梦,是否去神秘事务司?“<<endl; cout<<“1.去 2.不去”<<endl; int ss; cin>>ss; if(ss==1){ cout<<“你遇到了一群食死徒!“<<endl; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; fight(“食死徒”,30000,8000,1200,200,2500); if(dead)return 0; cout<<“很好,你打败了食死徒,获得了一张地图”<<endl; } else{ cout<<“不去?去死吧!“<<endl; return 0; } } } } if(ss==3){ if(rand()%2==0){ cout<<“这里到处都是毒气!“<<endl; if(health<200000){ cout<<“由于你太菜了,所以你被毒死了。“<<endl; } else{ cout<<“体质很好,上天决定奖励你!“<<endl; for(int i=1;i<=100;i++){ cout<<endl; } cout<<“奖励你扣五万滴血!“<<endl; } } else{ cout<<“你遇到了一个金库!“<<endl; cout<<“你要抢劫吗?“<<endl; cout<<“1.要 2.不要”<<endl; int sss; cin>>sss; if(sss==1){ cout<<“作者就想要这样的人!“<<endl; bag[5] +=2; } else{ cout<<“好东西摆在眼前都不要!去死吧!“<<endl; return 0; } } } } } } return 0; } int finalfight(string Hname) { int hisH = 1000000, hisA = 100000, hisD = 50000, hisSP = 50; int hfaint = 0, hhurt = 0, hbeat = 0; int mfaint = 0, mhurt = 0; dead = false; int ha = hisA; int his = hisA + hisD + hisH; while (1) { cout<<“你遇到了伏地魔手下的100名食死徒!“<<endl; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; fight(“食死徒”,50000,10000,500,100,5000); if(dead)return 0; cout<<“你已经打败了50个食死徒!其他的被吓跑了!“<<endl; cout<<“伏地魔派出了巨人!“<<endl; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; fight(“巨人”,100000,20000,1000,200,10000); if(dead)return 0; cout<<“伏地魔的核心集团出现!“<<endl; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; fight(“核心食死徒”,500000,100000,5000,1000,50000); if(dead)return 0; cout<<“伏地魔最后的支持者镊魂怪出现!“<<endl; fight(“镊魂怪”,1000000,200000,10000,2000,100000); if(dead)return 0; fight(“镊魂怪”,1000000,200000,10000,2000,100000); if(dead)return 0; fight(“镊魂怪”,1000000,200000,10000,2000,100000); if(dead)return 0; cout<<“可以!你经过了考验!迎接伏地魔的洗礼吧!“<<endl; if (hfaint > 0) { if (rand() % 3 == 0) { cout << “对方使用技能:咒立停!停止了魔咒” << endl; hfaint = 1; } hfaint -= 1; } if (hbeat == 1) { if (rand() % 10 == 0) { cout << “对方一躲,躲过了你的石头” << endl; hbeat = 0; } else { cout << “对方躲闪不急,石头正好撞在他的鼻子上 扣血50滴” << endl; hisH -= 50; } } if (mfaint > 0) { if (Sl[6]) mfaint = 0; else mfaint -= 1; } if (mhurt > 0) { if (Sl[6]) mhurt = 0; else { mhurt -= 1; cout << “你的心像被一把刀刺穿了一样 扣血200滴” << endl; health -= 200; } } if (mfaint <= 0) { if(zhuoshao>0){ cout<<“敌人正被灼烧着呢!“<<endl; zhuoshao—; hisH-=100; } if(piaoxin>0){ cout<<“敌人正被你打的往墙上撞呢!“<<endl; piaoxin—; hisH-=150; } if(jiangong>0){ cout<<“敌人攻击百分比减少。“<<endl; jiangong—; hisA=hisA7/8; } if(tengtong>0){ cout<<“敌人的伤口正在流血。“<<endl; tengtong—; hisH-=300; } if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<3){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/43; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人只剩1滴血了。“<<endl; hisH=1; } else{ cout<<“很不幸,敌人强大的防御把他挡住了。“<<endl; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加十万。“<<endl; health+=100000; } if(rand()%3==2==1){ cout<<“你的防御加三万。“<<endl; defense+=30000; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } if (rand() % 3 && Sl[0]) { cout << “你使用技能快快复苏 生命增加200” << endl; health += 200; } if (rand() % 3 && Sl[1]) { cout << “你使用技能铁甲护身 生命增加100 防御增加50” << endl; health += 100; defense += 50; } if (rand() % 3 && Sl[2]) { cout << “你使用技能昏昏倒地 ” << Hname << “一回合之内不能攻击” << endl; hfaint += 1; } if (rand() % 3 && Sl[3]) { cout << “你使用技能神锋无影 攻击增加200 对方扣血200滴” << endl; hisH -= 200; attack += 200; } if (rand() % 3 && Sl[5]) { if (rand() % 10) { cout << “你使用技能统统石化 ” << Hname << “二回合之内不能攻击” << endl; hfaint += 2; } else { cout << “你使用技能统统石化 ” << Hname << “十回合之内不能攻击” << endl; hfaint += 10; } } if (rand() % 4 == 0 && Sl[7]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; hisH = monsterfight(Hname, hisH, hisA, hisD, 23, hisSP); if (hisH < 1&&cishu>4) { cout << “对方死亡” << endl; Sleep(1000); cout << “全部人都来庆祝你” << endl; Sleep(1000); cout << “突然,” << Hname << “的魔杖一转,指向了你。” << endl; Sleep(1000); cout << “里面发出一束红色的光柱” << endl; Sleep(1000); cout <<“对方暴怒了!“<<endl; fight(“伏地魔2级”,10000000,1000000,50000,10000,50000); if(dead)return 0; cout<<“很好,但伏地魔又升级了!“<<endl; fight(“伏地魔3级”,100000000,10000000,500000,100000,50000); if(dead)return 0; cout<<“太棒了,但伏地魔暴怒了!“<<endl; fight(“伏地魔暴怒4等级”,1000000000,100000000,5000000,1000000,50000); if(dead)return 0; cout<<“你这也能赢?但伏地魔远远不止这点实力!“<<endl; fight(“伏地魔6等级”,2147483647,2147483647,2147483647,2147483647,50000); if(dead)return 0; cout<<“你胜利了,所有人都来祝贺你。“<<endl; cout<<“突然,一阵金光闪过。“<<endl; cout<<“伏地魔最后的实力爆发了!!!“<<endl; if(attack>2147483647){ cout<<“你的一击打死了伏地魔。“<<endl; cout<<“全剧终!“<<endl; } if(harrypotter==1){ cout<<“你意识到自己的真实身份,血脉压制了伏地魔,你胜利了!“<<endl; cout<<“你胜利了!!!!!!!!!!!!!!!!!!!!“<<endl; for(int i=1;i<=10000;i++){ cout<<“你赢得了游戏!!!“<<endl; } } return 0; } if(hisH<1&&cishu<=4){ cout<<“唉,你死了。“<<endl; return 0; } if (Sl[0]) { cout << “在对方和石怪的战斗中,你已经恢复了2000生命” << endl; if (maxhealth < health + 2000) health = maxhealth; else health += 2000; } } if (rand() % 4 == 0 && Sl[8]) { cout << “你使用技能召唤咒!召唤出石怪跟” << Hname << “战斗” << endl; } if (rand() % 3 && Sl[9]) { cout << “你使用技能万弹齐发!变出几十块石头” << endl; hbeat = 1; } if (rand() % 3 && Sl[10]) { cout << “你使用技能钻心咒!对方将疼痛5回合” << endl; hhurt += 5; } if (rand() % 3 && Sl[11]) { cout << “魂魄出窍!你使用夺魂咒,企图让” << Hname << “自己攻击自己!” << endl; Sleep((rand() % 2000) + 1000); cout << Hname << “被你控制了,开始攻击自己” << endl; Sleep(700); int ran = rand() % 40 - 20; if (hisA + ran > hisD) { cout << “对方发起进攻 自己扣血” << hisH - hisD + ran << “滴 剩余” << hisH - (hisA - hisD + ran) << “滴” << endl; hisH -= hisA - hisD + ran; } else cout << “对方发起进攻 自己扣血0滴 剩余” << hisH << “滴” << endl; } if (rand() % 2 && Sl[12]) { cout << “你使用技能阿瓦达索命 ” << Hname << “扣血” << hisH - hisH / 4 << “滴” << endl; hisH /= 4; } Sleep(1000); int ran = rand() % 40 - 20; if (rand() % 10000 > hisSP) { if (attack + ran > hisD) { cout << “你发起进攻 ” << Hname << “扣血” << attack - hisD + ran << “滴 剩余” << hisH - (attack - hisD + ran) << “滴” << endl; hisH -= attack - hisD + ran; } else cout << “你发起进攻 ” << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } else { if (rand() % 2) cout << “你一脚踹了过去,但没有踢中” << endl; else { cout << “你一脚踹了过去,但只擦着了腰” << endl; if ((attack / 3) + ran > hisD) { cout << Hname << “扣血” << (attack / 3) + ran - hisD << “滴 剩余” << hisH - ((attack / 3) + ran - hisD) << “滴” << endl; hisH -= (attack / 3) + ran - hisD; } else cout << Hname << “扣血0滴 剩余” << hisH << “滴” << endl; } } } Sleep(700); if (hhurt > 0) { hhurt -= 1; cout << “对方因中了你的钻心咒,正捂着心大叫呢 扣血200滴” << endl; hisH -= 200; } if (hisH <= 0) { if (rand() % 3 == 0) { cout << “对方发动技能:恢复如初 满血复活” << endl; hisH = ha; Sleep(1000); } if (hisH < 1&&cishu>4) { cout << “对方死亡” << endl; Sleep(1000); cout << “全部人都来庆祝你” << endl; Sleep(1000); cout << “突然,” << Hname << “的魔杖一转,指向了你。” << endl; Sleep(1000); cout << “里面发出一束红色的光柱” << endl; Sleep(1000); cout <<“对方暴怒了!“<<endl; fight(“伏地魔2级”,10000000,1000000,50000,10000,50000); if(dead)return 0; cout<<“很好,但伏地魔又升级了!“<<endl; fight(“伏地魔3级”,100000000,10000000,500000,100000,50000); if(dead)return 0; cout<<“太棒了,但伏地魔暴怒了!“<<endl; fight(“伏地魔暴怒4等级”,1000000000,100000000,5000000,1000000,50000); if(dead)return 0; cout<<“你这也能赢?但伏地魔远远不止这点实力!“<<endl; fight(“伏地魔6等级”,2147483647,2147483647,2147483647,2147483647,50000); if(dead)return 0; cout<<“你胜利了,所有人都来祝贺你。“<<endl; cout<<“突然,一阵金光闪过。“<<endl; cout<<“伏地魔最后的实力爆发了!!!“<<endl; if(attack>2147483647){ cout<<“你的一击打死了伏地魔。“<<endl; cout<<“全剧终!“<<endl; } if(harrypotter==1){ cout<<“你意识到自己的真实身份,血脉压制了伏地魔,你胜利了!“<<endl; cout<<“你胜利了!!!!!!!!!!!!!!!!!!!!“<<endl; for(int i=1;i<=10000;i++){ cout<<“你赢得了游戏!!!“<<endl; } } return 0; } } if(rand()%3&&Sl[18]==1){ cout<<“你使用技能火焰熊熊 敌人被灼烧了。“<<endl; zhuoshao+=10; } if(rand()%3&&Sl[19]==1){ cout<<“你使用技能五花大绑 敌人被捆住了。“<<endl; hfaint+=1; } if(rand()%3&&Sl[20]==1){ cout<<“你使用技能僵尸飘行 敌人被扔到了窗外。“<<endl; piaoxin+=5; } if(rand()%3&&Sl[21]==1){ cout<<“你使用技能力松劲泄 敌人攻击百分比减少。“<<endl; jiangong+=2; } if(rand()%3&&Sl[22]==1){ cout<<“你使用技能四分五裂 敌人的手上出现一道道伤口。“<<endl; tengtong+=2; } if(rand()%3&&Sl[13]==1){ cout << “你使用技能霹雳爆炸 扣血300滴。” << endl; hisH-=300; } if(rand()%3&&Sl[14]==1){ cout<<“你使用技能飞沙走石 扣血500滴。“<<endl; hisH-=500; } if(rand()%3&&Sl[15]==1){ if(rand()%4<3){ cout<<“你使用技能惊天炸雷 敌人扣血一半。“<<endl; hisH=hisH-hisH/4*3; } else{ cout<<“恭喜你,敌人躲开了。“<<endl; } } if(rand()%3&&Sl[16]==1){ if(rand()%2){ cout<<“毁天灭地击中了敌人,敌人只剩1滴血了。“<<endl; hisH=1; } else{ cout<<“很不幸,敌人强大的防御挡住了致命一击。“<<endl; } } if(rand()%3&&Sl[17]==1){ if(rand()%3==1){ cout<<“你的生命加十万。“<<endl; health+=100000; } if(rand()%3==2){ cout<<“你的防御加三万。“<<endl; defense+=30000; } else{ cout<<“你给了敌人致命一击,敌人生命减半。“<<endl; hisH/=2; } } if (rand() % 3 == 0) { cout << “对方发动技能:快快复苏 生命加200” << endl; hisH += 200; } if (rand() % 3 == 0) { cout << “对方发动技能:盔甲护身 生命加50 防御增加50” << endl; hisH += 50; hisD += 50; } if (rand() % 3 == 0) { cout << “对方使用技能神锋无影 攻击增加200 扣血200滴” << endl; health -= 200; hisA += 200; } if (rand() % 3 == 0) { cout << “对方使用技能昏昏倒地 ” << name << “一回合之内不能攻击” << endl; mfaint += 1; } if (rand() % 3 == 0) { if (rand() % 10) { cout << “对方使用技能统统石化 ” << name << “二回合之内不能攻击” << endl; mfaint += 2; } else { cout << “对方使用技能统统石化 ” << name << “十回合之内不能攻击” << endl; mfaint += 10; } } if (rand() % 3 == 0) { cout << “对方使用技能阿瓦达索命 ” << name << “扣血” << health - health / 4 << “滴” << endl; health /= 4; } Sleep(1000); if (hfaint <= 0) { int ran = rand() % 40 - 20; if (rand() % 10000 > speed) { if (hisA + ran > defense) { cout << Hname << “发起进攻 ” << “你扣血” << hisA - defense + ran << “滴 剩余” << health - (hisA - defense + ran) << “滴” << endl; health -= hisA - defense + ran; } else cout << Hname << “发起进攻 ” << “你扣血0滴 剩余” << health << “滴” << endl; } else { if (rand() % 2) cout << Hname << “一脚踹了过来,但没有踢中” << endl; else { if ((hisA / 3) + ran > hisD) { cout << Hname << “发起进攻 你扣血” << (hisA / 3) + ran - defense << “滴 剩余” << health - ((hisA / 3) + ran - defense) << “滴” << endl; health -= ((hisA / 3) + ran - defense); } else cout << Hname << “发起进攻 ” << “你扣血0滴 剩余” << health << “滴” << endl; } } Sleep(1000); if (health <= 0) { if (Sl[6] && rand() % 2) { cout << “你发动技能:恢复如初 满血复活” << endl; health = maxhealth; Sleep(1000); } else { cout << “你死亡”; health = 20; dead = true; return 0; } } } } return 0; } int main() { if(health>1000||attack>200||defense>10||speed>10||level>1||experience>0||money>0||harrypotter==1){ cout<<“你不知道我专克外挂吗?“<<endl; return 0; } cout<<“你成年后才能在次打败伏地魔,先开启幼年模式!“<<endl; xuanzerenwu(); xiaoshi(); yinianji(); ernianji(); sannianji(); sinianji(); wunianji(); liunianji(); dabaifudimozhilv(); int isbreak; isbreak = false; if (MessageBox(0, TEXT(“除输入名字外,请不要输入任何字符,否则将导致游戏崩溃!”), TEXT(“重要提示”), MB_OKCANCEL | MB_ICONINFORMATION) != IDOK) { MessageBox(0, TEXT(“既然你不同意,那就别玩了”), TEXT(“重要提示”), MB_OK); return 0; }; srand((unsigned)time(NULL)); cout << ” 1.2.9 \n”; cout << ” MagicWorld—HarryPotter \n”; cout << ” \n”; cout << ” / > \n”; cout << ” / > / \n”; cout << ” < _____ > / \n”; cout << ” |-O—O-| / \n”; cout << ” / == - . / \n”; cout << ” / . [ ] \n”; cout << ” / /` ___/ \n”; cout << ” \n”; cout << ” by evan\n”; cout << “输入‘start’开始游戏 \n”; string start; cin >> start; for (int i = 8; i < 100; i++) wandname[i] = “1”; if (start == “start”) { int i; system(“cls”); for (i = 0; i < 20; i++) { cout << “loading…” << endl << ”--------------------------” << endl << ” ”; for (int j = 0; j <= i % 5; j++) cout << ”+==+”; cout << ” ” << endl << ”--------------------------” << endl; switch (rand() % 4) { case 0: cout << “打怪是升级和提升战力的好方法。” << endl; break; case 1: cout << “开始游戏时记得选择阵营。” << endl; break; case 2: cout << “退出时要保存。” << endl; break; case 3: cout << “新手开始游戏时会有3瓶经验药水1张抽奖券。” << endl; break; } Sleep(250); system(“cls”); } while (1) { isbreak = false; cout << “1,登录 2,注册”; int a; cin >> a; if (a == 1) login(); else Reg(); while (1) { if (isbreak) { break; } system(“cls”); cout << “魔法人士:” << name << endl; cout << “势力:”; if (camp) cout << “伏地魔” << endl; else cout << “哈利波特” << endl; cout << “生命:” << health << ”/” << maxhealth << endl; cout << “攻击:” << attack << endl; cout << “防御:” << defense << endl; cout << “速度:” << speed << endl; cout << “等级:” << level << endl; cout << “经验:” << experience << ”/” << level * 100 << endl; cout << “金币:” << money << endl; cout << “1,魔法部(攻击即可占领) 2,大街(杀人/阻止食死徒) 3,”; if (camp) cout << “霍格沃茨(哈利波特不在) ”; else cout << “马尔福庄园(伏地魔不在) ”; cout << “4,霍格沃茨(最后战场) 5,奥利凡德魔杖商店 6,抽奖 7,经验石店 8,背包 9,工厂 10,对角巷 11,古灵阁 12,终极任务 13,副本 14,保存 ”; if (camp) cout << “15, 医疗兵(伏地魔的)”; else cout << “15, 庞弗雷女士 ”; cout << “16,改变参数(测试专用 需要密码) 17,设置 ” << endl; if(camp==0&&nianlin<=17){ cout<<“18,霍格沃茨(学校)“<<endl; } cout<<“如果要去以下商店请先去对角巷。“<<endl; cout<<“19,魁地奇精品店 20,博金博客 21,咒语书商店 22,古灵阁”<<endl; cout<<“温馨提示:“<<endl; cout<<“要去对角巷请先服用药水。“<<endl; cin >> a; switch (a) { case 1: MM(); break; case 2: street(); break; case 3: for (int i = 1; i < 100; i++) { cout << ”|”; for (int j = 0; j < 10 && i < 100; j++, i++) { if (nowlevel + 1 < i) cout << ” ” << i << ” |”; else cout << ”:” << i << ”:|”; } cout << endl; } int num; cin >> num; if (nowlevel + 1 < num) cout << “你未解锁这关” << endl; else checkpoint(num); Sleep(1000); break; case 4: if (camp) { if (f) finalfight(“哈利·波特”); else cout << “你需要先寻找哈利波特的下落” << endl; } else { if (f) finalfight(“伏地魔”); else cout << “你需要先寻找伏地魔的下落” << endl; } Sleep(1000); break; case 5: cout << “1 柳条独角兽尾毛魔杖 100元” << endl; cout << “2 胡桃木龙神经魔杖 200元” << endl; cout << “3 鹅耳枥木魔杖 550元” << endl; cout << “4 柳条魔杖 1200元” << endl; cout << “5 花心木魔杖 3650元” << endl; cout << “6 冬青木凤凰羽毛魔杖 5780元” << endl; cout << “7 紫杉木凤凰羽毛魔杖 7120元” << endl; cout << “8 老魔杖 50000元” << endl; cout << “0 退出 0元” << endl; int b; cin >> b; switch (b) { case 1: buywand(6, 100); system(“cls”); break; case 2: buywand(7, 200); system(“cls”); break; case 3: buywand(8, 550); system(“cls”); break; case 4: buywand(9, 1200); system(“cls”); break; case 5: buywand(10, 3650); system(“cls”); break; case 6: buywand(11, 5780); system(“cls”); break; case 7: buywand(12, 7120); system(“cls”); break; case 8: buywand(13, 50000); system(“cls”); break; default: break; } break; case 6: LD(); break; case 7: cout << “1 经验石R 100元 100经验” << endl; cout << “2 经验石SR 200元 250经验” << endl; cout << “3 经验石SSR 400元 500经验” << endl; cout << “4 经验石SSS 1000元 1200经验” << endl; cout << “5 经验石X 2000元 2500经验” << endl; cout << “0 退出 0元 0经验” << endl; int c; cin >> c; switch (c) { case 1: buy(1, 100); system(“cls”); break; case 2: buy(2, 200); system(“cls”); break; case 3: buy(3, 550); system(“cls”); break; case 4: buy(4, 1200); system(“cls”); break; case 5: buy(5, 3650); system(“cls”); break; default: break; } break; case 8: cout << “1,查看魔杖 2,查看药水 3,查看经验石 4,学习技能” << endl; cin >> b; if (b == 1) w(); else if (b == 2) p(); else if (b == 3) e(); else if (b == 4) s(); else { cout << “请勿乱输” << endl; Sleep(1000); } break; case 9: int material1, material2, mn1, mn2; cout << “1,制作 2,查看材料”; cin >> material1; if (material1 == 1) { cout << “你要用什么杖芯?” << endl; for (int ij = 0; ij < 9; ij++) cout << ij + 1 << ”,” << Material1name[ij] << ” ” << bag[ij + 24] << “个” << endl; cin >> material1; cout << “几个?” << endl; cin >> mn1; cout << “你要用什么木材?” << endl; for (int ij = 0; ij < 10; ij++) cout << ij + 1 << ”,” << Material2name[ij] << ” ” << bag[ij + 33] << “个” << endl; cin >> material2; cout << “几个?” << endl; cin >> mn2; make(material1 + 23, material2 + 32, mn1, mn2); break; } else if (material1 == 2) { cout << “杖芯:” << endl; for (int ij = 0; ij < 9; ij++) cout << ij + 1 << ”,” << Material1name[ij] << ” ” << bag[ij + 24] << “个” << endl; cout << “木材:” << endl; for (int ij = 0; ij < 10; ij++) cout << ij + 1 << ”,” << Material2name[ij] << ” ” << bag[ij + 33] << “个” << endl; _getch(); } else cout << “请勿乱输”; break; case 10: break; case 11: if (xy == 1) { if (ane == 0) cout << “再闯 1 关副本”; else if (ane == 1) cout << “买两件商品”; else if (ane == 2) cout << “回血一次”; else if (ane == 3) cout << “杀死10个人”; cout << ”(” << D_Of_C << ”/” << OK << ”)” << endl; if (D_Of_C >= OK) { cout << “任务完成!!”; maxhealth += 200; health += 200; defense += 20; xy = 0; bag[43]++; } Sleep(1000); } else { ane = rand() % 4; D_Of_C = 0; xy = 1; if (ane == 0) { cout << “再闯 1 关副本”; OK = 1; } else if (ane == 1) { cout << “买两件商品”; OK = 2; } else if (ane == 2) { cout << “回血一次”; OK = 1; } else if (ane == 3) { cout << “杀死10个人”; OK = 10; } Sleep(1000); } break; case 12: if (xy1 == 1) { if (ane1 == 0) { if (camp) cout << “杀死1个邓布利多”; else cout << “杀死1个纳尼吉”; } else if (ane1 == 1) cout << “消耗5000元”; else if (ane1 == 2) { if (camp) cout << “杀死5个穆迪”; else cout << “杀死5个卢修斯·马尔福”; } else if (ane1 == 3) cout << “杀死100个生物”; else if (ane1 == 4) cout << “再升10级”; cout << ”(” << D_Of_C1 << ”/” << OK1 << ”)” << endl; if (D_Of_C1 >= OK1) { cout << “任务完成!!” << endl; xy1 = 0; cout << “增加500元 攻击力+200 防御力+150 生命+1000 生命上限+1000” << endl; money += 500; attack += 200; health += 1000; maxhealth += 1000; defense += 150; bag[43] += 5; } Sleep(1000); } else { ane1 = rand() % 5; D_Of_C1 = 0; xy1 = 1; if (ane1 == 0) { if (camp) cout << “杀死1个邓布利多”; else cout << “杀死1个纳尼吉”; OK1 = 1; } else if (ane1 == 1) { cout << “消耗5000元”; OK1 = 5000; } else if (ane1 == 2) { if (camp) cout << “杀死5个穆迪”; else cout << “杀死5个卢修斯·马尔福”; OK1 = 5; } else if (ane1 == 3) { cout << “杀死100个生物”; OK1 = 100; } else if (ane1 == 4) { cout << “再升10级”; OK1 = 10; } Sleep(1000); } break; case 13: cout << “1 金钱副本” << LE1 << “级 2 经验副本” << LE2 << “级” << endl; int y; cin >> y; if (y == 1) { for (int i = 0; i < LE1 % 5; i++) { if (rand() % 3 == 0) fight2(“木人桩”, 1500, 100, 10, 0, 1000); else if (rand() % 3 == 1) fight2(“沙包”, 3000, 50, 20, 0, 1000); else fight2(“木板”, 1000, 100, 10, 0, 1000); if (dead) break; } for (int i = 0; i < (LE1 / 5) % 25; i++) { if (dead) break; if (rand() % 3 == 0) fight2(“石人桩(这有吗)”, 3000, 200, 20, 0, 2000); else if (rand() % 3 == 1) fight2(“石包(这有吗)”, 6000, 100, 60, 0, 2000); else fight2(“石板”, 3000, 300, 30, 0, 2000); } for (int i = 0; i < (LE1 / 5) % 125; i++) { if (dead) break; if (rand() % 3 == 0) fight2(“铁人桩(这有吗)”, 6000, 400, 40, 0, 4000); else if (rand() % 3 == 1) fight2(“铁包(这有吗)”, 12000, 200, 120, 0, 4000); else fight2(“铁板”, 6000, 400, 40, 0, 4000); } for (int i = 0; i < (LE1 / 5) % 625; i++) { if (dead) break; if (rand() % 3 == 0) fight2(“金人桩(这有吗)”, 12000, 800, 80, 0, 6500); else if (rand() % 3 == 1) fight2(“金包(这有吗)”, 24000, 400, 240, 0, 6500); else fight2(“金板”, 12000, 800, 80, 0, 6500); } if (!dead) { LE1++; if (ane == 0) D_Of_C++; } } if (y == 2) { for (int i = 0; i < LE2 % 5; i++) { if (rand() % 3 == 0) fight1(“木人桩”, 1500, 100, 10, 0, 1000); else if (rand() % 3 == 1) fight1(“沙包”, 3000, 50, 20, 0, 1000); else fight1(“木板”, 1000, 100, 10, 0, 1000); if (dead) break; } for (int i = 0; i < (LE2 / 5) % 25; i++) { if (dead) break; if (rand() % 3 == 0) fight1(“石人桩(这有吗)”, 3000, 200, 20, 0, 1000); else if (rand() % 3 == 1) fight1(“石包(这有吗)”, 6000, 100, 60, 0, 1000); else fight1(“石板”, 3000, 300, 30, 0, 1000); } for (int i = 0; i < (LE2 / 25) % 125; i++) { if (dead) break; if (rand() % 3 == 0) fight1(“铁人桩(这有吗)”, 6000, 400, 40, 0, 4000); else if (rand() % 3 == 1) fight1(“铁包(这有吗)”, 12000, 200, 120, 0, 4000); else fight1(“铁板”, 6000, 400, 40, 0, 4000); } for (int i = 0; i < (LE2 / 125) % 625; i++) { if (dead) break; if (rand() % 3 == 0) fight1(“金人桩(这有吗)”, 12000, 800, 80, 0, 6500); else if (rand() % 3 == 1) fight1(“金包(这有吗)”, 24000, 400, 240, 0, 6500); else fight1(“金板”, 12000, 800, 80, 0, 6500); } if (!dead) { LE2++; if (ane == 0) D_Of_C++; } } break; case 14: save(); cout << “保存成功!”; Sleep(1000); break; case 15: Hos(); Sleep(1000); break; case 16: int pw; cout << “密码:”; cin >> pw; if (pw == 1212) { cout << “0~42,改变背包 43,金币 44,等级 45,经验 46,生命 47,防御 48,攻击 49,最大生命 50,进入魔法部权力(0没有 0<有) 51,速度” << endl; int num1, num2; cout << “几号:”; cin >> num1; cout << “改变成:”; cin >> num2; if (num1 <= 42) bag[num1] = num2; else { switch (num1) { case 43: money = num2; break; case 44: level = num2; break; case 45: experience = num2; break; case 46: health = num2; break; case 47: defense = num2; break; case 48: attack = num2; break; case 49: maxhealth = num2; break; case 50: amm = num2; break; case 51: speed = num2; break; default: break; } } levelup(); cout << “改变成功”; } else cout << “密码错误” << endl; Sleep(1000); break; case 17: cout << “1,关卡攻略 2,关卡功能” << endl; int xd; cin >> xd; if (xd == 1) system(“start https://paste.ubuntu.com/p/2YQBCmYvSb/”); if (xd == 2) { cout << “我们先介绍一下图标” << endl; cout << ”╔═══╗ ╔═══╗ ╔═══╗ ╔═══╗” << endl; cout << ”║ @ ║ ║ I ║ ║ o ║ ║ # ║” << endl; cout << ”╚═══╝ ╚═══╝ ╚═══╝ ╚═══╝” << endl; cout << “你自己 出口 入口 墙” << endl; cout << ”╔═══╗ ╔═══╗ ╔═══╗ ╔═══╗” << endl; cout << ”║ 1 ║ ║ 2 ║ ║ 3 ║ ║ 4 ║” << endl; cout << ”╚═══╝ ╚═══╝ ╚═══╝ ╚═══╝” << endl; cout << “1级怪 2级怪 3级怪 4级怪” << endl; cout << “命1000 命2000 命3000 命4000” << endl; cout << “攻250 攻500 攻750 攻1000” << endl; cout << “防10 防20 防30 防40” << endl; cout << “速50 速100 速150 速200” << endl; cout << ”╔═══╗ ╔═══╗ ╔═══╗ ╔═══╗” << endl; cout << ”║ 5 ║ ║ 6 ║ ║ 7 ║ ║ 8 ║” << endl; cout << ”╚═══╝ ╚═══╝ ╚═══╝ ╚═══╝” << endl; cout << “5级怪 6级怪 7级怪 8级怪” << endl; cout << “命5000 命6000 命7000 命8000” << endl; cout << “攻1250 攻1500 攻1750 攻2000” << endl; cout << “防50 防60 防70 防80” << endl; cout << “速250 速300 速350 速400” << endl; cout << ”╔═══╗ ╔═══╗ ╔═══╗ ╔═══╗” << endl; cout << ”║ 9 ║ ║ S ║ ║ B ║ ║ T ║” << endl; cout << ”╚═══╝ ╚═══╝ ╚═══╝ ╚═══╝” << endl; cout << “9级怪 药水商店 书店 告示牌” << endl; cout << “命9000” << endl; cout << “攻2250” << endl; cout << “防90” << endl; cout << “速450” << endl; cout << ”╔═══╗” << endl; cout << ”║ X ║” << endl; cout << ”╚═══╝” << endl; cout << “传送机” << endl; cout << “输入图标了解详细,0退出” << endl; string st; cin >> st; if (st == ”@”) system(“start https://paste.ubuntu.com/p/cdJPnhXddT/”); else if (st == “I” || st == “i”) system(“start https://paste.ubuntu.com/p/h5npMzvDBX/”); else if (st == “o” || st == “O”) system(“start https://paste.ubuntu.com/p/By6Fdyq9wq/”); else if (st == ”#”) system(“start https://paste.ubuntu.com/p/DswXYhVGFn/”); else if (st <= “9” && st >= “1”) system(“start https://paste.ubuntu.com/p/4vZDjY7fX4/”); else if (st == “S” || st == “s”) system(“start https://paste.ubuntu.com/p/SvSTDGrcD3/”); else if (st == “B” || st == “b”) system(“start https://paste.ubuntu.com/p/MMqwYn63N9/”); else if (st == “T” || st == “t”) system(“start https://paste.ubuntu.com/p/mXgfbyhGGJ/”); else if (st == “X” || st == “x”) system(“start https://paste.ubuntu.com/p/M6svDYryGt/”); else if (st == “0”); else cout << “请勿乱输” << endl; Sleep(1000); } break; case 18: isbreak = true; } levelup(); } } } }