和平精英代码C++

#include <iostream>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
using namespace std;

int main()
{
   int year;
   int a;
   int x;
   int t;
   int u;
   
   cin >> year;
   if (year == 2021){
		cout << "请选择模式:1.普通海岛  2.特训岛(现已转入绿洲起源内)" << endl;
		cin >> x;
		if (x == 1){
   
	   		cout<< "你开局落地在山顶废墟,看到了武器,请选择:1.AKM + 手雷  2.M416 + 手雷  3.S1897 + 手雷" << endl;
	   		cin >> a;
	   		if (a == 1){
	   			sleep(7);
	   			cout << "你拾取了1号组合,正在前往P城"<< endl;
	   			cout << "你到达了P城,淘汰了鸡鸡爆,突突——你被老六使用PKM淘汰了!排名:59/98" << endl;
	   			return 0;
	   		} else {
	   			if (a == 2){
	   				cout << "你拾取了2号组合,正在前往P城" << endl;
	   				sleep(6);
	   				cout << "你到达了P城,淘汰了坤坤,扑扑扑——有人在向你开枪,你要怎么做:1.逃跑  2.扔手雷" << endl;
	   				cin >> a;
	   				if (a == 1){
	   					cout << "你选择了逃跑,但毕竟要付出代价,你进入了决赛圈,被老六淘汰了!排名:8/98" << endl;
	   					return 0;
	   				} else {
	   					if (a == 2)
	   					{
	   						cout << "你向他扔出手雷,砰!你淘汰了小黑子,进入决赛圈,淘汰了所有人,成功吃鸡" << endl;
	   						return 0;
	   					}
	   				}
	   			}
	   			if (a == 3)
	   			{
	   				cout <<  "你拾取了3号组合,正在前往P城" << endl;
	   				sleep(6);
	   				cout << "你到达了P城,淘汰了坤坤。丁——你听到有人掐雷,你要怎么做:1.逃跑  2.钢枪  3.等死" << endl;
	   				cin >> a;
	   				if (a == 1)
	   				{
	   					cout << "你选择了逃跑,但毕竟要付出代价,你没成功进入决赛圈,被毒圈毒死了!排名:11/98" << endl;
	   					return 0;
	   				} else {
	   					if (a == 2){
	   						cout << "你跑到敌人所处的楼里,biubiubiu——杀死了河豚君(河豚君你别骂我)此时,一位外挂选手杀了你,是否举报:1.举报 2.不举报" << endl;
	   						cin >> a;
	   						if (a==1){
	   							cout << "你举报了他,获得了“反外挂高手”称号,并赠送了一次吃鸡机会,成功吃鸡!" << endl;
	   							return 0;
	   						}else if (a == 2){
	   							cout << "你不举报他,平台认为你是外挂同伙,获得10年大礼包" << endl;
	   							return 0;
	   						}
	   					} else if (a == 3){
	   						cout << "你被河豚君杀死了!排名:64/98" << endl;
	   						return 0;
	   					}
	   				}
	   			}
	   		}
		} else {
			if (x == 2){
				cout << "你已进入特训岛,你要训练什么: " << endl;
				cout << "1.室内靶场  2.室外靶场  3.跳伞机  4.载具驾驶  5.决斗" << endl;
				cin >> t;
				if (t == 1 || t == 2){
					cout << "你已进入靶场,按6射击" << endl;
					while(true){
						srand(time(0));
						int w = rand() % 11;
						cin >> t;
						if (t == 6){
							cout << w <<"环"<< endl;
						}
					}
				} else {
					if (t==3){
					cout << "你已坐上跳伞机,按6跳伞" << endl;
					while(true){
						srand(time(0));
						int w = rand() % 101;
						cin >> t;
						if (t == 6){
							sleep(4);
							cout <<"位置:" <<w << endl;
							
						}
							
					}
					}else {
						if (t==4){
							cout << "请选择载具:1.吉普车  2.轿车  3.摩托" << endl;
							cin >> u;
							if (u==1||u==2||u==3){
								cout << "你已坐上车,按6开始比赛" << endl;
								while(true){
								srand(time(0));
								int w = rand() % 11;
								cin >> t;
								if (t == 6){
									cout << "开始比赛,预计15秒结束比赛" << endl;
									sleep(15);
									cout <<"比赛结束,你是第" <<w <<"名" << endl;
							
								}
								
							}
						}	
					} else {
						if (t==5){
							cout << "你已进入决斗场,按6开始决斗" << endl;
							cin >> t;
							if (t == 6){
								cout << "开始决斗!预计18秒后结束" << endl;
								sleep (18);
								srand(time(0));
								int w = rand() % 3;
								if (w==1){
									cout << "你赢了!" << endl;
								}else{
									cout << "你输了!" << endl;
								}
							}
						}	
					}	 
				}
			}
		}
	}
}

 

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值