1.1.3终于问世了,活动随之出现,快来看看吧!
#include<bits/stdc++.h>
#include<iostream>
#include<windows.h>
int again,cho,num,about,fla=0,strc,cous=0,hod;
int three=0,five=0,ten=0,dmon,dumo=0,paim=0,fhk=0,kill=0,killd=0,can=0;
long long money=0;long shop[4],pric[5]={0,30,60,90};
int main()
{
if(paim==1&&killd==0) cous=1;
srand(time(NULL));
int b,p,x,c,d,e=0,f=0,g,h=0,i=1,j,l,m,n=5,o=0,flag=0,t1=0,t2=0,last=0;
int flog=0,tans=0,change=0,choo,ice,tangc=0,train,goch=0,game=1,choos=1;
if(paim!=0&&dumo==0) paim=0;
if(paim!=0&&dumo!=0)
{printf("你在赌场投注了赌金\n");Sleep(1000);switch(paim){case 1:printf("恭喜恭喜!获得了200%的赌金!获得了%d元\n",dumo*3);money+=dumo*3;break;case 2:printf("祝贺祝贺!获得了100%的赌金!获得了%d元\n",dumo*2);money+=dumo*2;break;case 3:printf("很遗憾!只获得了全部投注的赌金!挽回了%d元\n",dumo);money+=dumo;break;default:printf("继续加油吧,赌金就被赌场收下了\n"); }printf("\n");Sleep(3000);dumo=0;paim=0;
}
if(three==3) {printf("恭喜三连胜!\n");Sleep(1000);printf("我们为你准备了丰厚的奖品:150元,复活卡3张,冰冻卡2张,无敌卡1张\n\n");money+=150,shop[1]+=3,shop[2]+=2,shop[3]+=1;three=0;Sleep(3000);
}
if(five==5) {printf("恭喜五连胜!\n");Sleep(1000);printf("我们为你准备了丰厚的奖品:300元,复活卡6张,冰冻卡4张,无敌卡3张\n\n");money+=300,shop[1]+=6,shop[2]+=4,shop[3]+=3;five=0;Sleep(3000);
}
if(ten==10) {printf("恭喜十连胜!\n");Sleep(1000);printf("我们为你准备了丰厚的奖品:1000元,复活卡15张,冰冻卡12张,无敌卡10张\n\n");money+=1000,shop[1]+=15,shop[2]+=12,shop[3]+=10;ten=0;Sleep(3000);
}
printf("按1->开始游戏,按2->商店,按3->赌场,按4->活动专栏,按5->规则,按6->关于,按0->退出\n");
scanf("%d",&strc);
if(strc>6) {printf("请不要乱来!\n\n");Sleep(1000);return main();
}
if(strc==0) return 0;
if(strc==2) {printf("---------------------------------------------\n杀手商店---");printf("您现在有%d元\n",money);printf("复活卡30一张,您现在拥有%d张(购买:按1)\n",shop[1]);printf("冰冻卡60一张,您现在拥有%d张(购买:按2)\n",shop[2]);printf("无敌卡90一张,您现在拥有%d张(购买:按3)\n(返回主页:按4)\n",shop[3]);scanf("%d",&cho);if(cho==4) {printf("---------------------------------------------\n\n");return main();}printf("请输入购买数量:");scanf("%d",&train);if(money>=pric[cho]*train) {money-=pric[cho]*train;shop[cho]+=train;printf("购买成功,道具已开始生效!\n---------------------------------------------\n\n");return main();}else {printf("钱不够了!\n---------------------------------------------\n\n");return main();}
}
if(strc==3) {printf("---------------------------------------------\n欢迎来到J神赌场!\n");Sleep(1000);DC:printf("按1开始投注,按2观看规则,按3退出\n");scanf("%d",&dmon);if(dmon==1) {Sleep(1000);printf("请确认看了规则(没看规则的在下面输入0)!\n");Sleep(1000);printf("请输入赌金(元):");scanf("%d",&dumo);if(dumo!=0&&dumo<=money) {printf("投注成功!\n---------------------------------------------\n\n");money-=dumo;return main();}if(dumo>money) {printf("钱不够了!\n\n");dumo=0;goto DC;}}if(dmon!=3) {Sleep(1000);printf("投注后第一局:\n");printf("第一名:获得赌金的200%\n");printf("第二名:获得赌金的100%\n");printf("第三名:获得全部投注赌金\n");printf("第四名/第五名:赌金就被赌场收下了\n");printf("\n");goto DC;}printf("---------------------------------------------\n\n");return main();
}
if(strc==4)
{printf("---------------------------------------------\n今日活动:\n");Sleep(1000);printf("\t不死神话:累计使用复活卡10次");if(fhk>=10) printf(" 10/10\t(已完成,按1领取)"),can=1;else printf(" %d/10",fhk);printf("\n\t大开杀戒:杀死敌人累计15次");if(kill>=15) printf(" 15/15\t(已完成,按2领取)"),can=1;else printf(" %d/15",kill);printf("\n\t欧洲大帝:一局中不杀人赢得第一");if(cous==1) printf(" 1/1\t(已完成,按3领取)"),can=1;else printf(" 0/1");printf("\n");if(can==1){scanf("%d",&hod);switch(hod){case 1:printf("你获得了60元,3张复活卡\n"),money+=60,shop[1]+=3,fhk=0;break;case 2:printf("你获得了200元,5张无敌卡\n"),money+=200,shop[3]+=5,kill=0;break;case 3:printf("你获得了666元,实在太6了!\n"),money+=666,cous=0;break;}}printf("---------------------------------------------\n\n");can=0;return main();
}
if(strc==5) {Sleep(1000);printf("\n复活卡可死后多加一条命,单局只能使用一次,决斗时无法生效\n");Sleep(1000);printf("冰冻卡可冰冻指定杀手二回合,死后可随机诅咒,单局只能使用一次\n");Sleep(1000);printf("无敌卡可开局无敌三回合\n");Sleep(1000);printf("其他规则参见CSDN: ShineEternal 的博客\n");Sleep(1000);printf("10秒后返回主页\n\n");Sleep(10000);return main();
}
if(strc==6) {printf("---------------------------------------------\n游戏信息\n");printf("游戏版本:1.1.3 更新信息按1;\n");printf("原创: CSDN: ShineEternal ,更新: CSDN: Jeffrey2020\n");printf("支持作者请按2,喷作者请按3,返回主页请按4;\n");scanf("%d",&about);switch(about){case 1:printf("\n1.1.4版本:\n更新时间:3月15日之前\n更新目标:1.打定药水草稿\n\t 2.更新活动\n\t 3.修复其他bug");break;case 2:printf("爱你哟,么么哒!");if(fla==0) money+=60,fla=1;break;case 3:printf("我记住你了");Sleep(2000);printf("\n后会无期!");return 0;break;}printf("\n---------------------------------------------\n\n");return main();
}
killd=0;
printf("\n选择你的杀手等级(1-5)\n");
scanf("%d",&b);
printf("\n");
int a[6]={0,1,2,3,4,5},k[10]={0};
AA:while(n!=1)
{if(game==1&&i==1&&shop[3]>=1) {printf("是否启用无敌卡?是按0,否按1\n");scanf("%d",&choos); if(choos==0) {Sleep(1000);printf("启用成功!\n");shop[3]--;}printf("\n");} if(n==2&&last==0) {Sleep(1000);printf("决斗时刻!\n");for(int las=1;las<=5;++las) {if(t1==0&&a[las]!=0) t1=las;else if(a[las]!=0&&t1!=0) t2=las;}Sleep(1000);printf("%d号与%d号冠军之争!\n\n",t1,t2);last=1;}if(i==1&&change==0) {Sleep (1000);printf("存活者:%d %d %d %d %d\n\n",a[1],a[2],a[3],a[4],a[5]);}if(i==6) i=1,game++;if(a[i]==0){i++;continue;}Sleep(1000);if(tangc==0) printf("轮到%d号\n",i);else tangc=0;if(i==b){Sleep(1000);FF:if(goch==1) Sleep(1000);printf("选择你要攻击的目标:%d %d %d %d %d",a[1],a[2],a[3],a[4],a[5]);if(shop[2]>=1&&change==0)printf(" 若要冰冻敌人请按6");printf("\n"); scanf("%d",&choo);if(choo==6&&shop[2]>=1){EE:Sleep(1000);printf("选择你要冰冻的目标:%d %d %d %d %d\n",a[1],a[2],a[3],a[4],a[5]);scanf("%d",&ice);if(a[ice]==0||ice==b||ice>5) {printf("你无法冰冻该杀手!\n");goto EE;}else printf("冰冻成功!\n"),change=1,tangc=1;shop[2]--;goto AA;}else {p=choo;if(a[p]==0||p==b||p>5) {printf("你无法选择该杀手\n");goch=1;goto FF;} }}else {dop=rand()%5+1;while(p!=i);while(a[p]==0||p==i) p=rand()%5+1;}if(i==ice&&tans<=1) {Sleep(1000);printf("%d号被冰冻,跳过\n\n",ice);i++;tans++;goto AA;}Sleep(1000);printf("%d号选择了%d号\n",i,p);Sleep(1000);printf("%d号掷出了%d\n",i,c=rand()%6+1);if(i>=c){if(p==b&&choos==0&&game<=3) {Sleep(1000);printf("%d号无法杀死%d号,因为%d号开启了无敌卡\n\n",i,b,b);i++;goto AA;}a[p]=0;Sleep(1000);printf("%d号杀死了%d号\n\n",i,p);if(i==b) kill++;n--;}else {Sleep(1000); printf("%d号没有杀死目标\n\n",i);}if(i==5&&a[p]==0){if(rand()%3==1||rand()%3==2){if(p==1&&f<=2){Sleep(1000); printf("5号无视1号复活权\n");Sleep(800); printf("直接将其杀死\n\n");f=3;}if(p==2&&h==0){Sleep(1000); printf("5号无视2号复活权\n");Sleep(800); printf("直接将其杀死\n\n");h=1;}if(p==3&&o==0){Sleep(1000); printf("5号无视3号复活权\n");Sleep(800); printf("直接将其杀死\n\n");o=1;}}}DD:if(a[1]==0){if(b==1&&flag==1) goto AA;if(f<=2){Sleep(1000);printf("1号使用复活权\n");f++; n++; a[1]=1;if(f==1){do g=rand()%5+1;while(a[g]==0||g==1);Sleep(1000); printf("并随机诅咒了%d号\n",g);if(g==b&&choos==0&&game<=3) {Sleep(1000);printf("%d号开启了无敌卡,免疫诅咒\n\n",b);i++;goto AA;} Sleep(1000); printf("%d号死了\n\n",g);a[g]=0; n--;}} else a[1]=0;}if(a[2]==0&&h==0){if(b==2&&flag==1) goto AA;Sleep(1000);printf("2号使用复活权\n");n++;a[2]=2;do m=rand()%5+1;while(a[m]==0||m==2);Sleep(1000); printf("并随机诅咒了%d号\n",m);if(rand()%2==1){if(m==b&&choos==0&&game<=3) {Sleep(1000);printf("%d号开启了无敌卡,免疫诅咒\n\n",b);h=1;i++;goto AA;} a[m]=0; Sleep(1000); printf("%d号死了\n\n",m);n--;} else {Sleep(1000); printf("但他没死\n\n");} h=1;goto DD;}if(a[3]==0&&o==0){if(b==3&&flag==1) goto AA;Sleep(1000); printf("3号使用复活权\n\n"); a[3]=3; o++; n++;}if(i==4&&a[p]==0){if(n==1) goto GG;else{Sleep(1000); printf("4号使用再次攻击权\n");flog=1;if(p==b) goto GG;else goto AA;}}if(i==4&&a[p]!=0) flog=0;GG:if(a[b]==0&&e==0){if(n==1) {num=1;goto CC;} if(shop[1]>=1&&flag==0) {Sleep(1000);printf("%d号使用复活卡继续游戏\n",b);fhk++;flag=1;a[b]=b;shop[1]--;if(flog==1) {Sleep(1000);printf("4号再次攻击权被抵消\n");flog=0;}printf("\n");i++;n++;goto AA; }printf("你死了,是否继续?是按0,否按1\n");scanf("%d",&x);if(x==1) {num=n;goto BB;}else if(x==0) e=1,num=n;}if(flog==0) i++;else flog=0;
}
if(num==0) num++;
CC:for(j=1;j<=5;j++) if(a[j]!=0) d=j;
Sleep(800);
printf("%d号赢了",d);
if(d==b) {printf("\n恭喜你第1名!赢得30元\n"),money+=30;three++,five++,ten++,paim=1;
}else {BB:Sleep(1000);printf("\n结算:你的成绩为第%d名 奖励:",num+1);switch(num){case 1:printf("20元\n");money+=20;paim=2;break;case 2:printf("10元\n");money+=10;paim=3;break;case 3:printf("5元\n");money+=5;paim=4;break;case 4:printf("无\n");paim=5;break;default:printf("(电脑出现未知现象,发生了什么?这是一个bug,待修复)\n"); }three=0,five=0,ten=0;}printf("游戏结束\n\n是否重新一局?是按0,否按1,退出钱将清零\n");scanf("%d",&again); if(again==0) {printf("\n\n");return main(); }if(again==1) return 0;
}