闯(2.2)

Posted 2006hanziwei

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了闯(2.2)相关的知识,希望对你有一定的参考价值。

技术图片
#include<conio.h>
#include<bits/stdc++.h>
#include<windows.h>
#define CIN freopen("CONIN$", "r+t", stdin); 
#define COUT freopen("CONOUT$", "w+t", stdout);
#define PN a[0].name
#define PL a[0].level
#define PK a[0].kill
#define PF a[0].fy
#define PS a[0].sudu
#define PJ a[0].jineng
#define PM a[0].money
#define PZ a[0].zhuangbei
#define PB a[0].blood
#define PBJ a[0].baoji
#define PX a[0].xixue
#define PE a[0].ex
#define PSB a[0].shanbi
#define PZL a[0].zhanli 
#define PMZ a[0].mingzhong 
#define CR SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
#define CG SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN)
#define CY SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
#define CB SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);
#define CP SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE);
#define CQ SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN |FOREGROUND_BLUE);
#define PFK printf("%c%c",0xa8,0x80);
#define SY system("cls");
using namespace std;
struct player
{
    int jnzt[120],zdl;
    string name;
    int shanbi,level,blood,kill,fy,sudu,jnj,jineng[50],jns,money,zhuangbei[70],zbss,baoji,xixue,ex,mingzhong,zhanli,zbfi,zbf[10],jnfi,jnf[10],jncd[100];
    bool yaowu[50];
    int xiaoguo[50];
    int daoju[50];
    int zb_le[120];
    int jn_le[120];
    int lq,ct;
}a[1];
int game,zbb,jnn,zhiling;
string na;
bool dll,wrong;
string map_name[10]={"","谷村","桃林","大烟山","天池","龙宫","飞马山"};
string jineng_name[100]={"","破甲","雷击","自强","迷惑","快斩","必杀","毒雾","悟道","坚守","愤击","不周","神速","破灭","龙啸","奋战","惊鸿"};
bool boss[10][100];
bool xingzhi[120]={0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1};
string boss_name[10][12]={"御宝司一","御宝司二","御宝将","梨士一","梨士二","梨长","柳灵一","柳灵二","柳精","村霸一","村霸二","村长",
                           "武者一","武者二","武者三","武师","桃师一","桃师二","桃师三","桃女","剑士一","剑士二","剑士三","剑狂",
                           "猛虎一","猛虎二","猛虎三","虎王","毒虫一","毒虫二","毒虫三","","道人一","道人二","道人三","烟山灵仙",
                           "池卫一","池卫二","池卫三","池卫队长","石像一","石像二","石像三","石巨人","水侍一","水侍二","水侍三","共工",
                           "虾兵一","虾兵二","虾兵三","虾王","蟹将一","蟹将二","蟹将三","蟹皇","龙晶一","龙晶二","龙晶三","敖广",
                           "山贼一","山贼二","山贼三","山贼头领","战士一","战士二","战士三","狂战士","飞马一","飞马二","飞马三","飞马女王"};
int Cd[105]={0,6,12,18,9,20,4,8,14,17,19,12,16,16,30,0,16};
int boss_blood[10][12]= {60,62,65,50,52,55,70,75,80,50,70,90,130,135,140,150,100,110,120,140,110,120,140,160,200,220,240,260,180,190,210,250,400,450,500,600,620,640,660,700,1000,1100,1200,1500,1300,1450,1600,2000,1600,1700,1800,1900,2500,2800,3100,3500,3000,3300,3600,4000,900,1000,1100,1200,4400,4600,4900,5500,6000,7000,8500,10000};
int boss_kill[10][12]=  {2,3,4,10,10,10,8,9,10,20,22,25,13,14,15,18,13,15,17,19,30,32,35,40,40,43,46,50,45,48,51,54,60,62,66,70,74,78,82,90,92,95,96,100,110,130,150,300,250,260,280,300,280,320,360,400,520,550,580,650,800,850,900,1000,700,800,900,1100,1200,1300,1400,1500};
int boss_fy[10][12]=    {2,3,4,4,4,4,5,6,7,8,8,10,13,14,15,16,13,15,17,19,12,15,17,20,20,25,30,40,33,35,37,40,60,62,66,70,80,82,88,90,110,120,130,150,110,130,150,300,110,150,170,220,300,320,350,380,520,550,580,600,200,260,330,400,700,800,900,1100,1200,1300,1400,1500};
int boss_sudu[10][12]=  {2,3,4,4,4,4,5,6,7,8,8,10,8,10,12,15,11,12,13,16,14,15,17,19,40,44,47,50,60,62,65,70,60,62,66,70,80,85,90,92,80,82,85,88,110,130,150,300,220,230,260,280,200,230,260,300,520,550,580,600,1000,1100,1200,1500,500,550,600,700,1200,1300,1400,1500};
int boss_jineng[10][12]={0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,12,0,0,0,15,0,0,0,16};
int boss_jinengr[10][12]={0,0,0,0,0,0,0,0,20,0,0,20,0,0,0,30,0,0,0,28,0,0,0,33,0,0,0,40,0,0,0,45,0,0,0,60,0,0,0,70,0,0,0,50,0,0,0,20,0,0,0,25,0,0,0,30,0,0,0,30,0,0,0,30,0,0,0,0,0,0,0,40};
int boss_shanbi[10][12]={2,3,4,3,3,3,7,8,10,10,10,10,11,13,14,15,20,21,22,25,15,18,22,25,30,33,35,38,40,43,46,50,60,62,66,70,60,61,63,66,50,52,56,60,70,75,80,90,96,99,101,105,100,103,106,110,112,118,124,130,150,155,160,170,133,140,147,160,170,176,185,200};
int boss_mingzhong[10][12]={2,3,4,4,4,4,6,6,6,9,9,12,10,10,10,11,12,12,12,13,14,15,16,17,20,22,23,25,26,29,30,31,33,35,37,38,40,42,45,47,50,52,55,57,60,65,70,80,96,99,101,105,100,103,106,110,112,118,124,130,150,155,160,170,133,140,147,160,170,176,185,200};
int boss_baoji[10][12]= {2,3,4,4,4,4,5,7,8,10,12,14,12,13,14,15,13,14,16,17,21,23,25,28,30,32,34,36,40,43,45,48,60,62,66,70,80,82,84,86,80,85,87,90,92,94,96,100,96,99,101,105,100,103,106,110,112,118,124,130,150,155,160,170,133,140,147,160,170,176,185,200};
int boss_xx[10][12]=    {2,3,4,3,3,3,6,7,8,9,9,11,10,11,12,14,11,13,13,15,14,17,20,23,40,42,45,47,60,62,67,70,60,62,66,70,82,83,85,85,70,80,81,84,90,93,95,97,100,96,99,101,105,100,103,106,110,112,118,124,130,150,155,160,170,133,140,147,160,170,176,185,200};
int boss_killp[10][12]=  {1,1,1,2,2,2,3,3,3,4,4,5,5,5,5,6,5,5,5,5,6,6,6,7,8,8,8,9,8,8,8,8,10,10,10,10,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,14,12,12,12,14,14,14,14,17,14,14,14,17,14,14,14,17,14,14,14,17};
int boss_bloodp[10][12]= {4,4,4,5,6,7,7,7,7,8,9,12,12,13,13,15,13,14,14,14,15,15,16,17,17,18,18,18,17,17,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,15,18,22,22,15,18,22,22,15,18,22,30,15,18,22,30,15,18,22,30,15,18,22,30};
int boss_fyp[10][12]=    {1,1,1,2,2,3,3,3,3,4,4,5,5,6,6,6,5,5,5,5,4,4,5,6,7,7,7,8,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,8,8,8,8,9,9,9,9,9,9,9,10,9,9,9,10,9,9,9,10,9,9,9,10};
int boss_sudup[10][12]=  {1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,4,3,3,3,3,4,4,5,5,5,5,5,6,6,6,6,7,7,7,7,7,8,8,8,8,7,7,7,7,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,12,10,10,10,12,10,10,10,12,10,10,10,12};
int boss_xxp[10][12]=    {1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,2,3,1,1,2,3,1,1,2,4,1,1,2,4,2,2,2,4,3,3,3,3,3,3,3,3,3,3,3,4,3,3,3,4,3,3,3,4,3,3,3,4};
int boss_baojip[10][12]= {0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1,1,2,0,1,1,2,0,1,1,2,1,1,1,3,1,1,1,3,2,2,2,4,3,3,3,3,3,3,3,3,3,3,3,4,3,3,3,4,3,3,3,4,3,3,3,4};
int boss_mingzhongp[10][12]={0,1,1,2,0,1,1,2,0,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,3,1,1,2,3,2,2,2,4,3,3,3,3,3,3,3,3,3,3,3,4,3,3,3,4,3,3,3,4,3,3,3,4};
int boss_jinengp[10][12]={0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,0,0,0,0,15,0,0,0,16};
int boss_moneyp[10][12]= {5,5,5,5,5,5,5,5,5,5,5,10,
                          8,8,8,12,8,8,8,12,8,8,8,15,
                          10,10,10,18,10,10,10,20,10,10,10,30,
                          11,13,13,15,13,14,14,16,17,18,19,20,
                          18,18,18,21,18,18,18,21,18,18,18,30,
                          21,24,27,30};
