[C++] 小游戏 征伐 SLG DNF 0.0.3 版本 zty出品

发布于:2024-10-17 ⋅ 阅读:(46) ⋅ 点赞:(0)

目录

大家好~ 今天zty带来的是

War and Expedition SLG DNF 0.0.3  version

讲人话就是

    War and Expedition = (游戏名,即征伐)

    SLG = (即时战略类游戏)

    DNF =(Did Not Finish)

    0.0.3 = (内测版本号)

    version = (版本)

适配编译器: Dev C++ 6.7.5

地图介绍看

先赞后看 养成习惯

CODE:

后记



大家好~ 今天zty带来的是

War and Expedition SLG DNF 0.0.3  version

讲人话就是

    War and Expedition = (游戏名,即征伐)

    SLG = (即时战略类游戏)

    DNF =(Did Not Finish)

    0.0.3 = (内测版本号)

    version = (版本)

适配编译器: Dev C++ 6.7.5

地图介绍看

OK啊,废话不多说

先赞后看 养成习惯

CODE:

#include<bits/stdc++.h>
//#include<dpcq.h>
#include<conio.h>
#include<time.h>
#include<windows.h>
using namespace std;
long long tb = 0, wchengshu = 5, dchengshu = 5;
void zhandou();
void chaxun();
void buzhen();
void kuojun();
void budui();
void Yan(int a) {// 1蓝 2绿 3紫 4红 5黄 6深蓝 7棕 8浅灰 9深灰 10绿绿 11绿紫 12绿黄 13蓝蓝
	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);
	if (a == 8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
	if (a == 9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
	if (a == 10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN | BACKGROUND_GREEN);
	if (a == 11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED | FOREGROUND_BLUE | BACKGROUND_GREEN);
	if (a == 12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_GREEN);
	if (a == 13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_BLUE | BACKGROUND_INTENSITY | BACKGROUND_BLUE);
}
void Bai() {
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
}
int tu[43][43] = { //1河流 2桥梁 3高山 4未定城 5地图边界 6我城 7我都 8敌城 9敌都
	{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5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, 8, 0, 0, 9, 5},
	{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5},
};
struct wj {
	string jiangjun;//将军
	int bh;//编号
	int b;//步兵
	int d;//盾兵
	int g;//弓箭手
	int q;//骑兵
	int bj;
	int gj;
	int dj;
	int qj;
	int jjs;
	bool state = 1; //是否存在
	int hen;
	int zong;
}
w1 = {"\0", 1, 100, 100, 100, 100, 1, 1, 1, 1, 1, 1, 1, 2},
w2 = {"\0", 2, 100, 100, 100, 100, 1, 1, 1, 1, 1, 1, 2, 1},
w3 = {"\0", 3, 100, 100, 100, 100, 1, 1, 1, 1, 1, 1, 2, 2};
struct dr {
	string jiangjun;//将军
	int bh;//编号
	int b;//步兵
	int g;//弓箭手
	int d;//盾兵
	int q;//骑兵
	int bj;
	int gj;
	int dj;
	int qj;
	int jjs;
	bool state = 1; //是否存在
	int hen;
	int zong;
}
d1 = {"\0", 1, 100, 100, 100, 100, 1, 1, 1, 1, 1, 1, 40, 39},
d2 = {"\0", 2, 100, 100, 100, 100, 1, 1, 1, 1, 1, 1, 39, 39},
d3 = {"\0", 3, 100, 100, 100, 100, 1, 1, 1, 1, 1, 1, 39, 40};
struct jj {
	string name;
	int gong;
	float bjiacheng;//步兵加成
	float djiacheng;//盾兵加成
	float gjiacheng;//弓箭加成
	float qjiacheng;//骑兵加成
	int bh;
}
lb = {"吕布", 30, 1.2, 1.1, 1.1, 1.6, 1},
zy = {"赵云", 27, 1.3, 1.3, 1.4, 2.0, 2},
dw = {"典韦", 28, 1.9, 1.8, 1.8, 0.9, 3},
gy = {"关羽", 27, 1.5, 1.5, 1.5, 1.9, 4},
mc = {"马超", 25, 1.7, 1.4, 1.5, 1.7, 5},
zf = {"张飞", 24, 1.7, 1.3, 1.5, 1.7, 6},
hz = {"黄忠", 22, 1.6, 2.0, 1.9, 1.3, 7},
xc = {"许褚", 26, 1.4, 1.9, 1.4, 1.8, 8},
sc = {"孙策", 22, 1.4, 1.5, 2.3, 1.4, 9},
dsc = {"太史慈", 22, 1.6, 1.5, 1.9, 1.7, 10},
xhd = {"夏侯惇", 24, 1.6, 1.2, 1.6, 1.8, 11},
xhy = {"夏侯渊", 25, 1.5, 1.2, 1.8, 1.7, 12},
zl = {"张辽", 26, 1.8, 1.5, 1.3, 1.8, 13},
zh = {"张郃", 21, 1.8, 1.6, 1.2, 1.8, 14},
xh = {"徐晃", 24, 1.6, 1.9, 1.2, 1.6, 15},
pd = {"庞德", 19, 1.2, 1.4, 1.8, 1.7, 16},
gn = {"甘宁", 23, 1.8, 1.4, 1.7, 1.5, 17},
zt = {"周泰", 22, 1.5, 1.8, 1.4, 1.7, 18},
wy = {"魏延", 20, 1.6, 1.7, 1.3, 1.5, 19},
zx = {"张绣", 22, 1.8, 1.3, 1.6, 1.6, 20},
wc = {"文丑", 17, 1.5, 1.5, 1.7, 1.5, 21},
yl = {"颜良", 17, 1.6, 1.4, 1.1, 1.4, 22},
dai = {"邓艾", 13, 1.5, 1.2, 1.5, 1.3, 23},
jw = {"姜维", 20, 1.5, 1.1, 1.6, 1.3, 24},
zgl = {"诸葛亮", 4, 2, 2, 2, 2, 25};
struct sb { //士兵
	string name;
	int gong;
	int xue;
	int jl;
	int jiazhi;
}
q = {"枪兵", 20, 7, 1, 1},
j = {"骑兵", 28, 9, 2, 2},
d = {"盾兵", 35, 3, 1, 1},
g = {"弓兵", 17, 6, 4, 1};

//void cd() {
//A:
//	cout << "   1.部队  2.查询  \n";
//	int b = _getch();
//	switch (b) {
//		case 1:
//			budui();
//			break;
//		case 2:
//			chaxun();
//			goto A;
//			break;
//		default:
//			goto A;
//			break;
//	}
//}

bool zhanling(int shei) {
	switch (shei) {
		case 1:
			if (tu[w1.hen - 1][w1.zong] == 4 ) {
				tu[w1.hen - 1][w1.zong] = 6;
				wchengshu++;
			} else if (tu[w1.hen + 1][w1.zong] == 4 ) {
				tu[w1.hen + 1][w1.zong] = 6;
				wchengshu++;
			} else if ( tu[w1.hen][w1.zong - 1] == 4) {
				tu[w1.hen][w1.zong - 1] = 6;
				wchengshu++;
			} else if ( tu[w1.hen][w1.zong + 1] == 4) {
				tu[w1.hen][w1.zong + 1] = 6;
				wchengshu++;
			} else
				return 0;
			return 1;

			break;
		case 2:
			if (tu[w2.hen - 1][w2.zong] == 4 ) {
				tu[w2.hen - 1][w2.zong] = 6;
				wchengshu++;
			} else if (tu[w2.hen + 1][w2.zong] == 4 ) {
				tu[w2.hen + 1][w2.zong] = 6;
				wchengshu++;
			} else if ( tu[w2.hen][w2.zong - 1] == 4) {
				tu[w2.hen][w2.zong - 1] = 6;
				wchengshu++;
			} else if ( tu[w2.hen][w2.zong + 1] == 4) {
				tu[w2.hen][w2.zong + 1] = 6;
				wchengshu++;
			} else
				return 0;
			return 1;
		case 3:
			if (tu[w3.hen - 1][w3.zong] == 4 ) {
				tu[w3.hen - 1][w3.zong] = 6;
				wchengshu++;
			} else if (tu[w3.hen + 1][w3.zong] == 4 ) {
				tu[w3.hen + 1][w3.zong] = 6;
				wchengshu++;
			} else if ( tu[w3.hen][w3.zong - 1] == 4) {
				tu[w3.hen][w3.zong - 1] = 6;
				wchengshu++;
			} else if ( tu[w3.hen][w3.zong + 1] == 4) {
				tu[w3.hen][w3.zong + 1] = 6;
				wchengshu++;
			} else return 0;
			return 1;

			break;
		default:
			//TODO
			break;
	}
}
void kuojun(int a) {
	system("cls");
kj:
	Yan(1);
	system("cls");
	cout << "\n\n\n    扩军:\n    1,枪兵 1铜币/人 2,盾兵 1铜币/人 3,弓兵 1铜币/人 4,骑兵 2铜币/人 0,返回\n    铜币:";
	cout << tb;
	cout << "\n\n";
	int xuan;
	int sl = 0;
	cin >> xuan;
	switch (xuan) {
		case 1:
			cout << "   扩军数量:";
			cin >> sl;
			if (tb - sl >= 0) {
				tb -= sl;
				if (a == 1) {
					w1.b += sl;
				} else if (a == 2) {
					w2.b += sl;
				} else {
					w3.b += sl;
				}
				goto kj;
			}
			cout << "钱不够\n\n";
			break;
		case 2:
			cout << "  扩军数量:";
			cin >> sl;
			if (tb - sl >= 0) {
				tb -= sl;
				if (a == 1) {
					w1.d += sl;
				} else if (a == 2) {
					w2.d += sl;
				} else {
					w3.d += sl;
				}
				goto kj;
			}
			cout << "  钱不够\n\n";
			break;
		case 3:
			cout << "  扩军数量:";
			cin >> sl;
			if (tb - sl >= 0) {
				tb -= sl;
				if (a == 1) {
					w1.d += sl;
				} else if (a == 2) {
					w2.d += sl;
				} else {
					w3.d += sl;
				}
				goto kj;
			}
			cout << "钱不够\n\n";
			break;
		case 4:
			cout << "   扩军数量:";
			cin >> sl;
			if (tb - sl * 2 >= 0) {
				tb -= sl * 2;
				if (a == 1) {
					w1.b += sl;
				} else if (a == 2) {
					w2.b += sl;
				} else {
					w3.b += sl;
				}
				goto kj;
			}
			cout << "钱不够\n\n";
			break;
		case 0:
			Bai();
			return;
			break;
		default:
			goto kj;
			break;
	}
}
void shuchuditu() {
	for (int i = 0; i < 42; i++) { //1河流 2桥梁 3高山 4未定城 5地图边界 6我城 7我都 8敌城 9敌都
		for (int j = 0; j < 42; j++) {
			switch (tu[i][j]) {
				case 1:
					Yan(13);
					cout << "~ ";
					break;
				case 2:
					if ((i == w1.hen && j == w1.zong && w1.state == 1)   ) {
						Yan(1);
						cout << "①";
						break;
					}
					if ( (i == w2.hen && j == w2.zong && w2.state == 1)) {
						Yan(1);
						cout << "②";
						break;
					}
					if ((i == w3.hen && j == w3.zong && w3.state == 1)) {
						Yan(1);
						cout << "③";
						break;
					}
					if ((i == d1.hen && j == d1.zong && d1.state == 1)   ) {
						Yan(3);
						cout << "①";
						break;
					}
					if ( (i == d2.hen && j == d2.zong && d2.state == 1)) {
						Yan(3);
						cout << "②";
						break;
					}
					if ((i == d3.hen && j == d3.zong && d3.state == 1)) {
						Yan(3);
						cout << "③";
						break;
					}
					Yan(7);
					cout << "〓";
					break;
				case 3:
					Yan(9);
					cout << "■";
					break;
				case 4:
					Yan(0);
					cout << "◎";
					break;
				case 5:
					Yan(8);
					cout << "■";
					break;
				case 6:
					Yan(1);
					cout << "●";
					break;
				case 7:
					Yan(1);
					cout << "★";
					break;
				case 8:
					Yan(3);
					cout << "○";
					break;
				case 9:
					if ((i == w1.hen && j == w1.zong)   ) {
						Yan(3);
						cout << "①";
						break;
					}
					if ( (i == w2.hen && j == w2.zong)) {
						Yan(3);
						cout << "②";
						break;
					}
					if ((i == w3.hen && j == w3.zong)) {
						Yan(3);
						cout << "③";
						break;
					}
					if ((i == d1.hen && j == d1.zong)   ) {
						Yan(3);
						cout << "①";
						break;
					}
					if ( (i == d2.hen && j == d2.zong)) {
						Yan(3);
						cout << "②";
						break;
					}
					if ((i == d3.hen && j == d3.zong)) {
						Yan(3);
						cout << "③";
						break;
					}
					Yan(3);
					cout << "☆";
					break;
				case 0:
					if ((i == w1.hen && j == w1.zong && w1.state == 1)   ) {
						Yan(1);
						cout << "①";
						break;
					}
					if ( (i == w2.hen && j == w2.zong && w2.state == 1)) {
						Yan(1);
						cout << "②";
						break;
					}
					if ((i == w3.hen && j == w3.zong && w3.state == 1)) {
						Yan(1);
						cout << "③";
						break;
					}
					if ((i == d1.hen && j == d1.zong && d1.state == 1)   ) {
						Yan(3);
						cout << "①";
						break;
					}
					if ( (i == d2.hen && j == d2.zong && d2.state == 1)) {
						Yan(3);
						cout << "②";
						break;
					}
					if ((i == d3.hen && j == d3.zong && d3.state == 1)) {
						Yan(3);
						cout << "③";
						break;
					}
					Yan(10);
					cout << "十";
					break;
				default:
					break;
			}

		}
	}
	return;
}
void budui() {
a:
	system("cls");
	if (w1.state) {
		shuchuditu();
		cout << "\n\n第一集团军  将军:";
		cout << w1.jiangjun;
		cout << "  位置:" << w1.hen << " " << w1.zong;
		cout << "    铜币:" << tb;
		cout << "\n枪兵数量:" << w1.b << " 盾兵数量:" << w1.d << " 弓兵数量:" << w1.g << " 骑兵数量:" << w1.q;
		cout << "\n\n军令:\n    w.向北一格 a.向西一格 s.向南一格 d.向东一格 q.战斗 e.驻扎 r.扩军 f.占领\n";
		char x = _getch();
		switch (x) {
			case 'w':
				if (tu[w1.hen - 1][w1.zong] == 0 || tu[w1.hen - 1][w1.zong] == 2) {
					w1.hen--;
				} else {
					goto a;
				}
				break;
			case 'a':
				if (tu[w1.hen][w1.zong - 1] == 0 || tu[w1.hen][w1.zong - 1] == 2) {
					w1.zong--;
				} else {
					goto a;
				}
				break;
			case 's':
				if (tu[w1.hen + 1][w1.zong] == 0 || tu[w1.hen + 1][w1.zong] == 2) {
					w1.hen++;
				} else {
					goto a;
				}
				break;
			case 'd':
				if (tu[w1.hen][w1.zong + 1] == 0 || tu[w1.hen][w1.zong + 1] == 2) {
					w1.zong++;
				} else {
					goto a;
				}
				break;
			case 'f':
				if (!zhanling(1)) {
					goto a;
				}
				break;
			case 'r':
				kuojun(1);
				goto a;
				break;
			case 'q':
				if ((w1.hen + 1 == d1.hen && w1.zong - 1 == d1.zong) || (w1.hen + 1 == d2.hen && w1.zong - 1 == d2.zong) || (w1.hen + 1 == d3.hen && w1.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w1.hen + 1 == d1.hen && w1.zong == d1.zong) || (w1.hen + 1 == d2.hen && w1.zong == d2.zong) || (w1.hen + 1 == d3.hen && w1.zong == d3.zong)) {
					//zhandou();
				}
				if ((w1.hen + 1 == d1.hen && w1.zong + 1 == d1.zong) || (w1.hen + 1 == d2.hen && w1.zong + 1 == d2.zong) || (w1.hen + 1 == d3.hen && w1.zong + 1 == d3.zong)) {
					//zhandou();
				}
				if ((w1.hen == d1.hen && w1.zong - 1 == d1.zong) || (w1.hen == d2.hen && w1.zong - 1 == d2.zong) || (w1.hen == d3.hen && w1.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w1.hen == d1.hen && w1.zong + 1 == d1.zong) || (w1.hen == d2.hen && w1.zong + 1 == d2.zong) || (w1.hen == d3.hen && w1.zong + 1 == d3.zong)) {
					//zhandou();
				}
				if ((w1.hen - 1 == d1.hen && w1.zong - 1 == d1.zong) || (w1.hen - 1 == d2.hen && w1.zong - 1 == d2.zong) || (w1.hen - 1 == d3.hen && w1.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w1.hen - 1 == d1.hen && w1.zong == d1.zong) || (w1.hen - 1 == d2.hen && w1.zong == d2.zong) || (w1.hen - 1 == d3.hen && w1.zong == d3.zong)) {
					//zhandou();
				}
				if ((w1.hen - 1 == d1.hen && w1.zong + 1 == d1.zong) || (w1.hen - 1 == d2.hen && w1.zong + 1 == d2.zong) || (w1.hen - 1 == d3.hen && w1.zong + 1 == d3.zong)) {
					//zhandou();
				}
				goto a;
				break;
			case 'e':
				break;
			default:
				goto a;
				break;
		}
	}
b:
	system("cls");
	if (w2.state) {
		shuchuditu();
		cout << "\n\n第二集团军  将军:";
		cout << w2.jiangjun;
		cout << "  位置:" << w2.hen << " " << w2.zong;
		cout << "    铜币:" << tb;
		cout << "\n枪兵数量:" << w2.b << " 盾兵数量:" << w2.d << " 弓兵数量:" << w2.g << " 骑兵数量:" << w2.q;
		cout << "\n\n军令:\n    w.向北一格 a.向西一格 s.向南一格 d.向东一格 q.战斗 e.驻扎 r.扩军 f.占领\n";
		char x = _getch();
		switch (x) {
			case 'w'://2 4 6 7 0
				if (tu[w2.hen - 1][w2.zong] == 0 || tu[w2.hen - 1][w2.zong] == 2) {
					w2.hen--;
				} else {
					goto b;
				}
				break;
			case 'a':
				if (tu[w2.hen][w2.zong - 1] == 0 || tu[w2.hen][w2.zong - 1] == 2) {
					w2.zong--;
				} else {
					goto b;
				}
				break;
			case 's':
				if (tu[w2.hen + 1][w2.zong] == 0 || tu[w2.hen + 1][w2.zong] == 2) {
					w2.hen++;
				} else {
					goto b;
				}
				break;
			case 'd':
				if (tu[w2.hen][w2.zong + 1] == 0 || tu[w2.hen][w2.zong + 1] == 2) {
					w2.zong++;
				} else {
					goto b;
				}
				break;
			case 'f':
				if (!zhanling(2)) {
					goto a;
				}
				break;
			case 'r':
				kuojun(2);
				goto b;
				break;
			case 'q':
				if ((w2.hen + 1 == d1.hen && w2.zong - 1 == d1.zong) || (w2.hen + 1 == d2.hen && w2.zong - 1 == d2.zong) || (w2.hen + 1 == d3.hen && w2.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w2.hen + 1 == d1.hen && w2.zong == d1.zong) || (w2.hen + 1 == d2.hen && w2.zong == d2.zong) || (w2.hen + 1 == d3.hen && w2.zong == d3.zong)) {
					//zhandou();
				}
				if ((w2.hen + 1 == d1.hen && w2.zong + 1 == d1.zong) || (w2.hen + 1 == d2.hen && w2.zong + 1 == d2.zong) || (w2.hen + 1 == d3.hen && w2.zong + 1 == d3.zong)) {
					//zhandou();
				}
				if ((w2.hen == d1.hen && w2.zong - 1 == d1.zong) || (w2.hen == d2.hen && w2.zong - 1 == d2.zong) || (w2.hen == d3.hen && w2.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w2.hen == d1.hen && w2.zong + 1 == d1.zong) || (w2.hen == d2.hen && w2.zong + 1 == d2.zong) || (w2.hen == d3.hen && w2.zong + 1 == d3.zong)) {
					//zhandou();
				}
				if ((w2.hen - 1 == d1.hen && w2.zong - 1 == d1.zong) || (w2.hen - 1 == d2.hen && w2.zong - 1 == d2.zong) || (w2.hen - 1 == d3.hen && w2.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w2.hen - 1 == d1.hen && w2.zong == d1.zong) || (w2.hen - 1 == d2.hen && w2.zong == d2.zong) || (w2.hen - 1 == d3.hen && w2.zong == d3.zong)) {
					//zhandou();
				}
				if ((w2.hen - 1 == d1.hen && w2.zong + 1 == d1.zong) || (w2.hen - 1 == d2.hen && w2.zong + 1 == d2.zong) || (w2.hen - 1 == d3.hen && w2.zong + 1 == d3.zong)) {
					//zhandou();
				}
				goto b;
				break;
			case 'e':
				break;
			default:
				goto b;
				break;
		}
	}
c:
	system("cls");
	if (w3.state) {
		shuchuditu();
		cout << "\n\n第三集团军  将军:";
		cout << w3.jiangjun;
		cout << "  位置:" << w3.hen << " " << w3.zong;
		cout << "    铜币:" << tb;
		cout << "\n枪兵数量:" << w3.b << " 盾兵数量:" << w3.d << " 弓兵数量:" << w3.g << " 骑兵数量:" << w3.q;
		cout << "\n\n军令:\n    w.向北一格 a.向西一格 s.向南一格 d.向东一格 q.战斗 e.驻扎 r.扩军 f.占领\n";
		char x = _getch();
		switch (x) {
			case 'w'://2 4 6 7 0
				if (tu[w3.hen - 1][w3.zong] == 0 || tu[w3.hen - 1][w3.zong] == 2) {
					w3.hen--;
				} else {
					goto c;
				}
				break;
			case 'a':
				if (tu[w3.hen ][w3.zong - 1] == 0 || tu[w3.hen][w3.zong - 1] == 2) {
					w3.zong--;
				} else {
					goto c;
				}
				break;
			case 's':
				if (tu[w3.hen + 1][w3.zong] == 0 || tu[w3.hen + 1][w3.zong] == 2) {
					w3.hen++;
				} else {
					goto c;
				}
				break;
			case 'd':
				if (tu[w3.hen][w3.zong + 1] == 0 || tu[w3.hen][w3.zong + 1] == 2) {
					w3.zong++;
				} else {
					goto c;
				}
				break;

			case 'f':
				if (!zhanling(3)) {
					goto c;
				}
				break;
			case 'r':
				kuojun(3);
				goto c;
				break;
			case 'q':
				if ((w3.hen + 1 == d1.hen && w3.zong - 1 == d1.zong) || (w3.hen + 1 == d2.hen && w3.zong - 1 == d2.zong) || (w3.hen + 1 == d3.hen && w3.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w3.hen + 1 == d1.hen && w3.zong == d1.zong) || (w3.hen + 1 == d2.hen && w3.zong == d2.zong) || (w3.hen + 1 == d3.hen && w3.zong == d3.zong)) {
					//zhandou();
				}
				if ((w3.hen + 1 == d1.hen && w3.zong + 1 == d1.zong) || (w3.hen + 1 == d2.hen && w3.zong + 1 == d2.zong) || (w3.hen + 1 == d3.hen && w3.zong + 1 == d3.zong)) {
					//zhandou();
				}
				if ((w3.hen == d1.hen && w3.zong - 1 == d1.zong) || (w3.hen == d2.hen && w3.zong - 1 == d2.zong) || (w3.hen == d3.hen && w3.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w3.hen == d1.hen && w3.zong + 1 == d1.zong) || (w3.hen == d2.hen && w3.zong + 1 == d2.zong) || (w3.hen == d3.hen && w3.zong + 1 == d3.zong)) {
					//zhandou();
				}
				if ((w3.hen - 1 == d1.hen && w3.zong - 1 == d1.zong) || (w3.hen - 1 == d2.hen && w3.zong - 1 == d2.zong) || (w3.hen - 1 == d3.hen && w3.zong - 1 == d3.zong)) {
					//zhandou();
				}
				if ((w3.hen - 1 == d1.hen && w3.zong == d1.zong) || (w3.hen - 1 == d2.hen && w3.zong == d2.zong) || (w3.hen - 1 == d3.hen && w3.zong == d3.zong)) {
					//zhandou();
				}
				if ((w3.hen - 1 == d1.hen && w3.zong + 1 == d1.zong) || (w3.hen - 1 == d2.hen && w3.zong + 1 == d2.zong) || (w3.hen - 1 == d3.hen && w3.zong + 1 == d3.zong)) {
					//zhandou();
				}
				goto c;
				break;
			case 'e':
				break;
			default:
				goto c;
				break;
		}
	}
}
int main() {
	system("color 0E");

	system("mode con cols=84 lines=50");
ksyx:
	Yan(1);
	cout << "\n\n\n\n\n\n                           征伐 1w01a 测试版  \n                    War and Expedition SLG DNF 0.0.3  version\n";
	Yan(5);
	cout << "                                                          zty出品\n";
	cout << "                                              \n ";
	cout << "                                              \n ";
	cout << "                                              \n ";
	cout << "                                          输入' y ' 开始游戏     \n";
	char ks = _getch();
	if (ks != 'y') {
		goto ksyx;
	}
	system("cls");
	Bai();
	Yan(1);
	cout << "\n\n\n\n\n                    武将抽取中.\n\n";
wj:
	int j1, j2, j3;
	srand(time(0));
	j1 = rand() % 25 + 1;
	Sleep(1000);
	system("cls");
	cout << "\n\n\n\n\n                    武将抽取中..";
	srand(time(0));
	j2 = rand() % 25 + 1;
	Sleep(1000);
	system("cls");
	cout << "\n\n\n\n\n                    武将抽取中...";
	system("cls");
	srand(time(0));
	j3 = rand() % 25 + 1;
	if (j1 == j2 || j2 == j3 || j3 == j1) goto wj;
	Yan(2);
	cout << "\n\n\n                   !抽取成功!";
	Yan(5);
	cout << "\n\n                    第一集团军将军:";
	switch (j1) {
		case 1:
			w1.jiangjun = lb.name;
			w1.bj = lb.bjiacheng;
			w1.gj = lb.gjiacheng;
			w1.dj = lb.djiacheng;
			w1.qj = lb.qjiacheng;
			w1.jjs = lb.gong;
			break;
		case 2:
			w1.jiangjun = zy.name;
			w1.bj = zy.bjiacheng;
			w1.gj = zy.gjiacheng;
			w1.dj = zy.djiacheng;
			w1.qj = zy.qjiacheng;
			w1.jjs = zy.gong;
			break;
		case 3:
			w1.jiangjun = dw.name;
			w1.bj = dw.bjiacheng;
			w1.gj = dw.gjiacheng;
			w1.dj = dw.djiacheng;
			w1.qj = dw.qjiacheng;
			w1.jjs = dw.gong;
			break;
		case 4:
			w1.jiangjun = gy.name;
			w1.bj = gy.bjiacheng;
			w1.gj = gy.gjiacheng;
			w1.dj = gy.djiacheng;
			w1.qj = gy.qjiacheng;
			w1.jjs = gy.gong;
			break;
		case 5:
			w1.jiangjun = mc.name;
			w1.bj = mc.bjiacheng;
			w1.gj = mc.gjiacheng;
			w1.dj = mc.djiacheng;
			w1.qj = mc.qjiacheng;
			w1.jjs = mc.gong;
			break;
		case 6:
			w1.jiangjun = zf.name;
			w1.bj = zf.bjiacheng;
			w1.gj = zf.gjiacheng;
			w1.dj = zf.djiacheng;
			w1.qj = zf.qjiacheng;
			w1.jjs = zf.gong;
			break;
		case 7:
			w1.jiangjun = hz.name;
			w1.bj = hz.bjiacheng;
			w1.gj = hz.gjiacheng;
			w1.dj = hz.djiacheng;
			w1.qj = hz.qjiacheng;
			w1.jjs = hz.gong;
			break;
		case 8:
			w1.jiangjun = xc.name;
			w1.bj = xc.bjiacheng;
			w1.gj = xc.gjiacheng;
			w1.dj = xc.djiacheng;
			w1.qj = xc.qjiacheng;
			w1.jjs = xc.gong;
			break;
		case 9:
			w1.jiangjun = sc.name;
			w1.bj = sc.bjiacheng;
			w1.gj = sc.gjiacheng;
			w1.dj = sc.djiacheng;
			w1.qj = sc.qjiacheng;
			w1.jjs = sc.gong;
			break;
		case 10:
			w1.jiangjun = dsc.name;
			w1.bj = dsc.bjiacheng;
			w1.gj = dsc.gjiacheng;
			w1.dj = dsc.djiacheng;
			w1.qj = dsc.qjiacheng;
			w1.jjs = dsc.gong;
			break;
		case 11:
			w1.jiangjun = xhd.name;
			w1.bj = xhd.bjiacheng;
			w1.gj = xhd.gjiacheng;
			w1.dj = xhd.djiacheng;
			w1.qj = xhd.qjiacheng;
			w1.jjs = xhd.gong;
			break;
		case 12:
			w1.jiangjun = xhy.name;
			w1.bj = xhy.bjiacheng;
			w1.gj = xhy.gjiacheng;
			w1.dj = xhy.djiacheng;
			w1.qj = xhy.qjiacheng;
			w1.jjs = xhy.gong;
			break;
		case 13:
			w1.jiangjun = zl.name;
			w1.bj = zl.bjiacheng;
			w1.gj = zl.gjiacheng;
			w1.dj = zl.djiacheng;
			w1.qj = zl.qjiacheng;
			w1.jjs = zl.gong;
			break;
		case 14:
			w1.jiangjun = zh.name;
			w1.bj = zh.bjiacheng;
			w1.gj = zh.gjiacheng;
			w1.dj = zh.djiacheng;
			w1.qj = zh.qjiacheng;
			w1.jjs = zh.gong;
			break;
		case 15:
			w1.jiangjun = xh.name;
			w1.bj = xh.bjiacheng;
			w1.gj = xh.gjiacheng;
			w1.dj = xh.djiacheng;
			w1.qj = xh.qjiacheng;
			w1.jjs = xh.gong;
			break;
		case 16:
			w1.jiangjun = pd.name;
			w1.bj = pd.bjiacheng;
			w1.gj = pd.gjiacheng;
			w1.dj = pd.djiacheng;
			w1.qj = pd.qjiacheng;
			w1.jjs = pd.gong;
			break;
		case 17:
			w1.jiangjun = gn.name;
			w1.bj = gn.bjiacheng;
			w1.gj = gn.gjiacheng;
			w1.dj = gn.djiacheng;
			w1.qj = gn.qjiacheng;
			w1.jjs = gn.gong;
			break;
		case 18:
			w1.jiangjun = zt.name;
			w1.bj = zt.bjiacheng;
			w1.gj = zt.gjiacheng;
			w1.dj = zt.djiacheng;
			w1.qj = zt.qjiacheng;
			w1.jjs = zt.gong;
			break;
		case 19:
			w1.jiangjun = wy.name;
			w1.bj = wy.bjiacheng;
			w1.gj = wy.gjiacheng;
			w1.dj = wy.djiacheng;
			w1.qj = wy.qjiacheng;
			w1.jjs = wy.gong;
			break;
		case 20:
			w1.jiangjun = zx.name;
			w1.bj = zx.bjiacheng;
			w1.gj = zx.gjiacheng;
			w1.dj = zx.djiacheng;
			w1.qj = zx.qjiacheng;
			w1.jjs = zx.gong;
			break;
		case 21:
			w1.jiangjun = wc.name;
			w1.bj = wc.bjiacheng;
			w1.gj = wc.gjiacheng;
			w1.dj = wc.djiacheng;
			w1.qj = wc.qjiacheng;
			w1.jjs = wc.gong;
			break;
		case 22:
			w1.jiangjun = yl.name;
			w1.bj = yl.bjiacheng;
			w1.gj = yl.gjiacheng;
			w1.dj = yl.djiacheng;
			w1.qj = yl.qjiacheng;
			w1.jjs = yl.gong;
			break;
		case 23:
			w1.jiangjun = dai.name;
			w1.bj = dai.bjiacheng;
			w1.gj = dai.gjiacheng;
			w1.dj = dai.djiacheng;
			w1.qj = dai.qjiacheng;
			w1.jjs = dai.gong;
			break;
		case 24:
			w1.jiangjun = jw.name;
			w1.bj = jw.bjiacheng;
			w1.gj = jw.gjiacheng;
			w1.dj = jw.djiacheng;
			w1.qj = jw.qjiacheng;
			w1.jjs = jw.gong;
			break;
		case 25:
			w1.jiangjun = zgl.name;
			w1.bj = zgl.bjiacheng;
			w1.gj = zgl.gjiacheng;
			w1.dj = zgl.djiacheng;
			w1.qj = zgl.qjiacheng;
			w1.jjs = zgl.gong;
			break;
	}
	switch (j2) {
		case 1:
			w2.jiangjun = lb.name;
			w2.bj = lb.bjiacheng;
			w2.gj = lb.gjiacheng;
			w2.dj = lb.djiacheng;
			w2.qj = lb.qjiacheng;
			w2.jjs = lb.gong;
			break;
		case 2:
			w2.jiangjun = zy.name;
			w2.bj = zy.bjiacheng;
			w2.gj = zy.gjiacheng;
			w2.dj = zy.djiacheng;
			w2.qj = zy.qjiacheng;
			w2.jjs = zy.gong;
			break;
		case 3:
			w2.jiangjun = dw.name;
			w2.bj = dw.bjiacheng;
			w2.gj = dw.gjiacheng;
			w2.dj = dw.djiacheng;
			w2.qj = dw.qjiacheng;
			w2.jjs = dw.gong;
			break;
		case 4:
			w2.jiangjun = gy.name;
			w2.bj = gy.bjiacheng;
			w2.gj = gy.gjiacheng;
			w2.dj = gy.djiacheng;
			w2.qj = gy.qjiacheng;
			w2.jjs = gy.gong;
			break;
		case 5:
			w2.jiangjun = mc.name;
			w2.bj = mc.bjiacheng;
			w2.gj = mc.gjiacheng;
			w2.dj = mc.djiacheng;
			w2.qj = mc.qjiacheng;
			w2.jjs = mc.gong;
			break;
		case 6:
			w2.jiangjun = zf.name;
			w2.bj = zf.bjiacheng;
			w2.gj = zf.gjiacheng;
			w2.dj = zf.djiacheng;
			w2.qj = zf.qjiacheng;
			w2.jjs = zf.gong;
			break;
		case 7:
			w2.jiangjun = hz.name;
			w2.bj = hz.bjiacheng;
			w2.gj = hz.gjiacheng;
			w2.dj = hz.djiacheng;
			w2.qj = hz.qjiacheng;
			w2.jjs = hz.gong;
			break;
		case 8:
			w2.jiangjun = xc.name;
			w2.bj = xc.bjiacheng;
			w2.gj = xc.gjiacheng;
			w2.dj = xc.djiacheng;
			w2.qj = xc.qjiacheng;
			w2.jjs = xc.gong;
			break;
		case 9:
			w2.jiangjun = sc.name;
			w2.bj = sc.bjiacheng;
			w2.gj = sc.gjiacheng;
			w2.dj = sc.djiacheng;
			w2.qj = sc.qjiacheng;
			w2.jjs = sc.gong;
			break;
		case 10:
			w2.jiangjun = dsc.name;
			w2.bj = dsc.bjiacheng;
			w2.gj = dsc.gjiacheng;
			w2.dj = dsc.djiacheng;
			w2.qj = dsc.qjiacheng;
			w2.jjs = dsc.gong;
			break;
		case 11:
			w2.jiangjun = xhd.name;
			w2.bj = xhd.bjiacheng;
			w2.gj = xhd.gjiacheng;
			w2.dj = xhd.djiacheng;
			w2.qj = xhd.qjiacheng;
			w2.jjs = xhd.gong;
			break;
		case 12:
			w2.jiangjun = xhy.name;
			w2.bj = xhy.bjiacheng;
			w2.gj = xhy.gjiacheng;
			w2.dj = xhy.djiacheng;
			w2.qj = xhy.qjiacheng;
			w2.jjs = xhy.gong;
			break;
		case 13:
			w2.jiangjun = zl.name;
			w2.bj = zl.bjiacheng;
			w2.gj = zl.gjiacheng;
			w2.dj = zl.djiacheng;
			w2.qj = zl.qjiacheng;
			w2.jjs = zl.gong;
			break;
		case 14:
			w2.jiangjun = zh.name;
			w2.bj = zh.bjiacheng;
			w2.gj = zh.gjiacheng;
			w2.dj = zh.djiacheng;
			w2.qj = zh.qjiacheng;
			w2.jjs = zh.gong;
			break;
		case 15:
			w2.jiangjun = xh.name;
			w2.bj = xh.bjiacheng;
			w2.gj = xh.gjiacheng;
			w2.dj = xh.djiacheng;
			w2.qj = xh.qjiacheng;
			w2.jjs = xh.gong;
			break;
		case 16:
			w2.jiangjun = pd.name;
			w2.bj = pd.bjiacheng;
			w2.gj = pd.gjiacheng;
			w2.dj = pd.djiacheng;
			w2.qj = pd.qjiacheng;
			w2.jjs = pd.gong;
			break;
		case 17:
			w2.jiangjun = gn.name;
			w2.bj = gn.bjiacheng;
			w2.gj = gn.gjiacheng;
			w2.dj = gn.djiacheng;
			w2.qj = gn.qjiacheng;
			w2.jjs = gn.gong;
			break;
		case 18:
			w2.jiangjun = zt.name;
			w2.bj = zt.bjiacheng;
			w2.gj = zt.gjiacheng;
			w2.dj = zt.djiacheng;
			w2.qj = zt.qjiacheng;
			w2.jjs = zt.gong;
			break;
		case 19:
			w2.jiangjun = wy.name;
			w2.bj = wy.bjiacheng;
			w2.gj = wy.gjiacheng;
			w2.dj = wy.djiacheng;
			w2.qj = wy.qjiacheng;
			w2.jjs = wy.gong;
			break;
		case 20:
			w2.jiangjun = zx.name;
			w2.bj = zx.bjiacheng;
			w2.gj = zx.gjiacheng;
			w2.dj = zx.djiacheng;
			w2.qj = zx.qjiacheng;
			w2.jjs = zx.gong;
			break;
		case 21:
			w2.jiangjun = wc.name;
			w2.bj = wc.bjiacheng;
			w2.gj = wc.gjiacheng;
			w2.dj = wc.djiacheng;
			w2.qj = wc.qjiacheng;
			w2.jjs = wc.gong;
			break;
		case 22:
			w2.jiangjun = yl.name;
			w2.bj = yl.bjiacheng;
			w2.gj = yl.gjiacheng;
			w2.dj = yl.djiacheng;
			w2.qj = yl.qjiacheng;
			w2.jjs = yl.gong;
			break;
		case 23:
			w2.jiangjun = dai.name;
			w2.bj = dai.bjiacheng;
			w2.gj = dai.gjiacheng;
			w2.dj = dai.djiacheng;
			w2.qj = dai.qjiacheng;
			w2.jjs = dai.gong;
			break;
		case 24:
			w2.jiangjun = jw.name;
			w2.bj = jw.bjiacheng;
			w2.gj = jw.gjiacheng;
			w2.dj = jw.djiacheng;
			w2.qj = jw.qjiacheng;
			w2.jjs = jw.gong;
			break;
		case 25:
			w2.jiangjun = zgl.name;
			w2.bj = zgl.bjiacheng;
			w2.gj = zgl.gjiacheng;
			w2.dj = zgl.djiacheng;
			w2.qj = zgl.qjiacheng;
			w2.jjs = zgl.gong;
			break;
	}
	switch (j3) {
		case 1:
			w3.jiangjun = lb.name;
			w3.bj = lb.bjiacheng;
			w3.gj = lb.gjiacheng;
			w3.dj = lb.djiacheng;
			w3.qj = lb.qjiacheng;
			w3.jjs = lb.gong;
			break;
		case 2:
			w3.jiangjun = zy.name;
			w3.bj = zy.bjiacheng;
			w3.gj = zy.gjiacheng;
			w3.dj = zy.djiacheng;
			w3.qj = zy.qjiacheng;
			w3.jjs = zy.gong;
			break;
		case 3:
			w3.jiangjun = dw.name;
			w3.bj = dw.bjiacheng;
			w3.gj = dw.gjiacheng;
			w3.dj = dw.djiacheng;
			w3.qj = dw.qjiacheng;
			w3.jjs = dw.gong;
			break;
		case 4:
			w3.jiangjun = gy.name;
			w3.bj = gy.bjiacheng;
			w3.gj = gy.gjiacheng;
			w3.dj = gy.djiacheng;
			w3.qj = gy.qjiacheng;
			w3.jjs = gy.gong;
			break;
		case 5:
			w3.jiangjun = mc.name;
			w3.bj = mc.bjiacheng;
			w3.gj = mc.gjiacheng;
			w3.dj = mc.djiacheng;
			w3.qj = mc.qjiacheng;
			w3.jjs = mc.gong;
			break;
		case 6:
			w3.jiangjun = zf.name;
			w3.bj = zf.bjiacheng;
			w3.gj = zf.gjiacheng;
			w3.dj = zf.djiacheng;
			w3.qj = zf.qjiacheng;
			w3.jjs = zf.gong;
			break;
		case 7:
			w3.jiangjun = hz.name;
			w3.bj = hz.bjiacheng;
			w3.gj = hz.gjiacheng;
			w3.dj = hz.djiacheng;
			w3.qj = hz.qjiacheng;
			w3.jjs = hz.gong;
			break;
		case 8:
			w3.jiangjun = xc.name;
			w3.bj = xc.bjiacheng;
			w3.gj = xc.gjiacheng;
			w3.dj = xc.djiacheng;
			w3.qj = xc.qjiacheng;
			w3.jjs = xc.gong;
			break;
		case 9:
			w3.jiangjun = sc.name;
			w3.bj = sc.bjiacheng;
			w3.gj = sc.gjiacheng;
			w3.dj = sc.djiacheng;
			w3.qj = sc.qjiacheng;
			w3.jjs = sc.gong;
			break;
		case 10:
			w3.jiangjun = dsc.name;
			w3.bj = dsc.bjiacheng;
			w3.gj = dsc.gjiacheng;
			w3.dj = dsc.djiacheng;
			w3.qj = dsc.qjiacheng;
			w3.jjs = dsc.gong;
			break;
		case 11:
			w3.jiangjun = xhd.name;
			w3.bj = xhd.bjiacheng;
			w3.gj = xhd.gjiacheng;
			w3.dj = xhd.djiacheng;
			w3.qj = xhd.qjiacheng;
			w3.jjs = xhd.gong;
			break;
		case 12:
			w3.jiangjun = xhy.name;
			w3.bj = xhy.bjiacheng;
			w3.gj = xhy.gjiacheng;
			w3.dj = xhy.djiacheng;
			w3.qj = xhy.qjiacheng;
			w3.jjs = xhy.gong;
			break;
		case 13:
			w3.jiangjun = zl.name;
			w3.bj = zl.bjiacheng;
			w3.gj = zl.gjiacheng;
			w3.dj = zl.djiacheng;
			w3.qj = zl.qjiacheng;
			w3.jjs = zl.gong;
			break;
		case 14:
			w3.jiangjun = zh.name;
			w3.bj = zh.bjiacheng;
			w3.gj = zh.gjiacheng;
			w3.dj = zh.djiacheng;
			w3.qj = zh.qjiacheng;
			w3.jjs = zh.gong;
			break;
		case 15:
			w3.jiangjun = xh.name;
			w3.bj = xh.bjiacheng;
			w3.gj = xh.gjiacheng;
			w3.dj = xh.djiacheng;
			w3.qj = xh.qjiacheng;
			w3.jjs = xh.gong;
			break;
		case 16:
			w3.jiangjun = pd.name;
			w3.bj = pd.bjiacheng;
			w3.gj = pd.gjiacheng;
			w3.dj = pd.djiacheng;
			w3.qj = pd.qjiacheng;
			w3.jjs = pd.gong;
			break;
		case 17:
			w3.jiangjun = gn.name;
			w3.bj = gn.bjiacheng;
			w3.gj = gn.gjiacheng;
			w3.dj = gn.djiacheng;
			w3.qj = gn.qjiacheng;
			w3.jjs = gn.gong;
			break;
		case 18:
			w3.jiangjun = zt.name;
			w3.bj = zt.bjiacheng;
			w3.gj = zt.gjiacheng;
			w3.dj = zt.djiacheng;
			w3.qj = zt.qjiacheng;
			w3.jjs = zt.gong;
			break;
		case 19:
			w3.jiangjun = wy.name;
			w3.bj = wy.bjiacheng;
			w3.gj = wy.gjiacheng;
			w3.dj = wy.djiacheng;
			w3.qj = wy.qjiacheng;
			w3.jjs = wy.gong;
			break;
		case 20:
			w3.jiangjun = zx.name;
			w3.bj = zx.bjiacheng;
			w3.gj = zx.gjiacheng;
			w3.dj = zx.djiacheng;
			w3.qj = zx.qjiacheng;
			w3.jjs = zx.gong;
			break;
		case 21:
			w3.jiangjun = wc.name;
			w3.bj = wc.bjiacheng;
			w3.gj = wc.gjiacheng;
			w3.dj = wc.djiacheng;
			w3.qj = wc.qjiacheng;
			w3.jjs = wc.gong;
			break;
		case 22:
			w3.jiangjun = yl.name;
			w3.bj = yl.bjiacheng;
			w3.gj = yl.gjiacheng;
			w3.dj = yl.djiacheng;
			w3.qj = yl.qjiacheng;
			w3.jjs = yl.gong;
			break;
		case 23:
			w3.jiangjun = dai.name;
			w3.bj = dai.bjiacheng;
			w3.gj = dai.gjiacheng;
			w3.dj = dai.djiacheng;
			w3.qj = dai.qjiacheng;
			w3.jjs = dai.gong;
			break;
		case 24:
			w3.jiangjun = jw.name;
			w3.bj = jw.bjiacheng;
			w3.gj = jw.gjiacheng;
			w3.dj = jw.djiacheng;
			w3.qj = jw.qjiacheng;
			w3.jjs = jw.gong;
			break;
		case 25:
			w3.jiangjun = zgl.name;
			w3.bj = zgl.bjiacheng;
			w3.gj = zgl.gjiacheng;
			w3.dj = zgl.djiacheng;
			w3.qj = zgl.qjiacheng;
			w3.jjs = zgl.gong;
			break;
	}
	cout << w1.jiangjun;
	cout << "\n\n                    第二集团军将军:";
	cout << w2.jiangjun;
	cout << "\n\n                    第三集团军将军:";
	cout << w3.jiangjun;
	cout << endl << endl;
	system("pause");
	system("cls");
	Bai();
	Yan(1);
	cout << "\n\n\n\n\n                    敌将抽取中.\n\n";
dwj:
	int dj1, dj2, dj3;
	srand(time(0));
	dj1 = rand() % 25 + 1;
	Sleep(1000);
	system("cls");
	cout << "\n\n\n\n\n                    敌将抽取中..";
	srand(time(0));
	dj2 = rand() % 25 + 1;
	Sleep(1000);
	system("cls");
	cout << "\n\n\n\n\n                    敌将抽取中...";
	system("cls");
	srand(time(0));
	dj3 = rand() % 25 + 1;
	if (dj1 == dj2 || dj2 == dj3 || dj3 == dj1 || j1 == dj1 || j1 == dj2 || j1 == dj3 || j2 == dj1 || j2 == dj2 || j2 == dj3 || j3 == dj1 || j3 == dj2 || j3 == dj3) goto dwj;
	Yan(2);
	cout << "\n\n\n                   !抽取成功!";
	Yan(5);
	cout << "\n\n                    敌第一集团军将军:";

	switch (dj1) {
		case 1:
			d1.jiangjun = lb.name;
			d1.bj = lb.bjiacheng;
			d1.gj = lb.gjiacheng;
			d1.dj = lb.djiacheng;
			d1.qj = lb.qjiacheng;
			d1.jjs = lb.gong;
			break;
		case 2:
			d1.jiangjun = zy.name;
			d1.bj = zy.bjiacheng;
			d1.gj = zy.gjiacheng;
			d1.dj = zy.djiacheng;
			d1.qj = zy.qjiacheng;
			d1.jjs = zy.gong;
			break;
		case 3:
			d1.jiangjun = dw.name;
			d1.bj = dw.bjiacheng;
			d1.gj = dw.gjiacheng;
			d1.dj = dw.djiacheng;
			d1.qj = dw.qjiacheng;
			d1.jjs = dw.gong;
			break;
		case 4:
			d1.jiangjun = gy.name;
			d1.bj = gy.bjiacheng;
			d1.gj = gy.gjiacheng;
			d1.dj = gy.djiacheng;
			d1.qj = gy.qjiacheng;
			d1.jjs = gy.gong;
			break;
		case 5:
			d1.jiangjun = mc.name;
			d1.bj = mc.bjiacheng;
			d1.gj = mc.gjiacheng;
			d1.dj = mc.djiacheng;
			d1.qj = mc.qjiacheng;
			d1.jjs = mc.gong;
			break;
		case 6:
			d1.jiangjun = zf.name;
			d1.bj = zf.bjiacheng;
			d1.gj = zf.gjiacheng;
			d1.dj = zf.djiacheng;
			d1.qj = zf.qjiacheng;
			d1.jjs = zf.gong;
			break;
		case 7:
			d1.jiangjun = hz.name;
			d1.bj = hz.bjiacheng;
			d1.gj = hz.gjiacheng;
			d1.dj = hz.djiacheng;
			d1.qj = hz.qjiacheng;
			d1.jjs = hz.gong;
			break;
		case 8:
			d1.jiangjun = xc.name;
			d1.bj = xc.bjiacheng;
			d1.gj = xc.gjiacheng;
			d1.dj = xc.djiacheng;
			d1.qj = xc.qjiacheng;
			d1.jjs = xc.gong;
			break;
		case 9:
			d1.jiangjun = sc.name;
			d1.bj = sc.bjiacheng;
			d1.gj = sc.gjiacheng;
			d1.dj = sc.djiacheng;
			d1.qj = sc.qjiacheng;
			d1.jjs = sc.gong;
			break;
		case 10:
			d1.jiangjun = dsc.name;
			d1.bj = dsc.bjiacheng;
			d1.gj = dsc.gjiacheng;
			d1.dj = dsc.djiacheng;
			d1.qj = dsc.qjiacheng;
			d1.jjs = dsc.gong;
			break;
		case 11:
			d1.jiangjun = xhd.name;
			d1.bj = xhd.bjiacheng;
			d1.gj = xhd.gjiacheng;
			d1.dj = xhd.djiacheng;
			d1.qj = xhd.qjiacheng;
			d1.jjs = xhd.gong;
			break;
		case 12:
			d1.jiangjun = xhy.name;
			d1.bj = xhy.bjiacheng;
			d1.gj = xhy.gjiacheng;
			d1.dj = xhy.djiacheng;
			d1.qj = xhy.qjiacheng;
			d1.jjs = xhy.gong;
			break;
		case 13:
			d1.jiangjun = zl.name;
			d1.bj = zl.bjiacheng;
			d1.gj = zl.gjiacheng;
			d1.dj = zl.djiacheng;
			d1.qj = zl.qjiacheng;
			d1.jjs = zl.gong;
			break;
		case 14:
			d1.jiangjun = zh.name;
			d1.bj = zh.bjiacheng;
			d1.gj = zh.gjiacheng;
			d1.dj = zh.djiacheng;
			d1.qj = zh.qjiacheng;
			d1.jjs = zh.gong;
			break;
		case 15:
			d1.jiangjun = xh.name;
			d1.bj = xh.bjiacheng;
			d1.gj = xh.gjiacheng;
			d1.dj = xh.djiacheng;
			d1.qj = xh.qjiacheng;
			d1.jjs = xh.gong;
			break;
		case 16:
			d1.jiangjun = pd.name;
			d1.bj = pd.bjiacheng;
			d1.gj = pd.gjiacheng;
			d1.dj = pd.djiacheng;
			d1.qj = pd.qjiacheng;
			d1.jjs = pd.gong;
			break;
		case 17:
			d1.jiangjun = gn.name;
			d1.bj = gn.bjiacheng;
			d1.gj = gn.gjiacheng;
			d1.dj = gn.djiacheng;
			d1.qj = gn.qjiacheng;
			d1.jjs = gn.gong;
			break;
		case 18:
			d1.jiangjun = zt.name;
			d1.bj = zt.bjiacheng;
			d1.gj = zt.gjiacheng;
			d1.dj = zt.djiacheng;
			d1.qj = zt.qjiacheng;
			d1.jjs = zt.gong;
			break;
		case 19:
			d1.jiangjun = wy.name;
			d1.bj = wy.bjiacheng;
			d1.gj = wy.gjiacheng;
			d1.dj = wy.djiacheng;
			d1.qj = wy.qjiacheng;
			d1.jjs = wy.gong;
			break;
		case 20:
			d1.jiangjun = zx.name;
			d1.bj = zx.bjiacheng;
			d1.gj = zx.gjiacheng;
			d1.dj = zx.djiacheng;
			d1.qj = zx.qjiacheng;
			d1.jjs = zx.gong;
			break;
		case 21:
			d1.jiangjun = wc.name;
			d1.bj = wc.bjiacheng;
			d1.gj = wc.gjiacheng;
			d1.dj = wc.djiacheng;
			d1.qj = wc.qjiacheng;
			d1.jjs = wc.gong;
			break;
		case 22:
			d1.jiangjun = yl.name;
			d1.bj = yl.bjiacheng;
			d1.gj = yl.gjiacheng;
			d1.dj = yl.djiacheng;
			d1.qj = yl.qjiacheng;
			d1.jjs = yl.gong;
			break;
		case 23:
			d1.jiangjun = dai.name;
			d1.bj = dai.bjiacheng;
			d1.gj = dai.gjiacheng;
			d1.dj = dai.djiacheng;
			d1.qj = dai.qjiacheng;
			d1.jjs = dai.gong;
			break;
		case 24:
			d1.jiangjun = jw.name;
			d1.bj = jw.bjiacheng;
			d1.gj = jw.gjiacheng;
			d1.dj = jw.djiacheng;
			d1.qj = jw.qjiacheng;
			d1.jjs = jw.gong;
			break;
		case 25:
			d1.jiangjun = zgl.name;
			d1.bj = zgl.bjiacheng;
			d1.gj = zgl.gjiacheng;
			d1.dj = zgl.djiacheng;
			d1.qj = zgl.qjiacheng;
			d1.jjs = zgl.gong;
			break;
	}
	switch (dj2) {
		case 1:
			d2.jiangjun = lb.name;
			d2.bj = lb.bjiacheng;
			d2.gj = lb.gjiacheng;
			d2.dj = lb.djiacheng;
			d2.qj = lb.qjiacheng;
			d2.jjs = lb.gong;
			break;
		case 2:
			d2.jiangjun = zy.name;
			d2.bj = zy.bjiacheng;
			d2.gj = zy.gjiacheng;
			d2.dj = zy.djiacheng;
			d2.qj = zy.qjiacheng;
			d2.jjs = zy.gong;
			break;
		case 3:
			d2.jiangjun = dw.name;
			d2.bj = dw.bjiacheng;
			d2.gj = dw.gjiacheng;
			d2.dj = dw.djiacheng;
			d2.qj = dw.qjiacheng;
			d2.jjs = dw.gong;
			break;
		case 4:
			d2.jiangjun = gy.name;
			d2.bj = gy.bjiacheng;
			d2.gj = gy.gjiacheng;
			d2.dj = gy.djiacheng;
			d2.qj = gy.qjiacheng;
			d2.jjs = gy.gong;
			break;
		case 5:
			d2.jiangjun = mc.name;
			d2.bj = mc.bjiacheng;
			d2.gj = mc.gjiacheng;
			d2.dj = mc.djiacheng;
			d2.qj = mc.qjiacheng;
			d2.jjs = mc.gong;
			break;
		case 6:
			d2.jiangjun = zf.name;
			d2.bj = zf.bjiacheng;
			d2.gj = zf.gjiacheng;
			d2.dj = zf.djiacheng;
			d2.qj = zf.qjiacheng;
			d2.jjs = zf.gong;
			break;
		case 7:
			d2.jiangjun = hz.name;
			d2.bj = hz.bjiacheng;
			d2.gj = hz.gjiacheng;
			d2.dj = hz.djiacheng;
			d2.qj = hz.qjiacheng;
			d2.jjs = hz.gong;
			break;
		case 8:
			d2.jiangjun = xc.name;
			d2.bj = xc.bjiacheng;
			d2.gj = xc.gjiacheng;
			d2.dj = xc.djiacheng;
			d2.qj = xc.qjiacheng;
			d2.jjs = xc.gong;
			break;
		case 9:
			d2.jiangjun = sc.name;
			d2.bj = sc.bjiacheng;
			d2.gj = sc.gjiacheng;
			d2.dj = sc.djiacheng;
			d2.qj = sc.qjiacheng;
			d2.jjs = sc.gong;
			break;
		case 10:
			d2.jiangjun = dsc.name;
			d2.bj = dsc.bjiacheng;
			d2.gj = dsc.gjiacheng;
			d2.dj = dsc.djiacheng;
			d2.qj = dsc.qjiacheng;
			d2.jjs = dsc.gong;
			break;
		case 11:
			d2.jiangjun = xhd.name;
			d2.bj = xhd.bjiacheng;
			d2.gj = xhd.gjiacheng;
			d2.dj = xhd.djiacheng;
			d2.qj = xhd.qjiacheng;
			d2.jjs = xhd.gong;
			break;
		case 12:
			d2.jiangjun = xhy.name;
			d2.bj = xhy.bjiacheng;
			d2.gj = xhy.gjiacheng;
			d2.dj = xhy.djiacheng;
			d2.qj = xhy.qjiacheng;
			d2.jjs = xhy.gong;
			break;
		case 13:
			d2.jiangjun = zl.name;
			d2.bj = zl.bjiacheng;
			d2.gj = zl.gjiacheng;
			d2.dj = zl.djiacheng;
			d2.qj = zl.qjiacheng;
			d2.jjs = zl.gong;
			break;
		case 14:
			d2.jiangjun = zh.name;
			d2.bj = zh.bjiacheng;
			d2.gj = zh.gjiacheng;
			d2.dj = zh.djiacheng;
			d2.qj = zh.qjiacheng;
			d2.jjs = zh.gong;
			break;
		case 15:
			d2.jiangjun = xh.name;
			d2.bj = xh.bjiacheng;
			d2.gj = xh.gjiacheng;
			d2.dj = xh.djiacheng;
			d2.qj = xh.qjiacheng;
			d2.jjs = xh.gong;
			break;
		case 16:
			d2.jiangjun = pd.name;
			d2.bj = pd.bjiacheng;
			d2.gj = pd.gjiacheng;
			d2.dj = pd.djiacheng;
			d2.qj = pd.qjiacheng;
			d2.jjs = pd.gong;
			break;
		case 17:
			d2.jiangjun = gn.name;
			d2.bj = gn.bjiacheng;
			d2.gj = gn.gjiacheng;
			d2.dj = gn.djiacheng;
			d2.qj = gn.qjiacheng;
			d2.jjs = gn.gong;
			break;
		case 18:
			d2.jiangjun = zt.name;
			d2.bj = zt.bjiacheng;
			d2.gj = zt.gjiacheng;
			d2.dj = zt.djiacheng;
			d2.qj = zt.qjiacheng;
			d2.jjs = zt.gong;
			break;
		case 19:
			d2.jiangjun = wy.name;
			d2.bj = wy.bjiacheng;
			d2.gj = wy.gjiacheng;
			d2.dj = wy.djiacheng;
			d2.qj = wy.qjiacheng;
			d2.jjs = wy.gong;
			break;
		case 20:
			d2.jiangjun = zx.name;
			d2.bj = zx.bjiacheng;
			d2.gj = zx.gjiacheng;
			d2.dj = zx.djiacheng;
			d2.qj = zx.qjiacheng;
			d2.jjs = zx.gong;
			break;
		case 21:
			d2.jiangjun = wc.name;
			d2.bj = wc.bjiacheng;
			d2.gj = wc.gjiacheng;
			d2.dj = wc.djiacheng;
			d2.qj = wc.qjiacheng;
			d2.jjs = wc.gong;
			break;
		case 22:
			d2.jiangjun = yl.name;
			d2.bj = yl.bjiacheng;
			d2.gj = yl.gjiacheng;
			d2.dj = yl.djiacheng;
			d2.qj = yl.qjiacheng;
			d2.jjs = yl.gong;
			break;
		case 23:
			d2.jiangjun = dai.name;
			d2.bj = dai.bjiacheng;
			d2.gj = dai.gjiacheng;
			d2.dj = dai.djiacheng;
			d2.qj = dai.qjiacheng;
			d2.jjs = dai.gong;
			break;
		case 24:
			d2.jiangjun = jw.name;
			d2.bj = jw.bjiacheng;
			d2.gj = jw.gjiacheng;
			d2.dj = jw.djiacheng;
			d2.qj = jw.qjiacheng;
			d2.jjs = jw.gong;
			break;
		case 25:
			d2.jiangjun = zgl.name;
			d2.bj = zgl.bjiacheng;
			d2.gj = zgl.gjiacheng;
			d2.dj = zgl.djiacheng;
			d2.qj = zgl.qjiacheng;
			d2.jjs = zgl.gong;
			break;
	}
	switch (dj3) {
		case 1:
			d3.jiangjun = lb.name;
			d3.bj = lb.bjiacheng;
			d3.gj = lb.gjiacheng;
			d3.dj = lb.djiacheng;
			d3.qj = lb.qjiacheng;
			d3.jjs = lb.gong;
			break;
		case 2:
			d3.jiangjun = zy.name;
			d3.bj = zy.bjiacheng;
			d3.gj = zy.gjiacheng;
			d3.dj = zy.djiacheng;
			d3.qj = zy.qjiacheng;
			d3.jjs = zy.gong;
			break;
		case 3:
			d3.jiangjun = dw.name;
			d3.bj = dw.bjiacheng;
			d3.gj = dw.gjiacheng;
			d3.dj = dw.djiacheng;
			d3.qj = dw.qjiacheng;
			d3.jjs = dw.gong;
			break;
		case 4:
			d3.jiangjun = gy.name;
			d3.bj = gy.bjiacheng;
			d3.gj = gy.gjiacheng;
			d3.dj = gy.djiacheng;
			d3.qj = gy.qjiacheng;
			d3.jjs = gy.gong;
			break;
		case 5:
			d3.jiangjun = mc.name;
			d3.bj = mc.bjiacheng;
			d3.gj = mc.gjiacheng;
			d3.dj = mc.djiacheng;
			d3.qj = mc.qjiacheng;
			d3.jjs = mc.gong;
			break;
		case 6:
			d3.jiangjun = zf.name;
			d3.bj = zf.bjiacheng;
			d3.gj = zf.gjiacheng;
			d3.dj = zf.djiacheng;
			d3.qj = zf.qjiacheng;
			d3.jjs = zf.gong;
			break;
		case 7:
			d3.jiangjun = hz.name;
			d3.bj = hz.bjiacheng;
			d3.gj = hz.gjiacheng;
			d3.dj = hz.djiacheng;
			d3.qj = hz.qjiacheng;
			d3.jjs = hz.gong;
			break;
		case 8:
			d3.jiangjun = xc.name;
			d3.bj = xc.bjiacheng;
			d3.gj = xc.gjiacheng;
			d3.dj = xc.djiacheng;
			d3.qj = xc.qjiacheng;
			d3.jjs = xc.gong;
			break;
		case 9:
			d3.jiangjun = sc.name;
			d3.bj = sc.bjiacheng;
			d3.gj = sc.gjiacheng;
			d3.dj = sc.djiacheng;
			d3.qj = sc.qjiacheng;
			d3.jjs = sc.gong;
			break;
		case 10:
			d3.jiangjun = dsc.name;
			d3.bj = dsc.bjiacheng;
			d3.gj = dsc.gjiacheng;
			d3.dj = dsc.djiacheng;
			d3.qj = dsc.qjiacheng;
			d3.jjs = dsc.gong;
			break;
		case 11:
			d3.jiangjun = xhd.name;
			d3.bj = xhd.bjiacheng;
			d3.gj = xhd.gjiacheng;
			d3.dj = xhd.djiacheng;
			d3.qj = xhd.qjiacheng;
			d3.jjs = xhd.gong;
			break;
		case 12:
			d3.jiangjun = xhy.name;
			d3.bj = xhy.bjiacheng;
			d3.gj = xhy.gjiacheng;
			d3.dj = xhy.djiacheng;
			d3.qj = xhy.qjiacheng;
			d3.jjs = xhy.gong;
			break;
		case 13:
			d3.jiangjun = zl.name;
			d3.bj = zl.bjiacheng;
			d3.gj = zl.gjiacheng;
			d3.dj = zl.djiacheng;
			d3.qj = zl.qjiacheng;
			d3.jjs = zl.gong;
			break;
		case 14:
			d3.jiangjun = zh.name;
			d3.bj = zh.bjiacheng;
			d3.gj = zh.gjiacheng;
			d3.dj = zh.djiacheng;
			d3.qj = zh.qjiacheng;
			d3.jjs = zh.gong;
			break;
		case 15:
			d3.jiangjun = xh.name;
			d3.bj = xh.bjiacheng;
			d3.gj = xh.gjiacheng;
			d3.dj = xh.djiacheng;
			d3.qj = xh.qjiacheng;
			d3.jjs = xh.gong;
			break;
		case 16:
			d3.jiangjun = pd.name;
			d3.bj = pd.bjiacheng;
			d3.gj = pd.gjiacheng;
			d3.dj = pd.djiacheng;
			d3.qj = pd.qjiacheng;
			d3.jjs = pd.gong;
			break;
		case 17:
			d3.jiangjun = gn.name;
			d3.bj = gn.bjiacheng;
			d3.gj = gn.gjiacheng;
			d3.dj = gn.djiacheng;
			d3.qj = gn.qjiacheng;
			d3.jjs = gn.gong;
			break;
		case 18:
			d3.jiangjun = zt.name;
			d3.bj = zt.bjiacheng;
			d3.gj = zt.gjiacheng;
			d3.dj = zt.djiacheng;
			d3.qj = zt.qjiacheng;
			d3.jjs = zt.gong;
			break;
		case 19:
			d3.jiangjun = wy.name;
			d3.bj = wy.bjiacheng;
			d3.gj = wy.gjiacheng;
			d3.dj = wy.djiacheng;
			d3.qj = wy.qjiacheng;
			d3.jjs = wy.gong;
			break;
		case 20:
			d3.jiangjun = zx.name;
			d3.bj = zx.bjiacheng;
			d3.gj = zx.gjiacheng;
			d3.dj = zx.djiacheng;
			d3.qj = zx.qjiacheng;
			d3.jjs = zx.gong;
			break;
		case 21:
			d3.jiangjun = wc.name;
			d3.bj = wc.bjiacheng;
			d3.gj = wc.gjiacheng;
			d3.dj = wc.djiacheng;
			d3.qj = wc.qjiacheng;
			d3.jjs = wc.gong;
			break;
		case 22:
			d3.jiangjun = yl.name;
			d3.bj = yl.bjiacheng;
			d3.gj = yl.gjiacheng;
			d3.dj = yl.djiacheng;
			d3.qj = yl.qjiacheng;
			d3.jjs = yl.gong;
			break;
		case 23:
			d3.jiangjun = dai.name;
			d3.bj = dai.bjiacheng;
			d3.gj = dai.gjiacheng;
			d3.dj = dai.djiacheng;
			d3.qj = dai.qjiacheng;
			d3.jjs = dai.gong;
			break;
		case 24:
			d3.jiangjun = jw.name;
			d3.bj = jw.bjiacheng;
			d3.gj = jw.gjiacheng;
			d3.dj = jw.djiacheng;
			d3.qj = jw.qjiacheng;
			d3.jjs = jw.gong;
			break;
		case 25:
			d3.jiangjun = zgl.name;
			d3.bj = zgl.bjiacheng;
			d3.gj = zgl.gjiacheng;
			d3.dj = zgl.djiacheng;
			d3.qj = zgl.qjiacheng;
			d3.jjs = zgl.gong;
			break;
	}
	cout << d1.jiangjun;
	cout << "\n\n                    敌第二集团军将军:";
	cout << d2.jiangjun;
	cout << "\n\n                    敌第三集团军将军:";
	cout << d3.jiangjun;
	cout << endl << endl;
	system("pause");
	while (1) {
		system("cls");
		tb += wchengshu * 10;
		budui();
	}
	return 0;
}
void zhandou(int shei, int dshei) {
	int woshang;
	int dishang;
	int woxue, dixue;
	switch (shei) {
		case 1:
			woshang = w1.b * w1.bj * q.gong + w1.d * w1.dj * d.gong + w1.q * w1.qj * j.gong + w1.g * w1.gj * g.gong;
			woxue = w1.b * w1.bj * q.xue + w1.d * w1.dj * d.xue + w1.q * w1.qj * j.xue + w1.g * w1.gj * g.xue;
			break;
		case 2:
			woshang = w2.b * w2.bj * q.gong + w2.d * w2.dj * d.gong + w2.q * w2.qj * j.gong + w2.g * w2.gj * g.gong;
			woxue = w2.b * w2.bj * q.xue + w2.d * w2.dj * d.xue + w2.q * w2.qj * j.xue + w2.g * w2.gj * g.xue;
			break;
		case 3:
			woshang = w3.b * w3.bj * q.gong + w3.d * w3.dj * d.gong + w3.q * w3.qj * j.gong + w3.g * w3.gj * g.gong;
			woxue = w3.b * w3.bj * q.xue + w3.d * w3.dj * d.xue + w3.q * w3.qj * j.xue + w3.g * w3.gj * g.xue;
			break;
	}
	switch (dshei) {
		case 1:
			dishang = d1.b * d1.bj * q.gong + d1.d * d1.dj * d.gong + d1.q * d1.qj * j.gong + d1.g * d1.gj * g.gong;
			dixue = d1.b * d1.bj * q.xue + d1.d * d1.dj * d.xue + d1.q * d1.qj * j.xue + d1.g * d1.gj * g.xue;
			break;
		case 2:
			dishang = d2.b * d2.bj * q.gong + d2.d * d2.dj * d.gong + d2.q * d2.qj * j.gong + d2.g * d2.gj * g.gong;
			dixue = d2.b * d2.bj * q.xue + d2.d * d2.dj * d.xue + d2.q * d2.qj * j.xue + d2.g * d2.gj * g.xue;
			break;
		case 3:
			dishang = d3.b * d3.bj * q.gong + d3.d * d3.dj * d.gong + d3.q * d3.qj * j.gong + d3.g * d3.gj * g.gong;
			dixue = d3.b * d3.bj * q.xue + d3.d * d3.dj * d.xue + d3.q * d3.qj * j.xue + d3.g * d3.gj * g.xue;
			break;
	}
	if (dishang >= woxue) {
		switch (shei) {
			case 1:
				cout << "\n\n第一集团军全军覆没 大将" << w1.jiangjun << "战死";
				w1.state = 0;
				break;
			case 2:
				cout << "\n\n第二集团军全军覆没 大将" << w2.jiangjun << "战死";
				w2.state = 0;
				break;
			case 3:

				cout << "\n\n第三集团军全军覆没 大将" << w3.jiangjun << "战死";
				w3.state = 0;
				break;
		}
	}
	if (woshang >= dixue) {
		switch (dshei) {
			case 1:
				cout << "\n\n敌第一集团军全军覆没 大将" << d1.jiangjun << "战死";
				w1.state = 0;
				break;
			case 2:
				cout << "\n\n敌第二集团军全军覆没 大将" << d2.jiangjun << "战死";
				w2.state = 0;
				break;
			case 3:

				cout << "\n\n敌第三集团军全军覆没 大将" << d3.jiangjun << "战死";
				w3.state = 0;
				break;
		}
	}
	cout << "\n\n";
	system("cls");//			woxue = w1.b * w1.bj * q.xue + w1.d * w1.dj * d.xue + w1.q * w1.qj * j.xue + w1.g * w1.gj * g.xue;
	cout << "   我军剩余: 枪兵:" << w1.q << " 盾兵:" << w1.d << " 弓兵:" << w1.g << " 骑兵:" << w1.q;
	cout << "\n   敌军剩余: 枪兵:" << d1.q << " 盾兵:" << d1.d << " 弓兵:" << d1.g << " 骑兵:" << d1.q;
	cout << "\n\n我盾兵造成伤害 " << w1.d * w1.dj * d.gong ;
	cout << "    敌盾兵造成伤害 " << d1.d * d1.dj * d.gong ;
	if (w1.d != 0) {
		if (d1.d * d1.dj * d.xue > w1.d * w1.dj * d.gong ) {
			d1.d = d1.d * d1.dj * d.xue - w1.d * w1.dj * d.gong / d.xue;
		} else {
			d1.d = 0;
			cout << "\n我盾兵覆灭";

		}
	}
	if (d1.d != 0) {
		if (d1.d * d1.dj * d.xue > w1.d * w1.dj * d.gong ) {
			d1.d = d1.d * d1.dj * d.xue - w1.d * w1.dj * d.gong / d.xue;
		} else {
			d1.d = 0;
			cout << "\n敌盾兵覆灭";

		}
	}
	cout << "  \n弓兵造成伤害 " << w1.g * w1.gj * g.gong;
	if (d1.d * d1.dj * d.xue > w1.d * w1.dj * d.gong ) {
		d1.d = d1.d * d1.dj * d.xue - w1.d * w1.dj * d.gong / d.xue;
	}
	cout << "  \n武将造成伤害 " << w1.jjs;
}

后记

作者:zty郑桐羽呀

联系方式:(不挂了,有事私信)