跳到正文

个人记录

R

andrew2009约 61 分钟
原文
文章信息与版本

文章信息

收录
2026年2月9日
更新
2026年2月9日
篇幅
约 61 分钟

版本

  1. v4当前
  2. v3
  3. v2
  4. v1
C++
#include<bits/stdc++.h>
#include<cstring>
#include<windows.h>
#include<conio.h>
#include<ctime>
#define cls system("cls")
#define key_down(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)//key按下判断
#define jb jineng[B[i].ji[B[i].nuqi.times]]
using namespace std;
//小函数
void gotoxy(int x,int y)//光标位置 1<x,y ;x横坐标,每1一个字符
{
    COORD a;
    a.X=int(x-1);
    a.Y=y-1;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void hide(bool k=1)//光标  默认隐藏
{
    CONSOLE_CURSOR_INFO cursor_info={1,!k};
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
}
void color(int a,int b)
{
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a+b*16);
//0黑色1深蓝色2深绿色3深青色 4深红色5深粉色6深黄色15深白色8灰色9浅蓝色10浅绿色11浅青色12浅红色13浅粉色14浅黄色15浅白色
}//a前景b背景
unsigned long long crand(unsigned long long a,unsigned long long b)//在a-b中取随机数
{
    unsigned long long k=1;
    for(int i=0;i<rand()%30;i++)k*=rand();
    return rand()%(b-a+1)+a;
}
void say(string a,bool b=0)
{
    for(int i=0;i<a.length();i++)
    {
        cout<<a[i];
        Sleep(15);
    }
    if(b==0)cout<<endl;
    Sleep(50);
}
void Color(bool light=1,bool r=1,bool g=1,bool b=1)
{
    if( light&& r&& g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
    if( light&&!r&& g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
    if( light&&!r&& g&&!b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
    if( light&& r&&!g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
    if( light&& r&&!g&&!b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
    if( light&& r&& g&&!b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
    if( light&&!r&&!g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
    if(!light&& r&& g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
    if(!light&&!r&& g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_BLUE);
    if(!light&&!r&& g&&!b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN);
    if(!light&& r&&!g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_BLUE);
    if(!light&& r&&!g&&!b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED);
    if(!light&& r&& g&&!b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN);
    if(!light&&!r&&!g&& b)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE);

}
/*
red+green+blue
1代表有,0代表没有
比如1,1,0代表红色加绿色也就是黄色
比如1,0,1代表红色加蓝色也就是紫色
111是黑,000是白
light就是亮度,1亮0不亮
*/
double logn(double n,double d=2)
{//以d为底
    return log(n)/log(d);
}
void sleep(int t)//sleep
{
    Sleep(t);
}

string name="haoge1234";

int pdefense=10,strong=100,mental=10,money=0,xp=0,jnnum=3;

struct NUQI
{
    int num;
    int max;
    int times;//次数
};
struct MP
{
    int num;
    int max;
    int huei;//恢复
};
struct Effect
{//0毒1灼烧
    int time;//时间
    int att;//效果
    //int hej;
};
int map[100][100]= {{-1,0 ,  },
					{0 ,-1,  },};
string pl[100]={"珊瑚王城","国都平原"};
struct Jineng
{
    string name;
    bool type;//0攻击,1治疗
    int dysx;//对应属性,1力量attack,2智力mental,3体力上限,4法力上限,5治疗health
    string text;
    double beilv;//倍率 ,治疗血量
    int cishu;//发动次数
    Effect effect[20];
    int mp;
    int mcd;
    int shulian ;
    int mshulian;//满熟练
    int cd;
};
Jineng jineng[500]={{},
//名     种 属    文              倍 次    效     法 冷 熟 熟限
{"火球术",0,2,"大喊一声\"火球!\"",10,1,{{},{2,20}},25,2,0,100},
{"aqsdwa",0,2,"吐出舌头",5,1,{},0,0},
{"恢复术",1,5,"大喊一声\"恢复!\"",100,1,{},40,2,0,400},
{"aqsdwa",0,1,"拼命一击",4,1,{},0,0},
{"骨鞭",0,1,"凝聚出一根骨鞭,并快速挥动",0.5,2,{},0,1,0,500},
{"大骨鞭",0,1,"凝聚出一根大骨鞭,并高速挥动",0.8,3,{},5,2,0,5000},
{"超大骨鞭",0,1,"凝聚出一根骨鞭,并以音速挥动",1.5,5,{},10,3,0,50000},
{"超级大骨鞭",0,1,"凝聚出一根骨鞭,并以超音速挥动",2.5,8,{},20,4,0,500000},
{"割裂时空的骨鞭",0,1,"以光速挥出割裂时空的骨鞭,时空破碎,万物湮灭",3,10,{},40,8,0,5000000},
{"aqsdwa",0,1,"四处冲撞",5,2,{},0,0},//10
{"aqsdwa",0,2,"凝聚出一颗虚空水晶,并发射出去",10,1,{},0,0},
{"大恢复术",1,5,"大喊一声\"大恢复!\"",1000,1,{},200,2,0,4000},
};
struct JI
{
    Jineng att[15];
//    Jineng def[9];
//    Jineng boo[9];//属性提升
};
struct Zb
{
    string name;
    int type;//0近战1重武器2盔甲3盾牌
    int ad;//攻/防 值
    int j;//阶
    int mcd;
    Effect effect[10];
    double cj;//穿甲/攻击吸收  百分数
    double pj;//破甲
//    int eh;
};
//{"",type,攻/防,阶,cd-1,{/*{}效果*/},穿甲/攻击吸收,破甲}
Zb zb[222]={
{"弗洛伊德剑",0,100,1,-1,{{2,10}/*效果*/},0},
{"dsaa炮",1,200,3,1},
{"傅里叶甲",2,20,1},
{"高斯盾",3,20,1},
{"∞∑",1,10000,10,5,{/*{}效果*/},0.3,0.1},
};
struct fighter
{
    string name;
    int alive;
    int health;
    int speed;//攻速
    int attack;
    int defense;
    int mental;
    int sleept;//"sleep"时间
    NUQI nuqi; //怒气
    int ji[10];
    double cj;//穿甲/攻击吸收
    double pj;//破甲
    Effect effect[20];//攻击效果
    Effect buff[20];
    int diaoluo[20];
    int xp;
};
struct Pfighter
{
    string name;
    int health;
    int speed;//攻速
    int attack;
    int defense;
    int mental;
    int maxcd;
    int sleept;//"sleep"时间
    MP mp;//法力值
    Effect buff[20];
    int cd;
};
fighter K={"",0,0,0,0,0};//空变量
Effect Ke;//空变量
Pfighter p={"",5000,100,0,0,200,0,0,{250,250,20}};//player[0] 玩家
Zb playerzb[4]={
{"弗洛伊德剑",0,480,1,-1,{{4,20}/*效果*/},0.1},
{"dsaa炮",1,1280,3,1,{{},{4,30}},0.2},
{"傅里叶甲",2,220,1,-1},
{"高斯盾",3,130,1,-1}
};

int pjn[21]={-2,1,3,5,6,7,8,9,12,-1};//用数字调用技能
fighter mob= {"andrew2011",1,2000,100,140,140,100,0,{0,30,1},{-1,4,4,3/*技能*/}};//测试
fighter mob3= {"andrew2012",1,2000,100,180,180,100,0,{0,30,1},{-1,4,4,3/*技能*/}};//测试
fighter mob2={"andrew2010",1,2000,100,140,140,100,0,{0,30,1},{-1,4,4,3}};//测试
fighter mob114={"诡异蟾蜍",1,5000,80,280,200,200,0,{0,40,1},{-1,2,3,2},0.1,0,{2,10}};//测试
fighter mob514={"虚空蠕虫",1,10000,100,400,500,600,0,{0,60,1},{-1,10,11,12},0.2};//测试
//大函数
void read()
{
    freopen("save.bin","r",stdin);

    fclose(stdin);
}
void save()
{
    freopen("save.bin","w",stdout);

    fclose(stdout);
}
void playerz()
{
    for(int i=0;i<20;i++)p.buff[i]=Ke;
    p.attack=playerzb[0].ad;
//    cout<<playerzb[0].ad;sleep(1000);
    p.defense=p.defense+playerzb[2].ad+playerzb[3].ad;
    p.name=name;
    p.cd=0;
    p.maxcd=playerzb[1].mcd;
    p.mp.num=p.mp.max;
    jnnum=0;
    for(int i=1;;i++)
    {
    	if(pjn[i]!=-1)jnnum++;
    	else break;
	}
    for(int i=1;i<=jnnum;i++)jineng[pjn[i]].cd=jineng[pjn[i]].mcd;
}
void die(string why)
{
    cls;color(4,0);
    cout<<"你"<<why;
    color(15,0);
}
int fight(int Bn,fighter B1,fighter B2=K,fighter B3=K,fighter B4=K,fighter B5=K,fighter B6=K,fighter B7=K,fighter B8=K,fighter B9=K,fighter B10=K)//K 为空
{
    color(15,0),cls;
    char ch;
    int chjn;//选择的技能
    fighter B[11];
    bool ji[1001];
    memset(ji,0,sizeof(ji));
    B[1]=B1;
    if(Bn>=2)B[2]=B2;
    if(Bn>=3)B[3]=B3;
    if(Bn>=4)B[4]=B4;
    if(Bn>=5)B[5]=B5;
    if(Bn>=6)B[6]=B6;
    if(Bn>=7)B[7]=B7;
    if(Bn>=8)B[8]=B8;
    if(Bn>=9)B[9]=B9;
    if(Bn>=10)B[10]=B10;
    int cha=1;//选择的敌人
    int k;
    long long time=1;
    while(true)
    {
        time++,k=0,hide(1);
        for(int i=1;i<=Bn;i++)
        {
            if(B[i].alive==1)k++;
        }
        if(k==0)
        {
            hide(1);
            cout<<"你胜利了。";
            Sleep(1000);
            return 0;
        }
        if(p.buff[0].time>0&&time%100==0)
        {
            color(2,0);
            p.health-=p.buff[0].att;
            p.buff[0].time--;
            cout<<p.name;
            color(2,0);
            cout<<"受到毒伤"<<p.buff[0].att<<"。\n";
            if(p.health<=0)
            {
                cout<<p.name<<"被毒倒了。\n";
                die("被毒倒");
                return -1;
            }
            color(15,0);
        }
        if(p.buff[1].time>0&&time%80==0)
        {
            color(12,0);
            p.health-=p.buff[1].att;
            p.buff[1].att*=0.8;
            p.buff[1].time--;
            if(p.buff[1].att<1)p.buff[1].time=0;
            cout<<p.name;
            color(12,0);
            cout<<"受到灼伤"<<p.buff[1].att<<"。\n";
            if(p.health<=0)
            {
                cout<<p.name<<"被烧死了。\n";
                die("被烧死");
                return -1;
            }
            color(15,0);
        }
        if(p.mp.num<p.mp.max&&time%p.speed==0)
        {
            p.mp.num+=p.mp.huei;
            p.mp.num=min(p.mp.num,p.mp.max);
        }//回法力值
        if(time%p.speed==0&&p.sleept>0)
        {
            p.sleept--;
            say(p.name+"这回合不能行动。");
        }
        else
        if(time%p.speed==0)
        {
            color(15,0);
            say(p.name+"行动");Sleep(500);
            cls;
            cout<<"你的回合:\n";
            if(p.buff[0].time>0)color(2,0);else
            if(p.buff[1].time>0)color(12,0);else
            color(15,0);
            cout<<"◆"<<p.health,color(15,0);
            cout<<" mp"<<p.mp.num<<"/"<<p.mp.max<<endl;
            for(int i=1;i<=Bn;i++)
            {
                if(B[i].alive==0)color(8,0);else color(15,0);
                cout<<"["<<i<<"] ";
                if(B[i].alive==0)
                {
                    cout<<"\n";
                    continue;
                }
                else
                if(B[i].buff[1].time>0)color(12,0);
                else color(15,0);
                cout<<B[i].name;
                if(B[i].sleept>0)cout<<"(▽)";
                if(B[i].buff[0].time>0)color(2,0);else color(15,0);
                cout<<"  ◆"<<B[i].health;
                color(15,0);
                if(B[i].nuqi.num>B[i].nuqi.max*0.5)color(14,0);
                if(B[i].nuqi.num>B[i].nuqi.max*0.8)color(4,0);
                cout<<"  怒",color(15,0),cout<<B[i].nuqi.num*100/B[i].nuqi.max<<"%\n";
            }
            hide(0);
            color(15,0);
            cout<<"enter跳过\n";
            while(1)
            {
                gotoxy(1,Bn+4);
                cout<<"                         ";
                ch=getch();
                if(ch==13)
                {
                	ch=-1;
                	break;
				}
                ch=ch-'0';
                if(B[ch].alive==1&&ch>=1&&ch<=Bn)break;
                else if(!(ch>=1&&ch<=Bn))cout<<"你搞什么",sleep(500);
                else cout<<"不要鞭尸了",sleep(500);
            }
            cha=ch;
            while(1)
            {
                cls;
                if(ch==-1)break;
                CONSOLE_CURSOR_INFO cursor_info={1,1};
                SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
                cout<<"◆"<<p.health<<" mp"<<p.mp.num<<"/"<<p.mp.max<<endl;
                if(B[cha].buff[1].time>0)color(12,0);
                cout<<B[cha].name;
                if(B[cha].sleept>0)cout<<"(▽)";
                if(B[cha].buff[0].time>0)color(2,0);
                else color(15,0);
                cout<<"◆"<<B[cha].health;
                color(15,0);
                if(B[cha].nuqi.num>B[cha].nuqi.max*0.5)color(14,0);
                if(B[cha].nuqi.num>B[cha].nuqi.max*0.8)color(4,0);
                cout<<"  怒",color(15,0),cout<<B[cha].nuqi.num*100/B[cha].nuqi.max<<"%\n\n";
                cout<<"1攻击";
                if(p.cd==0)color(15,0);else color(8,0);
                cout<<"\t2重武器";
                if(p.cd>0)cout<<"("<<p.cd<<")";
                color(15,0);
                cout<<"\t3用技能\t4跳过\n";
                ch=getch();
                if(ch=='4'||ch=='1')break;
                if(ch=='2')
                {
                    if(p.cd>0)
                    {
                        cout<<"未准备好!";
                        sleep(500);
                    }
                    else break;
                }
                if(ch=='3')
                {
                    if(jnnum==0)
                    {
                        cout<<"没有技能!";
                        sleep(400);
                    }else
                    {
                    for(int i=1;i<=jnnum;i++)
                    {
                        if(jineng[pjn[i]].cd!=0||p.mp.num<jineng[pjn[i]].mp)color(8,0);else color(15,0);
                        cout<<"("<<i<<")"<<jineng[pjn[i]].name<<"mp:"<<jineng[pjn[i]].mp<<"/"<<p.mp.num;
                        if(jineng[pjn[i]].cd!=0)cout<<" cd("<<jineng[pjn[i]].cd<<")";
                        cout<<"\n",color(15,0);
                    }
                    cout<<"enter返回\n";
                    while(1)
                    {
                        chjn=int(getch()-'0');
                        if((1<=chjn&&chjn<=jnnum&&p.mp.num>=jineng[pjn[chjn]].mp&&jineng[pjn[chjn]].cd==0)||(chjn+'0')==13)break;
                    }
                    if((chjn+'0')!=13)
                    {
                        hide(1);
                        ji[chjn]=1;
                        say(p.name+jineng[pjn[chjn]].text+"。");
                        p.mp.num-=jineng[pjn[chjn]].mp;
                        jineng[pjn[chjn]].cd=jineng[pjn[chjn]].mcd;
                        if(jineng[pjn[chjn]].type==0)
                        {
                        int attack=0,defense=B[cha].defense;
                        if(jineng[pjn[chjn]].dysx==1)attack=p.attack*jineng[pjn[chjn]].beilv;
                        if(jineng[pjn[chjn]].dysx==2)attack=p.mental*jineng[pjn[chjn]].beilv;
//                        cout<<p.mental<<"*"<<jineng[pjn[chjn]].beilv<<"="<<attack<<endl;
                        //----
                        B[cha].buff[1].att=max(jineng[pjn[chjn]].effect[1].att,B[cha].buff[1].att);
                        B[cha].buff[1].time=max(jineng[pjn[chjn]].effect[1].time,B[cha].buff[1].time);
                        B[cha].buff[0].att=max(jineng[pjn[chjn]].effect[0].att,B[cha].buff[0].att);
                        B[cha].buff[0].time=max(jineng[pjn[chjn]].effect[0].time,B[cha].buff[0].time);
                        //----
                        /*
                        attack=logn(pow(attack,1.3));
                        defense=logn(pow(defense,1.3));
                        double harm=attack*attack/(attack+defense);
                        */
                        int harm=attack;
//                        cout<<harm<<endl;
                        harm-=defense/2;
//                        cout<<harm<<endl;
                        if(harm>1)harm*=logn(pow(defense,1.5),1.3)/100;
//                        cout<<harm<<endl;
                        harm*=(float)crand(8,12)/10.00000;
//                        cout<<harm<<endl;
						harm*=jineng[pjn[chjn]].cishu;
                        if(harm<2)harm=1;
						B[cha].nuqi.num+=crand(20,crand(20,40));
                        if(harm==1)say("造成强制伤害1点。");
                        else say("造成",1),cout<<int(harm),say("点伤害");
                        B[cha].health-=int(harm);
                        if(B[cha].health<=0)
                        {
                            say("你击倒了"+B[cha].name);
                            B[cha].alive=0;
                        }else
                        say(B[cha].name+"剩余血量",1),cout<<B[cha].health,say("点。");
                        break;//看这里
                        }
                        if(jineng[pjn[chjn]].type==1)
                        {
                            int hhealth=0;
                            if(jineng[pjn[chjn]].dysx==5)hhealth=jineng[pjn[chjn]].beilv;
                            //--
                            //--
                            if(hhealth>0)say("恢复",1),cout<<hhealth,say("点血,",1);
                            p.health+=hhealth;
                            say("剩余血量",1),cout<<p.health,say("点。");
                            sleep(500);
                        }
                        }
                    //--
                    }
                }
            }
            hide(1);
            if(ch=='2')
            {
                say("你用"+playerzb[1].name+"对"+B[cha].name+"发动攻击。");
                p.cd=p.maxcd;
                double attack=playerzb[1].ad,defense=B[cha].defense;
                attack*=(crand(8,14)/10.00000);
                attack*=(1-B[cha].cj);//攻击吸收
                defense*=(1-playerzb[1].cj);//穿甲
                B[cha].defense*=(1-playerzb[1].pj);//破甲
                defense*=(crand(9,11)/10.00000);
                //----
                B[cha].buff[1].att=max(playerzb[1].effect[1].att,B[cha].buff[1].att);
                B[cha].buff[1].time=max(playerzb[1].effect[1].time,B[cha].buff[1].time);
                B[cha].buff[0].att=max(playerzb[1].effect[0].att,B[cha].buff[0].att);
                B[cha].buff[0].time=max(playerzb[1].effect[0].time,B[cha].buff[0].time);
                //----
                /*
                attack=logn(pow(attack,1.3));
                defense=logn(pow(defense,1.3));
                double harm=attack*attack/(attack+defense);
                */
                double harm=attack;
                harm-=defense/2;
                harm*=logn(pow(defense,1.5),1.3)/100;
                if(harm<2)harm=0;
//              else
//                harm=pow(2,harm);
                if(harm==0)say("未破防。");
                else say("造成",1),cout<<int(harm),say("点伤害"),B[cha].nuqi.num+=crand(10,crand(20,40));
                B[cha].health-=int(harm);
                if(B[cha].health<=0)
                {
                    say("你击倒了"+B[cha].name);
                    B[cha].alive=0;
                }else
                say(B[cha].name+"剩余血量",1),cout<<B[cha].health,say("点。");
            }
            if(ch=='1')
            {
                say("你对"+B[cha].name+"发动攻击。");
                double attack=p.attack,defense=B[cha].defense;
                attack*=(crand(8,12)/10.00000);
                defense*=(crand(9,11)/10.00000);
                attack*=(1-B[cha].cj);//攻击吸收
                defense*=(1-playerzb[0].cj);//穿甲
                B[cha].defense*=(1-playerzb[0].pj);//破甲
                //----
                B[cha].buff[1].att=max(playerzb[0].effect[1].att,B[cha].buff[1].att);
                B[cha].buff[1].time=max(playerzb[0].effect[1].time,B[cha].buff[1].time);
                B[cha].buff[0].att=max(playerzb[0].effect[0].att,B[cha].buff[0].att);
                B[cha].buff[0].time=max(playerzb[0].effect[0].time,B[cha].buff[0].time);
                //----
                /*
                attack=logn(pow(attack,1.3));
                defense=logn(pow(defense,1.3));
                double harm=attack*attack/(attack+defense);
                */
                double harm=attack;
                harm-=defense/2;
                harm*=logn(pow(defense,1.5),1.3)/100;
                if(harm<2)harm=0;
//                else
//                harm=pow(2,harm);
                if(harm==0)say("未破防。");
                else say("造成",1),cout<<int(harm),say("点伤害"),B[cha].nuqi.num+=crand(10,crand(15,40));
                B[cha].health-=int(harm);
                if(B[cha].health<=0)
                {
                    say("你击倒了"+B[cha].name);
                    B[cha].alive=0;
                }else
                say(B[cha].name+"剩余血量",1),cout<<B[cha].health,say("点。");
            }
            //-----
        }
        if(ch!='2')p.cd=max(0,p.cd-1);
        if(time%p.speed==0)
        for(int i=1;i<=jnnum;i++)
        {
			if(ji[i]==1)
			{
				ji[i]=0;
				continue;
			}
			jineng[pjn[i]].cd=max(jineng[pjn[i]].cd-1,0);
        }
        //_______________________
        for(int i=1;i<=Bn;i++)
        {
            if(B[i].alive!=1)continue;
            if(B[i].buff[0].time>0&&time%100==0)
            {
                color(2,0);
                B[i].health-=B[i].buff[0].att;
                B[i].buff[0].time--;
                cout<<B[i].name<<"受到毒伤"<<B[i].buff[0].att<<"。\n";
                if(B[i].health<=0)
                {
                    cout<<B[i].name<<"被毒倒了。\n";
                    B[i].alive=0;
                    color(15,0);
                    continue;
                }
                color(15,0);
            }
            if(B[i].buff[1].time>0&&time%80==0)
            {
                color(12,0);
                B[i].health-=B[i].buff[1].att;
                B[i].buff[1].time--;
                cout<<B[i].name<<"受到灼伤"<<B[i].buff[1].att<<"。\n";
                B[i].buff[1].att*=0.8;
                if(B[i].buff[1].att<1)B[i].buff[1].time=0;
                if(B[i].health<=0)
                {
                    cout<<B[i].name<<"被烧死了。\n";
                    B[i].alive=0;
                    color(15,0);
                    continue;
                }
                color(15,0);
            }
            //------
            if(B[i].alive!=1)continue;
            if(B[i].sleept>0&&time%B[i].speed==0)
            {
                B[i].sleept--;
                cout<<B[i].name<<"这回合不能行动。\n";
                continue;
            }
            if(time%B[i].speed!=0)continue;
            if(B[i].nuqi.num>=B[i].nuqi.max)
            {
                color(15,0);
                B[i].nuqi.num=0;
                say(B[i].name+jineng[B[i].ji[B[i].nuqi.times]].text);
                //jb jineng[B[i].ji[B[i].nuqi.times]]
                if(jb.type==0)
                {
                int attack=0,defense=p.defense;
                if(jb.dysx==1)attack=B[i].attack*jb.beilv;
                if(jb.dysx==2)attack=B[i].mental*jb.beilv;
                int harm=attack;
//                cout<<harm<<endl;
                harm-=defense/2;
//                cout<<harm<<endl;
                if(harm>1)harm*=logn(pow(defense,1.5),1.3)/100;
//                cout<<harm<<endl;
                harm*=(float)crand(8,12)/10.00000;
//                cout<<harm<<endl;
				harm*=jb.cishu;
                if(harm<2)harm=1;
                if(harm==1)say("造成强制伤害1点。");
                else say("造成",1),cout<<int(harm),say("点伤害");
                //----
                p.buff[1].att=max(jb.effect[1].att,p.buff[1].att);
                p.buff[1].time=max(jb.effect[1].time,p.buff[1].time);
                if(jb.effect[1].att>0)
                {
                    color(12,0);
                    say("你燃起来了!");
                }
                p.buff[0].att=max(jb.effect[0].att,p.buff[0].att);
                p.buff[0].time=max(jb.effect[0].time,p.buff[0].time);
                if(jb.effect[0].att>0)
                {
                    color(2,0);
                    say("你中毒了!");
                }
                //----
                p.health-=int(harm);
                if(p.health<=0)
                {
                    say("你被击倒了");
                    die("被"+B[i].name+"用"+jb.name+"击倒了");
                    return -1;
                }else
                say(p.name+"剩余血量",1),cout<<p.health,say("点。");
                }
                if(jb.type==1)
                {
                    int hhealth=0;
                    if(jb.dysx==5)hhealth=jb.beilv;
                    //--
                    //--
                    if(hhealth>0)say("恢复",1),cout<<hhealth,say("点血,",1);
                    B[i].health+=hhealth;
                    say("剩余血量",1),cout<<B[i].health,say("点。");
                }
                B[i].nuqi.times++;
                if(B[i].nuqi.times>3)B[i].nuqi.times=1;
                continue;
            }
            else
            {
            say(B[i].name+"对你发动攻击。");
            double attack=B[i].attack,defense=p.defense;
            attack*=(crand(8,12)/10.00000);
            defense*=(crand(9,11)/10.00000);
            attack*=(1-playerzb[3].cj);//攻击吸收
            defense*=(1-B[i].cj);//穿甲
            p.defense*=(1-B[i].pj);//破甲
            /*
            attack=logn(pow(attack,1.3));
            defense=logn(pow(defense,1.3));
            double harm=attack*attack/(attack+defense);
            */
            double harm=attack;
            harm-=defense/2;
            harm*=logn(pow(defense,1.5),1.3)/100;
            if(harm<2)harm=0;
//            else
//            harm=pow(2,harm);
            if(harm==0)say("未破防。");
            else say("造成",1),cout<<int(harm),say("点伤害");
            p.health-=int(harm);
            //----
                p.buff[1].att=max(B[i].effect[1].att,p.buff[1].att);
                p.buff[1].time=max(B[i].effect[1].time,p.buff[1].time);
                if(B[i].effect[1].att>0)
                {
                    color(12,0);
                    say("你燃起来了!");
                }
                p.buff[0].att=max(B[i].effect[0].att,p.buff[0].att);
                p.buff[0].time=max(B[i].effect[0].time,p.buff[0].time);
                if(B[i].effect[0].att>0)
                {
                    color(2,0);
                    say("你中毒了!");
                }
            //----
            }
            if(p.health<=0)
            {
                say("你被击倒了");
                die("被"+B[i].name+"击倒了");
                return -1;
            }
            else
            say("你剩余血量",1),cout<<p.health,say("点。");
            sleep(100);
            //&&&&
        }
    }
}
int main()
{
    hide(1);
//    for(int i=0;i<5;i++)
//    {
//        cout<<"loading";
//        for(int i=0;i<3;i++)
//        {
//            cout<<".";
//            sleep(200);
//        }
//        cls;
//    }
//	MessageBox(NULL,"未完成","未完成",MB_ICONEXCLAMATION);
    srand((int)time(NULL));
    hide(1);
    system("title 很久很久以前");
//	system("mode con cols=60 lines=40");
    cls;
    begin:
        Color();
        say("本游戏制作人:梁益豪,俞振羽");
        say("本游戏策划:梁益豪,俞振羽");
        say("本游戏特别感谢:梁益豪及他的怨种同学们");
        cls;cout<<"本游戏制作人:梁益豪,俞振羽\n本游戏策划:梁益豪,俞振羽\n本游戏特别感谢:梁益豪及他的";
        gotoxy(14*2,3);say("傻逼同学们");
        cls;cout<<"本游戏制作人:梁益豪,俞振羽\n本游戏策划:梁益豪,俞振羽\n本游戏特别感谢:梁益豪及他的";
        gotoxy(14*2,3);say("同学们    ");
        sleep(1000);
        cout<<"\t1存档\t2开始\n";hide(0);
        while(1)
        {
            char ch=getch();
            if(ch=='1')read();
            if(ch=='2')goto start;
        }
    start:
    	cout<<"\t1剧情\t2跳过\n";
    	while(1)
        {
            char ch=getch();
            if(ch=='1')break;
			if(ch=='2')goto no_begin;
        }
        cls;hide(1);
        say("在很久很久以前",1);for(int i=0;i<6;i++)cout<<".";Sleep(300);
        say("\n在恶灵厄异界有一个大陆,叫做恶办大陆");
        say("大陆上有49名领主与三位魔王,分别是:杨肉山,吴无情,贝和峰");
        say("魔王中又以贝和峰最为强大,也最为邪恶。");
        say("祂是万恶之源,也是一切灾祸的源头......");
        say("领主们无法忍受,在教皇陈永言的号召下组成反贝联盟抗击贝和峰");
        say("但是领主们的力量过于弱小,被贝和峰击败");
        say("教皇只能亲自出手,将贝和峰封印在王城边");
        Sleep(1000);
        cls;
        say("很多很多年过去了...");sleep(200);
        say("贝和峰趁教皇不在(成神中)逃了出来");
        say("在恶办大陆大肆破坏");
        say("好在祂惹到了杨肉山,肉山的硫酸让贝和峰吃尽苦头");
        say("领主们趁机聚集力量给了贝和峰重重一击");
        say("贝和峰落荒而逃,躲进了大陆南部的钢管恶地");
        say("但多座城市被毁,连王城也遭受重创");
        say("王国对地方的控制急剧减弱");
        say("而贝和峰散播的邪恶更是让局面雪上加霜");
        say("领主间争纷不断,爆发了多起恶性事件");
        say("恶办大陆上战火不停");sleep(1000);
        cls;
        say("一时间王国政治动荡,风雨飘摇");
        say("国王杨文珊决定一劳永逸的解决贝和峰");
        say("她召集领主们,集合6.5535万士兵,重组反贝联盟");
        say("共6.5585万反贝大军包围了钢管恶地");
        say("就在贝和峰即将完蛋的时候,肉山和无情突然出现");
        say("从后方偷袭了反贝大军");
        say("受到两面夹击的反贝军陷入混乱,但凭借着绝对人数优势仍占上风");sleep(400);
        say("但是,局势突变");
        say("军阵中的炊事员焦哥不小心撒了一碗汤");
        say("本来这也没什么");
        say("但是焦哥连撒了九次汤");
        say("焦哥悲痛大喊:槽霓马!");
        say("军心大乱,被贝和峰屠杀");
        say("剩下的人突围之后所剩无几......");
        cls;
        say("来时大军,现今只剩300余人,49名领主死亡近半");
        say("电脑城城主梁益豪迫于无奈,只能从异世界召唤勇者");
        say("他本想召唤大量勇者,可每一个召唤过来的勇者都是弱鸡");
        say("梁益豪非常愤怒,献祭了",1),cout<<char(-128)<<"\241"<<char(-34),say("来召唤异世界勇者......");
        sleep(1000);
        cls;
        goto no_begin;
    no_begin:
    	cls;hide(1);
        say("那天,天地异象齐生,一行大字显现在所有人的眼中:");
        say("有一位勇者将会前来帮助你们打败三位魔王");
        say("那位勇者的名字是:",1);hide(0);//输入显示光标
        color(8,0);
        cout<<"<请输入你的名字(不要过长)>";color(15,0);
        gotoxy(18,3);
        cin>>name;hide(1);
    	cls;cout<<"那天,天地异象齐生,一行大字显现在所有人的眼中:\n有一位勇者将会前来帮助你们打败三位魔王\n那位勇者的名字是:";
        Color(1,1,0,0);
        cout<<name<<endl;
        Color();
        say("祂是拯救这濒临毁灭的畜亿恶办大陆的唯一人选");
		cls;
		say("你正在校门口看一篇莫名奇妙的小说,");
		say("你发现主角的名字居然和你一样,");
		sleep(100);
		cout<<"╔═════╗\n";
		cout<<"║ ",color(10,0),cout<<"7:51",color(15,0),cout<<"║\n";
		cout<<"╚═════╝\n";
		sleep(100);
		say("你注意到你快要迟到了,");
		say("你把小说塞回书包里,");
		say("抬腿向学校走去。");
		sleep(300);
		say("你的一条腿迈入校园");
		sleep(200);
		color(0,15);
		cls;
		//gotoxy(30,20);
		//color(0,12);
		//cout<<"卐";?
		sleep(600);
		gotoxy(30,20);
		system("color 0F");
		cout<<"  ";
		gotoxy(1,1);
		cout<<"你正在校门口看一篇莫名奇妙的小说,\n";
		cout<<"你发现主角的名字居然和你一样,\n";
		cout<<"╔═════╗\n";
		cout<<"║ ",color(10,0),cout<<"7:51",color(15,0),cout<<"║\n";
		cout<<"╚═════╝\n";
		cout<<"你注意到你快要迟到了,\n你把小说塞回书包里,\n抬腿向学校走去。\n你的一条腿迈入校园\n";
		cls;
		sleep(1000);
		color(4,0);
		gotoxy(40,10);
		cout<<"你";
		sleep(300);
		cout<<"死";
		sleep(300);
		cout<<"了";
		sleep(300);cls;
		a1://开端
        say("你睁开眼睛,发现你在一个富丽堂皇的王宫之中。");
        say("你:?");
        say("你:这是地府吗?");
        say("人:醒啦!他醒啦!啊啊啊啊啊啊啊啊他终于醒了!");
        say("你听到扑通的一声,那个人好像昏倒了......");
        say("你:...... 6");
        say("你:所以,有其他人在吗(大喊)");
        say("一名好像身份很尊贵的人进入了你的房间,周围的人都跪在了地上。");
        say("?:"+name+",你终于醒了,你已经睡了整整114个小时了。",1);
		say("你看向那位说话的人,她威严而又仁慈(?),看上去像这个国家的君主。");
		say("?:请容我自我介绍一下:我叫杨雯珊,是这个王国的唯一君主。");
		say("");
        //fight(4,mob,mob3,mob114,mob514);
        playerz();
        int weizhi=0,juqingcf=-1;
        while(1)
        {

		}
    return(0);
}
/*
char-int
#include<bits/stdc++.h>
#include<conio.h>
using namespace std;
int main()
{
	while(1)
	{
		char ch;
		ch=getch();
		cout<<"["<<int(ch)<<"]";
	}
}
*/
/*
-----------10+
流光·什一装甲
虹霞·水杯重锤
闪光·惩戒之剑
炫彩·等离子电浆炮
荣光·高能射线炮
虚迷·量子随机剑
终焉·绝望圆规
苍穹·沉淀能量场(沉淀能量力场发生器)
和峰陨落之弓 //5
-----------10
什一装甲 //4
水杯重锤 //33
惩戒之剑 //34
等离子电浆炮 //50
高能射线炮 //20
绝望圆规 //21
沉淀能量盾 //7
*/
/*
∑▓ ※∷··▏▎▍▌▋▊▉▁▂▃▄▅▆▇█△▽○◇□☆▲▼●◆■★♂♀〓卍卐‖
◎¤§「」[]【】〖〗『』︵︶︷︸︹︺︿﹀︽︾﹁﹂﹃﹄︻︼__﹍﹎|^-¨ˊˇ︴﹉﹋ ̄ˉ
[ ](空)
①②③④⑤⑦⑧⑨⑩⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛
ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹ∵
∴㏒∏≒≈≥≠≤÷⊕⊙∟⌒∥∣㏑∽∞≌∈∩⊥∥
㎡㏕¥£¢£€$¥℃℉°〒∮℅%‰%∫∠⊥⊿⊕∨∪≌∞αγβδεζηθικλμνξοπρστυφχψω
┈┉┊┋╃╊┵┷┸┩┹┺╄╅╆╇╈╉╂╁╀┿┾┽┪┩┨┧┦┥┭┮┯┰┱┲║╤╥╧╨╫╪╢╡╟╞═┢┡┠┟┞┝┇┅┄┆╲╱╲╱╓╓╙╜╕╒
┌┬┐┤┘┴└├┼┏┳┓┫┛┻┗┣╋╔╦╗╣╝╩╚╠╬╭─╮┃╯━╰│╳ =?
故障:╘//||\\
*/
/*
虚空蠕虫 冲撞 虚空水晶
宙游鲟
末影噬菌体
诡异蚊鬼 拍地 撞击 吸血 喷射
炽岩 普通/黑曜石形态
悬熊 拍地
诡异蟾蜍
绯红蚊子 血液喷射 血液吸取
灵魂鹫
骨蟒
岩磙兽 滚动
寒霜潜伏者 冰刺
瞻远者 激光
骷髅剑鱼
洞穴蜈蚣 毒
曦鹤(sunbird)
蘑菇君
沙风怪
末影缓步兽

惴恐和服
寒霜潜伏头盔
跨座晶石头盔
跨座晶石鞍
远古疣猪靴子
幽灵矿镐
维度撕裂者
平面稳定器
锻造锤/热能锻锤
羊角/挖掘爪(爪) 扁斧 镰刀 斧头 锤 镐 锄头(勾刀)
眩光
*/
原文