跳到正文

个人记录

火影忍者

cenhaoye约 308 分钟
原文
文章信息与版本

文章信息

发布
2023年2月19日
收录
2025年12月12日
更新
2026年11月8日
篇幅
约 308 分钟

版本

  1. v1当前

C++游戏No.6

C++
          #include <iostream>
          #include <string>
          #include <windows.h>
          #include <conio.h>
          #include <fstream>
          #include <ctime>
          #include <time.h>
          #include <stdio.h>
          #include<bits/stdc++.h> 
          using namespace std;
          int D_Of_C, OK, ane, xy, D_Of_C1, OK1, ane1, xy1, nowM, MoralValue;
          int ict = 0, nowlevel = 0;
          int bag[44] = { 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抽奖券 

          //43速度药水
          int health = 1000, maxhealth = 1000, money=0, attack = 250, defense = 10, experience = 0, camp, level = 1, amm = 0, f = 0, speed = 0;
          string Noeye = "空手";
          int LE1 = 1, LE2 = 1, Sl[13];
          bool dead = false;
          string eyename[100] = { "单勾玉","双勾玉","三勾玉","白眼","万花筒","永恒万花筒","转生眼","轮回眼" };
          int eyepower[100] = { 200,500,1100,1300,2400,5000,9000,20000 }, eye[100], eyei = 8, eyenamei = 8, eyepoweri = 8;
          string name, password;
          int choose()
          {
              system("cls");
              cout << "请选择您的阵营。" << endl;
              cout << "0, 木叶忍者村" << endl;
              cout << "1, “晓”组织" << endl;
              cin >> camp;
              if (camp != 0 && camp != 1) {
                  cout << "输入错误。";
                  Sleep(250);
                  choose();
              }
              else {
                  if (MessageBox(0, TEXT("你确定?"), TEXT("请选择"), MB_OKCANCEL | MB_ICONINFORMATION) == IDOK) return 0; 
                  choose();
              }
              return 0;
          }
          int login()
          {
              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 >> eyename[i];
                              fin >> eyepower[i];
                              fin >> eye[i];
                          }           
                          fin >> Noeye >> amm >> f >> eyei >> eyenamei >> eyepoweri >> 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 << eyename[i] << " ";
                  outfile << eyepower[i] << " ";
                  outfile << eye[i] << " ";
              }
              outfile << Noeye << " " << amm << " " << f << " " << eyei << " " << eyenamei << " " << eyepoweri << " " << 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");
              while(fin >> DN) {
                  if (DN == name) {
                      cout << "用户名已被使用=====请重新起名";
                      Reg();
                  }
              }
              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 (hfaint > 0) hfaint -= 1; 
                  if (mfaint > 0) {
                      if (rand() % 3 == 0)
                      {
                          mfaint = 0;
                          cout << "忍犬使用月读!停止了忍术" << endl;
                      }
                      else mfaint -= 1;
                  }
                  if (mfaint <= 0) {
                      if (rand() % 3) {
                          cout << "忍犬使用百豪之术 生命增加200" << endl;
                          mhealth += 200;
                      }
                      if (rand() % 3) {
                          cout << "忍犬使用仙人模式 生命增加100 防御增加50" << endl;
                          mhealth += 100;
                          mdefense += 50;
                      }
                      if (rand() % 3) {
                          cout << "忍犬使用八门遁甲之术 攻击增加200 对方扣血200滴" << endl;
                          hisH -= 200;
                          mattack += 200;
                      }
                      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) {
                                  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 == 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 > 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[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() % 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;
                          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 > hisD) {
                                  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 << "对方使用技能:月读!停止了忍术";
                          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 << "你使用仙人模式 生命增加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, 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;
                      }
                      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 == 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 > hisD) {
                                  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[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, 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 > hisD) {
                                  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() % 6)
              {
              case 0:
                  if (camp) {
                      int f;
                      cout << "你遇到了一个路人" << endl;
                      cout << "1进攻/2逃跑" << endl;
                      cin >> f;
                      if (f == 1) {
                          fight("路人", 500, 110, 0, 14, 1000);
                          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[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;
                              }
                          }
                      }
                  }
                  break;
              case 1:
                  if (camp) {
                      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[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[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;
                              }
                          }
                      }
                  }
                  break;
              case 2:
                  if (camp) {
                      int f;
                      cout << "你遇到了一个木叶中忍" << endl;
                      cout << "1进攻/2逃跑" << endl;
                      cin >> f;
                      if (f == 1) {
                          fight("木叶中忍", 5000, 700, 50, 16, 1500);
                          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[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;
                              }
                          }
                      }
                  }
                  break;
              case 3:
                  if (camp) {
                      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[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] += 4;
                                  }
                                  else {
                                      cout << "获得四瓶防御药水" << endl;
                                      bag[20] += 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[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;
                                  }
                              }
                          }
                      }
                  }
                  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("卡卡西", 100000, 12000, 2500, 17, 4000);
                          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() % 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;
                                  }
                              }
                          }
                      }
                  }
                  break;
              case 5:
                  if (camp) {
                      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[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[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;
                                  }
                              }
                          }
                      }
                  }
                  if (!dead)
                      if (ane1 == 0) D_Of_C1++;
                  break;
              }
              Sleep(1000);
              return 0;
          }
          int buy(int p, int m)
          {
              if (money < m) {
                  cout << "没钱,打出去!" << endl;
                  if (camp) {
                      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;
                  eye[p - 6]++;
                  money -= m;
                  if (ane == 1) D_Of_C++;
                  if (ane1 == 1) D_Of_C1 += m;
              }
              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) / 16 << "元 是否恢复. 等级小于等于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 < eyei; i++) {
                      if (eyename[i] == Noeye) cout << "o"; 
                      else cout << " "; 
                      cout << i + 1 << "," << eyename[i] << " " << eye[i] << "双" << "  力量:" << eyepower[i] << endl;
                  }
                  cout << "1,装备瞳术 2,卸下现有瞳术 0,退出" << endl;
                  cin >> aaaa;
                  if (aaaa == 1) {
                      cout << "请输入瞳术编号" << endl;
                      int bbbb;
                      cin >> bbbb;
                      if (eye[bbbb - 1]) {
                          if (Noeye != "空手") {
                              cout << "已装备瞳术";
                              Sleep(1000);
                          }
                          else {
                              cout << "装备成功";
                              Noeye = eyename[bbbb - 1];
                              attack += eyepower[bbbb - 1];
                          }
                      }
                      else {
                          cout << "您还未拥有此瞳术";
                      }
                      Sleep(1000);
                  }
                  else if (aaaa == 2) {
                      for (int ia = 0; ia < eyei - 1; ia++) {
                          if (Noeye == eyename[ia]) {
                              cout << "成功卸下";
                              attack -= eyepower[ia];
                              break;
                          }
                      }
                      Noeye = "空手";
                      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,大街(杀人/阻止“晓”成员) ";
                  cout << "3,木叶忍者村(最后战场) 4,商店 5,抽奖 6,黑市 7,背包 8,任务 9,终极任务 10,副本 11,保存 ";
                  if (camp) cout << "12, 医疗忍者(“晓”的)"; 
                  else cout << "12, 小樱 "; 
                  cout << "13,改变参数(测试专用 需要密码)14,登出" << 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,一键使用";
                  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;
                  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,大街(杀人/阻止“晓”成员) ";
                  cout << "3,木叶忍者村(最后战场) 4,商店 5,抽奖 6,黑市 7,背包 8,任务 9,终极任务 10,副本 11,保存 ";
                  if (camp) cout << "12, 医疗忍者(“晓”的)"; 
                  else cout << "12, 小樱 "; 
                  cout << "13,改变参数(测试专用 需要密码)14,登出" << 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 << "0,退出";
                  cin >> bbbb;
                  switch (bbbb)
                  {
                  case 1:
                      if (bag[6] >= 1) {
                          cout << "学习成功" << endl;
                          cout << "能够恢复500滴血" << endl;
                          bag[6] -= 1;
                          Sl[0] = 1;
                          Sleep(1000);
                          break;
                      }
                      else cout << "物品不足" << endl; 
                      break;
                  case 2:
                      if (bag[7] >= 1) {
                          cout << "学习成功" << endl;
                          cout << "能恢复50滴血并加50防御" << 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 << "攻击加250并扣对方500滴血" << 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概率能事对方冻结10回合" << endl;
                          cout << "%90概率能事对方冻结2回合" << 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 << "%90能使对方无技能" << endl;
                          cout << "%10能使对方防御变为0" << endl;
                          bag[14] -= 1;
                          Sl[8] = 1;
                          Sleep(1000);
                          break;
                      }
                      else cout << "物品不足" << endl; 
                      break;
                  case 10:
                      if (bag[15] >= 1) {
                          cout << "学习成功" << endl;
                          cout << "对方一直减10滴血直到对方躲过(%10躲过)" << endl;
                          bag[15] -= 1;
                          Sl[9] = 1;
                          Sleep(1000);
                          break;
                      }
                      else cout << "物品不足" << endl; 
                      break;
                  case 11:
                      if (bag[16] >= 1) {
                          cout << "学习成功" << endl;
                          cout << "对方扣血5回合,每回合扣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 << "让对方直接扣3/4的血" << endl;
                          bag[18] -= 1;
                          Sl[12] = 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,大街(杀人/阻止“晓”成员) ";
                  cout << "3,木叶忍者村(最后战场) 4,商店 5,抽奖 6,黑市 7,背包 8,任务 9,终极任务 10,副本 11,保存 ";
                  if (camp) cout << "12, 医疗忍者(“晓”的)"; 
                  else cout << "12, 小樱 "; 
                  cout << "13,改变参数(测试专用 需要密码)14,登出" << 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:
                              num6++;
                              bag[19]++;
                              break;
                          case 2:
                          case 3:
                              num7++;
                              bag[20]++;
                              break;
                          case 4:
                          case 5:
                              num8++;
                              bag[21]++;
                              break;
                          case 6:
                          case 7:
                              num9++;
                              bag[22]++;
                              break;
                          case 8:
                              num10++;
                              bag[23]++;
                              break;
                          case 9:
                              num11 += 50;
                              money += 50;
                              break;
                          case 10:
                              num11 += 100;
                              money += 100;
                              break;
                          }
                      }
                      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() % 100;
                      if (ad < 6) {
                          switch (rand() % 3)
                          {
                          case 0:
                              cout << "你挖到了技能书仙人模式!!!" << endl;
                              bag[7]++;
                              break;
                          case 1:
                              cout << "你挖到了技能书月读!!!" << endl;
                              bag[10]++;
                              break;
                          case 2:
                              cout << "你挖到了技能书无限月读!!!" << endl;
                              bag[11]++;
                              break;
                          }
                          Sleep(500);
                      }
                      else if (ad >= 6 && ad < 50) 
                      {
                          int as = rand() % 20 + 30;
                          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] = { 
                  "##################################################",
                  "# 1   #   2  2 3#  #  1 #89#1#1# 1 1  #12  #3  #1#",
                  "#2#1#5  # #1# #   ## # ##91  6   #9#7#11## # # 11#",
                  "#   ## ## # # # #### # #####  # ####5##  # # #####",
                  "#2########### # 4 #      ##  #####4    5##1# #189o",
                  "# 1  1#     #2# ##  # ##   5#    ######### # #7#8#",
                  "#1# #1 2# #     #  #9 # ### # ##2## #   ##  5#167#",
                  "#  1## ## # # ### #4##  ##  6 #  3  ###   #####5##",
                  "I 2 #### #### #  1 6   #1# ##  5###6##  # #11134##",
                  "I  1  #      7 # # # #   227# #  #   # #2 #2#21#5#",
                  "##1 #1  #1# ## 5 #   # #3####  #  1#5# # 1 111#6 #",
                  "#  2##3##1# ### ## ### #    ## ####  # #1####### #",
                  "# ##3  ##1###7#    ##### ##  #   ###3  4## 9   # #",
                  "#23   #    3   # ##9 ##6 6##   ### 9## ##1 # #3  #",
                  "# # #   # # ## # ##    ##7 ## # 9  ###9#11##2## ##",
                  "### # #######  # 2 # #3 # # #  1## 1 1## ##1 #3  #",
                  "#5  #2   ## # #### # #5#  # ### #8###1   #1# #1# #",
                  "# # # #   # # 4 5  # #  # 7   # # #   ####  8  #9#",
                  "#   2 # #42   # ##    # 11#2#3   9  # ##9  # #999#",
                  "##################################################",
                  };
              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("忍者", 10000 * (a[x][y - 1] - '0'), 2500 * (a[x][y - 1] - '0'), 100 * (a[x][y - 1] - '0'), 20, 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("忍者", 10000 * (a[x][y + 1] - '0'), 2500 * (a[x][y + 1] - '0'), 100 * (a[x][y + 1] - '0'), 20, 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("忍者", 10000 * (a[x - 1][y] - '0'), 2500 * (a[x - 1][y] - '0'), 100 * (a[x - 1][y] - '0'), 20, 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("忍者", 10000 * (a[x + 1][y] - '0'), 2500 * (a[x + 1][y] - '0'), 100 * (a[x + 1][y] - '0'), 20, 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 NoticeBoard(int l, int x, int y)
          {
              if (l == 10 && x == 6 && y == 1) {
                  system("cls");
                  cout << "跟着'*'走" << endl;
                  cout << "     ——CHY" << endl;
                  _getch();
              }
              if (l == 10 && x == 8 && y == 12) {
                  system("cls");
                  cout << "走吧,谁叫你不听命令呢..." << endl;
                  cout << "                  ——CHY" << endl;
                  _getch();
              }
              if (l == 12 && x == 3 && y == 1) {
                  system("cls");
                  cout << "杀出重围!" << endl;
                  cout << "      ——CHY" << endl;
                  _getch();
              }
              if (l == 12 && x < 4 && y == 20) {
                  system("cls");
                  cout << "恭喜通过一半!往下走继续..." << endl;
                  cout << "       ——CHY" << endl;
                  _getch();
              }
              if (l == 12 && x > 4 && y == 20) {
                  system("cls");
                  cout << "恭喜通过一半!往上走继续..." << endl;
                  cout << "       ——CHY" << endl;
                  _getch();
              }
              if (l == 12 && x == 10) {
                  system("cls");
                  cout << "拿走全部奖励吧!" << endl;
                  cout << "       ——CHY" << endl;
                  _getch();
              }
              else {
                  system("cls");
                  cout << "回去吧,你来错地方了..." << endl;
                  _getch();
              }
              return 0;
          }
          int MM()
          {
              if (amm == 0) {
                  int lie = 0;
                  cout << "....建议45级打,飘升80级...." << endl;
                  cout << "攻击即可获得:" << endl;
                  cout << "抽奖券*100 忍术 全幅药水*50";
                  cout << " 金币*2000 " << 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("大门看守", 2000, 200, 20, 0, 1000);
                      if (dead) return 0; 
                      fight("大门看守", 2000, 200, 20, 0, 1000);
                      if (dead) return 0; 
                      cout << "增加100滴血" << endl;
                      health += 100;
                      Sleep(1000);
                      cout << "你踢开了大门" << endl;
                      Sleep(1000);
                      cout << "里面的几个实验品活了" << endl;
                      Sleep(1000);
                      fight("实验品", 10000, 200, 20, 0, 500);
                      if (dead) return 0; 
                      fight("实验品", 10000, 200, 20, 0, 500);
                      if (dead) return 0; 
                      fight("实验品", 10000, 200, 20, 0, 500);
                      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("忍者", 3000, 200, 100, 14, 1000);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 14, 1000);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 14, 1000);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 15, 1000);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 17, 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("药师兜", 10000, 1000, 100, 20, 3000);
                      health += 5000;
                      if (dead) return 0; 
                      if (lie) {
                          cout << "上次的忍者跑了过来" << endl;
                          Sleep(1000);
                          cout << "忍者:你,你骗了我们!" << endl;
                          Sleep(1000);
                          fight("忍者", 3000, 200, 100, 14, 1000);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 14, 1000);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 14, 1000);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 15, 1500);
                          if (dead) return 0; 
                          fight("忍者", 3000, 200, 100, 17, 2000);
                          if (dead) return 0;
                          if (rand() % 3 == 0){
                              cout << "你获得了忍术仙人模式" << endl;
                              bag[7]++;
                              Sleep(1000);
                          }
                          health += 500;
                      }
                      cout << "你遇到了大蛇丸";
                      fight("大蛇丸", 15000, 1500, 150, 20, 4000);
                      if (dead) return 0;
                      cout << "你获得:" << endl;
                      cout << "抽奖券*100 忍术心转心之术 全幅药水*50";
                      cout << " 金币*2000" << endl;
                      bag[0] += 100; bag[8]++; bag[23] += 50; money += 2000; amm = 1;
                      Sleep(3000);
                  }
                  else if (a == 2) return 0;
                  else {
                      cout << "请勿乱输";
                      Sleep(1000);
                  }
              }
              else {
                  cout << "你已占领魔法部 可以进入以下地方" << endl;
                  cout << "0,退出 1,泡温泉 2,矿洞" << 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();
                      break;
                  case 2:
                      cout << "你走进矿洞" << endl;
                      Sleep(1000);
                      ict++;
                      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;
                  }
              }
              return 0;
          }
          int finalfight(string Hname)
          {
              int hisH = 1000000000, hisA = 1000000, hisD = 500000, hisSP = 5000;
              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 << "你使用仙人模式 生命增加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)
                          {
                              cout << "对方死亡" << endl; Sleep(1000);
                              cout << "你获得了最终的胜利"<< endl; Sleep(1000);
                              cout << "忍界重回和平" << endl; Sleep(1000);
                              cout << "你获得英雄的待遇"<< endl; Sleep(1000);
                              cout << "五大国向你俯首称臣"<< endl; Sleep(1000);
                              cout<<endl;
                              cout<<endl;
                              cout << "......完......"<< endl; Sleep(10000);
                              cout<<endl;
                              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);
                      }
                      else {
                          cout << "对方死亡" << endl; Sleep(1000);
                          cout << "你获得了最终的胜利"<< endl; Sleep(1000);
                          cout << "忍界重回和平" << endl; Sleep(1000);
                          cout << "你获得英雄的待遇"<< endl; Sleep(1000);
                          cout << "五大国向你俯首称臣"<< endl; Sleep(1000);
                          cout<<endl;
                          cout<<endl;
                          cout << "......完......"<< endl; Sleep(10000);
                          cout<<endl;
                          cout<<endl;
                          return 0;
                      }
                  }
                  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()
          {
              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 << "      Ninja World -- Naruto          1.0 \n";
              cout << "               |\n";
              cout << "       |       |       |             \n";
              cout << "        |      |      |             \n";
              cout << "          |    |    | \n";
              cout << "            |  |  |\n";
              cout << "               |     \n";
              cout << "              | |     \n";
              cout << "             |   |  \n";
              cout << "            |     |   \n";
              cout << "          |         |                 \n";
              cout << "        |             |      \n";
              cout << "       |               |       \n";
              cout << "                              by CHY\n";
              cout << "                              \n";
              cout << "                              \n";
              cout << "树叶飞舞之处,火亦生生不息\n";
              cout << "只要有树叶飞舞的地方,火就会燃烧\n";
              cout << "                              \n";
              cout << "                              \n";
              cout << "输入‘start’开始游戏                  \n";
              string start;
              cin >> start;
              for (int i = 8; i < 100; i++) eyename[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,大街(杀人/阻止“晓”成员) ";
                  cout << "3,木叶忍者村(最后战场) 4,商店 5,抽奖 6,黑市 7,背包 8,任务 9,终极任务 10,副本 11,保存 ";
                  if (camp) cout << "12, 医疗忍者(“晓”的)"; 
                  else cout << "12, 小樱 "; 
                  cout << "13,改变参数(测试专用 需要密码)14,登出" << endl;
                          cin >> a;
                          switch (a)
                          {
                          case 1:
                              MM();
                              break;
                          case 2:
                              street();
                              break;
                          case 3:
                              if (camp) {
                                  if (f) finalfight("鸣人");
                                  else cout << "你需要先寻找鸣人的下落" << endl;
                              }
                              else {
                                  if (f) finalfight("长门");
                                  else cout << "你需要先寻找长门的下落" << endl;
                              }
                              Sleep(1000);
                              break;
                          case 4: 
                              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 转生眼       25000元" << 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, 25000);
                                  system("cls");
                                  break;
                              case 8:
                                  buywand(13, 50000);
                                  system("cls");
                                  break;
                              default:
                                  break;
                              }
                              break;
                          case 5:
                              LD();
                              break;
                          case 6:
                              cout << "1 百豪之术      100元    " << endl;
                              cout << "2 仙人模式    200元   " << endl;
                              cout << "3 心转心之术    550元    " << endl;
                              cout << "4 八门遁甲之术   1200元   " << endl;
                              cout << "5 月读      3650元   " << endl;
                              cout << "6 无限月读      5000元   " << endl;
                              cout << "7 秽土转生      10000元   " << endl;
                              cout << "8 通灵术      7000元   " << endl;
                              cout << "9 别天神      15000元   " << endl;
                              cout << "10 豪火灭却      2000元   " << endl;
                              cout << "11 天照      4000元   " << endl;
                              cout << "12 影子模仿术      8000元   " << endl;
                              cout << "13 超尾兽螺旋手里剑      20000元   " << endl;
                              cout << "0 退出         0元      " << endl;
                              int c;
                              cin >> c;
                              switch (c)
                              {
                              case 1:
                                  buy(6, 100);
                                  system("cls");
                                  break;
                              case 2:
                                  buy(7, 200);
                                  system("cls");
                                  break;
                              case 3:
                                  buy(8, 550);
                                  system("cls");
                                  break;
                              case 4:
                                  buy(9, 1200);
                                  system("cls");
                                  break;
                              case 5:
                                  buy(10, 3650);
                                  system("cls");
                                  break;
                              case 6:
                                  buy(11, 5000);
                                  system("cls");
                                  break;
                              case 7:
                                  buy(12, 10000);
                                  system("cls");
                                  break;
                              case 8:
                                  buy(13, 7000);
                                  system("cls");
                                  break;
                              case 9:
                                  buy(14, 15000);
                                  system("cls");
                                  break;
                              case 10:
                                  buy(15, 2000);
                                  system("cls");
                                  break;
                              case 11:
                                  buy(16, 4000);
                                  system("cls");
                                  break;
                              case 12:
                                  buy(17, 8000);
                                  system("cls");
                                  break; 
                              case 13:
                                  buy(18, 20000);
                                  system("cls");
                                  break;
                              default:
                                  break;
                              }
                              break;
                          case 7:
                              cout << "1,查看瞳术 2,查看药水 3,学习忍术" << endl;
                              cin >> b;
                              if (b == 1) w();
                              else if (b == 2) p();
                              else if (b == 3) s();
                              else {
                                  cout << "请勿乱输" << endl;
                                  Sleep(1000);
                              }
                          case 8:
                              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 9:
                              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元 攻击力+10 防御力+10 生命+500" << 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 10:
                              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 / 25) % 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 / 125) % 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 11:
                              save();
                              cout << "保存成功!";
                              Sleep(1000);
                              break;
                          case 12:
                              Hos();
                              Sleep(1000);
                              break;
                          case 13:
                              int pw;
                              cout << "密码:";
                              cin >> pw;
                              if (pw == 20081022) {
                                  cout << "0~42,改变背包 43,金币 44,等级 45,经验 46,生命 47,防御 48,攻击 49,最大生命 50,进入大蛇丸秘密实验基地权力(1) 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:
                                          f = num2;
                                          break;
                                      case 51:
                                          speed = num2;
                                          break;
                                      default:
                                          break;
                                      }
                                  }
                                  levelup();
                                  cout << "改变成功";
                              }
                              else cout << "密码错误" << endl;
                              Sleep(1000);
                              break;
                          case 14:
                              isbreak = true;
                          }
                          levelup();
                      }
                  }
              }
              return 0; 
          }
原文