目录
小游戏第二弹来啦,后面还会有很多(大约100+个小游戏),建议大家收藏订阅哟,不然会迷路的。
创意类
5.人生模拟器
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
#include<stdio.h>
#include<windows.h>
#include<conio.h>
#include<stdlib.h>
#include<time.h>
#define LEN 30
#define WID 25
#include<bits/stdc++.h>
#include<iostream>
#include<fstream>
#include<algorithm>
#include<windows.h>
#include<cstdlib>
#include<ctime>
#include<conio.h>
#include<iostream>
#include<fstream>
#include<algorithm>
#include <string>
#include <Windowsx.h>
#include <cmath>
#include <sstream>
#include <iomanip>
#include <vector>
#include <olectl.h>
using namespace std;
int w[15],b[9999],u=1,jk[99];
string sbsb="tanyu";
void gotoxy(int x, int y){
COORD pos = {x,y};
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOut, pos);
}
int main(){
gotoxy(26,25);
Sleep(500);
system("color 0f");
gotoxy(34,1);
cout<<"注意事项";
gotoxy(15,2);
cout<<"1.c++人生重开模拟器(修仙6.5版)未经允许,不得转载";
gotoxy(25,3);
cout<<"2.本作品由谭羽工作室独自完成";
gotoxy(34,5);
cout<<"使用说明"<<endl;
gotoxy(18,6);
cout<<"1.当需要输入时,输入内容后请按回车键(Enter)\n";
gotoxy(12,7);
cout<<" 看完后";
system("pause");
system("cls");
Sleep(500);
system("color 0f");
for(int i=1;i<=9;i++) cout<<endl;
cout<<" 抵制不良游戏,拒绝盗版游戏。"<<endl;
cout<<" 注意自身保护,谨防受骗上当。"<<endl;
cout<<" 适度游戏益脑,沉迷游戏伤身。"<<endl;
cout<<" 合理安排时间,享受健康生活。"<<endl;
Sleep(5000);
system("cls");
unsigned seed;
srand(seed);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
gotoxy(41,7);
for(int i=1;i<=10;i++){
cout<<"|";
gotoxy(41,6+i);
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED);
for(int i=1;i<=6;i++){
gotoxy(40-i+1,i+5);
cout<<"▊";}
for(int i=1;i<=5;i++){
gotoxy(35+i,11+i);
cout<<"▊";
}
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED);
for(int i=1;i<=6;i++){
gotoxy(40-i+1,i+5);
cout<<"▊";}
for(int i=1;i<=5;i++){
gotoxy(35+i,11+i);
cout<<"▊";
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
gotoxy(41,7);
for(int i=1;i<=5;i++){
cout<<"\\"<<"\b";
gotoxy(40+i,6+i);
}
gotoxy(45,11);
cout<<"|";
gotoxy(45-1,12);
for(int i=1;i<=4;i++){
cout<<"/";
gotoxy(44-i,12+i);
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
for(int i=1;i<=14;i++){
gotoxy(44-i+1,11);
cout<<"-";
}
gotoxy(30,11);
cout<<"<";
int qaz=44;
Sleep(2000);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
gotoxy(41,7);
for(int i=1;i<=10;i++){
cout<<"|";
gotoxy(41,6+i);
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED);
for(int i=1;i<=6;i++){
gotoxy(40-i+1,i+5);
cout<<"▊";
}
for(int i=1;i<=5;i++){
gotoxy(35+i,11+i);
cout<<"▊";
}
system("cls");
for(int z=1;z<=3;z++){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
qaz=qaz-16;
for(int i=1;i<=14;i++){
gotoxy(qaz-i+1,11);
cout<<"-";
}
gotoxy(qaz-14,11);
cout<<"<";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED);
for(int i=1;i<=6;i++){
gotoxy(40-i+1,i+5);
cout<<"▊";}
for(int i=1;i<=5;i++){
gotoxy(35+i,11+i);
cout<<"▊";
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
gotoxy(41,7);
for(int i=1;i<=10;i++){
cout<<"|";
gotoxy(41,6+i);
}
system("cls");
}
for(int i=1;i<=10;i++) cout<<endl;
cout<<" ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
cout<<"谭";Sleep(500);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"羽";Sleep(500);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"工";Sleep(500);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
cout<<"作";Sleep(500);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"室";Sleep(2000);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
system("cls");
srand(seed);
int fd,po=0,rt=0;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
int yu=200,ui=100,io=100;
cout<<"人生重开模拟器(修仙版6.5版):进入游戏请输入:1 退出游戏请输入:0"<<endl;
int a=0,s=0,d=0,f=0,g=0,h=0,j=0,k=0,l=0,qs=0,sq=0;//悟出大道数a,金之大道s,木之大道d,水之大道f,火之大道g,土之大道h,生命大道j,毁灭大道k,混沌大道l,107821:密码。
int q;
int as=0;
int zxc=100;
cin>>q;
if(q==1){
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"Ok!我们来进入吧!"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
for(int i=1;i<=20;i++){
if(i>=1&&i<=10||i>=17&&i<=20){Sleep(200);cout<<"█";}
else {Sleep(350);cout<<"█";}
}
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"ok,请选择天赋点(天赋点40):"<<endl;
int da=0;
int z=0,x=0,c=0,v=0;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
cout<<"颜值: ";
cin>>z;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"智力: ";
cin>>x;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"钱数: ";
cin>>c;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"健康:";
cin>>v;
cout<<endl;
if(z==12&&x==12&&c==6){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
cout<<"你触发了时间大道:"<<endl;
cout<<"输入的时间越少,速度更快(输入1000== 一秒)"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
cout<<"凡人时间: ";
cin>>yu;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<endl<<"仙人时间: ";
cin>>ui;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<endl<<"神者时间: ";
cin>>io;
}
if(z+x+c+v>40){
for(;;){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"ok,请选择天赋点(天赋点40):"<<endl;
cout<<"请正常选择或总天赋点小于等于40。"<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
cout<<"颜值: ";
cin>>z;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"智力: ";
cin>>x;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"钱数: ";
cin>>c;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"健康:";
cin>>v;
cout<<endl;
if(z+x+c<=30){break;}
}
}
int asdf;
srand(time(0));
asdf=rand()%3+1;
if(asdf==1){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"你出生了,是男孩。"<<endl;
c=c*1000;
v=v+5;
}
if(asdf==2){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"你出生了,是女孩。"<<endl;
c=c*100;
z=z+5;
}
if(asdf==3){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"你出生了,是特殊的无性人!"<<endl;
c=c*200;
x=x+5;
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
cout<<"颜值:"<<z<<" ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"智力:"<<x<<" ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"钱数:"<<c<<" ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"健康:"<<v<<" "<<endl<<endl;
Sleep(300);
for(int i=1;i<100;i++){
int rt=0;
int a=rand()%100+1;
if(0>=v){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"第"<<i<<"年:"<<"你因为突发病或事件死了.(注意身体和运气)"<<endl;da=1;break;
}
if(a==1){cout<<"第"<<i<<"年:"<<"你捡到了养颜宝典,颜值加3."<<endl;z=z+3;rt=1;}
if(a==2){cout<<"第"<<i<<"年:"<<"你捡到0.2斤铁,钱数加200."<<endl;c=c+200;rt=1;}
if(a==3){cout<<"第"<<i<<"年:"<<"你被人诈骗了,钱数减600."<<endl;c=c-600;rt=1;}
if(a==4){cout<<"第"<<i<<"年:"<<"你学了一本书,智力加3."<<endl;x=x+3;rt=1;}
if(a==5){cout<<"第"<<i<<"年:"<<"你捡到了一个钻戒,钱数加2000."<<endl;c=c+2000;rt=1;}
if(a==6&&jk[1]==0){cout<<"第"<<i<<"年:"<<"【绝密消息】:有一个人被车撞了。他死前大喊”不!我可是10世转修者!“"<<endl;jk[1]++;rt=1;}
else if(a==6&&jk[1]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==7&&jk[2]==0){cout<<"第"<<i<<"年:"<<"【绝密消息】:陈忆轩一天刷10道难度三的题."<<endl;jk[2]++;rt=1;}
else if(a==7&&jk[2]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==8&&jk[3]==0){cout<<"第"<<i<<"年:"<<"【绝密消息】:阮烁恒天天看《无职转生~到了异世界就拿出真本事~》!!!"<<endl;jk[3]++;rt=1;}
else if(a==8&&jk[3]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==9&&jk[4]==0){cout<<"第"<<i<<"年:"<<"【绝密消息】:作者于2021年12月20日与羽浩腾一起合作。"<<endl;jk[4]++;rt=1;}
else if(a==9&&jk[4]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==10&&jk[5]==0){cout<<"第"<<i<<"年:"<<"【绝密消息】:阮烁恒习的欧啦神功后天天把作者打的****。"<<endl;jk[5]++;rt=1;}
else if(a==10&&jk[5]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==11&&jk[6]==0){cout<<"第"<<i<<"年:"<<"日本被和谐成月本."<<endl;jk[6]++;rt=1;}
else if(a==11&&jk[6]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==12&&jk[7]==0){cout<<"第"<<i<<"年:"<<"中国GPS超过美国."<<endl;jk[7]++;rt=1;}
else if(a==12&&jk[7]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==18){cout<<"第"<<i<<"年:"<<"你被特别培训,全方面提升3."<<endl;z=z+3;x=x+3;v=v+3;rt=1;}
if(a==19){cout<<"第"<<i<<"年:"<<"你不小心用小刀划了脸,颜值减5,健康减1."<<endl;z=z-5;rt=1;v=v-1;}
if(a==20){cout<<"第"<<i<<"年:"<<"你不小心被车撞了脑袋,智力减5,健康减5."<<endl;x=x-5;rt=1;v=v-5;}
if(a==21){cout<<"第"<<i<<"年:"<<"你患上了感冒,健康减2."<<endl;v=v-2;rt=1;}
if(a==22){cout<<"第"<<i<<"年:"<<"你坚持锻炼,健康加2."<<endl;v=v+2;rt=1;}
if(a==23){cout<<"第"<<i<<"年:"<<"因为你惹了一只狼狗,所以你每天被狗追着跑...健康加3."<<endl;v=v+3;rt=1;}
if(a==24){cout<<"第"<<i<<"年:"<<"因为你勤奋工作,所以钱数加3000!"<<endl;c=c+3000;rt=1;}
if(a==25&&jk[8]==0&&c>=100000){cout<<"第"<<i<<"年:"<<"你向乞丐买了一本《古仙图》.钱数减100000."<<endl;c=c-100000;po=po+1;jk[8]++;rt=1;}
else if(a==25&&jk[8]==1&&c>=100000){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(a==26){cout<<"第"<<i<<"年:"<<"你捡到了100元"<<endl;c=c+100;rt=1;}
if(a==27){cout<<"第"<<i<<"年:"<<"你突然病倒了!健康减5!"<<endl;v=v-5;}
if(a==28&&z>=20){cout<<"第"<<i<<"年:"<<"你迷到了一大堆人!"<<endl;}
if(a==29&&jk[9]==0){cout<<"第"<<i<<"年:"<<"【绝密消息】:中国发现了外星文明!"<<endl;x=x+10;jk[9]++;}
else if(a==29&&jk[9]==1){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;rt=1;}
if(rt==0){cout<<"第"<<i<<"年:"<<"平平无奇的一年."<<endl;}
if(c<0){cout<<"你欠债了"<<c<<"元"<<endl;}
if(c<=50){cout<<"你破产了!!全方面-2."<<endl;z=z-2;x=x-2;v=v-2;}
if(z<=1){cout<<"你因为颜值太低了,被人摁在地上摩擦!健康减1!"<<endl;v=v-1;}
if(x>=20){cout<<"你因为智力太高了,参加比赛获得了1000元!"<<endl;c=c+1000;}
z=z+0.1;x=x+0.1;c=c+1000;v=v+0.1;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
cout<<"颜值:"<<z<<" ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"智力:"<<x<<" ";
if(c>=0){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"钱数:"<<c<<" ";}
else{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"钱数:-"<<c<<" ";
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"健康:"<<v<<" "<<endl<<endl;
Sleep(yu);
}
int ghj[9999]={0};
if(da==1){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);cout<<"寿元终.";}
else{
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"第100年:你打开了小盒子,发现了《修仙功》这本修仙功法,开始修仙之路,寿元提升至150年。";
if(po>0){cout<<"你发现当初买的《古仙图》比《修仙功》效果更好!";}
cout<<endl;int qw=150;
u=u+(z*0.01)+(x*0.01)+(v*0.1);
for(int i=101;i<=qw;i++){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
if(250>=u){
int rt=0;
fd=rand()%50+1;
if(fd==1){cout<<"第"<<i<<"年:"<<"你找到灵气聚集之处,修为大幅度上升。"<<endl;u=u+1.5;rt=1;}
if(fd==2){cout<<"第"<<i<<"年:"<<"你找到异果,修为小幅度上升。"<<endl;u=u+1;rt=1;}
if(fd==3){cout<<"第"<<i<<"年:"<<"你走火入魔,修为大幅度下降。"<<endl;u=u-2;rt=1;}
if(fd==4){cout<<"第"<<i<<"年:"<<"你杀了一位筑基期修仙者,修为大幅度上升。"<<endl;u=u+1.5;rt=1;}
if(fd==5&&ghj[1]<=2){cout<<"第"<<i<<"年:"<<"你获得渡劫失败的渡劫期修仙者传承,修为提升X。"<<endl;u=u+10;ghj[1]++;rt=1;}
if(fd==6&&ghj[1]>2){cout<<"第"<<i<<"年:"<<"修行..."<<endl;u=u+0.2;rt=1;}
if(fd==7){cout<<"第"<<i<<"年:"<<"你悟了一些《神仙图》的内容,修为加快提升。"<<endl;po=po+0.1;rt=1;}
if(rt==0){cout<<"第"<<i<<"年:"<<"修行..."<<endl;u=u+0.2;}
}
else{
int gd;
gd=rand()%100+1;
if(gd==1&&sq==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟透了伟大的马克思主义。"<<endl;u=u+1;sq=1;}else{if(gd==1){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==2&&qs==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了空手道,好像并没有什么卵用。"<<endl;u=u+1;qs=1;}else{if(gd==2){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==3&&s==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了金之大道。"<<endl;u=u+4;s=1;a=a+1;}else{if(gd==3){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==4&&d==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了木之大道。"<<endl;u=u+4;d=1;a=a+1;}else{if(gd==4){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==5&&f==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了水之大道。"<<endl;u=u+4;f=1;a=a+1;}else{if(gd==5){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==6&&g==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了火之大道。"<<endl;u=u+4;g=1;a=a+1;}else{if(gd==6){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==7&&h==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了土之大道。"<<endl;u=u+4;h=1;a=a+1;}else{if(gd==7){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==8&&j==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了生命大道。"<<endl;u=u+5;j=1;a=a+1;}else{if(gd==8){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==9&&k==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了毁灭大道。"<<endl;u=u+5;k=1;a=a+1;}else{if(gd==9){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd==10&&l==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);cout<<"第"<<i<<"年:"<<"你悟出了混沌大道。"<<endl;u=u+5;l=1;a=a+1;}else{if(gd==10){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+0.2;}}
if(gd!=1&&gd!=2&&gd!=3&&gd!=4&&gd!=5&&gd!=6&&gd!=7&&gd!=8&&gd!=9&&gd!=10){cout<<"第"<<i<<"年:"<<"悟道..."<<endl;u=u+1;}
}
u=u+po;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
cout<<"灵力点:"<<u<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
if(u>=2&&u<4&&b[1]==0){cout<<"突破凝气初期1星,寿元提升至160年。"<<endl;qw=160;b[1]=1;}
if(u>=4&&u<6&&b[2]==0){cout<<"突破凝气初期2星,寿元提升至170年。"<<endl;qw=170;b[2]=1;}
if(u>=6&&u<8&&b[3]==0){cout<<"突破凝气初期3星,寿元提升至180年。"<<endl;qw=180;b[3]=1;}
if(u>=8&&u<10&&b[4]==0){cout<<"突破凝气初期4星,寿元提升至185年。"<<endl;qw=185;b[4]=1;}
if(u>=10&&u<12&&b[5]==0){cout<<"突破凝气初期5星,寿元提升至190年。"<<endl;qw=190;b[5]=1;}
if(u>=12&&u<14&&b[6]==0){cout<<"突破凝气中期1星,寿元提升至200年。"<<endl;qw=200;b[6]=1;}
if(u>=14&&u<16&&b[7]==0){cout<<"突破凝气中期2星,寿元提升至210年。"<<endl;qw=210;b[7]=1;}
if(u>=16&&u<18&&b[8]==0){cout<<"突破凝气中期3星,寿元提升至220年。"<<endl;qw=220;b[8]=1;}
if(u>=18&&u<20&&b[9]==0){cout<<"突破凝气中期4星,寿元提升至230年。"<<endl;qw=230;b[9]=1;}
if(u>=20&&u<22&&b[10]==0){cout<<"突破凝气中期5星,寿元提升至240年。"<<endl;qw=240;b[10]=1;}
if(u>=22&&u<24&&b[11]==0){cout<<"突破凝气高期1星,寿元提升至250年。"<<endl;qw=250;b[11]=1;}
if(u>=24&&u<26&&b[12]==0){cout<<"突破凝气高期2星,寿元提升至260年。"<<endl;qw=260;b[12]=1;}
if(u>=26&&u<28&&b[13]==0){cout<<"突破凝气高期3星,寿元提升至270年。"<<endl;qw=270;b[13]=1;}
if(u>=28&&u<30&&b[14]==0){cout<<"突破凝气高期4星,寿元提升至280年。"<<endl;qw=280;b[14]=1;}
if(u>=30&&u<35&&b[15]==0){cout<<"突破凝气高期5星,寿元提升至290年。"<<endl;qw=290;b[15]=1;}
if(u>=35&&u<37&&b[16]==0){cout<<"突破筑基初期1星,寿元提升至300年。"<<endl;qw=300;b[16]=1;}
if(u>=37&&u<39&&b[17]==0){cout<<"突破筑基初期2星,寿元提升至310年。"<<endl;qw=310;b[17]=1;}
if(u>=39&&u<41&&b[18]==0){cout<<"突破筑基初期3星,寿元提升至320年。"<<endl;qw=320;b[18]=1;}
if(u>=41&&u<43&&b[19]==0){cout<<"突破筑基初期4星,寿元提升至330年。"<<endl;qw=330;b[19]=1;}
if(u>=45&&u<47&&b[20]==0){cout<<"突破筑基初期5星,寿元提升至340年。"<<endl;qw=340;b[20]=1;}
if(u>=47&&u<49&&b[21]==0){cout<<"突破筑基中期1星,寿元提升至350年。"<<endl;qw=350;b[21]=1;}
if(u>=49&&u<51&&b[22]==0){cout<<"突破筑基中期2星,寿元提升至360年。"<<endl;qw=360;b[22]=1;}
if(u>=51&&u<53&&b[23]==0){cout<<"突破筑基中期3星,寿元提升至370年。"<<endl;qw=370;b[23]=1;}
if(u>=55&&u<57&&b[24]==0){cout<<"突破筑基中期4星,寿元提升至380年。"<<endl;qw=380;b[24]=1;}
if(u>=57&&u<59&&b[25]==0){cout<<"突破筑基中期5星,寿元提升至390年。"<<endl;qw=390;b[25]=1;}
if(u>=59&&u<61&&b[26]==0){cout<<"突破筑基高期1星,寿元提升至400年。"<<endl;qw=400;b[26]=1;}
if(u>=61&&u<63&&b[27]==0){cout<<"突破筑基高期2星,寿元提升至410年。"<<endl;qw=410;b[27]=1;}
if(u>=63&&u<65&&b[28]==0){cout<<"突破筑基高期3星,寿元提升至420年。"<<endl;qw=420;b[28]=1;}
if(u>=65&&u<67&&b[29]==0){cout<<"突破筑基高期4星,寿元提升至430年。"<<endl;qw=430;b[29]=1;}
if(u>=69&&u<75&&b[30]==0){cout<<"突破筑基高期5星,寿元提升至440年。"<<endl;qw=440;b[30]=1;}
if(u>=75&&u<78&&b[31]==0){cout<<"突破金丹初期1星,寿元提升至450年。"<<endl;qw=450;b[31]=1;}
if(u>=78&&u<81&&b[32]==0){cout<<"突破金丹初期2星,寿元提升至460年。"<<endl;qw=460;b[32]=1;}
if(u>=81&&u<84&&b[33]==0){cout<<"突破金丹初期3星,寿元提升至470年。"<<endl;qw=470;b[33]=1;}
if(u>=84&&u<87&&b[34]==0){cout<<"突破金丹初期4星,寿元提升至480年。"<<endl;qw=480;b[34]=1;}
if(u>=87&&u<90&&b[35]==0){cout<<"突破金丹初期5星,寿元提升至490年。"<<endl;qw=490;b[35]=1;}
if(u>=90&&u<93&&b[36]==0){cout<<"突破金丹中期1星,寿元提升至500年。"<<endl;qw=500;b[36]=1;}
if(u>=93&&u<96&&b[37]==0){cout<<"突破金丹中期2星,寿元提升至510年。"<<endl;qw=510;b[37]=1;}
if(u>=96&&u<99&&b[38]==0){cout<<"突破金丹中期3星,寿元提升至520年。"<<endl;qw=520;b[38]=1;}
if(u>=99&&u<102&&b[39]==0){cout<<"突破金丹中期4星,寿元提升至530年。"<<endl;qw=530;b[39]=1;}
if(u>=102&&u<105&&b[40]==0){cout<<"突破金丹中期5星,寿元提升至540年。"<<endl;qw=540;b[40]=1;}
if(u>=108&&u<111&&b[41]==0){cout<<"突破金丹高期1星,寿元提升至550年。"<<endl;qw=550;b[41]=1;}
if(u>=111&&u<114&&b[42]==0){cout<<"突破金丹高期2星,寿元提升至560年。"<<endl;qw=560;b[42]=1;}
if(u>=114&&u<117&&b[43]==0){cout<<"突破金丹高期3星,寿元提升至570年。"<<endl;qw=570;b[43]=1;}
if(u>=117&&u<120&&b[44]==0){cout<<"突破金丹高期4星,寿元提升至580年。"<<endl;qw=580;b[44]=1;}
if(u>=120&&u<125&&b[45]==0){cout<<"突破金丹高期5星,寿元提升至590年。"<<endl;qw=590;b[45]=1;}
if(u>=125&&u<130&&b[46]==0){cout<<"突破元婴初期1星,寿元提升至600年。"<<endl;qw=600;b[46]=1;}
if(u>=130&&u<135&&b[47]==0){cout<<"突破元婴初期2星,寿元提升至610年。"<<endl;qw=610;b[47]=1;}
if(u>=135&&u<140&&b[48]==0){cout<<"突破元婴初期3星,寿元提升至620年。"<<endl;qw=620;b[48]=1;}
if(u>=140&&u<145&&b[49]==0){cout<<"突破元婴初期4星,寿元提升至630年。"<<endl;qw=630;b[49]=1;}
if(u>=145&&u<150&&b[50]==0){cout<<"突破元婴初期5星,寿元提升至640年。"<<endl;qw=640;b[50]=1;}
if(u>=150&&u<155&&b[51]==0){cout<<"突破元婴中期1星,寿元提升至650年。"<<endl;qw=650;b[51]=1;}
if(u>=155&&u<160&&b[52]==0){cout<<"突破元婴中期2星,寿元提升至660年。"<<endl;qw=660;b[52]=1;}
if(u>=160&&u<165&&b[53]==0){cout<<"突破元婴中期3星,寿元提升至670年。"<<endl;qw=670;b[53]=1;}
if(u>=165&&u<170&&b[54]==0){cout<<"突破元婴中期4星,寿元提升至680年。"<<endl;qw=680;b[54]=1;}
if(u>=170&&u<175&&b[55]==0){cout<<"突破元婴中期5星,寿元提升至690年。"<<endl;qw=690;b[55]=1;}
if(u>=175&&u<180&&b[56]==0){cout<<"突破元婴高期1星,寿元提升至700年。"<<endl;qw=700;b[56]=1;}
if(u>=180&&u<185&&b[57]==0){cout<<"突破元婴高期2星,寿元提升至710年。"<<endl;qw=710;b[57]=1;}
if(u>=185&&u<190&&b[58]==0){cout<<"突破元婴高期3星,寿元提升至720年。"<<endl;qw=720;b[58]=1;}
if(u>=190&&u<195&&b[59]==0){cout<<"突破元婴高期4星,寿元提升至730年。"<<endl;qw=730;b[59]=1;}
if(u>=195&&u<200&&b[60]==0){cout<<"突破元婴高期5星,寿元提升至740年。"<<endl;qw=740;b[60]=1;}
if(u>=200&&u<205&&b[61]==0){cout<<"突破化神初期1星,寿元提升至750年。"<<endl;qw=750;b[61]=1;}
if(u>=205&&u<210&&b[62]==0){cout<<"突破化神初期2星,寿元提升至760年。"<<endl;qw=760;b[62]=1;}
if(u>=210&&u<215&&b[63]==0){cout<<"突破化神初期3星,寿元提升至770年。"<<endl;qw=770;b[63]=1;}
if(u>=215&&u<220&&b[64]==0){cout<<"突破化神初期4星,寿元提升至780年。"<<endl;qw=780;b[64]=1;}
if(u>=220&&u<225&&b[65]==0){cout<<"突破化神初期5星,寿元提升至790年。"<<endl;qw=790;b[65]=1;}
if(u>=225&&u<230&&b[66]==0){cout<<"突破化神中期1星,寿元提升至800年。"<<endl;qw=800;b[66]=1;}
if(u>=230&&u<235&&b[67]==0){cout<<"突破化神中期2星,寿元提升至810年。"<<endl;qw=810;b[67]=1;}
if(u>=235&&u<240&&b[68]==0){cout<<"突破化神中期3星,寿元提升至820年。"<<endl;qw=820;b[68]=1;}
if(u>=240&&u<245&&b[69]==0){cout<<"突破化神中期4星,寿元提升至830年。"<<endl;qw=830;b[69]=1;}
if(u>=245&&u<250&&b[70]==0){cout<<"突破化神中期5星,寿元提升至840年。"<<endl;qw=840;b[70]=1;}
if(u>=250&&u<255&&b[71]==0){cout<<"突破化神高期1星,寿元提升至850年。"<<endl;qw=850;b[71]=1;}
if(u>=255&&u<260&&b[72]==0){cout<<"突破化神高期2星,寿元提升至860年。"<<endl;qw=860;b[72]=1;}
if(u>=260&&u<265&&b[73]==0){cout<<"突破化神高期3星,寿元提升至870年。"<<endl;qw=870;b[73]=1;}
if(u>=265&&u<270&&b[74]==0){cout<<"突破化神高期4星,寿元提升至880年。"<<endl;qw=880;b[74]=1;}
if(u>=270&&u<300&&b[75]==0){cout<<"突破化神高期5星,寿元提升至890年。"<<endl;qw=890;b[75]=1;}
if(u>=300&&u<310&&b[76]==0){cout<<"突破炼虚初期1星,寿元提升至900年。"<<endl;qw=900;b[76]=1;}
if(u>=310&&u<320&&b[77]==0){cout<<"突破炼虚初期2星,寿元提升至910年。"<<endl;qw=910;b[77]=1;}
if(u>=320&&u<330&&b[78]==0){cout<<"突破炼虚初期3星,寿元提升至920年。"<<endl;qw=920;b[78]=1;}
if(u>=330&&u<340&&b[79]==0){cout<<"突破炼虚初期4星,寿元提升至930年。"<<endl;qw=930;b[79]=1;}
if(u>=340&&u<350&&b[80]==0){cout<<"突破炼虚初期5星,寿元提升至940年。"<<endl;qw=940;b[80]=1;}
if(u>=350&&u<360&&b[81]==0){cout<<"突破炼虚中期1星,寿元提升至950年。"<<endl;qw=950;b[81]=1;}
if(u>=360&&u<370&&b[82]==0){cout<<"突破炼虚中期2星,寿元提升至960年。"<<endl;qw=960;b[82]=1;}
if(u>=370&&u<380&&b[83]==0){cout<<"突破炼虚中期3星,寿元提升至970年。"<<endl;qw=970;b[83]=1;}
if(u>=380&&u<390&&b[84]==0){cout<<"突破炼虚中期4星,寿元提升至980年。"<<endl;qw=980;b[84]=1;}
if(u>=390&&u<400&&b[85]==0){cout<<"突破炼虚中期5星,寿元提升至990年。"<<endl;qw=990;b[85]=1;}
if(u>=400&&u<410&&b[86]==0){cout<<"突破炼虚高期1星,寿元提升至1000年。"<<endl;qw=1000;b[86]=1;}
if(u>=410&&u<420&&b[87]==0){cout<<"突破炼虚高期2星,寿元提升至1010年。"<<endl;qw=1010;b[87]=1;}
if(u>=420&&u<430&&b[88]==0){cout<<"突破炼虚高期3星,寿元提升至1020年。"<<endl;qw=1020;b[88]=1;}
if(u>=430&&u<440&&b[89]==0){cout<<"突破炼虚高期4星,寿元提升至1030年。"<<endl;qw=1030;b[89]=1;}
if(u>=440&&u<450&&b[90]==0){cout<<"突破炼虚高期5星,寿元提升至1040年。"<<endl;qw=1040;b[90]=1;}
if(u>=450&&u<450&&b[91]==0){cout<<"突破合体初期1星,寿元提升至1050年。"<<endl;qw=1050;b[91]=1;}
if(u>=460&&u<460&&b[92]==0){cout<<"突破合体初期2星,寿元提升至1060年。"<<endl;qw=1060;b[92]=1;}
if(u>=470&&u<470&&b[93]==0){cout<<"突破合体初期3星,寿元提升至1070年。"<<endl;qw=1070;b[93]=1;}
if(u>=480&&u<480&&b[94]==0){cout<<"突破合体初期4星,寿元提升至1080年。"<<endl;qw=1080;b[94]=1;}
if(u>=490&&u<490&&b[95]==0){cout<<"突破合体初期5星,寿元提升至1090年。"<<endl;qw=1090;b[95]=1;}
if(u>=500&&u<500&&b[96]==0){cout<<"突破合体中期1星,寿元提升至1100年。"<<endl;qw=1100;b[96]=1;}
if(u>=510&&u<510&&b[97]==0){cout<<"突破合体中期2星,寿元提升至1110年。"<<endl;qw=1110;b[97]=1;}
if(u>=520&&u<520&&b[98]==0){cout<<"突破合体中期3星,寿元提升至1120年。"<<endl;qw=1120;b[98]=1;}
if(u>=530&&u<530&&b[99]==0){cout<<"突破合体中期4星,寿元提升至1130年。"<<endl;qw=1130;b[99]=1;}
if(u>=540&&u<540&&b[100]==0){cout<<"突破合体中期5星,寿元提升至1140年。"<<endl;qw=1140;b[100]=1;}
if(u>=550&&u<550&&b[101]==0){cout<<"突破合体高期1星,寿元提升至1150年。"<<endl;qw=1150;b[101]=1;}
if(u>=560&&u<560&&b[102]==0){cout<<"突破合体高期2星,寿元提升至1160年。"<<endl;qw=1160;b[102]=1;}
if(u>=570&&u<570&&b[103]==0){cout<<"突破合体高期3星,寿元提升至1170年。"<<endl;qw=1170;b[103]=1;}
if(u>=580&&u<580&&b[104]==0){cout<<"突破合体高期4星,寿元提升至1180年。"<<endl;qw=1180;b[104]=1;}
if(u>=590&&u<590&&b[105]==0){cout<<"突破合体高期5星,寿元提升至1190年。"<<endl;qw=1190;b[105]=1;}
if(u>=600&&u<999&&b[106]==0){cout<<"进入准备渡劫期,寿元提升至1200年。"<<endl;qw=1200;b[106]=1;}
cout<<endl;
Sleep(ui);
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
cout<<"寿元终。"<<endl;Sleep(1000);
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
int mn=0;
if(ui==100&&u<=999){
system("cls");
cout<<"你一直看过来,一定很累吧?悄悄告诉你,颜值=12,智力=12,钱数=6时可以触发时间大道!"<<endl;
Sleep(300);
}
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
cout<<"开始度劫!!!"<<endl;
Sleep(300);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"金元神劫落下"<<endl;
if(s==1){
cout<<"你抗过了!"<<endl;a=a-1;
Sleep(600);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
cout<<"木元神劫落下"<<endl;
if(d==1){
cout<<"你抗过了!"<<endl;a=a-1;
Sleep(600);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
cout<<"水元神劫落下"<<endl;
if(f==1){cout<<"你抗过了!"<<endl;a=a-1;
Sleep(600);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
cout<<"火元神劫落下"<<endl;
if(g==1){cout<<"你抗过了!"<<endl;a=a-1;
Sleep(600);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"土元神劫落下"<<endl;
if(h==1){cout<<"你抗过了!"<<endl;a=a-1;
Sleep(600);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
cout<<"本源元神劫落下"<<endl;
if(a>=1){
cout<<"你抗过了!"<<endl;
}else{mn=1;}
}else{mn=1;}
}else{mn=1;}
}else{mn=1;}
}
else{mn=1;}
}else{mn=1;}
if(mn==1){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);cout<<"你没抗过,被劈死了!";}
if(mn==0&&u>=550){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
cout<<"你度劫成功,飞升为仙。你作为“人”的一生结束了!"<<endl;}
else{if(mn==0){SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
cout<<"但是你修为不够,无法飞升,被神用雷劫劈死了!";}}
int ad;
cout<<"结束请输入ok(小写),管理员测试请输入密码。"<<endl;
string sf;
cin>>sf;
if(sf=="ok"){cout<<"圆满结束!";}
else if(sf=="tanyu"){ad=1;}
else{
cout<<"密码错误,请重新输入!"<<endl;
for(;;){
string qwe;
cout<<"结束请输入ok(小写),管理员测试请输入密码。"<<endl;
cin>>qwe;
if(qwe=="ok"){cout<<"圆满结束!";break;}
if(qwe=="tanyu"){ad=1;break;}
else {cout<<"密码错误,请重新输入!"<<endl;}
}
}
if(ad==1){
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
for(int i=1;i<=15;i++){w[i]=0;}
int j=50;
cout<<"开启修神之路,神寿提升至10千年."<<endl;
int ss=5;
for(int i=1;i<=j;i++){
int kk;
kk=rand()%25+1;
if(kk==1){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==2){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==3){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==4){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==5){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==6){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==7){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==8){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==9){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==10){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==11){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==12){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==13){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==14){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==15){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==16){cout<<"第"<<i<<"千年:"<<"闭关苦修中……"<<endl;ss=ss+1;}
if(kk==17){cout<<"第"<<i<<"千年:"<<"你与人强行双修,修为上涨X."<<endl;ss=ss+2;}
if(kk==18){cout<<"第"<<i<<"千年:"<<"你与人强行双修,修为上涨X."<<endl;ss=ss+2;}
if(kk==19){cout<<"第"<<i<<"千年:"<<"你与人强行双修,修为上涨X."<<endl;ss=ss+2;}
if(kk==20){cout<<"第"<<i<<"千年:"<<"苦修顿悟修为增长。"<<endl;ss=ss+2;}
if(kk==21){cout<<"第"<<i<<"千年:"<<"苦修顿悟修为增长。"<<endl;ss=ss+2;}
if(kk==22){cout<<"第"<<i<<"千年:"<<"苦修顿悟修为增长。"<<endl;ss=ss+2;}
if(kk==23){cout<<"第"<<i<<"千年:"<<"苦修顿悟修为增长。"<<endl;ss=ss+2;}
if(kk==24){cout<<"第"<<i<<"千年:"<<"苦修顿悟修为增长。"<<endl;ss=ss+2;}
if(kk==25){cout<<"第"<<i<<"千年:"<<"听神讲课,顿悟修为增长。"<<endl;ss=ss+5;}
if(w[1]==0&&ss==10||ss>10&&ss<15&&w[1]==0){cout<<"你达到散仙上期,神寿提升到15千年。"<<endl;j=15;w[1]=1;}
if(w[2]==0&&ss==15||ss>15&&ss<20&&w[2]==0){cout<<"你达到散仙中期,神寿提升到20千年。"<<endl;j=20;w[2]=1;}
if(w[3]==0&&ss==20||ss>20&&ss<25&&w[3]==0){cout<<"你达到散仙下期,神寿提升到25千年。"<<endl;j=25;w[3]=1;}
if(w[4]==0&&ss==25||ss>25&&ss<30&&w[4]==0){cout<<"你达到地仙上期,神寿提升到30千年。"<<endl;j=30;w[4]=1;}
if(w[5]==0&&ss==30||ss>30&&ss<35&&w[5]==0){cout<<"你达到地仙中期,神寿提升到35千年。"<<endl;j=35;w[5]=1;}
if(w[6]==0&&ss==35||ss>35&&ss<40&&w[6]==0){cout<<"你达到地仙下期,神寿提升到40千年。"<<endl;j=40;w[6]=1;}
if(w[7]==0&&ss==40||ss>40&&ss<45&&w[7]==0){cout<<"你达到仙人上期,神寿提升到45千年。"<<endl;j=45;w[7]=1;}
if(w[8]==0&&ss==45||ss>45&&ss<50&&w[8]==0){cout<<"你达到仙人中期,神寿提升到50千年。"<<endl;j=50;w[8]=1;}
if(w[9]==0&&ss==50||ss>50&&ss<55&&w[9]==0){cout<<"你达到仙人下期,神寿提升到55千年。"<<endl;j=55;w[9]=1;}
if(w[10]==0&&ss==65||ss>55&&ss<60&&w[10]==0){cout<<"你达到上仙上期,神寿提升到60千年。"<<endl;j=60;w[10]=1;}
if(w[11]==0&&ss==60||ss>60&&ss<70&&w[11]==0){cout<<"你达到上仙中期,神寿提升到65千年。"<<endl;j=65;w[11]=1;}
if(w[12]==0&&ss==70||ss>70&&ss<80&&w[12]==0){cout<<"你达到上仙下期,神寿提升到70千年。"<<endl;j=70;w[12]=1;}
if(w[13]==0&&ss==80||ss>80&&ss<90&&w[13]==0){cout<<"你达到金仙上期,神寿提升到75千年。"<<endl;j=75;w[13]=1;}
if(w[14]==0&&ss==90||ss>90&&ss<100&&w[14]==0){cout<<"你达到金仙中期,神寿提升到80千年。"<<endl;j=80;w[14]=1;}
if(w[15]==0&&ss==100||ss>100&&ss<110&&w[15]==0){cout<<"你达到金仙下期,神寿提升到85千年。"<<endl;j=85;w[15]=1;}
cout<<endl;
Sleep(io);
}
cout<<"寿元终!";
}}
else if(q==0){
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"已退出游戏!"<<endl;
}
return 0;
}
6.精灵宝可梦
#include<iostream>
#include<windows.h>
#include<ctime>
enum Type {normal,fire,grass,water};//定义招式与pokemon属性
struct Atk{//招式结构体
char name[20];//招式名
int damage;//伤害
Type type;//属性
int speed;//招式速度
int pp; //招式技能点数量
};
Atk def{"def",0,normal,10,3};//防御
struct pokemon{//pokemon结构体
char name[30];//名
int hp;//初始血量
int speed;//pokemon本身速度
Type type;//属性
Atk atk1;//招式1到4
Atk atk2;
Atk atk3;
Atk atk4;
int def;//防御点数
};
void initial();
int choose(int);
int AIchoose(int);
int p_choose(int,pokemon);
int AI_choose(int,pokemon);
void duel(pokemon p_pokemon,pokemon AI_pokemmon);
double damage_coeff(Type type1,Type type2);
int main(){
using namespace std;
int cont=1;//设定循环游戏的flag
while(cont==1){
system("cls");//新游戏开始时清屏
//初始化各个招式与pokemon
Atk watergun{"水枪",40,water,2,2};//水枪
Atk quickattack{"电光石火",40,normal,5,3};//电光石火
Atk scratch{"抓",40,normal,2,8};//抓
Atk bubblebeam{"泡沫光线",65,water,1,1};//泡沫光线
Atk razorleaf{"飞叶快刀",55,grass,3,1};//飞叶快刀
Atk vinewhip{"藤鞭",35,grass,4,2};//藤鞭
Atk tackle{"撞击",35,normal,2,10};//撞击
Atk ember{"火苗",40,fire,2,1};//火苗
Atk firespin{"火焰旋涡",35,fire,4,2};//火焰旋涡
pokemon bulbasaur{"妙蛙种子",200,3,grass,tackle,quickattack,vinewhip,razorleaf,3};//妙蛙种子
pokemon charmander{"小火龙",200,2,fire,scratch,quickattack,ember,firespin,3};//小火龙
pokemon squirtle{"杰尼龟",200,1,water,tackle,quickattack,watergun,bubblebeam,3};//杰尼龟
initial();
pokemon p_pokemon;
pokemon AI_pokemon;
int Num1,Num2;
Num1=choose(Num1);
Num2=AIchoose(Num2);
//确定双方选择的pokemon
switch(Num1){
case 1:
p_pokemon=bulbasaur;
break;
case 2:
p_pokemon=charmander;
break;
case 3:
p_pokemon=squirtle;
break;
}
switch(Num2){
case 0:
AI_pokemon=bulbasaur;
break;
case 1:
AI_pokemon=charmander;
break;
case 2:
AI_pokemon=squirtle;
break;
}
system("cls");
Sleep(500);
cout <<"你选择了 "<<p_pokemon.name<<" 你的对手选择了 "<<AI_pokemon.name<<endl;
duel(p_pokemon,AI_pokemon);
cout <<"如果您想玩另一轮,请输入数字1,或输入其他数字退出:"<<endl;
cin >>cont;
}
cin.get();
return 0;
}
void initial(){//初始化界面
using namespace std;
cout <<"欢迎来到口袋妖怪决斗!"<<endl;
cout <<"你的口袋妖怪有3次机会防守。一旦你决定防御,本回合你将不会受到伤害。"<<endl;
cout <<"但是,这个回合你也不能攻击。"<<endl;
cout <<"现在通过输入数字选择您的口袋妖怪:";
cout <<"1.妙蛙种子 2.小火龙 3.杰尼龟";
}
int choose(int Num){//玩家选择pokemon,利用递归让玩家正确输入
using namespace std;
cin >>Num;
if(Num!=1&&Num!=2&&Num!=3){
cout <<"您选择了错误的号码,请再次选择:";
Num=choose(Num);
}
return Num;
}
int AIchoose(int Num){//电脑选择pokemon,利用随机数让电脑随机选择
using namespace std;
srand((unsigned)time(NULL));
Num = rand() % 3;
return Num;
}
int p_choose(int pchoose,pokemon p_pokemon){//玩家选择招式,利用递归让玩家正确输入
using namespace std;
cin >>pchoose;
//判断玩家所选的招式PP是否足够
if(pchoose==1&&p_pokemon.atk1.pp<=0){
cout <<"你没有足够的pp"<<endl;
pchoose=p_choose(pchoose,p_pokemon);
}
if(pchoose==2&&p_pokemon.atk2.pp<=0){
cout <<"你没有足够的pp"<<endl;
pchoose=p_choose(pchoose,p_pokemon);
}
if(pchoose==3&&p_pokemon.atk3.pp<=0){
cout <<"你没有足够的pp"<<endl;
pchoose=p_choose(pchoose,p_pokemon);
}
if(pchoose==4&&p_pokemon.atk4.pp<=0){
cout <<"你没有足够的pp"<<endl;
pchoose=p_choose(pchoose,p_pokemon);
}
if(pchoose==5&&p_pokemon.def<=0){
cout <<"你没有足够的pp"<<endl;
pchoose=p_choose(pchoose,p_pokemon);
}
if(pchoose>5||pchoose<=0){
cout <<"您选择了错误的号码,请再次选择:";
pchoose=p_choose(pchoose,p_pokemon);
}
return pchoose;
}
int AI_choose(int AIchoose,pokemon AI_pokemon){//利用随机数让电脑随机选择
using namespace std;
srand((unsigned)time(NULL));
AIchoose = rand() % 5;
//判断电脑选择招式的PP是否足够
if(AIchoose==0&&AI_pokemon.atk1.pp<=0){
Sleep(1000);
AIchoose=AI_choose(AIchoose,AI_pokemon);
}
if(AIchoose==1&&AI_pokemon.atk2.pp<=0){
Sleep(1000);
AIchoose=AI_choose(AIchoose,AI_pokemon);
}
if(AIchoose==2&&AI_pokemon.atk3.pp<=0){
Sleep(1000);
AIchoose=AI_choose(AIchoose,AI_pokemon);
}
if(AIchoose==3&&AI_pokemon.atk4.pp<=0){
Sleep(1000);
AIchoose=AI_choose(AIchoose,AI_pokemon);
}
if(AIchoose==4&&AI_pokemon.def<=0){
Sleep(1000);
AIchoose=AI_choose(AIchoose,AI_pokemon);
}
return AIchoose;
}
double damage_coeff(Type type1,Type type2){//计算攻击时伤害加成系数,type1为招式属性,type2为pokemon属性
if(type1==normal){
return 1;
}
if(type1==grass){
switch(type2){
case grass:
return 0.5;
break;
case fire:
return 0.5;
break;
case water:
return 2;
break;
}
}
if(type1==fire){
switch(type2){
case grass:
return 2;
break;
case fire:
return 0.5;
break;
case water:
return 0.5;
break;
}
}
if(type1==water){
switch(type2){
case grass:
return 0.5;
break;
case fire:
return 2;
break;
case water:
return 0.5;
break;
}
}
}
void duel(pokemon p_pokemon,pokemon AI_pokemmon){//战斗流程函数
using namespace std;
while(p_pokemon.hp>0&&AI_pokemmon.hp>0){//双方HP均大于0时继续战斗
//显示双方相关信息
cout <<"您的HP:"<<p_pokemon.hp<<"你对手的生命值:"<<AI_pokemmon.hp<<endl<<endl;
cout <<"通过输入数字来选择本回合的行动:"<<endl;
cout <<"1."<<p_pokemon.atk1.name<<" PP:"<<p_pokemon.atk1.pp<<endl;
cout <<"2."<<p_pokemon.atk2.name<<" PP:"<<p_pokemon.atk2.pp<<endl;
cout <<"3."<<p_pokemon.atk3.name<<" PP:"<<p_pokemon.atk3.pp<<endl;
cout <<"4."<<p_pokemon.atk4.name<<" PP:"<<p_pokemon.atk4.pp<<endl;
cout <<"5.防御PP:"<<p_pokemon.def;
Atk this_turn_p_atk;//定义玩家本轮所选招式
Atk this_turn_AI_atk;//定义电脑本轮所选招式
int pchoose;
pchoose=p_choose(pchoose,p_pokemon);
int AIchoose;
AIchoose=AI_choose(AIchoose,AI_pokemmon);
switch(pchoose){
case 1:
p_pokemon.atk1.pp=p_pokemon.atk1.pp-1;
this_turn_p_atk=p_pokemon.atk1;
break;
case 2:
p_pokemon.atk2.pp=p_pokemon.atk2.pp-1;
this_turn_p_atk=p_pokemon.atk2;
break;
case 3:
p_pokemon.atk3.pp=p_pokemon.atk3.pp-1;
this_turn_p_atk=p_pokemon.atk3;
break;
case 4:
p_pokemon.atk4.pp=p_pokemon.atk4.pp-1;
this_turn_p_atk=p_pokemon.atk4;
break;
case 5:
p_pokemon.def=p_pokemon.def-1;
this_turn_p_atk=def;
break;
}
switch(AIchoose){
case 0:
AI_pokemmon.atk1.pp=AI_pokemmon.atk1.pp-1;
this_turn_AI_atk=AI_pokemmon.atk1;
break;
case 1:
AI_pokemmon.atk2.pp=AI_pokemmon.atk2.pp-1;
this_turn_AI_atk=AI_pokemmon.atk2;
break;
case 2:
AI_pokemmon.atk3.pp=AI_pokemmon.atk3.pp-1;
this_turn_AI_atk=AI_pokemmon.atk3;
break;
case 3:
AI_pokemmon.atk4.pp=AI_pokemmon.atk4.pp-1;
this_turn_AI_atk=AI_pokemmon.atk4;
break;
case 4:
AI_pokemmon.def=AI_pokemmon.def-1;
this_turn_AI_atk=def;
break;
}
system("cls");
//判断是否有玩家本轮采取防御
if(AIchoose==4&&pchoose!=5){
cout <<"你用 "<<this_turn_p_atk.name<<".";
Sleep(500);
cout <<"但你的攻击被防守了!"<<endl;
}
else if(pchoose==5&&AIchoose!=4){
cout <<"你的对手使用"<<this_turn_AI_atk.name<<".";
Sleep(500);
cout <<"但你要防守对手的攻击!"<<endl;
}
else if(pchoose==5&&AIchoose==4){
cout <<"你们两个这个回合都防守。"<<endl;
Sleep(250);
}
else{//双方都没有防御的情况
int p_speed,AI_speed;
double p_coeff,AI_coeff;
//真正的速度为pokemon本身速度加招式速度
p_speed=p_pokemon.speed+this_turn_p_atk.speed;//本轮玩家真正的速度
AI_speed=AI_pokemmon.speed+this_turn_AI_atk.speed;//本轮电脑真正的速度
//计算伤害系数
p_coeff=damage_coeff(this_turn_p_atk.type,AI_pokemmon.type);
AI_coeff=damage_coeff(this_turn_AI_atk.type,p_pokemon.type);
//比较双方谁本轮速度快,判断先手
if(AI_speed>p_speed){
cout <<"你的对手使用"<<this_turn_AI_atk.name<<" !"<<endl;
Sleep(500);
p_pokemon.hp=p_pokemon.hp-this_turn_AI_atk.damage*AI_coeff;//计算收到的伤害,伤害为招式伤害乘以伤害系数
if(p_pokemon.hp<=0){
cout <<"你被打败了!"<<endl;
}
else if(p_pokemon.hp>0){
cout <<"你用"<<this_turn_p_atk.name<<" !"<<endl;
Sleep(500);
AI_pokemmon.hp=AI_pokemmon.hp-this_turn_p_atk.damage*p_coeff;
if(AI_pokemmon.hp<=0){
cout <<"你赢了!"<<endl;
}
}
}
else if(AI_speed<p_speed){
cout <<"你赢了!"<<this_turn_p_atk.name<<" !"<<endl;
Sleep(500);
AI_pokemmon.hp=AI_pokemmon.hp-this_turn_p_atk.damage*p_coeff;
if(AI_pokemmon.hp<=0){
cout <<"你赢了!"<<endl;
}
else{
cout <<"你赢了!"<<this_turn_AI_atk.name<<" !"<<endl;
Sleep(500);
p_pokemon.hp=p_pokemon.hp-this_turn_AI_atk.damage*AI_coeff;
if(p_pokemon.hp<=0){
cout <<"你被打败了!"<<endl;
}
}
}
else if(AI_speed==p_speed){
cout <<"你们两个同时攻击!"<<endl;
Sleep(500);
cout <<"你用"<<this_turn_p_atk.name<<" !"<<endl;
Sleep(500);
cout <<"你的对手使用"<<this_turn_AI_atk.name<<" !"<<endl;
Sleep(500);
p_pokemon.hp=p_pokemon.hp-this_turn_AI_atk.damage*AI_coeff;
AI_pokemmon.hp=AI_pokemmon.hp-this_turn_p_atk.damage*p_coeff;
if(AI_pokemmon.hp<=0&&p_pokemon.hp>0){
cout <<"你赢了!!"<<endl;
}
else if(AI_pokemmon.hp>0&&p_pokemon.hp<=0){
cout <<"你被打败了!"<<endl;
}
else if(AI_pokemmon.hp<=0&&p_pokemon.hp<=0){
cout <<"平局!";
}
}
}
}
}
7.无限跑酷(超级推荐)
#include<bits/stdc++.h>
#include<windows.h>
#include<stdio.h>
#include<conio.h>
#include<time.h>
#define Nor if(B[b].x<5) B[b].x=5;
#define Out1 Bx1-Bvx1<=6||Bx1-Bvx1>=28||By1-Bvy1<=7||By1-Bvy1>=27
#define Out2 Bx2-Bvx2<=6||Bx2-Bvx2>=28||By2-Bvy2<=7||By2-Bvy2>=27
#define Chang1 {Bwhat1=0;Bvx1=Bvy1=0;memset(Bgo1,0,sizeof(Bgo1));}
#define Chang2 {Bwhat2=0;Bvx2=Bvy2=0;memset(Bgo2,0,sizeof(Bgo2));}
#define Chang3 {Bwhat3=0;Bvx3=Bvy3=0;memset(Bgo3,0,sizeof(Bgo3));}
using namespace std;
int ti(float a) {
return ((int)(a*10+5))/10;
}
void Setpos(float x,float y){
COORD pos;
pos.X=ti(y*4)/2;
pos.Y=ti(x);
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
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);
}
int Blomax,Ren,Exp,Expmax,Lv,Lvl,Ice,Drug,ar1,ar2,Tar1,Tar2,bl,br,Win,T,Tb,Sy,Up,Upt,Down,u1,u2,Kill,Killb,L,Ll[4],Li,D,Gd[10],Biao,Fire,Fir,Water,Thun,Wind,Magne,I[20][2],ib,Dis,Disb,Dis1,Disb1,Boss,Bblo,Bblomax,Bwhat1,Bwhat2,Bwhat3,Bgo1[10],Bgo2[10],Bgo3[10],Bbr,Bbl,Bl[4];
float X,Y,Vx,Vy,Ding,Blo,Hui,Bx1,By1,Bx2,By2,Bx3,By3,Bvx1,Bvy1,Bvx2,Bvy2,Bvx3,Bvy3,Bway[1001][2];
struct bullet{
float x,y,vx,vy;
int what;
int a,t,How;
int life;
bool kill;
}B[100001];
void Map(int a,int b);
void Pan(int a,float x,float y,int b){
float Nox[4],Noy[4];Nox[0]=X,Noy[0]=Y;
if(Down==1&&X==22) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;else if(Down==2) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;else if(Down==1||X<18) Nox[1]=X-1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;else Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
for(int i=0;i<3;i++){
if(a==-1){if(abs(x-Nox[i])+abs(y-Noy[i])<1.5) {if(B[b].what==-10)Exp+=2;if(B[b].what==-11)Exp+=1;B[b].life=0;if(B[b].life==0&&b==bl) bl++;Map(3,b);break;}}
if(a==-2){if(abs(x-Nox[i])+abs(y-Noy[i])<2.5) {if(B[b].what==-2)Exp+=5,Biao+=5;if(B[b].what==-3)Fire=300,Ice=0,Fir=3;if(B[b].what==-4)Water=200;if(B[b].what==-5){Wind=70;Ding=28.25;Ice=0;if(Y<Ding-1)Vy=5;else Vy=0;if(Up>=1) Vx=-5;if(Down==2) Vx=5;}if(B[b].what==-6){Thun=200;system("color 1F");Sleep(20);system("color 6F");Sleep(10);system("color 0F");}if(B[b].what==-7)Magne=300;if(B[b].what==-8)Ice=0,Drug=0,Blo=fmin((float)Blomax,Blo+20);if(B[b].what==-9)Exp=fmin((float)Expmax,Exp+20);B[b].life=0;if(B[b].life==0&&b==bl) bl++;Map(3,b);break;}}
}if(Wind==0&&Thun==0&&(B[b].kill!=0||Killb>=15||Ren==1&&Killb>0)) return;
for(int i=0;i<3;i++){
if((Wind>=1||Thun>=1)&&abs(x-Nox[i])+abs(y-Noy[i])<2.5) {
if(B[b].what<98)Exp+=2;B[b].life=0;Map(3,b);break;
}
if(a==1) {if(abs(x-Nox[i])<0.5&&abs(y-Noy[i])<1) {
if(B[b].what>=99)Blo-=10;if(B[b].what==14)Blo-=15,Ice=100,B[b].life=0;else if(B[b].what==15)Blo-=20,Ice=0,B[b].life=0;else if(B[b].what==17)Blo-=5,Drug=100,B[b].life=0;else if(B[b].what>=13&&B[b].what<=17)Blo-=10,B[b].life=0;else Blo-=15;B[b].kill=1,Killb=20;Kill=1;Map(3,b);break;}}
if (a==2||a==6||a==8||a==9||a==10||a==11||a==12) {
if(abs(x-Nox[i])+abs(y-Noy[i])<1.5) {
if(a==2)Blo-=20;
else if(a==8)Blo-=10;
else Blo-=15;B[b].kill=1,Killb=20;Kill=1;if(a!=2){B[b].life=0;if(B[b].life==0&&b==bl) bl++;Map(3,b);break;}}}
if(a==4) {if((Wind>=1||Thun>=1)&&abs(x-Nox[i])<1.5&&Noy[i]-y<=0&&Noy[i]-y>=-8) {if(B[b].what<98)Exp+=2;B[b].life=0;Map(3,b);break;}if(abs(x-Nox[i])<1&&Noy[i]-y<=0&&Noy[i]-y>=-8) {Blo-=25,B[b].kill=1,Killb=20;Kill=1;Vy=-1;Y-=0.5;break;}}
}
}
void Map(int a,int b){
Color(0);
if(a==-1){
if(Boss==1||Boss==6){if(Bwhat1==5){if(ti(Bx1)==20)Setpos(Bx1,By1),cout<<"==";else Setpos(Bx1,By1),cout<<" ";}else{Setpos(Bx1-1,By1-0.5),cout<<" ";Setpos(Bx1,By1-1),cout<<" ";Setpos(Bx1+1,By1-0.5),cout<<" ";if(abs(ti(Bx1)-20)<=1)Setpos(20,By1-1),cout<<"======";}}
if(Boss==2||Boss==6){Setpos(Bx2-1,By2-1);cout<<" ";Setpos(Bx2,By2-1);cout<<" ";Setpos(Bx2+1,By2-1),cout<<" ";Color(0);if(abs(ti(Bx2)-20)<=1)Setpos(20,By2-1),cout<<"======";}
if(Boss==3||Boss==6){Setpos(Bx3-1,By3-0.5);cout<<" ";Setpos(Bx3,By3);cout<<" ";Setpos(Bx3+1,By3-1),cout<<" ";Color(0);if(abs(ti(Bx3)-20)<=1)Setpos(20,By3-1),cout<<"=======";}
if(X<0)return;if(X>=17&&X<=19){Setpos(X-1,Y);cout<<" ";Setpos(X,Y-1);cout<<" ";Setpos(X+1,Y-1),cout<<" ";}else if(X<=23&&X>=21){Setpos(X+1,Y);cout<<" ";Setpos(X,Y-1);cout<<" ";Setpos(X-1,Y-1),cout<<" ";}else if(X>23){Setpos(X,Y-1);cout<<" ";Setpos(X-1,Y-0.5),cout<<" ";}else if(X<17&&Upt!=0){Setpos(X,Y-1);cout<<" ";Setpos(X+1,Y-1.5),cout<<" ";}else if(X<17){Setpos(X,Y-1);cout<<" ";Setpos(X+1,Y-0.5),cout<<" ";}if(Thun>0){Setpos(X-2,Y-1),cout<<" ";Setpos(X+2,Y-1),cout<<" ";Setpos(X,Y+2),cout<<" ";Setpos(X,Y-2.5),cout<<" ";Setpos(X-1,Y+1),cout<<" ";Setpos(X+1,Y+1),cout<<" ";Setpos(X-1,Y-2),cout<<" ";Setpos(X+1,Y-2),cout<<" ";Setpos(20,Y-2.5),cout<<"============";}if(Wind!=0){Setpos(X+1,Y-5);cout<<" ";Setpos(X,Y-5);cout<<" ";Setpos(X-1,Y-5);cout<<" ";Setpos(20,Y-5),cout<<"========";}if(Water!=0){Setpos(X,Y-4);cout<<" ";Setpos(X+2,Y-3.5);cout<<" ";Setpos(X-2,Y-3.5);cout<<" ";Setpos(X+1,Y-3.5);cout<<" ";Setpos(X-1,Y-3.5);cout<<" ";Setpos(20,Y-5),cout<<"========";}if(Fire!=0){Setpos(X,Y+1),cout<<" ";Setpos(X+1,Y),cout<<" ";Setpos(X-1,Y-1),cout<<" ";Setpos(20,Y-1);cout<<"======";}
}
if(a==0){
if(Boss==1||Boss==6){if(Bwhat1==5)Color(5),Setpos(Bx1,By1),cout<<"█",Color(0);else if(Bwhat1==4&&Bgo1[1]>6&&Bgo1[1]<11)Color(4),Setpos(Bgo1[5]-1,Bgo1[6]),cout<<"︻",Setpos(Bgo1[5],Bgo1[6]-1),cout<<"【",Setpos(Bgo1[5],Bgo1[6]+1),cout<<"】",Setpos(Bgo1[5]+1,Bgo1[6]),cout<<"︼",Color(0);else{Setpos(Bx1-1,By1-0.5),Color(0),cout<<"●●";Setpos(Bx1,By1-1);if(Bwhat1==2&&Bgo1[1]<=5)Color(1);else if(Bwhat1==3&&Bgo1[1]<=5)Color(5);else if(Bwhat1==6&&Bgo1[1]<=5)Color(8); else Color(4);if(Bwhat1==4) Setpos(Bx1,By1-0.5),cout<<"██(";else cout<<")██(";Setpos(Bx1+1,By1-0.5),cout<<"……";Color(0);}}
if(Boss==2||Boss==6){Setpos(Bx2-1,By2-1);Color(0),cout<<"\\ ";Color(0);cout<<"●";Setpos(Bx2,By2-1);Color(3);cout<<"◥";Color(5),cout<<"JJJ";Color(0),cout<<">";Color(3);Setpos(Bx2+1,By2-1),cout<<"◢█◣";Color(0);}
if(Boss==3||Boss==6){Setpos(Bx3-1,By3-0.5);if(Bwhat3==3||Bwhat3==9) Color(1);else if(Bwhat3==4||Bwhat3==10) Color(4);else if(Bwhat3==5||Bwhat3==11) Color(5);if(Bwhat3==11)cout<<' ';else if(Bwhat3==6) Color(3);else Color(2);cout<<"●-";Setpos(Bx3,By3);if(Bwhat3==11)cout<<"/";else cout<<"┃";Color(0);Setpos(Bx3+1,By3-1),cout<<"●●●";}
if(X<0)return;if(Ren==2) Color(12);if(Ren==3) Color(1);if(Ren==4) Color(3);if(Ren==5) Color(4);if(Ren==6) Color(2);if(Drug!=0&&T%5!=0) Color(11);if(Drug!=0&&T%5==0) Color(11);if(Ice!=0) Color(6);if(b==1) Color(8);if(Li!=0) Color(5);if(Ren==1&&Killb>0&&T%4<2) Color(13);if(Wind>0&&T%4<=1) Color(1);if(Wind>0&&T%4>=2) Color(0);if(Thun>0&&T%4<=1) Color(1);if(Thun>0&&T%4>=2) Color(6);
if(X>=17&&X<=19){Setpos(X-1,Y);cout<<"●";Setpos(X,Y-1);cout<<"━/";if(T%10<3) Setpos(X+1,Y-1),cout<<"┛╲";else if(T%10<6) Setpos(X+1,Y-1),cout<<"┦ ";else Setpos(X+1,Y-1),cout<<"╯>";if(Wind>0&&T%3==0) Setpos(X+1,Y-1),cout<<"┛╲";else if(Wind>0&&T%3==1) Setpos(X+1,Y-1),cout<<"┦ ";else if(Wind>0&&T%3==2)Setpos(X+1,Y-1),cout<<"╯>";}else if(X<=23&&X>=21){Setpos(X+1,Y);cout<<"●";Setpos(X,Y-1);cout<<"━\\";if(T%10<3) Setpos(X-1,Y-1),cout<<"┓╱";else if(T%10<6) Setpos(X-1,Y-1),cout<<"┪ ";else Setpos(X-1,Y-1),cout<<"╮>";if(Wind>0&&T%3==0) Setpos(X-1,Y-1),cout<<"┓╱";else if(Wind>0&&T%3==1) Setpos(X-1,Y-1),cout<<"┪ ";else if(Wind>0&&T%3==2)Setpos(X-1,Y-1),cout<<"╮>";}else if(X>23){Setpos(X,Y-1);cout<<"━ ●";Setpos(X-1,Y-0.5),cout<<"│>";}else if(X<17&&Upt!=0){Setpos(X,Y-1);cout<<"━ ●";Setpos(X+1,Y-1.5),cout<<"╱ >";}else if(X<17){Setpos(X,Y-1);cout<<"━ ●";Setpos(X+1,Y-0.5),cout<<"│>";}if(Thun>0){Setpos(X-2,Y-1),cout<<"▄▄";Setpos(X+2,Y-1),cout<<"▄▄";Setpos(X,Y+2),cout<<"▌";Setpos(X,Y-2.5),cout<<"▌";Setpos(X-1,Y+1),cout<<"█";Setpos(X+1,Y+1),cout<<"█";Setpos(X-1,Y-2),cout<<"█";Setpos(X+1,Y-2),cout<<"█";}if(Magne>0&&T%7<2)Setpos(X,Y),Color(5),cout<<"★";if(Wind>1){if(T%6<2)Color(1);else Color(0);if(T%8<=1){Setpos(X+1,Y-5);cout<<"---- --";Setpos(X,Y-5);cout<<"- --- -";Setpos(X-1,Y-5);cout<<"--- - --";}else if(T%8<=3){Setpos(X+1,Y-5);cout<<"------ ";Setpos(X,Y-5);cout<<" -- ---";Setpos(X-1,Y-5);cout<<"----- - ";}else if(T%8<=5){Setpos(X+1,Y-5);cout<<" ------";Setpos(X,Y-5);cout<<"-- -- -";Setpos(X-1,Y-5);cout<<"- ----- ";}else if(T%8<=7){Setpos(X+1,Y-5);cout<<"-- ----";Setpos(X,Y-5);cout<<" --- -- ";Setpos(X-1,Y-5);cout<<"- - ----";}}if(Water!=0){Color(1);if(T%20<5){Setpos(X+2,Y-3);cout<<"■";Setpos(X+1,Y-3.5);cout<<"■";Setpos(X-1,Y-2.5);cout<<"■";Setpos(X-2,Y-3);cout<<"■";}else if(T%20<10||T%20>=15){Setpos(X+2,Y-3);cout<<"■";Setpos(X,Y-4);cout<<"■■";Setpos(X-2,Y-3); cout<<"■";}else if(T%20<15){Setpos(X+2,Y-3.5);cout<<"■";Setpos(X+1,Y-3);cout<<"■";Setpos(X-1,Y-3.5);cout<<"■";Setpos(X-2,Y-3);cout<<"■";}}if(Fire!=0){if(T%6<3)Color(4);else Color(5);if(Fir>=1)Setpos(X,Y+1),cout<<"●";if(Fir>=2)Setpos(X+1,Y),cout<<"●";if(Fir>=3)Setpos(X-1,Y-1),cout<<"●";}
}
if(a==1||a==3){
if(B[b].what==1){Nor;Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<" ";if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(B[b].How<=1) Color(13);else Color(4);cout<<"●";if(a==1) Pan(1,B[b].x,B[b].y,b);}}
if(B[b].what==2){Nor;Setpos(B[b].x-1,B[b].y-1);if(ti(B[b].x-1)==20)cout<<"======";else cout<<" ";Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<" ";Setpos(B[b].x+1,B[b].y-1);if(ti(B[b].x+1)==20)cout<<"======";else cout<<" ";if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);Color(5);if(B[b].How==0){Setpos(B[b].x-1,B[b].y),cout<<"↑";Setpos(B[b].x,B[b].y-1),cout<<"←┼ →";Setpos(B[b].x+1,B[b].y),cout<<"↓";}else if(B[b].How==1){Setpos(B[b].x-1,B[b].y-1),cout<<"↖ ↗";Setpos(B[b].x,B[b].y),cout<<"╳";Setpos(B[b].x+1,B[b].y-1),cout<<"↙ ↘";} if(a==1) Pan(2,B[b].x,B[b].y,b);}}
if(B[b].what==3||B[b].what==5){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<" ";if(B[b].life!=0){B[b].y-=B[b].vy;B[b].x-=B[b].vx;Setpos(B[b].x,B[b].y);if(B[b].How==1) Color(5);else Color(4);cout<<"◎";}}
if(B[b].what==4){Nor;Setpos(B[b].x,fmax((float)0,B[b].y-8));if(ti(B[b].x)==20){for(int i=max(0,(int)B[b].y-8);i<=B[b].y;i++)cout<<"==";}else {for(int i=max(0,(int)B[b].y-8);i<=B[b].y;i++)cout<<" ";}if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,fmax((float)0,B[b].y-8));Color(6); for(int i=max(0,(int)B[b].y-8);i<=B[b].y;i++)cout<<"═"; if(a==1) Pan(4,B[b].x,B[b].y,b);}}
if(B[b].what==6||B[b].what==8||B[b].what==9){Nor;Setpos(B[b].x-1,B[b].y);if(ti(B[b].x)-1==20)cout<<"==";else cout<<" ";Setpos(B[b].x+1,B[b].y);if(ti(B[b].x)+1==20)cout<<"==";else cout<<" ";Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<" ";if(B[b].life!=0){B[b].y-=B[b].vy;B[b].x-=B[b].vx;Setpos(B[b].x,B[b].y-1);if(B[b].what==6){if(B[b].How<=1) Color(1); else Color(6);}if(B[b].what==9){if(B[b].How<=1) Color(4); else Color(8);}if(B[b].what==8)Color(5);Setpos(B[b].x-1,B[b].y);cout<<"︹";Setpos(B[b].x+1,B[b].y);cout<<"︺";Setpos(B[b].x,B[b].y-1);if(B[b].How%2==1) cout<<"〔●〕"; else cout<<"﹝○﹞"; if(a==1) Pan(6,B[b].x,B[b].y,b);}}
if(B[b].what==7){Nor;Setpos(B[b].x,B[b].y);if(B[b].How<0) for(int i=19;i>=20+B[b].How;i--) {Setpos(i,B[b].y);cout<<" ";}if(B[b].How>0) for(int i=21;i<=20+B[b].How;i++) {Setpos(i,B[b].y);cout<<" ";}if(B[b].life!=0){B[b].y-=B[b].vy;if(B[b].How<0) for(int i=19;i>=20+B[b].How;i--) {Setpos(i,B[b].y);cout<<"║"; if(a==1) Pan(7,i,B[b].y,b);}if(B[b].How>0) for(int i=21;i<=20+B[b].How;i++) {Setpos(i,B[b].y);cout<<"║"; if(a==1) Pan(7,i,B[b].y,b);}}}
if(B[b].what==10||B[b].what==11||B[b].what==12){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<" ";if(B[b].life!=0){B[b].x-=B[b].vx;B[b].y-=B[b].vy;if(B[b].How==1){B[b].vy-=0.2;}else B[b].vx-=0.35;if(B[b].x>=25) B[b].x=25,B[b].vx*=-0.8;if(B[b].what==11&&B[b].y<=1) B[b].y=1,B[b].vy*=-1;if(B[b].what==12&&B[b].y<=1) B[b].y=1,B[b].vx=0,B[b].vy=-0.5,B[b].How=1;Setpos(B[b].x,B[b].y);if(B[b].what==11)Color(1);else if(B[b].what==12)Color(5);else Color(0);if(B[b].t%4<2)cout<<"▃";else cout<<"▍";if(a==1) Pan(B[b].what,B[b].x,B[b].y,b);}}
if(B[b].what>=13&&B[b].what<=17){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"====";else cout<<" ";if(B[b].life!=0){B[b].x-=B[b].vx;B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(B[b].what==14) Color(1);else if(B[b].what==15) Color(4);else if(B[b].what==16) Color(5);else if(B[b].what==17) Color(3);else Color(2);cout<<"●";if(B[b].what==14)cout<<"*";if(B[b].what==15)cout<<"";if(B[b].what==16)cout<<"<";if(B[b].what==17)cout<<"X";} if(a==1) Pan(1,B[b].x,B[b].y,b);}
if(B[b].what==98&&B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(ti(B[b].x==20))cout<<"==";else cout<<" ";if(B[b].y<=3)B[b].life=0;}
if(B[b].what>=99){if(B[b].y<=3)B[b].life=0;if(B[b].life!=0){B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);Color(5);if(B[b].what==99)cout<<"█";if(B[b].what>=100&&B[b].what<200){if(B[b].what%5==0)cout<<"我";if(B[b].what%5==1)cout<<"是";if(B[b].what%5==2)cout<<"最";if(B[b].what%5==3)cout<<"强";if(B[b].what%5==4)cout<<"的";}if(B[b].what>=200&&B[b].what<300){if(B[b].what%6==0)cout<<"神";if(B[b].what%6==1)cout<<"级";if(B[b].what%6==2)cout<<"怪";if(B[b].what%6==3)cout<<"物";if(B[b].what%6==4)cout<<"之";if(B[b].what%6==5)cout<<"光";}if(B[b].what>=300&&B[b].what<400){if(B[b].what%8==0)cout<<"颤";if(B[b].what%8==1)cout<<"抖";if(B[b].what%8==2)cout<<"吧";if(B[b].what%8==3)cout<<"无";if(B[b].what%8==4)cout<<"能";if(B[b].what%8==5)cout<<"的";if(B[b].what%8==6)cout<<"人";if(B[b].what%8==7)cout<<"类";}if(B[b].what>=400&&B[b].what<500){if(B[b].what%8==0)cout<<"还";if(B[b].what%8==1)cout<<"不";if(B[b].what%8==2)cout<<"快";if(B[b].what%8==3)cout<<"跪";if(B[b].what%8==4)cout<<"倒";if(B[b].what%8==5)cout<<"在";if(B[b].what%8==6)cout<<"朕";if(B[b].what%8==7)cout<<"前";}if(B[b].what>=500&&B[b].what<600){if(B[b].what%8==0)cout<<"看";if(B[b].what%8==1)cout<<"懂";if(B[b].what%8==2)cout<<"这";if(B[b].what%8==3)cout<<"句";if(B[b].what%8==4)cout<<"话";if(B[b].what%8==5)cout<<"的";if(B[b].what%8==6)cout<<"是";if(B[b].what%8==7)cout<<"猪";} if(a==1) Pan(1,B[b].x,B[b].y,b);}}
if(B[b].what==-1){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<" ";if(Boss==0) B[b].life=0;else if(((Boss==1&&abs(B[b].x-Bx1)+abs(B[b].y-By1)<1.5)||(Boss==2&&abs(B[b].x-Bx2)+abs(B[b].y-By2)<1.5)||(Boss==3&&abs(B[b].x-Bx3)+abs(B[b].y-By3)<1.5)||(B[b].t==10))&&B[b].life==1) Bblo-=8+Lv*2,B[b].life=0;if(B[b].life!=0){if(Boss==1)B[b].x=B[b].x+(Bx1-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By1-B[b].y)/(10-B[b].t)*1.0;if(Boss==2)B[b].x=B[b].x+(Bx2-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By2-B[b].y)/(10-B[b].t)*1.0;if(Boss==3)B[b].x=B[b].x+(Bx3-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By3-B[b].y)/(10-B[b].t)*1.0;Setpos(B[b].x,B[b].y);Color(7);if(B[b].t%2==0) cout<<"+";else cout<<"×";}}
if(B[b].what<=-2&&B[b].what>=-9){Nor;Setpos(B[b].x-1,B[b].y);if(ti(B[b].x)-1==20)cout<<"==";else cout<<" ";Setpos(B[b].x+1,B[b].y);if(ti(B[b].x)+1==20)cout<<"==";else cout<<" ";Setpos(B[b].x,B[b].y-1);if(ti(B[b].x)==20)cout<<"======";else cout<<" ";if(B[b].life!=0){B[b].y-=B[b].vy;B[b].x-=B[b].vx;if(B[b].what<=-3&&B[b].what>=-7){if(B[b].x<=7)B[b].x=7;if(B[b].x>=28)B[b].x=28;else if(B[b].x>=B[b].a+1&&B[b].How==1)B[b].How=0;else if(B[b].x<=B[b].a-1&&B[b].How==0)B[b].How=1;if(B[b].How==1&&B[b].vx>=-1)B[b].vx-=0.2;if(B[b].How==0&&B[b].vx<=1)B[b].vx+=0.2;}if(B[b].what==-2) Color(3);if(B[b].what==-3) Color(4);if(B[b].what==-4) Color(1);if(B[b].what==-5) Color(0);if(B[b].what==-6) Color(6);if(B[b].what==-7) Color(5);if(B[b].what==-8) Color(2);if(B[b].what==-9) Color(14);if(T%7<=1&&B[b].what==-5)Color(1);else if(T%7<=1)Color(0);Setpos(B[b].x-1,B[b].y);cout<<"︹";Setpos(B[b].x+1,B[b].y);cout<<"︺";Setpos(B[b].x,B[b].y-1);if(B[b].what==-2) cout<<"﹝镖﹞";if(B[b].what==-3) cout<<"﹝火﹞";if(B[b].what==-4) cout<<"﹝水﹞";if(B[b].what==-5) cout<<"﹝风﹞";if(B[b].what==-6) cout<<"﹝雷﹞";if(B[b].what==-7) cout<<"﹝磁﹞";if(B[b].what==-8) cout<<"﹝血﹞";if(B[b].what==-9) cout<<"﹝忍﹞"; if(a==1) Pan(-2,B[b].x,B[b].y,b);}}
if(B[b].what==-11||B[b].what==-12){Nor;Setpos(B[b].x,B[b].y);if(ti(B[b].x)==20)cout<<"==";else cout<<" ";if(B[b].life!=0){if(Magne>0)B[b].How++,B[b].x=B[b].x+(X-B[b].x)/(10-B[b].How)*1.0,B[b].y=B[b].y+(Y-B[b].y)/(10-B[b].How)*1.0;B[b].y-=B[b].vy;Setpos(B[b].x,B[b].y);if(B[b].what==-10) Color(5);if(B[b].what==-11) Color(7);if(T%7<=1)Color(0);cout<<"◆"; if(a==1) Pan(-1,B[b].x,B[b].y,b);}}
if(B[b].what==-13){Nor;Setpos(B[b].x,B[b].y-0.5);if(ti(B[b].x)==20)cout<<"===";else cout<<" ";if(B[b].life!=0){if(B[b].a==13880086){if(Boss==0) B[b].life=0;else if(((Boss==1&&abs(B[b].x-Bx1)+abs(B[b].y-By1)<1.5)||(Boss==2&&abs(B[b].x-Bx2)+abs(B[b].y-By2)<1.5)||(Boss==3&&abs(B[b].x-Bx3)+abs(B[b].y-By3)<1.5)||(B[b].t==5))&&B[b].life==1) Bblo-=8+Lv*2,B[b].life=0;if(B[b].life!=0){if(Boss==1)B[b].x=B[b].x+(Bx1-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By1-B[b].y)/(5-B[b].t)*1.0;if(Boss==2)B[b].x=B[b].x+(Bx2-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By2-B[b].y)/(5-B[b].t)*1.0;if(Boss==3)B[b].x=B[b].x+(Bx3-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By3-B[b].y)/(5-B[b].t)*1.0;}}else{if(B[B[b].a].life==0) B[b].life=0;else if((abs(B[b].x-B[B[b].a].x)+abs(B[b].y-B[B[b].a].y)<1.5||(B[b].t==5))&&B[b].life==1) Exp+=2,B[B[b].a].life=B[b].life=0;if(B[b].life!=0){B[b].x=B[b].x+(B[B[b].a].x-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(B[B[b].a].y-B[b].y)/(5-B[b].t)*1.0;}}Setpos(B[b].x,B[b].y-0.5);if(T%6<3)Color(5);else Color(4);cout<<"●";}}
}if(br<bl) {br=-1,bl=0;memset(B,0,sizeof(B));}Color(0);
}
void Move(){
if(X<3) X=3;if(Y<1) Y=1,Vy=0;if(Y>29) Y=29,Vy=0;
if(Ice!=0){X-=Vx/2.0;Y+=Vy/2.0;Vy=fmax(Vy-0.025,(float)0);if(T%6==0&&Up==0&&Y<Ding) Y+=0.25;if(T%6==3&&Up==0&&Y>=Ding) Y-=0.25;if(Up==0&&Y<=Ding-1.25) Vy=0.25;if(Up==0&&Y>=Ding+1.25&&Wind==0) Vy=-0.25;if(Up==0&&Down==0&&Vx>0&&X<=18) Up=0,Down=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2&&X<=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up==0&&Down==1&&Vx<0&&X>=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up>0&&Down==0&&X>18) Up=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2) Vx+=0.175;else if(Up>0&&Upt==0) Vx-=0.175;else if(Up>0&&Upt>0) {Vx=fmax(Vx-0.125,(float)0);if(Upt==1&&T%2==0)Map(-1,0);if(T%2==0)Upt--;}}
else{X-=Vx;Y+=Vy;Vy=fmax(Vy-0.05,(float)0);if(Wind==0){if(T%6==0&&Up==0&&Y<Ding) Y+=0.5;if(T%6==3&&Up==0&&Y>=Ding) Y-=0.5;}else{if(T%2==0&&Up==0&&Y<Ding) Y+=0.5;if(T%2==1&&Up==0&&Y>=Ding) Y-=0.5;}if(Up==0&&Y<=Ding-1.25) Vy=0.5;if(Up==0&&Y>=Ding+1.25&&Wind==0) Vy=-0.5;if(Up==0&&Down==0&&Vx>0&&X<=18) Up=0,Down=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2&&X<=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up==0&&Down==1&&Vx<0&&X>=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";else if(Up>0&&Down==0&&X>18) Up=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";else if(Down==2) Vx+=0.35;else if(Up>0&&Upt==0) Vx-=0.35;else if(Up>0&&Upt>0) {Vx=fmax(Vx-0.25,(float)0);if(Upt==1)Map(-1,0); Upt--;}}
for(int i=bl;i<=br;i++){
if(B[i].what<98)if(B[i].x-B[i].vx<=5||B[i].x-B[i].vx>=30||B[i].y-B[i].vy<=0||B[i].y-B[i].vy>=30){B[i].life=0;Map(1,i);}
for(int j=0;j<20;j++)if(B[i].what>0&&B[i].life!=0&&abs(B[i].x-I[j][0])<2&&B[i].y-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<" ";I[j][0]=I[j][1]=-1;B[i].life=0;Exp+=2;}
if(B[i].t>=100)B[i].life=0;if(B[i].life==0&&i==bl) bl++;
Map(1,i);if(B[i].life==0) continue;
else{B[i].t++;
if(B[i].what==1){if(B[i].y<=25&&B[i].How==0) B[i].vy=0,B[i].How=1;if(B[i].t==30) B[i].y+=1.5,B[i].How=2;if(B[i].t==35) B[i].vy=1.5,B[i].How=3;}
if(B[i].what==2){if(B[i].t%3==0) B[i].How=!B[i].How;}
if(B[i].what==3||B[i].what==5){if(B[i].what==3&&B[i].y<=20) B[i].vy=0;if(B[i].what==5&&B[i].y<=21) B[i].vy=0;if(B[i].t>30&&B[i].t%2==0) B[i].How=!B[i].How;if(B[i].what==5&&B[i].t<=30&&B[i].x<X) B[i].vx=-0.2;else if(B[i].what==5&&B[i].t<=70&&B[i].x>X) B[i].vx=0.2;else B[i].vx=0;if(B[i].t==45){B[i].life=0;br++;B[br].what=4;B[br].x=B[i].x;B[br].y=32;B[br].vy=3;B[br].life=1;}}
if(B[i].what==6||B[i].what==8||B[i].what==9){if(B[i].vx<0.25&&B[i].vy<0.25&&B[i].t>=50){B[i].life=0;if(B[i].life==0&&i==bl) bl++;Map(1,i);break;}if(B[i].t%5==0) B[i].How=rand()%4;if(B[i].what==9){if(B[i].t==7){X9:float xx=(rand()%41)/40.0,yy=(rand()%41)/40.0;if(xx<=0.5&&yy<=0.5) goto X9;for(int j=1;j<=4;j++){br++,B[br].what=9;B[br].t=11;B[br].x=B[i].x,B[br].y=B[i].y,B[br].vx=xx,B[br].vy=yy;if(j%2==0)swap(B[br].vx,B[br].vy),B[br].vy*=-1;if(j<=2)B[br].vx*=-1,B[br].vy*=-1;B[br].life=1;}B[i].life=0;}}if(B[i].what==8){if(B[i].x>X&&B[i].vx<1.2) B[i].vx+=fmax((float)0,0.2-B[i].t/25);if(B[i].x<X&&B[i].vx>-1.2) B[i].vx-=fmax((float)0,0.2-B[i].t/25);if(B[i].y>Y&&B[i].vy<1.2) B[i].vy+=fmax((float)0,0.2-B[i].t/25);if(B[i].y<Y&&B[i].vy>-1.2) B[i].vy-=fmax((float)0,0.2-B[i].t/25);}}
if(B[i].what>=13&&B[i].what<=15&&B[i].How!=0){if(B[i].x==B[i].How)B[i].vx=0,B[i].How=0;}
if(B[i].what==16){if(B[i].x<X&&B[i].vx>=-1) B[i].vx-=0.2;else if(B[i].x>X&&B[i].vx<=1) B[i].vx+=0.2;}
}
if(B[i].life==1&&B[i].a==0&&B[i].what>0){if(B[i].y>Y&&abs(B[i].x-X)<=3&&((B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y))<Dis) Dis=(B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y),Disb=i;else if(((B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y))<Dis1) Dis1=(B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y),Disb1=i;}
}
}
void Guai(int R,int r){
if(R==-1){br++;B[br].what=-1;B[br].x=X+rand()%3-1;B[br].y=Y+rand()%3-1;B[br].life=1;}
if(R<=-2&&R>=-11){br++;B[br].what=R;B[br].x=B[br].a=r;B[br].y=29;if(R<=-3&&R>=-7)B[br].vx=-1;B[br].vy=1;B[br].life=1;}
if(R==0){br++;B[br].what=1;B[br].x=r;B[br].y=29;B[br].vy=1;B[br].life=1;}
if(R==1){br++;B[br].what=2;B[br].x=r;B[br].y=29;B[br].vy=1;B[br].life=1;}
if(R==2||R==3){br++;B[br].what=2*R-1;B[br].x=r;B[br].y=29;B[br].vy=1;B[br].life=1;}
if(R==4){br++;B[br].what=6;if(r<5)r=5;if(r>30)r=30;B[br].x=r;if(r==11||r==25) B[br].y=29-(rand()%20);else B[br].y=29;X4:B[br].vx=(rand()%21-10)/30.0;B[br].vy=(rand()%25)/30.0;if(B[br].vx<=0.8&&B[br].vy<=0.8)goto X4;int rx=rand()%50;if(rx==0) B[br].vx=0;B[br].life=1;}
if(R==5){br++;B[br].How=r;B[br].what=7;if(B[br].How<0) B[br].x=19;if(B[br].How>0) B[br].x=21;B[br].y=29;B[br].vy=1;B[br].life=1;}
}
void CpGuai(int R,float x,float y,float xx,float yy){
if(R==4){br++;B[br].what=6;B[br].x=x;B[br].y=y;B[br].vx=xx;B[br].vy=yy;B[br].life=1;}
if(R==6||R==7||R==8){br++;B[br].what=4+R;B[br].x=x;B[br].y=y;B[br].vx=xx;B[br].vy=yy;B[br].life=1;}
}
void MesGuai(int a,int rr){
int R=rand()%rr,r=-10086;
if(R==0){if(a==1) r=(5+rand()%8)*2;if(a<=3&&a!=1) r=10+rand()%16;if(a==4) r=rand()%75-20;if(a==5) r=2+rand()%4;if(r!=-10086) Guai(a,r);}
}
void NorGuai(int a,int b){
if(a==1) {if(b==1||b==41) Guai(0,15),Guai(0,17),Guai(0,19);if(b==21||b==61) Guai(0,21),Guai(0,23),Guai(0,25);if(b==81) Guai(0,11),Guai(0,13),Guai(0,15),Guai(0,17),Guai(0,19);if(b==101||b==141) Guai(0,17),Guai(0,19),Guai(0,21),Guai(0,23),Guai(0,25);if(b==121) Guai(0,15),Guai(0,17),Guai(0,19),Guai(0,21),Guai(0,23);if(b>=160&&b<=260&&b%10==0) Guai(0,b/10-1);if(b>=270&&b<=370&&b%10==0) Guai(0,52-b/10);if(b>=460&&b<=560&&b%10==0) Guai(0,b/10-37),Guai(0,b/10-36),Guai(0,b/10-35);if(b>=570&&b<=670&&b%10==0) Guai(0,78-b/10),Guai(0,77-b/10),Guai(0,76-b/10);if(b>=760&&b<=960&&b%10==0) Guai(0,b/10-66),Guai(0,b/10-65),Guai(0,103-b/10),Guai(0,104-b/10);if(b>=1000&&b<=1300) MesGuai(0,30-b/50);}
if(a==2) {if(b<=200&&b%30==1) {int r=rand()%4;if(r==1) r=0;for(int i=0;i<4;i++) if(i!=r) Guai(1,i*4+9);}if(b>200&&b<=220&&b%5==1) Guai(1,18);if(b>220&&b<=300&&b%7==1) Guai(1,b/5-26);if(b>350&&b<=370&&b%5==1) Guai(1,22);if(b>370&&b<=450&&b%7==1) Guai(1,96-b/5);if(b==461||b==501||b==541) Guai(1,13),Guai(1,17),Guai(1,21);if(b==481||b==521||b==561) Guai(1,17),Guai(1,21),Guai(1,25);if(b>=561&&b<=861&&b%20==1) Guai(1,b/40+5);if(b>=561&&b<=861&&b%20==11) Guai(1,35-b/40);if(b>=801&&b<=961&&b%15==1) Guai(1,20);if(b>=1000&&b<=1300) MesGuai(1,30-b/50);}
if(a==3) {if(b==1||b==61) Guai(3,15),Guai(2,17),Guai(2,19);if(b==31||b==91) Guai(2,21),Guai(2,23),Guai(3,25);if(b>=120&&b<=220&&b%10==0) Guai(2,b/10+3);if(b>=240&&b<=340&&b%10==0) Guai(2,49-b/10);if(b>=360&&b<=460&&b%20==0) Guai(2,b/10-21),Guai(2,61-b/10);if(b>=480&&b<=580&&b%20==0) Guai(3,b/10-33),Guai(3,73-b/10);if(b>=600&&b<750&&b%30==0) {for(int i=0;i<5;i++) Guai(3,i*3+10);}if(b>=750&&b<830&&b%10==0) if(b<=200&&b%40==1) Guai(2,X);if(b>=830&&b<910&&b%20==0) Guai(2,X);if(b>=910&&b<980&&b%10==0) Guai(2,X);if(b>=1000&&b<=1300) MesGuai(rand()%2+2,40-b/50);}
if(a==4) {if(b==1) CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,21,29,0,0.65);if(b==41) CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,18,29,0,0.65);if(b==81) CpGuai(4,5,20,-0.4,0.35),CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,30,20,0.25,0.4),CpGuai(4,21,29,0,0.65);if(b==121) CpGuai(4,5,20,-0.2,0.35),CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,30,20,0.4,0.4),CpGuai(4,18,29,0,0.65);if(b==161) CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,21,29,0,0.6),CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,18,29,0,0.65);if(b>=200&&b<=500&&b%40==1) {float r=0,rr;for(int i=1;i<=5;i++){X5:rr=0.7+(rand()%5)/10.0;if(rr==r)goto X5;r=rr;CpGuai(4,i*3+7,29,0,0.5+(rand()%50)/80.0);}}if(b>540&&b<=565&&b%5==1) CpGuai(4,5,8,-2,0.2);if(b>590&&b<=615&&b%5==1) CpGuai(4,30,8,1.5,0.2);if(b>640&&b<=665&&b%5==1) CpGuai(4,5,8,-1.5,0.3);if(b>690&&b<=715&&b%5==1) CpGuai(4,30,8,2,0.3);if(b>=750&&b<=950&&b%20==1) {float r=0,rr;for(int i=1;i<=3;i++){X6:rr=0.7+(rand()%5)/10.0;if(rr==r)goto X6;r=rr;CpGuai(4,i*5+7+(rand()%3),29,0,0.5+(rand()%50)/200.0);}}if(b>=1000&&b<=1300) MesGuai(4,5);}
}
void RandGood(){
if(Biao>0){Biao--;Guai(-1,0);}
if(Gd[1]==0){Gd[1]=rand()%1000+1;if(Win==7)Gd[1]=10086;Gd[3]=rand()%16+8;}
else if(Gd[1]<=5){Guai(-2-Gd[1],Gd[3]);memset(Gd,0,sizeof(Gd));}
else if(Gd[1]>=20&&Gd[1]<27){Guai(-8,Gd[3]);memset(Gd,0,sizeof(Gd));}
else if(Gd[1]>=30&&Gd[1]<37){Guai(-9,Gd[3]);memset(Gd,0,sizeof(Gd));}
else if(Gd[1]>=40&&Gd[1]<70){Gd[2]++;if(Gd[2]%2==1)Guai(-10,Gd[3]);if(Gd[2]>=9)memset(Gd,0,sizeof(Gd));}
else if(Gd[1]>=70&&Gd[1]<100){Gd[2]++;if(Gd[2]%2==1)Guai(-11,Gd[3]);if(Gd[2]>=9)memset(Gd,0,sizeof(Gd));}
else if(Boss!=0&&Gd[1]>=450&&Gd[1]<=500){Guai(-2,Gd[3]);memset(Gd,0,sizeof(Gd));}
else Gd[1]=0;
for(int i=0;i<20;i++){if(I[i][0]==-1) continue;Setpos(I[i][0],I[i][1]);Color(0);if(I[i][0]==20) cout<<"===";else cout<<" ";I[i][1]++;if(I[i][0]>=28||I[i][0]<=0||I[i][1]>=29) I[i][0]=I[i][1]=-1;else Color(1),Setpos(I[i][0],I[i][1]),cout<<"■";Color(0);}
}
void Panboss(int bx,int by){
float Nox[4],Noy[4];Nox[0]=X,Noy[0]=Y;
if(Down==1&&X==22) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
else if(Down==2) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
else if(Down==1||X<18) Nox[1]=X-1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
else Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
for(int i=0;i<3;i++){if((Boss==1||Boss==6)&&Wind==0&&Thun==0&&abs(Nox[i]-bx)<1&&abs(Noy[i]-by)<1&&Bgo1[4]==0) Blo-=20,Bgo1[4]=1,Killb=20,Kill=1;if((Boss==2||Boss==6)&&Wind==0&&Thun==0&&abs(Nox[i]-bx)<1&&abs(Noy[i]-by)<1&&Bgo2[8]==0) Blo-=20,Bgo2[8]=1,Killb=20,Kill=1;}
}
void Boss1(){
for(int j=0;j<20;j++)if(abs(Bx1-I[j][0])<2&&By1-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<" ";I[j][0]=I[j][1]=-1;Bblo-=8+Lv*2;Exp+=2;}
if(Bbr==Bbl&&Bbr!=0) Bbr=Bbl=0;
for(int i=1;i<=3+(Bbl-Bbr)/5;i++)if(Bbr<Bbl){Setpos(Bway[Bbr][0],Bway[Bbr][1]);if(Bway[Bbr][0]==20) cout<<"==";else cout<<" ";Bbr++;}
if(Bwhat1==5){int bx,by;Color(5);for(int i=0;i<10;i++){bx=Bx1-i*Bvx1/10.0;by=By1-i*Bvy1/10.0;Setpos(bx,by),cout<<"█";Bbl++;Bway[Bbl][0]=bx;Bway[Bbl][1]=by;}Color(0);}
Bx1-=Bvx1;By1-=Bvy1;
if(Bwhat1==0){X2:Bwhat1=rand()%7;if(Bwhat1==2||Bwhat1==3){if(By1<=10||By1>25) goto X2;}if(Bwhat1==4){if(By1<=15||Bx1<20) goto X2;Bgo1[2]=Bx1;Bgo1[3]=By1-1;}if(Bwhat1==5) {X0:Bgo1[3]=rand()%4+1;Bvx1=(rand()%101)/20.0;Bvy1=(rand()%101)/20.0;if(Bgo1[3]<=2) Bvx1*=-1;if(Bgo1[3]%2==1) Bvy1*=-1;if(abs(Bvx1)+abs(Bvy1)<=3||Out1)goto X0;}if(Bwhat1==6){if(By1<=17||By1>25) goto X2;}}
if(Bwhat1==1){Bgo1[1]++,Bgo1[2]++;int R=rand()%(5-Bgo1[1]),r=rand()%(10-Bgo1[2]);if(Out1) R=0;if(R==0) {int vx=Bvx1,vy=Bvy1;Bgo1[1]=0;Bvx1=(rand()%101-20)/50.0;Bvy1=(rand()%101-20)/50.0;if(Bgo1[3]<=2) Bvx1*=-1;if(Bgo1[3]%2==1) Bvy1*=-1;if(Out1) r=0;} if(r==0) Chang1 }
if(Bwhat1==2){Bgo1[1]++;if(Bgo1[1]>6){Bvy1=-0.3;br++;B[br].x=Bx1,B[br].y=By1-1;B[br].what=6;X3:B[br].vx=(rand()%21-10)/40.0;B[br].vy=(rand()%25)/30.0;if(B[br].vx<=0.8&&B[br].vy<=0.8)goto X3;int rx=rand()%50;if(rx==0) B[br].vx=0;B[br].life=1;}if(Bgo1[1]>8) Chang1}
if(Bwhat1==3){Bgo1[1]++;if(Bgo1[1]>6&&Bgo1[1]%3==0){Bvy1=-0.3;br++;B[br].x=Bx1,B[br].y=By1-1;B[br].what=8;B[br].life=1;}if(Bgo1[1]>15) Chang1}
if(Bwhat1==4){Bgo1[1]++;if(Bgo1[1]<=8){Setpos(Bgo1[2],Bgo1[3]);if(Bgo1[1]==1)cout<<" ";else if(Bgo1[1]>1&&Bgo1[2]==20) cout<<"==";else cout<<" ";Bgo1[2]--;Setpos(Bgo1[2],Bgo1[3]);int r=rand()%4;if(r%2==0) Color(6);else Color(9);if(r<2) cout<<") ";else cout<<"】";Color(0);}if(Bgo1[1]==6) Bgo1[5]=X,Bgo1[6]=Y;if(Bgo1[1]==11){Map(0,(bool)Kill);Setpos(Bgo1[5],Bgo1[6]+1),cout<<" ";Setpos(Bgo1[5],Bgo1[6]-1),cout<<" ";Setpos(Bgo1[5]+1,Bgo1[6]),cout<<" ";Setpos(Bgo1[5]-1,Bgo1[6]),cout<<" ";int bx,by,bvx=Bgo1[2]-Bgo1[5],bvy=Bgo1[3]-Bgo1[6];Color(6);int i=0;while(1){bx=Bgo1[2]-i*bvx/30.0;by=Bgo1[3]-i*bvy/30.0;if(bx<=5||bx>=30||by<0||by>=29) break;Panboss(bx,by);Setpos(bx,by),cout<<"█";Bbl++;Bway[Bbl][0]=bx;Bway[Bbl][1]=by;i++;}Color(0);Map(-1,0);Chang1}}
if(Bwhat1==5){Bgo1[1]++,Bgo1[2]++;int R=rand()%(5-Bgo1[1]),r=rand()%(10-Bgo1[2]);if(Out1) R=0;if(R==0) {int vx=Bvx1,vy=Bvy1;Bgo1[1]=0;X1:Bvx1=(rand()%101-20)/20.0;Bvy1=(rand()%101-20)/20.0;if(Bgo1[3]<=2) Bvx1*=-1;if(Bgo1[3]%2==1) Bvy1*=-1;if(abs(Bvx1)+abs(Bvy1)<=3||abs(Bvx1-vx)<=1||abs(Bvy1-vy)<=1)goto X1;if(Out1) r=0;} if(r==0) Chang1 }
if(Bwhat1==6){Bgo1[1]++;if(Bgo1[1]>6&&Bgo1[1]%10==0){By1-=1;br++;B[br].x=Bx1,B[br].y=By1-1;B[br].what=9;X30:B[br].vy=1;B[br].life=1;}if(Bgo1[1]>31) Chang1}
}
void Boss2(){
for(int j=0;j<20;j++)if(abs(Bx2-I[j][0])<2&&By2-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<" ";I[j][0]=I[j][1]=-1;Bblo-=8+Lv*2;Exp+=2;}
if(Bbr==Bbl&&Bbr!=0) Bbr=Bbl=0;
for(int i=1;i<=3+(Bbl-Bbr)/5;i++)if(Bbr<Bbl){Setpos(Bway[Bbr][0],Bway[Bbr][1]);if(Bway[Bbr][0]==20) cout<<"==";else cout<<" ";Bbr++;}
Bx2-=Bvx2;By2-=Bvy2;
if(Bwhat2==0){X21:Bwhat2=rand()%7;if(Bwhat2==2){X31:for(int i=1;i<=3;i++){Bgo2[i*2+1]=rand()%28+1,Bgo2[i*2]=rand()%25+5;if((abs(Bgo2[i*2]-Bx2)<=2&&abs(Bgo2[i*2+1]-By2)<=2)||(abs(Bgo2[i*2]-X)<=2&&abs(Bgo2[i*2+1]-Y)<=2))goto X31;}if(Bgo2[2]==Bgo2[4]||Bgo2[2]==Bgo2[6]||Bgo2[6]==Bgo2[4]||Bgo2[5]==Bgo2[3]||Bgo2[3]==Bgo2[7]||Bgo2[5]==Bgo2[7]) goto X31;}if(Bwhat2==3){Bgo2[2]=rand()%2;}if(Bwhat2==4||Bwhat2==5||Bwhat2==6){Bvy2=-1.5;Bvx2=-0.5;}}
if(Bwhat2==1){Bgo2[1]++,Bgo2[2]++;int R=rand()%(5-Bgo2[1]),r=rand()%(30-Bgo2[2]);if(Out2) R=0;if(R==0) {int vx=Bvx2,vy=Bvy2;Bgo2[1]=0;Bvx2=(rand()%101-20)/50.0;Bvy2=(rand()%101-20)/50.0;if(Bgo2[3]<=2) Bvx2*=-1;if(Bgo2[3]%2==1) Bvy2*=-1;if(Out2) r=0;} if(r==0) Chang2 }
if(Bwhat2==2){Bgo2[1]++;float bx,by,bvx,bvy;if(Bgo2[1]<21){for(int i=1;i<=3;i++){bvx=Bgo2[i*2]-Bx2,bvy=Bgo2[i*2+1]-By2;if(Bgo2[1]<=10){Setpos(Bx2+(Bgo2[1]-1)*bvx/10.0,By2+(Bgo2[1]-1)*bvy/10.0);if(abs(Bx2+(Bgo2[1]-1)*bvx/10.0-20)<0.5)cout<<"==";else cout<<" ";bx=Bx2+Bgo2[1]*bvx/10.0;by=By2+Bgo2[1]*bvy/10.0;Setpos(bx,by);}else Setpos(Bgo2[i*2],Bgo2[i*2+1]);int r=rand()%4;if(r%2==0) Color(3);else Color(10);if(r<=1) cout<<"×";else cout<<"+";Color(0);}}if(Bgo2[1]==21){Map(0,(bool)Kill);Color(3);int j=0;for(int j=0;j<=30;j++)for(int i=1;i<=3;i++)for(int k=1;k<=4;k++){if(k==1) bvx=j,bvy=0;if(k==2) bvx=-j,bvy=0;if(k==3) bvx=0,bvy=j;if(k==4) bvx=0,bvy=-j;bx=Bgo2[i*2]+bvx,by=Bgo2[i*2+1]+bvy;if(bx<=5||bx>=30||by<0||by>=30) {continue;}Panboss(bx,by);Setpos(bx,by),cout<<"█";Bbl++;Bway[Bbl][0]=bx;Bway[Bbl][1]=by;}Color(0);Map(-1,0);Chang2}}
if(Bwhat2==3){Bgo2[1]++;if(Bgo2[1]<=18){if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<" ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<" ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<" ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";if(Bgo2[1]%4==0)Bgo2[3]=!Bgo2[3];if(Bgo2[1]%6<3)Color(3);else Color(5);if(Bgo2[3]==0) Setpos(X-3,Y),cout<<"▼",Setpos(X+3,Y),cout<<"▲",Bgo2[4]=(int)(X+0.5),Bgo2[5]=(int)(Y+0.5);if(Bgo2[3]==1) Setpos(X,Y-3),cout<<" ",Setpos(X,Y+3),cout<<" ",Bgo2[4]=(int)(X+0.5),Bgo2[5]=(int)(Y+0.5);Color(0);}if(Bgo2[1]==18){if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<" ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<" ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<" ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";}if(Bgo2[1]>18&&Bgo2[1]<=25){Bgo2[3]=Bgo2[2];if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<" ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<" ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<" ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";if(Bgo2[1]%4<2)Color(3);else Color(5);if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<"▼",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<"▲";if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+3),cout<<" ";Color(0);}if(Bgo2[1]==25){if(Bgo2[2]==0){Color(3);for(int i=4;i<=29;i++){Setpos(i,Bgo2[5]),cout<<"█";Bbl++;Panboss(i,Bgo2[5]);Bway[Bbl][0]=i;Bway[Bbl][1]=Bgo2[5];}}if(Bgo2[2]==1){Color(3);for(int i=0;i<=28;i++){Setpos(Bgo2[4],i),cout<<"█";Bbl++;Panboss(Bgo2[4],i);Bway[Bbl][0]=Bgo2[4];Bway[Bbl][1]=i;}}Chang2}}
if(Bwhat2==4||Bwhat2==5||Bwhat2==6){Bgo2[1]++;if(By2>27)Bvy2=0;if(Bx2>23)Bvx2=0;if(Bgo2[1]>13&&Bgo2[1]%3==0){float t=By2-Y,g=0.35;if(Boss==6) t/=2.0;CpGuai(Bwhat2+2,Bx2,By2,(Bx2-X)/t*1.0+(t-1)*g/2.0,1);}if(Bgo2[1]>20) Chang2}
}
void Boss3(){
#define Bean br++;B[br].what=13;B[br].x=Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;
for(int j=0;j<20;j++)if(abs(Bx3-I[j][0])<2&&By3-I[j][1]<=2){Setpos(I[j][0],I[j][1]);if(I[j][0]==20) cout<<"===";else cout<<" ";I[j][0]=I[j][1]=-1;Bblo-=8+Lv*2;Exp+=2;}
Bx3-=Bvx3;By3-=Bvy3;
if(Bwhat3<=8){if(Bx3>X&&Bvx3<1.5) Bvx3+=0.3;if(Bx3<X&&Bvx3>-1.5) Bvx3-=0.3;}
if(Bwhat3==0){X22:Bwhat3=rand()%12;if(Bwhat3==11&&abs(Bx3-20)<=1)goto X22;if(Bwhat3==11)Bgo3[2]=rand()%5;}
if(Bwhat3==1){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].what=13;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=1;B[br].How=(int)Bx3-4;B[br].life=1;br++;B[br].what=13;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=-1;B[br].How=(int)Bx3+2;B[br].life=1;br++;B[br].what=13;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;Chang3}}
if(Bwhat3>=2&&Bwhat3<=6){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].what=11+Bwhat3;B[br].vy=0.5+(rand()%100)/80.0;if(Bwhat3==5)B[br].vy=B[br].vy*3/4.0;B[br].life=1;Chang3}}
if(Bwhat3==7){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].what=14;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=1;B[br].How=(int)Bx3-4;B[br].life=1;br++;B[br].what=14;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=-1;B[br].How=(int)Bx3+2;B[br].life=1;br++;B[br].what=14;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;Chang3}}
if(Bwhat3==8){Bgo3[1]++;if(Bgo3[1]==6){br++;B[br].what=15;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=1;B[br].How=(int)Bx3-4;B[br].life=1;br++;B[br].what=15;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].vx=-1;B[br].How=(int)Bx3+2;B[br].life=1;br++;B[br].what=15;B[br].x=(int)Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;Chang3}}
if(Bwhat3==9){Bvx3=0;Bgo3[1]++;if(Bgo3[1]==6||Bgo3[1]==8){Bean}if(Bgo3[1]>=8)Chang3}
if(Bwhat3==10){Bvx3=0;Bgo3[1]++;if(Bgo3[1]==6||Bgo3[1]==8||Bgo3[1]==10||Bgo3[1]==12){Bean}if(Bgo3[1]>=12)Chang3}
if(Bwhat3==11){Bvx3=0;Bgo3[1]++;if(Bgo3[1]>=8)for(int i=1;i<=4;i++){br++;B[br].what=80+100*Bgo3[2]+Bgo3[1]*4+i;B[br].x=Bx3-1,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=99;B[br].x=Bx3,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=99;B[br].x=Bx3-2,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;}if(Bgo3[1]>=20){for(int i=1;i<=4;i++){br++;B[br].what=98;B[br].x=Bx3-1,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3-2,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;}Chang3}}
}
void Ball(int ball){
if(ball==1){if(Fir<3&&T%8==0) Fir++;if(Fir>0){br++;B[br].what=-13;B[br].x=X;B[br].y=Y+rand()%3-1;B[br].life=1;if(Dis<=30) B[br].a=Disb,B[Disb].a=1,Fir--;else if(Boss!=0) B[br].a=13880086,Fir--;else if(Dis!=13880087) B[br].a=Disb,B[Disb].a=1,Fir--;else if(Dis1!=13880087) B[br].a=Disb1,B[Disb1].a=1,Fir--;else B[br].life=0;Dis=Dis1=13880087;}}
if(ball==2){if(T%4==0)ib=(ib+1)%20,I[ib][1]=Y-2;if(T%16==0)I[ib][0]=X;if(T%16==4)I[ib][0]=X-1;if(T%16==8)I[ib][0]=X+1;if(T%16==12)I[ib][0]=X-2;if(T%12==9)I[ib][0]=X+2;if(Water==1){for(int i=X-6;i<=X+6;i++)ib=(ib+1)%20,I[ib][0]=i,I[ib][1]=Y-2-0.5*abs(i-X);}}
if(ball==3){if(Wind>5){if(Y<Ding-1)Vy=5;else Vy=0;if(Up>=1) Vx=-5;if(Down==2) Vx=5;}if(Wind<5){if(Y>Ding-1)Vy=-5;else Vy=0;if(Up>=1) Vx=-5;if(Down==2) Vx=5;}if(Wind==5){if(Boss==2) Ding=12.25;else Ding=6.25;if(Boss!=0) Bblo-=16+Lv*4;if(Boss==1) Chang1 if(Boss==2) Chang2 if(Boss==3) Chang3 system("color 3F");Sleep(20);system("color 6F");Sleep(10);system("color 0F");system("cls");for(int i=bl;i<=br;i++)if(B[i].what>0)B[i].life=0;Setpos(20,0);for(int i=1;i<=60;i++) printf("=");}}
if(ball==4){if(Thun==1){if(Boss!=0) Bblo-=16+Lv*4;if(Boss==1) Chang1 if(Boss==2) Chang2 if(Boss==3) Chang3 system("color 9F");Sleep(20);system("color 6F");Sleep(10);system("color 0F");system("cls");for(int i=bl;i<=br;i++)if(B[i].what>0)B[i].life=0;Setpos(20,0);for(int i=1;i<=60;i++) printf("=");}}
if(ball==5){system("cls"); Color(5);Setpos(10,10);cout<<"新天赋!";Y:int rr=rand()%4+2;Setpos(12,10);if(rr==Ren) goto Y;if(rr==2)cout<<"瞬跳";if(rr==3)cout<<"空之舞";if(rr==4)cout<<"三段跳";if(rr==5)cout<<"反重力跳跃";Setpos(14,10);cout<<"当前天赋:";if(Ren==1)cout<<"小无敌";if(Ren==2)cout<<"瞬跳";if(Ren==3)cout<<"空之舞";if(Ren==4)cout<<"三段跳";if(Ren==5)cout<<"反重力跳跃";Setpos(16,10);cout<<"换否?(y/n)";G:char g=_getch();if(g=='y')Ren=rr;else if(g!='n')goto G;system("cls");Setpos(20,0);Color(0);for(int i=1;i<=60;i++) printf("=");}
if(ball==6){Color(4);for(float i=1;i<=Bblo;i+=Bblomax/20.0)cout<<"▄";Color(0);cout<<' '<<Bblo<<" ";Color(0);}
if(ball==7){Color(1);if(Win==7&&T%6<3)Color(3);for(float i=1;i<=Blo;i+=Blomax/20.0)cout<<"▄";Color(0);if(Win==7&&T%6<3)Color(3);printf(" %0.1f ",Blo);}
}
int main(){
system("mode con cols=60 lines=37");CONSOLE_CURSOR_INFO cursor_info={1,0};SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);srand((unsigned)time(NULL));
Win=0;Ren=1;Lv=1;Blo=Blomax=100;Expmax=300;Hui=15;X=18,Y=6;
ReStart:system("cls");memset(B,0,sizeof(B));memset(I,-1,sizeof(I));T=0;bl=0;br=-1;Upt=0;
Start:Blo=Blomax * 100;Ding=6.25;
memset(Bgo1,0,sizeof(Bgo1));memset(Bgo2,0,sizeof(Bgo2));memset(Bgo3,0,sizeof(Bgo3));
if(Win%2==0) T=0;if(Win%2==0&&D==0){if(Win>0)Ball(5);Boss=0;lL:L=rand()%4+1;for(int i=0;i<=Win/2-1;i++)if(L==Ll[i]) goto lL;Ll[Win/2]=L;}if(Win%2==1&&D==0){if(Win==7)Boss=6,T=0,Blomax+=100;else{bl:Boss=rand()%3+1;for(int i=0;i<=3;i++)if(Boss==Bl[i]) goto bl;}Bl[Win/2]=Boss;Bwhat1=Bwhat2=Bwhat3=0,Bx1=10,By1=20,Bx2=15,By2=20,Bx3=21,By3=20;system("color 4C");Sleep(20);system("color 0F");Map(0,1);Sleep(1000);}if(Win%2==1){Bblomax=500+(Win/2)*500;Bblo=Bblomax;if(Boss==2) Ding=12.25;}
while(1){
T++;
if(Wind==0){if(GetAsyncKeyState(VK_LEFT)&0x8000) Vy=-(10-abs(Ding-Y)*1.5)/20.0;if(GetAsyncKeyState(VK_RIGHT)&0x8000) Vy=(10-abs(Ding-Y)*1.5)/20.0;}if(GetAsyncKeyState(VK_UP)&0x8000&&u1==0) {u1++;if(Down==1){Down=0;Up=0;if(Ren==2)Map(-1,0),Vx=0,X=18,Li=5;else Vx=7,Vy=0.3;}else if(Up==0&&Wind==0) {Down=0;Up=1;if(Ren==2)Map(-1,0),Vx=1,X=10,Map(0,3),Li=5;else Vx=2,Vy=0.1;}else if(Up==1&&Wind==0) {Down=0;Up=2;if(Ren==2)Map(-1,0),Vx=1,X-=6,Map(0,3),Li=5;else Vx=1.5,Vy=0.1;}else if(Ren==3&&Up==2&&Wind==0) {Down=0;Up=3;Vx=1;Vy=0.5;Upt=30;}else if(Ren==4&&Up==2&&Wind==0) {Down=0;Up=3;Vx=1.8;Vy=0.1;}}if(GetAsyncKeyState(VK_DOWN)&0x8000&&u2==0) {u2++;if(Down==1&&Ren==5){Down=2;Up=0;Vx=-1.7;}else {Down=1;Up=0;if(Ren==2)Map(-1,0),Vx=0,X=22,Map(0,3),Li=5;else {if(Upt!=0) Map(-1,0),Upt=0;Vx=-7;}}}if((GetAsyncKeyState(VK_UP)&0x8000) ?0:1) u1=0;if((GetAsyncKeyState(VK_DOWN)&0x8000) ?0:1) u2=0;if(kbhit()){char g=_getch();if(g==' ') Sleep(100),Setpos(4,1),Sy++,system("pause");}if(Sy==1) Setpos(4,1),printf(" "),Sy--;
if(Drug==0) Blo=fmin((float)Blomax,Blo+Hui/100.0);else if(T%10==0)Blo--;if(T%20==0) {if(Kill!=0) Kill=0;if(Lvl!=0) Lvl=0;}if(Killb>0) Killb--;if(Li>0) Li--;if(Ice>0) Ice--;if(Drug>0) Drug--;if(Magne>0) Magne--;
if(Fire>0) Ball(1),Fire--;if(Water>0) Ball(2),Water--;if(Wind>0) Ball(3),Wind--;if(Thun>0) Ball(4),Thun--;
if(Boss==0) NorGuai(L,T%1500);RandGood();if(T%20==1)Exp++;
if(T%50==1){Exp++;system("cls");Setpos(20,0);Color(0);for(int i=1;i<=60;i++) printf("=");if(Win==0&&T<300){Setpos(4,6);cout<<"↑/↓ 跳跃/下翻,←→ 些微移动(松手即返回)"; Setpos(8,6);cout<<"球可以开启特殊效果,经验积满(300)可提升级别。";Setpos(8,6);cout<<"打败 7 波即胜利,打败 BOSS 有新天赋。";Setpos(10,15);cout<<"空格可以暂停。";}}
Map(-1,0);
if(Boss==1) Boss1();if(Boss==2) Boss2();if(Boss==3) Boss3();if(Boss==6) Boss1(),Boss2(),Boss3();
Move();Map(0,(bool)Kill);Color(0);
Setpos(1,1);Blo=fmin(Blo,(float)Blomax);if(Boss==0)cout<<"血量: "<<(int)Blo<<" ";Color(0);Setpos(1,9),cout<<"死亡次数: "<<D<<" ";Setpos(2,1);Exp=min(Exp,Expmax);if(Exp>=Expmax)Exp=0,Lv++,Lvl++,Hui++,Blomax+=5;if(Lvl>0)Color(5);cout<<"级别: "<<Lv;Color(0);Setpos(2,9);cout<<"经验: "<<Exp<<" ";if(Boss>0) Setpos(3,1),cout<<"血量 : ",Ball(7);if(Boss>0&&Boss!=6) Setpos(4,1),cout<<"怪物血量: ",Ball(6);if(Boss==6) Setpos(1,9),printf("时间: %0.1f s ",T/15.0);
if(Win==0) Sleep(55);if(Win==1) Sleep(50);if(Win==2) Sleep(35);if(Win==3) Sleep(40);if(Win==4) Sleep(25);if(Win==5) Sleep(30);if(Win==6) Sleep(20);if(Win>=7) Sleep(17);
if(Boss==3&&Bblo<=0){for(int i=1;i<=4;i++){br++;B[br].what=98;B[br].x=Bx3-1,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;br++;B[br].what=98;B[br].x=Bx3-2,B[br].y=By3-1+i;B[br].vy=4;B[br].life=1;}}
if((Win%2==0&&T>=1400)||(Win%2==1&&Bblo<=0)||(Win==7&&T>=450)||Blo<=0) {Map(-1,0);break;}
}
if(Blo<=0){
Sleep(1000);
D++;
system("color 7F");
Setpos(15,11);
Color(4);
cout<<"GAME OVER...";
Sleep(2000);
goto ReStart;
}
else if(Win==6){
system("color 7F");
Setpos(15,11);
Color(4);
cout<<"坚持30秒 !";
Sleep(2000);
Setpos(30,0);
Win++;
D=0;
}
else if(Win==7){
Sleep(1000);
system("color 6E");
Setpos(15,11);
Color(5);
cout<<"YOU WIN !";
Sleep(2000);
Setpos(30,0);
return 0;
}else Sleep(1000),Win++,D=0;
goto Start;
}
8.双人密室逃脱(推荐)
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<windows.h>
#include<conio.h>
#include<time.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
using namespace std;
string a[21][20]= {"■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
"■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
"■","■","□","□","□","□","□","□","□","□","□","□","□","□","□","▓","▓","▲","■","■",
"■","□","□","□","■","■","□","■","□","■","■","■","■","■","■","▓","▓","▓","■","■",
"■","□","□","□","□","□","∷","□","□","■","∷","∷","∷","□","□","□","▓","▓","■","■",
"■","□","■","□","□","□","□","■","□","■","∷","∷","■","□","□","□","■","□","■","■",
"■","□","■","□","□","□","□","■","□","■","∷","■","□","□","□","□","■","□","■","■",
"■","□","□","∷","□","□","□","□","□","■","□","□","□","□","■","∷","■","□","■","■",
"■","□","■","□","■","■","□","□","■","■","□","□","□","■","∷","∷","■","□","■","■",
"■","□","□","□","□","□","□","■","□","□","□","□","□","∷","∷","∷","■","□","■","■",
"■","□","■","■","■","■","■","■","□","■","□","■","■","■","■","■","■","□","■","■",
"■","□","■","∷","∷","∷","□","□","□","□","□","■","□","□","□","□","□","□","■","■",
"■","□","■","∷","∷","■","□","□","□","■","■","□","□","■","■","□","■","□","■","■",
"■","□","■","∷","■","□","□","□","□","■","□","□","□","□","□","∷","□","□","■","■",
"■","□","■","□","□","□","□","■","∷","■","□","■","□","□","□","□","■","□","■","■",
"■","□","■","□","□","□","■","∷","∷","■","□","■","□","□","□","□","■","□","■","■",
"■","▓","▓","□","□","□","∷","∷","∷","■","□","□","∷","□","□","□","□","□","■","■",
"■","▓","▓","▓","■","■","■","■","■","■","□","■","□","■","■","□","□","□","■","■",
"■","●","▓","▓","□","□","□","□","□","□","□","□","□","□","□","□","□","■","■","■",
"■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
"■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
}; //地图
string jz[8]; //用来加载的变量
int xxxx,i,j,lev1=0,lev2=0; //一堆没用的变量=.=
int n1=1000,m1=10,l1=1; //玩家1相关信息
int n2=1000,m2=10,l2=1; //玩家2相关信息
int t,t1,t2,t3,t4; //计算时间的变量
double t5,t6; //计算时间的变量
int x=18,y=1; //玩家1坐标
int p=2,q=17; //玩家2坐标
int p2=2,q2=7; //玩家2辅助坐标
char ch,ch1,ch2; //输入字符,玩家1保留字符,玩家2保留字符
int gbdw1(); //光标定位1函数
int gbdw2(); //光标定位2函数
int gbdw3(); //光标定位3函数
int gbdw4(); //光标定位4函数
int hpzy(); //获取资源函数
int jzz(); //加载中函数
int p1kz(); //玩家1控制函数
int p2kz(); //玩家2控制函数
int zcd(); //主菜单函数
void draw(); //画图函数
void hidden(); //隐藏光标函数
void zanting(); //暂停函数
void renji(); //人机模式
void renji_suiji(); //人机模式(防bug)
void renji_gress(); //吃草
void zanting() {
system("cls");
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
return;
}
int gbdw1() {
COORD pos = {0, 22};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int gbdw2() {
COORD pos = {40, 22};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int gbdw3() {
COORD pos = {0, 23};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int gbdw4() {
COORD pos = {40, 23};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
void draw() {
if(n1>=1000) n1=1000;
if(n2>=1000) n2=1000;
if(n1<=0) n1=0;
if(n2<=0) n2=0;
if(m1>=500) m1=500;
if(m2>=500) m2=500;
if(m1<=0) m1=0;
if(m2<=0) m2=0;
if(l1>=20) l1=20;
if(l1>=20) l1=20;
COORD pos = {0, 0};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<"Already start "<<((int)time(NULL)-t)/60<<" minute for "<<((int)time(NULL)-t)%60<<" seconds"<<endl;
for(i=1; i<=19; i++) {
for(j=0; j<=18; j++) {
if(a[i][j]=="■") {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED);
cout<<a[i][j];
}
if(a[i][j]=="∷") {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
cout<<a[i][j];
}
if(a[i][j]=="▓") {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
cout<<a[i][j];
}
if(a[i][j]=="□") {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_GREEN);
cout<<a[i][j];
}
if(a[i][j]=="●"||a[i][j]=="▲") {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
cout<<a[i][j];
}
}
cout<<endl;
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("●player 1: ▲player 2:\n");
printf("Lv:%2d HP:%4d mana:%3d Lv:%2d HP:%4d mana:%3d\n",l1,n1,m1,l2,n2,m2);
gbdw1();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("HP: ");
for(j=1; j<=n1/10/8; j++)
printf("█");
xxxx=n1/10%8;
cout<<jz[xxxx];
printf("%d",n1);
printf(" ");
gbdw2();
printf("HP: ");
for(j=1; j<=n2/10/8; j++)
printf("█");
xxxx=n2/10%8;
cout<<jz[xxxx];
printf("%d",n2);
printf(" \n");
gbdw3();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_GREEN);
printf("moon:");
for(j=1; j<=m1/5/8; j++)
printf("█");
xxxx=m1/5%8;
cout<<jz[xxxx];
printf("%d",m1);
printf(" ");
gbdw4();
printf("moon:");
for(j=1; j<=m2/5/8; j++)
printf("█");
xxxx=m2/5%8;
cout<<jz[xxxx];
printf("%d",m2);
printf(" \n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
return;
}
int zcd() {
while(1) {
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
system("cls");
printf("Welcome to square in the world!\n");
printf("-------------------------------\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
printf("S.[Start the game]\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED | FOREGROUND_GREEN);
printf("T.[The program diagram]\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
printf("H.[Help]\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
printf("Q.[Quit the game]\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("-------------------------------\n");
ch=getch();
if(ch=='s'||ch=='S') {
system("cls");
for(i=1; i<=136; i++) {
xxxx=i%8;
COORD pos = {0, 0};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("Being parsed~ Loading...\n");
printf("----------------------------------\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
for(j=1; j<=i/8; j++)
printf("█");
cout<<jz[xxxx]<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("----------------------------------\n");
}
printf("Initialize the...");
Sleep(1000);
break;
}
if(ch=='t'||ch=='T') {
COORD pos = {0, 0};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
printf("┏━━━━━━━━━━━━━━━━┓\n");
printf("┃[square big showdown 4.11] ┃\n");
printf("┃[Human-machine version] ┃\n");
printf("┃┃ ┃\n");
printf("┃┣[Start the game] ┃\n");
printf("┃┃ ┃\n");
printf("┃┣[The program tree diagram] ┃\n");
printf("┃┃┃ ┃\n");
printf("┃┃┗[The current] ┃\n");
printf("┃┃ ┃\n");
printf("┃┣[Help] ┃\n");
printf("┃┃┃ ┃\n");
printf("┃┃┣[Look at the map] ┃\n");
printf("┃┃┃ ┃\n");
printf("┃┃┣[Operation to help] ┃\n");
printf("┃┃┃ ┃\n");
printf("┃┃┗[The developer] ┃\n");
printf("┃┃ ┃\n");
printf("┃┗[Quit the game] ┃\n");
printf("┗━━━━━━━━━━━━━━━━┛\n");
ch=getch();
}
if(ch=='h'||ch=='H') {
system("cls");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("Do you need any help?\n");
printf("---------------------\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
printf("1.[Look at the map]\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED | FOREGROUND_GREEN);
printf("2.[Operation to help]\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
printf("3.[The developer]\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("---------------------\n");
ch=getch();
if(ch=='1') {
draw();
printf("●player 1;\n");
printf("▲Player 2;\n");
printf("■Is a wall, do not walk;\n");
printf("□Is a way, you can walk;\n");
printf("∷The grass;\n");
printf("▓Is the birth place of both parties.\n");
printf("Two lines are at the bottom of the both sides of the case;\n");
printf(" Press any key to return;\n");
ch=getch();
continue;
}
if(ch=='2') {
system("cls");
printf("player 1:\n");
printf(" w.up s.down a.left d.right\n");
printf(" v.attack b.Respond to health n.vampire\n");
printf(" f.flash g.To attract\n");
printf("-----------------------------------------------\n");
printf("player 2:\n");
printf(" ↑.up ↓.down ←.left →.right\n");
printf(" 1.attack 2.Respond to health 3.crit\n");
printf(" 4.flash 5.Back to home\n");
printf("-----------------------------------------------\n");
printf("Click on the x for details!\n");
ch=getch();
if(ch=='x'||ch=='X') {
system("cls");
printf("player 1:---------------------------------\n");
printf("---control--- P1HP moon P2HP moon\n");
printf(" w.up ---- +1 ---- ----\n");
printf(" s.down ---- +1 ---- ----\n");
printf(" a.left ---- +1 ---- ----\n");
printf(" d.right ---- +1 ---- ----\n");
printf(" \n");
printf(" v.attack ---- +2 -20 ----\n");
printf(" b.Respond to health +200 -50 ---- ----\n");
printf(" n.vampire +150 -100 -150 -20\n");
printf(" f.flash ---- -20 ---- ----\n");
printf(" g.To attract ---- -70 -100 ----\n");
printf("player 2:---------------------------------\n");
printf("---control--- P1HP moon P2HP moon\n");
printf(" ↑.up ---- ---- ---- +1\n");
printf(" ↓.down ---- ---- ---- +1\n");
printf(" ←.left ---- ---- ---- +1\n");
printf(" →.right ---- ---- ---- +1\n");
printf(" \n");
printf(" 1.attack -20 ---- ---- +2\n");
printf(" 2.Respond to health ---- ---- +200 -50\n");
printf(" 3.crit -200 ---- ---- -100\n");
printf(" 4.flash ---- ---- ---- -20\n");
printf(" 5.Back to home ---- ---- ---- -70\n");
printf("------------------------------------------");
ch=getch();
}
continue;
}
if(ch=='3') {
system("cls");
printf("The development team:\n");
printf(" Alliance primary school\n");
printf("Development date:\n");
printf(" 16/11/17 18:35\n");
printf("Belonging to:\n");
printf(" China's fujian province\n");
ch=getch();
continue;
}
}
if(ch=='q'||ch=='Q') {
if(1) {
system("cls");
printf("Really want to quit?\n");
printf("--------------------\n");
printf("Y.[Yes] N.[No]\n");
printf("--------------------\n");
while(ch!='y'&&ch!='Y'&&ch!='N'&&ch!='n')
ch=getch();
}
if(ch=='Y'||ch=='y') {
system("cls");
for(i=1; i<=136; i++) {
xxxx=i%8;
COORD pos = {0, 0};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
printf("Deleting records~ \n");
printf("----------------------------------\n");
for(j=1; j<=i/8; j++)
printf("█");
cout<<jz[xxxx]<<endl;
printf("----------------------------------\n");
}
printf("Delete the success.");
Sleep(1000);
exit(0);
}
if(ch=='N'||ch=='n')
continue;
}
}
return 0;
}
void hidden() {
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cci;
GetConsoleCursorInfo(hOut,&cci);
cci.bVisible=0;
SetConsoleCursorInfo(hOut,&cci);
return;
}
int hqzy() {
MessageBox(NULL,"The game need to get access to local resources \n agree? (I am bored!)","Access to resources",MB_ICONEXCLAMATION|MB_OK);
return 0;
}
int p1kz() {
if(ch=='w'||ch=='s'||ch=='a'||ch=='d'
||ch=='W'||ch=='S'||ch=='A'||ch=='D')
ch1=ch;
if(ch=='a'||ch=='A') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x][y-1]!="■"&&a[x][y-1]!="▲") {
a[x][y]="▓";
y--;
a[x][y]="●";
m1++;
draw();
}
} else {
if(a[x][y-1]!="■"&&a[x][y-1]!="▲") {
a[x][y]="□";
if(a[x][y-1]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
}
case 1: {
m1+=20;
}
}
}
y--;
a[x][y]="●";
m1++;
draw();
}
}
}
if(ch=='d'||ch=='D') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x][y+1]!="■"&&a[x][y+1]!="▲") {
a[x][y]="▓";
y++;
a[x][y]="●";
m1++;
draw();
}
} else {
if(a[x][y+1]!="■"&&a[x][y+1]!="▲") {
a[x][y]="□";
if(a[x][y+1]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
}
case 1: {
m1+=20;
}
}
}
y++;
a[x][y]="●";
m1++;
draw();
}
}
}
if(ch=='w'||ch=='W') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x-1][y]!="■"&&a[x-1][y]!="▲") {
a[x][y]="▓";
x--;
a[x][y]="●";
m1++;
draw();
}
} else {
if(a[x-1][y]!="■"&&a[x-1][y]!="▲") {
a[x][y]="□";
if(a[x-1][y]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
}
case 1: {
m1+=20;
}
}
}
x--;
a[x][y]="●";
m1++;
draw();
}
}
}
if(ch=='s'||ch=='S') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x+1][y]!="■"&&a[x+1][y]!="▲") {
a[x][y]="▓";
x++;
a[x][y]="●";
m1++;
draw();
}
} else {
if(a[x+1][y]!="■"&&a[x+1][y]!="▲") {
a[x][y]="□";
if(a[x+1][y]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
}
case 1: {
m1+=20;
}
}
}
x++;
a[x][y]="●";
m1++;
draw();
}
}
}
if(ch=='v'||ch=='V') {
if(a[x][y-2]=="▲"
||a[x][y+2]=="▲"
||a[x-2][y]=="▲"
||a[x+2][y]=="▲"
||a[x-1][y-1]=="▲"
||a[x+1][y-1]=="▲"
||a[x-1][y+1]=="▲"
||a[x+1][y+1]=="▲"
||a[x][y-1]=="▲"
||a[x][y+1]=="▲"
||a[x-1][y]=="▲"
||a[x+1][y]=="▲") {
n2-=20;
m1+=2;
n2-=(l1-1)*2;
if(lev1==l1) {
lev1=0;
l1++;
}
lev1++;
draw();
}
}
if(ch=='b'||ch=='B') {
if(m1>=50) {
n1+=200;
m1-=50;
draw();
}
}
if(ch=='n'||ch=='N') {
if(m1>=100) {
n2-=150;
n1+=150;
m1-=100;
n2-=(l1-1)*10;
n1+=(l1-1)*10;
m1+=20;
m2-=20;
if(lev1==l1) {
lev1=0;
l1++;
}
lev1++;
draw();
}
}
if(ch=='f'||ch=='F') {
if(m1>=20) {
if(ch1=='w'||ch1=='W') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x-2][y]=="▓"||a[x-2][y]=="□") {
a[x][y]="▓";
x-=2;
a[x][y]="●";
m1-=20;
draw();
}
} else {
if(a[x-2][y]=="▓"||a[x-2][y]=="□"||a[x-2][y]=="∷") {
a[x][y]="□";
if(a[x-2][y]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
m1+=30;
}
case 1: {
m1+=30;
}
}
}
x-=2;
a[x][y]="●";
m1-=20;
draw();
}
}
}
if(ch1=='s'||ch1=='S') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x+2][y]=="▓"||a[x+2][y]=="□") {
a[x][y]="▓";
x+=2;
a[x][y]="●";
m1-=20;
draw();
}
} else {
if(a[x+2][y]=="▓"||a[x+2][y]=="□"||a[x+2][y]=="∷") {
a[x][y]="□";
if(a[x+2][y]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
m1+=30;
}
case 1: {
m1+=30;
}
}
}
x+=2;
a[x][y]="●";
m1-=20;
draw();
}
}
}
if(ch1=='a'||ch1=='A') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x][y-2]=="▓"||a[x][y-2]=="□") {
a[x][y]="▓";
y-=2;
a[x][y]="●";
m1-=20;
draw();
}
} else {
if(a[x][y-2]=="▓"||a[x][y-2]=="□"||a[x][y-2]=="∷") {
a[x][y]="□";
if(a[x][y-2]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
m1+=30;
}
case 1: {
m1+=30;
}
}
}
y-=2;
a[x][y]="●";
m1-=20;
draw();
}
}
}
if(ch1=='d'||ch1=='D') {
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
if(a[x][y+2]=="▓"||a[x][y+2]=="□") {
a[x][y]="▓";
y+=2;
a[x][y]="●";
m1-=20;
draw();
}
} else {
if(a[x][y+2]=="▓"||a[x][y+2]=="□"||a[x][y+2]=="∷") {
a[x][y]="□";
if(a[x][y+2]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n1+=50;
m1+=30;
}
case 1: {
m1+=30;
}
}
}
y+=2;
a[x][y]="●";
m1-=20;
draw();
}
}
}
}
}
if(ch=='g'||ch=='G') {
if(m1>=70) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[x+1][y]!="■") {
a[p][q]="▓";
p=x+1;
q=y;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
if(a[x-1][y]!="■") {
a[p][q]="▓";
p=x-1;
q=y;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
if(a[x][y+1]!="■") {
a[p][q]="▓";
p=x;
q=y+1;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
if(a[x][y-1]!="■") {
a[p][q]="▓";
p=x;
q=y-1;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
} else {
if(a[x+1][y]!="■") {
a[p][q]="□";
p=x+1;
q=y;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
if(a[x-1][y]!="■") {
a[p][q]="□";
p=x-1;
q=y;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
if(a[x][y+1]!="■") {
a[p][q]="□";
p=x;
q=y+1;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
if(a[x][y-1]!="■") {
a[p][q]="□";
p=x;
q=y-1;
a[p][q]="▲";
m1-=70;
n2-=100;
return 0;
}
}
}
}
return 0;
}
int p2kz() {
if(ch==72||ch==80||ch==75||ch==77)
ch2=ch;
if(ch==72) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p-1][q]!="■"&&a[p-1][q]!="●") {
a[p][q]="▓";
p--;
a[p][q]="▲";
m2++;
draw();
}
} else {
if(a[p-1][q]!="■"&&a[p-1][q]!="●") {
a[p][q]="□";
if(a[p-1][q]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
}
case 1: {
m2+=20;
}
}
}
p--;
a[p][q]="▲";
m2++;
draw();
}
}
}
if(ch==75) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p][q-1]!="■"&&a[p][q-1]!="●") {
a[p][q]="▓";
q--;
a[p][q]="▲";
m2++;
draw();
}
} else {
if(a[p][q-1]!="■"&&a[p][q-1]!="●") {
a[p][q]="□";
if(a[p][q-1]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
}
case 1: {
m2+=20;
}
}
}
q--;
a[p][q]="▲";
m2++;
draw();
}
}
}
if(ch==80) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p+1][q]!="■"&&a[p+1][q]!="●") {
a[p][q]="▓";
p++;
a[p][q]="▲";
m2++;
draw();
}
} else {
if(a[p+1][q]!="■"&&a[p+1][q]!="●") {
a[p][q]="□";
if(a[p+1][q]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
}
case 1: {
m2+=20;
}
}
}
p++;
a[p][q]="▲";
m2++;
draw();
}
}
}
if(ch==77) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p][q+1]!="■"&&a[p][q+1]!="●") {
a[p][q]="▓";
q++;
a[p][q]="▲";
m2++;
draw();
}
} else {
if(a[p][q+1]!="■"&&a[p][q+1]!="●") {
a[p][q]="□";
if(a[p][q+1]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
}
case 1: {
m2+=20;
}
}
}
q++;
a[p][q]="▲";
m2++;
draw();
}
}
}
if(ch=='1') {
if(a[p][q-1]=="●"
||a[p][q+1]=="●"
||a[p-1][q]=="●"
||a[p+1][q]=="●") {
n1-=20;
m2+=2;
n1-=(l2-1)*2;
if(lev2==l2) {
lev2=0;
l2++;
}
lev2++;
draw();
}
}
if(ch=='2') {
if(m2>=50) {
n2+=200;
m2-=50;
draw();
}
}
if(ch=='3') {
if(m2>=100) {
n1-=200;
m2-=100;
n1-=(l2-1)*20;
if(lev2==l2) {
lev2=0;
l2++;
}
lev2++;
draw();
}
}
if(ch=='4') {
if(m2>=20) {
if(ch2==72) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p-2][q]=="▓"||a[p-2][q]=="□") {
a[p][q]="▓";
p-=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
} else {
if(a[p-2][q]=="▓"||a[p-2][q]=="□"||a[p-2][q]=="∷") {
a[p][q]="□";
if(a[p-2][q]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
m2+=30;
}
case 1: {
m2+=30;
}
}
}
p-=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
}
}
if(ch2==80) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p+2][q]=="▓"||a[p+2][q]=="□") {
a[p][q]="▓";
p+=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
} else {
if(a[p+2][q]=="▓"||a[p+2][q]=="□"||a[p+2][q]=="∷") {
a[p][q]="□";
if(a[p+2][q]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
m2+=30;
}
case 1: {
m2+=30;
}
}
}
p+=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
}
}
if(ch2==75) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p][q-2]=="▓"||a[p][q-2]=="□") {
a[p][q]="▓";
q-=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
} else {
if(a[p][q-2]=="▓"||a[p][q-2]=="□"||a[p][q-2]=="∷") {
a[p][q]="□";
if(a[p][q-2]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
m2+=30;
}
case 1: {
m2+=30;
}
}
}
q-=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
}
}
if(ch2==77) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
if(a[p][q+2]=="▓"||a[p][q+2]=="□") {
a[p][q]="▓";
q+=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
} else {
if(a[p][q+2]=="▓"||a[p][q+2]=="□"||a[p][q+2]=="∷") {
a[p][q]="□";
if(a[p][q+2]=="∷") {
srand((unsigned)time(NULL));
switch(rand()%2) {
case 0: {
n2+=50;
m2+=30;
}
case 1: {
m2+=30;
}
}
}
q+=2;
a[p][q]="▲";
m1++;
m2-=20;
draw();
}
}
}
}
}
if(ch=='5') {
if(m2>=70) {
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
a[p][q]="▓";
p=2;
q=17;
a[p][q]="▲";
m2-=70;
draw();
} else {
a[p][q]="□";
p=2;
q=17;
a[p][q]="▲";
m2-=70;
draw();
}
}
}
return 0;
}
void renji() {
if(n2<=200) {
if(!(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17)) {
if(m2>=70) {
ch='5';
p2kz();
return;
}
} else {
return;
}
}
if(a[p][q-1]=="●"
||a[p][q+1]=="●"
||a[p-1][q]=="●"
||a[p+1][q]=="●") {
ch='1';
p2kz();
return;
}
if(n2<=900) {
if(m2>=50) {
ch='2';
p2kz();
return;
}
}
if(n2>=600) {
if(m2>=100) {
ch='3';
p2kz();
return;
}
}
renji_gress();
if(x<p) {
if(a[p-1][q]=="■") {
if(m2>=20) {
ch2=UP;
ch='4';
}
} else {
ch=UP;
}
p2kz();
if(p!=p2||q!=q2) {
p2=p;
q2=q;
return;
} else {
renji_suiji();
return;
}
}
if(x>p) {
if(a[p+1][q]=="■") {
if(m2>=20) {
ch2=DOWN;
ch='4';
}
} else {
ch=DOWN;
}
p2kz();
if(p!=p2||q!=q2) {
p2=p;
q2=q;
return;
} else {
renji_suiji();
return;
}
}
if(y<q) {
if(a[p][q-1]=="■") {
if(m2>=20) {
ch2=LEFT;
ch='4';
}
} else {
ch=LEFT;
}
p2kz();
if(p!=p2||q!=q2) {
p2=p;
q2=q;
return;
} else {
renji_suiji();
return;
}
}
if(y>q) {
if(a[p][q+1]=="■") {
if(m2>=20) {
ch2=RIGHT;
ch='4';
}
} else {
ch=RIGHT;
}
p2kz();
if(p!=p2||q!=q2) {
p2=p;
q2=q;
return;
} else {
renji_suiji();
return;
}
}
return;
}
void renji_suiji() {
srand((unsigned)time(NULL));
switch(rand()%4) {
case 0: {
ch=UP;
p2kz();
p2kz();
break;
}
case 1: {
ch=DOWN;
p2kz();
p2kz();
break;
}
case 2: {
ch=LEFT;
p2kz();
p2kz();
break;
}
case 3: {
ch=RIGHT;
p2kz();
p2kz();
break;
}
}
}
void renji_gress() {
if(a[p-2][q]=="∷") {
if(a[p-1][q]=="■") {
if(m2>=30) {
ch2=UP;
ch='4';
p2kz();
return;
}
}
}
if(a[p+2][q]=="∷") {
if(a[p+1][q]=="■") {
if(m2>=30) {
ch2=DOWN;
ch='4';
p2kz();
return;
}
}
}
if(a[p][q-2]=="∷") {
if(a[p][q-1]=="■") {
if(m2>=30) {
ch2=LEFT;
ch='4';
p2kz();
return;
}
}
}
if(a[p][q+2]=="∷") {
if(a[p][q+1]=="■") {
if(m2>=30) {
ch2=RIGHT;
ch='4';
p2kz();
return;
}
}
}
if(a[p-1][q]=="∷") {
ch=UP;
p2kz();
return;
}
if(a[p+1][q]=="∷") {
ch=DOWN;
p2kz();
return;
}
if(a[p][q-1]=="∷") {
ch=LEFT;
p2kz();
return;
}
if(a[p][q+1]=="∷") {
ch=RIGHT;
p2kz();
return;
}
}
int main() {
if(1) {
hidden();
jz[1]="▏";
jz[2]="▎";
jz[3]="▍";
jz[4]="▌";
jz[5]="▋";
jz[6]="▊";
jz[7]="▉";
jz[0]="";
}
hqzy();
for(i=1; i<=136; i++) {
xxxx=i%8;
COORD pos = {0, 0};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("Are entering a square in the world~ Loading...\n");
printf("-------------------------------------------------\n");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
for(j=1; j<=i/8; j++)
printf("█");
cout<<jz[xxxx]<<endl;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
printf("----------------------------------\n");
}
printf("Initialize the...");
Sleep(1000);
while(1) {
n1=1000;
m1=10;
n2=1000;
m2=10;
l1=1;
l2=1;
lev1=0;
lev2=0;
zcd();
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17
||x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
a[x][y]="▓";
} else {
a[x][y]="□";
}
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17
||p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
a[p][q]="▓";
} else {
a[p][q]="□";
}
x=18;
y=1;
p=2;
q=17;
a[4][6]=a[4][10]=a[4][11]=a[4][12]=a[5][10]=a[5][11]=a[6][10]=a[7][3]=a[7][15]=a[8][14]=a[8][15]=a[9][13]=a[9][14]=a[9][15]=a[13][3]=a[12][3]=a[12][4]=a[11][3]=a[11][4]=a[11][5]=a[14][8]=a[15][7]=a[15][8]=a[16][6]=a[16][7]=a[16][8]=a[16][12]=a[13][15]="∷";
a[x][y]="●";
a[p][q]="▲";
t=time(NULL); //开始时间
t1=(int)time(NULL); //当前时间
t2=(int)time(NULL)-t; //扣血时间
t3=(int)time(NULL)-t; //当前时间-开始时间:1 or 0
t5=(double)time(NULL); //
draw();
while(n1>0&&n2>0) {
t1=(int)time(NULL);
t3=(int)time(NULL)-t;
t6=(double)time(NULL)-t5;
if((time(NULL)-t)/60==10) {
draw();
printf(" Game over");
while(1) {
ch=getch();
if(ch=='=') {
return 0;
}
}
}
if(t2!=(int)time(NULL)-t) {
draw();
t2=(int)time(NULL)-t;
if(x==2&&y==15||x==2&&y==16||x==2&&y==17
||x==3&&y==15||x==3&&y==16||x==3&&y==17
||x==4&&y==16||x==4&&y==17) {
n1-=50;
}
if(x==16&&y==1||x==16&&y==2
||x==17&&y==1||x==17&&y==2||x==17&&y==3
||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
n1+=50;
}
if(p==2&&q==15||p==2&&q==16||p==2&&q==17
||p==3&&q==15||p==3&&q==16||p==3&&q==17
||p==4&&q==16||p==4&&q==17) {
n2+=50;
}
if(p==16&&q==1||p==16&&q==2
||p==17&&q==1||p==17&&q==2||p==17&&q==3
||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
n2-=50;
}
}
if(t3%60==0) {
srand((unsigned)time(NULL));
switch(rand()%28) {
case 0:
if(a[4][6]=="□")a[4][6]="∷";
case 1:
if(a[4][10]=="□")a[4][10]="∷";
case 2:
if(a[4][11]=="□")a[4][11]="∷";
case 3:
if(a[4][12]=="□")a[4][12]="∷";
case 4:
if(a[5][10]=="□")a[5][10]="∷";
case 5:
if(a[5][11]=="□")a[5][11]="∷";
case 6:
if(a[6][10]=="□")a[6][10]="∷";
case 7:
if(a[7][3]=="□")a[7][3]="∷";
case 8:
if(a[7][15]=="□")a[7][15]="∷";
case 9:
if(a[8][14]=="□")a[8][14]="∷";
case 10:
if(a[8][15]=="□")a[8][15]="∷";
case 11:
if(a[9][13]=="□")a[9][13]="∷";
case 12:
if(a[9][14]=="□")a[9][14]="∷";
case 13:
if(a[9][15]=="□")a[9][15]="∷";
case 14:
if(a[13][3]=="□")a[13][3]="∷";
case 15:
if(a[12][3]=="□")a[12][3]="∷";
case 16:
if(a[12][4]=="□")a[12][4]="∷";
case 17:
if(a[11][3]=="□")a[11][3]="∷";
case 18:
if(a[11][4]=="□")a[11][4]="∷";
case 19:
if(a[11][5]=="□")a[11][5]="∷";
case 20:
if(a[14][8]=="□")a[14][8]="∷";
case 21:
if(a[15][7]=="□")a[15][7]="∷";
case 22:
if(a[15][8]=="□")a[15][8]="∷";
case 23:
if(a[16][6]=="□")a[16][6]="∷";
case 24:
if(a[16][7]=="□")a[16][7]="∷";
case 25:
if(a[16][8]=="□")a[16][8]="∷";
case 26:
if(a[16][12]=="□")a[16][12]="∷";
case 27:
if(a[13][15]=="□")a[13][15]="∷";
}
draw();
}
if(t6>=0.125) {//速度调节
renji();
t5+=0.125;
}
if(kbhit()) {
ch=getch();
p1kz();
if(ch=='p') {
zanting();
t4=t1;
do {
ch=getch();
} while(ch!='p');
t=t+(int)time(NULL)-t4;
system("cls");
draw();
continue;
}
if(ch=='=') {
exit(0);
}
if(ch=='q') {
m1++;
draw();
}
if(ch=='6') {
m2++;
draw();
}
}
}
draw();
if(n2==0) {
printf(" ●Player 1 -");
while(1) {
ch=getch();
if(ch=='=') {
break;
}
}
} else {
printf(" ▲Player 2 -");
while(1) {
ch=getch();
if(ch=='=') {
break;
}
}
}
}
return 0;
}