#include<algorithm>
#include<cmath>
#include<vector>
#include<stdio.h>
#include<iostream>
#include<string>
#include<cstring>
#include<windows.h>
#include<conio.h>
#include<cstdlib>
#include<ctime>
#include<fstream>
using namespace std;
long long things[10000];
int sudu=80;
int money=things[8];
string name;
int episodes;
string filename[10]={"空存档","空存档","空存档","空存档","空存档","空存档","空存档","空存档","空存档","空存档"};
void w1();
void w2();
void w3();
void w4();
void w5();
void w6();
void w7();
void w8();
void w9();
void r1();
void r2();
void r3();
void r4();
void r5();
void r6();
void r7();
void r8();
void r9();
void mrf();
void mwf();
void Write_File();
void Read_File();
void gs();
void g();
void hidden();
void Sout(string n);
void gotoxy(int x,int y);
int random(int n,int m);
void cls();
void about();
int zhangjieshu;
void init();
void namek();
void juqing();
void end1();
void mianban();
string episode[10000];
void welcome();
int main();
string where[10000];
void home();
string guaiwu[123];
void fight();
void diaolingfengbao();
void fightmmain();
void daguai();
void xiaoguai();
void boss();
const unsigned long long sj[]=
{
0,0,100,300,500,800,1500,2122,4500,6821,8933,13382,20091,38392,59183,70003,89312,100033,110344,130953,150099,169821,193831,229183,
500000,867132,1102933,1491839,1783021,2092103,2819382,3857192,4561738,5637139,7003928,8563729,10000000,10092819,11928372,12837291,14838279,16738291,18973820,
20093819,23849577,25860392,28039281,3003920,3120392,3302910,3939201,4029102,4392018,4592018,4672103,4800928,5028102,5193029,5392010,5503921,5872810,6839201,
7293829,7495820,7888930,8139002,8873029,9567291,10093829,11293029,13930295,15930281,169302810,18392910,22839020,28739201,38392819,50009329,74892396,99837281,
103958372,113837293,136573829,157683920,175837292,183726195,200999887,218376859,239837261,254637289,267392019,289383910,309201839,339281039,358372918,381039283,
457362821,478392018,500938271,536839201,556738291,598372918,620999382,647382019,667382010,683920133,708310999,738291839,756372819,778837261,819382910,837291038,
1000000000,1093729183,1128372919,1273829102,1303928193,13283920193,135869302,142637291,144738291,145637289,149392019,151839201,1553291333,156839201,158382919,160993029,
1618392918,1638392819,1657382918,1689392819,1700900300,17100000000,1728393820,1759382910,1783929182,1800392022,1819310393,1827392913,1858392918,1889380130,1918038286,1938028284,
1958302882,1978928388,2009380291,2039209288,2048983828,20673802838,2083920788,210989382,212980838,214008000,2147483647,225903988,2500993021,2930993822,3259586666,3693829100,
4193857766,4894827188,5693028188,6839281999,7503929188,79302918383,9603929183,1059837772,12968392005,15382993005,16392159388,18396198382,21325938292,24593203928,26832392012,
30052279053,33358029748,39696055400,43665660940,51962136518,59236835630,66937624261,77647644142,91624220087,106284095300,122226709595,139338448938,160239216278,177865530068,199209393676,227098708790,249808579669,294774124009,338990242610,376279169297,440246628077,488673757165,566861558311,657559407640,762768912862,884811938919,1008685610367,1129727883611,1276592508480,1493613234921,1642974558413,1840131505422,2189756491452,2408732140597,2745954640280,3267686021933,3855869505880,4357132541644,4967131097474,5712200762095,6797518906893,7885121931995,8673634125194,9887942902721,11173375480074,12514180537682,14891874839841,16827818569020,19015434982992,21867750230440,24054525253484,27181613536436,30715223296172,35936811256521,40967964832433,45474440964000,51386118289320,61149480764290,71544892494219,85138422068120,99611953819700,110569268739867,122731888301252,139914352663427,166498079669478,183147887636425,206957113029160,229722395462367,261883530827098,298547225142891,349300253417182,415667301566446,461390704738755,539827124544343,642394278207768,706633706028544,833827773113681,967240216811870,1092981444997413,1256928661747025,1420329387774138,1590768914307034,1877107318882300,2121131270336999,2481723586294289,2903616595964318,3223014421520393,3642006296318044,4079047051876209,4731694580176402,5441448767202862,6094422619267206,7130474464542631,8413959868160304,9423635052339540,11025653011237262,12679500962922852,15088606145878194,16899238883383578,19772109493558788,22540204822657020,26146637594282144,30330099609367288,33666410566397688,37033051623037456,42588009366493072,49827970958796896,57302166602616432,65897491593008896,74464165500100048,84144507015113056,95083292927077760,110296619795410208,125738146566767632,139569342689112064,157713357238696640,187678895114048992,213953940430015840,254605189111718848,295342019369593856,336689902081336960,370358892289470656,429616315055785984,506947251765827456,562711449460068480,669626624857481472,770070618586103680,847077680444713984,948727002098079616,1110010592454753152,1243211863549323520,1404829405810735616,1431086375945250560,1446971027840490240,1494018951557873152,1518714164038880000,1592428131188393984,1630900628817673728,1810299697987617792,1824965224029160192,1877743262415855616,1974937311041138432,2007712974518568192,2104325350214072320,2277593219013369088,2389212896748011520,2402552078753502208,2442051050667406336,2526209225503725568,2644886891827077120,2752031650881759744,2925328324759292928,3082952541741774848,3114801490694014464,3272962213933260800,3448520616728823808,3562378621596667904,3614580665056815104,3715541270040010240,3829626753671020544,3881950815100641792,4066119147758477312,4100812022884206080,4264982704384962048,4393977614875269632,4552320047186110976,4729663571374253056,4748539979845751808,4817922013471148032,4978958553478782976,5037722159087005696,5105887941592544256,5153669446809650176,5158992743549910016,5216864161138915328,5313692663972759552,5476127048895844352,5614437613770797056,5790912181349713920,5874510199086896128,6009584831237059584,6108877048861882368,6286137713971544064,6369582544521513984,6402682722514263040,6504774754431067136,6666897655207197696,6846854075068702720,6883076441892843520,6971175851971602432,7024803267562148864,7173881272107077632,7225138449090473984,7346607341013281792,7490330458986493952,7651300351116490752,7800145196587322368,7863362331652847616,8014695660294729728,8134268892447566848,8247604581892128768,8334495277132959744,8394519971509001216,8462948123097688064,8525747737633649664,8598595290495365120,8756588869792719872,8788140778443200512,8902971217834443776,8934328782589128704,9084111032814346240,
};
const string study[5]=
{
"凋零风暴的血量与攻击力都很高,没事不要惹它","凋零风暴的防御力很低,一把铁剑就能干过它","凋零风暴的弱点是下半身,建议用刺击与砍击","先把防御力提升到1000再打凋零风暴","凋零风暴被打完半血就无法再用弓箭攻击了"
};
const string nsStory[9]=
{
"哼哼,这些年来还没有几个人打过我的,怎么又来了一个送死的蠢货",
"好,那就来吧!",
"哼,你算老几啊,能打的过我吗?",
"告诉你吧,有创世神的帮助,我是不会死的!!!",
"好啊,但是你这个游戏也太危险了,一不小心你就会死的哦~",
"?敢说我是蠢货?看看我打不打的过你就完了!",
"那又怎么样!我可是有备而来!",
"真正的勇士从来都是不说废话的!来吧!",
"吗"
};
void mrf()
{
ifstream fin("save.YXCJ");
for(int i=1;i<=9;i++)
fin>>filename[i];
fin.close();
}
void mwf()
{
ofstream fout("save.YXCJ");
for(int i=1;i<=9;i++)
fout<<filename[i]<<'\n';
fout.close();
}
void w1()
{
ofstream fout("file2.b");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w2()
{
ofstream fout("file2.b");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w3()
{
ofstream fout("file3.c++");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w4()
{
ofstream fout("file4.d");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w5()
{
ofstream fout("file5.e");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w6()
{
ofstream fout("file6.f");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w7()
{
ofstream fout("file7.g");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w8()
{
ofstream fout("file8.h");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void w9()
{
ofstream fout("file9.i");
fout<<name<<endl;
for(int i=0;i<2000;i++)
fout<<things[i]<<' ';
fout<<sudu<<'\n';
fout<<money<<endl;
fout<<episodes<<endl;
fout.close();
}
void Write_File()
{
if (things[192]==0)
return;
switch(things[185])
{
case 1:w1();break;
case 2:w2();break;
case 3:w3();break;
case 4:w4();break;
case 5:w5();break;
case 6:w6();break;
case 7:w7();break;
case 8:w8();break;
case 9:w9();break;
default:cout<<things[185]<<"[error] 404";Sleep(5000);exit(0);
}
}
void r1()
{
ifstream fin("file1.a");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r2()
{
ifstream fin("file2.b");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r3()
{
ifstream fin("file3.c++");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r4()
{
ifstream fin("file4.d");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r5()
{
ifstream fin("file5.e");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r6()
{
ifstream fin("file6.f");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r7()
{
ifstream fin("file7.g");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r8()
{
ifstream fin("file8.h");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void r9()
{
ifstream fin("file9.i");
fin>>name;
for(int i=0;i<2000;i++)
fin>>things[i];
fin>>sudu;
fin>>money;
fin>>episodes;
fin.close();
}
void Read_File()
{
switch(things[185])
{
case 1:r1();break;
case 2:r2();break;
case 3:r3();break;
case 4:r4();break;
case 5:r5();break;
case 6:r6();break;
case 7:r7();break;
case 8:r8();break;
case 9:r9();break;
default:cout<<"[error] 找不到存档";Sleep(5000);exit(0);
}
}
void cls()
{
system("cls");
}
void hidden()
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;GetConsoleCursorInfo(handle, &CursorInfo);
CursorInfo.bVisible = false;
SetConsoleCursorInfo(handle, &CursorInfo);
}
void gotoxy(int y,int x)
{
COORD coord;
coord.X=x;
coord.Y=y;
HANDLE a=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(a,coord);
}
void gs()
{
hidden();
gotoxy(45,80);
cout<<"按下任意键继续_";
_getch();
system("cls");
}
void g()
{
_getch();
}
void init()
{
things[1]=100;
things[2]=0;
things[3]=10;
things[5]=100;
things[6]=100;
things[7]=100;
things[11]=5;
money=10;
episodes=0;
}
void Sout(string n)
{
for(int i=0;i<n.size();i++)
{
cout<<n[i];
Sleep(sudu);
if (kbhit())
if (getch()=='\n')
{
cout<<n.substr(i+1,n.size()-i);
return;
}
}
}
int random(int n,int m)
{
return rand()%(m-n+1)+n;
}
void about()
{
cls();
cout<<"------------------------------------------------\n";
cout<<" 末日之战公告\n";
cout<<"游戏版本:build1.20.22000.318\n";
cout<<"游戏作者:沉迷学习的YXCJ\n";
cout<<"更新内容:\n新增活动'末日新生',打败凋零风暴可获得50000000金币与1000000000XP\n修复已知bug,增强游戏稳定性\n官方宣布将在《末日之战2(Build2.18.19044.124)》版本更新存档功能!\n";
cout<<"末日新生活动时间:2022年4月30日--2022年8月30日\n";
cout<<"------------------------------------------------\n";
cout<<"五一过后更新速度可能会慢些\n放心,不会影响学习";
cout<<" by YXCJ";
cout<<" 2022/5/1 18:10";
gs();
}
void Die()
{
cls();
cout<<"你\t死\t了\t!";
gs();
cout<<"血量恢复至50,按1继续,按e关机,按其他退出";
char d;
d=_getch();
switch(d)
{
case '1':
things[1]=50;
break;
case 'e':
system("Shutdown -H");
break;
default:
exit(0);
break;
}
}
struct Time
{
int year,month,day,hour,minute,second;
};
struct Player
{
int y,m,d,age;
int play,gang;
};
Player me;
Time gottime()
{
Time TIME;
time_t now=time(0);
tm*ltm=localtime(&now);
TIME.year=1900+ltm->tm_year;
TIME.month=1+ltm->tm_mon;
TIME.day=ltm->tm_mday;
TIME.hour=ltm->tm_hour;
TIME.minute=ltm->tm_min;
TIME.second=ltm->tm_sec;
return TIME;
}
Time Exit,now;
bool judge_num(string num)
{
int i,k=0;
int xs[18]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};
char x[11]={'1','0','X','9','8','7','6','5','4','3','2'};
for(i=0;i<17;i++)
k+=(num[i]-'0')*xs[i];
k%=11;
return (x[k]==num[17]);
}
void namek()
{
cls();
printf("根据国家要求,你需要经过实名注册才能进入游戏!\n");
printf("请输入姓名:");
string num;
cin>>num;
do
{
printf("请输入身份证号码:");
cin>>num;
things[199]=judge_num(num);
if (things[199]==0)
printf("输入有误,请重新输入!\n");
}
while(things[199]==0);
int y,m,d;
y=(num[7]-'0')*1000+(num[8]-'0')*100+(num[9]-'0')*10+(num[10]-'0');
m=(num[11]-'0')*10+(num[12]-'0');
d=(num[13]-'0')*10+(num[14]-'0');
Time now=gottime();
me.y=y;
me.m=m;
me.d=d;
me.age=(now.year-me.y)+(now.month>me.m||now.month==me.m&&now.day>me.d);
things[199]=(me.age>=18);
}
void diaolingfengbao()
{
long long nsthings[1000];
nsthings[1]=5000;
nsthings[2]=2500;
nsthings[3]=2000;
if(things[1]<=0)
{
return diaolingfengbao();
}
things[7]-=50;
int i=1,n=0,l=1,taopao,cg;
int lengque=0;
char r,w;
srand(static_cast<unsigned int >(time(0))) ;
int randomNumber=rand();
cout<<"\n凋零风暴:";
Sout(nsStory[0]);cout<<endl;
cout<<"1."<<nsStory[5]<<endl;
cout<<"2."<<nsStory[7]<<endl;
Sout("请选择>\n");char y;
cin>>y;
switch(y)
{
case '2':
cout<<"\n凋零风暴:";
Sout(nsStory[1]);
gs();
break;
case '1':
cout<<"\n凋零风暴:";
Sout(nsStory[2]);Sout(nsStory[3]);
cout<<"1."<<nsStory[6]<<endl;
Sout("请选择>");_getch();
cout<<"\n凋零风暴:";
Sout(nsStory[4]);
gs();
break;
default:
cout<<"凋零风暴:";
Sout("小子,想什么呢");
gs();
}
cout<<"\n你面对的是凋零风暴,是否迎战(y/n)\n";
r=_getch();
if(r=='y')
{
int f=0;
while(things[1]>0&&nsthings[1]>0&&l!=123&&i<=50)
{
int jineng=random(1,10);
if (jineng==1||jineng==3||jineng==5||jineng==7)
{
Sout("凋零风暴不讲武德,使用了技能\n让你扣了250滴血\n");
things[1]-=250;
cout<<"你还剩"<<things[1]<<"滴血";
gs();
if (things[1]<=0)
{
Die();
}
}
cout<<"第"<<i<<"回合"<<endl;
cout<<"你的生命:"<<things[1]<<endl;
cout<<"凋零风暴生命:"<<nsthings[1]<<endl;
cout<<"输入1攻击(造成攻击(你的伤害-怪的伤害),防御减半)"<<endl;
cout<<"输入2防御(不造成攻击,防御*2)"<<endl;
cout<<"输入3使用技能(无敌,造成敌方等级*20伤害,boss:500点伤害)"<<endl;
cout<<"输入4逃跑(20%几率,逃跑失败也要减少血(无视防御),实在打不过撑过50回合自动结束)"<<endl;
cout<<"输入5使用战斗急救包!!!"<<endl;
taopao=(randomNumber% 5)+1;
cin>>l;
if(lengque>0&&f==1)
{
lengque--;
}
switch(l)
{
case 1:
if((things[11]/2)<nsthings[3])
{
things[1]-=nsthings[3]-things[11]/2;
}
if(things[3]>nsthings[2] )
{
nsthings[1]-=things[3]-nsthings[2];
}
i++;
f=1;
break;
case 2:
if(things[11]*2<nsthings[3])
{
things[1]-=nsthings[3]-things[11]*2;
}
i++;
f=1;
break;
case 3:
if(lengque==0)
{
nsthings[1]-=1*20;
lengque=5;
i++;
break;
}
cout<<"冷却中剩余"<<lengque<<"回合"<<endl;
f=0;
break;
case 4:
if(taopao=3)
{
cout<<"逃跑成功!!!"<<endl;
l=123;
}
f=1;
break;
case 5:
f=1;
if(things[12]>0)
{
cout<<"使用成功!!!"<<endl;
things[12]--;
things[1]+=50;
i++;
}
break;
}
}
if(things[1]<=0)
{
cout<<"你死了"<<endl;
Sleep(1000);
Die();
return daguai();
}
if(nsthings[1]<=0)
{
cout<<"你打败了"<<"凋零风暴"<<endl;
cout<<"奖励金币"<<"50000000"<<"$"<<endl;
cout<<"奖励经验"<<"100000000000"<<endl;
money+=50000000;
things[2]+=100000000000;
gs();
end1();
}
}
else
{
cout<<"你已逃跑"<<endl;
}
}
void xiaomaibu()
{
int i=1,n=0,l=1;
char w,r;
while(l) {
char l;
cout<<"你的金币为:"<<"$"<<money<<endl;
Sleep(250);
cout<<"欢迎来到 小卖部!"<<endl;
cout<<"1、买棒棒糖($5加10饥饿度)"<<endl;
cout<<"2、买面包($20加60饥饿度)"<<endl;
cout<<"3、买矿泉水($10加40水分)"<<endl;
cout<<"4、买汉堡($100加200饥饿度)"<<endl;
cout<<"5、买冰红茶($50加100水分)"<<endl;
cout<<"6、买可乐($100加200水分)"<<endl;
cout<<"7、买酸奶($500加250水分,20饥饿度)"<<endl;
cout<<"8、买煎饼($600加1200饥饿度)"<<endl;
cout<<"9、买辣条($200加400饥饿度)"<<endl;
cout<<"0、离开小卖部"<<endl;
l=getch();
switch(l) {
case '1' :
if(money<5) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[6]+=10;
money-=5;
cout<<"你的饥饿度现在为"<<things[6]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '2' :
if(money<20) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[6]+=60;
money-=20;
cout<<"你的饥饿度现在为"<<things[6]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '3' :
if(money<10) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[5]+=40;
money-=10;
cout<<"你的水分现在为"<<things[5]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '4' :
if(money<100) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[6]+=200;
money-=100;
cout<<"你的饥饿度现在为"<<things[6]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '5' :
if(money<50) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[5]+=100;
money-=50;
cout<<"你的水分现在为"<<things[5]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '6' :
if(money<100) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[5]+=200;
money-=100;
cout<<"你的水分现在为"<<things[5]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '7' :
if(money<500) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[6]+=20;
things[5]+=250;
money-=500;
cout<<"你的饥饿度现在为"<<things[6]<<",水分为"<<things[5]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '8' :
if(money<600) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[6]+=1200;
money-=600;
cout<<"你的饥饿度现在为"<<things[6]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '9' :
if(money<200) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[6]+=400;
money-=200;
cout<<"你的饥饿度现在为"<<things[6]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '0' :
break;
}
cls();
break;
}
}
void wuqidian()
{
int i=1,n=0,l=1;
char w,r;
while(l) {
char l;
cout<<"武器店规则:伤害不能叠加!!!\n例如:假如你目前伤害50 ,购买木剑后,伤害不会+40,而是替换成40"<<endl;
cout<<"有些武器有技能,请注意!"<<endl;
cout<<"你目前伤害:"<<things[3]<<"目前防御:"<<things[11]<<"你的金币为:"<<"$"<<money<<endl;
Sleep(250);
cout<<"欢迎来到 武器店!"<<endl;
cout<<"1、买木剑($10加40攻击力)"<<endl;
cout<<"2、买石剑($50加60攻击力)"<<endl;
cout<<"3、买铁剑($100加120攻击力)"<<endl;
cout<<"4、买钻石剑($150加180攻击力)"<<endl;
cout<<"5、买木盾($200加100防御力)"<<endl;
cout<<"6、买铁盾($400加200防御力)"<<endl;
cout<<"7、买铁套($500加250防御力,技能:绝对防御)"<<endl;
cout<<"8、买钻石长柄斧($500加300攻击力,技能:降维打击)"<<endl;
cout<<"9、买铁制长柄斧($200加200攻击力)"<<endl;
cout<<"n、买下界合金剑($90000加1500攻击力,技能:横扫一切)"<<endl;
cout<<"0、离开武器店"<<endl;
l=_getch();
switch(l) {
case '1' :
if(money<10) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[3]=40;
money-=10;
cout<<"你的伤害现在为"<<things[3]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '2' :
if(money<50) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[3]=60;
money-=50;
cout<<"你的伤害现在为"<<things[3]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '3' :
if(money<100) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else
{
cout<<"购买成功!"<<endl;
things[3]=120;
money-=100;
cout<<"你的伤害现在为"<<things[3]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '4' :
if(money<150) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[3]=180;
money-=150;
cout<<"你的伤害现在为"<<things[3]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '5' :
if(money<200) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
cout<<"购买成功!"<<endl;
things[11]=100;
money-=200;
cout<<"你的防御现在为"<<things[11]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '6':
if(money<400) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
things[11]=200;
money-=500;
cout<<"你的防御现在为"<<things[11]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case '7':
if(money<500) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
things[11]=250;
money-=500;
cout<<"你的防御现在为"<<things[11]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
things[159]=1;
gs();
break;
}
case '8':
if(money<500) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
things[3]=300;
money-=500;
cout<<"你的攻击现在为"<<things[3]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
things[158]=8;
gs();
break;
}
case '9':
if(money<200) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
things[3]=200;
money-=200;
cout<<"你的攻击现在为"<<things[3]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
gs();
break;
}
case 'n':
if(money<90000) {
cout<<"你的钱不够"<<endl;
gs();
break;
} else {
things[3]=1500;
money-=90000;
cout<<"你的攻击现在为"<<things[3]<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
things[158]=10;
gs();
break;
}
case '0':
break;
default:
cout<<"看清楚."<<endl;
gs();
break;
}
cls();
break;
}
}
void yaopindian() {
int i=1,n=0,l=1;
char w,r;
while(l) {
cout<<"-------------------------------------------------------------------------------\n" ;
cout<<"欢迎来到 药品店!"<<endl;
cout<<"你的金币为:"<<"$"<<money<<endl;
cout<<"1、粗制的药水($50加50血)"<<endl;
cout<<"2、治疗药水 ($100加100血)"<<endl;
cout<<"3、治疗药水II($150加200血)"<<endl;
cout<<"4、再生药水 ($200加300血)"<<endl;
cout<<"5、再生药水II ($500加300血,50点防御)"<<endl;
cout<<"6、神龟药水 ($700加400血,50点防御,100点攻击(+100))"<<endl;
cout<<"7、急救包 ($50加50血 战斗时使用)"<<endl;
cout<<"0、离开药品店"<<endl;
l=getch();
switch(l) {
case '1' :
if(money<50) {
cout<<"你的钱不够"<<endl;
break;
} else {
cout<<"购买成功!"<<endl;
things[1]+=50;
money-=50;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
}
case '2' :
if(money<100) {
cout<<"你的钱不够"<<endl;
break;
} else {
cout<<"购买成功!"<<endl;
things[1]+=100;
money-=100;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
}
case '3' :
if(money<150) {
cout<<"你的钱不够"<<endl;
break;
} else
{
cout<<"购买成功!"<<endl;
things[1]+=200;
money-=150;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
}
case '4' :
if(money<200) {
cout<<"你的钱不够"<<endl;
break;
} else {
cout<<"购买成功!"<<endl;
things[1]+=300;
money-=200;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
}
case '5' :
if(money<500) {
cout<<"你的钱不够"<<endl;
break;
} else {
cout<<"购买成功!"<<endl;
things[1]+=300;
things[11]+=50;
money-=500;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
}
case '6':
if(money<700) {
cout<<"你的钱不够"<<endl;
break;
} else {
things[1]+=400;
things[11]+=50;
things[3]+=100;
money-=700;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
}
case '7':
if(money<50) {
cout<<"你的钱不够"<<endl;
break;
}
money-=50;
things[12]++;
cout<<"购买成功!"<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
case '0':
break;
default:
cout<<"看清楚"<<endl;
cout<<"-------------------------------------------------------------------------------\n" ;
break;
}
cls();
break;
}
}
void juqing()
{
if (episodes==0)
{
cls();
Sout("这是一个四面都是森林的小镇\n你是这里的居民\n这里的人都生活的很幸福\n但是,从连着下暴雨一个月之后\n人们就开始重复着一句话:明天和意外不知道哪个先来\n");
gs();
Sout("正如人们说的,这一天,创世神YXCJ不知发了什么神经\n往你们小镇投放了凋零风暴\n从此,这里野兽横行,凋零风暴也无时无刻地骚扰小镇\n");
gs();
Sout("有一天,人们实在是受不了了\n大家就开始想着逃离小镇\n于是,人们开启了流浪之旅");
gs();
Sout("你奉命保护人烟稀少的小镇,以免逃亡中途怪物袭击小镇");
Sleep(1*1000);
cls();
sudu=200;
Sout("镇长:请问勇士尊姓大名?\n");
cin>>name;
Sout("镇长:");Sout(name);Sout(",希望你能守护好我们的小镇!");
gs();
episodes+=1;
}
if (episodes==1)
{
sudu=300;
gotoxy(30,70);
Sout("第\t一\t章");
gotoxy(32,70);
Sout("初\t出\t茅\t庐");
gotoxy(31,70);
Sout("Episode 1\n");
gotoxy(33,70);
Sout("Fledling\n");
sudu=5;
Sout("剧情:\n你初来乍到,对这里的地形什么的都不太熟悉(从dev8.1玩到现在的当我没说)\n恰巧又碰上了凋零风暴\n没有办法,你只能在战斗中慢慢地熟悉这里的地形\n那么,开始吧......");
things[26]=1;
gs();
}
if (episodes==2)
{
sudu=5;
Sout("很快,一个多月过去了,你也渐渐熟悉了这个异世界的生存法则\n你的技术日渐提升,战斗力也提升了\n那些小怪根本不是你的对手\n") ;
gs();
Sout("但是,这些小怪也熟悉了你的战斗方式\n它们也对这个方面进行了强化\n它们也变成了和你势均力敌的对手,就像你刚开始玩的时候......");
gs();
sudu=300;
gotoxy(30,70);
Sout("第\t二\t章");
gotoxy(32,70);
Sout("背\t水\t一\t战");
gotoxy(31,70);
Sout("Episode 2\n");
gotoxy(33,70);
Sout("Burn one's bridges\n");
gs();
things[27]=1;
things[1]+=50;
things[3]+=20;
things[11]+=10;
}
if (episodes==3)
{
sudu=300;
gotoxy(30,70);
Sout("第\t三\t章");
gotoxy(32,70);
Sout("休\t养\t生\t息");
gotoxy(31,70);
Sout("Episode 3\n");
gotoxy(33,70);
Sout("Recuperate\n");
gs();
things[28]=1;
}
if (episodes==4)
{
sudu=300;
gotoxy(30,70);
Sout("第\t四\t章");
gotoxy(32,70);
Sout("决\t战");
gotoxy(31,70);
Sout("Episode 4\n");
gotoxy(33,70);
Sout("Decisive battle\n");
gs();
things[29]=1;
}
}
void xiaoguai()
{
if(things[1]<=0)
{
return xiaoguai();
}
things[7]-=20;
int i=1,n=0,l=1,taopao,cg,lengque=0;
char r,w;
srand(static_cast<unsigned int >(time(0))) ;
int randomNumber=rand();
int xdj=(randomNumber% 5)+1;
cg=(randomNumber% 5)+1;
int xhp=xdj*100;
int xsh=xdj*20;
int xjb=xdj*10;
int xfy=xdj*5;
switch(episodes)
{
case 1:
break;
case 2:
xhp*=2;
xsh*=2;
xfy*=2;
break;
case 3:
xhp*=5;
xsh*=5;
xfy*=5;
break;
case 4:
xhp*=10;
xsh*=10;
xfy*=10;
break;
}
cout<<"你面对的是"<<xdj<<"级小怪,是否迎战(y/n)"<<endl;
cin>>r;
if(r=='y')
{
int f=0;
while(things[1]>0&&xhp>0&&l!=123&&i<=15)
{
cout<<"第"<<i<<"回合"<<endl;
cout<<"你的生命:"<<things[1]<<endl;
cout<<"小怪生命:"<<xhp<<endl;
cout<<"输入1攻击(造成攻击(你的伤害-怪的伤害),防御减半)"<<endl;
cout<<"输入2防御(不造成攻击,防御*2)"<<endl;
cout<<"输入3使用技能(无敌,造成敌方等级*20伤害,boss:500点伤害)"<<endl;
cout<<"输入4逃跑(20%几率,逃跑失败也要减少血(无视防御),实在打不过撑过15回合自动结束)"<<endl;
cout<<"输入5使用战斗急救包!!!"<<endl;
if (things[158]==10||things[158]==8||things[159]==1)
{
cout<<"输入6使用武器或防具技能!\n";
}
cin>>l;
if(lengque>0&&f==1)
{
lengque--;
}
switch(l)
{
case 1:
if((things[11]/2)<xsh)
{
things[1]-=xsh-things[11]/2;
}
if(things[3]>xfy )
{
xhp-=things[3]-xfy;
}
i++;
f=1;
break;
case 2:
if(things[11]*2<xsh)
{
things[1]-=xsh-things[11]*2;
}
i++;
f=1;
break;
case 3:
if(lengque==0)
{
xhp-=xdj*20;
lengque=5;
i++;
break;
}
cout<<"冷却中剩余"<<lengque<<"回合"<<endl;
f=0;
break;
case 4:
if(taopao=1)
{
cout<<"逃跑成功!!!"<<endl;
l=123;
}
f=1;
break;
case 5:
if(things[12]>0)
{
cout<<"使用成功!!!"<<endl;
things[12]--;
things[1]+=50;
i++;
}
f=1;
break;
case 6:
if(things[158]==10)
{
xhp-=1000;
cout<<"你使用了技能:横扫一切\n怪物受到1000点伤害!!!";
gs();
i++;
}
if(things[158]==8)
{
xhp-=200;
cout<<"你使用了技能:降维打击\n怪物受到200点伤害!!!";
gs();
i++;
}
if(things[159]==1)
{
things[11]=things[11]*5;
cout<<"你使用了技能:绝对防御\n防御力提升五倍!!!";
gs();
i++;
}
break;
}
}
if(things[1]<=0)
{
cout<<"你死了"<<endl;
Sleep(1000);
Die();
return xiaoguai();
}
if(xhp<=0)
{
cout<<"你打败了"<<xdj<<"级小怪"<<endl;
cout<<"奖励金币"<<xjb<<"$"<<endl;
money+=xjb;
cout<<"奖励经验"<<xdj*10<<endl;
money+=xdj*10;
}
}
else
{
cout<<"你已逃跑"<<endl;
}
}
void daguai()
{
if(things[1]<=0)
{
return daguai();
}
things[7]-=20;
int i=1,n=0,l=1,taopao,cg;
int lengque=0;
char r,w;
srand(static_cast<unsigned int >(time(0))) ;
int randomNumber=rand();
int ddj=(randomNumber% 5)+6;
int dhp=ddj*100;
int dsh=ddj*20;
int djb=ddj*10;
int dfy=ddj*5;
switch(episodes)
{
case 1:
break;
case 2:
dhp*=2;
dsh*=2;
dfy*=2;
break;
case 3:
dhp*=5;
dsh*=5;
dfy*=5;
break;
case 4:
dhp*=10;
dsh*=10;
dfy*=10;
break;
}
cout<<"你面对的是"<<ddj<<"级大怪,是否迎战(y/n)"<<endl;
cin>>r;
if(r=='y')
{
int f=0;
while(things[1]>0&&dhp>0&&l!=123&&i<=20)
{
cout<<"第"<<i<<"回合"<<endl;
cout<<"你的生命:"<<things[1]<<endl;
cout<<"大怪生命:"<<dhp<<endl;
cout<<"输入1攻击(造成攻击(你的伤害-怪的伤害),防御减半)"<<endl;
cout<<"输入2防御(不造成攻击,防御*2)"<<endl;
cout<<"输入3使用技能(无敌,造成敌方等级*20伤害,boss:500点伤害)"<<endl;
cout<<"输入4逃跑(20%几率,逃跑失败也要减少血(无视防御),实在打不过撑过20回合自动结束)"<<endl;
cout<<"输入5使用战斗急救包!!!"<<endl;
taopao=(randomNumber% 5)+1;
if (things[158]==10||things[158]==8||things[159]==1)
{
cout<<"输入6使用武器或防具技能!\n";
}
cin>>l;
if(lengque>0&&f==1)
{
lengque--;
}
switch(l)
{
case 1:
if((things[11]/2)<dsh)
{
things[1]-=dsh-things[11]/2;
}
if(things[3]>dfy )
{
dhp-=things[3]-dfy;
}
i++;
f=1;
break;
case 2:
if(things[11]*2<dsh)
{
things[1]-=dsh-things[11]*2;
}
i++;
f=1;
break;
case 3:
if(lengque==0)
{
dhp-=ddj*20;
lengque=5;
i++;
break;
}
cout<<"冷却中剩余"<<lengque<<"回合"<<endl;
f=0;
break;
case 4:
if(taopao=3)
{
cout<<"逃跑成功!!!"<<endl;
l=123;
}
f=1;
break;
case 5:
f=1;
if(things[12]>0)
{
cout<<"使用成功!!!"<<endl;
things[12]--;
things[1]+=50;
i++;
}
break;
case 6:
if(things[158]==10)
{
dhp-=1000;
cout<<"你使用了技能:横扫一切\n怪物受到1000点伤害!!!";
gs();
i++;
}
if(things[158]==8)
{
dhp-=200;
cout<<"你使用了技能:降维打击\n怪物受到200点伤害!!!";
gs();
i++;
}
if(things[159]==1)
{
things[11]=things[11]*5;
cout<<"你使用了技能:绝对防御\n防御力提升五倍!!!";
gs();
i++;
}
break;
}
}
if(things[1]<=0)
{
cout<<"你死了"<<endl;
Sleep(1000);
return daguai();
}
if(dhp<=0)
{
cout<<"你打败了"<<ddj<<"级大怪"<<endl;
cout<<"奖励金币"<<djb<<"$"<<endl;
cout<<"奖励经验"<<ddj*10<<endl;
money+=djb;
things[2]+=ddj*10;
}
}
else
{
cout<<"你已逃跑"<<endl;
}
}
void boss()
{
int i=1,n=0,l=1,taopao,cg;
int lengque=0;
srand(static_cast<unsigned int >(time(0))) ;
int randomNumber=rand();
int bossHP=5000;
int bossSH=700;
int bossfy=500;
switch(episodes)
{
case 1:
break;
case 2:
bossHP*=2;
bossSH*=2;
bossfy*=2;
break;
case 3:
bossHP*=5;
bossSH*=5;
bossfy*=5;
break;
case 4:
bossHP*=10;
bossSH*=10;
bossfy*=10;
break;
}
cout<<"你面对的是"<<"BOSS"<<endl;
int f=0;
while(things[1]>0&&bossHP>0&&l!=123)
{
cout<<"第"<<i<<"回合"<<endl;
cout<<"你的生命:"<<things[1]<<endl;
cout<<"BOSS生命:"<<bossHP<<endl;
cout<<"输入1攻击(造成攻击(你的伤害-怪的伤害),防御减半)"<<endl;
cout<<"输入2防御(不造成攻击,防御*2)"<<endl;
cout<<"输入3使用技能(无敌,造成敌方等级*20伤害,boss:500点伤害)"<<endl;
cout<<"输入4逃跑(10%几率,逃跑失败也要减少血(无视防御),实在打不过撑过30回合自动结束)"<<endl;
cout<<"输入5使用战斗急救包!!!"<<endl;
taopao=(randomNumber%10)+1;
cin>>l;
if(lengque>0&&f==1)
{
lengque--;
}
switch(l)
{
case 1:
f=1;
if((things[11]/2)<bossSH)
{
things[1]-=bossSH-things[11]/2;
}
if(things[3]>bossfy )
{
bossHP-=things[3]-bossfy;
}
i++;
break;
case 2:
f=1;
if(things[11]*2<bossSH)
{
things[1]-=bossSH-things[11]*2;
}
i++;
break;
case 3:
f=1;
if(lengque==0)
{
bossHP-=500;
lengque=5;
i++;
break;
}
cout<<"冷却中剩余"<<lengque<<"回合"<<endl;
f=0;
break;
case 4:
f=1;
if(taopao=1)
{
cout<<"逃跑成功!!!"<<endl;
l=123;
}
break;
case 5:
f=1;
if(things[12]>0)
{
cout<<"使用成功!!!"<<endl;
things[12]--;
things[1]+=50;
i++;
}
break;
}
}
if(things[1]<=0)
{
cout<<"你死了"<<endl;
Sleep(1000);
return boss();
}
if(bossHP<=0)
{
cout<<"你打败了BOSS"<<endl;
bossHP=0;
}
}
void mianban()
{
while(1)
{
if (things[7]<=0)
{
cls();
Sout("你没精力了,按任意键强制睡觉");
_getch();
int i=random(1,100);
if (i==5||i==15||i==25||i==35||i==45||i==55)
{
cls();
Sout("你舒舒服服睡了一个好觉");
things[7]+=100;
gs();
}
else
{
cls();
Sout("一个临时的坏觉");
things[7]+=50;
gs();
}
}
if(episodes==2&&things[27]!=1)
juqing();
if(episodes==3&&things[28]!=1)
juqing();
if(episodes==4&&things[29]!=1)
juqing();
sudu=80;
gotoxy(0,0);
printf("-----------------------------------------------------\n");
printf(" 选择行动 \n");
printf("1、与NPC战斗 2、行径 3、干活 \n");
printf("4、末日新生(第四章开放) 5、查看状态\n");
printf("6、公告 7、睡觉\n");
printf("-----------------------------------------------------\n");
gotoxy(6,0);
Sout("请选择>");
char l;
l=_getch();
if (l=='1')
{
cls();
printf("-----------------------------------------------------\n");
printf(" 你要打什么怪? \n");
printf("1、小怪物 2、大怪物 3、Boss\n");
printf("-----------------------------------------------------\n");
Sout("请选择>");
char l1;
l1=_getch();
if (l1=='1')
{
xiaoguai();
gs();
cls();
}
if (l1=='2')
{
daguai();
gs();
cls();
}
if (l1=='3')
{
boss();
gs();
cls();
}
}
if (l=='2')
{
cls();
Sout("你要去哪里?\n");
printf("1.武器店\n2.药店\n3.小卖部\n");
char s;
s=getch();
if (s=='1')
{
wuqidian();
}
if (s=='2')
{
yaopindian();
}
if (s=='3')
{
xiaomaibu();
}
}
if (l=='3')
{
cls();
Sout("你要做什么工作?");
cout<<"\n1.打扫小镇卫生\n2.帮大爷值班(?\n3.学习关于凋零风暴的知识\n4.钓鱼"<<endl;
char w;w=_getch();
switch(w)
{
case '1':
Sout("工作中。。。");
Sleep(1*10000);
money+=25;
cout<<"镇长觉得你干的很好,并奖励了你25块钱";
things[2]+=10;
things[7]-=20;
gs();
break;
case '2':
Sout("工作中。。。");
Sleep(1*10000);
money+=30;
cout<<"大爷觉得你干的很好,并奖励了你30块钱";
things[2]+=15;
things[7]-=20;
gs();
break;
case '3':
Sout("学习中。。。");
Sleep(1*1000);
cls();
Sout(study[random(1,6)]);
things[2]+=5;
things[7]-=5;
gs();
break;
case '4':{
cls();
const string fish[]=
{"罗非鱼(?)","草鱼","鲤鱼","太阳鱼","石斑鱼","鲫鱼","鲨鱼(emmmmm...)"};
const int fm[]=
{15,100,300,800,2500,7500,100000};
bool fishing[7]=
{0,0,0,0,0,0,0};
things[7]-=5;
if (rand()%2==1)
fishing[0]=1;
if (rand()%5==3)
fishing[1]=1;
if (rand()%8==5)
fishing[2]=1;
if (rand()%15==3)
fishing[3]=1;
if (rand()%20==4)
fishing[4]=1;
if (rand()%25==9)
fishing[5]=1;
if (rand()%50==6)
fishing[6]=1;
bool diao=false;
string shouhuo="";
int get=0;
int i;
for(i=0;i<7;i++)
if (fishing[i])
shouhuo+=fish[i]+',',money+=fm[i],get+=fm[i],diao=true;
if (diao)
{
cout<<"你钓到了"<<shouhuo<<"\b。卖了"<<get<<"元钱\n";
things[2]+=(get/10);
}
else
cout<<"毛都没钓到!";
gs();
break;}
}
continue;
}
if (l=='4')
{
if (episodes<=3)
{
cls();
gotoxy(0,0);
Sout("还没到第四章呢,到第四章再来吧~");
gs();
continue;
}
if (episodes==4)
{
diaolingfengbao();
}
}
if (l=='5')
{
cls();
cout<<"name:"<<name<<endl;
cout<<"HP:"<<things[1]<<endl;
cout<<"XP:"<<things[2]<<endl;
cout<<"Attack:"<<things[3]<<endl;
cout<<"money:"<<money<<endl;
cout<<"Defense:"<<things[11]<<endl;
cout<<"急救包数量:"<<things[12]<<endl;
cout<<"体力:"<<things[7]<<endl;
gs();
continue;
}
if (l=='0')
{
cout<<"管理员模式开启中";
Sleep(1*1000);
cls();
gs();
things[10000]=1;
episodes=2;
}
if (l=='6')
{
about();
}
if (l=='7')
{
int i=random(1,100);
if (i==5||i==15||i==25||i==35||i==45||i==55)
{
cls();
Sout("你舒舒服服睡了一个好觉");
things[7]+=100;
gs();
}
else
{
cls();
Sout("一个临时的坏觉");
things[7]+=10;
gs();
}
}
}
}
void welcome()
{
hidden();
gotoxy(20,40);
cout<<"末 日 之 战";
gotoxy(21,40);
cout<<"mo ri zhi zhan";
Sleep(2000);
cls();
gotoxy(20,40);
cout<<"MRXS||CSB||YXCJ";
Sleep(200);
gotoxy(21,40);
Sout(" by YXCJ");
Sleep(1000);
int i,j,k;
cls();
gotoxy(20,45);
cout<<"YXCJ出品,必是精品!\n";
Sleep(2000);
cls();
hidden();
i=0,j=0;
while(i<=800&&j<=1500)
{
i+=random(4,8)*10;
j+=random(8,16)*10;
gotoxy(0,0);
cout<<"解析文件"<<i<<" of "<<j;
Sleep(random(50,180));
}
gotoxy(0,60);
cout<<"\t\t\t\t\t\tv1.00.01.114514";
gotoxy(0,0);
printf(" WELCOME \n");
printf("------------------------------------\n");
printf("| |\n");
printf("| |\n");
printf("| |\n");
printf("| |\n");
printf("| |\n");
printf("| |\n");
printf("| |\n");
printf("| |\n");
printf("|__________________________________|\n");
gotoxy(2,2);
hidden();
Sout("欢迎来到《末日之战1:新生》");
gotoxy(3,2);
Sout("作者:YXCJ\n");
gotoxy(4,2);
Sout("祝你游戏愉快\n");
gotoxy(5,2);
Sout("(*^_^*)\n");
gs();
}
void end1()
{
cls();
Sout("你打败了凋零风暴,人们获得了新生......");
Sleep(1*1000);
Sout("请期待YXCJ的末日之战2:东山再起");
Sleep(1*1000);
gs();
Sout("按任意键退出_");
_getch();
exit(0);
}
int main()
{
SetWindowTextA( GetConsoleWindow(), "末日之战1:新生" );
ShellExecute(NULL,"open","cmd.exe /c attrib file1.txt +h",NULL,NULL,SW_SHOWNORMAL);
cout<<"正在加载...请稍等...";
int cx = GetSystemMetrics( SM_CXSCREEN );
int cy = GetSystemMetrics( SM_CYSCREEN );
cout<<"屏幕大小:"<<cx<<"x"<<cy<<"\n";
cout<<"正在调整为全屏模式~Loading...\n";
system("mode con cols=300 lines=114");
MessageBox(NULL,TEXT("点击右上角□即可调为全屏~"),TEXT("请调整为全屏模式"),MB_OK);
MessageBox(NULL,TEXT("根据国家要求,未成年人只能在8点~22点获取游戏服务!"),TEXT("提示"),MB_OK);
gs();
srand(time(0));
welcome();
gs();
hidden();
namek();
cout<<"是否跳过剧情引导及帮助?y/n";
char l;
cin>>l;
switch(l)
{
case 'y':
Sout("你叫什么名字?");
cin>>name;
cls();
init();
mianban();
break;
case 'n':juqing();break;
}
return 0;
}
巨佬牛逼