NDCC创作团队第一代CUDMOS体验先行版()具有休眠、壁纸颜色更换、游戏、高精度计算等功能,具体如下表:
◼:自带 ◻:加装 | CUDMOS领先体验版 | CUDMOS领先升级版 | CUDMOS速度秒杀版 | CUDMOS流年风度版 | CUDMOS顶配旗舰四核创造版 |
计算机内部结构 | 计算机内部结构 | 计算机内部结构 | 计算机内部结构 | 计算机内部结构 | 计算机内部结构 |
运算连接器(内核模式) | 三核 | 三核 | 三核 | 三核 | 四核 |
内核数量 | 3 | 3 | 3 | 3 | 4 |
内核等级 | CPTL-7/CPTL-6/CPTL-6 | CPTL-7/CPTL-6/CPTL-6 | CPTL-7/CPTL-7/CPTL-7 | CPTL-7/CPTL-7/CPTL-8 | 暂未公开 |
内核名称 | DITD-8192 | DITD-8192 | DITD-8192smaller辅ALLMA-606 | DITD-8192smaller辅ALLMA-606 | 暂未公开 |
内核算(处理)力 | 10^9+2^7+2^6+2^5/s | 10^9+2^5/s | 10^9+2^6/s | 10^9+2^6/s | 暂未公开 |
计算机功能 | 计算机功能 | 计算机功能 | 计算机功能 | 计算机功能 | 暂未公开 |
外部连接 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
内部游戏 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
AI | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
AI等级 | AIL2 | AIL2 | AIL2 | AIL2 | 暂未公开 |
AI浏览 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
编译器 | ◻ | ◻ | ◻ | ◻ | 暂未公开 |
编译辅助 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
编译器名称 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
可调节性能模式 | 3种(节能/ALLMA、DITD双核/双ALLMA、DIT三核) | 3种(节能/ALLMA、DITD双核/双ALLMA、DIT三核) | 3种(节能/ALLMA、DITD双核/双ALLMA、DIT三核) | 3种(节能/ALLMA、DITD双核/双ALLMA、DIT三核) | 暂未公开 |
微计算机定时休眠 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
微计算机自适应不定时休眠 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
桌面颜色可调功能 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
彩色显示 | ◼ | ◼ | ◼ | ◼ | 暂未公开 |
PCL快速路径查找启动 | ◻ | ◻ | ◼ | ◼ | 暂未公开 |
代码如下,版权所有,盗权必究!
初始密码:888888
#include<bits/stdc++.h>
#pragma once
#include<iostream>
#include<Windows.h>
#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);
}
}
using namespace std;
int s1 = 0;
string s = "888888";
void out_10ms(string& s_out_70ms) {
int l1 = s_out_70ms.size();
for (int i = 0; i < l1; i++) {
cout << s_out_70ms[i];
Sleep(5);
}
Sleep(0);
cout << endl;
}
void mima(string a) {
string cc;
system("cls");
int i = 1;
while (i != 0) {
cout << "请输入旧密码:";
getline(cin, s);
if (s == a) {
break;
}
}
i = 1;
while (i != 0) {
cout << "请设定新密码:";
getline(cin, s);
cout << "请确认新密码:";
getline(cin, cc);
if (s == cc) {
break;
}
}
return;
}
void jdt() {
string c1 = "■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■" ; //进度条
out_10ms(c1);
}
class Compute {
public:
Compute() {};
~Compute() {};
virtual void compute(string& strA, string& strB) = 0;
};
class Add : public Compute { //这是加法类
public:
virtual void compute(string& strA, string& strB) override;
};
void Add::compute(string& strA, string& strB) {
vector<int> a; //第一个容器存放第一个数
vector<int> b; //第二个容器存放第二个数
vector<int> sum; //和容器存放俩数之和
int index = 0; //设置进位
//首先将俩个数保存在容器中
//并且是逆序保存 为了迎合容器的Pushback添加函数
for (int i = strA.size() - 1; i >= 0; i--) {
a.push_back(strA[i] - '0');
}
for (int i = strB.size() - 1; i >= 0; i--) {
b.push_back(strB[i] - '0');
}
//然后开始加法算法,对两个数逐位相加
//首先我们不管俩个数的长度大小,一直加到最短的那个数完全被加
for (int i = 0; i < strA.size() && i < strB.size(); i++) {
sum.push_back((a[i] + b[i] + index) % 10); //将逐位相加的结果储存在sum容器中
index = (a[i] + b[i] + index) / 10; //满10则进行进位
}
//然后开始考虑长度比较长的数的多余位置没有参加算法
if (strA.size() > strB.size()) {
//这是A的长度比b大的情况,这时候已经计算到了b的长度位上
for (int i = strB.size(); i < strA.size(); i++) {
sum.push_back((index + a[i]) % 10);
index = (a[i] + index) / 10;
}
}
if (strB.size() > strA.size()) {
//这是B的长度比A大的情况,这时候已经计算到了a的长度位上
for (int i = strA.size(); i < strB.size(); i++) {
sum.push_back((index + b[i]) % 10);
index = (index + b[i]) / 10;
}
}
//计算完毕后判断进位 如果进位不为空那么还要往前进1
if (index != 0) {
sum.push_back(1);
index = 0; //并且清空进位
}
//到这里已经完成加法算法
//下面为输出代码
//由于使用的容器较多,我选择使用迭代器输出sum vector容器里的数据 即为最后的结果
cout << strA << "+" << strB << "=";
for (vector<int>::iterator it = sum.end() - 1; it >= sum.begin(); it--) {
cout << *it;
if (it == sum.begin()) {
break;
}
}
cout << endl;
//最后一步使用vector容器与自身交换 用来清空多余的无用内存
vector<int>().swap(a);
vector<int>().swap(b);
vector<int>().swap(sum);
//函数结束
}
class Sub : public Compute { //这是减法类
public:
virtual void compute(string& strA, string& strB) override;
int Comparevector(vector<int>a, vector<int>b);//声明减法内置比较函数
};
void Sub::compute(string& strA, string& strB) { //对基类计算函数进行重写
vector<int> a; //容器a存入第一个数据
vector<int> b; //容器b存入第二个数据
vector<int> difvalue; //差值容器存入最后结果
int lend = 0; //定义借位数
//添加这一步是若两数相等则直接给结果,不需要经过算法;
if (strA == strB) {
difvalue.push_back(0);
goto flag;
}
//因为减法运算还是从低位开始 那么我们还是 将数据倒序存入
for (int i = strA.size() - 1; i >= 0; i--) {
a.push_back(strA[i] - '0');
}
for (int i = strB.size() - 1; i >= 0; i--) {
b.push_back(strB[i] - '0');
}
//下面开始减法算法
//我选择使用绝对值算法 -> 首先放正负到一边,计算之前判断谁大谁小,保证永远使用大数减小数,最后再进行符号讨论;
if (Comparevector(a, b) != 0) {
//首先计算位数相同的地方
for (int i = 0; i < strB.size(); i++) {
if (a[i] < b[i]) {
for (int j = i + 1; j < strA.size(); j++) {
//向高位借位,如果高位不为0,则可以正常借到;
if (a[j] != 0) {
lend = 1;
a[j] -= 1;
break;
} //如果高位为0,则向更高位借,0上有借位看为9;
else {
a[j] = 9;
}
}
difvalue.push_back(lend * 10 + a[i] - b[i]);
lend = 0;
} else {
difvalue.push_back(a[i] - b[i]);
}
}
for (int i = strB.size(); i < strA.size(); i++) {
difvalue.push_back(a[i]);
}
} else {
//之后算法和之前相同
//首先计算位数相同的地方
for (int i = 0; i < strA.size(); i++) {
if (b[i] < a[i]) {
for (int j = i + 1; j < strB.size(); j++) {
//向高位借位,如果高位不为0,则可以正常借到;
if (b[j] != 0) {
lend = 1;
b[j] -= 1;
break;
} //如果高位为0,则向更高位借,0上有借位看为9;
else {
b[j] = 9;
}
}
difvalue.push_back(lend * 10 + b[i] - a[i]);
lend = 0;
} else {
difvalue.push_back(b[i] - a[i]);
}
}
for (int i = strA.size(); i < strB.size(); i++) {
difvalue.push_back(b[i]);
}
}
//删 除 前 导 0
for (int i = difvalue.size() - 1; i >= 0; i--) {
if (difvalue[i] == 0) {
difvalue.erase(difvalue.begin() + i);
} else {
break;
}
}
//减法算法结束
//下面为用迭代器输出
flag:
cout << strA << "-" << strB << "=";
//如果A比B小需要输出负号
if (Comparevector(a, b) == 0) {
cout << "-";
}
for (vector<int>::iterator it = difvalue.end() - 1; it >= difvalue.begin(); it--) {
cout << *it;
if (it == difvalue.begin()) {
break;
}
}
cout << endl;
//清内存
vector<int>().swap(a);
vector<int>().swap(b);
vector<int>().swap(difvalue);
}
int Sub::Comparevector(vector<int>a, vector<int>b) { //比较俩个vector容器内置的数的大小,传入的容器存的数是倒序的!
//a比b打则返回1 a比b小则返回0 a与b等于则返回3
//首先将数变成正序
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
if (a.size() > b.size())
return 1;
if (a.size() < b.size())
return 0;
if (a.size() == b.size()) {
for (int i = 0; i < a.size(); i++) {
if (a[i] > b[i])
return 1;
if (a[i] < b[i])
return 0;
}
return 3;
}
}
class Mul : public Compute { //这是乘法类
virtual void compute(string& strA, string& strB) override;
vector<int> Muladd(vector<int>& a, vector<int>& b); //定义 乘法内置加法函数
};
void Mul::compute(string& strA, string& strB) {
vector<int> a; // a容器中存放第一个数
vector<int> b; // b容器中存放第二个数
vector<int> product; // product容器中存放俩数的乘积
vector<int> temp; // temp容器为工具容器 用于储存 计算过程中的步骤
int index = 0; //定义进位为0 Index
//乘法也是从小位开始算起 所以也采用逆序储存逆序输出
for (int i = strA.size() - 1; i >= 0; i--) {
a.push_back(strA[i] - '0');
}
for (int i = strB.size() - 1; i >= 0; i--) {
b.push_back(strB[i] - '0');
}
for (int i = 0; i < b.size(); i++) {
for (int j = 0; j < a.size(); j++) {
temp.push_back((a[j] * b[i] + index) % 10);
index = (a[j] * b[i] + index) / 10;
}
for (int j = 0; j < i; j++) {
temp.insert(temp.begin(), 0);
}
//执行加法 加法执行完毕后清空temp容器
product = Muladd(temp, product);
temp.clear();
}
if (index != 0) {
product.push_back(index);
}
//乘法计算结束
//接下来为 迭代器输出储存乘积的容器 product
cout << strA << "*" << strB << "=";
for (vector<int>::iterator it = product.end() - 1; it >= product.begin(); it--) {
cout << *it;
if (it == product.begin()) {
break;
}
}
cout << endl;
//输出完毕 接下来进行容器清内存
vector<int>().swap(a);
vector<int>().swap(b);
vector<int>().swap(temp);
vector<int>().swap(product);
}
//对乘法内置加法函数的类外定义
vector<int> Mul::Muladd(vector<int>& a, vector<int>& b) {
//这个函数是实现两个容器的大数数据相加 与加法类一致
int index = 0; //设置进位
vector<int> sum; //设置存放俩数和的容器 最后需要返回这个容器
for (int i = 0; i < a.size() && i < b.size(); i++) {
sum.push_back((index + a[i] + b[i]) % 10);
index = (a[i] + b[i] + index) / 10;
}
//相等的位数已经相加完毕
//接下来相加 独立的位数
if (a.size() > b.size()) {
for (int i = b.size(); i < a.size(); i++) {
sum.push_back((a[i] + index) % 10);
index = (a[i] + index) / 10;
}
}
if (a.size() < b.size()) {
for (int i = a.size(); i < b.size(); i++) {
sum.push_back((b[i] + index) % 10);
index = (b[i] + index) / 10;
}
}
if (index != 0) {
sum.push_back(1);
}
//计算完毕 返回算出的和容器vector
//注意 这时候的 vector 仍然是小数在左。大数在右
return sum;
}
class Division : public Compute { //除法类
virtual void compute(string& strA, string& strB) override;
vector <int> divsub(vector<int>a, vector<int>b);//声明除法内置减法运算 运行的是第一个数减去第二个数
int Compatrvector(vector<int>& a, vector<int>& b);//声明比较容器储存的数的大小的函数
};
void Division::compute(string& strA, string& strB) {
vector<int>a;//a容器存放第一个数
vector<int>b;//b容器存放第二个数
vector<int>div;//div容器存放商
//读取环节
//因为除法的运算是从高位往低位进行运算 那么我们选择正向输入以方便运算
for (int i = 0; i < strA.size(); i++) {
a.push_back(strA[i] - '0');
}
for (int i = 0; i < strB.size(); i++) {
b.push_back(strB[i] - '0');
}
//开始除法算法
//1.将被除数位数用0补齐使得其长度和除数的长度相等
//为了保留ab容器 利用复制构造创建新容器
vector<int> B(b);
vector<int> temp(a);
//首先可以直接判断 俩数大小关系 如果前小于后直接输出0,没必要进行以下算法
if (Compatrvector(a, b) == 0) {
cout << strA << "/" << strB << "=" << 0;
return;
}
if (b.size() == a.size()) {
int j = 0;
while (Compatrvector(temp, B) != 0) {
temp = divsub(temp, B);
j++;
}
cout << strA << "/" << strB << "=" << j << endl;
return;
}
int i;
for (int i = B.size(); i < a.size(); i++) {
B.push_back(0);
}
//2.判断补齐后的被除数与除数的大小关系(过程中不断更新除数,即每次差求商的余数)
//->如果被除数的数值大于除数的数值 那么对被补齐的被除数进行退位操作,即退掉末位0 (似乎可以使用肯尼汉算法)
//->如果被除数的数值小于除数的数值 那么进行除数循环减被除数求商 直到除数小于被除数
//对以上操作进行循环
//退出循环的条件 :补足的0已经退完 并且此时的除数小于被除数
while (B.size() > b.size()) {
//这个只限于长度不相等 如果长度相等直接做减法很快得出答案!
if (Compatrvector(B, temp) == 1) {
B.pop_back();
if (Compatrvector(B, temp) == 1) {
div.push_back(0);
}
}
if (Compatrvector(B, temp) != 1) {
for (i = 1; i != 1.1; i++) {
temp = divsub(temp, B);
if (Compatrvector(temp, B) == 0) {
div.push_back(i);
i = 1;
break;
}
}
}
}
//除法算法结束
//接下来为迭代器输出
cout << strA << "/" << strB << "=";
for (vector<int>::iterator it = div.begin(); it < div.end(); it++) {
cout << *it;
}
//清理内存
vector<int>().swap(a);
vector<int>().swap(b);
vector<int>().swap(temp);
vector<int>().swap(div);
}
vector<int>Division::divsub(vector<int>a, vector<int>b) { //为了防止参数被改变 采用 值传递
vector<int> difvalue;
//既然在除法里面的减法合理,那么一定是大数减小数 这里默认a>b
//因为传进来的容器是正序的 所以为了计算方便 我们需要做倒序处理
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
int lend = 0;//初始化借位
//既然已经默认了 a>b 那么a的位数一定大于等于b的位数
for (int i = 0; i < b.size(); i++) {
if (a[i] < b[i]) {
for (int j = i + 1; j < a.size(); j++) { //a向高位非0数借位
if (a[j] != 0) {
a[j] -= 1;
lend = 1;
break;
} else {
a[j] = 9;//向0借位为9
}
}
}
difvalue.push_back(lend * 10 + a[i] - b[i]);
lend = 0;
}
//接下来为a多出的位数
for (int i = b.size(); i < a.size(); i++) {
difvalue.push_back(a[i]);
}
//然后要让差恢复正常顺序
reverse(difvalue.begin(), difvalue.end());
for (int i = 0; i != 1.1; i++) {
//删除前导0
if (difvalue[0] == 0 && difvalue.size() != 1) {
difvalue.erase(difvalue.begin(), difvalue.begin() + 1);
} else {
break;
}
}
return difvalue;
}
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include<algorithm>
int Division::Compatrvector(vector<int>& a, vector<int>& b)//这是内置在除法类中的比较函数 用于比较俩个正向储存的容器数的大小
//若a>b 则返回1 小于则返回0 相等则返回3
{
if (a.size() > b.size())
return 1;
if (a.size() < b.size())
return 0;
if (a.size() == b.size()) {
for (int i = 0; i < a.size(); i++) {
if (a[i] > b[i])
return 1;
if (a[i] < b[i])
return 0;
}
return 3;
}
}
void CUDMOS() {
string d1 = " ■■■ ■ ■ ■■■■ ■ ■ ■■■ SSSSSS ■■■■ ALLMA707领先体验版";
string d2 = "■ ■ ■ ■ ■ ■■ ■■ ■ ■ S ■■■■";
string d3 = "■ ■ ■ ■ ■ ■ ■ ■ ■ ■ SSSS ■■■■■";
string d4 = "■ ■ ■ ■ ■ ■ ■ ■ ■ ■ S ■■■■";
string d5 = "■ ■ ■ ■ ■ ■ ■ ■ ■ ■ S ■■■■";
string d6 = " ■■■ ■■■ ■■■■ ■ ■ ■■■ SSSSSS ■■■";
system("color F");
string c, n, t;
int m, o, i = 1, p;
Sleep(500);
cout << endl;
out_10ms(d1);
system("color 10");
out_10ms(d2);
system("color 11");
out_10ms(d3);
system("color 42");
out_10ms(d4);
system("color 53");
out_10ms(d5);
system("color 14");
out_10ms(d6);
system("color F");
cout << endl;
Sleep(3000);
}
void jiafa() {
int q = 0;
int a[100];
int p;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入你要几位数相加" << endl;
cin >> p;
for (int i = 0; i < p; i++) {
cin >> a[i];
};
cout << "开始计算了哈" << endl;
for (int i = 0; i < p; i++) {
q = q + a[i];
};
cout << "结果是" << q << endl;
}
void jianfayunsaun() {
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "你想让谁做被减数" << endl;
int a;
cin >> a;
cout << "你想减谁" << endl;
int b;
cin >> b;
int sum = a - b;
cout << "结果是" << sum << endl;
}
void runnian() {
int nian;
int p = 0;
string s1 = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s1);
cout << "想判断某年是什么年就输入你想查的那一年" << endl;
cin >> nian;
if (nian % 4 == 0) {
cout << "今年是闰年" << endl; //就是简单的if else
} else {
cout << "今年不是闰年" << endl;
}
}
void syuan() {
double pi = 3.14;
long long r;
double s = 0;
string s1 = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s1);
cout << "请输入你要求的圆的半径" << endl; //好像比加法还简单
cin >> r;
s = r * r * pi;
cout << "圆的面积是" << s << endl;
}
void jishuhe() {
int n;
int a = 0;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "输入n的值" << endl;
cin >> n;
for (int i = 1; i <= n; i++) {
if (i % 2 == 1) { //奇数和还有偶数和是一样的我只要从1到我输入的数之间的数都算进去,把符合的加上就好了
a += i;
}
}
cout << "前N项和" << a << endl;
}
void oushuhe() {
int n;
int a = 0;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "输入n的值" << endl;
cin >> n;
for (int i = 2; i <= n; i++) { //和上边的那个一样啊
if (i % 2 == 0) {
a += i;
}
}
cout << "前N项和" << a << endl;
}
void dao1_3beishu() {
int a;
int q = 1;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入一个数" << endl;
cin >> a;
do {
if (q % 3 == 0) {
cout << " " << q << endl;
};
q++;
} while (q <= a);
}
void bei3he5zhengchushu() {
int a;
int b;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入两个数" << endl;
cin >> a;
cin >> b;
int i = a + 1;
do {
int p = i % 3;
int q = i % 5;
if (p == 0 && q == 0) {
cout << i << endl;
break;
};
i++;
} while (i < b); //不可以a < b < c 不然会a < i变成1,从而使得无线循环
}
void shuixanhuashu() {
int p;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入一个数(可以输出这个数之前的水仙花数)" << endl;
cin >> p;
int n = 0;
do {
int a = n % 10;
int b = n % 100 / 10;
int c = n / 100; //只要会判断水仙花数把输入的数从一到n都算是和前边一样用if判断出来就行了
if (n == a * a * a + b * b * b + c * c * c) {
cout << n << endl;
}
n++;
} while (n < p);
}
void panduan() {
int a;
int b;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入两个数" << endl;
cin >> a;
cin >> b;
if (a > b) {
cout << "最大值是" << a << endl; //这个题emmmm。。很一般很一般
} else {
cout << "最大值是" << b << endl;
}
}
void maopao() {
int arr[100];
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入10个数字" << endl;
for (int i = 0; i < 10; i++) {
cin >> arr[i];
};
cout << "排序前的数字" << endl;
for (int i = 0; i < 9; i++) {
cout << arr[i] << " ";
}
cout << endl;
for (int i = 0; i < 9 - 1; i++) {
for (int j = 0; j < 9 - i - 1; j++) { //这个就是我第一次去时老师测吧,不难哈
if (arr[j] > arr[j + 1]) {
int temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
cout << "排序后" << endl;
for (int j = 0; j < 9; j++) {
cout << arr[j] << " ";
}
cout << endl;
}
void juzhenzhuanzhi() {
int a[3][4];
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 4; j++) { // 这个最核心的思想是要把他的行列互换搞清楚就简单了
cin >> a[i][j];
}
};
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 3; j++) {
cout << a[j][i] << " ";
};
cout << "\n" << endl;
};
}
void qiuduijiaoxianhe() {
int a[3][3];
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入数字以进行下一步" << endl; //我好像没啥好办法,直接让他们相加了
for (int i = 0; i < 3; i++) {
cin >> a[0][i];
};
cout << endl;
for (int i = 0; i < 3; i++) {
cin >> a[1][i];
};
for (int i = 0; i < 3; i++) {
cin >> a[2][i];
};
int p = a[0][0] + a[1][1] + a[2][2];
cout << "相加后的结果是" << p << endl;
}
void tongjidanci() {
char a[100];
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "请输入几个单词" << endl;
gets(a);
int sum = 0;
for (int i = 0; a[i] != '\0'; i++) {
if (a[i] != ' ' && (a[i + 1] == ' ' || a[i + 1] == '\0')) //这个主要是没学啊,我在网上学的,不过他们都是C,我用的C++
//开始介绍思想,就是明白后面会有一个\0作为系统自己加上的结束符号就解决了这道问题,可你之前没交,但测试的有着道题
{
sum++;
}
}
cout << sum << endl;
}
void chengfayunsuan() {
int a[100];
int q;
int p = 1;
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "你要让几位数相乘" << endl;
cin >> q;
cout << "请输入你要他们相乘的数" << endl; //就是乘法啥的和前边的加法啥的一样简单哈
for (int i = 0; i < q; i++) {
cin >> a[i];
};
for (int i = 0; i < q; i++) {
p *= a[i];
};
cout << "结果是" << p << endl;
}
void chufayunsuan() {
string s = "DIT-ES1986:请注意,任何参与运算数不要超过10^9+10";
out_10ms(s);
cout << "你想让谁做被除数" << endl;
int a;
cin >> a;
cout << "你想让谁做除数" << endl;
int b;
cin >> b;
int sum = a / b;
cout << "结果是" << sum << endl;
}
void bidaxiao() {
int a;
int b;
cout << "请输入两个数" << endl;
cin >> a;
cin >> b;
if (a > b) {
cout << "最大值是" << a << endl;
} else {
cout << "最大值是" << b << endl;
}
}
void xueshengpaixu() {
struct student {
string name;
int sno;
int score;
};
student student[10];
cout << "请输入学生姓名 学号 成绩" << endl;
for (int i = 0; i < 10; i++) {
cout << "请输入第" << i + 1 << "个学生的信息: ";
cin >> student[i].name >> student[i].sno >> student[i].score; //就麻烦点吧,要记住一体的属性前要加上这个属性所属的个体,不难
};
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9 - i; j++) {
if (student[j].score > student[j].score) { //平平无奇的冒泡排序
struct student temp = student[j];
student[j] = student[j + 1];
student[j + 1] = student[j];
};
};
} ;
for (int i = 0; i < 10; i++) {
cout << "第" << i + 1 << "个学生的名字是:" << student[i].name << " 第" << i + 1 << "个学生的学号是:" << student[i].sno << " 第" << i + 1 << "个学生的成绩是:" << student[i].score << endl;
};
int sum = 0;
for (int i = 0; i < 10; i++) {
sum += student[i].score;
};
int ave = sum / 10;
cout << "学生的平均成绩是" << sum << endl;
}
clock_t start, end;
int main() {
int bianyifuzhu = 0, AI = 0, waibulianjie = 0, bianyiqi = 0;
int shuimian = 0, shuimian1 = 0;
while (1) {
int xingneng = 2;
CUDMOS();
system("cls");
if (s1 == 0) {
mima(s);
}
if (s1 != 0) {
while (1) {
cout << "是否更改密码?";
cout << "('Y'or'N')";
char sda;
cin >> sda;
if (sda == 'Y') {
mima(s);
break;
} else if (sda == 'N') {
string ddddd;
getline(cin, ddddd);
if (ddddd == s) {
cout << "密码正确";
break;
} else cout << "密码错误";
}
}
}
while (1) {
system("cls");
string ccc = "低功率睡眠模式已启动";
if (shuimian == 1) {
system("cls");
shuimian1 = 0;
CUDMOS();
cout << "系统已恢复";
Sleep(1000);
system("cls");
}
if (xingneng == 3) cout << "ALLMA-707:ALLMA提醒,输入时间(分)开始睡眠,否则输入0" << endl;
if (xingneng >= 1) cout << "DITD-8192:系统提醒,在低频率使用时,建议您开启'低功率睡眠模式',以降低CPU占用率,是否立刻开启(0:关闭 1:休眠1分钟 2:休眠2分钟 3:休眠3分钟 4:休眠4分钟 5:休眠5分钟 以此类推 10000:自适应休眠)注:睡眠会还原部分功能" << endl;
cin >> shuimian;
if (shuimian != 0) {
system("cls");
xingneng = 1;
system("color 08");
cout << "ALLMA-707:";
out_10ms(ccc);
string d1 = " ■■■ ■ ■ ■■■■ ■ ■ ■■■ SSSSSS ■■■■";
string d2 = "■ ■ ■ ■ ■ ■■ ■■ ■ ■ S ■■■■";
string d3 = "■ ■ ■ ■ ■ ■ ■ ■ ■ ■ SSSS ■■■■■";
string d4 = "■ ■ ■ ■ ■ ■ ■ ■ ■ ■ S ■■■■";
string d5 = "■ ■ ■ ■ ■ ■ ■ ■ ■ ■ S ■■■■";
string d6 = " ■■■ ■■■ ■■■■ ■ ■ ■■■ SSSSSS ■■■";
string c, n, t;
int m, o, i = 1, p;
Sleep(500);
cout << endl;
out_10ms(d1);
//system("color 10");
out_10ms(d2);
//system("color 11");
out_10ms(d3);
//system("color 42");
out_10ms(d4);
//system("color 53");
out_10ms(d5);
//system("color 14");
out_10ms(d6);
//system("color F");
cout << endl;
if (shuimian != 10000) Sleep(60000 * shuimian);
if (shuimian == 10000) {
cout << "按任意键退出睡眠" << endl;
system("pause");
}
shuimian = 1;
shuimian1++;
continue;
}
if (bianyifuzhu == 1) {
cout << "ALLMA-707:编译辅助功能已介入TORS使用,加速器开始运行" << endl;
system("pause");
}
char v;
cout << "按'v'键回车查询用户手册,输入T继续并启用AI" << endl;
cin >> v;
cout << endl;
if (v == 'v') {
cout << "CUDMOS 2310款用户指导手册" << endl;
cout << "1.使用时仅限 DIT-ES1986 可使用语言,否则报错或退出!" << endl;
cout << "2.计算器模式仅限10^9以内计算,否则会溢出,若需高精度计算,请升级更高版本!" << endl;
cout << "3.该版本互动模式ACTIVE内容尚有缺陷,使用时会导致关闭根目录,请注意适当使用!" << endl;
cout << "4.请勿随意更改源码,可能造成内部崩溃!" << endl;
cout << "5.2310款第1代CUDMOS继承了AI使用以及编译环境,适当添加了部分辅助使用系统,在原有基础上升级了计算速度与计算范围" << endl;
cout << "由张翼德老师提供亿点点技术支持" << endl;
system("PAUSE");
} else if (v == 'T') {
if (AI == 0) {
cout << "尚未开启AI功能,请前往设置开启" << endl;
system("pause");
} else if (AI == 1) {
if (v == 'T') {
cout << "你好,我是小T,有什么可以帮到你的吗?" << endl;
while (v != 0) {
string iii;
cin >> iii;
if (iii == "no") {
cout << "好的,再见!";
Sleep(200);
break;
}
if (iii == "start_bilibili") {
cout << "即将为您打开哔哩哔哩,请稍后";
system("start https://www.bilibili.com/");
continue;
} else if (iii == "start_baidu") {
cout << "即将为您打开百度,请稍后";
system("start https://www.baidu.com/");
continue;
} else if (iii == "start_crazygames") {
cout << "即将为您打开crazy games,请稍后";
system("start https://www.crazygames.com/");
continue;
} else if (iii == "start_yinghuadongman") {
cout << "即将为您打开樱花动漫,请稍后";
system("start http://yhdm86.com/");
continue;
} else if (iii == "start_wzoi") {
cout << "即将为您打开WZOI,请稍后";
system("start https://wzoi.cc/");
continue;
}
if (iii == "start_csdn") {
cout << "即将为您打开CSDN,请稍后";
system("start https://www.csdn.net/");
continue;
} else if (iii == "C++") {
system("start https://oj.ipachong.com");
continue;
} else cout << "这超出了我的理解范围,您可以试着对我说:start_baidu(意为打开百度)";
}
}
}
system("cls");
jdt();
cout << "桌面" << endl;
cout << " " << "1.多功能计算器" << " " << endl;
cout << " " << "2.火柴人跑酷" << " " << endl;
cout << " " << "3.关机" << " " << endl;
cout << " " << "4.设置" << endl;
cout << " " << "5.MC(PCL版1.16.2)启动器" << endl;
jdt();
int m;
cin >> m;
if (m == 1) {
cout << "1.高精度计算" << endl;
cout << "2.多功能计算(非高精度)" << endl;
int sdd;
cin >> sdd;
if (sdd == 1) {
//首先询问用户需要输入的两个大数
string strA, strB;
char idea;
cout << "**************欢迎使用高精度计算器**************" << endl << endl;
cout << "**************输入E X E退出计算器**************" << endl << endl;
cout << "请输入你要计算的算式(符号数字之间由空格隔开)<示例:1空格+空格1>:" << endl;
flag:
cin >> strA >> idea >> strB;
if (strA == "E" && strB == "E" && idea == 'X') {
goto tp;
}
//计算大类我使用了多态 下面对函数进行调用 基类指针指向派生类
switch (idea) {
case '+': {
Compute* add = new Add;
add->compute(strA, strB);
if (add != NULL) {
delete add;
add = nullptr;
}
break;
}
case '-': {
Compute* sub = new Sub;
sub->compute(strA, strB);
if (sub != NULL) {
delete sub;
sub = nullptr;
}
break;
}
case '*': {
Compute* mul = new Mul;
mul->compute(strA, strB);
if (mul != NULL) {
delete mul;
mul = nullptr;
}
break;
}
case'/': {
Compute* division = new Division;
division->compute(strA, strB);
if (division != NULL) {
delete division;
division = nullptr;
}
break;
}
}
cout << endl << "————————————————————————" << endl;
goto flag;
tp:
cout << "*************--===感谢您的使用===--*************" << endl << endl;
return 0;
}
if (sdd == 2) {
system("cls");
jdt();
cout << "多功能计算器" << endl;
cout << " " << "1.加法运算" << " " << endl;
cout << " " << "2.减法运算" << " " << endl;
cout << " " << "3.判断闰年" << " " << endl;
cout << " " << "4.计算圆的面积" << " " << endl;
cout << " " << "5.计算从1到输入数之间的奇数和" << " " << endl;
cout << " " << "6.计算从1到输入数之间的偶数和" << " " << endl;
cout << " " << "7.输出从1到输入数之间所有3的倍数" << endl;
cout << " " << "8.求即被3整除有被5整除的数" << " " << endl;
cout << " " << "9.求水仙花数" << " " << endl;
cout << " " << "10.比较大小" << " " << endl;
cout << " " << "11.冒泡排序" << " " << endl;
cout << " " << "12.矩阵转置" << " " << endl;
cout << " " << "13.求对角线的和" << " " << endl;
cout << " " << "14.统计单词个数" << " " << endl;
cout << " " << "15.乘法运算" << " " << endl;
cout << " " << "16.除法运算" << " " << endl;
cout << " " << "17.比较两个数的大小" << " " << endl;
cout << " " << "18.结构体排序是个学生的成绩,并求平均值" << " " << endl;
jdt();
int a;
cin >> a;
switch (a) {
case 1: {
jiafa();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
jiafa() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 2: {
jianfayunsaun();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
jianfayunsaun() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 3: {
runnian();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
runnian() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 4: {
syuan();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
syuan() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 5: {
jishuhe();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
jishuhe() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 6: {
oushuhe();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
oushuhe() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 7: {
dao1_3beishu();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
dao1_3beishu() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 8: {
bei3he5zhengchushu();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
bei3he5zhengchushu() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 9: {
shuixanhuashu();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
shuixanhuashu() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 10: {
panduan();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
panduan() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 11: {
maopao();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
maopao() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 12: {
juzhenzhuanzhi();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
juzhenzhuanzhi() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 13: {
qiuduijiaoxianhe();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
qiuduijiaoxianhe() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 14: {
tongjidanci();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
tongjidanci() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 15: {
chengfayunsuan();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
chengfayunsuan() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 16: {
chufayunsuan();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
chufayunsuan() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 17: {
bidaxiao();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
bidaxiao() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
case 18: {
xueshengpaixu();
cout << "输入1重复此操作,输入2结束程序" << endl;
int b;
cin >> b;
switch (b) {
case 1: {
xueshengpaixu() ;
break;
};
case 2: {
cout << "感谢使用,单击任意键结束此程序" << endl;
break;
};
};
break;
};
default: {
cout << "请输入1到18中间的数字" << endl;
break;
}
}
}
}
if (m == 2) {
//TORC生产10111010010111101011000011101000100110
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);
cout << "继续游戏?(y/n)";
char as;
cin >> as;
if (as == 'n') {
continue;
}
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;
}
if (m == 5) {
cout<<"当前配置不足以运行 MC 标签页,推荐您使用双核及以上版本"<<endl;
/*if (waibulianjie == 1 && xingneng == 3) {
system("start MC.bat");
}
if (waibulianjie != 1) cout << "外部连接未开启,连接失败" << endl;
if (xingneng <= 3) cout << "性能过低,请前往调节" << endl;
system("pause");
*/
}
if (m == 4) {
int mmnn;
jdt();
cout << "设置" << endl;
cout << " " << "1.编译辅助功能" << " " << endl;
cout << " " << "2.AI使用状态" << " " << endl;
cout << " " << "3.外部连接" << " " << endl;
cout << " " << "4.编译器开启/关闭(需要联系博主加装)" << " " << endl;
cout << " " << "5.桌面颜色" << " " << endl;
cout << " " << "6.性能调节" << " " << endl;
cout << " " << "7.返回" << endl;
jdt();
cin >> mmnn;
if (mmnn == 7) {
}
if (mmnn == 5) {
if (xingneng == 1) {
cout << "当前为节能状态,无法使用此功能,您可更改性能至 单核使用模式 以启用该功能!";
system("pause");
continue;
}
cout << "请输入窗口颜色(use English)" << endl;
string www;
string zzz;
cin >> www;
if (www == "black") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
} else {
break;
}
}
if (zzz == "black") {
system("color 00");
}
if (zzz == "blue") {
system("color 01");
}
if (zzz == "green") {
system("color 02");
}
if (zzz == "green1") {
system("color 03");
}
if (zzz == "white") {
system("color 07");
}
if (zzz == "white1") {
system("color 0F");
}
if (zzz == "yellow1") {
system("color 0E");
}
if (zzz == "yellow") {
system("color 06");
}
if (zzz == "purple") {
system("color 0D");
}
}
if (www == "blue") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
}
cin >> zzz;
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color 10");
}
if (zzz == "blue") {
system("color 11");
}
if (zzz == "green") {
system("color 12");
}
if (zzz == "green1") {
system("color 13");
}
if (zzz == "white") {
system("color 17");
}
if (zzz == "white1") {
system("color 1F");
}
if (zzz == "yellow1") {
system("color 1E");
}
if (zzz == "yellow") {
system("color 16");
}
if (zzz == "purple") {
system("color 1D");
}
}
if (www == "green") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
}
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color 20");
}
if (zzz == "blue") {
system("color 21");
}
if (zzz == "green") {
system("color 22");
}
if (zzz == "green1") {
system("color 23");
}
if (zzz == "white") {
system("color 27");
}
if (zzz == "white1") {
system("color 2F");
}
if (zzz == "yellow1") {
system("color 2E");
}
if (zzz == "yellow") {
system("color 26");
}
if (zzz == "purple") {
system("color 2D");
}
}
if (www == "green1") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
}
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color 30");
}
if (zzz == "blue") {
system("color 31");
}
if (zzz == "green") {
system("color 32");
}
if (zzz == "green1") {
system("color 33");
}
if (zzz == "white") {
system("color 37");
}
if (zzz == "white1") {
system("color 3F");
}
if (zzz == "yellow1") {
system("color 3E");
}
if (zzz == "yellow") {
system("color 36");
}
if (zzz == "purple") {
system("color 3D");
}
}
if (www == "white") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
}
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color 70");
}
if (zzz == "blue") {
system("color 71");
}
if (zzz == "green") {
system("color 72");
}
if (zzz == "green1") {
system("color 73");
}
if (zzz == "white") {
system("color 77");
}
if (zzz == "white1") {
system("color 7F");
}
if (zzz == "yellow1") {
system("color 7E");
}
if (zzz == "yellow") {
system("color 76");
}
if (zzz == "purple") {
system("color 7D");
}
}
if (www == "white1") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
}
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color F0");
}
if (zzz == "blue") {
system("color F1");
}
if (zzz == "green") {
system("color F2");
}
if (zzz == "green1") {
system("color F3");
}
if (zzz == "white") {
system("color F7");
}
if (zzz == "white1") {
system("color FF");
}
if (zzz == "yellow1") {
system("color FE");
}
if (zzz == "yellow") {
system("color F6");
}
if (zzz == "purple") {
system("color FD");
}
}
if (www == "yellow1") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
}
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color E0");
}
if (zzz == "blue") {
system("color E1");
}
if (zzz == "green") {
system("color E2");
}
if (zzz == "green1") {
system("color E3");
}
if (zzz == "white") {
system("color E7");
}
if (zzz == "white1") {
system("color EF");
}
if (zzz == "yellow1") {
system("color EE");
}
if (zzz == "yellow") {
system("color E6");
}
if (zzz == "purple") {
system("color ED");
}
}
if (www == "yellow") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
}
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color 60");
}
if (zzz == "blue") {
system("color 61");
}
if (zzz == "green") {
system("color 62");
}
if (zzz == "green1") {
system("color 63");
}
if (zzz == "white") {
system("color 67");
}
if (zzz == "white1") {
system("color 6F");
}
if (zzz == "yellow1") {
system("color 6E");
}
if (zzz == "yellow") {
system("color 66");
}
if (zzz == "purple") {
system("color 6D");
}
}
if (www == "purple") {
//TORC生产(?00100001010001001001?)
cout << "请输入字体颜色";
cin >> zzz;
while (true) {
if (zzz == www) {
cout << "DITD-8192:警告,您所选的字体颜色与背景颜色一致,可能影响您的正常使用使用,请更改字体颜色" << endl;
cin >> zzz;
}
if (zzz != www) {
break;
}
}
if (zzz == "black") {
system("color D0");
}
if (zzz == "blue") {
system("color D1");
}
if (zzz == "green") {
system("color D2");
}
if (zzz == "green1") {
system("color D3");
}
if (zzz == "white") {
system("color D7");
}
if (zzz == "white1") {
system("color DF");
}
if (zzz == "yellow1") {
system("color DE");
}
if (zzz == "yellow") {
system("color D6");
}
if (zzz == "purple") {
system("color DD");
}
}
}
if (mmnn == 1) {
if (bianyifuzhu == 0) {
cout << "当前编译辅助功能为 关闭 状态,是否开启?1开0关" << endl;
cin >> bianyifuzhu;
if (bianyifuzhu == 1) {
cout << "好的,已开启编译辅助功能" << endl;
}
if (bianyifuzhu == 0) {
cout << "当前仍为 关闭 状态" << endl;
}
} else if (bianyifuzhu == 1) {
cout << "当前编译辅助功能为 开启 状态,是否关闭?1开0关" << endl;
cin >> bianyifuzhu;
if (bianyifuzhu == 0) {
cout << "好的,已关闭编译辅助功能" << endl;
}
if (bianyifuzhu == 1) {
cout << "当前仍为 开启 状态" << endl;
}
}
}
if (mmnn == 2) {
if (AI == 0) {
cout << "当前AI为 关闭 状态,是否开启?1开0关" << endl;
cin >> AI;
if (AI == 1) {
cout << "好的,已开启AI功能" << endl;
}
if (AI == 0) {
cout << "当前仍为 关闭 状态" << endl;
}
} else if (AI == 1) {
cout << "当前编AI为 开启 状态,是否关闭?1开0关" << endl;
cin >> AI;
if (AI == 0) {
cout << "已关闭AI功能" << endl;
}
if (AI == 1) {
cout << "当前仍为 开启 状态" << endl;
}
}
}
if (mmnn == 3) {
if (xingneng <= 2) {
cout << "当前性能状态无法使用此功能,您可更改性能至 单核使用模式 以启用该功能!";
continue;
}
if (waibulianjie == 0) {
cout << "当前外部连接功能为 关闭 状态,是否开启?1开0关" << endl;
cin >> waibulianjie;
if (waibulianjie == 1) {
cout << "已开启外部连接功能" << endl;
}
if (waibulianjie == 0) {
cout << "当前仍为 关闭 状态" << endl;
}
}
}
if (mmnn == 4) {
cout << "暂不支持此功能";
system("pause");
}
if (mmnn == 6) {
cout << "当前编译器性能为 ";
if (xingneng == 1) {
cout << "低功耗模式";
}
if (xingneng == 2) {
cout << "单核使用模式";
}
if (xingneng == 3) {
cout << "游戏双核模式";
}
cout << endl;
cout << "1=低功耗模式、2=单核使用模式、3=游戏双核模式、4=程序员三核模式 低功耗模式会使小部分功能无法使用,适合在睡眠待机时使用(睡眠待机时会自动使用以降低电脑CPU使用率) 单核使用模式会使游戏、外接一类的系统无法运行,但可以使用其他功能 游戏双核模式使用时会启用ALLMA-606高性能核心以及DITD-8192核心(双核系统DCS-Dual core system)共同运行以支持游戏、外接等使用" << endl;
int ssddss = 1;
while (ssddss != 0) {
cin >> xingneng;
if (xingneng >= 1 && xingneng <= 3) break;
else cout << "数据错误,请重新输入数据" << endl;
}
cout << "已成功修改" << endl;
cout << "当前编译器性能为 ";
if (xingneng == 1) {
cout << "低功耗模式";
}
if (xingneng == 2) {
cout << "单核使用模式";
}
if (xingneng == 3) {
cout << "游戏双核模式";
}
system("pause");
}
}
}
}
}
}