int boss_exp[10][12]=    {50,100,150,200,250,300,500,700,800,900,1000,1200,1500,2000,1400,1500,1600,1800,1400,1600,1800,2000,2000,2100,2200,2300,2400,2500,2500,2600,3000,3100,3200,3300,3400,3600,3700,3800,4000,4100,4100,4100,4400,4100,4100,4100,4400,4600,4600,4600,5000,5100,5200,5400,5700,6000,6300,6600,7000,7200,7500,7700,8000};
int boss_sbp[10][12]=    {0,0,0,1,1,0,1,1,1,1,1,2,1,1,2,2,3,4,4,5,3,3,3,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,3,3,3,5,3,3,3,5,3,3,3,5};
int gk[10],mapsum=6;
int lev[150]={0,50,100,150,200,300,500,800,1000,1200,1500,2000,2500,3000,7000,10000,11000,12000,13000,14000,15000,16000,17000,19000,20000,21000,22200,23000,25000,27000};
string zhuangbei_name[120][6]={"","石斧","铁斧","黑晶斧","蚀光战斧","黑夜之灭",
                               "","轻剑","影剑","鬼剑","快龙剑","圣剑",
                               "","飞刀","飞毒刺","掠刀","闪电刀","光形",
                               "","重刃","碎骨刃","取魂刃","阎罗刃","魔刃",
                               "","长弓","蛇弓","穿云弓","千里弓","破晓",
                               "","冲锋","愤屠","乱袭","落命","焚风", 
                               "","彗星","陨星","琴星","燎星","骤星",
                               "","惊雷","霹雷","天雷","神雷","雷霆万钧",
                               "","布甲","缎甲","铁甲","金甲","楼兰",
                               "","石盾","铁盾","钢盾","守护之盾","金钟罩"};
int zbget[120]={0,3,6,9,12,14,16,19},wqs=10,jns=16,maptg;
bool mapp[5];
string yw_name[120]={"","大力丸","铁身丸","疾行丸","活血散","光华丹"};
int yaowu_jiage[120]={0,20,20,20,20,50};
string dj_name[120]={"","武书","淬炼石","决令","雷灵","仙丹"};
int daoju_jiage[120]={0,20,20,20,50,20};
int map_fy[120]={10,30,100,300,700,1200}; 
int zb_sm[16][11]={0, 0,0 ,0 ,0,0 ,0,0,0,0,0,
                   0, 0,0,0,0,0,0,0,120,0,0,
                   0,0,0,0,0,0,0,0,250,0,0,
                   0,0,0,0,0,0,0,0,380,0,0,
                   0,0,0,0,0,0,0,0,550,0,0,
                   0,0,0,0,0,0,0,0,800,0,0};
int zb_fy[16][11]={0, 0,0 ,0 ,0,0 ,0,0,0,0,0,
                   0, 0,0,0,0,0,0,0,15,30,0,
                   0,0,0,0,0,0,0,0,30,60,0,
                   0,0,0,0,0,0,0,0,45,100,0,
                   0,0,0,0,0,0,0,0,60,140,0,
                   0,0,0,0,0,0,0,0,80,200,0};
int zb_sd[16][11]={0,0,0 ,0 ,0,0 ,0,0,0,0,0,
                   0,10,5,0,0,6,0,0,0,0,0,
                   0,20,10,0,0,10,0,0,0,0,0,
                   0,30,15,0,0,14,0,0,0,0,0,
                   0,40,20,0,0,18,0,0,0,0,0,
                   0,50,25,0,0,22,0,0,0,0,0};
int zb_gj[16][11]={0, 0,0 ,0 ,0,0 ,0,0,0,0,0,
                   5, 0,10,30,0,25,15,0,0,3,0,
                   10,0,14,40,0,32,24,0,0,6,0,
                   15,0,20,50,0,39,33,0,0,9,0,
                   20,0,28,66,0,46,42,0,0,12,0,
                   40,0,44,85,0,53,51,0,0,15,0};
float zb_ct[16][11]={0, 0,0 ,0 ,0,0 ,0,0,0,0,0,
                   40, 0,20,0,0.1,0,0,0.05,0,0,0,
                   75,0,40,0,0.17,0,0,0.07,0,0,0,
                   110,0,60,0,0.24,0,0,0.09,0,0,0,
                   145,0,80,0,0.31,0,0,0.11,0,0,0,
                   180,0,100,0,0.45,0,0,0.13,0,0,0};
int zb_lq[16][11]={0, 0,0 ,0 ,0,0 ,0,0,0,0,0,
                   3, 0,0,0,0,0,0,0,0,0,0,
                   6,0,0,0,0,0,0,0,0,0,0,
                   9,0,0,0,0,0,0,0,0,0,0,
                   12,0,0,0,0,0,0,0,0,0,0,
                   15,0,0,0,0,0,0,0,0,0,0};
int zb_bjl[16][11]={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,6,0,0,0,0,
                   0,0,0,0,0,0,9,0,0,0,0,
                   0,0,0,0,0,0,12,0,0,0,0,
                   0,0,0,0,0,0,15,0,0,0,0};
int zb_bjx[16][11]={0,0,0,0,0,0,0,0,0,0,0,
                   0,0,0,0,0,0,8,0,0,0,0,
                   0,0,0,0,0,0,16,0,0,0,0,
                   0,0,0,0,0,0,24,0,0,0,0,
                   0,0,0,0,0,0,32,0,0,0,0,
                   0,0,0,0,0,0,40,0,0,0,0};
int zb_xx[16][11]={0,0,0,0,0,0,0,0,0,0,0,
                   0,0,0,0,0,2,0,5,0,0,0,
                   0,0,0,0,0,4,0,10,0,0,0,
                   0,0,0,0,0,6,0,15,0,0,0,
                   0,0,0,0,0,8,0,20,0,0,0,
                   0,0,0,0,0,10,0,25,0,0,0};
int wq_wl[16][11]={0,0,0,0,0,0,0,0,0,0,0,
                   5,0,10,0,20,30,0,50,0,0,0,
                   8,3,14,0,24,36,10,70,0,0,0,
                   11,5,18,5,30,45,25,80,0,0,0,
                   15,8,22,8,36,55,40,100,0,0,0,
                   20,11,28,11,42,62,50,120,0,0,0};
float wq_bj[16][11]={0,0,0,0,0,0,0,0,0,0,0,
                     1,1.3,1,1.6,1.2,1.4,2.2,1.0,1,1,1,
                     1,1.5,1,1.8,1.4,1.5,2.5,1.2,1,1,1,
                     1,1.8,1,2.1,1.5,1.9,2.9,1.5,1,1,1,
                     1,2.2,1,2.4,1.8,2.3,3.2,1.8,1,1,1,
                     1,2.5,1,2.6,2.3,2.6,3.7,2.0,1,1,1};
