#include<iostream>//声明头文件
#include<stdlib.h>
#include <unistd.h>
#include "conio.h"
#include "windows.h"
#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h>
#include <stdlib.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
using namespace std;
int shpe(int im, int sh2, int sh3, int sh4, int sh5){//分配函数
srand(time(0));//随机数
int wwe = 0;
int sh5_lo = 0;
int sh4_lo = 0;
int sh3_lo = 0;
int sh2_lo = 0;
int sh5s = 0;
int sh4s = 0;
int sh3s = 0;
int sh2s = 0;
int ims = 0;
ims = rand()%4;
sh2s = rand()%4;
sh3s = rand()%4;
sh4s = rand()%4;
sh5s = rand()%4;
if(ims==sh3s){
cout<<" {你是保镖}"<<endl;
cout<<endl;
cout<<" 负责保护你们队的安全" <<endl;
}
else{
cout<<" {你是平民}"<<endl;
cout<<endl;
cout<<" 收集武器,干掉他们"<<endl;
}
srand(time(0));//随机数
for(int mig = 0; mig<5; mig ++){
if(sh2s==3){
sh2_lo = 1;
}
else{
if(sh3s==3){
sh3_lo = 1;
}
else{
if(sh4s==3){
sh4_lo = 1;
}
else{
if(sh5s==3){
sh5_lo = 1;
}
}
}
}
srand(time(0));//随机数
}
}
bool a_b(bool hp_1){
if(hp_1 == false){
system ("cls");
cout<<" 你死了!"<<endl;//死亡函数
cout<<endl;
cout<<" 游戏结束"<<endl;
cout<<endl;
cout<<" 统计:"<<endl;
cout<<endl;
}
else{
return 0;
}
}
int main(){
int dtg[20][20]{
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
char n;
char ln;
int a,b,c,a1,b1,c1;
int shenf;
int xue = 100;
int shuiji = 0;
srand(time(0));//随机数
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);
system("color F3");
while(1){
cout<<" 新版三国-ATKOLDOP " <<endl;
sleep(0);
cout<<"================================================================================================================ "<<endl;
sleep(1);
cout<<" 选择:1 * 三国暗杀模式 (15人场)* "<<endl;
cout<<endl;
sleep(1);
cout<<" 选择:2 * PVP基地模式(15人场) * "<<endl;
sleep(0);
cout<<"================================================================================================游戏模式选择====="<<endl;
n = getch();
if(n = 1){
system ("cls");
cout<<" 三国"<<endl;
sleep(1);
cout<<" 暗杀"<<endl;
sleep(1);
system ("cls");
for(int s = 5; s != 0; s --){
cout<<" -即将开始- "<<endl;
cout<<" "<<endl;
cout<<" =======剩余"<<s<<"秒======" <<endl;
sleep(1);
system ("cls");
}
shuiji = rand()%4;
for(int fl = 0; fl<3 ; fl++){
cout<<" 正在分配你的队伍"<<endl;
sleep(1);
system ("cls");
cout<<" 正在分配你的队伍."<<endl;
sleep(1);
system ("cls");
cout<<" 正在分配你的队伍.."<<endl;
sleep(1);
system ("cls");
cout<<" 正在分配你的队伍..."<<endl;
sleep(1);
system ("cls");
cout<<" 正在分配你的队伍...."<<endl;
system ("cls");
}
if(shuiji==0){//红
system ("cls");
cout<<" 你是红队!!!!!"<<endl;
}
if(shuiji==1){//黄
system ("cls");
cout<<" 你是黄队!!!!!"<<endl;
}
if(shuiji==2){//蓝
system ("cls");
cout<<" 你是蓝队!!!!!"<<endl;
}
if(shuiji==3){//緑
system ("cls");
cout<<" 你是緑队!!!!!"<<endl;
}
sleep(3);
system ("cls");
cout<<" 正在分配你的身份"<<endl;
sleep(2);
cout<<" 你是";
sleep(1);
system ("cls");
shenf = shpe(a1,b1,c1,a,b);
cout<<endl;
cout<<" 按任意键继续......"<<endl;
ln =getch();
system ("cls");
cout<<" 游戏按键"<<endl;
cout<<" 攻击;若拿到武器,靠近敌人按f键动攻击"<<endl;
cout<<" 使用:按r键"<<endl;
cout<<endl;
cout<<" 游戏说明:"<<endl;
cout<<" 保镖 不可以攻击 可以用身体挡长矛,三叉戟保护队友" <<endl;
cout<<" 平民 可以攻击敌人 但先要找武器" <<endl;
cout<<endl;
cout<<" 游戏规则"<<endl;
cout<<" 每队保镖和贫民一起配合 打败敌方" <<endl;
cout<<" 按任意键继续......."<<endl;
ln =getch();
for(int i = 0;i < 20;i++){
for(int j = 0;i==20;j++){
cout<<endl;
i = 0;
cin>>dtg[j][i];
if(dtg[j][i]=0){
cout<<"*";
}
}
}
}
else{
system ("cls");
cout<<" 识别失败"<<endl;
sleep(2);
}
}
return 0;
}
@LengXiao_
最新推荐文章于 2025-12-17 19:02:04 发布
2482

被折叠的 条评论
为什么被折叠?



