人生之路代码7

点我查看全部代码

void forest()
{
    hdcj(31);
    srand(time(0));
    const string where[]=
    {"打猎","砍树","工作台","探索","查看合成表","离开","附魔","森林背包","查看当前附魔属性","看看森林中各物品说明"};
    int i,j,k,n,m;
    char l;
    while(1)
      {
          things[8]-=5;
          tepan();
          cls();
          printf("树林茂密的森林中,不时传来的尖叫声给人一种不安的气氛\n");
          for(i=0;i<10;i++)
            printf("%d.%s\n",i,where[i].c_str());
          cout<<"` (ESC下面)神秘人\n";
          l=_getch();
          switch(l)
            {
                case '0':
                    {
                    cls();
                    if (rand()%4==1)
                      {
                          cout<<"运气不巧,什么都没碰到";
                          gs();
                          break;
                      }
                cout<<"你遇到了一只野";
                string animal[6]={"","牛","羊","猪","鸡","兔"};
                srand(time(0));
                n=random(1,5);
                cout<<animal[n];
                gs();
                if (dalie())
                  {
                      happened+=(name+"在小森林打猎,收获猎物一只/");
                  if (n==1)
                    hdcj(39);
                  things[81]++;
                  if (things[81]>=20)
                    hdcj(44);
                  cout<<"打中了!";
                  cout<<"卖了";
                  n=random(800,8000);
                  cout<<n;
                  cout<<"元";
                  things[7]+=n;
                  gs();
                  }
                else
                  {
                      things[84]=0;
                      happened+=(name+"打猎时手滑走火导致猎物逃走/");
                      cout<<"没打中!";
                      gs();
                  }break;
            }
            case '1':
                {
                    use(52);
                    gs();
                    hdcj(20);
                    Sout("你费力地挥舞着斧头,树木吱吱的发出不祥的叫声。");
                    happened+=(name+"在森林乱砍乱伐/");
                    gs();
                    for(i=1;i<=random(4,7);i++)
                      {
                          m=60000;
                          n=0;
                          n+=fost[17]*1593;
                          n+=fost[18]*3983;
                          n+=fost[19]*6927;
                          n+=fost[20]*6281;
                          n+=fost[21]*12817;
                          n+=fost[45]*18693;
                          n+=fost[53]*23100;
                          n*=random(1,has_fumo[1][1]+1);
                          m-=n;
                          jdt(float(m/10000.0));
                          n=random(2,4);
                          n*=random(1,has_fumo[2][4]+1);
                          cout<<"原木*"<<n;
                          fost[0]+=n;
                      }
                    break;
                }
            case '2':
                {
                    use(53);
                    gs();
                    cout<<"______________________________\n";
                    cout<<"|         |         |         |\n";
                    cout<<"|         |         |         |\n";
                    cout<<"|_________|_________|_________|\n";
                    cout<<"|         |         |         |\n";
                    cout<<"|         |         |         |\n";
                    cout<<"|_________|_________|_________|\n";
                    cout<<"|         |         |         |\n";
                    cout<<"|         |         |         |\n";
                    cout<<"|_________|_________|_________|\n";
                    cout<<"输入你有的东西的编号,放进对应的格子";
                    int f[3][3];
                    int grid[3][3][2]=
                    {
                        {
                            2,2,
                            2,14,
                            2,26,
                        },
                        {
                            5,2,
                            5,14,
                            5,26,
                        },
                        {
                            8,2,
                            8,14,
                            8,26,
                        },
                    };
                      for(i=0;i<3;i++)
                        for(j=0;j<3;j++)
                          {
                              gotoxy(16,3);
                              cout<<"第"<<i*3+j+1<<"格放什么?输入编号(什么都不放输入-1)           \n";
                              int g=0;
                              for(k=0;k<=56;k++)
                                if (fost[k])
                                  {
                                    printf("%d.%s * %d\t",k,fsn[k].c_str(),fost[k]);
                                    if ((++g)%3==0)
                                      printf("\n");
                                  }
                              cin>>f[i][j];
                              gotoxy(grid[i][j][0],grid[i][j][1]);
                              if (f[i][j]==-1)
                                cout<<"空";
                              else
                                cout<<fsn[f[i][j]];
                          }
                      cls();
                      n=-1;
                      for(i=0;i<=56;i++)
                        {
                            bool flag=true;
                            for(j=0;j<3;j++)
                              for(k=0;k<3;k++)
                                if (f[j][k]!=map[i][j][k])
                                  flag=false;
                            if (flag)
                              {
                                  n=i;
                                  break;
                              }
                        }
                      if (n==-1)
                        {
                            cout<<"不存在该合成表!";
                            gs();
                            break;
                        }
                    cout<<"做几个 "<<fsn[n]<<" ?";
                    int l1;
                    cin>>l1;
                    int get[201];
                    memset(get,0,sizeof(get));
                    for(i=0;i<200;i++)
                      get[i]=fost[i]; 
                    bool can=true;
                    for(i=0;i<3;i++)
                      for(j=0;j<3;j++)
                        if (map[n][i][j]>=0)
                        if (get[map[n][i][j]]<l1)
                          {
                              can=false;
                              break;
                          }
                        else
                          get[map[n][i][j]]-=l1;
                    cout<<can<<endl;
                    if (can==0)
                      {
                          cout<<"材料不足!,缺少"<<i<<','<<j<<'\n';
                          gs();
                        break; 
                      }
                      for(i=0;i<3;i++)
                        for(j=0;j<3;j++)
                          {
                              if (map[n][i][j]!=-1)
                              {
                                fost[map[n][i][j]]-=l1;
                            }
                          }
                    if (i!=500&&j!=600)
                    {
                    cout<<"获得:"<<fsn[n]<<'*'<<l1;
                    if (n==9)
                      hdcj(13);
                    if (n==14)
                      hdcj(19);
                    if (n==11)
                      hdcj(21);
                    if (n==12)
                      things[5]+=l1;
                    if (n==13)
                      things[5]+=2*l1;
                    if (n==14)
                      things[5]+=3*l1;
                    if (n==15)
                      things[5]+=5*l1;
                    if (n==22)
                      things[5]+=17*l1;
                    happened+=(name+"合成了"+fsn[n]+"/");
                    if (n>=35&&n<=38)
                      {
                          bool diamond=true;
                          for(int ji=35;ji<=38;ji++)
                            if (fost[ji]==0)
                              diamond=false;
                          if (diamond)
                            hdcj(23);
                      }
                    if (n>=39&&n<=42)
                      {
                          bool diamond=true;
                          for(int ji=39;ji<=42;ji++)
                            if (fost[ji]==0)
                              diamond=false;
                          if (diamond)
                            hdcj(24);
                      }
                    if (n>=46&&n<=49)
                      {
                          bool diamond=true;
                          for(int ji=46;ji<=49;ji++)
                            if (fost[ji]==0)
                              diamond=false;
                          if (diamond)
                            hdcj(25);
                      }
                    if (i<=5&&j<=5)
                      fost[n]+=l1;
                    if (n==1)
                      fost[n]+=3*l1;
                    if (n==2)
                      fost[n]+=3*l1;
                    if (n==4)
                      fost[n]+=8*l1;
                    if (n==5)
                      fost[n]+=8*l1;
                    if (n==6)
                      fost[n]+=8*l1;
                    /*iron golden diamond hero sky
                head   4    3         6        9    15
                clothes 6    4        8        14    23
                tussle  5    4        7        12    19
                shoes    3    2        5     8    13
                    */
                    if (n==27)
                      things[6]+=4;
                    if (n==28)
                      things[6]+=6;
                    if (n==29)
                      things[6]+=5;
                    if (n==30)
                      things[6]+=3;
                    if (n==31)
                      things[6]+=3;
                    if (n==32)
                      things[6]+=4;
                    if (n==33)
                      things[6]+=4;
                    if (n==34)
                      things[6]+=2;
                    if (n==35)
                      things[6]+=6;
                    if (n==36)
                      things[6]+=8;
                    if (n==37)
                      things[6]+=7;
                    if (n==38)
                      things[6]+=5;
                    if (n==39)
                      things[6]+=9;
                    if (n==40)
                      things[6]+=14;
                    if (n==41)
                      things[6]+=12;
                    if (n==42)
                      things[6]+=8;
                    if (n==43)
                      things[5]+=16;
                    if (n==46)
                      things[6]+=15;
                    if (n==47)
                      things[6]+=23;
                    if (n==48)
                      things[6]+=19;
                    if (n==49)
                      things[6]+=13;
                    if (n==50)
                      things[5]+=35;
                    if (n==53)
                      {
                        things[5]+=46;
                        hdcj(27);
                      }
                    }
                    break;
                    }
                    case '3':
                        {
                            /*    string fumoname[4][5]=
{
    {"耐久","锋利","抢夺","雷电之力","落雷术"},
    {"耐久","效率","洪荒之力","木之克星","时运"},
    {"耐久","效率","急迫","精准采集","时运"}
    {"耐久","保护","血量提升","荆棘","雷电附身"},
}; */
                            n=random(1,6);
                            if (things[187]==2&&rand()%3<=1)
                              n=7;
                            cls();
                            switch(n)
                              {
                                  case 1:
                                      {
                                          use(54);
                                          Sout("你遇到了一只僵尸!");
                                          m=random(things[9]-10,things[9]+15);
                                          int hp,attack,run;
                                          hp=m*(random(17,29));
                                          attack=m*(random(4,13));
                                          run=m;
                                          while(1)
                                          {
                                            cls();
                                            cout<<"Your hp:"<<things[2]<<'\n';
                                            cout<<"JS's hp:"<<hp<<'\n';
                                            cout<<"1.attack 2.run away\n";
                                            char l=_getch();
                                            cout<<l;
                                            if (l=='2')
                                              {
                                                  if (rand()%4==1)
                                                    {
                                                        cout<<"逃跑成功,运气不错!";
                                                        break;
                                                    }
                                                else
                                                  cout<<"逃跑失败!\n";
                                              }
                                          else
                                          {
                                          if (fost[22]==0&&fost[43]==0&&fost[50]==0&&fost[53]==0)
                                          {
                                            n=gongji(things[5]);
                                            gotoxy(12,0);
                                            n-=run;
                                            Sout("你发动了攻击,僵尸受到了");
                                            }
                                          else
                                          {
                                          if (fost[22]>=1)
                                            {cout<<"你发动了技能【火炮轰炸】\n";n=1.2*things[5];}
                                          if (fost[43]>=1)//43,50,53
                                            {cout<<"你发动了技能【横扫】\n";n+=1.1*things[5];}
                                          if (fost[50]>=1)
                                            {cout<<"你发动了技能【坠入虚空】\n";n+=hp*0.5;}
                                          if (fost[53]>=1)
                                            {cout<<"你发动了技能【量子充能】\n";n+=0.4*things[2];}
                                          }
                                        if (has_fumo[3][4])
                                          if (rand()%(70/(70/has_fumo[3][4])))
                                            cout<<"你发动了技能【雷电之力】\n",n+=has_fumo[3][4]*0.01*things[2];
                                          Sout("造成了");
                                            cout<<n;
                                            Sout("点伤害\n");
                                            hp-=n;
                                            }
                                            Sout("僵尸发动了攻击,你受到了");
                                            n=attack*0.87-things[6];
                                            if (n<1)
                                              n=1;
                                            cout<<n;
                                            Sout("点伤害\n");
                                            Sout("反伤:");
                                            m=0;
                                            if (has_fumo[3][3])
                                              m=n*(has_fumo[3][3])*0.03;
                                            cout<<m<<"点\n";
                                            things[2]-=n;
                                            hp-=m;
                                            if (things[2]<=0)
                                              {
                                                happened+=(name+"被僵尸杀死了/");
                                                Die();
                                              }
                                          if (hp<=0)
                                            {
                                                hdcj(22);
                                                break;
                                            }
                                          }
                                        Sout("胜利!战利品:");
                                        things[83]++;
                                        happened+=(name+"杀死了一只僵尸/");
                                        n=random(2,4);
                                        m=random(0,2);
                                        cout<<fsn[m]<<"*"<<n;
                                        n*=random(1,has_fumo[0][2]+1);
                                        fost[m]+=n;
                                        gs();
                                        break;
                                    }

                                        n=random(2,4);
                                        m=random(0,2);
                                        cout<<fsn[m]<<"*"<<n;
                                        n*=random(1,has_fumo[0][2]+1);
                                        fost[m]+=n;
                                        gs();
                                        break;
                                    }
                                case 2:
                                    {
                                        use(55);
                                        cls();
                                          Sout("你遇到了一只骷髅!");
                                          m=random(things[9]-10,things[9]+15);
                                          int hp,attack,run;
                                          hp=m*(random(7,23));
                                          attack=m*(random(5,8));
                                          run=m;
                                          while(1)
                                          {
                                            cout<<"Your hp:"<<things[2]<<'\n';
                                            cout<<"KL's hp:"<<hp<<'\n';
                                            cout<<"1.attack 2.run away\n";
                                            char l=_getch();
                                            cout<<l;
                                            if (l=='2')
                                              {
                                                  if (rand()%4==1)
                                                    {
                                                        cout<<"逃跑成功,运气不错!";
                                                        break;
                                                    }
                                                else
                                                  cout<<"逃跑失败!\n";
                                              }
                                          else
                                          {
                                            n=gongji(things[5]);
                                            gotoxy(12,0);
                                            n-=run;
                                            Sout("你发动了攻击,KL受到了");
                                            cout<<n;
                                            Sout("点伤害\n");
                                            hp-=n;
                                            }
                                            Sout("骷髅发动了攻击,你受到了");
                                            n=attack*0.87-things[6];
                                            if (n<1)
                                              n=1;
                                            cout<<n;
                                            Sout("点伤害\n");
                                            Sout("反伤:");
                                            m=0;
                                            if (has_fumo[3][3])
                                              m=n*(has_fumo[3][3])*0.03;
                                            cout<<m<<"点\n";
                                            things[2]-=n;
                                            hp-=m;
                                            if (things[2]<=0)
                                              {
                                                happened+=(name+"被骷髅杀死了/");
                                                Die();
                                              }
                                          if (hp<=0)
                                            {
                                                hdcj(22);
                                                break;
                                            }
                                          }
                                        happened+=(name+"杀死了一只骷髅/");
                                        Sout("胜利!战利品:");
                                        things[83]++;
                                        n=random(2,4);
                                        m=random(0,2);
                                        n*=random(1,has_fumo[0][2]+1);
                                        cout<<fsn[m]<<"*"<<n;
                                        fost[m]+=n;
                                        gs();
                                        break;
                                    }
                                case 3:
                                 {
                                     use(56);
                                          Sout("你遇到了一只爬行者!");
                                          m=random(things[9]-10,things[9]+15);
                                          int hp,attack,run;
                                          hp=m*(random(17,23));
                                          attack=m*(random(6,8));
                                          run=m;
                                          while(1)
                                          {
                                            cls();
                                            cout<<"Your hp:"<<things[2]<<'\n';
                                            cout<<"PXZ's hp:"<<hp<<'\n';
                                            cout<<"1.attack 2.run away\n";
                                            char l=_getch();
                                            if (l=='2')
                                              {
                                                  if (rand()%4==1)
                                                    {
                                                        cout<<"逃跑成功,运气不错!";
                                                        break;
                                                    }
                                                else
                                                  cout<<"逃跑失败!\n";
                                              }
                                          if (fost[22]==0&&fost[43]==0&&fost[50]==0&&fost[53]==0)
                                          {
                                            n=gongji(things[5]);
                                            gotoxy(12,0);
                                            n-=run;
                                            Sout("你发动了攻击,爬行者受到了");
                                            cout<<n;
                                            Sout("点伤害\n");
                                            hp-=n;
                                            }
                                            Sout("爬行者自爆了,你受到了");
                                            n=attack*1.4-things[6];
                                            cout<<n;
                                            Sout("点伤害") ;
                                            things[2]-=n;
                                            hp=0;
                                            if (things[2]<=0)
                                              {
                                                happened+=(name+"被creeper炸飞了/");
                                                Die();
                                              }
                                          if (hp<=0)
                                            break;
                                          }
                                        Sout("胜利!战利品:");
                                        n=random(2,5);
                                        m=23;
                                        n*=random(1,has_fumo[0][2]+1);
                                        cout<<fsn[m]<<"*"<<n;
                                        fost[23]+=n;
                                        gs();
                                        break;
                                    }
                                  case 4:
                                      {
                                          use(57);
                                        Sout("你找到了一个矿洞.");
                                        Sout("\n是否挖矿?1.是 2.否");
                                        char l=_getch();
                                        if (l=='2')
                                          break;
                                        n=60000;
                                        n-=fost[7]*2838;
                                        n-=fost[8]*5092;
                                        n-=fost[9]*7928;
                                        n-=fost[10]*9203;
                                        n-=fost[11]*13029;
                                        n-=fost[44]*17832;
                                        n-=fost[51]*30091;
                                        n*=1-has_fumo[2][1]*0.04;
                                        n*=1-has_fumo[2][2]*0.05;
                                        if (n<10000)
                                          n=10000;
                                        for(i=1;i<=6;i++)
                                        {
                                            m=random(3,6);
                                            if (has_fumo[2][3])
                                              {
                                                  cout<<"你想要什么?\n";
                                                  cout<<"1.石头\n";
                                                  cout<<"2.铁锭\n";
                                                  cout<<"3.金锭\n";
                                                  cout<<"4.钻石\n";
                                                  int a;
                                                  cin>>a;
                                                  if (a>4)
                                                    a=random(1,4);
                                                  m=a+2;
                                          }
                                        if (m==6)
                                          hdcj(12);
                                          jdt(n/10000+(m-3));
                                          k=random(1,3);
                                          k*=random(1,has_fumo[2][4]+1);
                                          fost[m]+=k;
                                          cout<<fsn[m]<<'*'<<k;
                                          happened+=(name+"在矿洞淘钻/");
                                          gs();
                                        }
                                        break;
                                    }
                                    case 5:
                                        {
                                            use(58);
                                            srand(time(0));
                                            Sout("你遇到了一个废弃矿道");
                                            cout<<"是否探索?1.是 2.否 3.查看故事";
                                            char l=_getch();
                                            if (l=='3')
                                              {
                                                  cls();
                                                  cout<<"    这是一条灵异矿道,以前的矿工常常在里面离奇失踪,\n";
                                                  cout<<"数日后便会有几个影子在矿道里游荡。有人说这是矿工的亡\n";
                                                  cout<<"魂,也有人说这是恶魔的影子。\n";
                                                  cout<<"    唯一一个或者从矿道里走出来的是WYQ,他在下矿之前被\n";
                                                  cout<<"MCYH施加了BUFF,所以没事。但是他亲口说自己看到了地上躺\n";
                                                  cout<<"着无数没有生命的躯体,眼里冒着绿光。忽然他们全都站了起\n";
                                                  cout<<"来向WYQ扑过来,但是他们看到MCYH的BUFF时立刻魂飞魄散了。\n";
                                                  cout<<"    从此以后,只有游戏主宰者MCYH和好友WYQ能在矿道和地上\n";
                                                cout<<"世界中自由的穿梭,只有他能为地面上的人类带来矿道里丰富的宝藏。\n";
                                                  cout<<"    所以,这位看故事的玩家,你敢进去吗?\n";
                                                  cout<<"是否探索?1.是 2.否";
                                                  l=_getch();
                                                  if (l=='2'){
                                                    Sout("MCYH:胆小鬼,我编个故事吓吓你而已...");break;}
                                              }
                                            n=rand()%4+1;
                                            switch(n)
                                              {
                                                  case 1:
                                                  case 2:
                                                  case 3:
                                                      {
                                                          Sout("你发现了一个箱子,是否打开?1.YES 2.NO");
                                                          l=_getch();
                                                          if (l=='2')
                                                            break;
                                                          if (l=='1')
                                                            {
                                                                srand(time(0));
                                                                if (rand()%2)
                                                                  {
                                                                      happened+=(name+"在废弃矿道找到了很多宝藏/");
                                                                      cout<<"你找到了一堆宝藏!\n";
                                                                      cout<<"获得:";
                                                                n=random(3,6);
                                                                m=random(3,5);
                                                                cout<<fsn[n]<<'*'<<m;
                                                                fost[n]+=m;
                                                                cout<<",";
                                                                n=random(3,6);
                                                                m=random(3,5);
                                                                cout<<fsn[n]<<'*'<<m;
                                                                fost[n]+=m;
                                                                break; 
                                                                  }
                                          Sout("你遇到了一只游魂!");
                                          hdcj(14);
                                          m=random(things[9]-10,things[9]+15);
                                          int hp,attack,run;
                                          hp=m*(random(23,28));
                                          attack=m*(random(7,9));
                                          run=m;
                                          while(1)
                                          {
                                            cls();
                                            cout<<"Your hp:"<<things[2]<<'\n';
                                            cout<<"YH's hp:"<<hp<<'\n';
                                            cout<<"敌军等级:"<<m<<"\n"; 
                                            cout<<"1.attack 2.run away\n";
                                            char l=_getch();
                                            if (l=='2')
                                              {
                                                  if (rand()%2)
                                                    {
                                                        cout<<"逃跑成功,运气不错!";
                                                        break;
                                                    }
                                                else
                                                  cout<<"逃跑失败!\n";
                                              }
                                          else
                                          {
                                          if (fost[22])
                                            cout<<"你发动了技能【火炮轰炸】\n",n=1.2*things[5];
                                          if (fost[43])//43,50,53
                                            cout<<"你发动了技能【横扫】\n",n+=1.1*things[5];
                                          if (fost[50])
                                            cout<<"你发动了技能【坠入虚空】\n",n+=hp*0.5;
                                          if (fost[53])
                                            cout<<"你发动了技能【量子充能】\n",n+=0.4*things[2];
                                        if (fost[22]==0&&fost[43]==0&&fost[50]==0&&fost[53]==0){
                                            n=gongji(things[5]);
                                            n-=run;
                                            Sout("你发动了攻击,游魂受到了");
                                          }
                                            cout<<n;
                                            Sout("点伤害\n");
                                            hp-=n;
                                            }
                                            if (rand()%4)
                                            {
                                            Sout("游魂发动了攻击,你受到了");
                                            n=attack*0.87-things[6];
                                            if (n<1)
                                              n=1;
                                            cout<<n;
                                            Sout("点伤害") ;
                                            things[2]-=n;
                                            }
                                            else
                                            {
                                                cout<<"游魂发动技能“灵魂威慑”,对你造成了"<<attack*1.5<<"点伤害\n";
                                                things[2]-=attack*1.5;
                                            }
                                            if (things[2]<=0)
                                              {
                                                happened+=(name+"被游魂杀死了/");
                                                Die();
                                              }
                                          if (hp<=0)
                                            break;
                                          cls();
                                          }
                                        Sout("胜利!战利品:");
                                        things[83]++;
                                        n=random(2,6);
                                        m=random(0,6);
                                        n*=random(1,has_fumo[0][2]+1);
                                        cout<<fsn[m]<<"*"<<n;
                                        fost[m]+=n;
                                        gs();
                                        break;
                                                            }
                                                      }
                                    case 4:
                                        {
                                            if (rand()%2)
                                            {
                                                use(59);
                                              cout<<"你遇到了MCYH!\n";
                                              cout<<"1.attack 2.run away";
                                              char l=_getch();
                                              switch(l)
                                                {
                                                    case '2':break;
                                                    default:
                                                        {
                                                          Sout("\nMCYH:和作者打架。。。");
                                                          hdcj(15);
                                                          Sout("\nMCYH(拿起纳米剑):来吧!准备好了没有?Y/N");
                                                          char g=_getch();
                                                          if (g!='Y'&&g!='y')
                                                          {
                                                            Sout("MCYH:胆小鬼!");break;
                                                          }
                                                          gs();
                                                          things[0]++;
                                                          return;
                                                          break;
                                                        }
                                                }
                                              break;
                                            }
                                            else
                                            {
                                                use(60);
                                                cout<<"你遇到了WYQ!\n";
                                                cout<<"1.attack 2.run away\n";
                                                char l=_getch();
                                                switch(l)
                                                {
                                                    case '2':break;
                                                    default:
                                                        Sout("MCYH:竟敢和作者的好兄弟WYQ打架?!关机吧!!!");
                                                        system("Shutdown -H");
                                                        break;
                                                }
                                                break;
                                            }
                                        }
                                              }
                                        break;
                                        }
                                    case 6:
                                        {
                                            use(61);
                                            cout<<"你遇到了SLS(索罗斯)!";
                                            int a,b,c,d=random(things[9]-3,things[9]+5);
                                            int huanying=0;
                                            a=d*(random(21,30));
                                              b=d*(random(6,11));
                                              c=d;
                                            gs();
                                            while(1)
                                              {
                                                  cls();
                                                  Sout("YOUR HP:");
                                                  cout<<things[2]<<'\n';
                                                  Sout("SLS HP:");
                                                  cout<<a<<'\n';
                                                  Sout("SLS ATTACK:");
                                                  cout<<b<<'\n';
                                                  Sout("SLS DEFENCE:");
                                                  cout<<c<<'\n';
                                                  Sout("SLS XP:");
                                                  cout<<d<<'\n';
                                                  Sout("SLS幻影层数:");
                                                  cout<<huanying<<'\n';
                                                  cout<<"1.attack 2.run away\n";
                                                  char l=_getch();
                                                  if (l=='2')
                                                    {
                                                        if (rand()%4==1)
                                                          {
                                                              Sout("逃跑成功,运气不错");
                                                              break;
                                                      }
                                                    else
                                                      Sout("逃跑失败!\n");
                                                  }
                                                else
                                                  {
                                                      if (fost[22])
                                                      cout<<"你发动了技能【火炮轰炸】\n",n=1.2*things[5];
                                                      if (fost[43])//43,50,53
                                                      cout<<"你发动了技能【横扫】\n",n+=1.1*things[5];
                                                      if (fost[50])
                                                      cout<<"你发动了技能【坠入虚空】\n",n+=a*0.5;
                                                      if (fost[53])
                                                      cout<<"你发动了技能【量子充能】\n",n+=0.4*things[2];
                                                    if (fost[22]==0&&fost[43]==0&&fost[50]==0&&fost[53]==0){
                                                          n=gongji(things[5]);
                                                        n-=c;
                                                        Sout("你发动了攻击,SLS受到了");
                                                      }
                                                      else
                                                        cout<<"造成了";
                                                      cout<<n<<"点伤害\n";
                                                      a-=n;
                                                  }
                                                if (a<=0)
                                                  {
                                                      cout<<"胜利!战利品:XP5000";
                                                      int jiangli=random(0,56);
                                                    cout<<" "<<fsn[jiangli];
                                                    cout<<" *1";
                                                    fost[jiangli]++; 
                                                    things[83]++;
                                                      gs();
                                                      break;
                                                  }
                                                if (rand()%2)
                                                {
                                                    n=float((random(6,9))/10)*b-things[6];
                                                    Sout("索罗斯发动了攻击,你受到了");
                                                    cout<<n;
                                                    Sout("点伤害,索罗斯叠加了一层幻影\n");
                                                    huanying++;
                                                    things[2]-=n;
                                                }
                                                else
                                                {
                                                    int jin=random(1,3);
                                                    if (jin==1)
                                                      {
                                                          Sout("索罗斯发动了技能【幻枪连击】,对你造成");
                                                          n=1.6*b;
                                                          cout<<n;
                                                          Sout("点伤害\n");
                                                          things[2]-=n;
                                                      }
                                                    if (jin==2)
                                                      {
                                                          Sout("索罗斯发动技能【结合】,将幻影层数清空,并且每失去一个幻影,自身恢复30点血量,增加4点攻击");
                                                          a+=huanying*30;
                                                          b+=huanying*4;
                                                          huanying=0;
                                                      }
                                                    if (jin==3)
                                                      {
                                                          Sout("索罗斯发动技能【总攻击】,让所有幻影对敌人造成攻击(每个幻影拥有自身60%属性),对你造成了");
                                                          n=a*0.6*huanying;
                                                          cout<<n;
                                                          Sout("点伤害,并失去2个幻影");
                                                          huanying-=2;
                                                          things[2]-=n;
                                                      }
                                                }
                                                if (things[2]<=0)
                                                  Die();
                                              }
                                            break;
                                          }
                                        case 7:
                                            {
                                                cls();
                                                int a=things[5]*0.6,b=things[6]*0.5;
                                                int c=things[9]*3,d=things[9],e=things[9]*11;
                                                Sout("你遇到了一只树妖(树妖特性:只能攻击,无法逃跑,你的攻击和防御大幅下降)\n");
                                                while(e>0&&things[2]>0)
                                                  {
                                                      int A,B;
                                                      A=gongji(a);
                                                      A-=d;
                                                      Sout("你发动了攻击,树妖受到了");
                                                      cout<<A;
                                                      e-=A;
                                                      Sout("点伤害\n");
                                                      B=c*0.875-b;
                                                      Sout("树妖发动了攻击,你受到了");
                                                      cout<<B;
                                                      Sout("点伤害\n");
                                                      things[2]-=B;
                                                      if (things[2]<=0)
                                                        {
                                                            happened+=(name+"被树妖杀死了");
                                                            Die();
                                                        }
                                                      gs();
                                                  }
                                                cout<<"胜利!";
                                                happened+=(name+"杀死了一只树妖/");
                                                    Sout("胜利!战利品:");
                                                    things[83]++;
                                                    n=random(2,4);
                                                    m=random(0,2);
                                                    n*=random(1,has_fumo[0][2]+1);
                                                    cout<<fsn[m]<<"*"<<n;
                                                    fost[m]+=n;
                                            }
                                        }
                                    break;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值