C++枪战小游戏停电救援(最终版,已完结)

cpp 复制代码
//0,0 1535,863
//12,62 92,218
#include<algorithm>
#include<fstream>
#include<iostream>
#include<stdio.h>
#include<cstdio>
#include<iostream>
#include<windows.h>
#include<conio.h>
#include <time.h>
#include <stdlib.h>
#include<bits/stdc++.h>
#include<cstdio>
#include<algorithm>
#include <windows.h>
#include <stdlib.h>
#include <time.h>
#include "conio.h"
#include <iomanip>		//setw()函数所在库
#include <iostream>
#include <Windows.h>
HWND hMainWnd;  //主窗口句柄
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) //必要的,要背下来
using namespace std;
int HP=100;
int fx=2;
int cd;
int go;
int dHP=100;
int zd=20;
int x,y;
int dx,dy;
CONSOLE_CURSOR_INFO info = { 1, 0 };				//创建光标的属性结构体
HANDLE hand = GetStdHandle( STD_OUTPUT_HANDLE );	//创建光标的句柄
COORD coord = { 0, 0 };								//创建xy坐标结构体,用于设置光标位置
POINT pt = { 0, 0 };								//创建鼠标点坐标变量
int first() {
	char c;
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"----------"<<endl;
	cout<<"| 黑客小C |"<<endl;
	cout<<"----------"<<endl;
	Sleep(2000);
	system("cls");
	cout<<"----------"<<endl;
	cout<<"|停电救援|"<<endl;
	cout<<"----------"<<endl;
	while(!kbhit()) {

	}
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"加载中..."<<endl;
	cout<<"tips:玩家向鼠标(手指按下)移动,鼠标()手指在屏幕上方任务向上走,下方向下走,左方向左走,右方向右走(请开全屏,提升体验效果),按下鼠标(手指)开枪,请注意电脑(手机、平板)配置、状态,本游戏非常吃配置,可能会卡顿。";
	Sleep(5000);
	system("cls");
}
int AI_1() {
	go++;
	if(go%3!=0){
		return 0;
	}
	if(dHP<=0) {
		return 0;
	}
	if(x>dx&&dx<9&&dy!=y) {
		dx++;
	}
	if(y>dy&&dy<9&&dx!=x) {
		dy++;
	}
	if(x<dx&&dx>1&&dy!=y) {
		dx--;
	}
	if(y<dy&&dy>1&&dx!=x) {
		dy--;
	}
	if(y==dy||x==dx) {
		HP-=5;
	}
}
int AI_2() {
	go++;
	if(go%3!=0){
		return 0;
	}
	if(dHP<=0) {
		return 0;
	}
	if(x>dx&&dx<9) {
		dx++;
	}
	if(y>dy&&dy<9) {
		dy++;
	}
	if(x<dx&&dx>1) {
		dx--;
	}
	if(y<dy&&dy>1) {
		dy--;
	}
	if(x==dx&&y==dy) {
		HP-=25;
	}
}
int map_out(int x) {
	if(x==1) {
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
		cout<<"*";
	}
	if(x==2) {
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY );
		cout<<"*";
	}
}
int out_1() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(1);
			} else if(j==0||j==10) {
				map_out(1);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY );
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_2() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_BLUE);
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_3() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_4() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY );
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_5() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"O";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_6() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY );
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_7() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY );
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_8() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_BLUE);
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_9() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(1);
			} else if(j==0||j==10) {
				map_out(1);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_BLUE);
				cout<<"O";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_10() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY );
				cout<<"A";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int out_11() {
	system("cls");
	cout<<"HP:"<<HP<<"子弹:"<<zd<<endl;
	for(int i=0; i<11; i++) {
		for(int j=0; j<11; j++) {
			if(i==0||i==10) {
				map_out(2);
			} else if(j==0||j==10) {
				map_out(2);
			} else if(i==x&&j==y) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_GREEN);
				cout<<"A";
			} else if(i==dx&&j==dy) {
				SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY );
				cout<<"N";
			}  else {
				cout<<" ";
			}
		}
		cout<<endl;
	}
}
int play() {
	char c;
	int a;
	SetConsoleCursorPosition( hand, coord );		//传入光标句柄和坐标设置光标位置
	GetCursorPos ( &pt );
	if(zd<=0){
		zd=20;
		return 0;
	}
	if(pt.x<=20&&y>1) {
		y--;
		fx=1;
	}
	if(pt.x>=1515&&y<9) {
		y++;
		fx=2;
	}
	if(pt.y<=20&&x>1) {
		x--;
		fx=3;
	}
	if(pt.y>=843&&x<9) {
		x++;
		fx=4;
	}
	if (KEY_DOWN(MOUSE_EVENT)||KEY_DOWN(MOUSE_MOVED)) {
		if(fx==1&&dy<y){
			dHP-=20; 
		}
		if(fx==2&&dy>y){
			dHP-=20; 
		}
		if(fx==3&&dx<x){
			dHP-=20; 
		}
		if(fx==4&&dx>x){
			dHP-=20; 
		}
		zd--;
	}  
}
int vs_1() {
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=100;
		dx=9;
		dy=9;
		while(true) {
			out_1();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_2() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=10;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=150;
		dx=9;
		dy=9;
		while(true) {
			out_2();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(100);
		}
	}
}
int vs_3() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=300;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=100;
		dx=9;
		dy=9;
		while(true) {
			out_3();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(100);
		}
	}
}
int vs_4() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=100;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=100;
		dx=9;
		dy=9;
		while(true) {
			out_4();
			play();
			AI_1();
			if(x==dx&&y==dy){
				HP=0;
			}
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_5() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=100;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_5();
			play();
			AI_2();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_6() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=120;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_6();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_7() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=100;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_7();
			play();
			AI_2();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_8() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=150;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_7();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_9() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=150;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_8();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_10() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=90;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_7();
			play();
			AI_2();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_11() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=100;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=100;
		dx=9;
		dy=9;
		while(true) {
			out_1();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_12() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=160;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_1();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_13() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=200;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=200;
		dx=9;
		dy=9;
		while(true) {
			out_9();
			play();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_14() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=160;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_1();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_15() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=120;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_10();
			play();
			AI_2();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_16() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=120;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_10();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_17() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=90;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_10();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_18() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=130;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_10();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_19() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=90;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_11();
			play();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_20() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=100;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_7();
			play();
			AI_2();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_21() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=180;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=50;
		dx=9;
		dy=9;
		while(true) {
			out_8();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int vs_22() {
	HP=100;
	x=1;
	y=1;
	zd=20;
	dHP=160;
	dx=9;
	dy=9;
	while(dHP>0) {
		HP=100;
		x=1;
		y=1;
		zd=20;
		dHP=160;
		dx=9;
		dy=9;
		while(true) {
			out_1();
			play();
			AI_1();
			if(HP<=0) {
				break;
			}
			if(dHP<=0) {
				break;
			}
			Sleep(200);
		}
	}
}
int story1() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:杨叔正在搞电疗改造人,赶紧给我进山搞他,小心点,山里有守卫!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"战友1:我去警卫室,你去山里,我打完警卫后,就会直接来,我们打败了杨叔后,你撤退,我用炸弹炸山。";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"初入深山";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story2() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:小心,里面有会放电的改造人,他会攻击你的!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"进入基地";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story3() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"战友1:我...我...不行啦,爆破任务只能靠打爆杨叔随身带的C4了!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"客户:有个红衣家长,阻止他把小孩送给杨叔治网瘾(改造)!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"深入基地";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story4() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:看到那个男人了吗,他是杨叔,干了他,你队友死了,赶紧打死杨叔,不要靠近他,他会点C4的!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"基地对决";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story5() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:干的漂亮,再也没有小孩被改造了!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"客户:任务应该完成了....";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story6() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:手机推送说大山基地的杨叔是克隆体,快打败研究员去方舱医院!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"战友2:我去先攻杨叔的非法武装基地,杀多点守卫。";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"新冠世界";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story7() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:击败研究员!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"中断改造";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story8() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:拿到情报了,杨叔逃跑了,那个是病毒改造人,打败他逃出去!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"逃离方舱";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story9() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:立刻去杨永信的诊所,阻止杨永信的放电改造人计划,战友2会跟你去!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");

	cout<<"战友2:啊啊啊...";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"守卫:立刻投降!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"潜入诊所";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story10() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"放电改造人:识别到敌人,实施攻击。";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"诊所火拼";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story11() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:这里有杨叔最后一个克隆人,击杀他!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"克隆破灭";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story12() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:立即返回深山,歼灭杨叔!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"重返深山";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story13() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"守卫:举起手来,抱头蹲下!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"再次进攻";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story14() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"一个小孩:救救我(用枪打爆改造机)!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"救下小孩";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story15() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:看到杨叔了吗,歼灭他!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"生化对决";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story16() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:好家伙,QQ看点上的营销号说杨叔只是保护伞的一小部分,你要负责捣毁保护伞!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"丧尸:啊!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"保护伞战争";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story17() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"守卫:你完了!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"歼灭守卫";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story18() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"保护伞公司老板:今天你死定了!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"摧毁保护伞";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story19() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:改造人的源头是狗日子国731部队,赶紧消灭它!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"侵入部队";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story20() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"大佐:八嘎呀路!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"斩首行动";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story21() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:还有一个电箱,打爆它!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"销毁营地";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story22() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:糟糕,城市突然被异形攻破了,战友3在城市里清理异形,你赶紧返回城市!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"紧急支援";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story23() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"战友3:我不行了...保护好城市...";
	Sleep(1000); 
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"杨叔:之前你打败的都是假身,我现在告诉你,你死定了!";
	Sleep(1000); 
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"消灭异形";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story24() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:赶快回深山!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"返回深山";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story25() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:赶快消灭杨叔!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"击杀杨叔";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int story26() {
	system("cls");
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY |FOREGROUND_RED);
	cout<<"客户:干的漂亮,再也没有孩子被改造了!";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
	cout<<"任务完成";
	Sleep(1000);
	while(!KEY_DOWN(MOUSE_EVENT)&&!KEY_DOWN(MOUSE_MOVED)) {

	}
	system("cls");
}
int main() {
	SetConsoleCursorInfo( hand, &info );
	first();
	//第一章节:捣毁狼窝
	story1();
	vs_1();
	story2();
	vs_2();
	story3();
	vs_3();
	story4();
	vs_4();
	story5();
	//第二章:方舱战火
	story6();
	vs_5();
	story7();
	vs_6();
	story8();
	vs_7();
	//第三章:诊所之战
	story9();
	vs_8();
	story10();
	vs_9();
	story11();
	vs_10();
	//第四章:重返深山
	story12();
	vs_11();
	story13();
	vs_12();
	story14();
	vs_13();
	//第五章:斩首行动 
	story15();
	vs_14();
	//第六章:摧毁保护伞
	story16(); 
	vs_15();
	story17();
	vs_16();
	story18();
	vs_17();
	//第七章:血色731 
	story19();
	vs_17();
	story20();
	vs_18();
	story21();
	vs_19() ;
	//第八章:异变狂潮 
	story22();
	vs_20();
	story23();
	vs_21();
	//第九章:返回深山 
	story24();
	vs_12();
	//第十章:击杀杨叔 
	story25();
	vs_22(); 
	story26();
	//完结 
}
相关推荐
老猿讲编程24 分钟前
一个例子来说明Ada语言的实时性支持
开发语言·ada
UestcXiye1 小时前
《TCP/IP网络编程》学习笔记 | Chapter 3:地址族与数据序列
c++·计算机网络·ip·tcp
Chrikk1 小时前
Go-性能调优实战案例
开发语言·后端·golang
幼儿园老大*1 小时前
Go的环境搭建以及GoLand安装教程
开发语言·经验分享·后端·golang·go
canyuemanyue1 小时前
go语言连续监控事件并回调处理
开发语言·后端·golang
杜杜的man1 小时前
【go从零单排】go语言中的指针
开发语言·后端·golang
霁月风3 小时前
设计模式——适配器模式
c++·适配器模式
萧鼎3 小时前
Python并发编程库:Asyncio的异步编程实战
开发语言·数据库·python·异步
学地理的小胖砸3 小时前
【一些关于Python的信息和帮助】
开发语言·python
疯一样的码农3 小时前
Python 继承、多态、封装、抽象
开发语言·python