Dear friend,
This game is created based on Dicken's Great Expectations.
To colorful the contents, I add other elements inside.
It's quite simple, but it really costs me two weeks.
Before doing it,
I didn't know how to set color, print words slowly, even use Class...
But I stuck on, and I did it.
I learned a lot, not only programming...
I decide to share it with you, it's my honor if you like it.
But at first, I need to say thanks to websites or blogs below.
Without the knowledge from them, I could do nothing.
https://blog.csdn.net/jackypigpig/article/details/53368531
https://www.luogu.org/discuss/show/30357
https://blog.csdn.net/charactr/article/details/78817779
http://tieba.baidu.com/p/4297649534
https://www.cnblogs.com/bingoyes/
And others which I cannot remember yet...
(
This game is only for sharing knowledge and programing skill.
So I used a few codes from the internet.
If you are the original author and think your copyright has been infringed.
Connect me and I'll delete the relevant part in time.
If you wanna infringe my copyright for personal interests, we'll meet in court!
)
As the time is short, it may still has bugs( or wrong English sentences).
I'd apprecia it if you could tell me!
Best thanks!
Yours,
Bingoyes.
Jan. 6th, 2019.
Now let's begin!
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#define INF 0x3f3f3f3f
#define N 500005
#define re register
#define Ii inline int
#define Il inline long long
#define Iv inline void
#define Ib inline bool
#define Id inline double
#define ll long long
#define Fill(a,b) memset(a,b,sizeof(a))
#define R(a,b,c) for(register int a=b;a<=c;++a)
#define nR(a,b,c) for(register int a=b;a>=c;--a)
#define Min(a,b) ((a)<(b)?(a):(b))
#define Max(a,b) ((a)>(b)?(a):(b))
#define Cmin(a,b) ((a)=(a)<(b)?(a):(b))
#define Cmax(a,b) ((a)=(a)>(b)?(a):(b))
#define D_e(x) printf("\n&__ %d __&\n",x)
#define D_e_Line printf("-----------------\n")
#define sleep(x) Sleep(x*500)
#define Pause() printf("Press any key to continue\n"),_getch()
#define Combat_Effectiveness(x) cout<<x.name<<"'s ",printf("Combat Effectiveness:\nAttack=%d\ndefensive=%d\nSpeed=%d\nHP=%d\n",x.attack,x.defensive,x.speed,x.HP);
#define UFFF D_e_Line,printf("This Part Is Unfinished"),D_e_Line,Pause();
using namespace std;
Ii read(){
int s=,f=;char c;
for(c=getchar();c>''||c<'';c=getchar())if(c=='-')f=-;
while(c>=''&&c<='')s=s*+(c^''),c=getchar();
return s*f;
}
Iv print(int x){
if(x<)putchar('-'),x=-x;
if(x>)print(x/);
putchar(x%^'');
}
Iv Print(string s){
int len=s.size()-;
R(i,,len)
printf("%c",s[i]),sleep(0.1);
/*
(char *p)
while(1){
if(*p!=0)
printf("%c",*p++);
else
break;
Sleep(100);
}
putchar('\n');
*/
}
struct Character{
int
attack,
defensive,
speed,
HP;
string
name;
}Philip,Magwitch;
int key;
set<string>Backpack;
Iv Init_Chapter_One(){
Backpack.insert("Wooden stick");//Note: Go to learn Trie Tree.
Philip.name="Philip";
Philip.attack=;
Philip.defensive=;
Philip.speed=;
Philip.HP=;
Magwitch.name="Magwitch";
Magwitch.attack=;
Magwitch.defensive=;
Magwitch.speed=;
Magwitch.HP=;
}
Iv View_Backpack(){
D_e_Line;
for(set<string>::iterator i=Backpack.begin();i!=Backpack.end();++i)
cout<<*i<<"\n";
D_e_Line;
/*
printf("Press 'P' to view backpack\n'C' to continue\n");
char opt;
while(cin>>opt){
if(opt=='P'||opt=='p'){
View_(),
Pause();break;
}
if(opt=='C'||opt=='c')break;
}
*/
/*
struct Aho_Corasick_Automaton{//Note: This AC automation can be used as only once.
int
ch[N][80],
val[N],
fail[N],
cnt;
void clear(){
Fill(ch,0),Fill(val,0),Fill(fail,0),index=0;
}
void insert(char *s){
int len=strlen(s),u=0;
R(i,0,len-1){
int v=s[i]-'0';
if(!ch[u][v])ch[u][v]=++cnt;
u=ch[u][v];
}
++val[u];
}
void build(){
queue<int>q;
R(i,0,26-1)//
if(ch[0][i])
fail[ch[0][i]]=0,q.push(ch[0][i]);
while(!q.empty()){
int u=q.front();q.pop();
R(i,0,26-1)
if(ch[u][i])
fail[ch[u][i]]=ch[fail[u]][i],
q.push(ch[u][i]);
else
ch[u][i]=ch[fail[u]][i];
}
}
int query(char *s){
int len=strlen(s),u=0,tot=0;
int *tmp=new int[105];
R(i,0,len-1){
u=ch[u][s[i]-'0'];
for(int j=u;j&&~val[j];j=fail[j])
tot+=val[j],tmp[j]=val[j],val[j]=-1;
}
R(i,0,len-1){
u=ch[u][s[i]-'0'];
for(int j=u;j;j=fail[j])
val[j]=tmp[j];
}
delete []tmp;
return tot;
}
bool exist(char *s){
int len=strlen(s),u=0,flag=0;
int *tmp=new int[105];
R(i,0,len-1){
u=ch[u][s[i]-'0'];
for(int j=u;j&&~val[j];j=fail[j]){
flag+=val[j],tmp[j]=val[j],val[j]=-1;
if(flag)
break;
}
}
R(i,0,len-1){
u=ch[u][s[i]-'0'];
for(int j=u;j;j=fail[j])
val[j]=tmp[j];
}
delete []tmp;
return flag;
}
};
*/
}
Ii Fight(Character A,Character B){
system("color 4E");
srand((unsigned)(time(NULL)));
int HP_one=A.HP,HP_two=A.HP,round=;
while(A.HP>&&B.HP>){
if(round&){//A's turn
bool dodge=(B.speed-A.speed>=rand());
if(dodge){
printf("B Dodged\n"),
sleep();++round;continue;
}
int attack_power=(rand()-*B.defensive+A.attack)%A.attack+A.attack/;
B.HP-=attack_power;
printf("B received %d points of hurt. Residual HP= %d\n",attack_power,B.HP);
sleep();
}
else{//B's turn
bool dodge=(A.speed-B.speed>=rand());
if(dodge){
printf("A Dodged\n"),
sleep();++round;continue;
}
int attack_power=(rand()-*A.defensive+B.attack)%B.attack+B.attack/;
A.HP-=attack_power;
printf("A received %d points of hurt. Residual HP= %d\n",attack_power,A.HP);
sleep();
}
++round;
}
if(A.HP<){
printf("Fighter Two Win\n");
Cmax(A.HP,HP_one/<<),Cmax(B.HP,HP_two/<<);
return ;
}
else{
printf("Figher One Win\n");
Cmax(A.HP,HP_one/<<),Cmax(B.HP,HP_two/<<);
return ;
}
}
string str(int n1,int n2){
return string(n1,' ')+string(n2,'@');
}
Iv Show_Stick_Man(int index){
if(index==){
printf("\n");
printf(" ****\n");
printf(" * * *\n");
printf(" **** *\n");
printf("*********\n");
printf(" ***\n");
printf(" ***\n");
printf(" ***\n");
printf(" * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" **\n");
printf("\n");
return;
}
if(index==){
printf("\n");
printf(" ~~~~~~~~~~~~~~~~~\n");
printf(" ~~~~~~~~~~~~~~~~~~\n");
printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~ \n");
printf(" ***** *****\n");
printf(" * *\n");
printf(" ---- ----\n");
printf(" ^\n");
printf(" ^\n");
printf(" ^\n");
printf(" _______) \n");
printf("\n");
return;
}
if(index==){
printf("\n"),
printf("###############################\n"),
printf("###############################\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ** ###\n"),
printf("### ** ###\n"),
printf("### ** ###\n"),
printf("### ** ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("### ###\n"),
printf("###############################\n"),
printf("###############################\n"),
printf("###############################\n"),
printf("\n");
return;
}
if(index==){
string str(int,int);
cout<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<str(,)<<endl;
cout<<str(,)<<endl;
}
}
#define Print_Chapter_Slowly() printf("C"),sleep(0.2),printf("h"),sleep(0.2),printf("a"),sleep(0.2),printf("p"),sleep(0.2),printf("t"),sleep(0.2),printf("e"),sleep(0.2),printf("r"),sleep(0.2),printf(" "),sleep(0.2)
#define Cthulu_Color system("color a"),system("color b"),system("color c"),system("color d"),system("color e"),system("color f"),system("color 0"),system("color 1"),system("color 2"),system("color 3"),system("color 4"),system("color 5"),system("color 6"),system("color 7"),system("color 8"),system("color 9"),system("color ab"),system("color ac"),system("color ad"),system("color ae"),system("color af")
//Chapter One
class Chapter_One{
public:
void Use_BlackBread(Character &A){
A.attack+=,
A.defensive+=,
A.speed+=,
A.HP+=;
}
void Make_Friend_Magwitch(){
system("color 3E"),sleep();
Print("\n\tWe? What!\n"),sleep();
Print("\tAre you fucking deaf?\nHe sounds angry.\n\tAny way, I haven't eat anything for a week.\n\tGive me your bread now!\n"),sleep();
Print("\tPlease. Then he adds, and so I do.\n"),sleep();
Use_BlackBread(Magwitch);
Backpack.erase("BlackBread");
Print("\nMagwitch Used BlackBread\n");
Combat_Effectiveness(Magwitch);
D_e_Line;
Print("If I tell my sister about that day.\nShe'll surely congratulate me with a rolling pin.\n"),sleep();
Print("But believe it or not, we talked for a whole night.\n"),sleep();
Print("About life experience\n"),sleep(),
Print("About lonliness\n"),sleep(),
Print("About the peaceful winter night...\n"),sleep(4.5);
Print("Chapter One Over\n");
return;
}
void Fight_Wolf(Character A){
Character Wolf;
Wolf.attack=,
Wolf.defensive=,
Wolf.speed=,
Wolf.HP=;
Wolf.name="Wolf";
Combat_Effectiveness(Wolf);
sleep();
printf("Fighter one: "),cout<<A.name,printf("\nFighter two: Wolf\n");
sleep();
int result=Fight(A,Wolf);//Plot kill
if(result!=)
Fight_Wolf(A);
else{
Print("You Dead\n");
sleep();
system("color 5D");
Print("When life is broken like glaze, will my friends still remember me? Do I really have a friend...\n");
sleep();
Print("The End");
Pause();
exit();
}
}
// void Fight_Wolf(Character A,Character B){
// Character Wolf;
// Wolf.attack=10,
// Wolf.defensive=10,
// Wolf.speed=10000,
// Wolf.HP=100;
// Combat_Effectiveness(Wolf);
// sleep(3);
// printf("%s Watch out!!\n%s Stay by my side!!!",A.name,B.name);
// sleep(3);
// printf("Fighter one: %s and %s Fighter two: Wolf",A.name,B.name);
// Character Mars;
// Mars.attack=INF,
// Mars.defensive=INF,
// Mars.speed=100,
// Mars.HP=INF;
// Fight(Mars,Wolf);
// sleep(3);
// Make_Friend_Magwitch();
// }
void Chapter_One_Main(){
//Contents: Philip first meet Abel Magwitch in the cemetery.//Joe Gargery
Init_Chapter_One();
Print_Chapter_Slowly(),
printf("O"),sleep(0.2),
printf("n"),sleep(0.2),
printf("e\n"),sleep(0.8);
system("cls");
Print("Since I became a orphan, I usually go to the cemetery.\n");
sleep();
Print("My mom and dad sleep here.\n");
sleep();
Print("My sister raised me.\n");
sleep();
Print("She often hits me, says that I was a waste.\n");
sleep();
Print("But his husband, my only friend Joe always at my side.\nIt's him conceled from my sister, giving me this black bread.\n");
sleep();
Pause();
Backpack.insert("BlackBread");
printf("\nYou Get BlackBread\n");
Pause();
printf("Press 'P' to view backpack\n'C' to continue\n");
char opt;
while(cin>>opt){
if(opt=='P'||opt=='p'){
View_Backpack(),
Pause();break;
}
if(opt=='C'||opt=='c')break;
}
system("cls");
system("color 4E");
Print("\nSuddenly a black shadow flew through the grass\n"),sleep();
Print("What's that?\n");
printf("Choose my decision:\n");
printf("1: Go and see what it is.\n2: I'd better leave here now.\n");
while(cin>>opt){
if(opt=='')break;
else if(opt==''){
Print("I tried to run, but It's too late.\n"),sleep();
break;
}
}
Print("A dirty man, looked fierce and malicious, appeared with electronic bracelet\nGrabed my hand!\n"),sleep(),
Print("\n\tYou Fucking boy, Give me Your bread. Now!\n"),sleep();
Print("What should I do? Should I give up Joe's bread?\n"),sleep();
printf("Choose my decision-- I HAVE NO TIME!\n1:Fight with him\n2:Run\n3:Give him.\n");
while(cin>>opt){
if(opt==''){
Backpack.erase("BlackBread");
Use_BlackBread(Philip);
printf("Philip Used BlakBread\n");
Combat_Effectiveness(Philip);
sleep();
printf("Fighter 1: Philip\nFighter 2: Magwitch\n"),sleep();
int result=Fight(Philip,Magwitch);
if(result==){
Print("\nI beat him down and run to the forest\n");
system("color 3A"),sleep();
Print("Even in the coldest winter, there are still green and vitality.\n"),sleep();
printf("My HP has only %d left. So I stop\nListen to the melody of the wind\nThe snowflakes falls, dancing like an fairy.\n",Philip.HP),sleep();
Print("But why is there a little red?\n");
system("color 4E"),sleep();
Print("Oh no! That's blood.\n"),sleep();
Print("Oh Jesus, something is attacking me!\n");
Combat_Effectiveness(Philip);
Fight_Wolf(Philip);//End_1
}
else{
Print("I losed, closing my eyes to wait for death\n"),sleep();
Make_Friend_Magwitch();
}
return;
}
else if(opt==''){
Print("I'm too slow. I am caught by him and have to fight.\n"),sleep(),
printf("\nFighter one: Philip\nFighter two: Magwitch\n");
Combat_Effectiveness(Philip);sleep();
Fight(Philip,Magwitch),
Make_Friend_Magwitch();
return;
}
else if(opt==''){
Make_Friend_Magwitch();
return;
}
}
}
}Chapter_One;
//Chapter Two
class Door_2048{
private:
int mp[][],nn;
public:
void showmp(){
cout<<setw()<<"Get at least 512 points to enter the room"<<endl;
cout<<setw()<<"|-----------------------|"<<endl;
R(i,,){
cout<<setw()<<"";
R(j,,){
if(!mp[i][j])
cout<<setw()<<"|"<<setw()<<" ";
else
cout<<setw()<<"|"<<setw()<<mp[i][j];
if(j==)
cout<<setw()<<"|"<<endl,
cout<<setw()<<"|-----------------------|"<<endl;
}
}
}
void newgame(){
nn=;
R(i,,)
R(j,,)
mp[i][j]=;
srand((unsigned)time(NULL));
int m=rand()%,n=rand()%,p=rand()%,q=rand()%;
mp[m][n]=mp[p][q]=,
showmp();
}
int if2n(int x){
bool flag=;
R(n,,){
if(x==pow(,n)){
flag=;
if(n>nn)
nn=n;
return flag;
}
}
return flag;
}
int upmove(){
bool flag=;
R(j,,)
R(i,,)
if(if2n(mp[i][j]+mp[i+][j]))
mp[i][j]=mp[i][j]+mp[i+][j],
mp[i+][j]=,
flag=;
return flag;
}
int downmove(){
bool flag=;
R(j,,)
nR(i,,)
if(if2n(mp[i][j]+mp[i-][j])==)
mp[i][j]=mp[i][j]+mp[i-][j],
mp[i-][j]=,
flag=;
return flag;
}
int leftmove(){
bool flag=;
R(i,,)
R(j,,)
if(if2n(mp[i][j]+mp[i][j+])==)
mp[i][j]=mp[i][j]+mp[i][j+],
mp[i][j+]=,
flag=;
return flag;
}
int rightmove(){
bool flag=;
R(i,,)
nR(j,,)
if(if2n(mp[i][j]+mp[i][j-])==)
mp[i][j]=mp[i][j]+mp[i][j-],
mp[i][j-]=,
flag=;
return flag;
}
int testup(){
bool flag=;
R(j,,)
R(i,,)
if((if2n(mp[i][j]+mp[i+][j])==)&&mp[i+][j])
flag=;
return flag;
}
int testdown(){
bool flag=;
R(j,,)
nR(i,,)
if((if2n(mp[i][j]+mp[i-][j])==)&&mp[i-][j])
flag=;
return flag;
}
int testleft(){
bool flag=;
R(i,,)
R(j,,)
if((if2n(mp[i][j]+mp[i][j+])==)&&mp[i][j+])
flag=;
return flag;
}
int testright(){
bool flag=;
R(i,,)
nR(j,,)
if((if2n(mp[i][j]+mp[i][j-])==)&&mp[i][j-])
flag=;
return flag;
}
int mpmax(){
int maxx=mp[][];
R(i,,)
R(j,,)
if(mp[i][j]>maxx)
maxx=mp[i][j];
return maxx;
}
int win(){
bool flag=;
if(mpmax()>=)
cout<<setw()<<"You Beat Down The Door!"<<endl,
flag=;
return flag;
}
int GameOver(){
bool flag;
if(testup()+testdown()+testleft()+testright()==)
cout<<setw()<<"Geme Over!"<<endl,
flag=;
return flag;
}
void addup(){
srand((unsigned)time(NULL));
int n;
if(nn==)n=;
else n=(rand()%(nn)+);
int newnumber=pow(,n);
nR(i,,)
R(j,,)
if(!mp[i][j]){
mp[i][j]=newnumber;return;
}
}
void adddown(){
srand((unsigned)time(NULL));
int n;
if(nn==)n=;
else n=(rand()%(nn)+);
int newnumber=pow(,n);
R(i,,)
R(j,,)
if(!mp[i][j]){
mp[i][j]=newnumber;return;
}
}
void addleft(){
srand((unsigned)time(NULL));
int n;
if(nn==)n=;
else n=(rand()%(nn)+);
int newnumber=pow(,n);
nR(j,,)
R(i,,)
if(!mp[i][j]){
mp[i][j]=newnumber;return;
}
}
void addright(){
srand((unsigned)time(NULL));
int n;
if(nn==)n=;
else n=(rand()%(nn)+);
int newnumber=pow(,n);
R(j,,)
R(i,,)
if(!mp[i][j]){
mp[i][j]=newnumber;return;
}
}
int Direction(){
int ret=;
while(!ret){
int ch=getch();
if(isascii(ch))continue;
ch=getch();
switch(ch){
case :ret=;break;
case :ret=;break;
case :ret=;break;
case :ret=;break;
default:break;
}
}
return ret;
}
void Door_2048_Main(){
int points_biggest=-;
nn=;
system("color 85");
int play=,flag_win=;
while(play){
system("cls"),
newgame();
while(win()+GameOver()==){
int c=Direction();
switch(c){
case :
if(testup()){
upmove();
addup();
system("cls");
showmp();
}
break;
case :
if(testdown()){
downmove();
adddown();
system("cls");
showmp();
}
break;
case :
if(testleft()){
leftmove();
addleft();
system("cls");
showmp();
}
break;
case :
if(testright()){
rightmove();
addright();
system("cls");
showmp();
}
break;
default:
break;
}
}
int points=mpmax();
cout<<setw()<<"You Got:"<<points<<endl;
Cmax(points_biggest,points);
if(points_biggest>=){////512
flag_win=;
cout<<setw()<<"You Got The Key!"<<endl;
}
cout<<setw()<<"Try again? Input '1'. or input '0 for ending"<<endl;
cin>>play;
while(play!=&&play!=)
cout<<"Unknown Index!"<<endl,
cin>>play;
}
if(!flag_win){
Print("After so many years, as a blacksmith, I always think... What's waiting for me behind that door...\n"),sleep();
Print("But I'm old...\n"),sleep(4.5);
printf("The End\n");
Pause();
exit();
}
Backpack.insert("The Key Of Dust");
printf("You Got The Key Of Dust\n");
sleep();
printf("Input 'P' to view backpack, or 'C' to continue.\n");
char opt;
while(cin>>opt){
if(opt=='P'||opt=='p'){
View_Backpack();
Pause();break;
}
else if(opt=='C'||opt=='c')
break;
}
system("cls");
return;
}
friend class Miss_Havisham_House;
}Door_2048;
class Miss_Havisham_House{
private:
bool ReturnOldPlace;
public:
void Gate(){
system("color 0E");
Print("A pretty girl shouts to me contemptuously\n"),sleep();
Print("\n\tTownship!\n\tGet the door open by yourself.\n"),sleep(),
printf("What should I do?\n"),sleep();
printf("Choose Your Decision:\n1: Get the key of the door\n2: Ignore her and leave\n");
char opt;
while(cin>>opt)
if(opt==''||opt==''){
if(opt=='')
Print("But this is not polite.\n"),sleep();
Print("There is a note on the door, which is writed:\n"),sleep(2.5);
Print("\n\tMerciful sir, please unlock the dusty secret behind the door.\n\t2048 runners have been released!\n");
Pause();
Door_2048.Door_2048_Main();
break;
}
}
void Hall(int index){
if(index==){
system("color DE");
Print("I see Miss.Havisham now. She's as emaciated as a fowl.\n"),sleep();
Print("\tNice to meet you, my friend.\n"),sleep();
Print("\tYou must fall in love with my Estella!\nHahahahahaha...\n"),sleep(4.5);
Print("\nAfter a few time, I left.\n");
return;
}
Print("I see her again.\n"),sleep();
Print("I never forget this woman, who as emaciated as a fowl.\n"),sleep();
Print("\n\tIt's time to tell the truth, Miss.Havisham.\n"),sleep();
Print("\tWho are you! Why you give me The Key Of Dust!\n"),sleep();
Print("\n\tHave you fell in love with my Estella?\nShe smiles and then screams.\n"),sleep();
Print("\tOh~ Dear Pip, you have my husband's taste.\n\tHave you seen him? He's name is Magwitch.\n"),sleep();
R(i,,)Cthulu_Color;
Print("\n\tNo!!!!!!\nI cried out.\n"),
Print("But then I begin to understand what has happened...\n"),sleep();
return;
}
void Garden(){
Character Herbert;
Herbert.attack=;
Herbert.defensive=;
Herbert.speed=;
Herbert.HP=;
Herbert.name="Herbert";
Print("\tHey, I'm Herbert Pocket.\n\tLet's fight\n"),sleep();
Print("A boy with gentlemanly look appeared and shout.\n"),sleep();
printf("What should I do?\n");
printf("Choose my decision:\n1: Fight\n2: Run\n");
char opt;
while(cin>>opt)
if(opt==''||opt==''){
if(opt=='')
printf("You are too slow, and have too fight.\n");
break;
}
putchar('\n');
Combat_Effectiveness(Philip);
putchar('\n');
sleep();
Combat_Effectiveness(Herbert);
Pause();
printf("Fighter One:Philip\nFighter Two: Herbert\n");
int result=Fight(Philip,Herbert);
if(result==)
Print("\n\tThis is not the ending.\nHerbert shouts and runs away.\n");
else
Print("\n\tYou bastard! Do not close to my Estella!\nHerbert shouts and goes away.\n");
}
void Basement(){
if(!ReturnOldPlace){
Print("There's an old man screaming strangely.\n");
sleep();
Print("\n\tCthulhu~ Cthulhu~ Cthulhu~.\n");
printf("Choose my decision:\n1: Go to see him.\n2: I'd better leave.\n");
char opt;
while(cin>>opt)
if(opt=='')return;
else if(opt==''){
Print("\n\tOh~ Merciful sir, thanks for your kind.\n"),sleep();
Print("He suddenly runs away, leaving a book with black cover.\n"),sleep();
Backpack.insert("<<HarryPotterAndTheDeathlyHallows>>");
printf("\nYou Get <<HarryPotterAndTheDeathlyHallows>>\n");
printf("\nPress 'P' to view backpack\n'C' to continue\n");
char opt;
while(cin>>opt){
if(opt=='P'||opt=='p'){
View_Backpack(),
Pause();break;
}
if(opt=='C'||opt=='c')break;
}
ReturnOldPlace=;
return;
}
}
Print("\nCthulhu~ Cthulhu~ Cthulhu~.\n");
R(i,,)Cthulu_Color;
Print("I suddenly realized what the old man I met ten years ago said.\n");
Print("The one who is still screaming here is a Believer!\n"),sleep();
Print("!!!!!!!!!!!!!!!!\n");
Print("He sees me and walks towards me.\n"),sleep();
Print("I am so shocked that I can't move my legs.\nWill I dead?\nHere?\n"),sleep();
Print("\n\tOh~ Merciful sir~ You are our Majesty~\n\tHope the cruel god sends holy blood on you!\n"),sleep();
Print("\tMerciful sir~ Have you take our Bible?\n"),sleep();
Print("I remembered the book he offered me.\nI take it out from my backpack\n"),sleep();
Print("On the cover, there is a sentence.\nCthulu is The Savior. Do not let Light blames our Savior.\n");
Print("Oh~ loyal Believer, only Light's bood will cleanse us from sin...\n"),sleep();
Print("\n\tWhy you give me this book?\nI asked."),sleep();
Print("\n\tStop our Savior,\nStop our Crying Daughter,\nStop Havisham!\n"),sleep();
Print("\nThen he disappered again, leaving me stand still...\n"),sleep();
Print("It's clear Havisham plays an important role for today.\nBut if the Savior is Cthulu, who is the 'Crying Daughter'?\nWhat is Estella...\n"),sleep();
return;
}
void ReturnTime(){
system("color 81");
Print("Every time I look back, this house always appears in my mind.\n");
Print("No matter how far I have been, this is the start place.\n");
Print("Where I got The Dust Of Key\nWhere I met Estella...\n"),sleep();
ChooseDestination:
printf("\nWhere should I go next?\n1: Hall\n2: Garden\n");
if(ReturnOldPlace)printf("3: Basement\n");
char opt;
while(cin>>opt){
if(opt==''){
Hall();
return;
}
if(opt==''){
Print("\nThe garden is overgrown with weeds.\n"),sleep();
Print("The rock Herbert and I used to fight on has disappered.\n"),sleep();
Print("Without memories, there's nothing.\n");
goto ChooseDestination;
}
if(opt==''&&ReturnOldPlace){
Basement();
goto ChooseDestination;
}
}
}
}Havisham_House;
class Chapter_Two{
public:
void Chapter_Two_Main(){
//contents: Magwitch was arrested. Philip was invited to Miss.Havisham's house, where he met Estella.
Print_Chapter_Slowly(),
printf("T"),sleep(0.5),
printf("w"),sleep(0.5);
printf("o\n"),sleep(0.5);
system("color 58"),sleep();
Print("The next day,\nbecause of the tracker on the electronic bracelet, Magwitch was arrested...\n"),sleep();
Print("Three years passed, I have been a teenager.\n\tRobust\n\t\tIntelligent\n\t\t\tCharming\n"),sleep();
Print("But have no friend except Joe\n"),sleep();
Print("One day, he said...\n");
Show_Stick_Man();
Print("\tPip! You are visited to Miss.Havisham's house!\n"),sleep();
Print("\n\tI What?\n"),sleep();
Print("\nThe next day, I got the carriage to the Miss.Havisham's House...\n");
Pause();
system("cls");
system("color 2E"),sleep();
Print("And now here it is...\n"),
Pause();
Havisham_House.Gate();
system("cls");
printf("Where should I go next?\n"),sleep();
printf("Choose my decision:\n1: Garden\n2: Hall\n3: Baseroom\n");
char opt;
bool flag_Garden=,flag_Hall=,flag_Basement=;
while(cin>>opt){
if(opt==''){Havisham_House.Garden();flag_Garden=;break;}
else if(opt==''){Havisham_House.Hall();flag_Hall=;break;}
else if(opt==''){Havisham_House.Basement();flag_Basement=;break;}
}
sleep(1.5);
Print("It's not too late, I may go to another palce.\n"),sleep();
printf("Choose my decision:\n");
if(flag_Hall){
printf("1: Garden\n2: Basement\n3: Just leave\n");
while(cin>>opt){
if(opt==''){Havisham_House.Garden();break;}
else if(opt==''){Havisham_House.Basement();break;}
else if(opt=='')break;
}
}
if(flag_Garden){
printf("1: Basement\n2: Hall\n3: Just leave\n");
while(cin>>opt){
if(opt==''){Havisham_House.Basement();break;}
else if(opt==''){Havisham_House.Hall();break;}
else if(opt=='')break;
}
}
if(flag_Basement){
printf("1: Garden\n2: Hall\n3: Just leave\n");
while(cin>>opt){
if(opt==''){Havisham_House.Garden();break;}
else if(opt==''){Havisham_House.Hall();break;}
else if(opt=='')break;
}
}
sleep();
Print("After several years,\nI sometimes wonder what'll happen if I did not enter that house.\n"),sleep();
Print("But there's no denying that\nit's that house changed me and what happened afterwards...\n"),sleep(4.5);
Print("Chapter Two Over.\n");
return;
}
friend class Miss_Havisham_House;
}Chapter_Two;
//Chapter Three
class Tsinghua_Contest{
private:
int grades;
public:
void ExamOffice(){
grades=;
Print("I meet the chief examiner--\nMr.Jaggers, a serious and stingy old gentleman.\n"),sleep();
Print("\n\tHey idiot! You need pass at least one exam.\n"),sleep();
Print("\tTell me your choices now!\n"),sleep();
Choose_Exam();
}
void Choose_Exam(){
printf("\nChoose My Exam:\n1: Graph\n2: Math\n3: Dynamic\n4: DataStructure\n5: HighPrecision\n101: Why no LOL?\n");//Else subjects will be added later.
int opt;
while(cin>>opt){
if(opt==){Graph();break;}
if(opt==){Math();break;}
if(opt==){Dynamic();break;}
if(opt==){DataStructure();break;}
if(opt==){HighPrecision();break;}
if(opt==){Failure();return;}
}
}
void Failure(){
system("color 89"),sleep();
Print("\nMany years have gone.\n"),sleep();
Print("One day, when I was forging an iron bar.\n"),sleep();
Print("I suddenly thought, what'll happen if I passed that exam...\n"),sleep();
Print("But time waits for no man...\n"),sleep(4.5);
Print("The End\n");
Pause();
exit();
}
void Graph(){
system("start http://poj.org/problem?id=1220"),sleep();//
Print("\nI believe I have finished them all!\n"),sleep();
Show_Stick_Man();
printf("Do I wan't more?\n1: Let rain down more violent strom!\n2: I have had enough.");
char opt;
while(cin>>opt){
if(opt==''){Choose_Exam();return;}
if(opt=='')return;
}
}
void Math(){
system("start http://poj.org/problem?id=1220"),sleep();//
Print("\nI believe I have finished them all!\n"),sleep();
Show_Stick_Man();
printf("Do I wan't more?\n1: Let rain down more violent strom!\n2: I have had enough.");
char opt;
while(cin>>opt){
if(opt==''){Choose_Exam();return;}
if(opt=='')return;
}
}
void Dynamic(){
system("start http://poj.org/problem?id=1220"),sleep();//
Print("\nI believe I have finished them all!\n"),sleep();
Show_Stick_Man();
printf("Do I wan't more?\n1: Let rain down more violent strom!\n2: I have had enough.");
char opt;
while(cin>>opt){
if(opt==''){Choose_Exam();return;}
if(opt=='')return;
}
}
void DataStructure(){
system("start http://poj.org/problem?id=1220"),sleep();//
Print("\nI believe I have finished them all!\n"),sleep();
Show_Stick_Man();
printf("Do I wan't more?\n1: Let rain down more violent strom!\n2: I have had enough.");
char opt;
while(cin>>opt){
if(opt==''){Choose_Exam();return;}
if(opt=='')return;
}
}
void HighPrecision(){
system("start http://poj.org/problem?id=1220"),sleep();//
Print("\nI believe I have finished them all!\n"),sleep();
Show_Stick_Man();
printf("Do I wan't more?\n1: Let rain down more violent strom!\n2: I have had enough.");
char opt;
while(cin>>opt){
if(opt==''){Choose_Exam();return;}
if(opt=='')return;
}
}
friend class Chapter_Three;
}Contest;
class Chapter_Three{//Content: This time philip received a grant from an unidentified person. Go to Tsinghua to study.
public:
void Chapter_Three_Main(){
Print_Chapter_Slowly(),
printf("T"),sleep(0.5),
printf("h"),sleep(0.5),
printf("r"),sleep(0.5),
printf("e"),sleep(0.5),
printf("e\n"),sleep(0.5);
system("color 1E");
Print("Not long since I came back from Miss.Havisham's House,\nI received a grant from an unidentified person.\n"),sleep();
Print("Miss.Havisham is right. I fell in love with Estella.\n"),sleep();
Print("So with this unknown help( It must from Miss.Havisham), I must pass a exam.\n"),sleep();
Print("To proof that I can come to Tsinghua!\n");
Show_Stick_Man();
Pause();
Contest.ExamOffice();
Pause();
Print("\n\tI believe you all achieved the basic goal.\nMr.Jaggers said with an ill-intentioned smile.\n"),sleep();
Print("\tBut team's work is more important for you little idiot.\n"),
Print("\tSo your last task is teaming up every two people, then compare with each other.\n"),sleep();
printf("\nWho would be my teammate?\n1: A pretty girl( Mary Sue)\n2: A pretty boy( Gay Friend)\n");
char opt;
while(cin>>opt){
if(opt==''){Print("She refused...\n");break;}
if(opt=='')break;
}
Print("\n\tOh you are...\nThe pretty boy cried out.\n"),sleep();
Print("\nI have also recognized him.\n"),sleep();
Print("\n\tHerbert...\n"),sleep();
Print("As an saying goes, No fight, no friend.\nWe soon gain a strong relationship.\nAnd the competition begins...\n"),sleep();
Print("\nOur competitors are that pretty girl and a awful guy called Drummle.\n"),sleep();
Print("\nI suddenly realized who the girl is.\nI never forget that arrogant look.\n");
system("color 8C"),sleep();
Print("She's Estella!\n"),sleep();
Print("She also remembered me, a stupid cowboy, and smiled haughtily.\n"),sleep();
Print("Now I'm a little unhappy...\n"),sleep();
Print("\n\t\t\tDuel begins!!!\n");
system("color 0E");
Pause();
//int result=1;
//if(!result)Contest.Failure();//I used wanna set a Card competiton 'Pig country killing', but I failed.
Print("\tWe beat them down!\nI cried out.\n"),sleep();
Print("\n\tYeah, We did!\n"),sleep();
Print("\n\tLadies and gentlemen, calm down.\n\tGive me some time to announce the admission list, please.\n");
Print("A gentle look secretaty breaks us.\n"),sleep();
Print("\tNow...\n\t\tNo.1: Estella\n\t\tNo.2: Herbert\n\t...\n\t\tNo. 1024: Philip\n\t\tThat's all!\n"),sleep(4.5);
Print("\nThis is how I was admitted as the last one.\n"),sleep();
Print("Though it was a bit embarresting...\nI still laughed loudly with the crowds.\n"),sleep();
Print("I did not realize...\n"),sleep();
Print("That's the happiest time of my life...\n"),sleep();
Print("And so,\nHerbert\nJaggers\nEstella\nAnd him..."),sleep(4.5);
printf("Chapter Three Over.\n");
return;
}
friend class Tsinghua_Contest;
}Chapter_Three;
//Chpater Four
#define Game_RetroSnaker RetroSnaker.RetroSnaker_Main()
#ifdef Game_RetroSnaker
int gameover,snake_X1,snake_Y1,snake_x,snake_y;ll start,lever_final;
class Snake_Position{
public:
int snake_x,snake_y;
Snake_Position(){};
void Init(int &j){
snake_x=,snake_y=j;
}
friend class RetroSnaker;
}position[*+];
class Snake_Map{
private:
int
lever,length,gamespeed,head,tail,score;
char
ch[][],direction;
public:
Snake_Map(int h=,int t=,int l=,char d=,int s=):length(l),direction(d),head(h),tail(t),score(s){} void Init(){
R(i,,)
ch[][i] = '*';
ch[][] = '#';
R(i,,)
R(j,,)
ch[i][j]=' ';
R(i,,-)
ch[][i]=ch[-][i]='-';
R(i,,)
ch[i][]=ch[i][-]='|';
}
void Show_Game(){
system("cls");
putchar('\n');
R(i,,-){
putchar('\t');
R(j,,-)
printf("%c ",ch[i][j]);
if(i==)cout<<"\tKilling Lever:"<<lever;
if(i==)cout<<"\tKilling Speed:"<<gamespeed;
if(i==)cout<<"\tKilling Grades:"<<score;
putchar('\n');
}
}
void Grade_Init(){
lever=;gamespeed = ;
}
void display(){
cout << "\n\t\t\t\tLever:" << lever;
cout << "\n\n\n\t\t\t\tSpeed:" << gamespeed;
cout << "\n\n\n\t\t\t\tGrades:" << score;
}
void Set_Point(){
srand((unsigned)time(NULL));
while(ch[snake_X1][snake_Y1]!=' ')
snake_X1=rand()%+,snake_Y1=rand()%+;
ch[snake_X1][snake_Y1]='*';
}
int updata_game(){
char key;
gameover = ;
key = direction;
start = clock();
while((gameover=(clock()-start<=gamespeed))&&!kbhit());//If the key is pressed or the time exceeds the automatic advance interval, the cycle is terminated.
if(gameover)
getch(),key=getch();
//if(key == ' ')while(getch()!=' '){}//What is achieved here is the function of pausing or continue by pressing the space key], but for some reason, it needs to press twice to continue. This is a bug.
direction = key;
switch(direction){
case : snake_x= position[head].snake_x-; snake_y= position[head].snake_y;break; // 向上
case : snake_x= position[head].snake_x+; snake_y= position[head].snake_y;break; // 向下
case : snake_x= position[head].snake_x; snake_y= position[head].snake_y-;break; // 向左
case : snake_x= position[head].snake_x; snake_y= position[head].snake_y+; // 向右
}
while(!(direction==||direction==||direction== ||direction==))getch();
if(snake_x== || snake_x==- ||snake_y== || snake_y==-)gameover = ;
else if(ch[snake_x][snake_y]!=' '&&!(snake_x==snake_X1&&snake_y==snake_Y1))gameover = ;
else if(snake_x==snake_X1 && snake_y==snake_Y1){ // 吃米,长度加1
++length;
++lever;
ch[snake_x][snake_y]= '#'; //更新蛇头
ch[position[head].snake_x][position[head].snake_y] = '*'; //吃米后将原先蛇头变为蛇身
head = (head+) % ( * ); //取蛇头坐标
position[head].snake_x = snake_x;
position[head].snake_y = snake_y;
Show_Game();
gameover = ;
score += lever*; //加分
Set_Point(); //产生米
}
else{ // 不吃米
ch[position[tail].snake_x][position[tail].snake_y]=' ';//将蛇尾置空
tail= (tail+) % ( * );//更新蛇尾坐标
ch[position[head].snake_x][position[head].snake_y]='*'; //将蛇头更为蛇身
head= (head+) % ( * );
position[head].snake_x = snake_x;
position[head].snake_y = snake_y;
ch[position[head].snake_x][position[head].snake_y]='#'; //更新蛇头
gameover = ;
}
Cmax(lever_final,lever);
return gameover;
}
friend class RetroSnaker;
};
class RetroSnaker{
public:
bool RetroSnaker_Main(){
char cth='Y';
system("color 0E");
cout<<"\n\n\n\n\n\t\t Get_Grade At Least Fifteen To Save Everybody!\n\n\n"<<endl;
Pause();
while(cth=='Y'||cth=='y'){
system("cls");
Snake_Map snake;
snake.Init();
snake.Grade_Init();
R(i,,)
position[i].Init(i);
snake.Set_Point();
int nodead=;
while(nodead)
snake.Show_Game(),
nodead = snake.updata_game();
system("cls");
cout << "\n\n\n\t\t\t\tGameover!\n\n"<<endl;
snake.display();
cout << "\n\n\n\t\t Try again?\nInput Y: Yes or N: No" << endl;
while(cin>>cth)
if(cth=='Y'||cth=='y'||cth=='N'||cth=='n')break;
}
return lever_final>=;
}
friend class Chapter_Four;
}RetroSnaker;
#endif
#define Game_PacMan PacMan.PacMan_Main()
#ifdef Game_PacMan
int dali,fx[]={-,,,-},fxfx[][]={{,-},{,},{,},{-,}},dis[][],f=;
int changdi[][]={
{,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,},
{,,,,,,,,,,,,,,,,,,,,,,,,,,}
};
class PacMan{
private:
struct Point {int x,y;};
int x,X1,x2,x3,x4,y,Y1,y2,y3,y4,now,now1,now2,now3,now4,g1,g2,g3,g4,fangx,nextfx,last1,last2,last3,last4,fenshu,guozi,guaitimer,T1,T2,t1,t2,stopped,beichi;
public:
void color(int a){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);}//颜色函数
void gotoxy(int x,int y){//位置函数(行为x 列为y)
COORD pos;
pos.X=*y,pos.Y=x;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
void begin(){
color(); printf("\t\t\t★"); color(); printf("Escape From The Black Goats"); color(); printf("★\n\n"); color();
Sleep();
printf("\n\tGet all the Devil Fruits\n\tDon't dead more than 4 times.\n");
printf("Control direction:w/s/a/d\n");
Sleep();
printf("Please open the window to "); color(); printf("Full screen\n"); color();Sleep();
printf("Initialization..., please wait");
Sleep();
for (int i=; i<=; i++) for (int j=; j<=; j++) dis[i][j]=;
for (int i=; i<=; i++){
for (int j=; j<=; j++){
if (i+fx[j]>= && i+fx[j]<=){
int k=i+fx[j],xx=k/,yy=k%,kk;
if (changdi[i/][i%] && changdi[xx][yy]) dis[i][k]=kk=;
}
}
}
for (int k=; k<=; k++)if(changdi[k]){
for (int i=; i<=; i++)if(changdi[i])
for (int j=; j<=; j++)if(changdi[j])
if (dis[i][j]>dis[i][k]+dis[k][j]) dis[i][j]=dis[i][k]+dis[k][j];
if (k%==){color (); gotoxy(,); printf("│");}
if (k%==){color(); gotoxy(,); printf("╱");}
if (k%==){color(); gotoxy(,); printf("─");}
if (k%==){color(); gotoxy(,); printf("╲");}
if (k%==){color(); gotoxy(,k/); printf("●");}
}
}
void shuru(){//Init Speed
char ch=_getch();
t1=;
t2=;
if (ch=='A'|ch=='a') if (changdi[x+fxfx[][]][y+fxfx[][]]==|changdi[x+fxfx[][]][y+fxfx[][]]==) fangx=nextfx=; else nextfx=;
else if (ch=='S'|ch=='s') if (changdi[x+fxfx[][]][y+fxfx[][]]==|changdi[x+fxfx[][]][y+fxfx[][]]==) fangx=nextfx=; else nextfx=;
else if (ch=='D'|ch=='d') if (changdi[x+fxfx[][]][y+fxfx[][]]==|changdi[x+fxfx[][]][y+fxfx[][]]==) fangx=nextfx=; else nextfx=;
else if (ch=='W'|ch=='w') if (changdi[x+fxfx[][]][y+fxfx[][]]==|changdi[x+fxfx[][]][y+fxfx[][]]==) fangx=nextfx=; else nextfx=;
else if (ch==' ') stopped=(stopped+)%;//Pause
}
void reset(){
system("cls"); color();
gotoxy(,);
x=; y=;
X1=x2=x3=x4=; Y1=; y2=; y3=; y4=;
now=; now1=; now2=; now3=; now4=;
for (int k=; k<=; k++){
int i=k/,j=k%;
gotoxy(i,j);
if (changdi[i][j]==){color(); printf("·");}
else if (!changdi[i][j]){color(); printf("■");}
if (j=){gotoxy(i,); color(); printf("%d",i);} ////////////////////////////////////////////////////
}
gotoxy(,);
gotoxy(x,y); color(); printf("●");
gotoxy(X1,Y1); color(); printf("◆");
gotoxy(x2,y2); color(); printf("◆");
gotoxy(x3,y3); color(); printf("◆");
gotoxy(x4,y4); color(); printf("◆");
fangx=; T1=T2=guaitimer=; t1=; t2=;stopped=; fenshu=; guozi=; g1=g2=g3=g4=; dali=;
gotoxy(,); printf(" ");
}
void move1(){
int xx,yy;
xx=x+fxfx[nextfx][]; yy=y+fxfx[nextfx][];
if (changdi[xx][yy]){
if (changdi[xx][yy]==){fenshu+=; changdi[xx][yy]=;}
color();
gotoxy(x,y); printf(" ");
gotoxy(xx,yy); if (!dali) printf("◎"); else printf("☆");
now=x*+y; x=xx; y=yy;
fangx=nextfx;
}
else{
if (x== && y== && fangx==){xx=x; yy=;}
else if (x== && y== && fangx==){xx=x; yy=;}
else{xx=x+fxfx[fangx][]; yy=y+fxfx[fangx][];}
if (changdi[xx][yy]){
if (changdi[xx][yy]==){++fenshu; changdi[xx][yy]=;}
color();
gotoxy(x,y); printf(" ");
gotoxy(xx,yy); if (!dali) printf("◎"); else printf("☆");
now=x*+y; x=xx; y=yy;
}
}
color();
}
int move2(){
int haha,minhaha,xx,yy,chi=,tim=;
if (g1){
minhaha=;
if (now1%== | now1%==) haha=last1;
else if (!dali){
for (int i=; i<=; i++)
if (changdi[(now1+fx[i])/][(now1+fx[i])%] && i!=last1 && minhaha>dis[now1+fx[i]][now])
{minhaha=dis[now1+fx[i]][now]; haha=i;}
}
else{
minhaha=-minhaha;
for (int i=; i<=; i++)
if (changdi[(now1+fx[i])/][(now1+fx[i])%] && i!=last1 && minhaha<dis[now1+fx[i]][now])
{minhaha=dis[now1+fx[i]][now]; haha=i;}
}
xx=now1/; yy=now1%; gotoxy(xx,yy);
if (changdi[xx][yy]==) printf("·");else printf(" ");
now1+=fx[haha]; last1=(haha+)%;
xx=now1/; yy=now1%; gotoxy(xx,yy); color(); printf("◆"); color();
if (xx==x && yy==y){
if (!dali)++chi;
else {
guozi+=;
fenshu+=;
last1=;
gotoxy(now1/,now1%);
if (changdi[now1/][now1%]==) printf("·"); else printf(" ");
now1=;
}
}
}
if (g2){
int k;
minhaha=;
if (fangx== | fangx==){
k=y+(fxfx[fangx][])*;
while (k> | !changdi[x][k]) k--;
while (k< | !changdi[x][k]) k++;
} else{
k=x+(fxfx[fangx][])*;
while (k> | !changdi[k][y]) k--;
while (k< | !changdi[k][y]) k++;
}
if (fangx== | fangx==) k=x*+k; else k=k*+y; if (now2%== | now2%==) haha=last2;
else if (!dali)
for (int i=; i<=; i++){
if (changdi[(now2+fx[i])/][(now2+fx[i])%] && i!=last2 && minhaha>dis[now2+fx[i]][k])
{minhaha=dis[now2+fx[i]][k]; haha=i;}
}
else{
minhaha=-minhaha;
for (int i=; i<=; i++){
if (changdi[(now2+fx[i])/][(now2+fx[i])%] && i!=last2 && minhaha<dis[now2+fx[i]][k])
{minhaha=dis[now2+fx[i]][k]; haha=i;}
}
}
xx=now2/; yy=now2%; gotoxy(xx,yy);
if (changdi[xx][yy]==) printf("·");else printf(" ");
now2+=fx[haha]; last2=(haha+)%; gotoxy(,);
xx=now2/; yy=now2%; gotoxy(xx,yy); color(); printf("◆"); color();
if (xx==x && yy==y){
if (!dali) chi+=;
else {
guozi+=;
fenshu+=;
last2=;
gotoxy(now2/,now2%);
if (changdi[now2/][now2%]==) printf("·"); else printf(" ");
now2=;
}
}
}
if (g3){
int k;
minhaha=;
if (fangx== | fangx==){
k=y+(fxfx[(fangx+)%][])*;
while (k> | !changdi[x][k]) k--;
while (k< | !changdi[x][k]) k++;
} else{
k=x+(fxfx[(fangx+)%][])*;
while (k> | !changdi[k][y]) k--;
while (k< | !changdi[k][y]) k++;
}
if (fangx== | fangx==) k=x*+k; else k=k*+y; if (now3%== | now3%==) haha=last3;
else if (!dali)
for (int i=; i<=; i++){
if (changdi[(now3+fx[i])/][(now3+fx[i])%] && i!=last3 && minhaha>dis[now3+fx[i]][k])
{minhaha=dis[now3+fx[i]][k]; haha=i;}
}
else {
minhaha=-minhaha;
for (int i=; i<=; i++){
if (changdi[(now3+fx[i])/][(now3+fx[i])%] && i!=last3 && minhaha<dis[now3+fx[i]][k])
{minhaha=dis[now3+fx[i]][k]; haha=i;}
}
} xx=now3/; yy=now3%; gotoxy(xx,yy);
if (changdi[xx][yy]==) printf("·");else printf(" ");
now3+=fx[haha]; last3=(haha+)%; gotoxy(,);
xx=now3/; yy=now3%;
gotoxy(xx,yy); color(); printf("◆"); color();
if (xx==x && yy==y){
if (!dali)++chi;
else {
guozi+=;
fenshu+=;
last3=;
gotoxy(now3/,now3%);
if (changdi[now3/][now3%]==) printf("·"); else printf(" ");
now3=;
}
}
}
if (chi)++beichi;
if(beichi>=){
while(){
printf("No! Black Goats Are Coming...\n");
printf("\t\t\tAah Aah Aah Aah Aah Aah...\n"),sleep();
if(++tim==)
return ;//Cthulu End
}
}
return ;
}
Ib PacMan_Main(){
begin();
int jixu=;
reset();
string bb[]={"●","①","②","③"}; color();
gotoxy(,); printf("Ready"); color();
for (int i=; i>=; i--){if (i==) color();gotoxy(,); cout<<bb[i]; Sleep();}
gotoxy(,); printf(" "); gotoxy(,); printf(" "); color();
while (!f){
Sleep();
gotoxy(,); printf("Score:%d ",fenshu);
gotoxy(,); printf("Monster speed:%d ",-t2);
gotoxy(,); printf("Character speed:%d ",-t1);
gotoxy(,); printf("Dead time:%d ",beichi);
if (kbhit()) shuru();
if (stopped) continue;
T1=(T1+)%t1; T2=(T2+)%t2;
if (T1%t1== && now+fx[fangx]> && now+fx[fangx]<) move1();
if (T2%t2==){
if (guaitimer<=){
if (guaitimer==) g1=;
if (guaitimer==) g2=;
guaitimer++;
}
if (!g3 && fenshu>=) g3=;
int result=move2();
if(result==)return ;
}
if (fenshu==guozi)f=;
}
if (f==) {
Sleep();
system("cls");
printf("\n\tCongratulations on having all the Devil fruit!\n\tIt's time to counterattack!\n");
return ;
}
return ;
}
friend class Chapter_Four;
}PacMan;
#endif
class Chapter_Four{//Content: Philip met Magwitch again, and enemy is also appear.
public:
void Cthulu_Crazy(){
int x=,y=;
srand(unsigned(time(NULL)));
while(){
int x_crazy=GetSystemMetrics(SM_CXSCREEN),y_crazy=GetSystemMetrics(SM_CYSCREEN);
SetCursorPos(rand()%x_crazy,rand()%y_crazy);
system("cls");
R(i,,x)putchar(' ');
R(i,,y)putchar('\n');
printf("~Cthulu~");
Cthulu_Color;
x+=rand()%,y+=rand()%;
}
}
void Cthulu_Ending(){
system("color 4E");
printf("\n\n\n");
Print("\tWe tried...\n"),sleep();
Print("\tAnd we failed...\n"),sleep();
Print("\tBelievers are screaming...\n"),sleep();
Print("\tFire expands, children are crying..."),sleep();
Print("\tThen screaming...\v\tEveryone seem to become crazy...\n\n\n");
Print("\tAnd so I...\n");
Cthulu_Crazy();
}
void Dec_6(){
system("color 0E");
Print("\tDec. 6\n"),sleep(),
Print("Tonight, the wind blows strongly.\n"),sleep();
R(i,,)Cthulu_Color;
system("color 0E");
Print("A man stands besides my door with an indescrible eyes.\n"),sleep();
Print("We watch each other for a long time.\n"),sleep();
Print("\tPip\nHe breaks the silence.\n"),sleep();
Print("\tMr.Magwitch?\nI cannot trust my eyes.\n"),sleep();
Print("\n\tI need your help.\n"),sleep();
R(i,,)Cthulu_Color;
Pause();
}
void Dec_14(){
system("color 0E");
Print("\tDec. 14\n"),sleep(),
Print("Mr.Magwitch was innocent.\nHe was accused of participating in a cult rally.\nAnd sacrificed his daughter.\nSo he fell into jail.\nBut the murderer is a Believer of a cult god known as Cthulu.\nHis wife is one of the believers. . .\n\nNow Believers are planning to resurrect the evil spirits.\nOnly six Saints' Hallows can fight against Cthulu.\n\nThe summoning ceremony is on this Christmas Eve\n"),sleep();
Print("He spend years searching for the Hallows, but only find The Map Of Aladdin.\nIt's just a tool.\n"),sleep();
Print("But through the magic inside it. He got the position of all the Hollows.\nAnd reached Tsinghua School.\n"),sleep();
Print("\tWhy you come here?\nWhen I asked him, he replied...\n"),sleep();
Print("\tThere's two Hallows in this school.\nOne is at your backpack.\n"),sleep();
Print("\n\tWhat!\n"),sleep();
Print("\n\tIt's named The Key Of Dust.\n\n\n");
D_e_Line,sleep(4.5);
Print("This is our conversation a week ago.\n"),sleep();
Print("And we have spent a whole week searching for another Hallow, by the name of The Flute Of Magic.\n"),sleep();
Print("And now we are so confidenr that the Hallow must be at The Maze Of Interdisciplinary Information College.\n"),sleep();
Print("I shared the situation with Herbert, he trusted us, and promised to help us.\n"),sleep();
Print("\nNow we are sneaking in...\n"),sleep(4.5);//I used to wanna set a Maze here, but I failed.
Print("\tOh no.!\nHerbert shouted out.\n"),sleep();
Print("It's embarressed when you hold your target on your hands.\nAnd the headmaster is standing in front of you with a straight face.\n"),sleep();
Print("\n\tYou two, what are you doing now.\n"),sleep();
Print("\tAre you Believers?\n"),sleep();
Print("\nI suddenly be alert to him.\nWhy him know Believers?."),sleep();
printf("Choose Your Decision:\n1: Mr.Jaggers must be a Believer, beating him down!\n2: Wait, I'd better explain out condition to him, maybe he can help.\n");
char opt;
while(cin>>opt){
if(opt==''){
Character Jaggers;
Jaggers.name="Jaggers";
Jaggers.attack=;
Jaggers.defensive=;
Jaggers.speed=;
Jaggers.HP=;
sleep();
putchar('\n');
Combat_Effectiveness(Jaggers);
D_e_Line,sleep();
Character Herbert;
Herbert.name="Herbert";
Herbert.attack=;
Herbert.defensive=;
Herbert.speed=;
Herbert.HP=;
Combat_Effectiveness(Herbert);
D_e_Line,sleep();
Combat_Effectiveness(Philip);
D_e_Line,sleep();
Character PhilipAndHerbert;
PhilipAndHerbert.name="Philip And Herbert";
PhilipAndHerbert.attack=(Philip.attack+Herbert.attack)*>>;
PhilipAndHerbert.defensive=(Philip.defensive+Herbert.defensive)*>>;
PhilipAndHerbert.speed=(Philip.speed+Herbert.speed)*>>;
PhilipAndHerbert.HP=((Philip.HP+Herbert.HP)*>>)+;
printf("Fighter One: Philip and Herbert\nFighter Two: Jaggers\n"),sleep();
Fight(PhilipAndHerbert,Jaggers),sleep(4.5);
Print("\n\tStop! JoJo!\nIt's Magwitch.\n");
break;
}
else if(opt==''){
Print("\nOh my god, JoJO!\nMagwitch suddenly appears.\n");
break;
}
}
sleep();
Print("Jaggers lets us go, looking confused but exciting.\n"),sleep();
Print("\tThey are my friends, JoJo.\nMagwitch said to Jaggers."),sleep();
Print("\nThen we know Jaggers, who's nick name is JoJo, and Magwitch used to be comrades. They fight against Believers together many years ago.\n"),
Print("But after the death of Jaggers' wife, they separated...\nBut they two never give up fighting.\n"),
Print("\nMr.Jaggers have protected The Flute Of Magic with his snake, Kirito, for over twenty years.\n"),sleep();
Print("Magwitch told us:\n");
Print("\tThe blood moon will come out on the 21st.\nOther Hallows will be reappeared.\nOn that day the four of us must act.\nThis is the last chance.\n"),sleep();
Pause();
}
void Dec_21(){
system("color 0E");
Print("\tDec. 21\n"),sleep(),
Print("Blood Moon comes out...\n"),sleep();
Print("We need to get all the other Four Hallows.\n"),sleep(),
Print("That's the only way to beat down Cthulu.\n"),sleep(),
Print("With the help of Mr.Jaggers and Herbert, we finally reached the Dark Cave.\n"),sleep();
system("color 4E");
Print("\tPhilip! Watch out!\n"),sleep();
Print("Herbert pushes me away.\n"),sleep();
Print("And from the cave, a large swath of flying insect-like organisms is attacking us.\n"),sleep();
Print("\tKirito, Kill them all.\n"),sleep();
Print("Jaggers takes out Magic Flute.\n"),sleep();
Print("But a mantis-like organisms catches him.\n"),sleep();
Print("The Magic Flute rolls to my hand.\n"),sleep();
Print("\n\tPhilip, Hurry! Control Kirito, driving the enemies away!\n"),sleep();
Print("\n\tThe music of the Magic Flute rings out, shining in the moonlight.\n");
Print("Kirito's eyes seem like blood...\n");
int result=Game_RetroSnaker;
if(!result)
Cthulu_Ending();
Print("The monsters are drived away.\n");
Print("We succesfully get in the Cave.\n"),sleep();
Backpack.insert("The Sword Of King Arthur");
Print("\n\tYou Get The Sword Of King Arthur!\n");
printf("Press 'P' to view backpack\n'C' to continue\n");
char opt;
while(cin>>opt){
if(opt=='P'||opt=='p'){
View_Backpack(),
Pause();break;
}
if(opt=='C'||opt=='c')break;
}
Print("\tNow\n");
Print("\tWe got\n\tKey Of Secret\n\tFlute Of Dust\n\tThe Sword Of King Arthur!\nHerbert shouts happily.\n"),sleep();
Print("\n\tDon't be happy so quick.\n\tThere's still two inside the dark.\nJaggers said.\n"),sleep();
Print("\tIt's time to get Frostmourne.\n\tIn fact...\nJaggers adds.\n"),sleep();
Print("\tMy wife was killed by it.\n"),sleep();
system("color 17");
Print("\nThrough the map, we get to the The Stormpeaks.\n"),sleep();
Print("Now\nThree Belivers are chanting magic.\n"),sleep();
Print("\tMerciful Yoggsotos\n\tGive deathly stillness to the dead land!\n\tWelcome Black Goats!\n");
system("color 4E");
Print("\n\n\tPhilip, watch out!\n\t\tDon't be trampled by the Black Goats!\n");
system("cls");
system("color 0E");
result=Game_PacMan;
if(!result)Cthulu_Ending();
system("color 0E");
sleep();
Backpack.insert("The Frostmourne Of War");
Print("You Get The Frostmourne Of War!\n");
printf("Press 'P' to view backpack\n'C' to continue\n");
while(cin>>opt){
if(opt=='P'||opt=='p'){
View_Backpack(),
Pause();break;
}
if(opt=='C'||opt=='c')break;
}
Print("\tMany years ago, my wife and me tried to get this sword.\n"),sleep();
Print("\tWe have already got it.\n\tBut A Believer attacked us.\n"),sleep();
Print("\t\tMy wife used the sword to fight back, but that Believer's sickle reached her...\n"),sleep();
Print("\tI was hurt. The only thing I can do was watching the Believer picked up Frostmourne, and swinging...\n"),sleep();
Print("Jaggers told us slowly.\n"),sleep();
Print("\tMoon is fallen, time to come back...\n");
Pause();
}
void Dec_24(){
system("color CE");
Print("\tDec. 24\n"),sleep(),
Print("\t\tThe last fight is coming.\n"),sleep();
Print("\tThough we haven't collected all the six Hallows,\n\tthe Believers have all gathered at the center of Yalan.."),sleep();
Print("\t\tCthulu~Cthulu~Cthulu~...\n"),sleep();
Print("\tThey are screaming with an indescribable voice...\n");
R(i,,){
Cthulu_Color;
R(j,,i)putchar('\t');
Print("\tCthulu~Cthulu~Cthulu~\n");
}
system("color CE");
Print("I have waited for you Twenty Years!\n\tJaggers shouted to a Believer.\n"),sleep();
Print("The Believer wears a black cloak, covering the whole body, and holds a sickle...\n"),sleep();
Character Death;
Death.name="Death";
Death.attack=;
Death.defensive=;
Death.speed=;
Death.HP=;
Print("I realize it's the one who killed Mr.Jagger's wife.\n"),sleep();
Print("But this time, it's Jaggers controls Frostmourne...\n\n"),sleep();
Character Jaggers;
Jaggers.name="Jaggers";
Jaggers.attack=;
Jaggers.defensive=;
Jaggers.speed=;
Jaggers.HP=;
sleep();
Combat_Effectiveness(Jaggers);
D_e_Line,sleep();
Combat_Effectiveness(Death);
D_e_Line;
printf("Fighter One: Jaggers\nFighter Two: Death\n"),sleep();
Fight(Jaggers,Death),sleep();
putchar('\n');
Print("After a hard fight.\nDeath's sickle falls down from his wrist...\n"),sleep();
Backpack.insert("The Sickle Of Death");
Print("\nYou Get The Sickle Of Death\n");
printf("Press 'P' to view backpack\n'C' to continue\n");
char opt;
while(cin>>opt){
if(opt=='P'||opt=='p'){
View_Backpack(),
Pause();break;
}
if(opt=='C'||opt=='c')break;
}
system("color C4");
Print("The six hollows have been found five.\n"),sleep();
system("color CE");
Print("However, Jaggers is also hurt.\nHe cannot fight anymore.\n"),sleep();
Print("But the Believers are closing.\n"),sleep();
Print("Jaggers, with Frostmourne\n\tHerbert, with King Athur's Sword\n\t\tMagwitch, with Magic Flute\n\t\t\tI, with... a wooden stick... fight together.\n"),sleep();
Print("The Believers are driving away.\n"),sleep();
Print("It seems that we will surely stop the summoning ceremony.\n"),sleep();
R(i,,)Cthulu_Color;
system("color 62");
Print("Until a green flash breaks from the fire fields...\n"),sleep();
Print("\tOh~Merciful Cthulu~Let the honest death be your honor!\n");
R(i,,)Cthulu_Color;
system("color 62"),sleep();
Print("\tOh~Merciful gentlemen, best thanks for your sacrifice.\n\t~Cthulu's dearest son-in-law, Abel Magwitch!\n"),sleep();
Print("\n\n\tNo, Lier!\nMagwitch suddenly realizes something.\nHe turns to us with a white face without hope.\n"),sleep() ;
Print("\tSorry, it's all my fault.\n");
R(i,,)Cthulu_Color;
system("color 62"),sleep();
Print("We are shocked.\n"),sleep();
Print("\tIn fact the five hollows is nothing to Cthulu.\n\tI lied to you just for finding Cthulu, my Father-in-law.\n"),sleep();
Print("\n\tYou wanna me fucking believe your word?\n\tAfter so much!\n\tFor What!\nI cried out.\n"),sleep();
Print("\n\tYou do not how much I wanna revenge on it.\n\tBut the only thing can vanish it is the last hollow:\b\t\t\tThe Blood Of Cruel.\n"),sleep();
Print("\tIt's not a object, but a real body, which owns the blood from Cthulu.\n"),sleep();
Print("\nI realized something, looking at him to my dismay.\n"),sleep();
Print("\n\tAnd I am that body.\n");
R(i,,)Cthulu_Color;
system("color 62"),sleep();
Print("\n\n\tOh~ That's how you step into this trap.\n\tWe are not expecting reviving Our Honorable Father since the first time, Cthulu~ have already coming for a long period.\n\tWe Just For Vanish You.\nThe voice from the flash screams.\n");
R(i,,)Cthulu_Color;
system("color 62"),sleep();
R(i,,){
R(j,,i)
putchar('\t');
Print("Run!!!!!\n");
Print("Mr. Magwitch!!!");
}
Print("\nTo protect us,\n Magwitch turned into light.\nHis blood shines like the sun.\n\n"),sleep();
system("color FE"),sleep(4.5);
Print("Open eyes again, every one is at a safe place.\n"),sleep();
Print("Except Mr.Jaggers and Magwitch...\n");
Pause();
}
void Dec_25(){
system("color 0E");
Print("\tDec. 25\n"),sleep(),
Print("\tWhat next should we do?\nHerbert asked me.\n"),sleep();
Print("\nI heared the poets eulogizing the Christmas.\n"),sleep(4.5);
system("color 0D");
Print("\nHappy Christmas, that can win us back to the delusions ofour childhood days.\nRecall to the old man the pleasures of hisyouth.\nAnd transport the traveler back to his own fireside andquiet home...\n"),sleep();
system("color 0E");
Print("\nWe Fight.\n");
}
void Chapter_Four_Main(){
Print_Chapter_Slowly(),
printf("F"),sleep(0.5),
printf("o"),sleep(0.5),
printf("u"),sleep(0.5),
printf("r\n"),sleep(0.5);
system("color B7");
Print("Two years passed, the winter is still cold.\n");
sleep();
Print("These days I do not have a good time.\nWherever I go, I feel that someone is watching me.\n");
sleep(4.5);
Print("And the ordinary life has broken, like a glass...\n");
Pause(),system("cls");
Dec_6(),system("cls");
Dec_14(),system("cls");
Dec_21(),system("cls");
Dec_24(),system("cls");
Dec_25(),sleep(4.5),
printf("\nChapter Four Over\n");
Pause();
return;
}
friend class RetroSnaker;
friend class PacMan;
}Chapter_Four;
#undef Game_RetroSnaker
#undef Game_PacMan
//Chapter Five
class Chapter_Five{//Contents: Philip returned Miss.Havisham's House. Estella told him her life.
public:
void Chapter_Five_Main(){
system("color 8C");
Print_Chapter_Slowly(),
printf("F"),sleep(0.5),
printf("i"),sleep(0.5),
printf("v"),sleep(0.5),
printf("e\n"),sleep(0.5),
Print("\nBelievers behave more and more frequently.\n"),
Print("At a sneak raid, Herbert and I have separated.\n");
Print("I don't know if he is alive.\nBut I must take action with the left two Hallows.\n"),sleep();
Print("\n\tThe Key Of Dust and The Flute Of Magic.\n"),sleep();
printf("\nNow where should I go?\n1: Miss.Havisham's House\n2: Tsinghua School\n");
char opt;
while(cin>>opt){
if(opt=='')break;
if(opt==''){
Print("\nI may go back to school, Mr,Jaggers may has left some information in it.\n"),sleep();
Print("\nBut it must be full of Believers now.\nI have no idea.\n"),sleep();
break;
}
}
Print("\nYes, I should return to Miss.Havisham's House.\n");
Print("That's where I get The Key Of Dust.\n");
Print("That gloomy place may well kept other secrets.\n");
Print("Especially Miss.Havisham...\n"),sleep();
Havisham_House.ReturnTime();
system("color 8C");
Print("When I step out the Hall.\n");
Print("Estella is in front of me.\n"),sleep();
Print("\n\tPip, let me tell you the truth.\nShe said quitely"),sleep(4.5);
system("color 93");
Print("\n\n\tWhen I was a tiny girl, I have a happy childhood.\n"),sleep();
Print("\tMy dad, you have met, is the son of Cthulu.\n");
Print("\tHe fell in love with my mom, Havisham, and got married with her,\n"),
Print("\tdespiting strenuous objections by Cthulu...\n"),sleep();
Print("\tOne day, Cthulu asked my dad to help him come to the earth.\n"),sleep();
Print("\tOf course my dad refused.\n\tThen Cthulu cheated my mom.\n"),sleep();
Print("\t\t'Dear~ Havisham, if you help me, I'd admit your wedding...'\n"),sleep();
Print("\n\t\t'Oh yes, Mr.Cthulu, thank you!'\n"),sleep();
Print("\tThat's the conversation between them.\n\tThen Cthulu came...\n"),sleep();
Print("\tCthulu seduced our servants to kill us.\n"),sleep();
Print("\tThey prepared a cult rally,\n\t\tsacrifing my brother,\n\t\tmy grandparents,\n\t\tmy confidante...\n"),sleep();
Print("\tOnly one old cook suddenly restores his mind,\n\tand hid my mom and me in this house.\n"),sleep();
Print("\tDad was accused of sacrificing me in that rally.\n\tHe did not know we are alive.\n\tThe vengeful desire forced him to spend his life searching for Cthulu...\n"),sleep();
Print("\tHe has gone, the only one who owns The Blod Of Cruel is me now.\nEstella looks firm, hair swayed in the night wind."),sleep();
Print("\n\tSo you want be the Light, sacricing yourself to save the world?\nI asked her slowly.\n");
Print("\n\tYes, please.\n\tIt's time to settle accounts.\n"),sleep();
Print("\tHelp me, Pip.\n"),sleep(4.5);
Print("Chapter Five Over.");
return;
}
}Chapter_Five;
//Chapter Six
#define PlayMusic Music()
#ifdef PlayMusic
enum fy{
d1 = , d1_ = , d2 = , d2_ = , d3 = , d4 = , d5 = , d5_= ,
d6 = , d6_= , d7 = , z1 = , z1_ = , z2 = , z2_ = , z3 = ,
z4 = , z4_ = , z5 = , z5_ = , z6 = , z6_ = , z7 = , g1 = ,
g1_ = , g2 = , g2_ = , g3 = , g4 = , g4_ = ,
g5 = , g5_ = , g6 = , g6_ = , g7 = , yaya =
};
struct yf{
enum fy s;
int t;
};
void Music(){
R(i,,){
struct yf a[]={
{z6,},{z7,},{g1,},{z7,},{g1,}, //
{g3,},{z7,},{z3,},{z6,},{z5,}, //
{z6,},{g1,},{z5,},{z2,}, //
{z3,},{z4,},{z3,},{z4,},{g1,}, //
{z3,},{z2,},{z3,},{g1,},{z7,}, //
{z4_,},{z4_,},{z7,},{z7,},{z6,}, //
{z7,},{g1,},{z7,},{g1,},{g3,}, //
{z7,},{z3,},{z6,}, //
{z5,},{z6,},{g1,},{z5,},{z3,},{z4,},{g1,}, //
{z7,},{g1,},{g2,}, //
{g3,},{g1,},{g1,},{z7,},{z6,},{z7,},{z5_,}, //
{z6,},{g1,},{g2,}, //
{g3,},{g2,},{g3,},{g5,},{g2,},{z5,}, //
{g1,},{z7,},{g1,},{g3,},{g3,},{z6,},{z7,},{g1,}, //
{z7,},{g1,},{g2,},{g1,},{z5,}, //
{z5,},{g4,},{g3,},{g2,},{g1,}, //
{g3,},{yaya,},{g3,},{g6,},{g5,},{g5,},{g3,}, //
{g2,},{g1,},{yaya,},{g1,},{g2,},{g1,},{g2,},{g5,}, //
{g3,},{yaya,},{g3,},{g6,},{g5,},{g3,},{g2,}, //
{g1,},{yaya,},{g1,},{g2,},{g1,},{g2,},{z7,}, //
{z6,},{yaya,},{z6,},{z7,},{z6,}
};
struct yf *atop;
atop = a;
int n = ;
while(n--){
Beep(atop->s,atop->t*);
++atop;
}
}
return;
}
#endif
class Chapter_Six{
public:
void Chapter_Six_Main(){
system("color 0E");
Print_Chapter_Slowly(),
printf("S"),sleep(0.5),
printf("i"),sleep(0.5),
printf("x"),sleep(0.5),
Print("\n\t\tHerbert died.\n"),sleep();
Print("This morning, when I was reading the news,\n"),
system("color C4");
Print("the topic came into view:"),sleep();
Print("\n\tA 20 years around man died in London on Saturday.\n\tAccording to eyewitnesses,\n\tHe was holding a sword, fighting with a octopus-like being.\n");
Print("\tHe had nearly kill that being, but as soon as he touched its blodd.\n\tHe was like being crueled.\n"),
Print("\tHe kept screaming an indescrible words.\n");
Print("\t\t'Cthulu~ Cthulu~ Cthulu~'.\n");
Print("\tThen some people began to follow him, screaming 'Cthulu~'\n");
Print("\tBefore every one got crazy, the polish arrived,\n\tshooting to the young man...\n");
system("color B7");
Print("\nI remembered several years ago,\nhow Herbert and I both held secret love for Estella,\nand we met in the Garden to fight.\n"),sleep(),
Print("\nI remembered years later,\nhow we beat down the challenging opponents,\nand then step into Tsinghua.\n"),sleep();
Print("\nI remembered not long befoe now,\nhow we fight together,\nand experience countless life-and-death partings.\n"),sleep();
Print("They are only my own memory now.\n"),sleep();
system("color 0E");
Print("\n\tKeep calm, Pip.\n\tCthulu has hurt, he must be still in London.\n\tWhat we need now is nothing but find Cthulu,\n\tand let him pay the price!\nEstella said.\n"),sleep(3.5);
Print("\n\tYou're right, Estella.\n\tWe need to go now.\n"),sleep(3.5);
Last_Fight();
}
void Last_Fight(){
system("cls");
R(i,,)Cthulu_Color;
Print("\n\n\n\tHew~ ded~ yeu~ fend~ meeee~\nCthulu seems can't believe this.\n"),
system("color 0E");
Print("\n\tOh, our 'greatest' Cthlu,\n\twe have searched for you in every corner of London.\nI smiled, with flames of fury in heart.\n"),sleep();
Print("\n\tYou killed my dad, and caused my mom's crazy!\nEstella shouted out to Cthulu.\n"),sleep();
R(i,,)Cthulu_Color;
Print("\n\tOe~ Thet's veey serprising, bet whet're yeu waet?\n\tKiel mee?\n\tYeu teoooo...?\n");
system("color 0E");
Print("\nHis voice has a stange power.\nI feel an impulse, seducing me to be crazy.\n");
Print("But we are not afraid of him anymore.\n\n"),sleep();
Character Cthulu;
Cthulu.name="Cthulu";
Cthulu.attack=;
Cthulu.defensive=;
Cthulu.speed=;
Cthulu.HP=;
Combat_Effectiveness(Cthulu);
Character PhilipAndEstella;
PhilipAndEstella.name="Philip and Estella";
PhilipAndEstella.attack=;
PhilipAndEstella.defensive=;
PhilipAndEstella.speed=;
PhilipAndEstella.HP=;
putchar('\n');
Combat_Effectiveness(PhilipAndEstella);
printf("Fighter One: PhilipAndEstella\nFighter Two: Cthulu\n"),sleep();
Fight(PhilipAndEstella,Cthulu);
Print("\nWe don't know he's power is so strong.\nEstella and I have hurt seriously.\n"),sleep();
R(i,,)Cthulu_Color;
Print("\n\tHeee, yeu stepid, lee henst deeth be yoer henor.\n\tImpieey Heman beiegssss...!\n");
system("color 0E");
Print("\n\tGood bye, Pip.\n"),sleep(3.5);
Print("\tI love you...\nEstella whispered\n"),sleep(4.5);
Estella_Sacifice();
}
void Estella_Sacifice(){
system("color 94");
Print("\n\tEstella, no!\nI tried to stop her.\n");
Print("But it's too late.\n"),sleep(3.5);
system("color F6");
Print("\nA bright shine gets out of her body.\nThen two\nThree\nFour...\n"),sleep();
Print("Until Estella's body all turned into the light.\n"),sleep();
Print("\nee!e!!ee!!eeeee!!!ee!eee!e...\nCthulu screams.\n");
Print("Its's body breaks into pieces...\n"),sleep(4.5);
Print("Then the moon came out.\n"),sleep();
Print("As red as blood...\n"),sleep();
Print("And the wind passed me.\n"),sleep();
Print("As soft as tears...\n"),sleep(4.5);
End_Cemetery();
}
void End_Cemetery(){
system("color B7");
Print("\nSeveral days later,\nI came back my hometown.\n");
Show_Stick_Man();
Print("Joe welcomed me enthusiastically.\n"),sleep();
Print("I pretented that there is nothing wrong,\neven after so much...\n"),sleep();
Print("\nThis evening, I go to the cemetery again.\n"),sleep();
Print("Beside two more new tombs, the winter is nothing changed.\n"),sleep();
Print("When I was a child, Magwitch told me:\n"),sleep();
Print("\n\tWhen the snow melts, I'll wait for you on the lakeside.\n"),
sleep();
Print("\n\tWhy?\n");
sleep();
Print("\n\tBecause we are friends...\n");
sleep(3.5);
Print("\nIt's a lie, like a dream...\n"),sleep();
Print("I am the dreamer.\n"),sleep();
Print("It's time to wake up...\n"),sleep(4.5);
Print("The End");
PlayMusic;
return;
}
}Chapter_Six;
#undef PlayMusic
Iv Chapter_Prologue(){
system("color B7");
// Show_Lake();
Print("When the snow melts, I'll wait for you on the lakeside\n"),
sleep();
Print("Why\n");
sleep();
Print("Because we are friends...\n");
sleep(3.5);
}
//Introdution At The End
Iv Introduce_Bingoyes(){
putchar('\n');
system("color 0E");
D_e_Line;
Print("A strory is over.\n");
sleep();
Print("But another is started here.\n");
sleep();
Show_Stick_Man();
Print("Don't you wanna open it, my friend.\n");
Print("This is your last decision.\n'Y': Open it\n'N': No\n");
char opt;
while(cin>>opt){
if(opt=='Y'||'y'){system("start https://www.cnblogs.com/bingoyes/");return;}//It used to be a bug, but the reason is very funny, so I kept it.
if(opt=='N'||'n'){system("start www.4399.com");return;}
}
}
#define Start_New_Chapter() Pause(),system("cls"),system("color 31")
Iv Readme(){
system("color 0E");
Print("Read me:\n"),sleep();
Print("This game is created based on Dicken's Great Expectations.\n");
Print("To colorful the contents, I add other elements inside.\n");
Print("It's quite simple, but it really costs me two weeks.\n");
Print("Before doing it,\nI didn't know how to set color, print words slowly, even use Class...\n");
Print("But I stuck on, and I did it.\n");
Print("I learned a lot, not only programming...\n");
Print("I decide to share it with you, it's my honor if you like it.\n");
Print("But at first, I need to say thanks to websites or blogs below.\n");
Print("Without the knowledge from them, I could do nothing.\n");
Print("\n\thttps://blog.csdn.net/jackypigpig/article/details/53368531\n");
Print("\thttps://www.luogu.org/discuss/show/30357\n");
Print("\thttps://blog.csdn.net/charactr/article/details/78817779\n");
Print("\thttp://tieba.baidu.com/p/4297649534\n");
Print("\thttps://www.cnblogs.com/bingoyes/\n");
Print("\n\tAnd others which I cannot remember yet...\n");
system("color 0C");
Print("\n(\nThis game is only for sharing knowledge and programing skill.\nSo I used a few codes from the internet.\nIf you are the original author and think your copyright has been infringed.\nConnect me and I'll delete the relevant part in time.\nIf you wanna infringe my copyright for personal interests, we'll meet in court!\n)\n");
system("color 0E");
Print("\nNow let's begin!\n"),sleep();
Print("\nGreat Exceptations\n\t\tby Bingoyes\n");
}
int main(){
Readme();
Start_New_Chapter();
Init_Chapter_One();
Chapter_Prologue();
Start_New_Chapter();
Chapter_One.Chapter_One_Main();
Start_New_Chapter();
Chapter_Two.Chapter_Two_Main();
Start_New_Chapter();
Chapter_Three.Chapter_Three_Main();
Start_New_Chapter();
Chapter_Four.Chapter_Four_Main();
Start_New_Chapter();
Chapter_Five.Chapter_Five_Main();
Start_New_Chapter();
Chapter_Six.Last_Fight();
Introduce_Bingoyes();
return ;
}
/*
Note:
Describtion:
This text game is created based on Dickens' <<Great Expectations>>.
Character: Chapters:
Name:
Pip 皮普 又名 Handel 汉德尔 ; 教名菲利普 (Philip)。
Abel Magwitch 阿伯尔。马格韦契
Mrs Joe Gargery 乔 。葛吉瑞夫人
Joe Gargery 乔。葛吉瑞
Vompeyson 康培生
Mr Pumblechook 潘波趣先生
Mr Wopsle 伍甫赛先生
Biddy 毕蒂
Miss Havisham 郝薇香小姐
Estella 艾丝黛拉 ,被郝小姐收养
Herbert Pocket 郝伯特。朴凯特
Matthew Pocket 马修。朴凯特
Orlick 奥立克
Mr Jaggers 贾格斯 先生
Mr Wemmick 文米克 先生
Bentley Drummle 本特利 。朱穆尔
Startop 史达多蒲
Miss Skiffins 斯基芬小姐 Set Color:
0= black
1= blue
2= green A = light green
3= lake blue B = light green blue
4= red C = light red
5= purple D = lavender
6= yellow E = light yellow
7= white F = bright white
8= gray
9= light blue SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a); 0E-> Black Golden Fairy
31-> Blue Cementry
B7-> Winter Peace
4E-> Real Hell
62-> Cthulu's Meditation
C4-> Bloody Guility
8C-> Bloody Dust
}
*/
Great Expectations
Great Expectations的更多相关文章
-
一起啃PRML - 1.2.2 Expectations and covariances 期望和协方差
一起啃PRML - 1.2.2 Expectations and covariances 期望和协方差 @copyright 转载请注明出处 http://www.cnblogs.com/chxer/ ...
-
k8s replicaset controller 分析(3)-expectations 机制分析
replicaset controller分析 replicaset controller简介 replicaset controller是kube-controller-manager组件中众多控制 ...
-
zoj 1022 - Parallel Expectations
题目:有两个指令序列,在执行时,能够执行随意指令序列的下一条指令.每条指令要一直执行到结束. 求两组指令执行结束后,每一个变量里面存储值的期望. 分析:dp,模拟.这道题算不上难题,只是算得上的麻烦题 ...
-
Quality 是什么?
Quality 是什么? 通常,我们谈及 Quality(质量)时,最常见的问题就是:Quality 是什么? 有很多业界先驱和研究人员已经回答了这个问题,我在这里并不会再给出一个新的答案.在学习总结 ...
-
Reactor by Example--转
原文地址:https://www.infoq.com/articles/reactor-by-example Key takeaways Reactor is a reactive streams l ...
-
Google C++单元测试框架GoogleTest---GMock的CheatSheet文档
CheatSheet文档中包含了GMock所有常用的东西,看了这个基本上就可以用它了,本文接上篇博文:Google C++单元测试框架GoogleTest---Google Mock简介--概念及基础 ...
-
Favorites of top 10 rules for success
Dec. 31, 2015 Stayed up to last minute of 2015, 12:00am, watching a few of videos about top 10 rules ...
-
bzoj1415[NOI2005]聪聪和可可
之前做的一些图上的期望步数的题大多用到高斯消元来求解(HNOI游走,SDOI走迷宫,etc),因此我一开始做这道题的时候想偏了- 这道题的性质:聪聪和可可之间的最短路长度严格递减.因为聪聪总可以多走一 ...
-
【转载学习前辈的经验】-- Mistakes I made (as a developer) 我(作为一名开发者)所犯过的错误
我 2006 年开始工作,至今已经 10 年.10 年是个里程碑,我开始回顾自己曾经犯过的错误,以及我希望从同行那里得到什么类型的忠告.一切都在快速改变,10 年了,我不能确定这些秘诀是否还有用. 不 ...
随机推荐
-
Asp文件锁定脚本
锁定指定文件 <% on error resume next server.ScriptTimeout= response.write "<form method=post> ...
-
mongoDB 读书笔记(初级命令)
关于mongoDB的相关知识,读书笔记,便于自己查阅用,不定期更新(纯手打) <mongoDB权威指南> 一.创建更新和删除 1.创建 //批量插入一个集合可以节省时间,只用 ...
-
使用XMl序列化器生成xml文件
生成XML文件 创建几个虚拟的短信对象,存在list中 备份数据通常都是备份至sd卡 使用StringBuffer拼接字符串 把整个xml文件所有节点append到sb对象里 sb.append(&q ...
-
zookeeper 分布式应用好处
<pre name="code" class="html"> 举个例子 比如我以前通过haproxy 负载两台tomcat8082 比如api01 ...
-
JavaScript: DOM Docunment
Meaning: In browser , we exchange data using JavaScript code with user. We should know that most of ...
-
Js学习(6) 标准库-Array对象
Array是Js的原生对象,同时也是一个构造函数,可以用它生成新的数组 用不用new结果都一样 var arr = new Array(2); // 等同于 var arr = Array(2); 但 ...
-
ios如何实现静音模式下声音仍然可以外放
AVAudioSession *audioSession = [AVAudioSession sharedInstance]; [audioSession setCategory:AVAudioSes ...
-
window消息机制
剖析Windows消息处理机制 前一段,帮人写了个小控件,又温习了一遍Windows消息处理机制,现在把一些知识点总结出来,供大家参考.1.窗口 Windows程序是由一系列的窗口构成的,每个窗 ...
-
Ubuntu14.04下Mongodb(离线安装方式|非apt-get)安装部署步骤(图文详解)(博主推荐)
不多说,直接上干货! 说在前面的话 首先,查看下你的操作系统的版本. root@zhouls-virtual-machine:~# cat /etc/issue Ubuntu LTS \n \l r ...
-
deep learning loss总结
在深度学习中会遇到各种各样的任务,我们期望通过优化最终的loss使网络模型达到期望的效果,因此loss的选择是十分重要的. cross entropy loss cross entropy loss和 ...