int zbup[50]={0,0,1,2,4,5};
int jnup[50]={0,0,1,2,4,6};
float pj[6]={0,1,1.3,1.6,1.9,2.3};
float lj[6]={0,0.5,0.55,0.6,0.65,0.7};
float zq[6]={0,1.2,1.25,1.3,1.35,1.4};
float mh[6]={0,0.9,0.85,0.8,0.75,0.7};
float kz1[6]={0,0.1,0.11,0.12,0.13,0.14};
float kz2[6]={0,1.2,1.3,1.4,1.5,1.6};
int bss[6]={0,200,230,250,280,300};
float dw[6]={0,1.2,1.5,1.7,2,2.5};
float wd1[6]={0,0.6,0.55,0.5,0.45,0.4};
float wd2[6]={0,2.3,2.6,3,3.5,4};
float wd3[6]={0,100,150,210,250,300};
float js1[6]={0,0.6,0.8,1,1.4,1.8};
float fj[6]={0,3,3.2,3.5,3.7,4}; 
float bz[6]={0,30,50,70,100,140};
float ss[6]={0,1.3,1.5,1.7,2,2.4}; 
float pm[6]={0,0.2,0.25,0.3,0.35,0.4};
float lx[6]={0,0.6,0.75,0.9,1.05,1.2};
float fz[6]={0,0.33,0.4,0.48,0.57,0.7};
float jh[6]={0,0.6,0.65,0.7,0.75,0.85};
int zble=5;
int jnle=5;
bool zb[120];
int yws=5,djs=5;
void star(int n)
{
    CY;
    for(int i=1;i<=n;i++)cout<<"";cout<<endl;
    CR;
}
void fight()
{
    SY
    int bosss[2]={0},pp[18]={0},ppp=0;
    if(gk[maptg]==12)maptg++;
    printf("请选择你要挑战的地图:
");
    for(int i=1;i<=maptg+1;i++)
    {
        cout<<i<<"."<<map_name[i]<<endl;
    }
    int o;
    scanf("%d",&o);
    if(o==0)return;
    if(o>maptg+1)
    {
        SY
        printf("指令无效!");
        Sleep(1000);
        fight();
        return;
    }
    SY
    printf("通关数:%d
",gk[--o]);
    printf("请选择你要挑战的对手:
");
    for(int i=0;i<=min(11,gk[o]);i++)cout<<i+1<<"."<<boss_name[o][i]<<"
";
    int p;
    scanf("%d",&p);
    if(p>gk[o]+1)
    {
        SY
        printf("指令无效!");
        Sleep(1000);
        fight();
        return;
    }
    else if(p==0)return;
    else
    {
        ppp=0;
        bool f=0;
        p--;
        int ms=0,bms=0;
        int t=PB,k=boss_blood[o][p],pf=PF,pk=PK,bk1=boss_kill[o][p],bf=boss_fy[o][p],ps=PS,bs=boss_sudu[o][p];
        int ppk=0,pps=0,pp1=0,pp2=0,ll=0,bbjl=0,bbjx=0,xxx=0,smm=0,fyy=0;
        for(int i=1;i<=a[0].jnf[0];i++)if(a[0].jnf[i]==15)a[0].jnzt[15]=1;
        for(int i=1;i<=a[0].zbf[0];i++)ppk+=zb_gj[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        for(int i=1;i<=a[0].zbf[0];i++)pps+=zb_sd[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        for(int i=1;i<=a[0].zbf[0];i++)
        {
            if(zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]])
            {
                if(zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]]<1)pp1+=zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]]*100;
                else pp2+=zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
            }
        }
        for(int i=1;i<=a[0].zbf[0];i++)ll+=zb_lq[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        for(int i=1;i<=a[0].zbf[0];i++)bbjl+=zb_bjl[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        for(int i=1;i<=a[0].zbf[0];i++)bbjx+=zb_bjx[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        for(int i=1;i<=a[0].zbf[0];i++)xxx+=zb_xx[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        for(int i=1;i<=a[0].zbf[0];i++)smm+=zb_sm[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        for(int i=1;i<=a[0].zbf[0];i++)fyy+=zb_fy[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        float ctt=(float)(100-pp1)/100;
        pk+=ppk;ps+=pps;bf*=ctt;bf-=pp2;PB+=smm;t+=smm;pf+=fyy;
        Sleep(2000);
        memset(a[0].jncd,0,sizeof(a[0].jncd));
        while(t>0&&k>0)
        {
            for(int i=1;i<=max(0,ps/bs)+rand()%1+1;i++)
            {
                ms=(pf*100)/(pf+602);bms=(bf*100)/(bf+602);
                if(a[0].jnzt[16]!=0)ms+=a[0].jn_le[16]*100;
                if(a[0].jnzt[16]!=0)a[0].jnzt[16]--;
                if(a[0].jnzt[15]==1)ms+=(1-(t/PB))*fz[a[0].jn_le[15]]*100;
                if(boss_jineng[o][p]==15)bms=(1-(k/boss_blood[o][p]))*70;
                ms=min(90,ms);bms=min(90,bms);
                float need1=(float)(100-bms)/100,need2=(float)(100-ms)/100;
                for(int i=1;i<=a[0].jnf[0];i++)if(a[0].jncd[i])a[0].jncd[i]--;
                if(_kbhit())
                {
                    int ch=getch()-48;
                    if(ch>0&&ch<=a[0].jnf[0]&&a[0].jncd[ch]==0&&xingzhi[a[0].jnf[ch]]==1)
                    {
                        int h=a[0].jnf[ch];
                        a[0].jncd[ch]=Cd[h]*(100-ll)/100;
                        cout<<PN<<""<<boss_name[o][p]<<"使用了"<<jineng_name[h]<<"
";
                        if(h==1)
                        {
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<pk*pj[a[0].jn_le[1]]*need1<<"点伤害
";
                            k-=pk*pj[a[0].jn_le[1]]*need1;
                            pp[h]+=pk*pj[a[0].jn_le[1]]*need1;
                        }
                        if(h==2)
                        {
                            int i=k*lj[a[0].jn_le[2]];
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<i*need1<<"点伤害
";
                            k-=i*need1;
                            pp[h]+=i*need1;
                        }
                        if(h==3)
                        {
                            t*=zq[a[0].jn_le[3]];
                            pk*=zq[a[0].jn_le[3]];
                            pf*=zq[a[0].jn_le[3]];
                            cout<<PN<<"的血量,攻击力,防御提升了"<<(zq[a[0].jn_le[3]]-1)*100<<"%
";
                        }
                        if(h==4)
                        {
                            bk1*=mh[a[0].jn_le[4]];
                            cout<<boss_name[o][p]<<"的攻击力降低了"<<(1-mh[a[0].jn_le[4]])*100<<"%
";
                        }
                        if(h==5)
                        {
                            int i=k*kz1[a[0].jn_le[5]]+pk*kz2[a[0].jn_le[5]],q=0;
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<i*need1<<"点伤害
";q+=i;
                            i=k*(kz1[a[0].jn_le[5]]-0.01)+pk*(kz2[a[0].jn_le[5]]-0.1);
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<i*need1<<"点伤害
";q+=i;
                            i=k*(kz1[a[0].jn_le[5]]-0.02)+pk*(kz2[a[0].jn_le[5]]-0.2);
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<i*need1<<"点伤害
";q+=i;
                            i=k*(kz1[a[0].jn_le[5]]-0.03)+pk*(kz2[a[0].jn_le[5]]-0.3);
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<i*need1<<"点伤害
";q+=i;
                            pp[h]+=q*need1;
                            k-=q*need1;
                        }
                        if(h==6)
                        {
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<bss[a[0].jn_le[6]]*need1<<"点伤害
";
                            pp[h]+=bss[a[0].jn_le[6]]*need1;
                            k-=bss[a[0].jn_le[6]]*need1;
                        }
                        if(h==7)
                        {
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<dw[a[0].jn_le[7]]*max(100,pk-bf)*need1<<"点伤害
";
                            cout<<PN<<"回复了"<<2*dw[a[0].jn_le[7]]*pk*need1<<"点血量
";
                            pp[h]+=dw[a[0].jn_le[7]]*pk*need1;
                            k-=dw[a[0].jn_le[7]]*pk*need1;
                            t+=2*dw[a[0].jn_le[7]]*pk*need1;
                        }
                        if(h==8)
                        {
                            cout<<PN<<"使"<<boss_name[o][p]<<"的防御降低了"<<(1-wd1[a[0].jn_le[8]])*100<<"%
";
                            cout<<PN<<""<<boss_name[o][p]<<"造成了"<<wd2[a[0].jn_le[8]]*pk*need1<<"点伤害
";
                            cout<<PN<<"回复了"<<wd3[a[0].jn_le[8]]<<"点血量
";
                            pp[h]+=wd2[a[0].jn_le[8]]*pk*need1;
                            bf*=wd1[a[0].jn_le[8]];
                            k-=wd2[a[0].jn_le[8]]*pk*need1;
                            t+=wd3[a[0].jn_le[8]];
                        }
                        if(h==9)
                        {
                            cout<<PN<<"的防御提升了"<<js1[a[0].jn_le[9]]*pf<<"";
                            pf*=js1[a[0].jn_le[9]]+1;
                        }
                        if(h==10)
                        {
                            cout<<PN<<"扣减了"<<t*0.6<<"点血量,对"<<boss_name[o][p]<<"造成了"<<fj[a[0].jn_le[10]]*(PB-t)*need1<<"点伤害
";
                            pp[h]+=fj[a[0].jn_le[10]]*(PB-t)*need1;
                            k-=fj[a[0].jn_le[10]]*(PB-t)*need1;
                            t*=0.4;
                        }
                        if(h==11)
                        {
                            cout<<PN<<"增加了"<<bz[a[0].jn_le[11]]<<"点攻击力和防御
";
                            pk+=bz[a[0].jn_le[11]];
                            pf+=bz[a[0].jn_le[11]];
                        }
                        if(h==12)
                        {
                            cout<<PN<<"增加了"<<ss[a[0].jn_le[12]]*100-100<<"%速度
";
                            ps*=ss[a[0].jn_le[12]];
                        }
                        if(h==13)
                        {
                            cout<<PN<<""<<t*pm[a[0].jn_le[13]]<<"点血量转化为了攻击力
";
                            pk+=t*pm[a[0].jn_le[13]];
                            t*=1-pm[a[0].jn_le[13]];
                        } 
                        if(h==14)
                        {
                            cout<<PN<<"造成了"<<(t+pk+pf+ps)*2*lx[a[0].jn_le[14]]*need1<<"点伤害
";
                            k-=(t+pk+pf+ps)*2*lx[a[0].jn_le[14]]*need1;
                            pp[h]+=(t+pk+pf+ps)*2*lx[a[0].jn_le[14]]*need1;
                        }
                        if(h==16)
                        {
                            a[0].jnzt[16]=3;
                        }
                    }
                    Sleep(500);
                } 
                SY
                int g=0;
                if(k<=0||t<=0)break;
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
                cout<<"你的血量:
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                cout<<|;
                for(int i=1;i<=max(0,t*20/PB);i++)printf("%c%c",0xa8,0x80);
                for(int i=max(0,t*20/PB)*2+1;i<=40;i++)cout<< ;
                cout<<|;
                cout<<max(0,t)<</<<PB<<"
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                for(int i=1;i<=a[0].jnf[0];i++)
                {
                    cout<<i<<".";
                    cout<<jineng_name[a[0].jnf[i]]; 
                    if(xingzhi[a[0].jnf[i]]==0)cout<<"被动技能
";
                    else
                    {
                        cout<<"冷却时间:";
                        cout<<a[0].jncd[i];
                        cout<<""; 
                    }
                } 
                cout<<"免伤:"<<ms<<"%
";
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
                cout<<boss_name[o][p]<<"的血量:
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                cout<<|;
                for(int i=1;i<=max(0,k*20/boss_blood[o][p]);i++)printf("%c%c", 0xa8, 0x80);
                for(int i=max(0,k*20/boss_blood[o][p])*2+1;i<=40;i++)cout<< ;
                cout<<|;
                cout<<max(0,k)<</<<boss_blood[o][p]<<"
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                cout<<"免伤:"<<bms<<"%
";
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                int ff=rand()%2;
                string ss;
                int hh;
                if(a[0].zbss&&ff==1&&a[0].zbf[0]){g=rand()%a[0].zbf[0]+1;ss=zhuangbei_name[a[0].zbf[g]][a[0].zb_le[a[0].zbf[g]]];hh=a[0].zbf[g];}
                else ss="普通攻击";
                if(hh==8||hh==9)ss="普通攻击";
                cout<<PN<<""<<boss_name[o][p]<<"使用了"<<ss<<"
";
                if(rand()%100+1<boss_shanbi[o][p]-PMZ){printf("对手闪避了你的攻击!!
");Sleep(500);continue;}
                int qq=ss!="普通攻击"?wq_wl[a[0].zb_le[a[0].zbf[g]]][a[0].zbf[g]]:0,pp=ss!="普通攻击"?wq_bj[a[0].zb_le[PZ[g]]][PZ[g]]:1;
                int w=pk+rand()%pk/3+1,y=1;
                bool f=rand()%100+1<=PBJ+bbjl?1:0;
                if(f)y=1.8+bbjx/100+((rand()%2)-0.5)*0.14;
                w*=y*pp;
                w+=qq;
                if(ss!="普通攻击")
                {
                    if(a[0].zb_le[a[0].zbf[g]]==5)
                    {
                        int l=a[0].zbf[g]+1;
                        if(l==1)w+=k*0.08;
                        else if(l==2)t+=w*0.13;
                        else if(l==3)w*=1.5;
                        else if(l==4)pk*=1.26;
                        else if(l==5)bf*=0.88;
                        else if(l==6)w+=boss_blood[o][p]*0.04;
                        else if(l==7)bk1*=0.88;
                        else w+=PB*0.2;
                    }
                }
                w*=need1;
                cout<<PN<<""<<boss_name[o][p]<<"造成了"<<w<<"点伤害
";
                ppp+=w; 
                t+=w*(PX+xxx)/100;
                if(t>PB)t=PB;
                k-=w;
                if(t>PB)t=PB;
                Sleep(500);
            }
            for(int i=1;i<=max(0,bs/ps)+rand()%1+1;i++)
            {
                ms=(pf*100)/(pf+602);bms=(bf*100)/(bf+602);
                if(boss_jineng[o][p]==16)bms+=80;
                if(a[0].jnzt[16]!=0)ms+=a[0].jn_le[16]*100;
                if(a[0].jnzt[16]!=0)a[0].jnzt[16]--;
                if(a[0].jnzt[15]==1)ms+=(1-(t/PB))*fz[a[0].jn_le[15]]*100;
                if(boss_jineng[o][p]==15)bms=(1-(k/boss_blood[o][p]))*70;
                ms=min(90,ms);bms=min(90,bms);
                float need1=(float)(100-bms)/100,need2=(float)(100-ms)/100;
                cout<<need1<<" "<<need2<<endl;
                for(int i=1;i<=a[0].jnf[0];i++)if(a[0].jncd[i])a[0].jncd[i]--;
                SY
                if(t<=0||k<=0)break;
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
                cout<<"你的血量:
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                cout<<|;
                for(int i=1;i<=max(0,t*20/PB);i++)printf("%c%c",0xa8,0x80);
                for(int i=max(0,t*20/PB)*2+1;i<=40;i++)cout<< ;
                cout<<|;
                cout<<max(0,t)<</<<PB<<"
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                for(int i=1;i<=a[0].jnf[0];i++)
                {
                    cout<<i<<".";
                    cout<<jineng_name[a[0].jnf[i]];
                    if(xingzhi[a[0].jnf[i]]==0)cout<<"被动技能
";
                    else
                    {
                        cout<<"冷却时间:";
                        cout<<a[0].jncd[i];
                        cout<<""; 
                    }
                } 
                cout<<"免伤:"<<ms<<"%
";
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
                cout<<boss_name[o][p]<<"的血量:
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                cout<<|;
                for(int i=1;i<=max(0,k*20/boss_blood[o][p]);i++)printf("%c%c", 0xa8, 0x80);
                for(int i=max(0,k*20/boss_blood[o][p])*2+1;i<=40;i++)cout<< ;
                cout<<|;
                cout<<max(0,k)<</<<boss_blood[o][p]<<"
";
                cout<<" ";
                for(int i=1;i<=40;i++)cout<<-;
                cout<<endl;
                cout<<"免伤:"<<bms<<"%
";
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
                if(rand()%100+1<boss_jinengr[o][p])
                {
                    int h=boss_jineng[o][p];
                    cout<<boss_name[o][p]<<""<<PN<<"使用了"<<jineng_name[h]<<"
";
                    if(h==1)
                    {
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<bk1*need2<<"点伤害
";
                        bosss[0]+=bk1*(1-ms);
                        t-=bk1*(1-ms);
                    }
                    if(h==2)
                    {
                        int i=t*0.5;
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<i*need2<<"点伤害
";
                        bosss[0]+=i*need2;
                        t-=i*need2;
                    }
                    if(h==3)
                    {
                        k*=1.2;
                        bk1*=1.2;
                        bf*=1.2;
                        cout<<boss_name[o][p]<<"的血量,攻击力,防御提升了20%
";
                    }
                    if(h==4)
                    {
                        pk*=0.9;
                        cout<<"你的攻击力降低了10%!!
";
                    }
                    if(h==5)
                    {
                        int i=t*0.1+bk1*1.2;
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<i*need2<<"点伤害
";
                        i=t*0.09+bk1*1.1;
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<i*need2<<"点伤害
";
                        i=t*0.08+bk1;
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<i*need2<<"点伤害
";
                        i=t*0.07+bk1*0.9;
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<i*need2<<"点伤害
";
                        bosss[0]+=t*0.34+bk1*4.2;bosss[0]*=need2;
                        t-=(t*0.34+bk1*4.2)*need2;
                    }
                    if(h==6)
                    {
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<200*need2<<"点伤害
";
                        bosss[0]+=200*need2;
                        t-=200*need2;
                    }
                    if(h==7)
                    {
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<1.2*bk1*need2<<"点伤害
";
                        cout<<boss_name[o][p]<<"回复了"<<2.4*bk1*need2<<"点血量
";
                        bosss[0]+=1.2*bk1*need2;
                        t-=1.2*bk1*need2;
                        k+=2.4*bk1*need2;
                    }
                    if(h==8)
                    {
                        cout<<boss_name[o][p]<<"使"<<PN<<"的防御降低了"<<"50%
";
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<bk1*3*need2<<"点伤害
";
                        cout<<boss_name[o][p]<<"回复了"<<210<<"点血量
";
                        bosss[0]+=bk1*3*need2;
                        pf*=0.5;
                        t-=3*bk1*need2;
                        k+=210;
                    }
                    if(h==9)
                    {
                        cout<<boss_name[o][p]<<"的防御提升了"<<bf<<"";
                        bf*=2;
                    }
                    if(h==10)
                    {
                        cout<<boss_name[o][p]<<"扣减了"<<k*0.6<<"点血量,对"<<PN<<"造成了"<<3.5*(boss_blood[o][p]-k)*need2<<"点伤害
";
                        bosss[0]+=3.5*(boss_blood[o][p]-k)*need2;
                        t-=3.5*(boss_blood[o][p]-k)*need2;
                        k*=0.4;
                    }
                    if(h==11)
                    {
                        cout<<boss_name[o][p]<<"增加了50点攻击,防御!!
";
                        bk1+=50;
                        bf+=50;
                    }
                    if(h==12)
                    {
                        cout<<boss_name[o][p]<<"增加了70%速度!!
";
                        bs*=1.7;
                    }
                    if(h==13)
                    {
                        cout<<boss_name[o][p]<<"将25%血量转化为了攻击力!!
";
                        bk1+=k*0.25;
                        k*=0.75;
                    }
                    if(h==14)
                    {
                        cout<<boss_name[o][p]<<""<<PN<<"造成了"<<(k+bk1+bf+bs)*2.8*need2<<"点伤害!!
";
                        bosss[0]+=(k+bk1+bf+bs)*2.8*need2;
                        t-=(k+bk1+bf+bs)*2.8*need2;
                    }
                    if(h==16)
                    {
                        bms+=80;
                    }
                }
                else
                {
                    if(rand()%100+1<PSB-boss_mingzhong[o][p]){printf("你闪避了对手的攻击!!
");Sleep(500);continue;}
                    int x=bk1+rand()%10+1,q=1;
                    bool g=rand()%100+1<=boss_baoji[o][p]?1:0;
                    if(g)q=1.8+((rand()%2)-0.5)*0.14;
                    x*=q;
                    int fj[20]; 
                    memset(fj,0,sizeof(fj));
                    for(int i=1;i<=a[0].zbf[0];i++)fj[a[0].zbf[i]]=1;
                    if(a[0].zb_le[a[0].zbf[8]]==5&&fj[8])x*=0.7;
                    x*=need2;
                    if(a[0].zb_le[a[0].zbf[9]]==5&&fj[9])cout<<"触发了金钟罩的被动,"<<boss_name[o][p]<<"受到了"<<x*0.15<<"点伤害
",k-=x*0.15,x*=0.85;
                    cout<<boss_name[o][p]<<""<<PN<<"造成了"<<x<<"点伤害
";
                    bosss[1]+=x; 
                    k+=x*boss_xx[o][p]/100;
                    if(k>boss_blood[o][p])k=boss_blood[o][p];
                    t-=x;
                }
                if(k>boss_blood[o][p])k=boss_blood[o][p];
                Sleep(500);
            }
        }
        for(int i=1;i<=5;i++)
        {
            if(a[0].yaowu[i])
            {
                a[0].xiaoguo[i]--;
                if(a[0].xiaoguo[i]==0)
                {
                    a[0].yaowu[i]=0;
                    if(i==1)PK/=1.3;
                    if(i==2)PF/=1.3;
                    if(i==3)PS/=1.3;
                    if(i==4)PB/=1.3;
                    if(i==5)a[0].jnj-=5;
                }
            }
        }
        cout<<"战斗结束...
";
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED);
        cout<<"你的血量:
";
        cout<<" ";
        for(int i=1;i<=40;i++)cout<<-;
        cout<<endl;
        cout<<|;
        for(int i=1;i<=max(0,t*20/PB);i++)printf("%c%c",0xa8,0x80);
        for(int i=max(0,t*20/PB)*2+1;i<=40;i++)cout<< ;
        cout<<|;
        cout<<max(0,t)<</<<PB<<"
";
        cout<<" ";
        for(int i=1;i<=40;i++)cout<<-;
        cout<<endl;
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
        cout<<boss_name[o][p]<<"的血量:
";
        cout<<" ";
        for(int i=1;i<=40;i++)cout<<-;
        cout<<endl;
        cout<<|;
        for(int i=1;i<=max(0,k*20/boss_blood[o][p]);i++)printf("%c%c", 0xa8, 0x80);
        for(int i=max(0,k*20/boss_blood[o][p])*2+1;i<=40;i++)cout<< ;
        cout<<|;
        cout<<max(0,k)<</<<boss_blood[o][p]<<"
";
        cout<<" ";
        for(int i=1;i<=40;i++)cout<<-;
        cout<<endl;
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);
        Sleep(1000);
        PB-=smm;
        if(t<=0)cout<<"你被击倒了!
";
        else 
        {
            cout<<"你战胜了"<<boss_name[o][p]<<endl;
            if(p==gk[o])
            {
                gk[o]++;
                PB+=boss_bloodp[o][p];
                PK+=boss_killp[o][p];
                PS+=boss_sudup[o][p];
                PF+=boss_fyp[o][p];
                if(boss_jinengp[o][p])PJ[++a[0].jns]=boss_jinengp[o][p],a[0].jn_le[boss_jinengp[o][p]]=1;
                PM+=boss_moneyp[o][p];
                PE+=boss_exp[o][p];
                PSB+=boss_sbp[o][p];
                PX+=boss_xxp[o][p];
                PBJ+=boss_baojip[o][p];
                PMZ+=boss_mingzhongp[o][p];
            }
            if(p==11)
            {
                PM+=100;
            } 
        }
        getchar();getchar();
        SY
        int uu=0;
        cout<<"伤害结算:
";
        cout<<"我方:
";
        int num=ppp;
        for(int i=1;i<=14;i++)num+=pp[i];
        for(int i=1;i<=14;i++)
        {
            if(pp[i]!=0)
            {
                cout<<jineng_name[i]<<"造成伤害:"<<pp[i];
                for(int j=1;j<=pp[i]*20/num;j++)PFK;
                cout<<" "<<pp[i]*100/num<<"%";
                cout<<endl;    
            }
        }
        cout<<"普通攻击造成伤害:"<<ppp;
        if(ppp!=0)for(int i=1;i<=ppp*20/num;i++)PFK;
        if(ppp!=0)cout<<" "<<ppp*100/num<<"%"; 
        cout<<endl;
        cout<<"伤害总和:"<<num<<endl;
        cout<<"敌方:
";
        cout<<"普通攻击造成伤害:"<<bosss[1];
        if(bosss[1])for(int i=1;i<=bosss[1]*20/(bosss[0]+bosss[1]);i++)PFK;
        if(bosss[1])cout<<" "<<bosss[1]*100/(bosss[0]+bosss[1])<<"%";
        cout<<endl;
        if(boss_jineng[o][p])cout<<jineng_name[boss_jineng[o][p]]<<"造成伤害:"<<bosss[0];
        if(bosss[0])for(int i=1;i<=bosss[0]*20/(bosss[0]+bosss[1]);i++)PFK;
        if(bosss[0])cout<<" "<<bosss[0]*100/(bosss[0]+bosss[1])<<"%";
        cout<<endl;
        cout<<"伤害总和:"<<bosss[0]+bosss[1];
        getchar();
        return;
    }
    return;
}
void boss_look()
{
    SY
    printf("请选择你要查看的地图:
");
    for(int i=1;i<=mapsum;i++)
    {
        cout<<i<<"."<<map_name[i]<<endl;
    }
    int o;
    scanf("%d",&o);
    if(o==0)return;
    if(o>mapsum+1)
    {
        SY
        printf("指令无效!");
        Sleep(1000);
        return;
    }
    SY
    printf("通关数:%d
",gk[--o]);
    printf("请选择你要查看的对手:
");
    for(int i=0;i<12;i++)cout<<i+1<<"."<<boss_name[o][i]<<"
";
    int p;
    scanf("%d",&p);
    if(p>12)
    {
        SY
        printf("指令无效!");
        Sleep(1000);
        return;
    }
    p--;
    SY
    CG;
    cout<<boss_name[o][p]<<"的血量上限:";
    for(int i=1;i<=min(100,boss_blood[o][p]/10);i++)PFK
    cout<<boss_blood[o][p];
    cout<<endl;
    CB;
    cout<<boss_name[o][p]<<"的攻击力:";
    for(int i=1;i<=boss_kill[o][p];i++)PFK
    cout<<boss_kill[o][p];
    cout<<endl;
    CY;
    cout<<boss_name[o][p]<<"的速度:";
    for(int i=1;i<=boss_sudu[o][p];i++)PFK
    cout<<boss_sudu[o][p];
    cout<<endl;
    CP;
    cout<<boss_name[o][p]<<"的防御:";
    for(int i=1;i<=boss_fy[o][p];i++)PFK
    cout<<boss_fy[o][p];
    cout<<endl;
    CQ;
    cout<<boss_name[o][p]<<"的闪避:";
    for(int i=1;i<=boss_shanbi[o][p];i++)PFK
    cout<<boss_shanbi[o][p];
    cout<<endl;
    CQ;
    cout<<boss_name[o][p]<<"的命中:";
    for(int i=1;i<=boss_mingzhong[o][p];i++)PFK
    cout<<boss_mingzhong[o][p];
    cout<<endl;
    CR;
    cout<<boss_name[o][p]<<"的暴击几率:";
    for(int i=1;i<=boss_baoji[o][p];i++)PFK
    cout<<boss_baoji[o][p];
    cout<<endl;
    CG;
    cout<<boss_name[o][p]<<"的吸血:";
    for(int i=1;i<=boss_xx[o][p];i++)PFK
    cout<<boss_xx[o][p];
    cout<<endl;
    cout<<boss_name[o][p]<<"的技能:";
    cout<<jineng_name[boss_jineng[o][p]];
    cout<<endl;
    cout<<boss_name[o][p]<<"的战力:"<<boss_blood[o][p]/2+boss_kill[o][p]*4+boss_fy[o][p]*4+boss_sudu[o][p]*5+boss_shanbi[o][p]*7+boss_mingzhong[o][p]*7+boss_xx[o][p]*7+boss_baoji[o][p]*7+((bool)boss_jineng[o][p])*12<<endl;
    int d;
    d=getchar();
    d=getchar();
    return;
}
void zb_look()
{
    SY
    for(int i=0;i<wqs;i++)
    {
        for(int j=1;j<=zble;j++)
        {
            cout<<j<<""<<zhuangbei_name[i][j]<<"基础伤害增加"<<wq_wl[j][i]<<" 暴击系数为"<<wq_bj[j][i];
            if(j==zble)
            {
                if(i==0)cout<<",附带对方当前血量值8%伤害";
                else if(i==1)cout<<",恢复伤害值13%的血量";
                else if(i==2)cout<<",伤害增加50%";
                else if(i==3)cout<<",自身攻击力增加26%";
                else if(i==4)cout<<",对方防御降低12%";
                else if(i==5)cout<<",附带对方最大生命值4%的伤害";
                else if(i==6)cout<<",对方攻击力降低12%";
                else if(i==7)cout<<",附带自身最大生命值20%伤害";
                else if(i==8)cout<<",减少受到的30%伤害";
                else if(i==9)cout<<",反弹受到的15%伤害";
            }
            cout<<endl;
        }
        cout<<"基础属性:
";
        if(zb_gj[1][i])
        {
            cout<<"攻击力加成:";
            for(int j=1;j<=5;j++)cout<<zb_gj[j][i]<<"点/";
            cout<<endl; 
        }
        if(zb_sd[1][i])
        {
            cout<<"攻速加成:";
            for(int j=1;j<=5;j++)cout<<zb_sd[j][i]<<"%/";
            cout<<endl; 
        }
        if(zb_ct[1][i])
        {
            cout<<"穿透加成:";
            if(zb_ct[1][i]>1)for(int j=1;j<=5;j++)cout<<zb_ct[j][i]<<"点/";
            else for(int j=1;j<=5;j++)cout<<zb_ct[j][i]*100<<"%/";
            cout<<endl; 
        }
        if(zb_lq[1][i])
        {
            cout<<"冷却缩减加成:";
            for(int j=1;j<=5;j++)cout<<zb_lq[j][i]<<"%/";
            cout<<endl; 
        }
        if(zb_xx[1][i])
        {
            cout<<"吸血加成:";
            for(int j=1;j<=5;j++)cout<<zb_xx[j][i]<<"%/";
            cout<<endl; 
        }
        if(zb_bjl[1][i])
        {
            cout<<"暴击率加成:";
            for(int j=1;j<=5;j++)cout<<zb_bjl[j][i]<<"%/";
            cout<<endl; 
        }
        if(zb_bjx[1][i])
        {
            cout<<"暴击效果加成:";
            for(int j=1;j<=5;j++)cout<<zb_bjx[j][i]<<"%/";
            cout<<endl; 
        }
        if(zb_sm[1][i])
        {
            cout<<"生命值加成:";
            for(int j=1;j<=5;j++)cout<<zb_sm[j][i]<<"点/";
            cout<<endl; 
        }
        if(zb_fy[1][i])
        {
            cout<<"防御加成:";
            for(int j=1;j<=5;j++)cout<<zb_fy[j][i]<<"点/";
            cout<<endl; 
        }
        cout<<endl;
    }
    int d;
    d=getchar();
    d=getchar();
    return;
}
void jn_look()
{
    SY
    for(int i=1;i<=jns;i++)
    {
        cout<<i<<"."<<jineng_name[i]<<endl;
        for(int j=1;j<=jnle;j++)
        {
            if(i==1)cout<<"对敌人造成"<<pj[j]*100<<"%玩家攻击力点真实伤害
";
            if(i==2)cout<<"对敌人造成"<<lj[j]*100<<"%敌人当前血量点伤害
";
            if(i==3)cout<<"自身生命值、攻击力及防御提高"<<zq[j]*100-100<<"%
";
            if(i==4)cout<<"使敌人的攻击力降低"<<100-mh[j]*100<<"%
";
            if(i==5)cout<<"对敌人造成4次伤害,总伤害值为对方当前血量的"<<(kz1[j]*4-0.06)*100<<"%加自身攻击力的"<<(kz2[j]*4-0.6)*100<<"%
";
            if(i==6)cout<<"对敌人造成"<<bss[j]<<"点伤害
";
            if(i==7)cout<<"对敌人造成"<<dw[j]*100<<"%玩家攻击力点伤害,自身回复双倍于造成伤害的血量
";
            if(i==8)cout<<"降低敌人防御"<<100-wd1[j]*100<<"%,对敌人造成"<<wd2[j]*100<<"%玩家攻击力点伤害,自身回复"<<wd3[j]<<"点血量
";
            if(i==9)cout<<"提升自身防御"<<js1[j]*100<<"%
";
            if(i==10)cout<<"扣除当前生命值60%,对敌人造成自身已损失生命值"<<fj[j]*100<<"%点伤害
"; 
            if(i==11)cout<<"增加自身"<<bz[j]<<"点攻击力和防御
";
            if(i==12)cout<<"增加自身"<<ss[j]*100-100<<"%速度
"; 
            if(i==13)cout<<"将自身"<<pm[j]*100<<"%血量转化为攻击力
";
            if(i==14)cout<<"对敌人造成自身血量、攻击力、防御和速度之和的"<<lx[j]*2*100<<"%点真实伤害
"; 
            if(i==15)cout<<"被动:每损失1%生命值就增加"<<fz[j]<<"%的免伤
";
            if(i==16)cout<<"获得3回合免伤"<<jh[j]*100<<"%
";
             
        }
    }
    int d;
    d=getchar();
    d=getchar();
    return;
}
void tujian()
{
    SY
    cout<<"您想要查询:1.关卡 2.装备 3.技能
";
    int g;
    scanf("%d",&g);
    if(g==0)return;
    if(g>3)
    {
        cout<<"指令无效!!
";
        Sleep(2000);
        return;
    }
    if(g==1)boss_look();
    if(g==2)zb_look();
    if(g==3)jn_look();
}
void zhuangtai()
{
    int p=0;
    SY
    cout<<"你的等级:"<<PL<<endl;
    CR;
    cout<<"你的经验值:";
    for(int i=1;i<=PE/max(1,lev[PL]/20);i++)PFK
    cout<<PE;
    cout<<endl;
    CG;
    cout<<"你的血量上限:";
    for(int i=1;i<=min(20,PB/10);i++)PFK
    cout<<PB;
    cout<<endl;
    CB;
    cout<<"你的攻击力:";
    for(int i=1;i<=PK;i++)PFK
    cout<<PK;
    cout<<endl;
    CY;
    cout<<"你的速度:";
    for(int i=1;i<=PS;i++)PFK
    cout<<PS;
    cout<<endl;
    CP;
    cout<<"你的防御:";
    for(int i=1;i<=PF;i++)PFK
    cout<<PF;
    cout<<endl;
    CQ;
    cout<<"你的闪避:";
    for(int i=1;i<=PSB;i++)PFK
    cout<<PSB;
    cout<<endl;
    cout<<"你的命中:";
    for(int i=1;i<=PMZ;i++)PFK
    cout<<PMZ;
    cout<<endl;
    CR;
    cout<<"你的暴击几率:";
    for(int i=1;i<=PBJ;i++)PFK
    cout<<PBJ;
    cout<<endl;
    CG;
    cout<<"你的吸血:";
    for(int i=1;i<=PX;i++)PFK
    cout<<PX;
    cout<<endl;
    zbb=0;
    cout<<"你的装备数:"<<a[0].zbss<<endl;
    cout<<"你的装备:
";
    for(int i=1;i<=a[0].zbss;i++)zbb+=a[0].zb_le[PZ[i]],CG,cout<<zhuangbei_name[PZ[i]][a[0].zb_le[PZ[i]]],star(a[0].zb_le[PZ[i]]);
    cout<<"你的技能数:"<<a[0].jns<<endl;
    cout<<"你的技能:
";
    jnn=0;
    for(int i=1;i<=a[0].jns;i++)jnn+=a[0].jn_le[PJ[i]],cout<<jineng_name[PJ[i]],star(a[0].jn_le[PJ[i]]);
    CG;
    cout<<"你的技能触发几率:"<<a[0].jnj<<endl;
    cout<<"你的药物:
";
    for(int i=1;i<=yws;i++)
    {
        if(a[0].yaowu[i])
        {
            cout<<yw_name[i];
            cout<<"(剩余"<<a[0].xiaoguo[i]<<"轮)
";
        }
    }
    cout<<"你的银两:"<<PM<<endl;
    cout<<"你的战力:"<<PL+PB/2+PK*4+PF*4+PS*5+PSB*7+PMZ*7+PX*7+PBJ*7+zbb*a[0].zbss*12+jnn*a[0].jns*15+a[0].jnj*20<<endl;
    int o;
    o=getchar();
    o=getchar();
    return;
}
void yaowu()
{
    SY
    cout<<"药物列表:
";
    for(int i=1;i<=yws;i++)
    {
        cout<<i<<:;
        cout<<yw_name[i]<<endl;
        cout<<"功效:";
        if(i==1)cout<<"力量在3轮内增加30%点
";
        if(i==2)cout<<"防御在3轮内增加30%点
";
        if(i==3)cout<<"速度在3轮内增加30%点
";
        if(i==4)cout<<"血量在3轮内增加30%点
";
        if(i==5)cout<<"技能触发几率在3轮内增加5%
";
        cout<<"价格:";
        cout<<yaowu_jiage[i]<<"银两
";
    }
    int t;
    scanf("%d",&t);
    if(t==0)return;
    if(t>yws)
    {
        cout<<"指令无效!!
";
        Sleep(2000);
        return;
    }
    SY
    cout<<"请问您要购买多少?
";
    int l;
    scanf("%d",&l);
    SY
    if(PM>=l*yaowu_jiage[t])cout<<"购买成功!!
",PM-=l*yaowu_jiage[t];
    else {cout<<"您的余额不足!!
";Sleep(2000);return;}
    if(t==1&&a[0].yaowu[1]==0)PK*=1.3;
    if(t==2&&a[0].yaowu[2]==0)PF*=1.3;
    if(t==3&&a[0].yaowu[3]==0)PS*=1.3;
    if(t==4&&a[0].yaowu[4]==0)PB*=1.3;
    if(t==5&&a[0].yaowu[5]==0)a[0].jnj+=5;
    a[0].yaowu[t]=1;
    a[0].xiaoguo[t]+=l*3;
    Sleep(2000);
}
void daoju()
{
    SY
    cout<<"道具列表:
";
    for(int i=1;i<=djs;i++)
    {
        cout<<i<<:;
        cout<<dj_name[i]<<endl;
        cout<<"作用:";
        if(i==1)cout<<"提高升级武器成功率(10%)
";
        if(i==2)cout<<"升级武器必要物资
";
        if(i==3)cout<<"提高升级技能成功率(10%)
";
        if(i==4)cout<<"提高升级技能成功率(30%)
";
        if(i==5)cout<<"升级技能必要物资
";
        cout<<"价格:";
        cout<<daoju_jiage[i]<<"银两
";
    }
    int t;
    scanf("%d",&t);
    if(t==0)return;
    if(t>djs)
    {
        cout<<"指令无效!!
";
        Sleep(2000);
        return;
    }
    SY
    cout<<"请问您要购买多少?
";
    int l;
    scanf("%d",&l);
    SY
    if(PM>=l*daoju_jiage[t])cout<<"购买成功!!
",PM-=l*daoju_jiage[t];
    else {cout<<"您的余额不足!!
";Sleep(2000);return;}
    a[0].daoju[t]+=l;
    Sleep(2000);
}
void shop()
{
    SY
    cout<<"请问您要购买什么?
1.药物 2.道具
";
    int h;
    scanf("%d",&h);
    if(h==0)return;
    if(h==1)
    {
        yaowu();    
    }
    else 
    {
        daoju();
    }
}
void bag()
{
    SY
    for(int i=1;i<=djs;i++)
    {
        if(a[0].daoju[i])cout<<dj_name[i]<<" 数量:"<<a[0].daoju[i]<<endl;
    }
    getchar();getchar();
    return;
}
void used(int h)
{
    int wj=100-10*a[0].zb_le[PZ[h]];
    int uu=zbup[a[0].zb_le[PZ[h]]+1];
    for(;;)
    {
        SY
        cout<<"输入666可以开始打磨
";
        cout<<"你准备打磨的武器:"<<zhuangbei_name[PZ[h]][a[0].zb_le[PZ[h]]],star(a[0].zb_le[PZ[h]]);
        cout<<"本次升级的成功几率:"<<wj<<"%"<<endl;
        cout<<"升级所需:"<<uu<<"个淬炼石
";
        cout<<"你拥有的升级道具:
";
        int t=0;
        for(int i=1;i<=2;i++)
        {
            cout<<i<<"."<<dj_name[i]<<" 数量:"<<a[0].daoju[i]<<endl;
        }
        int y;
        scanf("%d",&y);
        if(y==0)return;
        if(y==666)
        {
            if(uu>0)
            {
                SY
                cout<<"淬炼石不足!!
";
                Sleep(2000);
                continue;
            }
            else
            {
                if(rand()%100+1<=wj)
                {
                    SY
                    cout<<"打磨成功!!
";
                    cout<<"您的"<<zhuangbei_name[PZ[h]][a[0].zb_le[PZ[h]]]<<"提升到了"<<++a[0].zb_le[PZ[h]]<<"级!!
";
                    Sleep(2000);
                    return;
                }
                else
                {
                    SY
                    cout<<"打磨失败!!
";
                    Sleep(2000);
                    return;
                }
            }
        }
        if(y>2)
        {
            SY
            cout<<"指令无效!!
";
            Sleep(2000);
            continue;
        }    
        if(a[0].daoju[y])
        {
            SY;
            cout<<"请问您要使用多少?
";
            int l;
            scanf("%d",&l);
            if(a[0].daoju[y]>=l)cout<<"使用成功!!
";
            else {cout<<"数量不足!!
";continue;}
            Sleep(2000);
            a[0].daoju[y]-=l;
            if(y==1)wj+=l*10;
            if(y==2)uu-=l;
        }
        else 
        {
            SY
            cout<<"材料不足!!"<<endl;
            Sleep(2000);
        }
    }
}
void dm()
{
    SY
    cout<<"注意事项:请一次性加入所有物资,若加入后未打磨而退出,使用的道具将不会返还。
";
    cout<<"请选择你要打磨的武器:
";
    for(int i=1;i<=a[0].zbss;i++){CQ;cout<<i<<"."<<zhuangbei_name[PZ[i]][a[0].zb_le[PZ[i]]],star(a[0].zb_le[PZ[i]]);}
    int h;
    scanf("%d",&h);
    if(h==0)return;
    if(h>a[0].zbss)
    {
        cout<<"指令无效!!
";
        Sleep(2000);
        return;
    }
    used(h);
}
void usdx(int h)
{
    int wj=100-10*a[0].jn_le[PJ[h]];
    int uu=jnup[a[0].jn_le[PJ[h]]+1];
    for(;;)
    {
        SY
        cout<<"输入666可以开始修炼
";
        cout<<"你准备修炼的技能:"<<jineng_name[PJ[h]],star(a[0].jn_le[PJ[h]]);
        cout<<"本次升级的成功几率:"<<wj<<"%"<<endl;
        cout<<"升级所需:"<<uu<<"个仙丹
";
        cout<<"你拥有的升级道具:
";
        int t=0;
        for(int i=3;i<=5;i++)
        {
            cout<<i-2<<"."<<dj_name[i]<<" 数量:"<<a[0].daoju[i]<<endl;
        }
        int y;
        scanf("%d",&y);
        if(y==0)return;
        if(y==666)
        {
            if(uu>0)
            {
                SY
                cout<<"仙丹不足!!
";
                Sleep(2000);
                continue;
            }
            else
            {
                if(rand()%100+1<=wj)
                {
                    SY
                    cout<<"修炼成功!!
";
                    cout<<"您的"<<jineng_name[PJ[h]]<<"提升到了"<<++a[0].jn_le[PJ[h]]<<"级!!
";
                    Sleep(2000);
                    return;
                }
                else
                {
                    SY
                    cout<<"修炼失败!!
";
                    Sleep(2000);
                    return;
                }
            }
        }
        if(y>3)
        {
            SY
            cout<<"指令无效!!
";
            Sleep(2000);
            continue;
        }    
        if(a[0].daoju[y+2])
        {
            SY;
            cout<<"请问您要使用多少?
";
            int l;
            scanf("%d",&l);
            if(a[0].daoju[y+2]>=l)cout<<"使用成功!!
";
            else {cout<<"数量不足!!
";continue;}
            Sleep(2000);
            a[0].daoju[y+2]-=l;
            if(y==1)wj+=l*10;
            if(y==2)wj+=l*30;
            if(y==3)uu-=l;
        }
        else 
        {
            SY
            cout<<"材料不足!!"<<endl;
            Sleep(2000);
        }
    }
}
void xl()
{
    SY
    cout<<"注意事项:请一次性加入所有物资,若加入后未修炼而退出,使用的道具将不会返还。
";
    cout<<"请选择你要修炼的技能:
";
    for(int i=1;i<=a[0].jns;i++){CQ;cout<<i<<"."<<jineng_name[PJ[i]],star(a[0].jn_le[PJ[i]]);}
    int h;
    scanf("%d",&h);
    if(h==0)return;
    if(h>a[0].jns)
    {
        cout<<"指令无效!!
";
        Sleep(2000);
        return;
    }
    usdx(h);
}
void zc()
{
    SY
    cout<<"请输入你的用户名:";
    cin>>na;
    if(na=="back")return;
    cout<<"请输入你的密码(空格表示结束):";
    string mi;
    char m; 
    while(m=getch())
    {
        if(m== )break;
        mi+=m;
        cout<<"*";
    }
    cout<<endl;
    cout<<"请再次确认你的密码(空格表示结束):";
    string ma;
    char a; 
    while(a=getch())
    {
        if(a== )break;
        ma+=a;
        cout<<"*";
    }
    cout<<endl;
    getchar();getchar();
    if(mi==ma)
    {
        SY
        cout<<"注册成功!!
";
        string s;
        freopen("用户资料.txt","r",stdin);
        freopen("新注册用户暂存资料.txt","w",stdout);
        while(getline(cin,s))cout<<s<<endl;
        cout<<na<<endl<<mi<<endl;
        wrong=1;
        COUT
        Sleep(2000);
        exit(0);
    }
    else 
    {
        SY
        cout<<"注册失败!!两次密码不匹配!!
";
        Sleep(2000);
        return;
    }
}
void dl()
{
    SY
    cout<<"请输入你的用户名:";
    cin>>na;
    if(na=="back")return;
    cout<<"请输入你的密码(空格表示结束):";
    string mima;
    char m; 
    while(m=getch())
    {
        if(m== )break;
        mima+=m;
        cout<<"*";
    }
    freopen("用户资料.txt","r",stdin);
    string NAME,MIMA;
    bool yes=0; 
    while(cin>>NAME>>MIMA)
    {
        if(NAME==na)
        {
            yes=1;
            if(MIMA==mima)
            {
                SY
                cout<<"登录成功!!
";
                CIN
                dll=1;
                Sleep(2000);
                return;
            }
            else
            {
                SY
                cout<<"密码错误!!
";
                wrong=1;
                CIN
                Sleep(2000);
                exit(0);
            }
        }
    }
    if(yes==0)
    {
        SY
        cout<<"无此用户!!请先注册。
";
        wrong=1;
        CIN
        Sleep(2000);
        exit(0);
    }
}
void sm()
{
    SY
    cout<<"游戏说明(请在阅读完后在开始游戏,你可以在进入游戏后从“说明”中再次查看本说明):
";
    cout<<"1.退出指令:挑战模式及其细况、图鉴模式、商店模式及其细况、修炼模式以及打磨模式为0,本模式、状态模式、图鉴细况以及背包模式为任意键
";
    cout<<"2.在战斗模式中,每打通一个地图可获得100银两资助,每战胜一个未战胜过的角色,将会获得属性增加(详细请参看图鉴)。战斗胜利后按任意键退出,失败后2秒自动退出。
";
    cout<<"3.在进入模式时请按照数字输入,如果输入其他导致数据丢失及系统卡住,后果自负。
";
    cout<<"4.在保存并退出后请使用保存系统.exe保存数据。
";
    cout<<"5.其余说明请参看各模式内的文字。
";
    getchar();getchar();
} 
void in()
{
    SY
    system("color 0B");
    for(;;)
    {
        SY;
        cout<<"            欢迎来到闯!(V 2.2 制作:唯创C++游戏开发集团)"<<endl<<"1.注册(当系统显示注册成功后,系统将自动退出,请使用注册系统.exe,再重新按F11进入) 
2.登录(如密码错误或系统无法查找到该用户,系统将自动退出,请重新按F11进入)"<<endl; 
        int a;
        cin>>a;
        if(a==1)zc();
        else dl();
        if(dll==1||wrong==1)break;
    }
}
void gx()
{
    SY
    cout<<"更新中...
版本2.2更新内容:增加了飞马山副本,优化了保存系统
加载中...";
    for(int i=1;i<=35;i++){PFK;Sleep(200);}
} 
void esc()
{
    SY
    freopen("用户数据.txt","r",stdin);
    freopen("暂存用户数据.txt","w",stdout);
    char s[100];
    int lun=0;
    while(gets(s))
    {
        if(s==PN)lun=15;
        if(lun!=0){lun--;continue;}
        cout<<s<<endl;
    } 
    cout<<PN<<"
"<<PL<<" "<<PE<<" "<<PB<<" "<<PK<<" "<<PF<<" "<<PS<<" "<<PSB<<" "<<PMZ<<" "<<PBJ<<" "<<PX<<" "<<a[0].jnj<<" "<<PM<<endl; 
    cout<<a[0].zbss<<endl;
    cout<<1<<" "; 
    for(int i=1;i<=a[0].zbss;i++)cout<<PZ[i]<<" "<<a[0].zb_le[PZ[i]]<<" ";
    cout<<endl;
    cout<<a[0].jns<<endl;
    cout<<1<<" "; 
    for(int i=1;i<=a[0].jns;i++)cout<<PJ[i]<<" "<<a[0].jn_le[PJ[i]]<<" ";
    cout<<endl;
    cout<<a[0].zbfi<<endl;cout<<a[0].zbf[0]<<endl;
    cout<<1<<" ";
    for(int i=1;i<=a[0].zbf[0];i++)cout<<a[0].zbf[i]<<" ";
    cout<<endl;
    cout<<a[0].jnfi<<endl;cout<<a[0].jnf[0]<<endl;
    cout<<1<<" ";
    for(int i=1;i<=a[0].jnf[0];i++)cout<<a[0].jnf[i]<<" ";
    cout<<endl;
    for(int i=1;i<=mapsum;i++)cout<<gk[i-1]<<" ";
    cout<<endl;
    for(int i=1;i<=yws;i++)cout<<a[0].yaowu[i]<<" "<<a[0].xiaoguo[i]<<" ";
    cout<<endl;
    for(int i=1;i<=djs;i++)cout<<a[0].daoju[i]<<" ";
    cout<<endl;
    COUT 
}
void play1()
{
    freopen("玩家战力排行榜附件.txt","r",stdin);
    freopen("过渡.txt","w",stdout);
    char s[1000];
    while(gets(s))printf("%s
",s);
    if(a[0].zdl!=0)cout<<PN<<endl<<a[0].zdl;
    CIN COUT
}
void play2()
{
    freopen("过渡.txt","r",stdin);
    freopen("玩家战力排行榜附件.txt","w",stdout);
    char s[1000];
    while(gets(s))printf("%s
",s);
    CIN COUT
}
struct playeer
{
    char s[1000];int zdl;
}d[10000];
bool cmp(playeer aa,playeer b)
{
    return aa.zdl>b.zdl;
}
void play3()
{
    freopen("玩家战力排行榜附件.txt","r",stdin);
    freopen("玩家战力排行榜.txt","w",stdout);
    map<string,int>ll;
    int p=0,pp=0;
    while(gets(d[++p].s))
    {
        scanf("%d",&d[p].zdl);
        ll[d[p].s]=d[p].zdl;
    }
    sort(d+1,d+1+p,cmp);
    for(int i=1;i<=p;i++)
    {
        if(d[i].zdl==ll[d[i].s]&&d[i].s!=d[i-1].s&&ll[d[i].s]!=0)cout<<"全服第"<<++pp<<""<<d[i].s<<" 战斗力为"<<d[i].zdl<<endl,ll[d[i].s]=0; 
    }
    CIN COUT
}
void work()
{
    SY
    if(wrong==1)return; 
    PN=na;
    cout<<"请问是首次使用该账号游戏吗?0否 1是
";
    cin>>game;
    if(game==1)
    {
        PB=70;
        PL=1;
        PK=5;
        PF=5;
        PS=5;
        PBJ=2;
        PX=3;
        PM=50;
        PSB=3;
        a[0].zbfi=a[0].jnfi=3;
        return; 
    }
    freopen("用户数据.txt","r",stdin);
    string s;
    while(getline(cin,s))
    {
        if(s==na)
        {
            int p;
            cin>>PL>>PE>>PB>>PK>>PF>>PS>>PSB>>PMZ>>PBJ>>PX>>a[0].jnj>>PM; 
            cin>>a[0].zbss;
            cin>>p;
            for(int i=1;i<=a[0].zbss;i++)cin>>PZ[i]>>p,a[0].zb_le[PZ[i]]=p,zb[PZ[i]]=1;
            cin>>a[0].jns;
            cin>>p;
            for(int i=1;i<=a[0].jns;i++)cin>>PJ[i]>>p,a[0].jn_le[PJ[i]]=p;
            cin>>a[0].zbfi>>a[0].zbf[0];
            cin>>p;
            for(int i=1;i<=a[0].zbf[0];i++)cin>>a[0].zbf[i];
            cin>>a[0].jnfi>>a[0].jnf[0];
            cin>>p;
            for(int i=1;i<=a[0].jnf[0];i++)cin>>a[0].jnf[i];
            for(int i=1;i<=mapsum;i++)cin>>gk[i-1];
            for(int i=1;i<=yws;i++)cin>>a[0].yaowu[i]>>a[0].xiaoguo[i];
            for(int i=1;i<=djs;i++)cin>>a[0].daoju[i];
            CIN
            break; 
        }
    }
}
void changz()
{
    cout<<"你的装备数:"<<a[0].zbss<<endl;
    cout<<"你的装备:
";
    for(int i=1;i<=a[0].zbss;i++)CG,cout<<i<<"."<<zhuangbei_name[PZ[i]][a[0].zb_le[PZ[i]]],star(a[0].zb_le[PZ[i]]);
    cout<<"请输入你要选择装备的数量(不得超过"<<a[0].zbfi<<"件):";
    int j;
    scanf("%d",&j);
    if(j<0||j>a[0].zbfi)
    {
        cout<<"指令错误!!
";
        Sleep(2000);
        return;
    } 
    cout<<"
请在其中选择至多"<<j<<"件装备:";
    a[0].zbf[0]=j;
    int p;
    for(int i=1;i<=j;i++)scanf("%d",&p),a[0].zbf[i]=PZ[p];
    cout<<endl;
    cout<<"更改成功!!";
    Sleep(2000);
    return;
}
void changj()
{
    cout<<"你的技能数:"<<a[0].zbss<<endl;
    cout<<"你的技能:
";
    for(int i=1;i<=a[0].jns;i++)CG,cout<<i<<"."<<jineng_name[PJ[i]],star(a[0].jn_le[PJ[i]]);
    cout<<"请输入你要选择技能的数量(不得超过"<<a[0].jnfi<<"件):";
    int j;
    scanf("%d",&j);
    if(j<0||j>a[0].jnfi)
    {
        cout<<"指令错误!!
";
        Sleep(2000);
        return;
    } 
    cout<<"
请在其中选择至多"<<j<<"项技能:";
    a[0].jnf[0]=j;
    int p; 
    for(int i=1;i<=j;i++)scanf("%d",&p),a[0].jnf[i]=PJ[p];
    cout<<endl;
    cout<<"更改成功!!";
    Sleep(2000);
    return;
}
void ready()
{
    SY
    cout<<"你目前可穿戴的装备数量:"<<a[0].zbfi<<"";
    cout<<"你目前已穿戴的装备:";
    if(a[0].zbf[0]==0)cout<<"无!
";
    else
    {
        cout<<endl; 
        for(int i=1;i<=a[0].zbf[0];i++)CG,cout<<zhuangbei_name[a[0].zbf[i]][a[0].zb_le[a[0].zbf[i]]],star(a[0].zb_le[a[0].zbf[i]]);
    }
    int ppk=0,pps=0,pp1=0,pp2=0,ll=0,bbjl=0,bbjx=0,xxx=0,smm=0,fyy=0;
    for(int i=1;i<=a[0].zbf[0];i++)ppk+=zb_gj[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    for(int i=1;i<=a[0].zbf[0];i++)pps+=zb_sd[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    for(int i=1;i<=a[0].zbf[0];i++)
    {
        if(zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]])
        {
            if(zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]]<1)pp1+=zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]]*100;
            else pp2+=zb_ct[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
        }
    }
    for(int i=1;i<=a[0].zbf[0];i++)ll+=zb_lq[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    for(int i=1;i<=a[0].zbf[0];i++)bbjl+=zb_bjl[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    for(int i=1;i<=a[0].zbf[0];i++)bbjx+=zb_bjx[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    for(int i=1;i<=a[0].zbf[0];i++)xxx+=zb_xx[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    for(int i=1;i<=a[0].zbf[0];i++)smm+=zb_sm[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    for(int i=1;i<=a[0].zbf[0];i++)fyy+=zb_fy[a[0].zb_le[a[0].zbf[i]]][a[0].zbf[i]];
    cout<<"装备加成:"<<endl;
    cout<<"攻击力:"<<ppk<<"";
    cout<<"攻速:"<<pps<<"%
";
    cout<<"穿透:"<<pp1<<"%+"<<pp2<<"";
    cout<<"冷却缩减:"<<ll<<"%
";
    cout<<"暴击率:"<<bbjl<<"%
";
    cout<<"暴击效果:"<<bbjx<<"%
";
    cout<<"吸血:"<<xxx<<"%
";
    cout<<"生命值:"<<smm<<"";
    cout<<"防御:"<<fyy<<"";
    cout<<"你目前可使用的技能数量:"<<a[0].jnfi<<"";
    cout<<"你目前正使用的技能:";
    if(a[0].jnf[0]==0)cout<<"无!
";
    else
    {
        cout<<endl; 
        for(int i=1;i<=a[0].jnf[0];i++)CG,cout<<jineng_name[a[0].jnf[i]],star(a[0].jn_le[a[0].jnf[i]]);
    }
    cout<<endl<<"是否需要更改?";
    int p;
    scanf("%d",&p);
    if(p)
    {
        SY
        cout<<"请选择要更改的项目:1.装备 2.技能
";
        int l;
        scanf("%d",&l);
        if(l==1)changz();
        else if(l==2)changj();
        else 
        {
            cout<<"指令错误!!
";
            Sleep(2000);
            return;
        }
    }
    else return; 
}
void begin()
{ 
    SY
    int h=0;
    while(gk[h++]==12)maptg++;
    for(;;)
    {
        SY
        esc();CIN COUT 
        play1();CIN COUT 
        play2();CIN COUT 
        play3();CIN COUT
        system("color 0A");
        while(PE>=lev[PL])
        {
            SY
            cout<<"你的等级提升至"<<PL+1<<"级!!
";
            PL++;
            PE-=lev[PL-1];
            int y=rand()%wqs;
            if(zbget[y]<PL&&!zb[y])
            {
                cout<<"你获得了新装备"<<zhuangbei_name[y][1]<<"!!
";
                zb[y]=1;
                PZ[++a[0].zbss]=y;
                a[0].zb_le[y]=1;
                Sleep(2000);
                break;
            }
            else
            {
                cout<<"你的血量提高了5点!!
你的技能触发几率提高了1点!!
";
                PB+=5;
                a[0].jnj++;
            }
            Sleep(2000);
        }
        SY
        PZL=PL+PB/2+PK*4+PF*4+PS*5+PSB*7+PX*7+PBJ*7+zbb*a[0].zbss*12+jnn*a[0].jns*15+a[0].jnj*20;
        printf("请选择你要做的事
1.挑战 2.状态 3.图鉴 4.商店 5.背包 6.打磨 7.修炼 8.说明 9.保存并退出 10.备战
");
        scanf("%d",&zhiling);
        if(zhiling==1)fight();
        else if(zhiling==4)shop();
        else if(zhiling==3)tujian();
        else if(zhiling==2)zhuangtai();
        else if(zhiling==5)bag();
        else if(zhiling==6)dm();
        else if(zhiling==7)xl();
        else if(zhiling==8)sm();
        else if(zhiling==9)esc(); 
        else if(zhiling==10)ready(); 
        else 
        {
            SY
            printf("指令无效!");
            Sleep(1000);
            continue;
        }
    }
}
int main()
{
    system("color 0B");
    srand(time(0)); 
    gx();
    in();
    work();
    begin();
    return 0;
}
闯(2.2)
技术图片
 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 int main()
 4 {
 5     freopen("暂存用户数据.txt","r",stdin);
 6     freopen("用户数据.txt","w",stdout);
 7     string s; 
 8     while(getline(cin,s))cout<<s<<endl;
 9     return 0;
10 }
保存系统
技术图片
 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 int main()
 4 {
 5     freopen("新注册用户暂存资料.txt","r",stdin);
 6     freopen("用户资料.txt","w",stdout);
 7     string s; 
 8     while(cin>>s)cout<<s<<endl;
 9     return 0;
10 }
注册系统

 

以上是关于闯(2.2)的主要内容,如果未能解决你的问题,请参考以下文章

web代码片段

Alfred常见使用

JavaScript笔试题(js高级代码片段)

手机游戏闯三国(乱世之刃)客户端+ 服务端源码 + 完整策划文档

左转没闯红灯但转入对向车道,电子眼能拍下来吗

趁年轻,大胆闯