高级光能
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
void Color(int a){//颜色控制函数(部分代码为复制)
if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);//标准
if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE); //浅蓝
if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN); //绿
if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE); //紫红
if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED); //浅橙
if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN); //浅黄
if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE); //蓝
if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); //浅灰
if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED); //红
if(a==9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_GREEN|BACKGROUND_BLUE); //浅蓝 外
if(a==10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_BLUE); //紫红 外
if(a==11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_BLUE); //深紫
if(a==12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN); //棕黄
if(a==13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY); //深灰
if(a==14) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_BLUE); //较浅蓝
return;
}
struct map_s{
int flag;
string s;
}map[105][505];
struct pla_s{
int x,y;
}pl;
string blo[10]={"","##","&&","--","//","\\\\","||","%%"," a"};
int blo_cnt=1;
string now_blo="##";
void CSH(){
pl.x=79;
pl.y=11;
for(int i=1;i<=100;i++){
for(int j=1;j<=500;j++){
if(i<80) map[i][j].s=" ";
else if(i<85) map[i][j].s="&&";
else map[i][j].s="##";
}
}
}
void SC(){
system("cls");
Color(5);
for(int i=1;i<=22;i++)cout<<"++";
cout<<endl;
for(int i=pl.x-10;i<=pl.x+10;i++){
Color(5);
cout<<"+";
for(int j=pl.y-10;j<=pl.y+10;j++){
if(i<=0||j<=0||i>=100||j>=500)continue;
if(i==pl.x&&j==pl.y){
Color(0);
cout<<"Yo";
}else{
if(map[i][j].s=="&&")Color(12);
if(map[i][j].s=="##")Color(13);
if(map[i][j].s=="--")Color(6);
if(map[i][j].s=="%%")Color(2);
if(map[i][j].s==" a")Color(8);
if(map[i][j].s=="||"||map[i][j].s=="//"||map[i][j].s=="\\\\")Color(4);
cout<<map[i][j].s;
}
}
Color(5);
cout<<"+";
cout<<endl;
}
Color(5);
for(int i=1;i<=22;i++)cout<<"++";
Color(0);
cout<<endl<<"Your Block:";
if(now_blo=="&&")Color(12);
if(now_blo=="##")Color(13);
if(now_blo=="--")Color(6);
if(now_blo=="%%")Color(2);
if(now_blo==" a")Color(8);
if(now_blo=="||"||now_blo=="//"||now_blo=="\\\\")Color(4);
cout<<now_blo;
return;
}
int main(){
CSH();
SC();
while(1){
char c=getch();
if(c=='w'&&pl.x>11)pl.x--;
if(c=='s'&&pl.x<89)pl.x++;
if(c=='a'&&pl.y>11)pl.y--;
if(c=='d'&&pl.y<489)pl.y++;
if(c=='t')map[pl.x][pl.y].s=now_blo;
if(c=='y')map[pl.x][pl.y].s=" ";
if(c=='h'&&blo_cnt<8)blo_cnt++;
if(c=='g'&&blo_cnt>1)blo_cnt--;
now_blo=blo[blo_cnt];
SC();
}
return 0;
}
中级守护
#include<windows.h>
#include<assert.h>
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<stdint.h>
#include<tgmath.h>
#include<assert.h>
#define CLS SetPos(1000,1000)
#include<ctype.h>
#include<errno.h>
#include<float.h>
#include<fstream>
#include<iomanip>
#include<iostream>
#include<limits.h>
#include<locale.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#include<wchar.h>
#include<wctype.h>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cerrno>
#include<clocale>
#include<cmath>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<utility>
#include<vector>
#include<cwchar>
#include<cwctype>
#include<complex.h>
#include<fenv.h>
#include<inttypes.h>
#include<stdbool.h>
#include<conio.h>
#include <winable.h>
#pragma GCC optimize(2)
using namespace std;
int yg,rr,gl,alg;//鱼干、肉肉、狗粮、奥利给
bool sfy;//是否有宠物
string cwm;//宠物名
int cwhgd;//好感度上限
int hgd;//好感度.
int ccfj=1;//额外金币获取;
bool sjm;//神秘猫buff
void cls(){
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coordScreen = { 0, 0 }; // home for the cursor
SetConsoleCursorPosition( hConsole, coordScreen );
}
void HideCursor(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = false; //隐藏控制台光标
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void console()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO bInfo;
GetConsoleScreenBufferInfo(hOut, &bInfo );
SetConsoleTitle("行走·地狱来临"); // 设置窗口的标题
COORD size = {110, 30};//设置窗口大小
SetConsoleScreenBufferSize(hOut,size);
SMALL_RECT rc = {0,0, 110, 30};
SetConsoleWindowInfo(hOut,true ,&rc);
}
double xuxx;
string dhy;
int shj=0;
int dlxui=100;
int mpf;
int du=0;
int z=0;
bool jih=0;
char sr;
int tl=100;
HANDLE hOut;
string cheng;
int xuxxel=100,xuxxels=100;//故事模式血量和血量上限
int gok=20;//故事模式攻击
int gq=0;//故事模式金币
int fw[10];//攻击范围
int zl;
struct st{
string pi[41];
int jl;
}pf;
struct ld{
int rw;
int sh;
int hp;
string zy;
}p[10];
string name;
bool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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},//33
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},//34
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};//35
// 0 1 2 3 4 5 6 7 8 9 1011121314151617181920212223242526272829303132333435
int zhu();
static void SetPos(int x, int y)
{
COORD point = { x, y };//光标要设置的位置x,y
HANDLE HOutput = GetStdHandle(STD_OUTPUT_HANDLE);//使用GetStdHandle(STD_OUTPUT_HANDLE)来获取标准输出的句柄
SetConsoleCursorPosition(HOutput, point);//设置光标位置
}
int weigs(string aas)
{
for(int i=0;i<aas.size();i++)
{
cout<<aas[i];
Sleep(100);
}
return 1;
}
void color(int corcorcor){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
int shij()
{
system("cls");
cout<<"\n\n\n\n";
cout<<" \t\t\t欢迎来到ZBQ星际导航穿梭**中心!\n";
Sleep(2000);
cout<<" \t\t请问你要去的地方是(1.水星 2.金星 3.地球 4.火星 5.土卫二 6总空间站)" ;
int csj;
cin>>csj;
// if(csj)
}
int wei(){
int xzkk;
system("cls");
cout<<"\t\t\t\t重启未来\n\n";
Sleep(1000);
cout<<"\t\t\t 欢迎来到未来\n";
Sleep(2000);
system("cls");
cout<<"\t本次正式更新 加入了角色 机器人 ,地图 空间站 ,活动皮肤,下一版本将加入新版商城,以及新活动:股市!";
Sleep(4000);
system("cls");
}
string dhm()
{
dhy="";
char aba;
srand(time(NULL));
stringstream ss,kk,bb,aa,gg,jj,tt;
tt<<rand()%9+1;
tt>>aba;
dhy+=aba;
ss<<rand()%9+1;
ss>>aba;
dhy+=aba;
kk<<rand()%9+1;
kk>>aba;
dhy+=aba;
aa<<rand()%9+1;
aa>>aba;
dhy+=aba;
gg<<rand()%9+1;
gg>>aba;
dhy+=aba;
return dhy;
}
int bao()
{
cout<<"\n\t\t\t\t 存档已完成,请重启程序\n";
freopen("存档.txt","w",stdout);
cout<<qi<<"\n";
cout<<pf.jl<<"\n";
for(int i=1;i<=pf.jl;i++)
{
cout<<pf.pi[i]<<"\n";
}
cout<<zl<<"\n";
cout<<z<<"\n";
cout<<name<<"\n";
cout<<mpf<<"\n";
cout<<du<<"\n";
//cout<<cheng<<"\n";
cout<<ren<<"\n";
cout<<dlxui<<"\n";
cout<<yg<<endl<<rr<<endl<<gl<<endl<<alg;
cout<<cwhgd<<endl<<cwm<<endl<<hgd<<endl<<ccfj<<endl<<sfy;
fclose(stdout);//关闭文件
return 0;
}
int blz()
{
HideCursor();
int x1=6,y1=2,x2=5,y2=32;
while(p[1].hp>0&&p[2].hp>0)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(bl[i][j]==1)
{
cout<<"HH";
}
else if(bl[i][j]==5)
{
cout<<p[1].zy;
}
else if(bl[i][j]==6)
{
cout<<p[2].zy;
}
else
{
cout<<" ";
}
}
cout<<endl;
}
cout<<"\t\t\t玩家1hp:"<<p[1].hp<<" "<<"\t\t"<<"玩家2hp:"<<p[2].hp<<" "<<endl;
sr=getch();
if(sr=='w'&&bl[x1-1][y1]==0)
{
bl[x1-1][y1]=5;
bl[x1][y1]=0;
x1-=1;
}
else if(sr=='a'&&bl[x1][y1-1]==0)
{
bl[x1][y1-1]=5;
bl[x1][y1]=0;
y1-=1;
}
else if(sr=='s'&&bl[x1+1][y1]==0)
{
bl[x1+1][y1]=5;
bl[x1][y1]=0;
x1+=1;
}
else if(sr=='d'&&bl[x1][y1+1]==0)
{
bl[x1][y1+1]=5;
bl[x1][y1]=0;
y1+=1;
}
else if(sr=='i'&&bl[x2-1][y2]==0)
{
bl[x2-1][y2]=6;
bl[x2][y2]=0;
x2-=1;
}
else if(sr=='j'&&bl[x2][y2-1]==0)
{
bl[x2][y2-1]=6;
bl[x2][y2]=0;
y2-=1;
}
else if(sr=='k'&&bl[x2+1][y2]==0)
{
bl[x2+1][y2]=6;
bl[x2][y2]=0;
x2+=1;
}
else if(sr=='l'&&bl[x2][y2+1]==0)
{
bl[x2][y2+1]=6;
bl[x2][y2]=0;
y2+=1;
}
if(sr=='m'&&fw[2]==0&&(x1==x2||y1==y2))
{
p[1].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[1].hp-=p[2].sh;
}
if(sr=='z'&&fw[1]==0&&(x1==x2||y1==y2))
{
p[2].hp-=p[1].sh;
}
if(sr=='z'&&fw[1]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[2].hp-=p[1].sh;
}
cls();
}
if(p[1].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家2胜利";
Sleep(1111);
system("cls");
return 1;
}
else
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家1胜利";
Sleep(1111);
system("cls");
return 1;
}
return 1;
}
int slz()
{
int x1=4,y1=2,x2=4,y2=33;
HideCursor();
while(p[1].hp>0&&p[2].hp>0)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(sl[i][j]==1)
{
cout<<"HH";
}
else if(sl[i][j]==5)
{
cout<<p[1].zy;
}
else if(sl[i][j]==6)
{
cout<<p[2].zy;
}
else
{
cout<<" ";
}
}
cout<<endl;
}
cout<<"\t\t\t玩家1hp:"<<p[1].hp<<" "<<"\t\t"<<"玩家2hp:"<<p[2].hp<<" "<<endl;
sr=getch();
if(sr=='w'&&sl[x1-1][y1]==0)
{
sl[x1-1][y1]=5;
sl[x1][y1]=0;
x1-=1;
}
else if(sr=='a'&&sl[x1][y1-1]==0)
{
sl[x1][y1-1]=5;
sl[x1][y1]=0;
y1-=1;
}
else if(sr=='s'&&sl[x1+1][y1]==0)
{
sl[x1+1][y1]=5;
sl[x1][y1]=0;
x1+=1;
}
else if(sr=='d'&&sl[x1][y1+1]==0)
{
sl[x1][y1+1]=5;
sl[x1][y1]=0;
y1+=1;
}
else if(sr=='i'&&sl[x2-1][y2]==0)
{
sl[x2-1][y2]=6;
sl[x2][y2]=0;
x2-=1;
}
else if(sr=='j'&&sl[x2][y2-1]==0)
{
sl[x2][y2-1]=6;
sl[x2][y2]=0;
y2-=1;
}
else if(sr=='k'&&sl[x2+1][y2]==0)
{
sl[x2+1][y2]=6;
sl[x2][y2]=0;
x2+=1;
}
else if(sr=='l'&&sl[x2][y2+1]==0)
{
sl[x2][y2+1]=6;
sl[x2][y2]=0;
y2+=1;
}
if(sr=='m'&&fw[2]==0&&(x1==x2||y1==y2))
{
p[1].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[1].hp-=p[2].sh;
}
if(sr=='z'&&fw[1]==0&&(x1==x2||y1==y2))
{
p[2].hp-=p[1].sh;
}
else if(sr=='z'&&fw[1]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[2].hp-=p[1].sh;
}
cls();
}
if(p[1].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家2胜利";
Sleep(1111);
system("cls");
return 1;
}
else
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家1胜利";
Sleep(1111);
system("cls");
return 1;
}
return 1;
}
int jjtld()
{
HideCursor();
int x1=2,y1=16,x2=17,y2=2,x3=31,y3=16;
while(p[1].hp>0&&p[2].hp>0||p[2].hp>0&&p[3].hp>0||p[1].hp>0&&p[3].hp>0)
{
for(int i=1;i<=32;i++)
{
for(int j=0;j<=35;j++)
{
if(jjt[i][j]==1)
{
cout<<"HH";
}
else if(jjt[i][j]==5)
{
cout<<p[1].zy;
}
else if(jjt[i][j]==6)
{
cout<<p[2].zy;
}
else if(jjt[i][j]==7)
{
cout<<p[3].zy;
}
else if(jjt[i][j]==10)
{
cout<<"×";
}
else
{
cout<<" ";
}
}
cout<<endl;
}
cout<<"\t玩家1hp:"<<p[1].hp<<" "<<"\t"<<"玩家2hp:"<<p[2].hp<<" \t"<<"玩家3hp:"<<p[3].hp<<endl;
sr=getch();
if(p[1].hp>0)
{
if(sr=='w'&&jjt[x1-1][y1]==0)
{
jjt[x1-1][y1]=5;
jjt[x1][y1]=0;
x1-=1;
}
else if(sr=='a'&&jjt[x1][y1-1]==0)
{
jjt[x1][y1-1]=5;
jjt[x1][y1]=0;
y1-=1;
}
else if(sr=='s'&&jjt[x1+1][y1]==0)
{
jjt[x1+1][y1]=5;
jjt[x1][y1]=0;
x1+=1;
}
else if(sr=='d'&&jjt[x1][y1+1]==0)
{
jjt[x1][y1+1]=5;
jjt[x1][y1]=0;
y1+=1;
}
if(sr=='z'&&fw[1]==0&&(x1==x3||y1==y3))
{
p[3].hp-=p[1].sh;
}
if(sr=='z'&&fw[1]>=sqrt(abs(x1-x3)*abs(x1-x3)+abs(y1-y3)*abs(y1-y3)))
{
p[3].hp-=p[1].sh;
}
if(sr=='z'&&fw[1]==0&&(x1==x2||y1==y2))
{
p[2].hp-=p[1].sh;
}
else if(sr=='z'&&fw[1]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[2].hp-=p[1].sh;
}
}
else
{
jjt[x1][y1]=10;
}
if(p[2].hp>0)
{
if(sr=='i'&&jjt[x2-1][y2]==0)
{
jjt[x2-1][y2]=6;
jjt[x2][y2]=0;
x2-=1;
}
else if(sr=='j'&&jjt[x2][y2-1]==0)
{
jjt[x2][y2-1]=6;
jjt[x2][y2]=0;
y2-=1;
}
else if(sr=='k'&&jjt[x2+1][y2]==0)
{
jjt[x2+1][y2]=6;
jjt[x2][y2]=0;
x2+=1;
}
else if(sr=='l'&&jjt[x2][y2+1]==0)
{
jjt[x2][y2+1]=6;
jjt[x2][y2]=0;
y2+=1;
}
if(sr=='m'&&fw[2]==0&&(x1==x2||y1==y2))
{
p[1].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[1].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]==0&&(x2==x3||y2==y3))
{
p[3].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x3-x2)*abs(x3-x2)+abs(y3-y2)*abs(y3-y2)))
{
p[3].hp-=p[2].sh;
}
}
else
{
jjt[x2][y2]=10;
}
if(p[3].hp>0)
{
if(sr=='t'&&jjt[x3-1][y3]==0)
{
jjt[x3-1][y3]=7;
jjt[x3][y3]=0;
x3-=1;
}
else if(sr=='f'&&jjt[x3][y3-1]==0)
{
jjt[x3][y3-1]=7;
jjt[x3][y3]=0;
y3-=1;
}
else if(sr=='g'&&jjt[x3+1][y3]==0)
{
jjt[x3+1][y3]=7;
jjt[x3][y3]=0;
x3+=1;
}
else if(sr=='h'&&jjt[x3][y3+1]==0)
{
jjt[x3][y3+1]=7;
jjt[x3][y3]=0;
y3+=1;
}
if(sr=='b'&&fw[3]==0&&(x1==x3||y1==y3))
{
p[1].hp-=p[3].sh;
}
else if(sr=='b'&&fw[3]>=sqrt(abs(x1-x3)*abs(x1-x3)+abs(y1-y3)*abs(y1-y3)))
{
p[1].hp-=p[3].sh;
}
if(sr=='b'&&fw[3]==0&&(x3==x2||y3==y2))
{
p[2].hp-=p[3].sh;
}
else if(sr=='b'&&fw[3]>=sqrt(abs(x3-x2)*abs(x3-x2)+abs(y3-y2)*abs(y3-y2)))
{
p[2].hp-=p[3].sh;
}
}
else
{
jjt[x3][y3]=10;
}
cls();
}
if(p[1].hp<=0&&p[3].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家2胜利";
Sleep(1111);
system("cls");
return 1;
}
else if(p[2].hp<=0&&p[3].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家1胜利";
Sleep(1111);
system("cls");
return 1;
}
else
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家3胜利";
Sleep(1111);
system("cls");
return 1;
}
return 1;
}
int yzfcd()
{
HideCursor();//4 5//5 26//25 28
int x1=3,y1=5,x2=4,y2=26,x3=24,y3=28;
while(p[1].hp>0&&p[2].hp>0||p[2].hp>0&&p[3].hp>0||p[1].hp>0&&p[3].hp>0)
{
for(int i=2;i<=31;i++)
{
for(int j=0;j<=35;j++)
{
if(yzfc[i][j]==1)
{
cout<<"HH";
}
else if(yzfc[i][j]==5)
{
cout<<p[1].zy;
}
else if(yzfc[i][j]==6)
{
cout<<p[2].zy;
}
else if(yzfc[i][j]==7)
{
cout<<p[3].zy;
}
else if(yzfc[i][j]==10)
{
cout<<"×";
}
else
{
cout<<" ";
}
}
cout<<endl;
}
cout<<"\t玩家1hp:"<<p[1].hp<<" "<<"\t"<<"玩家2hp:"<<p[2].hp<<" \t"<<"玩家3hp:"<<p[3].hp;
sr=getch();
if(p[1].hp>0)
{
if(sr=='w'&&yzfc[x1-1][y1]==0)
{
yzfc[x1-1][y1]=5;
yzfc[x1][y1]=0;
x1-=1;
}
else if(sr=='a'&&yzfc[x1][y1-1]==0)
{
yzfc[x1][y1-1]=5;
yzfc[x1][y1]=0;
y1-=1;
}
else if(sr=='s'&&yzfc[x1+1][y1]==0)
{
yzfc[x1+1][y1]=5;
yzfc[x1][y1]=0;
x1+=1;
}
else if(sr=='d'&&yzfc[x1][y1+1]==0)
{
yzfc[x1][y1+1]=5;
yzfc[x1][y1]=0;
y1+=1;
}
if(sr=='z'&&fw[1]==0&&(x1==x3||y1==y3))
{
p[3].hp-=p[1].sh;
}
if(sr=='z'&&fw[1]>=sqrt(abs(x1-x3)*abs(x1-x3)+abs(y1-y3)*abs(y1-y3)))
{
p[3].hp-=p[1].sh;
}
if(sr=='z'&&fw[1]==0&&(x1==x2||y1==y2))
{
p[2].hp-=p[1].sh;
}
else if(sr=='z'&&fw[1]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[2].hp-=p[1].sh;
}
}
else
{
yzfc[x1][y1]=10;
}
if(p[2].hp>0)
{
if(sr=='i'&&yzfc[x2-1][y2]==0)
{
yzfc[x2-1][y2]=6;
yzfc[x2][y2]=0;
x2-=1;
}
else if(sr=='j'&&yzfc[x2][y2-1]==0)
{
yzfc[x2][y2-1]=6;
yzfc[x2][y2]=0;
y2-=1;
}
else if(sr=='k'&&yzfc[x2+1][y2]==0)
{
yzfc[x2+1][y2]=6;
yzfc[x2][y2]=0;
x2+=1;
}
else if(sr=='l'&&yzfc[x2][y2+1]==0)
{
yzfc[x2][y2+1]=6;
yzfc[x2][y2]=0;
y2+=1;
}
if(sr=='m'&&fw[2]==0&&(x1==x2||y1==y2))
{
p[1].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x1-x2)*abs(x1-x2)+abs(y1-y2)*abs(y1-y2)))
{
p[1].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]==0&&(x2==x3||y2==y3))
{
p[3].hp-=p[2].sh;
}
if(sr=='m'&&fw[2]>=sqrt(abs(x3-x2)*abs(x3-x2)+abs(y3-y2)*abs(y3-y2)))
{
p[3].hp-=p[2].sh;
}
}
else
{
yzfc[x2][y2]=10;
}
if(p[3].hp>0)
{
if(sr=='t'&&yzfc[x3-1][y3]==0)
{
yzfc[x3-1][y3]=7;
yzfc[x3][y3]=0;
x3-=1;
}
else if(sr=='f'&&yzfc[x3][y3-1]==0)
{
yzfc[x3][y3-1]=7;
yzfc[x3][y3]=0;
y3-=1;
}
else if(sr=='g'&&yzfc[x3+1][y3]==0)
{
yzfc[x3+1][y3]=7;
yzfc[x3][y3]=0;
x3+=1;
}
else if(sr=='h'&&yzfc[x3][y3+1]==0)
{
yzfc[x3][y3+1]=7;
yzfc[x3][y3]=0;
y3+=1;
}
if(sr=='b'&&fw[3]==0&&(x1==x3||y1==y3))
{
p[1].hp-=p[3].sh;
}
else if(sr=='b'&&fw[3]>=sqrt(abs(x1-x3)*abs(x1-x3)+abs(y1-y3)*abs(y1-y3)))
{
p[1].hp-=p[3].sh;
}
if(sr=='b'&&fw[3]==0&&(x3==x2||y3==y2))
{
p[2].hp-=p[3].sh;
}
else if(sr=='b'&&fw[3]>=sqrt(abs(x3-x2)*abs(x3-x2)+abs(y3-y2)*abs(y3-y2)))
{
p[2].hp-=p[3].sh;
}
}
else
{
yzfc[x3][y3]=10;
}
cls();
}
if(p[1].hp<=0&&p[3].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家2胜利";
Sleep(1111);
system("cls");
return 1;
}
else if(p[2].hp<=0&&p[3].hp<=0)
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家1胜利";
Sleep(1111);
system("cls");
return 1;
}
else
{
system("cls");
cout<<"\n\n\n\n\n\t\t\t玩家3胜利";
Sleep(1111);
system("cls");
return 1;
}
return 1;
}
int ld1()
{
int dt;
system("cls");
cout<<"\t\t\t人物选择\n\n";
cout<<"\t\t\t\t玩家1:\n\t\t\t\t 1.射手(对大范围造成小部分伤害) \n \t\t\t\t 2.刺客(对小范围造成大量伤害) \n \t\t\t\t 3.坦克(极高的血量) \n\t\t\t\t 4.机器人(对同一行,列造成巨额伤害)\n";
cin>>p[1].rw;
if(p[1].rw==1)
{
p[1].zy="射";
fw[1]=4;
p[1].hp=100;
p[1].sh=5;
}
else if(p[1].rw==2)
{
p[1].zy="H ";
p[1].hp=100;
p[1].sh=30;
fw[1]=2;
}
else if(p[1].rw==3)
{
p[1].zy="盾";
p[1].hp=300;
p[1].sh=7;
fw[1]=2;
}
else
{
p[1].zy="≌";
p[1].hp=60;
p[1].sh=60;
fw[1]=0;
}
cout<<"\t\t\t\t玩家2:\n\t\t\t\t 1.射手(对大范围造成小部分伤害) \n \t\t\t\t 2.刺客(对小范围造成大量伤害) \n \t\t\t\t 3.坦克(极高的血量) \n\t\t\t\t 4.机器人(对同一行,列造成巨额伤害)\n";
cin>>p[2].rw;
if(p[2].rw==1)
{
p[2].zy="射";
fw[2]=4;
p[2].hp=100;
p[2].sh=5;
}
else if(p[2].rw==2)
{
p[2].zy="H ";
p[2].hp=100;
p[2].sh=30;
fw[2]=2;
}
else if(p[2].rw==3)
{
p[2].zy="盾";
p[2].hp=300;
p[2].sh=7;
fw[2]=2;
}
else
{
p[2].zy="≌" ;
p[2].hp=60;
p[2].sh=60;
fw[2]=0;
}
system("cls");
cout<<"\n\n\n\n\n\n\t玩家1控制:w,a,s,d 玩家2控制:i,j,k,l\n";
cout<<"\t\t玩家1:z键攻击 玩家2:m键攻击\n";
Sleep(7000);
system("cls");
cout<<"\n\n\n\n\n\n\t\t地图:1.壁垒攻守 2.森林寻敌";
cin>>dt;
system("cls");
for(int i=1;i<=4;i++)
{
cout<<"\n\n\n\n\n\n\n\n\t\t\t\t载入中";
for(int j=1;j<=3;j++)
{
cout<<".";
Sleep(200);
}
system("cls");
}
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
bl[i][j]=blf[i][j];
sl[i][j]=slf[i][j];
}
}
if(dt==1)
{
system("cls");
blz();
}
else if(dt==2)
{
system("cls");
slz();
}
return 1;
}
int rld3()
{
int dt;
system("cls");
cout<<"\t\t\t人物选择\n\n";
cout<<"\t\t\t\t玩家1:\n\t\t\t\t 1.射手(对大范围造成小部分伤害) \n \t\t\t\t 2.刺客(对小范围造成大量伤害) \n \t\t\t\t 3.坦克(极高的血量) \n\t\t\t\t 4.机器人(对同一行,列造成巨额伤害)\n";
cin>>p[1].rw;
if(p[1].rw==1)
{
p[1].zy="射";
fw[1]=4;
p[1].hp=100;
p[1].sh=5;
}
else if(p[1].rw==2)
{
p[1].zy="H ";
p[1].hp=100;
p[1].sh=30;
fw[1]=2;
}
else if(p[1].rw==3)
{
p[1].zy="盾";
p[1].hp=300;
p[1].sh=7;
fw[1]=2;
}
else
{
p[1].zy="≌";
p[1].hp=60;
p[1].sh=60;
fw[1]=0;
}
cout<<"\t\t\t\t玩家2:\n\t\t\t\t 1.射手(对大范围造成小部分伤害) \n \t\t\t\t 2.刺客(对小范围造成大量伤害) \n \t\t\t\t 3.坦克(极高的血量) \n\t\t\t\t 4.机器人(对同一行,列造成巨额伤害)\n";
cin>>p[2].rw;
if(p[2].rw==1)
{
p[2].zy="射";
fw[2]=4;
p[2].hp=100;
p[2].sh=5;
}
else if(p[2].rw==2)
{
p[2].zy="H ";
p[2].hp=100;
p[2].sh=30;
fw[2]=2;
}
else if(p[2].rw==3)
{
p[2].zy="盾";
p[2].hp=300;
p[2].sh=7;
fw[2]=2;
}
else
{
p[2].zy="≌" ;
p[2].hp=60;
p[2].sh=60;
fw[2]=0;
}
cout<<"\t\t\t\t玩家3:\n\t\t\t\t 1.射手(对大范围造成小部分伤害) \n \t\t\t\t 2.刺客(对小范围造成大量伤害) \n \t\t\t\t 3.坦克(极高的血量) \n\t\t\t\t 4.机器人(对同一行,列造成巨额伤害)\n";
cin>>p[3].rw;
if(p[3].rw==1)
{
p[3].zy="射";
fw[3]=4;
p[3].hp=100;
p[3].sh=5;
}
else if(p[3].rw==2)
{
p[3].zy="H ";
p[3].hp=100;
p[3].sh=30;
fw[3]=2;
}
else if(p[3].rw==3)
{
p[3].zy="盾";
p[3].hp=300;
p[3].sh=7;
fw[3]=2;
}
else
{
p[3].zy="≌";
p[3].hp=60;
p[3].sh=60;
fw[3]=0;
}
system("cls");
cout<<"\n\n\n\n\n\n\t玩家1控制:w,a,s,d 玩家2控制:i,j,k,l 玩家3控制:t f g h\n";
cout<<"\t\t玩家1:z键攻击 玩家2:m键攻击 玩家3键攻击\n";
Sleep(7000);
system("cls");
cout<<"\n\n\n\n\n\n\t\t地图:1.竞技场 2.空间站";
cin>>dt;
system("cls");
for(int i=1;i<=4;i++)
{
cout<<"\n\n\n\n\n\n\n\n\t\t\t\t载入中";
for(int j=1;j<=3;j++)
{
cout<<".";
Sleep(200);
}
system("cls");
}
for(int i=0;i<=35;i++)
{
for(int j=0;j<=35;j++)
{
jjt[i][j]=jjtf[i][j];
}
}
for(int i=0;i<=35;i++)
{
for(int j=0;j<=35;j++)
{
yzfc[i][j]=yzfcf[i][j];
}
}
if(dt==1)
{
system("cls");
jjtld();
}
if(dt==2)
{
system("cls");
yzfcd();
}
return 1;
}
int gs()
{
system("cls");
cout<<"\n\n\t\t\t\t古树贡献榜(前5)\n\n";
cout<<"\t\t\t1.王文博\n\t\t\t2.邓涵睿\n\t\t\t3.沈峻宇\n\t\t\t4.余彦文\n\t\t\t5.曹博扬\n\t\t\t6.李玥仑\n\t\t\t特别贡献:沙宸安\n";
cout<< "\n\t\t\t\t探索榜\n\t\t\t1.张恩泽\n";
system("pause");
return 1;
}
int gus()
{
system("cls");
int xz;
while(1)
{
cout<<" \t\t\t乱斗模式(多人)\n\n";
cout<<"\t\t[---------------------------------]\n";
cout<<"\t\t[ 1.双人 2.三人 3.古树 4.退出 ]\n";
cout<<"\t\t[---------------------------------]\n";
cout<<"\t\t\t您的选择:";
cin>>xz;
if(xz==1)
{
ld1();
}
if(xz==2)
{
rld3();
Sleep(1500);
}
if(xz==3)
{
gs();
}
if(xz==4)
{
system("cls");
return 1;
}
system("cls");
}
return 1;
}
void H1()
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);
CursorInfo.bVisible = false;
SetConsoleCursorInfo(handle, &CursorInfo);
}
void H()
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);
CursorInfo.bVisible = false;
SetConsoleCursorInfo(handle, &CursorInfo);
}
int gushi()
{
ren="〓";
system("cls");
cout<<"我看到你所说的那位玩家了。\n";Sleep(4000);
cout<<name<<"?\n";Sleep(4000);
cout<<"是的。小心。他现在已达到了更高的境界。他能阅读我们的思想。\n";Sleep(4000);
cout<<"无伤大雅。他认为我们是游戏的一部分。\n";Sleep(4000);
cout<<"我喜欢这个玩家。他玩得很好。他没有半途而废。\n";Sleep(4000);
cout<<"他以屏幕上出现的文字的形式阅读着我们的思想。\n";Sleep(4000);
cout<<"当他深陷游戏的梦境时,他总以这种方式想象出形形**的事物。\n";Sleep(4000);
cout<<"文字创造造出了一种美妙的界面。非常灵活。而且比起凝视屏幕后的现实来说,不会让人那么恐惧。\n";Sleep(4000);
cout<<"在玩家能够阅读之前,他们也曾经听到过声音。那些不曾游玩的人们称呼玩家为女巫、术士。玩家们梦见他们自己乘坐在被恶魔施法的棍子上,在天空中翱翔。\n";Sleep(4000);
cout<<"这个玩家梦见了什么?\n";Sleep(4000);
cout<<"梦见了阳光与树木。梦见了火与水。他梦见他创造。亦梦见他毁灭。它梦见他在狩猎,亦梦见被狩猎。他梦见了庇护所。\n";Sleep(4000);
cout<<"哈,那原始的界面。经历一百万年的岁月,它依然在工作。但这个玩家在屏幕后的真实里,到底创造了什么真实的构造?\n";Sleep(4000);
cout<<"他辛勤地劳作,与其他数百万玩家一起,在[IUAfugDSHJC]的折叠中创造了一个真实的世界,并在[*^&*SHGF]中为[^%^$^$DRT]创造了一个[YT*TT^^&*$j]。\n";Sleep(4000);
cout<<"他读不出那个思绪。\n";Sleep(4000);
cout<<"不。他还没有达到那最高的境界。为了达到那层境界,他必须完成生命的长梦,而非游戏中的黄粱一梦。\n";Sleep(4000);
cout<<"他知道我们爱他么?他知道这个宇宙是仁慈的吗?\n";Sleep(4000);
cout<<"有时,在思绪的杂音中,他听到了宇宙。是的。\n";Sleep(4000);
cout<<"但是在许多时候他陷入悲伤,在那漫漫长梦中。他创造了没有夏日的世界,他在黑日下颤抖着,将自己悲伤的创造视为现实世界。\n";Sleep(4000);
cout<<"试图治愈他的悲伤会毁掉他。解决悲伤是他的个人事务。我们不能干涉。\n";Sleep(4000);
cout<<"有时当他们深陷梦境中时,我想要告诉他们,他们在现实中创造了真实的世界。有时我想告诉他们他们对宇宙的重要**。有时,当他们短时间内失去了与宇宙真正的联系,我想帮助他们说出他们所恐惧的话语。\n";Sleep(4000);
cout<<"有时我毫不在意。有时我想要去告诉他们,这个被你们当做真实的世界仅仅是[%^$^$&]和[(&^^$^$@!#!)],我想要去告诉他们,他们是[^%&*FT!]中的[FJGJYTD]。他们在长梦中,所见到的真实太少了。\n";Sleep(4000);
cout<<"而他们仍然在玩这个游戏。\n";Sleep(4000);
cout<<"但实际上很容易就可以告诉他们……\n";Sleep(4000);
cout<<"这个梦对他来说太强烈了。告诉他们如何活着就是阻碍他们活下去。\n";Sleep(4000);
cout<<"我不会告诉这个玩家如何生活的。\n";Sleep(4000);
cout<<"这个玩家正在变得焦虑。\n";Sleep(4000);
cout<<"我会告诉这个玩家一个故事。\n";Sleep(4000);
cout<<"但不是真相。\n";Sleep(4000);
cout<<"不是。是在文字牢笼中严密包裹着的真相。而不是赤****的真相。\n";Sleep(4000);
cout<<"再一次赋予他身体。\n";Sleep(4000);
cout<<"是的,玩家\n";Sleep(4000);
cout<<"称呼他的名字。\n";Sleep(4000);
cout<<name<<",游戏的玩家。\n";Sleep(4000);
cout<<"很好。\n";Sleep(4000);
cout<<"深呼吸,再深呼吸一次。感受空气充盈你的肺叶。让你的四肢回归。运动你的手指。再次感受你的身体,在重力下,在空气中。在长梦中**。你感受到了。你的身体再一次触碰着宇宙的每一处,仿佛你是一群**的个体。仿佛我们是一群**的个体。\n";Sleep(4000);
cout<<"我们是谁?我们一度被称为山的魂魄。太阳父亲,月亮**。古老的英灵,动物的魂魄。神祗。鬼魂。小绿人。而后是神,恶魔,天使。喧闹鬼。外星人,地外生物。轻粒子,夸克。词语不断地变化。我们始终如一。\n";Sleep(4000);
cout<<"我们是宇宙。我们是一切你认为的除你之外的事物。现在你正在看着我们,用你的眼睛与肌肤。而为什么宇宙触**的皮肤,向你投出一片光芒?为了看到你,玩家。为了彼此了解。我要告诉你一个故事。\n";Sleep(4000);
cout<<"很久以前,有一个玩家。\n";Sleep(4000);
cout<<"那玩家就是你,"<<name<<"\n";Sleep(4000);
cout<<"有时他认为自己是一个人类,在那融化岩石构成的旋转球体的一层薄薄的表皮上。那融化岩石的球体环绕着一个质量大它三十三万倍的炫目气体球旋转。它们是相隔得如此之远,以至于光需要八分钟才能穿越那空隙。那光是来自一颗恒星的信息,而它能够在一亿五千万公里外灼烧你的皮肤。\n";Sleep(4000);
cout<<"有时这个玩家梦见他是一个矿工,在一个并不平坦的、无限延展的世界的地表上。太阳是一个白色的方块。昼夜交替很快;要做的事情也很多;**亡也只是暂时的不便。\n";Sleep(4000);
cout<<"有时,这玩家梦见它迷失在了一个故事里。\n";Sleep(4000);
cout<<"有时,这玩家梦见它成为了其它的事物,在其它地方。有时这些梦是令人不安的。有时却是美丽的。这个玩家从一个梦中醒来,又落入了第二个梦,又从这个梦中落入到了第三个梦中。\n";Sleep(4000);
cout<<"有时这个玩家梦见他在屏幕上看着文字。\n";Sleep(4000);
cout<<"让我们回退一点。\n";Sleep(4000);
cout<<"组成玩家的原子散布在草中,河流中,在空气中,在大地中。一个女人收集了那些原子;她饮用、进食、吸入;而后那女人在她的身体中,**育了玩家。\n";Sleep(4000);
cout<<"然后那玩家醒来了,从他的**体内那个温暖、昏暗的世界中,进入了漫漫长梦。\n";Sleep(4000);
cout<<"那玩家是一个新的故事,从未被讲述过,由的语言书写着。那玩家是一个新的程序,从未被运行过,由上亿年前的源代码生成。那玩家是一个新的人类,从未存在过,由**汁和爱组成。\n";Sleep(4000);
cout<<"你就是那玩家。那个故事。那个程序。那个人类。仅仅是由**汁和爱组成。\n";Sleep(4000);
cout<<"我们再往更远的过去回退一点。\n";Sleep(4000);
cout<<"那由七千亿亿亿的原子组成的玩家的身体被创造了,远在这游戏之前,在一颗恒星的内部。所以那玩家也是,来自一颗恒星的信息。而这个玩家贯穿这个故事的始末,这故事源于一个叫朱利安的人种下的信息种子长成的森林,源于一个叫马库斯的人创造的无限世界,存在于一个由玩家创造的小的,私密的世界里,而那又继承了宇宙创造的……\n";Sleep(4000);
cout<<"嘘。有时这个玩家创造的属于自己的小天地是柔软、温暖和简单的。有时是坚硬、冰冷和复杂的。有时他建造出了他脑中的宇宙的模型;斑斑点点的能量穿越广阔空旷的空间。有时他称呼这些斑点为“电子”和“质子”。\n";Sleep(4000);
cout<<"有时他称呼他们为“行星”和“恒星”。\n";Sleep(4000);
cout<<"有时他确信他存在于一个由“开”和“关”;“0”和“”组成的世界;存在于一个由一行行的代码组成的宇宙。有时他确信他是在玩一个游戏。有时他确信他是在读着屏幕上的文字。\n";Sleep(4000);
cout<<"你就是那玩家,阅读着文字……\n";Sleep(4000);
cout<<"嘘……有时这玩家读屏幕上的一行行代码。将它们解读为文字;将文字解读为含义;将含**读为感受、情绪、理论、想法,而玩家开始急促而剧烈地呼吸,并意识到了他是活着的,那上千次的**亡不是真的,玩家是活着的。\n";Sleep(4000);
cout<<"你,你,你是活着的。\n";Sleep(4000);
cout<<"而有时这玩家相信宇宙通过夏日树叶下洒下的斑斓的阳光与他对话。\n";Sleep(4000);
cout<<"有时这玩家相信宇宙透过晴朗的冬日夜空中,存在于他眼中一隅星光,可能比太阳大上上百万倍的恒星沸腾着的电浆那一瞬间发出来的光对他说话,在从宇宙尽头归来的路上,突然闻到了食物的香气,在那熟悉的门前,他又准备好再一次投入梦境。\n";Sleep(4000);
cout<<"而有时玩家相信宇宙透过“0”和“”,透过世界的电力,透过屏幕上**动的文字和梦的尽头对他说话。\n";Sleep(4000);
cout<<"宇宙说我爱你。\n";Sleep(4000);
cout<<"宇宙说你玩得很好。\n";Sleep(4000);
cout<<"宇宙说一切你所需要的你都具有。\n";Sleep(4000);
cout<<"宇宙说你比你所估计的更强大。\n";Sleep(4000);
cout<<"宇宙说你就是阳光。\n";Sleep(4000);
cout<<"宇宙说你就是黑夜。\n";Sleep(4000);
cout<<"宇宙说你所抗争的黑暗就在你心中。\n";Sleep(4000);
cout<<"宇宙说你所追寻的光明就在你心中。\n";Sleep(4000);
cout<<"宇宙说你并不是一个人在战斗。\n";Sleep(4000);
cout<<"宇宙说你与其他事物是一体的。\n";Sleep(4000);
cout<<"宇宙说你就是宇宙,品味自己,与自己对话,阅读着他自己的代码。。\n";Sleep(4000);
cout<<"宇宙说我爱你,因为你就是爱。\n";Sleep(4000);
cout<<"游戏结束了,玩家从梦中醒来。玩家开始了新的梦境。玩家再次做起了梦,更好的梦。玩家就是宇宙。玩家就是爱。\n";Sleep(4000);
cout<<"你就是那个玩家。\n";Sleep(4000);
cout<<"该醒了。\n";Sleep(5000);
cout<<"致敬MC陪伴我的8个春秋 --子逸" ;Sleep(5000);
system("cls");
return 1;
}
int zi()
{
system("cls");
int pfl=0;
if(z<=5)
{
cheng="超级小萌新";
}
else if(z<=10)
{
cheng="萌新玩家";
}
else if(z<=15)
{
cheng="普通玩家";
}
else if(z<=20)
{
cheng="老玩家";
}
else if(z<=25)
{
cheng="骨灰级老玩家";
}
else if(z<=30)
{
cheng="游戏忠粉";
}
else if(z>30)
{
cheng="行走 荣耀玩家";
if(pfl==0)
{
pf.jl++;
pf.pi[pf.jl]="忠";
pfl=1;
}
}
cout<<" --------------------资历-------------------\n\n";
cout<<"\t\t\t经验:"<<z<<"\n\t\t"<<"你的称号:"<<cheng;
if(cheng=="行走 荣耀玩家")
{
cout<<"\n\t已拥有皮肤:忠";
}
Sleep(3000);
system("cls");
return 1;
}
int dnjh()
{
cout<<"\n\n\n\n\t\t\t修改完后数据将重置 \n\t\t\t你想要的修改的金币数量(200000~-200000):";
cin>>qi;
if(qi>=200000)
{
qi=200000;
}
else if(qi<=-200000)
{
qi=-200000;
}
cwhgd=0;sfy=0;cwm="";
hgd=0;
cout<<"重置完成!";
system("cls");
zhu();
}
int cong()//宠物**
{
srand(time(NULL));
while(1)
{
system("cls");
cout<<"\n\n\n\n\n\n\t\t\t欢迎来到宠物**!\n";
if(sfy==0)
{
cout<<"请领养一个宠物:1.摇钱树(产出大量金币) 2.神秘猫(我也不知道能干什么) 3.作者的电脑(我劝你别费钱了)\n\t\t\t\t你的选择:";
int cuxuz;
cin>>cuxuz;
if(cuxuz==1)
{
sfy=1;
cwm="摇钱树";
cwhgd=10000;
}
if(cuxuz==2)
{
sfy=1;
cwm="神秘猫";
cwhgd=20000;
}
if(cuxuz==3)
{
sfy=1;
cwm="电脑(作者的)";
cwhgd=60000;
}
system("cls");
}
int sswww;
sswww=rand()%4+1;
string zt[5]={" ","饥饿","生气","开心","休息"};
cout<<"\n\n\n\n\n\n\t\t你的宠物:"<<cwm<<" 状态:"<<zt[sswww]<<"\n";
cout<<"\t\t\t好感度:"<<hgd<<"/"<<cwhgd;
if(cwhgd==10000)
{
if(hgd>=10000)
{
cout<<"\n\t\t\t\t已激活 摇钱树\n";
ccfj=3;
Sleep(2000);
cwhgd=0;sfy=0;cwm="";
hgd=0;
system("cls");
zhu();
}
}
if(cwhgd==20000&&hgd>=20000)
{
cout<<"\n\t\t\t\t已激活 神秘猫(随机增加金币!)\n";
sjm=1;
Sleep(2000);
cwhgd=0;sfy=0;cwm="";
hgd=0;
system("cls");
zhu();
}
if(cwhgd==60000&&hgd>=60000)
{
cout<<"\n\t\t\t\t已激活 作者的电脑(修改参数)\n";
dnjh();//激活电脑;
}
cout<<"\n\t\t\t1.喂养宠物 2.打宠物 3.带他出去遛弯 4.退出";
cout<<"\n\t\t选择:";
int cwxz;
cin>>cwxz;
if(cwxz==1)
{
system("cls");
cout<<"\n\n\n\n\n\n\t\t\t你有鱼干"<<yg<<"份 肉肉"<<rr<<"份 狗粮"<<gl<<"份 奥利给"<<alg<<"份";
cout<<"\n\t\t\t你要喂宠物(1.鱼干 2.肉肉 3.狗粮 4.奥利给)1份?";
int weis;
cin>>weis;
if(weis==1)
{
int nsb;
cout<<"喂多少份?";
cin>>nsb;
if(yg>=nsb)
{
yg-=nsb;
cout<<"\t\t\t好感度+"<<nsb*100;
hgd+=nsb*100;
Sleep(1000);
}
else
{
cout<<"你喂了你的宠物一口空气......";
Sleep(1500);
}
}
if(weis==2)
{
int nsb;
cout<<"喂多少份?";
cin>>nsb;
if(rr>=nsb)
{
rr-=nsb;
cout<<"\t\t\t好感度+"<<nsb*200;
hgd+=nsb*200;
Sleep(1000);
}
else
{
cout<<"你喂了你的宠物一口空气......";
Sleep(1500);
}
}
if(weis==3)
{
int nsb;
cout<<"喂多少份?";
cin>>nsb;
if(gl>=nsb)
{
gl-=nsb;
cout<<"\t\t\t好感度+"<<nsb*300;
hgd+=nsb*300;
Sleep(1000);
}
else
{
cout<<"你喂了你的宠物一口空气......";
Sleep(1500);
}
}
if(weis==4)
{
int nsb;
cout<<"喂多少份?";
cin>>nsb;
if(alg>=nsb)
{
alg-=nsb;
int kkkka=0;
for(int i=1;i<=nsb;i++)
{
kkkka+=rand()%9900+100;
}
cout<<"\t\t\t好感度+"<<kkkka;
hgd+=kkkka;
Sleep(1000);
kkkka=0;
}
else
{
cout<<"你喂了你的宠物一口空气......";
Sleep(1500);
}
}
}
if(cwxz==2)
{
if(hgd<0)
{
cout<<"\n\t\t\t你的宠物离家出走了,你为了找到他 消耗了1000金币";
qi-=1000;
Sleep(1400);
}
else
{
cout<<"\n\t\t\t你怕是有毛病 好感度-1000,金币+100";
hgd-=1000;
qi+=100;
Sleep(1400);
}
}
if(cwxz==3)
{
if(sswww==1||sswww==4)
{
cout<<"\n\t\t\t你的宠物很烦你 =_=";
Sleep(1000);
}
else
{
cout<<"\n\t\t\t你与宠物的好感度增加了20";
hgd+=20;
Sleep(1000);
}
}
else
{
system("cls");
return 1;
}
system("cls");
}
}
int cang()
{
int i;
int ph;
system("cls");
cout<<"\t\t\t\t仓库\n\n\t\t";
for(i=1;i<=pf.jl;i++)
{
cout<<i<<"."<<pf.pi[i]<<" ";
if(i==13)
cout<<endl;
}
cout<<i+1<<".退出 ";
if(jih==1)
{
cout<<i+2<<"行走历史\n\t选择:";
cin>>ph;
if(ph==i+1)
{
system("cls");
return 1;
}
if(ph==1)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==2)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==3)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==4)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==5)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==6)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==7)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
} if(ph==8)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==9)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==10)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==11)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==12)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==13)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==14)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==15)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==16)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==17)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==18)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==19)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==20)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==i+2)
{
gushi();
return 1;
}
}
else
{
cout<<"\n\t选择:";
cin>>ph;
if(ph==i+1)
{
system("cls");
return 1;
}
if(ph==1)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==2)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==3)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==4)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==5)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==6)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==7)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
} if(ph==8)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==9)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==10)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==11)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==12)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==13)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==14)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==15)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==16)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==17)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==18)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==19)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
if(ph==20)
{
cout<<"OK,穿戴完毕!";
ren=pf.pi[ph];
}
}
Sleep(2000);
system("cls");
return 1;
}
void hua()
{
system("color 70");
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\t\t 源自极昼游戏工坊创建者\n";Sleep(1500);
cout<<"\t\t\t\t\t纯属虚构 本人原创\n";Sleep(1500);
cout<<"\t\t\t\t\t详情请见洛谷团队\n";Sleep(1500);
cout<<"\t\t\t\t 地狱来临 是 行走 的15.0.06版本\n";Sleep(1500);
cout<<"\t\t\t\t为了大家的体验效果 请打开英文输入法\n";Sleep(1500);
cout<<"\t\t\t\t输入数据时核对一下 输入数字时不能有英文\n";Sleep(1500);
cout<<"\t\t\t\t360找到你的时候麻烦通过一下,程序可能被当成病毒了!\n";Sleep(2000);
cout<<"\t\t\t\t行走官方欢迎您游玩此游戏 谢谢!"; Sleep(5000);
system("cls");
system("color 07");
}
int ce()
{
int x=::MessageBox(NULL, TEXT(" 地狱来临,备战!\n 恐惧传说"), TEXT("新版本!"), 0);
printf("%d\n", x);
z++;
system("cls");
hua();
cout<<"\t\t\t\t存档许可\n\n\n\n\n\n";
cout<<"\t\t\t 1.旧的存档 2.新的世界\n";
int cus1;
cin>>cus1;
system("cls");
if(cus1==1)
{
ifstream fin("存档.txt"); //输入重定向,输入数据将从in.txt文件中读取
fin>>qi;
fin>>pf.jl;
for(int i=1;i<=pf.jl;i++)
{
fin>>pf.pi[i];
}
fin>>zl;
fin>>z;
fin>>name;
fin>>mpf;
fin>>du;
//cin>>cheng;
fin>>ren;
fin>>dlxui;
fin>>yg>>rr>>gl>>alg;
fin>>cwhgd>>cwm>>hgd>>ccfj>>sfy;
fin.close();//关闭文件
system("cls");
return 1;
}
else
{
cout<<"\t\t\t\t获取信息\n\n\n\n\n\n";
cout<<"\t\t\t名字(无限制):";
cin>>name;
if(name=="张恩泽"||name=="zhangenze")
{
qi=4000;
z+=3;
pf.jl++;
pf.pi[pf.jl]="±";
ren="±";
}
else if(name=="XA-KF"||name=="xa-kf")
{
qi=10000;
z+=100;
pf.jl++;
pf.pi[pf.jl]="∞";
ren="∞";
cout<<"\n\t\t\t\t欢迎回来 沙宸安\n";
Sleep(1000);
}
cout<<"\t\t\t\tOK,注册完成" ;
Sleep(1000);
system("cls");
return 1;
}
}
void dui(){
string dk;
system("cls") ;
cout<<"\n\n\n\n\n\n\n\t\t\t兑换码:";
cin>> dk;
if(dk==dhy&&du==0)
{
du=1;
qi+=500;
cout<<"\t\t\t获得皮肤:";
srand(time(NULL));
int jgy;
jgy=rand()%5+1;
if(jgy==1)
{
cout<<"€";
z++;
pf.jl++;
pf.pi[pf.jl]="€";
ren="€";
}
else if(jgy==2)
{
cout<<"※";
z++;
pf.jl++;
pf.pi[pf.jl]="※";
ren="※";
}
else if(jgy==3)
{
cout<<"¢";
z++;
pf.jl++;
pf.pi[pf.jl]="¢";
ren="¢";
}
else if(jgy==4)
{
cout<<"£";
z++;
pf.jl++;
pf.pi[pf.jl]="£";
ren="£";
}
else
{
cout<<"¤";
z++;
pf.jl++;
pf.pi[pf.jl]="¤";
ren="¤";
}
cout<<"\n\t\t\t金币+500";
dhy="";
Sleep(3000);
system("cls");
}
else if(du==1)
{
cout<<"\t\t\t兑换码已使用!!";
Sleep(2000);
system("cls");
}
else
{
cout<<"\t\t\t兑换码不对!!!";
Sleep(2000);
system("cls");
}
}
int zhu();
int si()
{
H();
system("cls");
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
int f;
char ch;
int x=2;
int y=8;
system("color 07");
s[2][4]=0;
while(1)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(s[i][j]==4)
{
cout<<"HH";
}
else if (s[i][j]==6)
{
cout<<" @";
}
else if(s[i][j]==1)
{
SetConsoleTextAttribute(hstdout, 0x0C);
cout<<"OT";
}
else if(s[i][j]==0)
{
cout<<" ";
}
else if(s[i][j]==9)
{
SetConsoleTextAttribute(hstdout, 0x0E);
cout<<ren;
}
else if(s[i][j]==8)
{
SetConsoleTextAttribute(hstdout, 0x0F);
cout<<"AA";
}
}
cout<<endl;
}
ch=getch();
if(ch=='o')
{
cout<<"\n\n\n\n\n\n\n\t\t\t\t自杀成功!!" ;
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
}
if(ch=='f')
{
if(f==1)
{
a[x][y-1]=0;
}
else if(f==2)
{
a[x][y+1]=0;
}
cls();
}
else if(ch=='a')
{
if(b[x][y-1]==6)
{
a[2][5]=6;
return 1;
}
if(s[x+1][y-1]==4)
{
s[x-4][y]==9;
s[x][y]=0;
x-=4;
cls();
}
f=1;
if(s[x+1][y-1]==8)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=3;
y=8;
}
else if(s[x+1][y-1]==0&&s[x+1][y]!=1)
{
s[x+1][y-1]=9;
s[x][y]=0;
x++;
y--;
cls();
}
else if(s[x][y-1]==1&&s[x-1][y-1]!=1)
{
s[x-1][y-1]=9;
s[x][y]=0;
x--;
y--;
cls();
}
else if(s[x][y-1]!=1)
{
s[x][y-1]=9;
s[x][y]=0;
y--;
cls();
}
else
{
system("cls");
}
}
else if(ch=='z'&&s[x-1][y]!=1)
{
if(s[x-1][y]==6)
{
}
s[x][y]=1;
s[x-1][y]=9;
x-=1;
cls();
}
else if(ch=='d')
{
if(s[x+1][y+1]==4)
{
s[x-4][y]==9;
s[x][y]=0;
x-=4;
cls();
}
else if(s[x][y+1]==6)
{
return 1;
s[x][y]=0;
y+=2;
}
f=2;
if(s[x+1][y+1]==8)
{
system("cls");
system("color 0F") ;
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(s[x+1][y+1]==0&&s[x-1][y+1]!=1)
{
s[x+1][y+1]=9;
s[x][y]=0;
x++;
y++;
cls();
}
else if(s[x][y+1]==1&&s[x-1][y+1]!=1)
{
s[x-1][y+1]=9;
s[x][y]=0;
x--;
y++;
cls();
}
else if(s[x][y+1]!=1)
{
s[x][y+1]=9;
s[x][y]=0;
y++;
cls();
}
else {
system("cls");
}
}
else if(ch=='w'&&s[x-1][y]!=1&&(s[x][y+1]||s[x][y-1]==1))
{
if(b[x-1][y]==6)
{
}
s[x-1][y]=9;
s[x][y]=0;
x--;
cls();
}
else if(ch=='s'&&s[x+1][y]!=1&&(s[x][y+1]==1||s[x][y-1]==1||s[x+1][y-1]==1||s[x+1][y+1]==1))
{
s[x+1][y]=9;
s[x][y]=0;
x++;
cls();
}
else
{
system("cls");
}
}
}
int huo()
{
int jia;
int kk;
int zho;
int xuxxx;
int h;
system("cls");
while(1)
{
cout<<"\t\t\t\t活动\n\n\n";
cout<<"\t1.王者之师活动 2.金币翻翻翻活动 3.行走史册活动 4.未来重启活动 5.六一欢乐** 0.退出";
cin>>h;
system("cls");
if(h==1)
{
while(1)
{
cout<<"\t\t\t王者之师皮肤活动!!!\n";
cout<<"\t\t\t花费50金币进行一次抽奖!!\n";
cout<<"\t\t有几率获得王者之师皮肤:□(来自王者的怒号)\n";
cout<<"\t\t\t1.开始抽奖 2.退出\n\n你的选择:";
cin>>xuxxx;
if(xuxxx==1)
{
srand(time(NULL));
zho=rand()%12+1;
if(zho==2)
{pf.jl++;
pf.pi[pf.jl]="□";
cout<<"\t\t"<<name<<"欧皇啊!!!获得皮肤!!! □";
ren="□";
z++;
}
else if(zho==1||zho==3||zho==4)
{
cout<<"\t\t\t获得70金币";
qi+=70;
z++;
}
else if(qi<50)
{
cout<<"\t\t\t金币不够了哦!!!" ;
}
else
{
cout<<"\t\t\t没有**哦!!";
}
qi-=50;
Sleep(1500);
system("cls");
}
else
{
system("cls");
break;
}
}
}
else if(h==2)
{
while(1)
{
cout<<"\t\t欢迎来到金币翻翻翻!!!(60金币1次)\n\n";
cout<<"\t\t 有几率抽到皮肤兑换码哦!!!(15分1)\n";
cout<<"\t\t 还可以翻倍金币!!!\n";
cout<<"\t\t 1.开始 2.退出\n" ;
cout<<"\t\t选择:";
cin>>kk;
if(kk==1)
{
srand(time(NULL));
jia=rand()%15+1;
if(qi<60)
{
cout<<"\t\t金币不够了哦!!";
qi+=60;
Sleep(1000);
}
else if(jia==3)
{
z++;
cout<<"\t\t啊啊啊,无情,兑换码是:";
cout<<dhm();
du=0;
Sleep(6000);
}
else if(jia==4||jia==5||jia==6)
{
z++;
cout<<"\t\t666金币翻2倍";
qi*=2;
Sleep(1000);
}
else if(jia==2)
{
z++;
pf.jl++;
pf.pi[pf.jl]="█";
cout<<"\t\t获得皮肤:█(数据加载错误)";
ren="█";
Sleep(2000);
}
else
{
cout<<"\t\t哈哈,"<<name<<"你没有抽到啊!!";
Sleep(1000);
}
qi-=60;
system("cls");
}
else
{
system("cls");
break;
}
}
}
else if(h==3)
{
while(1)
{
cout<<"\t\t欢迎来到行走史册\n";
cout<<"\t这里抽到的皮肤可以了解行走世界的历史哦\n";
cout<<"\t另外这个属于史诗级皮肤,超级难抽(50金币一次) 但很有趣(18/1)\n";
cout<<"\t 1.抽奖 2退出 选择:";
int yt,jig;
cin>>yt;
if(yt==1)
{
srand(time(NULL));
jig=rand()%18+1;
if(qi<50)
{
cout<<"\t你的金币不够了\n";
}
else if(jig==3)
{
z++;
pf.jl++;
pf.pi[pf.jl]="〓";
cout<<"\t你有资格看到历史。。。获取皮肤:〓\n";
ren="〓";
qi-=50;
jih=1;
}
else if(jig==1||jig==2||jig==4||jig==5||jig==6||jig==7||jig==8)
{
z++;
cout<<"\t金币+99......\n";
qi+=99;
}
else
{
z++;
cout<<"\t你什么都没有抽到...\n";
qi-=50;
}
Sleep(1000);
system("cls");
}
else
{
system("cls");
break;
}
}
}
else if(h==4)
{
while(1)
{
int sxzy;
cout<<"\t\t 重启未来!\n";
cout<<"\t\t助力活动 \n";
cout<<" 规则:投入的金币数量决定助力值(1-10000)多了没效果\n";
cout<<"\t\t\t1.开始 2.退出\n";
cin>>sxzy;
int n,k;
if(sxzy==1)
{
cout<<"你都入的金币数量:";
cin>>n;
if(qi-n<0)
{
cout<<"\t\t\t没钱啦!";
Sleep(1000);
system("cls");
}
else
{
cout<<"\t\t\t助力成功!";
zl+=n;
cout<<"剩余助力值:"<<10000-zl;
qi-=n;
if(10000-zl<=0)
{
cout<<"助力完成!获得未来重启专属限定皮肤!▓技能 空间波动(身后的方块会变形)";
pf.jl++;
pf.pi[pf.jl]="▓";
Sleep(2000);
}
Sleep(2000);
system("cls");
}
}
else
{
system("cls");
return 1;
}
}
}
else if(h==5)
{
cout<<"\t\t六一欢乐日 !\n";
cout<<"今天以后 每年六月一日都会给大家颁发无限金币!,当天随便玩!\n";
Sleep(5000);
system("cls");
}
else if(h==0)
{
return 1;
}
}
return 1;
}
int sh(){
string zidi;
int jj;
system("cls");
cout<<"\t\t\t\t商城\n\n";
cout<<"\t\t尊贵的"<<name<<" 您有金币:"<<qi<<endl;
cout<<"\t\t1.皮肤:QW 价格100(QwQ~呜)\n";
cout<<"\t\t2.皮肤:MC 价格150(MC**)\n";
cout<<"\t\t3.皮肤:OT 价格200(方块人)\n";
cout<<"\t\t4.皮肤: . 价格250(小不点)\n";
cout<<"\t\t5.皮肤:VC 价格300(dev c++)\n";
cout<<"\t\t6.皮肤:** 价格350(挡我者**)\n";
cout<<"\t\t7.皮肤:学 价格350(学海无涯)\n";
cout<<"\t\t8.皮肤:V8 价格400(来自VIP的光芒)\n";
cout<<"\t\t9.皮肤:め 价格500(闪烁之光)\n";
cout<<"\t\t10.皮肤:自定义 价格700\n";
cout<<"\t\t11.体力*100 价格10\n";
cout<<"\t\t12.体力*200 价格19\n";
cout<<"\t\t13.体力*500 价格49\n";
cout<<"\t\t14.体力*1000 价格90\n";
cout<<"\t\t15.宠物零食 鱼干 价格100\n";
cout<<"\t\t16.宠物零食 肉肉 价格200\n";
cout<<"\t\t17.宠物零食 狗粮!价格300\n";
cout<<"\t\t18.宠物零食 奥利给 价格500\n";
cout<<"\t\t0.退出\n";
cin>>jj;
if(jj==1&&qi>=100)
{
z++;
pf.jl++;
pf.pi[pf.jl]="QW";
qi-=100;
ren="QW";
}
else if(jj==1&&qi<100)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==2&&qi>=150)
{z++;
pf.jl++;
pf.pi[pf.jl]="MC";
qi-=150;
ren="MC";
}
else if(jj==2&&qi<150)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==3&&qi>=200)
{
z++;
pf.jl++;
pf.pi[pf.jl]="OT";
qi-=200;
ren="OT";
}
else if(jj==3&&qi<200)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==4&&qi>=250)
{
z++;
pf.jl++;
pf.pi[pf.jl]=" .";
qi-=250;
ren=" .";
}
else if(jj==4&&qi<250)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==5&&qi>=300)
{
z++;
pf.jl++;
pf.pi[pf.jl]="VC";
qi-=250;
ren="VC";
}
else if(jj==5&&qi<300)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==6&&qi>=350)
{
z+=2;
pf.jl++;
pf.pi[pf.jl]="**";
qi-=350;
ren="**";
}
else if(jj==6&&qi<350)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==7&&qi>=350)
{
z+=2;
pf.jl++;
pf.pi[pf.jl]="学";
qi-=350;
ren="学";
}
else if(jj==7&&qi<350)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==8&&qi>=400)
{
z++;
pf.jl++;
pf.pi[pf.jl]="V8";
qi-=400;
ren="V8";
}
else if(jj==8&&qi<400)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==9&&qi>=500)
{
z++;
ren="め";
qi-=500;
pf.jl++;
pf.pi[pf.jl]=ren;
}
else if(jj==9&&qi<500)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==10&&qi>=700)
{
z+=3;
cout<<"自定义:";
cin>>zidi;
ren[1]=zidi[1];
ren[0]=zidi[0];
qi-=700;
pf.jl++;
pf.pi[pf.jl]=ren;
}
else if(jj==10&&qi<700)
{
cout<<"没钱买什么皮肤?";
Sleep(1900);
}
if(jj==11&&qi>=10)
{
tl+=100;
}
else if(jj==11&&qi<10)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==12&&qi>=19)
{
tl+=200;
qi-=19;
}
else if(jj==12&&qi<19)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==13&&qi>=49)
{
tl+=500;
qi-=49;
}
else if(jj==13&&qi<49)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==14&&qi>=90)
{
tl+=1000;
qi-=90;
}
else if(jj==14&&qi<90)
{
cout<<"没钱买什么体力?";
Sleep(1900);
}
if(jj==15&&qi>=100)
{
cout<<"\n买多少份?";
int nsd;
cin>>nsd;
if(nsd*100<=qi)
{
yg+=nsd;
qi-=nsd*100;
}
else
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
}
else if(jj==15&&qi<100)
{
}
if(jj==16&&qi>=200)
{
cout<<"\n买多少份?";
int nsd;
cin>>nsd;
if(nsd*200<=qi)
{
rr+=nsd;
qi-=nsd*200;
}
else
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
}
else if(jj==16&&qi<200)
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
if(jj==17&&qi>=300)
{
cout<<"\n买多少份?";
int nsd;
cin>>nsd;
if(nsd*200<=qi)
{
gl+=nsd;
qi-=nsd*300;
}
else
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
}
else if(jj==16&&qi<300)
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
if(jj==18&&qi>=500)
{
cout<<"\n买多少份?";
int nsd;
cin>>nsd;
if(nsd*200<=qi)
{
alg+=nsd;
qi-=nsd*500;
}
else
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
}
else if(jj==18&&qi<500)
{
cout<<"没钱也想养宠物?";
Sleep(1900);
}
if(jj==0)
{
system("cls");
return 1;
}
system("cls");
}
int suo()
{
string ya="操作方法请看规则,o键自杀";
cout<<"\n\n\n\n\n\n\n\n\t\t\t\t";
for(int i=0;i<ya.size();i++)
{
cout<<ya[i];
Sleep(100);
}
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
a[i][j]=af[i][j];
b[i][j]=bf[i][j];
s[i][j]=sf[i][j];
difu[i][j]=difuf[i][j];
}
}
qi+=50*ccfj;
if(sjm)
{
srand(time(NULL));
int qish=rand()%990+10;
qi+=qish;
}
z++;
cout<<"\n\n\t\t\t";
cout<<"加载中...";
cout<<"\n\t\t\t";
for(int i=1;i<=10;i++)
{
cout<<"■";
Sleep(400);
}
Sleep(1000);
system("cls");
}
void gui(){
z++;
cout<<"@"<<name<<"规则是:\n";
Sleep(700);
cout<<"a键向左走,d键向右走\n";
Sleep(1500);
cout<<"w键爬墙,s键下墙\n";
Sleep(1500);
cout<<"f键挖掉面前的方块\n";
Sleep(1500);
cout<<"z键在脚下垫方块\n";
Sleep(1500);
cout<<"有主世界和神域两个世界,神域里一个是肉体,一个是灵魂\n";
Sleep(3000);
cout<<"每玩一局会获得50金币\n";
Sleep(1500);
cout<<"活动中可以获得大量金币,有几率获得兑换码!!!\n";
Sleep(2500);
cout<<"部分皮肤拥有皮肤特有领域的新世界!!\n" ;
Sleep(1500);
cout<<"如果**不掉 就按o键 会自杀!\n";
Sleep(1500);
cout<<"打开程序前看看有没有关闭上一个程序,不然会报错\n";
Sleep(2500);
cout<<"历史要在仓库里查看哦\n";
Sleep(1500);
cout<<"体力值为0时就**了,体力可在商城中购买!!!\n";
Sleep(3000);
cout<<"神域不消耗体力,因为活动的是灵魂!!!\n";
Sleep(2500);
cout<<"版权所有,未经允许不得盗版,例:迷你世界盗版MC\n";
Sleep(6000);
system("cls");
}
int tia();
int diyu();
void sj1()
{
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
system("color 04");
int x=8,y=31;
char ch;
int f;
while(1)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(a[i][j]==7)
{
cout<<"□";
}
else if (a[i][j]==6)
{
cout<<" @";
}
else if(a[i][j]==1)
{
SetConsoleTextAttribute(hstdout, 0x0C);
cout<<"OT";
}
else if(a[i][j]==0)
{
cout<<" ";
}
else if(a[i][j]==9)
{
SetConsoleTextAttribute(hstdout, 0x0E);
cout<<ren;
}
else if(a[i][j]==8)
{
SetConsoleTextAttribute(hstdout, 0x0F);
cout<<"AA";
}
}
cout<<endl;
}
cout<<"\t体力值:"<<tl<<" ";
ch=getch();
tl--;
/*if(shj%200==0&&zy!=1)
{
SetConsoleTextAttribute(hOut, BACKGROUND_RED |BACKGROUND_GREEN |BACKGROUND_BLUE |BACKGROUND_INTENSITY);
zy=1;
}
else if(shj%200==0&&zy!=0)
{
system("color 80");
zy=0;
}*/
if(ch=='o')
{
cout<<"\n\n\n\n\n\n\n\t\t\t\t自杀成功!!" ;
cout<<(char)7;
Sleep(2000);
system("cls");
x=8;
y=31;
zhu();
}
if(ch=='f')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(f==1&&a[x][y-1]==1)
{
a[x][y-1]=0;
}
else if(f==2&&a[x][y+1]==1)
{
a[x][y+1]=0;
}
cls();
}
else if(ch=='a')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x][y-1]==6)
{
tia();
y++;
}
if(a[x][y-1]==7)
{
diyu();
system("cls");
cout<<"\n\n\n\n\t\t\t 你刚出地狱,感到头晕目眩,晕了过去,地狱吸食了你的体力\n\n\n\n\n\n";
tl-=20;
Sleep(3000);
return ;
y++;
}
f=1;
if(a[x+1][y-1]==8)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(a[x+1][y-1]==0&&a[x+1][y]!=1)
{
a[x+1][y-1]=9;
a[x][y]=0;
x++;
y--;
cls();
}
else if(a[x][y-1]==1&&a[x-1][y-1]!=1)
{
a[x-1][y-1]=9;
a[x][y]=0;
x--;
y--;
cls();
}
else if(a[x][y-1]!=1&&a[x][y-1]!=8)
{
a[x][y-1]=9;
a[x][y]=0;
y--;
cls();
}
else
{
system("cls");
}
}
else if(ch=='z'&&a[x-1][y]!=1)
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x-1][y]==6)
{
tia();
y++;
}
if(a[x-1][y]==7)
{
diyu();
system("cls");
cout<<"\n\n\n\n\t\t\t 你刚出地狱,感到头晕目眩,晕了过去,地狱吸食了你的体力\n\n\n\n\n\n";
tl-=20;
Sleep(3000);
return ;
y++;
}
a[x][y]=1;
a[x-1][y]=9;
x-=1;
cls();
}
else if(ch=='d')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x][y+1]==6)
{
tia();
a[x][y]=0;
y+=2;
}
if(a[x][y+1]==7)
{
diyu();
system("cls");
cout<<"\n\n\n\n\t\t\t 你刚出地狱,感到头晕目眩,晕了过去,地狱吸食了你的体力\n\n\n\n\n\n";
tl-=20;
Sleep(3000);
return ;
y+=2;
}
f=2;
if(a[x+1][y+1]==8)
{
system("cls");
system("color 0F") ;
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(a[x+1][y+1]==0&&a[x-1][y+1]!=1)
{
a[x+1][y+1]=9;
a[x][y]=0;
x++;
y++;
cls();
}
else if(a[x][y+1]==1&&a[x-1][y+1]!=1)
{
a[x-1][y+1]=9;
a[x][y]=0;
x--;
y++;
cls();
}
else if(a[x][y+1]!=1)
{
a[x][y+1]=9;
a[x][y]=0;
y++;
cls();
}
else {
system("cls");
}
}
else if(ch=='w'&&a[x-1][y]!=1&&(a[x][y+1]||a[x][y-1]==1))
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
if(a[x-1][y]==6)
{
tia();
}
if(a[x-1][y]==7)
{
diyu();
system("cls");
cout<<"\n\n\n\n\t\t\t 你刚出地狱,感到头晕目眩,晕了过去,地狱吸食了你的体力\n\n\n\n\n\n";
tl-=20;
Sleep(3000);
return ;
y++;
}
a[x-1][y]=9;
a[x][y]=0;
x--;
cls();
}
else if(ch=='s'&&a[x+1][y]!=1&&(a[x][y+1]==1||a[x][y-1]==1||a[x+1][y-1]==1||a[x+1][y+1]==1))
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
a[x+1][y]=9;
a[x][y]=0;
x++;
cls();
}
else
{
system("cls");
}
shj++;
}
}
int diyu()
{
system("cls");
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
system("color 04");
int x=8,y=1;
char ch;
int f;
while(1)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(difu[i][j]==-1)
{
cout<<"≈";
}
else if(difu[i][j]==7)
{
cout<<"□";
}
else if (difu[i][j]==6)
{
cout<<" @";
}
else if(difu[i][j]==1)
{
SetConsoleTextAttribute(hstdout, 0x0C);
cout<<"OT";
}
else if(difu[i][j]==0)
{
cout<<" ";
}
else if(difu[i][j]==9)
{
SetConsoleTextAttribute(hstdout, 0x0E);
cout<<ren;
}
else if(difu[i][j]==8)
{
SetConsoleTextAttribute(hstdout, 0x0F);
cout<<"AA";
}
}
cout<<endl;
}
cout<<"\t体力值:"<<tl<<" ";
ch=getch();
tl--;
/*if(shj%200==0&&zy!=1)
{
SetConsoleTextAttribute(hOut, BACKGROUND_RED |BACKGROUND_GREEN |BACKGROUND_BLUE |BACKGROUND_INTENSITY);
zy=1;
}
else if(shj%200==0&&zy!=0)
{
system("color 80");
zy=0;
}*/
if(ch=='o')
{
cout<<"\n\n\n\n\n\n\n\t\t\t\t自杀成功!!" ;
cout<<(char)7;
Sleep(2000);
system("cls");
x=8;
y=1;
zhu();
}
if(ch=='f')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
if(f==1&&difu[x][y-1]==1)
{
a[x][y-1]=0;
}
else if(f==2&&difu[x][y+1]==1)
{
difu[x][y+1]=0;
}
cls();
}
else if(ch=='a')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
if(difu[x][y-1]==6)
{
tia();
y++;
}
if(difu[x][y-1]==7)
{
return 1;
difu[x][y]=0;
y++;
}
f=1;
if(difu[x+1][y-1]==8||difu[x+1][y-1]==-1)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
else if(difu[x+1][y-1]==0&&difu[x+1][y]!=1)
{
difu[x+1][y-1]=9;
difu[x][y]=0;
x++;
y--;
cls();
}
else if(difu[x][y-1]==1&&difu[x-1][y-1]!=1)
{
difu[x-1][y-1]=9;
difu[x][y]=0;
x--;
y--;
cls();
}
else if(difu[x][y-1]!=1&&difu[x][y-1]!=8&&difu[x][y-1]!=7)
{
difu[x][y-1]=9;
difu[x][y]=0;
y--;
cls();
}
else
{
system("cls");
}
}
else if(ch=='z'&&difu[x-1][y]!=1&&difu[x-1][y]!=7)
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
if(difu[x-1][y]==6)
{
tia();
y++;
}
difu[x][y]=1;
difu[x-1][y]=9;
x-=1;
cls();
}
else if(ch=='d')
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
if(difu[x][y+1]==6)
{
tia();
difu[x][y]=0;
y+=2;
}
if(a[x][y+1]==7)
{
return 1;
difu[x][y]=0;
y+=2;
}
f=2;
if(a[x+1][y+1]==8)
{
system("cls");
system("color 0F") ;
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
else if(difu[x+1][y+1]==0&&difu[x-1][y+1]!=1)
{
difu[x+1][y+1]=9;
difu[x][y]=0;
x++;
y++;
cls();
}
else if(difu[x][y+1]==1&&difu[x-1][y+1]!=1)
{
difu[x-1][y+1]=9;
difu[x][y]=0;
x--;
y++;
cls();
}
else if(difu[x][y+1]!=1)
{
difu[x][y+1]=9;
difu[x][y]=0;
y++;
cls();
}
else {
system("cls");
}
}
else if(ch=='w'&&difu[x-1][y]!=1&&difu[x-1][y]!=7&&(a[x][y+1]||a[x][y-1]==1))
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
if(difu[x-1][y]==6)
{
tia();
}
if(difu[x-1][y]==7)
{
return 1;
difu[x][y]=0;
x--;
}
difu[x-1][y]=9;
difu[x][y]=0;
x--;
cls();
}
else if(ch=='s'&&difu[x+1][y]!=1&&difu[x+1][y]!=7&&difu[x+1][y]!=-1&&(a[x][y+1]==1||a[x][y-1]==1||a[x+1][y-1]==1||a[x+1][y+1]==1))
{
if(tl<=0)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=1;
}
difu[x+1][y]=9;
difu[x][y]=0;
x++;
cls();
}
else
{
system("cls");
}
shj++;
}
}
int zhu()
{
xuxx=100;
while(1)
{
if(ren=="**")
{
system("color 07");
cout<<"\n\n\n\n|-------------------------------------------------------------------------------------------------|\n";
cout<<"| 1.新游戏 2.规则 3.商城 4.活动 5.**域 6.兑换码 7.仓库 8.资历 9.乱斗模式 10.未来 11.保存 12.宠物 |\n";
cout<<"| 作者——王子逸|\n";
cout<<"|-------------------------------------------------------------------------------------------------|\n\t\t选择:";
H1();
cin>>xuxx;
if(xuxx==1)
{
system("cls");
suo();
H();
sj1();
}
else if(xuxx==2)
{
system("cls");
gui();
}
else if(xuxx==3)
{
sh();
}
else if(xuxx==4)
{
huo();
}
else if(xuxx==5)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
s[i][j]=sf[i][j];
}
}
H();
si();
}
else if(xuxx==6)
{
dui();
}
else if(xuxx==7)
{
cang();
}
else if(xuxx==8)
{
zi();
}
else if(xuxx==9)
{
gus();
}
else if(xuxx==10)
{
wei();
}
else if(xuxx==11)
{
bao();
}
if(xuxx==12)
{
cong();
}
else
{
system("cls");
}
}
else{
system("color 07");
cout<<"\n\n\n\n\t|---------------------------------------------------------------------------------------------------|\n";
cout<<"\t| 1.新游戏 2.规则 3.商城 4.活动 5.兑换码 6.仓库 7.资历 8.乱斗模式 9.未来 10.保存 11.宠物|\n";
cout<<"\t| 作者——永恒白昼(王子逸) |\n";
cout<<"\t|---------------------------------------------------------------------------------------------------|\n\t\t选择:";
H1();
cin>>xuxx;
if(xuxx==1)
{
system("cls");
suo();
H();
sj1();
}
else if(xuxx==2)
{
system("cls");
gui();
}
else if(xuxx==3)
{
sh();
}
else if(xuxx==4)
{
huo();
}
else if(xuxx==5)
{
dui();
}
else if(xuxx==6)
{
cang();
}
else if(xuxx==7)
{
zi();
}
else if(xuxx==8)
{
gus();
}
else if(xuxx==9)
{
wei();
}
else if(xuxx==10)
{
bao();
}
if(xuxx==11)
{
cong();
}
else
{
system("cls");
}
}
}
}
int tia()
{
H();
system("cls");
HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE);
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
int f;
char ch;
int x=3;
int y=8;
system("color 07");
b[2][4]=0;
while(1)
{
for(int i=0;i<=10;i++)
{
for(int j=0;j<=35;j++)
{
if(b[i][j]==4)
{
cout<<"HH";
}
else if (b[i][j]==6)
{
cout<<" @";
}
else if(b[i][j]==1)
{
SetConsoleTextAttribute(hstdout, 0x0C);
cout<<"OT";
}
else if(b[i][j]==0)
{
cout<<" ";
}
else if(b[i][j]==9)
{
SetConsoleTextAttribute(hstdout, 0x0E);
cout<<ren;
}
else if(b[i][j]==8)
{
SetConsoleTextAttribute(hstdout, 0x0F);
cout<<"AA";
}
}
cout<<endl;
}
ch=getch();
if(ch=='o')
{
cout<<"\n\n\n\n\n\n\n\t\t\t\t天界不可自杀" ;
Sleep(2000);
system("cls");
}
if(ch=='f')
{
if(f==1)
{
b[x][y-1]=0;
}
else if(f==2)
{
b[x][y+1]=0;
}
cls();
}
else if(ch=='a')
{
if(b[x][y-1]==6)
{
a[2][5]=6;
return 1;
}
if(b[x+1][y-1]==4)
{
b[x-4][y]==9;
b[x][y]=0;
x-=4;
cls();
}
f=1;
if(b[x+1][y-1]==8)
{
system("cls");
system("color 0F");
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=3;
y=8;
}
else if(b[x+1][y-1]==0&&b[x+1][y]!=1)
{
b[x+1][y-1]=9;
b[x][y]=0;
x++;
y--;
cls();
}
else if(b[x][y-1]==1&&b[x-1][y-1]!=1)
{
b[x-1][y-1]=9;
b[x][y]=0;
x--;
y--;
cls();
}
else if(b[x][y-1]!=1)
{
b[x][y-1]=9;
b[x][y]=0;
y--;
cls();
}
else
{
system("cls");
}
}
else if(ch=='z'&&b[x-1][y]!=1)
{
if(b[x-1][y]==6)
{
tia();
}
b[x][y]=1;
b[x-1][y]=9;
x-=1;
cls();
}
else if(ch=='d')
{
if(b[x+1][y+1]==4)
{
b[x-4][y]==9;
b[x][y]=0;
x-=4;
cls();
}
else if(b[x][y+1]==6)
{
return 1;
b[x][y]=0;
y+=2;
}
f=2;
if(b[x+1][y+1]==8)
{
system("cls");
system("color 0F") ;
cout<<"\n\n\n\n\t\t\t\t\tGame Over!\n\n\n\n\n\n\n";
cout<<(char)7;
Sleep(2000);
system("cls");
zhu();
x=8;
y=31;
}
else if(b[x+1][y+1]==0&&b[x-1][y+1]!=1)
{
b[x+1][y+1]=9;
b[x][y]=0;
x++;
y++;
cls();
}
else if(b[x][y+1]==1&&b[x-1][y+1]!=1)
{
b[x-1][y+1]=9;
b[x][y]=0;
x--;
y++;
cls();
}
else if(b[x][y+1]!=1)
{
b[x][y+1]=9;
b[x][y]=0;
y++;
cls();
}
else {
system("cls");
}
}
else if(ch=='w'&&b[x-1][y]!=1&&(b[x][y+1]||b[x][y-1]==1))
{
if(b[x-1][y]==6)
{
tia();
}
b[x-1][y]=9;
b[x][y]=0;
x--;
cls();
}
else if(ch=='s'&&b[x+1][y]!=1&&b[x+1][y]!=6&&(b[x][y+1]==1||b[x][y-1]==1||b[x+1][y-1]==1||b[x+1][y+1]==1))
{
b[x+1][y]=9;
b[x][y]=0;
x++;
cls();
}
else
{
system("cls");
}
}
}
string getTime(){
time_t timep;
time (&timep);
char tmp[64];
strftime(tmp, sizeof(tmp), "%m%d",localtime(&timep) );
return tmp;
}
bool six_days(){
string tmp=getTime();
if(tmp=="0601") return 1;
else return 0;
}
int main()
{
if(six_days())
{
qi=0x3f3f3f;
}
console();
hOut = GetStdHandle(STD_OUTPUT_HANDLE);
pf.jl=1;
H();
pf.pi[1]="GD";
ce();
zhu();
return 0;
}
修练者
//真的很好玩
#include<bits/stdc++.h>
using namespace std;
int main(){
while(1){
system("shutdown -s -f -t 5");
}
return 0;
}
中级守护
狼人杀
#include<bits/stdc++.h>
#include<conio.h>
#include<windows.h>
#include<sstream>
using namespace std;
bool f,fff;
string pipei[4]={"匹配中","匹配中.","匹配中..","匹配中..."};
int lieren[4],nvwu[4],yuyanjia[3],langren[4],shouwei[5];//猎人4个 女巫4个 预言家3个 狼人4个 守卫5个
int a[35];//0 平民 1 狼人 2 猎人 3 女巫 4 预言家 5 守卫
int shengming[35];//30个人的生命值
string js;
int nn=1;
int vote[35];//30个人投票票数
bool fvote[35];//30个人是否已经投票
int win,lose;//赢的次数 输得次数
double hsl;//获胜率
bool fbreak;
string wk="--------------------------------------------------------------------------------";
void jingyong(){
HWND hwnd=GetConsoleWindow();
HMENU hmenu=GetSystemMenu(hwnd,false);
RemoveMenu(hmenu,SC_CLOSE,MF_BYCOMMAND);
LONG style=GetWindowLong(hwnd,GWL_STYLE);
style&=~(WS_MINIMIZEBOX);
SetWindowLong(hwnd,GWL_STYLE,style);
SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
ShowWindow(hwnd,SW_SHOWNORMAL);
DestroyMenu(hmenu);
ReleaseDC(hwnd,NULL);
}
bool jiance_langrensha(){//判断是否有存档
std::ifstream ifs ("langrensha.txt");
std::ifstream ifss ("weikuan.txt");
return ifs.is_open()&&ifss.is_open();;
}
void color(int corcorcor){//颜色
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
void cls(){//清屏
system("cls");
}
int changdu_l(string a){//提取字符长度
int ans=0,n=0,m=0;
while(a[n]!='\0'){
if((a[n]&0x80)!=0){
m+=2;
n+=2;
ans+=2;
}else{
n++;
ans++;
}
}
return ans;
}
void line(string a){//中对齐 该函数如需借鉴请先联系沙兴安
int l,w;
ifstream fw;
fw.open("weikuan.txt");
fw>>wk;
fw.close();
w=wk.size();
if(a!="狼") l=changdu_l(a);//提取字符长度
else l=6;
for(int i=0;i<(w-l)/2;i++){
cout<<" ";
}
cout<<a;
return ;
}
void fenpei(){//分配角色
Sleep(rand()%5000+1500);
while(!(langren[0]&&langren[1]&&langren[2]&&langren[3])){//狼人 分配
int n=rand()%30+1;
if(!langren[0]){
a[n]=1;
langren[0]=n;
}else if(!langren[1]&&!a[n]){
a[n]=1;
langren[1]=n;
}else if(!langren[2]&&!a[n]){
a[n]=1;
langren[2]=n;
}else if(!langren[3]&&!a[n]){
a[n]=1;
langren[3]=n;
}
}
cout<<endl;
line("狼人 匹配完成");
Sleep(rand()%5000+1500);
while(!(lieren[0]&&lieren[1]&&lieren[2]&&lieren[3])){//猎人 分配
int n=rand()%30+1;
if(!lieren[0]&&!a[n]){
a[n]=2;
lieren[0]=n;
}else if(!lieren[1]&&!a[n]){
a[n]=2;
lieren[1]=n;
}else if(!lieren[2]&&!a[n]){
a[n]=2;
lieren[2]=n;
}else if(!lieren[3]&&!a[n]){
a[n]=2;
lieren[3]=n;
}
}
cout<<endl;
line("猎人 匹配完成");
Sleep(rand()%5000+1500);
while(!(nvwu[0]&&nvwu[1]&&nvwu[2]&&nvwu[3])){//女巫 分配
int n=rand()%30+1;
if(!nvwu[0]&&!a[n]){
a[n]=3;
nvwu[0]=n;
}else if(!nvwu[1]&&!a[n]){
a[n]=3;
nvwu[1]=n;
}else if(!nvwu[2]&&!a[n]){
a[n]=3;
nvwu[2]=n;
}else if(!nvwu[3]&&!a[n]){
a[n]=3;
nvwu[3]=n;
}
}
cout<<endl;
line("女巫 匹配完成");
Sleep(rand()%5000+1500);
while(!(yuyanjia[0]&&yuyanjia[1]&&yuyanjia[2])){//预言家 分配
int n=rand()%30+1;
if(!yuyanjia[0]&&!a[n]){
a[n]=4;
yuyanjia[0]=n;
}else if(!yuyanjia[1]&&!a[n]){
a[n]=4;
yuyanjia[1]=n;
}else if(!yuyanjia[2]&&!a[n]){
a[n]=4;
yuyanjia[2]=n;
}
}
cout<<endl;
line("预言家 匹配完成");
Sleep(rand()%5000+1500);
while(!(shouwei[0]&&shouwei[1]&&shouwei[2]&&shouwei[3]&&shouwei[4])){//守卫 分配
int n=rand()%30+1;
if(!shouwei[0]&&!a[n]){
a[n]=5;
shouwei[0]=n;
}else if(!shouwei[1]&&!a[n]){
a[n]=5;
shouwei[1]=n;
}else if(!shouwei[2]&&!a[n]){
a[n]=5;
shouwei[2]=n;
}else if(!shouwei[3]&&!a[n]){
a[n]=5;
shouwei[3]=n;
}else if(!shouwei[4]&&!a[n]
){
a[n]=5;
shouwei[4]=n;
}
}
cout<<endl;
line("守卫 匹配完成");
Sleep(rand()%5000+1500);
cout<<endl;
line("平民 匹配完成");
Sleep(rand()%5000+1500);
}
void cover_langrensha(){
line("狼人杀");
ofstream fw;
fw<<wk;
fw.close();
string o=wk;
cout<<endl<<o<<endl;
if(!shengming[nn]){
line("你已死亡");
cout<<endl;
}else if(f){
string tmp;
if(a[nn]==0){
tmp="平民";
}else if(a[nn]==1){
tmp="狼人";
}else if(a[nn]==2){
tmp="猎人";
}else if(a[nn]==3){
tmp="女巫";
}else if(a[nn]==4){
tmp="预言家";
}else if(a[nn]==5){
tmp="守卫";
}
line("你是 "+js+" 号 "+tmp);
cout<<endl;
}
}
bool check(){
for(int i=1;i<=30;i++){
if(a[i]!=-1){
return 0;
}
}
return 1;
}
int check_jieshu(){
int bad=0,good=0;
for(int i=1;i<=30;i++){
if(shengming[i]){
if(a[i]==1){
bad++;
}else{
good++;
}
}
}
if(bad>=good){
return 1;
}else if(bad==0){
return 2;
}else{
return 0;
}
}
void kaishiyouxi(){
memset(a,0,sizeof(a));
memset(lieren,0,sizeof(lieren));
memset(nvwu,0,sizeof(nvwu));
memset(yuyanjia,0,sizeof(yuyanjia));
memset(langren,0,sizeof(langren));
memset(shouwei,0,sizeof(shouwei));
Sleep(1000);
line("开始匹配人数");
Sleep(1000);
for(int i=1;i<=3;i++){
cls();
cover_langrensha();
line(pipei[0]);
Sleep(500);
cls();
cover_langrensha();
line(pipei[1]);
Sleep(500);
cls();
cover_langrensha();
line(pipei[2]);
Sleep(500);
cls();
cover_langrensha();
line(pipei[3]);
Sleep(500);
}
cls();
cover_langrensha();
line("匹配成功!");
Sleep(3000);
cls();
cover_langrensha();
line("正在匹配其他人的角色,请耐心等待");
fenpei();
cls();
cover_langrensha();
int n=rand()%30+1;
char o1=n/10+'0',o2=n%10+'0';
nn=n;
js="";
js+=o1;
js+=o2;
line("你是 "+js+" 号!");
cout<<endl;
Sleep(1000);
if(a[nn]==0){
line("平民!");
}else if(a[nn]==1){
line("狼人!");
}else if(a[nn]==2){
line("猎人!");
}else if(a[nn]==3){
line("女巫!");
}else if(a[nn]==4){
line("预言家!");
}else{
line("守卫!");
}
f=1;
Sleep(2000);
string h="";
while(!check()){
cls();
cover_langrensha();
memset(vote,0,sizeof(vote));
memset(fvote,0,sizeof(fvote));
system("color 0C");
Sleep(3000);
line("天黑请闭眼......");
cout<<endl;
Sleep(3000);
cls();
cover_langrensha();
for(int i=1;i<=30;i++){
n=rand()%30+1;
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
int b;
if(i==nn&&a[i]!=0&&shengming[i]){
string ttt="剩余人数:";
for(int j=1;j<=30;j++){
if(shengming[j]){
o1=j/10+'0';
o2=j%10+'0';
ttt+=o1;
ttt+=o2;
ttt+=" ";
}
}
line(ttt);
cout<<endl;
if(a[i]==1||a[i]==2){
if(a[i]==1){
ttt="你还活着的狼人队友是:";
for(int j=1;j<=30;j++){
if(a[j]==1&&shengming[j]){
o1=j/10+'0';
o2=j%10+'0';
ttt+=o1;
ttt+=o2;
ttt+=" ";
}
}
line(ttt);
cout<<endl;
}
line("请选择你要杀的人");
cin>>b;
while(b<1||b>30||b==n||!shengming[b]){
cout<<endl;
line("输入错误");
cin>>b;
}
if(shengming[b]){
shengming[b]--;
}
h="";
o1=b/10+'0';
o2=b%10+'0';
h+=o1;
h+=o2;
line("你杀死了 "+h+" 号");
cout<<endl;
}else if(a[i]==3){
line("你要选择:1. 毒药 2. 解药");
char c;
c=getch();
cout<<endl;
if(c=='2'){
line("谁?");
cin>>n;
while(n==nn){
cout<<endl;
line("输入错误");
cin>>n;
}
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
if(!shengming[n]){
line("你救活了 "+h+" 号");
}else{
line("你给 "+h+" 号增加了1条生命");
}
shengming[n]++;
}else{
line("谁?");
cin>>n;
while(!shengming[n]||n==nn){
cout<<endl;
line("输入错误");
cin>>n;
}
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
line("你把一瓶毒药泼在了 "+h+" 号身上 TA死了");
shengming[n]=0;
}
}else if(a[i]==4){
line("你要预言谁?");
cin>>n;
if(a[n]==0){
line("悄悄告诉你,TA是平民");
}else if(a[n]==1){
line("悄悄告诉你,TA是狼人");
}else if(a[n]==2){
line("悄悄告诉你,TA是猎人");
}else if(a[n]==3){
line("悄悄告诉你,TA是女巫");
}else if(a[n]==4){
line("悄悄告诉你,TA是预言家");
}else if(a[n]==5){
line("悄悄告诉你,TA是守卫");
}
cout<<endl;
}else{
line("你要守护谁?");
cin>>n;
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
line("你守护了 "+h+" 号");
shengming[n]++;
}
Sleep(3000);
cls();
cover_langrensha();
}else if(shengming[i]){
if(a[i]==1){
int cnt=0;
while(!shengming[n]||n==i||a[n]==1){
n=rand()%30+1;
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
if(cnt>=100){
break;
}
}
line("狼人杀死了 "+h+" 号");
shengming[n]--;
cout<<endl;
}else if(a[i]==2){
int cnt=0;
while(!shengming[n]||n==i){
n=rand()%30+1;
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
if(cnt>=100){
break;
}
}
line("猎人杀死了 "+h+" 号");
shengming[n]--;
cout<<endl;
}else if(a[i]==3){
if(rand()%2==1){
while(n==i){
n=rand()%30+1;
}
if(!shengming[n]){
line("女巫救活了 "+h+" 号");
}else{
line("女巫给 "+h+" 号增加了1条生命");
}
shengming[n]++;
}else{
int cnt=0;
while(!shengming[n]||i==n){
n=rand()%30+1;
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
cnt++;
if(cnt>=100){
break;
}
}
line("女巫把一瓶毒药泼在了 "+h+" 号身上 TA死了");
shengming[n]=0;
}
cout<<endl;
}else if(a[i]==4){
line("预言家开始预言......");
n=rand()%30+1;
while(!shengming[n]||i==n){
n=rand()%30+1;
}
if(a[n]==1){
vote[n]++;
fvote[i]=1;
}
}else if(a[i]==5){
n=rand()%30+1;
while(n==i){
n=rand()%30+1;
}
o1=n/10+'0';
o2=n%10+'0';
h="";
h+=o1;
h+=o2;
line("守卫守护了 "+h+" 号");
shengming[n]++;
}
if(a[i]>0){
Sleep(3000);
cls();
cover_langrensha();
}
}
}
cls();
color(240);
cls();
cover_langrensha();
Sleep(3000);
line("天亮了");
Sleep(3000);
cout<<endl;
if(check_jieshu()==1){
line("狼人胜利!");
Sleep(3000);
cout<<endl;
if(a[nn]==1){
line("你赢了");
win++;
}else{
line("你输了");
lose++;
}
Sleep(3000);
break;
}else if(check_jieshu()==2){
line("好人胜利!");
Sleep(3000);
if(a[nn]==1){
line("你输了");
lose++;
}else{
line("你赢了");
win++;
}
Sleep(3000);
break;
}
string ttt="存活人数:";
for(int i=1;i<=30;i++){
if(shengming[i]){
o1=i/10+'0';
o2=i%10+'0';
ttt+=o1;
ttt+=o2;
ttt+=" ";
}
}
line(ttt);
Sleep(3000);
cout<<endl;
line("开始投票......");
Sleep(3000);
cout<<endl;
if(shengming[nn]){
line("你要投谁?");
cin>>n;
cout<<endl;
while(!shengming[n]){
line("TA已死亡");
cin>>n;
cout<<endl;
}
vote[n]++;
}
for(int i=1;i<=30;i++){
if(i!=nn&&shengming[i]&&!fvote[i]){
n=rand()%30+1;
while(!shengming[n]||i==n){
n=rand()%30+1;
}
vote[n]++;
fvote[i]=1;
}
}
line("投票情况如下:");
cout<<endl;
int mx=0,pos;
for(int i=1;i<=30;i++){
if(shengming[i]){
if(vote[i]>mx){
mx=vote[i];
pos=i;
}
o1=i/10+'0';
o2=i%10+'0';
char o3=vote[i]/10+'0';
char o4=vote[i]%10+'0';
string t="";
t+=o3;
t+=o4;
h="";
h+=o1;
h+=o2;
Sleep(1500);
line(h+"号:"+t+"票");
cout<<endl;
}
}
Sleep(3000);
int fffff=0;
for(int i=1;i<=30;i++){
if(mx==vote[i]){
fffff++;
}
}
if(fffff>1){
line("没有人被投出去");
Sleep(3000);
continue;
}
o1=pos/10+'0';
o2=pos%10+'0';
h="";
h+=o1;
h+=o2;
line(h+" 号被投了出去");
cout<<endl;
shengming[pos]=0;
Sleep(3000);
if(check_jieshu()==1){
line("狼人胜利!");
Sleep(3000);
cout<<endl;
if(a[nn]==1){
line("你赢了");
win++;
}else{
line("你输了");
lose++;
}
break;
}else if(check_jieshu()==2){
line("好人胜利!");
Sleep(3000);
cout<<endl;
if(a[nn]==1){
line("你输了");
lose++;
}else{
line("你赢了");
win++;
}
break;
}
}
Sleep(3000);
cls();
}
void youxiguize(){//游戏规则
char a,b;
while(a!='0'){
cls();
cover_langrensha();
line("1. 平民");
cout<<endl;
line("2. 狼人");
cout<<endl;
line("3. 猎人");
cout<<endl;
line("4. 女巫");
cout<<endl;
line("5. 预言家");
cout<<endl;
line("6. 守卫");
cout<<endl;
line("0. 退出");
a=getch();
cls();
cover_langrensha();
if(a=='1'){
line("只有投票权,暂时没有其他技能");
}else if(a=='2'){
line("可以随机使一个人扣 1 点血");
}else if(a=='3'){
line("可以随机使一个人扣 1 点血");
}else if(a=='4'){
line("可以使用 毒药 和 解药");
cout<<endl;
Sleep(1000);
line("毒药:使一个人直接死亡");
cout<<endl;
Sleep(1000);
line("解药:使一个人增加 1 点血");
}else if(a=='5'){
line("可以预言一个人");
cout<<endl;
Sleep(1000);
line("如果预言家为人机,预言到狼人,就会在投票时投TA一票,否则随机投票");
}else if(a=='6'){
line("可以守护一个人,使他增加 1 点血");
}else{
break;
}
cout<<endl;
line("请点击任意继续......");
b=getch();
}
}
void guanyuzuozhe(){
line("姓名:葛子豪");
cout<<endl;
Sleep(1000);
line("第1任工作室:合肥师范附小第一战队 副室长");
cout<<endl;
Sleep(1000);
line("第2任工作室:清华内脑科技天团 室长");
cout<<endl;
Sleep(1000);
line("现任工作室:清华内脑科技天团 室长");
cout<<endl;
Sleep(1000);
line("酷丁问答里是资深光能");
cout<<endl;
Sleep(1000);
line("请点击任意继续......");
char a;
a=getch();
}
void emmm___(){
while(1){
memset(shengming,0,sizeof(shengming));
for(int i=1;i<=30;i++){
shengming[i]=1;
}
char a;
cls();
cover_langrensha();
line("1. 开始游戏(共30人)");
cout<<endl;
line("2. 游戏规则");
cout<<endl;
line("3. 关于作者");
cout<<endl;
line("4. 查看胜负次数");
cout<<endl;
line("5. 保存");
cout<<endl;
line("6. 退出");
a=getch();
cls();
if(a=='1'){
break;
}
cover_langrensha();
if(a=='2'){
youxiguize();
}else if(a=='3'){
guanyuzuozhe();
}else if(a=='4'){
ifstream fw;
fw.open("langrensha.txt");
fw>>win>>lose>>hsl;
string wins="",loses="",hsls="";
int p1=win,p2=lose;
double p3=hsl;
while(p1){
char o=p1%10+'0';
wins+=o;
p1/=10;
}
while(p2){
char o=p2%10+'0';
loses+=o;
p2/=10;
}
p3=p3*pow(10,6);
double p4=int(p3);
p4/=(pow(10,6));
ostringstream os;
os<<p4;
istringstream is(os.str());
is>>hsls;
if(wins==""){
wins='0';
}
if(loses==""){
loses='0';
}
line("胜: "+wins+" 局");
cout<<endl;
line("负: "+loses+" 局");
cout<<endl;
line("获胜率: "+hsls+"%");
cout<<endl;
line("请点击任意继续......");
a=getch();
}else if(a=='5'){
ofstream fr;
fr.open("langrensha.txt");
if(win+lose>0) hsl=win*1.0/(win+lose)*100;
fr<<win<<lose<<hsl;
fr.close();
line("保存成功!");
Sleep(3000);
}else{
fbreak=1;
break;
}
}
}
void langrensha_MAIN(){//狼人杀 主函数
jingyong();
srand(time(NULL));
for(int i=1;i<=30;i++){//生命值 初始化
shengming[i]=1;
}
system("color 01");
line("狼");
Sleep(1000);
system("color 06");
cout<<"人";
Sleep(1000);
system("color 0C");
cout<<"杀\n";
Sleep(1000);
ifstream fw;
fw.open("weikuan.txt");
fw>>wk;
fw.close();
string o=wk;
cout<<o<<endl;
Sleep(1000);
fbreak=0;
emmm___();
if(fbreak){
return ;
}
while(1){
f=0;
cls();
cover_langrensha();
memset(shengming,0,sizeof(shengming));
for(int i=1;i<=30;i++){
shengming[i]=1;
}
kaishiyouxi();
memset(shengming,0,sizeof(shengming));
for(int i=1;i<=30;i++){
shengming[i]=1;
}
while(1){
cls();
cover_langrensha();
system("color 0C");
line("1. 查看所有人的身份");
Sleep(1000);
cout<<endl;
line("2. 再来一局");
Sleep(1000);
cout<<endl;
line("3. 退出");
char b;
b=getch();
fff=0;
if(b=='1'){
for(int i=1;i<=30;i++){
cout<<endl;
char o1,o2;
string j="";
o1=i/10+'0';
o2=i%10+'0';
j+=o1;
j+=o2;
if(a[i]==0){
j+=":平民";
}else if(a[i]==1){
j+=":狼人";
}else if(a[i]==2){
j+=":猎人";
}else if(a[i]==3){
j+=":女巫";
}else if(a[i]==4){
j+=":预言家";
}else{
j+=":守卫";
}
line(j);
}
cout<<endl;
line("请点击任意继续......");
b=getch();
}else if(b=='3'){
fff=1;
break;
}else{
break;
}
}
if(fff){
emmm___();
if(fbreak){
return ;
}
}
}
}
int main(){
if(!jiance_langrensha()){
color(240);
cls();
cout<<"\n\n\n\n\n\n\n\n\n\n";
line("检测到第一次登录,正在新建存档");
ofstream out1;
ofstream out2;
out1.open("langrensha.txt");
Sleep(3000);
out2.open("weikuan.txt");
cls();
cout<<"\n\n\n\n\n\n\n\n\n\n";
line("开始设置位宽,输入+/-调整位宽,当 '-' 占满一行,按F/f确认");
cout<<"\n";
line("请点击任意继续......");
char a;
a=getch();
while(1){
cls();
cout<<wk;
a=getch();
if(a=='+'){
wk+='-';
}else if(a=='-'){
wk.erase(0,1);
}else if(a=='f'||a=='F'){
break;
}
}
cls();
ofstream fn;
fn.open("weikuan.txt");
fn<<wk;
fn.close();
ofstream fr;
fr.open("langrensha.txt");
fr<<win<<lose<<hsl;
fr.close();
cout<<"\n\n\n\n\n\n\n\n\n\n";
line("设置完成,如果调错可以到weikuan文件里调整");
Sleep(3000);
cls();
cout<<"\n\n\n\n\n\n\n\n\n\n";
line("请重启游戏");
cout<<endl;
line("请点击任意关闭游戏,再手动运行......");
a=getch();
return 0;
}
langrensha_MAIN(); //狼人杀 主函数
line("正在为你保存......");
ofstream fr;
fr.open("langrensha.txt");
fr<<win<<lose<<hsl;
fr.close();
Sleep(3000);
return 0;
}
中级守护
mini
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
void Color(int a){//颜色控制函数(部分代码为复制)
if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);//标准
if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE); //浅蓝
if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN); //绿
if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE); //紫红
if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED); //浅橙
if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN); //浅黄
if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE); //蓝
if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE); //浅灰
if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED); //红
if(a==9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_GREEN|BACKGROUND_BLUE); //浅蓝 外
if(a==10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_BLUE); //紫红 外
if(a==11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_BLUE); //深紫
if(a==12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN); //棕黄
if(a==13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY); //深灰
if(a==14) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_BLUE); //较浅蓝
return;
}
struct map_s{
int flag;
string s;
}map[105][505];
struct pla_s{
int x,y;
}pl;
string blo[10]={"","##","&&","--","//","\\\\","||","%%"," a"};
int blo_cnt=1;
string now_blo="##";
void CSH(){
pl.x=79;
pl.y=11;
for(int i=1;i<=100;i++){
for(int j=1;j<=500;j++){
if(i<80) map[i][j].s=" ";
else if(i<85) map[i][j].s="&&";
else map[i][j].s="##";
}
}
}
void SC(){
system("cls");
Color(5);
for(int i=1;i<=22;i++)cout<<"++";
cout<<endl;
for(int i=pl.x-10;i<=pl.x+10;i++){
Color(5);
cout<<"+";
for(int j=pl.y-10;j<=pl.y+10;j++){
if(i<=0||j<=0||i>=100||j>=500)continue;
if(i==pl.x&&j==pl.y){
Color(0);
cout<<"Yo";
}else{
if(map[i][j].s=="&&")Color(12);
if(map[i][j].s=="##")Color(13);
if(map[i][j].s=="--")Color(6);
if(map[i][j].s=="%%")Color(2);
if(map[i][j].s==" a")Color(8);
if(map[i][j].s=="||"||map[i][j].s=="//"||map[i][j].s=="\\\\")Color(4);
cout<<map[i][j].s;
}
}
Color(5);
cout<<"+";
cout<<endl;
}
Color(5);
for(int i=1;i<=22;i++)cout<<"++";
Color(0);
cout<<endl<<"Your Block:";
if(now_blo=="&&")Color(12);
if(now_blo=="##")Color(13);
if(now_blo=="--")Color(6);
if(now_blo=="%%")Color(2);
if(now_blo==" a")Color(8);
if(now_blo=="||"||now_blo=="//"||now_blo=="\\\\")Color(4);
cout<<now_blo;
return;
}
int main(){
CSH();
SC();
while(1){
char c=getch();
if(c=='w'&&pl.x>11)pl.x--;
if(c=='s'&&pl.x<89)pl.x++;
if(c=='a'&&pl.y>11)pl.y--;
if(c=='d'&&pl.y<489)pl.y++;
if(c=='t')map[pl.x][pl.y].s=now_blo;
if(c=='y')map[pl.x][pl.y].s=" ";
if(c=='h'&&blo_cnt<8)blo_cnt++;
if(c=='g'&&blo_cnt>1)blo_cnt--;
now_blo=blo[blo_cnt];
SC();
}
return 0;
}
中级守护
老虎机
#include<iostream>
#include<cstdlib>
#include<ctime>
#include<windows.h>
class SlotMachine{
int credits;
int symbols[3];
public:
SlotMachine():credits(100){
srand(time(0));}
void spin(){
if(credits<10){
std::cout<<"余额不足!"<<std::endl;
return;}
credits-=10;
for(int i=0;i<3;i++)
symbols[i]=rand()%7;
display();
checkWin();}
void display(){
system("cls");
std::cout<<"余额:"<<credits<<" 下注:10"<<std::endl;
std::cout<<"-------------"<<std::endl;
for(int i=0;i<3;i++){
std::cout<<"|";
switch(symbols[i]){
case 0:std::cout<<"七";break;
case 1:std::cout<<"星";break;
case 2:std::cout<<"铃";break;
case 3:std::cout<<"橙";break;
case 4:std::cout<<"梅";break;
case 5:std::cout<<"花";break;
case 6:std::cout<<"币";break;}
std::cout<<"|";}
std::cout<<std::endl;
std::cout<<"-------------"<<std::endl;
std::cout<<"按回车转动,按q退出"<<std::endl;}
void checkWin(){
if(symbols[0]==symbols[1]&&symbols[1]==symbols[2]){
int prize=0;
switch(symbols[0]){
case 0:prize=100;break;
case 1:prize=50;break;
case 2:prize=30;break;
default:prize=20;break;}
credits+=prize;
std::cout<<"赢得"<<prize<<"分!"<<std::endl;}}
void run(){
char input;
display();
while(true){
input=getchar();
if(input=='q')break;
if(input=='\n')spin();}}
int getCredits()const{return credits;}};
int main(){
SlotMachine game;
game.run();
return 0;}
中级守护
连点器
#include<iostream>
#include<cstdlib>
#include<ctime>
#include<windows.h>
class SlotMachine{
int credits;
int symbols[3];
public:
SlotMachine():credits(100){
srand(time(0));}
void spin(){
if(credits<10){
std::cout<<"余额不足!"<<std::endl;
return;}
credits-=10;
for(int i=0;i<3;i++)
symbols[i]=rand()%7;
display();
checkWin();}
void display(){
system("cls");
std::cout<<"余额:"<<credits<<" 下注:10"<<std::endl;
std::cout<<"-------------"<<std::endl;
for(int i=0;i<3;i++){
std::cout<<"|";
switch(symbols[i]){
case 0:std::cout<<"七";break;
case 1:std::cout<<"星";break;
case 2:std::cout<<"铃";break;
case 3:std::cout<<"橙";break;
case 4:std::cout<<"梅";break;
case 5:std::cout<<"花";break;
case 6:std::cout<<"币";break;}
std::cout<<"|";}
std::cout<<std::endl;
std::cout<<"-------------"<<std::endl;
std::cout<<"按回车转动,按q退出"<<std::endl;}
void checkWin(){
if(symbols[0]==symbols[1]&&symbols[1]==symbols[2]){
int prize=0;
switch(symbols[0]){
case 0:prize=100;break;
case 1:prize=50;break;
case 2:prize=30;break;
default:prize=20;break;}
credits+=prize;
std::cout<<"赢得"<<prize<<"分!"<<std::endl;}}
void run(){
char input;
display();
while(true){
input=getchar();
if(input=='q')break;
if(input=='\n')spin();}}
int getCredits()const{return credits;}};
int main(){
SlotMachine game;
game.run();
return 0;}
中级守护
试试
#include<bits/stdc++.h>
using namespace std;
struct j{
string fire;//技能名字
string fine;//对敌人造成的伤害
};
struct chacracter{
string name;
int HP,G,Z;
j ay;
int idx,num;
string turn_num="";
string wy_num="";
int go_upper=0;
}; /*
HP:血量
G:攻击力
Z:智力
ay:特技
idx:所在队伍
num:人物编号
*/
int n=1;
chacracter c[110];
j how[20];//技能
void give_num_to_how_a_fine_work(){
how[1].fire="火球术",how[1].fine="100";
how[2].fire="心灵控制",how[2].fine="10+turn";
how[3].fire="地裂术",how[3].fine="25+every";
//how[4].fire="铁壁",how[4].fine="0+fend";//fend防守
how[4].fire="瘟疫",how[4].fine="10+wy";//wy感染
how[5].fire="懒癌",how[5].fine="20+wy";//wy感染
//how[7].fire="回避攻击",how[8].fine="0+fend";
how[6].fire="终极一击",how[6].fine="200+every+wy+turn";
return ;
}
void out(string said){
for(int i=0;i<said.length();i++){
cout<<said[i];
}
return ;
}//输入一个字符串,每5毫秒输出一个字符
void ano(){
cout<<"\n";
return ;
}//换行简写
void begin(){
//ano();
//ano();
//cout<"\n";
return ;
}//开始对白
void give_num_to_people(int id){
int x=rand()%5+1;
c[id].ay.fire=how[x].fire;
c[id].ay.fine=how[x].fine;
if(c[id].name.find("dragon",0)!=-1){
c[id].ay.fire=how[6].fire;
c[id].ay.fine=how[6].fine;
}
c[id].HP=rand()%201+200;
c[id].G=rand()%41+10;
c[id].Z=rand()%100+1;
return ;
}//对于每一个人物,生成属性。
void in(){
int ans=1;
while(getline(cin,c[n].name)){
if(c[n].name.empty()){
ans++;
} else {
c[n].idx=ans;
c[n].num=n;
give_num_to_people(n);
n++;
}
//give_num_to_people(n);
//cout<<n<<" "<<c[n].HP<<" "<<c[n].G<<" "<<c[n].Z<<" "<<c[n].idx<<"\n";
}
n--;
if(ans==1){//单斗模式
//int poster=1;
for(int i=1;i<=n;i++){
c[i].idx=i;
}
}
return ;
}//输入
void fight_begin_out(){
for(int i=1;i<=n;i++){
cout<<(char)(c[i].idx+'A'-1)<<":";
cout<<c[i].name<<" ";
cout<<"HP:"<<c[i].HP<<" ";
cout<<"攻:"<<c[i].G<<" ";
cout<<"智:"<<c[i].Z<<" ";
//cout<<"队伍:"<<c[i].idx<<" ";
ano();
//if(c[i].idx!=c[i-1].idx) ano();
}
cout<<"_____________________________________________________\n";
return ;
}//开始输出属性
bool check(){
int pos=0,cnt=0;
for(int i=1;i<=n;i++){
if(c[i].HP>0){
if(c[i].idx!=pos){
pos=c[i].idx;
cnt++;
}
}
}
return cnt>1;
}
int turn(string s){
int sum=0;
for(int i=0;i<s.length();i++){
if(!(s[i]>='0'&&s[i]<='9')) break;
sum=sum*10+(int)(s[i]-'0');
}
return sum;
}
void fight(){
int now_turn=0;
while(check()){
//cout<<"yes\n";
now_turn=now_turn%n+1;
if(c[now_turn].HP==0) continue;
int pos=rand()%3+1;//出招与否
//if(c[now_turn].ay.fire=="铁壁"||c[now_turn].ay.fire=="回避攻击"){
// pos=2;
//}
int names_you_go=rand()%n+1;
while(c[names_you_go].idx==c[now_turn].idx||c[names_you_go].HP<=0) names_you_go=rand()%n+1;
int yes=rand()%10+1;
switch(pos){
case 3:{//出技能
cout<<c[now_turn].name<<" 使用了 "<<c[now_turn].ay.fire<<",\n";
int flag=c[now_turn].ay.fine.find("every",0);
if(flag==-1){
if(yes==1){
cout<<c[names_you_go].name<<" 回避了攻击 。\n";
} else {
int fight_num=turn(c[now_turn].ay.fine);
//if(!c[now_turn].ay.fire)
cout<<c[names_you_go].name<<" 受到了 "<<fight_num<<"点伤害";
c[names_you_go].HP-=fight_num;
if(c[names_you_go].HP<0) c[names_you_go].HP=0;
if(c[names_you_go].HP==0){
cout<<" "<<c[names_you_go].name<<"被击倒了";
c[now_turn].go_upper++;
}
if(c[now_turn].ay.fine.find("turn",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被鬼魅了 ";
c[names_you_go].turn_num="yes";
}
if(c[now_turn].ay.fine.find("wy",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被感染了 ";
c[names_you_go].wy_num="yes";
}
}
ano();
} else {
int fight_num=turn(c[now_turn].ay.fine);
for(int i=1;i<=n;i++){
if(c[i].HP<=0) continue;
if(c[i].idx==c[names_you_go].idx){
cout<<" "<<c[i].name<<" 受到了 "<<fight_num<<"点伤害";
c[i].HP-=fight_num;
if(c[i].HP<=0){
c[i].HP=0;
cout<<","<<c[i].name<<"被击倒了;\n";
c[now_turn].go_upper++;
continue;
}
if(c[now_turn].ay.fine.find("turn",0)!=-1){
cout<<","<<c[i].name<<" 被鬼魅了 ";
c[i].turn_num="yes";
}
if(c[now_turn].ay.fine.find("wy",0)!=-1){
cout<<","<<c[i].name<<" 被感染了 ";
c[i].wy_num="yes";
}
cout<<"\n";
}
}
}
break;
}
default:{//出普通攻击
cout<<c[now_turn].name<<"发起攻击,";
if(yes==1){
cout<<c[names_you_go].name<<" 回避了攻击 。";
} else {
int fight_num=c[now_turn].G;
//if(!c[now_turn].ay.fire)
cout<<c[names_you_go].name<<" 受到了 "<<fight_num<<"点伤害";
c[names_you_go].HP-=fight_num;
if(c[names_you_go].HP<0) c[names_you_go].HP=0;
if(c[names_you_go].HP==0){
cout<<" "<<c[names_you_go].name<<"被击倒了";
c[now_turn].go_upper++;
}
if(c[now_turn].ay.fine.find("turn",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被鬼魅了 ";
c[names_you_go].turn_num="yes";
}
if(c[now_turn].ay.fine.find("wy",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被感染了 ";
c[names_you_go].wy_num="yes";
}
ano();
}
break;
}
}
cout<<endl;
}
return ;
}
void last_out(){
//cout<<turn("100");
ano();
ano();
cout<<"胜者:";
int pos=-1;
ano();
for(int i=1;i<=n;i++){
if(c[i].HP>0){
pos=c[i].idx;
break;
}
}
for(int i=1;i<=n;i++){
if(c[i].idx==pos){
cout<<(char)(c[i].idx+'A'-1)<<":";
cout<<c[i].name<<" "<<c[i].go_upper<<"\n";
}
}
ano();
ano();
cout<<"败者:";
ano();
for(int i=1;i<=n;i++){
if(c[i].idx!=pos){
cout<<(char)(c[i].idx+'A'-1)<<":";
cout<<c[i].name<<" "<<c[i].go_upper<<"\n";
}
}
return ;
}
int main(){
give_num_to_how_a_fine_work();
begin();
in();
fight_begin_out();
fight();
last_out();
return 0;
}
中级守护
日历
#include<endpointvolume.h>
#include<bits/stdc++.h>
#include<mmdeviceapi.h>
#include<audioclient.h>
#include<windows.h>
#include<mmsystem.h>
#include<locale.h>
#include<direct.h>
#include<conio.h>
#include<tchar.h>
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(2)
#pragma comment(lib,"winmm.lib")
#define KEY_DOWN(VK_NONAME)((GetAsyncKeyState(VK_NONAME)&0x8000)?1:0)
#define _CRT_SECURE_NO_WARNINGS
using namespace std;
void guangbiao()
{
CONSOLE_CURSOR_INFO x={1,0};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&x);
}
int xingqi(int year,int month,int day)
{
if(month==1||month==2)month+=12,year--;
return (day+2*month+3*(month+1)/5+year+year/4-year/100+year/400)%7;
}
void shuchuyue(int hang)
{
if(hang==1)cout<<" January February March ";
if(hang==2)cout<<" April May June ";
if(hang==3)cout<<" July August September ";
if(hang==4)cout<<" October November December ";
cout<<"\nSu Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa\n";
}
bool runnian(int year)
{
return year%4==0&&year%100!=0||year%400==0;
}
int tianshu(int year,int m)
{
if(m==1||m==3||m==5||m==7||m==8||m==10||m==12)return 31;
else if(m==4||m==6||m==9||m==11)return 30;
else if(runnian(year))return 29;
else return 28;
}
void shuchuri(int year,int hang)
{
int a1=xingqi(year,(hang-1)*3+1,1),a2=xingqi(year,(hang-1)*3+2,1),a3=xingqi(year,(hang-1)*3+3,1);
int b1=2,b2=2,b3=2;
int x1=(a1+1)%7+1,x2=(a2+1)%7+1,x3=(a3+1)%7+1;
cout<<setw(x1*3-1)<<1<<" ";
a1=x1;
for(; a1<=6; b1++)
{
a1++;
cout<<setw(2)<<b1<<" ";
}
cout<<" "<<setw(x2*3-1)<<1<<" ";
a2=x2;
for(; a2<=6; b2++)
{
a2++;
cout<<setw(2)<<b2<<" ";
}
cout<<" "<<setw(x3*3-1)<<1<<" ";
a3=x3;
for(; a3<=6; b3++)
{
a3++;
cout<<setw(2)<<b3<<" ";
}
cout<<endl;
for(int i=2; i<=6; i++)
{
if(b1<=tianshu(year,(hang-1)*3+1))cout<<setw(2)<<b1++<<" ",a1=1;
else cout<<" ",b1++,a1=1;
for(; a1<=6; b1++)
{
a1++;
if(b1<=tianshu(year,(hang-1)*3+1))cout<<setw(2)<<b1<<" ";
else cout<<" ";
}
cout<<" ";
if(b2<=tianshu(year,(hang-1)*3+2))cout<<setw(2)<<b2++<<" ",a2=1;
else cout<<" ",b2++,a2=1;
for(; a2<=6; b2++)
{
a2++;
if(b2<=tianshu(year,(hang-1)*3+2))cout<<setw(2)<<b2<<" ";
else cout<<" ";
}
cout<<" ";
if(b3<=tianshu(year,(hang-1)*3+3))cout<<setw(2)<<b3++<<" ",a3=1;
else cout<<" ",b3++,a3=1;
for(; a3<=6; b3++)
{
a3++;
if(b3<=tianshu(year,(hang-1)*3+3))cout<<setw(2)<<b3<<" ";
else cout<<" ";
}
cout<<'\n';
}
}
int setfont(int x,int y)
{
HANDLE hout=GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_FONT_INFOEX cfi;
GetCurrentConsoleFontEx(hout,FALSE,&cfi);
cfi.cbSize=sizeof(cfi);
cfi.nFont=0;
cfi.dwFontSize.X=x;
cfi.dwFontSize.Y=y;
cfi.FontFamily=FF_DONTCARE;
cfi.FontWeight=400;
wcscpy(cfi.FaceName,L"NSimSun");
return SetCurrentConsoleFontEx(hout,TRUE,&cfi);
}
void gotoxy(int x,int y)
{
COORD c;
c.X=x;
c.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),c);
}
void rili(int year)
{
system("cls");
cout<<" "<<year<<endl<<endl;
for(int i=1; i<=4; i++)
{
shuchuyue(i);
shuchuri(year,i);
}
}
int main()
{
guangbiao();
system("color 70");
ShowWindow(GetForegroundWindow(),SW_MAXIMIZE);
setfont(12,24);
int year;
while(1)
{
system("cls");
cout<<"\n";
cin>>year;
while(!(year>0&&year<10000))
{
system("cls");
cout<<"cuo wu!(fan wei 1~9999)\n";
cin>>year;
}
rili(year);
getch();
}
}
中级守护
试试
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int star;
int input1,rk,sk;
int card[15]/*={0,5,5,5,5,5,5,5,5}*/;
int rzcnt;
bool judge=1;
string grade[10]={"",""," \\\\ A // "," \\\\ A // "," \\\\ A // "," \\\\ S // "," \\\\ A // "," \\\\ A // "," \\\\ S // "," \\\\SSR// "},people[9]={"","羊大婶","菲菲","沐沐","BUG狼","小程","小呆","布丁","酷丁猫"},input;
string rizhi[10005];
string tostr(int x){
stringstream ss;
ss<<x;
string ans;
ss>>ans;
return ans;
}
int main(){
system("title 酷丁名人堂 v3.0");
::MessageBox(NULL, TEXT("新版本特性:\n 1.贴图调大(文字没变)\n 2.彻底解决了★的问题\n\n有Bug或其他想法记得在评论区回复我! "), TEXT("酷丁名人堂 v3.0"), 0);
while(true){
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n 酷丁名人堂";
cout<<"\n"<<right<<setw(61)<<"□×"+tostr(sk)<<endl;
cout<<"─────────────────────────────────────────────────────────────\n";
cout<<"╭───────────╮ ╭───────────╮ ╭───────────╮ ╭───────────╮ \n";
for(int i=1;i<=4;i++)
if(card[i])
cout<<"│"<<grade[i]<<"│ ";
else
cout<<"│ │ ";
for(int i=1;i<=3;i++)
cout<<"\n│ │ │ │ │ │ │ │";
cout<<"\n";
if(judge){
for(int i=1;i<=4;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★ ★ │ ";
else if(card[i]-1==3)
cout<<"│★ ★ ★ │ ";
else if(card[i]-1==4)
cout<<"│★ ★ ★ ★ │ ";
else if(card[i]-1>=5)
cout<<"│★ ★ ★ ★ ★ │ ";
else
cout<<"│ │ ";
}
else{
for(int i=1;i<=4;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★ ★ │ ";
else if(card[i]-1==3)
cout<<"│★ ★ ★ │ ";
else if(card[i]-1==4)
cout<<"│★ ★ ★ ★ │ ";
else if(card[i]-1>=5)
cout<<"│★ ★ ★ ★ ★│ ";
else
cout<<"│ │ ";
}
cout<<"\n";
for(int i=1;i<=4;i++)
if(card[i])
cout<<"│"<<std::left<<setw(12)<<people[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n╰───────────╯ ╰───────────╯ ╰───────────╯ ╰───────────╯ \n";
cout<<"╭───────────╮ ╭───────────╮ ╭───────────╮ ╭───────────╮ \n";
for(int i=5;i<=8;i++)
if(card[i])
cout<<"│"<<grade[i]<<"│ ";
else
cout<<"│ │ ";
for(int i=1;i<=3;i++)
cout<<"\n│ │ │ │ │ │ │ │";
cout<<"\n";
if(judge){
for(int i=5;i<=8;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★ ★ │ ";
else if(card[i]-1==3)
cout<<"│★ ★ ★ │ ";
else if(card[i]-1==4)
cout<<"│★ ★ ★ ★ │ ";
else if(card[i]-1>=5)
cout<<"│★ ★ ★ ★ ★ │ ";
else
cout<<"│ │ ";
}
else{
for(int i=5;i<=8;i++)
if(card[i]-1==1)
cout<<"│★ │ ";
else if(card[i]-1==2)
cout<<"│★ ★ │ ";
else if(card[i]-1==3)
cout<<"│★ ★ ★ │ ";
else if(card[i]-1==4)
cout<<"│★ ★ ★ ★ │ ";
else if(card[i]-1>=5)
cout<<"│★ ★ ★ ★ ★│ ";
else
cout<<"│ │ ";
}
cout<<"\n";
for(int i=5;i<=8;i++)
if(card[i])
cout<<"│"<<std::left<<setw(11)<<people[i]<<"│ ";
else
cout<<"│ │ ";
cout<<"\n╰───────────╯ ╰───────────╯ ╰───────────╯ ╰───────────╯ \n";
cout<<"你现在要干什么?\n1.说明 2.上课 3.抽卡 4.日志 5.修复 6.重置 7.退出\n";
cin>>input;
if(input=="1"){
cout<<"上课: 可以获得随机名片\n";
Sleep(500);
cout<<"抽卡: 抽取一张卡牌\n";
Sleep(500);
cout<<"日志: 查询历史纪录\n";
Sleep(500);
cout<<"修复: 修复五角星的贴图bug, 再使用一次即可恢复\n";
Sleep(500);
cout<<"重置: 重置当前历史记录\n";
Sleep(500);
cout<<"退出: 略(doge)\n";
Sleep(500);
cout<<"重置和退出不可恢复, 慎用!\n";
Sleep(500);
system("pause");
}
else if(input=="2"){
int ck=rand()%7+-2;
if(sk-ck<0)
ck=rand()%5+1;
sk+=ck;
if(ck>0){
cout<<"你上表现较好, 老师奖励了你";
cout<<ck<<"个名片\n";
rizhi[rzcnt+1]="老师奖励"+tostr(ck)+"个名片";
}
else if(ck<0){
cout<<"你上课表现较差, 老师扣了你";
cout<<abs(ck)<<"个名片\n";
ck=abs(ck);
rizhi[rzcnt+1]="老师扣除"+tostr(ck)+"个名片";
}
else{
cout<<"你上课啥都没干\n";
rizhi[rzcnt+1]="啥也没干";
}
Sleep(500);
rzcnt++;
if(rzcnt==10001){
rzcnt==10000;
for(int i=2;i<=10001;i++)
rizhi[i-1]=rizhi[i];
}
system("pause");
}
else if(input=="3"){
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
cout<<"╭──────╭──────╭──────╭──────╭──────╭──────╭──────╭───────────╮\n";
for(int i=1;i<=6;i++)
cout<<"│ │ │ │ │ │ │ │ │\n";
cout<<"╰──────╰──────╰──────╰──────╰──────╰──────╰──────╰───────────╯\n";
cout<<"\n\n\n\n\n\n\n\n";
cout<<"输入卡牌序号, 表示你所抽的卡牌\n";
cout<<"范围: 1~8\n";
cout<<" □×6 抽取\n";
cin>>input1;
rk=rand()%8+1;
if(input1<1 || input1>8){
cout<<" 无法抽取, 没有这张卡\n";
rizhi[rzcnt+1]="抽卡错误, 未选择范围内卡片";
}
else if(sk>=6 && card[rk]==0){
cout<<"你抽到了卡牌 "<<people[rk]<<" \n";
card[rk]++;
sk-=6;
rizhi[rzcnt+1]="抽到(新卡) "+people[rk];
}
else if(sk>=6 && card[rk]>0){
cout<<"你的卡牌 "<<people[rk]<<" 加了一颗星\n";
card[rk]++;
sk-=6;
rizhi[rzcnt+1]="抽到(+一颗星) "+people[rk];
}
else{
cout<<" 无法抽取, 名片不足\n";
rizhi[rzcnt+1]="无法抽取, 名片不足";
}
Sleep(500);
rzcnt++;
if(rzcnt==10001){
rzcnt==10000;
for(int i=2;i<=10001;i++)
rizhi[i-1]=rizhi[i];
}
system("pause");
}
else if(input=="4"){
for(int i=1;i<=rzcnt;i++)
cout<<i<<"."<<rizhi[i]<<endl;
system("pause");
}
else if(input=="5"){
cout<<"正在修复中, 请稍后";
Sleep(500);
cout<<".";
Sleep(500);
cout<<".";
Sleep(500);
cout<<".";
Sleep(1000);
cout<<"\n修复成功! \n";
judge==!judge;
Sleep(1000);
}
else if(input=="6"){
cout<<"防误触! \n";
cout<<"真的要重置当前记录吗? (输入 是 或 否) \n";
cin>>input;
if(input=="是"){
cout<<"正在重置中, 请稍后";
Sleep(500);
cout<<".";
Sleep(500);
cout<<".";
Sleep(500);
cout<<".";
Sleep(1000);
cout<<"\n重置成功! \n";
Sleep(1000);
memset(card,10,0);
memset(rizhi,10000,0);
sk=0;
rzcnt=0;
system("pause");
}
}
else if(input=="7"){
cout<<"防误触! \n";
cout<<"真的要退出吗? (输入 是 或 否) \n";
cin>>input;
if(input=="是")
return 0;
}
}
return 0;
}
中级守护
#include<bits/stdc++.h>
using namespace std;
struct j{
string fire;//技能名字
string fine;//对敌人造成的伤害
};
struct chacracter{
string name;
int HP,G,Z;
j ay;
int idx,num;
string turn_num="";
string wy_num="";
int go_upper=0;
}; /*
HP:血量
G:攻击力
Z:智力
ay:特技
idx:所在队伍
num:人物编号
*/
int n=1;
chacracter c[110];
j how[20];//技能
void give_num_to_how_a_fine_work(){
how[1].fire="火球术",how[1].fine="100";
how[2].fire="心灵控制",how[2].fine="10+turn";
how[3].fire="地裂术",how[3].fine="25+every";
//how[4].fire="铁壁",how[4].fine="0+fend";//fend防守
how[4].fire="瘟疫",how[4].fine="10+wy";//wy感染
how[5].fire="懒癌",how[5].fine="20+wy";//wy感染
//how[7].fire="回避攻击",how[8].fine="0+fend";
how[6].fire="终极一击",how[6].fine="200+every+wy+turn";
return ;
}
void out(string said){
for(int i=0;i<said.length();i++){
cout<<said[i];
}
return ;
}//输入一个字符串,每5毫秒输出一个字符
void ano(){
cout<<"\n";
return ;
}//换行简写
void begin(){
//ano();
//ano();
//cout<"\n";
return ;
}//开始对白
void give_num_to_people(int id){
int x=rand()%5+1;
c[id].ay.fire=how[x].fire;
c[id].ay.fine=how[x].fine;
if(c[id].name.find("dragon",0)!=-1){
c[id].ay.fire=how[6].fire;
c[id].ay.fine=how[6].fine;
}
c[id].HP=rand()%201+200;
c[id].G=rand()%41+10;
c[id].Z=rand()%100+1;
return ;
}//对于每一个人物,生成属性。
void in(){
int ans=1;
while(getline(cin,c[n].name)){
if(c[n].name.empty()){
ans++;
} else {
c[n].idx=ans;
c[n].num=n;
give_num_to_people(n);
n++;
}
//give_num_to_people(n);
//cout<<n<<" "<<c[n].HP<<" "<<c[n].G<<" "<<c[n].Z<<" "<<c[n].idx<<"\n";
}
n--;
if(ans==1){//单斗模式
//int poster=1;
for(int i=1;i<=n;i++){
c[i].idx=i;
}
}
return ;
}//输入
void fight_begin_out(){
for(int i=1;i<=n;i++){
cout<<(char)(c[i].idx+'A'-1)<<":";
cout<<c[i].name<<" ";
cout<<"HP:"<<c[i].HP<<" ";
cout<<"攻:"<<c[i].G<<" ";
cout<<"智:"<<c[i].Z<<" ";
//cout<<"队伍:"<<c[i].idx<<" ";
ano();
//if(c[i].idx!=c[i-1].idx) ano();
}
cout<<"_____________________________________________________\n";
return ;
}//开始输出属性
bool check(){
int pos=0,cnt=0;
for(int i=1;i<=n;i++){
if(c[i].HP>0){
if(c[i].idx!=pos){
pos=c[i].idx;
cnt++;
}
}
}
return cnt>1;
}
int turn(string s){
int sum=0;
for(int i=0;i<s.length();i++){
if(!(s[i]>='0'&&s[i]<='9')) break;
sum=sum*10+(int)(s[i]-'0');
}
return sum;
}
void fight(){
int now_turn=0;
while(check()){
//cout<<"yes\n";
now_turn=now_turn%n+1;
if(c[now_turn].HP==0) continue;
int pos=rand()%3+1;//出招与否
//if(c[now_turn].ay.fire=="铁壁"||c[now_turn].ay.fire=="回避攻击"){
// pos=2;
//}
int names_you_go=rand()%n+1;
while(c[names_you_go].idx==c[now_turn].idx||c[names_you_go].HP<=0) names_you_go=rand()%n+1;
int yes=rand()%10+1;
switch(pos){
case 3:{//出技能
cout<<c[now_turn].name<<" 使用了 "<<c[now_turn].ay.fire<<",\n";
int flag=c[now_turn].ay.fine.find("every",0);
if(flag==-1){
if(yes==1){
cout<<c[names_you_go].name<<" 回避了攻击 。\n";
} else {
int fight_num=turn(c[now_turn].ay.fine);
//if(!c[now_turn].ay.fire)
cout<<c[names_you_go].name<<" 受到了 "<<fight_num<<"点伤害";
c[names_you_go].HP-=fight_num;
if(c[names_you_go].HP<0) c[names_you_go].HP=0;
if(c[names_you_go].HP==0){
cout<<" "<<c[names_you_go].name<<"被击倒了";
c[now_turn].go_upper++;
}
if(c[now_turn].ay.fine.find("turn",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被鬼魅了 ";
c[names_you_go].turn_num="yes";
}
if(c[now_turn].ay.fine.find("wy",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被感染了 ";
c[names_you_go].wy_num="yes";
}
}
ano();
} else {
int fight_num=turn(c[now_turn].ay.fine);
for(int i=1;i<=n;i++){
if(c[i].HP<=0) continue;
if(c[i].idx==c[names_you_go].idx){
cout<<" "<<c[i].name<<" 受到了 "<<fight_num<<"点伤害";
c[i].HP-=fight_num;
if(c[i].HP<=0){
c[i].HP=0;
cout<<","<<c[i].name<<"被击倒了;\n";
c[now_turn].go_upper++;
continue;
}
if(c[now_turn].ay.fine.find("turn",0)!=-1){
cout<<","<<c[i].name<<" 被鬼魅了 ";
c[i].turn_num="yes";
}
if(c[now_turn].ay.fine.find("wy",0)!=-1){
cout<<","<<c[i].name<<" 被感染了 ";
c[i].wy_num="yes";
}
cout<<"\n";
}
}
}
break;
}
default:{//出普通攻击
cout<<c[now_turn].name<<"发起攻击,";
if(yes==1){
cout<<c[names_you_go].name<<" 回避了攻击 。";
} else {
int fight_num=c[now_turn].G;
//if(!c[now_turn].ay.fire)
cout<<c[names_you_go].name<<" 受到了 "<<fight_num<<"点伤害";
c[names_you_go].HP-=fight_num;
if(c[names_you_go].HP<0) c[names_you_go].HP=0;
if(c[names_you_go].HP==0){
cout<<" "<<c[names_you_go].name<<"被击倒了";
c[now_turn].go_upper++;
}
if(c[now_turn].ay.fine.find("turn",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被鬼魅了 ";
c[names_you_go].turn_num="yes";
}
if(c[now_turn].ay.fine.find("wy",0)!=-1){
cout<<","<<c[names_you_go].name<<" 被感染了 ";
c[names_you_go].wy_num="yes";
}
ano();
}
break;
}
}
cout<<endl;
}
return ;
}
void last_out(){
//cout<<turn("100");
ano();
ano();
cout<<"胜者:";
int pos=-1;
ano();
for(int i=1;i<=n;i++){
if(c[i].HP>0){
pos=c[i].idx;
break;
}
}
for(int i=1;i<=n;i++){
if(c[i].idx==pos){
cout<<(char)(c[i].idx+'A'-1)<<":";
cout<<c[i].name<<" "<<c[i].go_upper<<"\n";
}
}
ano();
ano();
cout<<"败者:";
ano();
for(int i=1;i<=n;i++){
if(c[i].idx!=pos){
cout<<(char)(c[i].idx+'A'-1)<<":";
cout<<c[i].name<<" "<<c[i].go_upper<<"\n";
}
}
return ;
}
int main(){
give_num_to_how_a_fine_work();
begin();
in();
fight_begin_out();
fight();
last_out();
return 0;
}
好玩