• 个人简介

    本人为C++新手,目前只会输入输出、变量、分支、循环结构、数组、字符串,与对编游戏重要的自学的取随机数

    计算器(想要用代码块的可以用一用我的方法*见附录3)

    
    

    一、

    `
    

    Joy语言(版本:26.11.1/3m1u/状态:开放)

    更新历程
    *见附录2
    26.11.1:
    2m1u 加入了out[...]写法(具体用法见主页末尾附录2)/
    2m2u 对连续两个[...]提供兼容//
    3m1u 加入了office目录,目前内含outin*目录(可以不用)
    4m1u 回应用户 熊楷睿 的需求,在运行时不显示代码,在此鸣谢用户 熊楷睿
    4m2u 重新删除目录‘office’与连续两个[]的写法
    5m1u ‘outin’变为‘out’与‘in’两个目录,目录‘in’暂时不开放(预计将在26.11.2中开放)
    
    #include<bits/stdc++.h>
    using namespace std;
    int name[10005];
    int menu[10005];
    char named[10005]; 
    char code[100005];
    int main(){
    	cout<<"Verson:26.11.1/5m1u"<<endl;
    	cout<<"menu:";
    	int A;cin>>A;
    	int out=0;
    	for(int i=1;i<=A;i++){
    		cout<<i<" ";
    		string B;cin>>B;
    		int C=B.length();
    		if(C==5){
    			if(B[0]=='o' and B[1]=='u' and B[2]=='t'){
    				if(menu[1]>0){
    					cout<<"[lgnore]'out' appears repeatedly//?"<<endl;
    				}
    				else{
    					menu[1]++;
    				}
    			}
    			else{
    				cout<<"[lgnore]'"<<B<<"' isn't a correct menu or hasn't been updeted yet//!"<<endl;
    			}
    		}
    		else{
    			cout<<"[lgnore]'"<<B<<"' isn't a correct menu or hasn't been updeted yet//!"<<endl;
    		}
    	}
    	cout<<"code:";
    	int line;cin>>line;
    	int leng=0;
    	for(int i=1;i<=line;i++){
    		cout<<i<<" ";
    		string D;cin>>D;
    		int E=D.length();
    		for(int j=0;j<E;j++){
    			leng++;
    			code[leng]=D[j]; 
    		}
    	}
    	for(int i=1;i<=100;i++){
    		cout<<"\n";
    	}
    	if(leng>6499){
    		cout<<"Code length overload(big than 6500)//!!!";
    		return 0;
    	}
    	int runin=0;
    	for(int i=1;i<=leng;i++){
    		if(runin==0){
    			if(code[i]=='o'){
    				runin++;
    				out++;
    			}
    		}
    		else{
    			if(out==-1){
    				if(code[i]=='|'){
    					cout<<"\n";
    				}
    			else if(code[i]==']'){
    				out=-10;
    			}
    			else{
    				cout<<code[i];
    			}
    			}
    			else if(out==1){
    				if(code[i]=='u'){
    					out++;
    				}
    			}
    			else if(out==2){
    				if(code[i]=='t'){
    					out++;
    				}
    			}
    			else if(out==3){
    				if(code[i]=='['){
    					out=-1;
    				}
    			}
    			else if(out==-10){
    				else if(code[i]==';'){
    					runin=0;
    				}
    			}
    		}
    	}
    }
    
    
    
    

    Joy语言(版本:26.11.2(name更新第一部分:in)/1m2u/状态:测试中)

    #include<bits/stdc++.h>
    using namespace std;
    char name[105];
    int menu[15];
    char code[7000];
    int main(){
    	cout<<"Verson:26.11.1/3m1u"<<endl;
    	cout<<"menu:";
    	int A;cin>>A;
    	int out=0;
    	for(int i=1;i<=A;i++){
    		cout<<i<" ";
    		string B;cin>>B;
    		int C=B.length();
    		if(C==3){
    			if(B[0]=='o' and B[1]=='u' and B[2]=='t'){
    				if(menu[1]>0){
    					cout<<"[lgnore]'out' appears repeatedly//?"<<endl;
    				}
    				else{
    					menu[1]++;
    				}
    			}
    			else{
    				cout<<"[lgnore]'"<<B<<"' isn't a correct menu or hasn't been updeted yet//!"<<endl;
    			}
    		}
    		else if(C==2){
    			if(B[0]=='i' and B[1]=='n'){
    				if(menu[2]>0){
    					cout<<"[lgnore]'in' appears repeatedly//?"<<endl;
    				}
    				else{
    					menu[2]++;
    				}
    			}
    			else{
    				cout<<"[lgnore]'"<<B<<"' isn't a correct menu or hasn't been updeted yet//!"<<endl;
    			}
    		}
    		else{
    			cout<<"[lgnore]'"<<B<<"' isn't a correct menu or hasn't been updeted yet//!"<<endl;
    		}
    	}
    	cout<<"code:";
    	int line;cin>>line;
    	int leng=0;
    	for(int i=1;i<=line;i++){
    		cout<<i<<" ";
    		string D;cin>>D;
    		int E=D.length();
    		for(int j=0;j<E;j++){
    			leng++;
    			code[leng]=D[j]; 
    		}
    	}
    	for(int i=1;i<=100;i++){
    		cout<<"\n";
    	}
    	if(leng>6499){
    		cout<<"Code length overload(big than 6500)//!!!";
    		return 0;
    	}
    	int runin=0;
    	int in=0;
    	int out_1=0;
    	for(int i=1;i<=leng;i++){
    		if(runin==0){
    			if(code[i]=='o'){
    				if(menu[1]>0){
    					runin++;
    					out++;
    				} 
    			}
    			else if(code[i]=='i'){
    				if(menu[2]>0){
    					runin++;
    					in++;
    				}
    			}
    		}
    		else{
    			if(!(out==0)){
    				if(out==-1){
    					if(code[i]=='|'){
    						cout<<"\n";
    					}
    					else if(code[i]==']'){
    						out=-10;
    					}
    					else{
    						cout<<code[i];
    					}
    				}
    				else if(out==-2){
    					int id_2=0;
    					if(out_1==1){
    						if(code[i]>='0' and code[i]<='9'){
    							id_2+=code[i]-48;
    							out_1++;
    						}
    					}
    					else if(out_1==0){
    						if(code[i]>='0' and code[i]<=9){
    							id_2+=10*(code[i]-48);
    							out_1++;
    						}
    					}
    					else if(out_1==2){
    						if(code[i]==')'){
    							cout<<name[id_2];
    							out_1=0;
    							out=-10;
    						}
    					}
    				}
    				else if(out==1){
    					if(code[i]=='u'){
    						out++;
    					}
    				}
    				else if(out==2){
    					if(code[i]=='t'){
    						out++;
    					}
    				}
    				else if(out==3){
    					if(code[i]=='['){
    						out=-1;
    					}
    					else if(code[i]=='('){
    						out=-2;
    					}
    				}
    				else if(out==-10){
    					if(code[i]==';'){
    						runin=0;
    						out=0;
    					}
    				}
    			}
    			else if(!(in==0)){
    				int id_1=0;
    				if(in==1){
    					if(code[i]=='n'){
    						in++;
    					}
    				}
    				else if(in==2){
    					if(code[i]=='('){
    						in++;
    					}
    				}
    				else if(in==3){
    					if(code[i]>='0' and code[i]<='9'){
    						id_1+=10*(code[i]-48);
    						in++;
    					}
    				}
    				else if(in==4){
    					if(code[i]>='0' and code[i]<='9'){
    						id_1+=code[i]-48;
    						in++;
    					}
    				}
    				else if(in==5){
    					if(code[i]==')'){
    						in=-1;
    						cin>>name[id_1];
    					}
    				}
    				else if(in==-1){
    					if(code[i]==';'){
    						in=0;
    						runin=0;
    					}
    				}
    			}
    		}
    	}
    }
    

    三国杀(版本:26.12.1/1m1u/状态:制作中)(没想到吧我要开放了)

    #include<bits/stdc++.h>
    using namespace std;
    int card[125];
    //1=杀25 2=闪15 3=桃10 4=过10 5=顺10 6=南5 7=万5 8=决10 9=乐5 10=青1 11=诸1 12=丈1 13=八2 14=+3 15=-3 16=无9 17=桃园2 18=借3 0=空 
    int color[125];
    //1=黑桃 2=梅花 3=红桃 4=方块 0=空 
    int point[125];
    //11=J 12=Q 13=K 1=A -1=空 
    int mez[8];
    int othz[8]; 
    //1=青 2=诸 3=丈 0=空 
    //1=八 0=空 
    //1=+ 2=- 0=空 
    //1=乐 0=空 
    int number[35];
    int mec[105];
    int meo[105];
    int mep[105];
    int othl[5];
    int othc[105];
    int otho[105];
    int othp[105];
    int main(){
    	number[1]=25;
    	number[2]=15;
    	number[6]=number[7]=number[9]=5;
    	number[10]=number[11]=number[12]=1;
    	number[3]=number[5]=number[4]=10;
    	number[14]=number[15]=number[18]=3;
    	number[8]=10;
    	number[16]=9;
    	number[13]=number[17]=2;
    	int cards=110;
    	int meb=4;
    	int mes=4;
    	int othb=4;
    	int oths=4;
    	int meg=1;
    	int othg=1; 
    	srand(time(0));
    	for(int i=1;i<=110;i++){
    		int A=rand()%18+1;
    		do{
    			if(A==18){
    				A=1;
    			}
    			else{
    				A++;
    			}
    		}while(number[A]==0);
    		card[i]=A;
    		number[A]--;
    		int B=rand()%4;
    		color[i]=B;
    		int C=rand()%13+1;
    		point[i]=C;
    	}
    	for(int i=1;i<=18;i++){
    		if(number[i]>0) {
    			cout<<"很抱歉,游戏出现异常……";
    			return 0;
    		}
    	}
    	cout<<"三国杀/版本:26.12.1"<<endl;
    	cout<<"建议全屏,体验更佳"<<endl;
    	cout<<"输入任意开始游戏……"<<endl;
    	string H;cin>>H;
    	int kill=1;
    	int sell=0;
    	int no=0;
    	for(int i=1;i<=4;i++){
    		mec[i]=card[i];
    		meo[i]=color[i];
    		mep[i]=point[i];
    		othc[i]=card[i+5];
    		cards-=2;
    	}
    	int turn=1;
    	int judge=0; 
    	cout<<"你的对手:";
    	int J=rand()%4;
    	if(J==0){
    		cout<<"骑核弹的舒塔"<<endl;
    	}
    	else if(J==1){
    		cout<<"人类制造者"<<endl;
    	}
    	else if(J==2){
    		cout<<"匿名用户"<<endl;
    	}
    	else{
    		cout<<"BOSS还是BOSB"<<endl;
    	}
    	for(int i=1;i<=30;i++){
    		cout<<"-";
    	}
    	cout<<"\n";
    	do{
    		cout<<"第"<<turn<<"回合:你的回合"<<endl;
    		for(int i=1;i<=30;i++){
    			cout<<"-";
    		} 
    		cout<<"\n";
    		int does;
    		int noa;
    		do{
    		cout<<"对手体力值:"<<othb<<"/4"<<endl;
    		cout<<"你的体力值:"<<meb<<"/4"<<endl;
    		if(othb==0){
    			cout<<"对方濒死!"<<endl;
    			for(int i=1;i<=oths;i++){
    				if(oths==3){
    					cout<<"对方使用【桃】,逃过一劫"<<endl;
    					othb++;
    					for(int j=i;j<=oths-1;j++){
    						othc[j]=othc[j+1];
    						otho[j]=otho[j+1];
    						othp[j]=othp[j+1];
    					}
    					othc[oths]=otho[oths]=othp[oths]=0;
    					oths--;
    					noa++;
    					continue;
    				}
    			}
    			if(noa==0){
    				cout<<"对方死亡,你赢了!"<<endl;
    				return 0;
    			}
    		}
    		if(meb==0){
    			cout<<"你目前处于濒死状态,是否使用桃?"<<endl;
    			cout<<"0 不使用"<<endl;
    			cout<<"其他 使用"<<endl;
    			int des;cin>>des;
    			if(des==0){
    				cout<<"你已死亡,你输了……"<<endl;
    				return 0;
    			}
    			else{
    				cout<<"请输入牌的编号(输入0表示跳过)"<<endl;
    				int deo;cin>>deo;
    				if(deo==0){
    					cout<<"你已死亡,你输了……"<<endl;
    					return 0;
    				} 
    				do{
    					cout<<"这张牌不是【桃】"<<endl;
    					cin>>deo;
    					if(deo==0){
    						cout<<"你已死亡,你输了……"<<endl;
    						return 0;
    					}
    				}while(!(mec[deo]==3));
    				if(mec[deo]==3){
    					cout<<"你已回血,大难不死,必有后福!"<<endl;
    					meb++;
    					for(int j=deo;j<=mes;j++){
    						mec[j]=mec[j+1];
    						meo[j]=meo[j+1];
    						mep[j]=mep[j+1];		
    					}
    					mec[mes]=meo[mes]=mep[mes]=0;
    					mes--;
    				}
    			}
    		}
    		mec[mes+1]=card[112-cards];
    		if(cards==0){
    			cards=110;
    			number[1]=30;
    			number[2]=15;
    			number[3]=number[6]=number[7]=number[9]=5;
    			number[10]=number[11]=number[12]=number[13]=1;
    			number[5]=number[4]=10;
    			number[14]=number[15]=3;
    			number[8]=15;
    			for(int i=1;i<=110;i++){
    				int A=rand()%15+1;
    				do{
    					if(A==15){
    						A=1;
    					}
    					else{
    						A++;
    					}
    				}while(number[A]==0);
    				card[i]=A;
    				number[A]--;
    				int B=rand()%4;
    				color[i]=B;
    				int C=rand()%13+1;
    				point[i]=C;
    			}
    		}
    		mec[mes+2]=card[113-cards];
    		mep[mes+1]=point[112-cards];
    		mep[mes+2]=point[113-cards];
    		meo[mes+1]=color[112-cards];
    		meo[mes+2]=color[113-cards];
    		mes+=2;
    		cout<<"对手装备区:"<<endl;
    		cout<<"武器:"<<endl;
    		if(othz[1]==0){
    			cout<<"无"<<endl;
    		}
    		else if(othz[1]==1){
    			cout<<"丈八蛇矛"<<endl;
    		}
    		else if(othz[1]==2){
    			cout<<"诸葛连弩"<<endl;
    		}
    		else if(othz[1]==3){
    			cout<<"青龙偃月刀"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"防具:"<<endl;
    		if(othz[2]==0){
    			cout<<"无"<<endl;
    		}
    		else if(othz[2]==1){
    			cout<<"八卦阵"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"坐骑:"<<endl;
    		if(othz[3]==0){
    			cout<<"无"<<endl;
    		}
    		else if(othz[3]==1){
    			cout<<"+1马"<<endl;
    		}
    		else if(othz[3]==2){
    			cout<<"-1马"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"对方判定区:"<<endl;
    		if(othz[4]==0){
    			cout<<"无"<<endl;
    		}
    		else if(othz[4]==1){
    			cout<<"乐不思蜀"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"你的装备区:";
    		cout<<"武器:"<<endl;
    		if(mez[1]==0){
    			cout<<"无"<<endl;
    		}
    		else if(mez[1]==1){
    			cout<<"丈八蛇矛"<<endl;
    		}
    		else if(mez[1]==2){
    			cout<<"诸葛连弩"<<endl;
    		}
    		else if(mez[1]==3){
    			cout<<"青龙偃月刀"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"防具:"<<endl;
    		if(mez[2]==0){
    			cout<<"无"<<endl;
    		}
    		else if(mez[2]==1){
    			cout<<"八卦阵"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"坐骑:"<<endl;
    		if(mez[1]==0){
    			cout<<"无"<<endl;
    		}
    		else if(mez[3]==1){
    			cout<<"+1马"<<endl;
    		}
    		else if(mez[3]==2){
    			cout<<"-1马"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"你的判定区:"<<endl;
    		if(mez[4]==0){
    			cout<<"无"<<endl;
    		}
    		else if(mez[4]==1){
    			cout<<"乐不思蜀"<<endl;
    		}
    		else{
    			cout<<"很抱歉,游戏出现异常……"<<endl;
    			return 0;
    		}
    		cout<<"对手手牌数"<<oths<<endl;
    		cout<<"你的手牌:"<<endl;
    		for(int i=1;i<=95;i++){
    			if(mec[i]>0){
    				cout<<i<<" ";
    				if(meo[i]==1){
    					cout<<"黑桃";
    				}
    				else if(meo[i]==2){
    					cout<<"梅花"; 
    				}
    				else if(meo[i]==3){
    					cout<<"红桃"; 
    				}
    				else if(meo[i]==4){
    					cout<<"方块"; 
    				}
    				else{
    					cout<<"很抱歉,游戏出现异常……";
    					return 0;
    				}
    				if(mep[i]==1){
    					cout<<"A";
    				}
    				else if(mep[i]==11){
    					cout<<"J";
    				}
    				else if(mep[i]==12){
    					cout<<"Q";
    				}
    				else if(mep[i]==13){
    					cout<<"K";
    				}
    				else{
    					cout<<mep[i];
    				}
    				
    				cout<<" ";
    				if(mec[i]==1){
    					cout<<"杀";
    				}
    				else if(mec[i]==2){
    					cout<<"闪";
    				}
    				else if(mec[i]==3){
    					cout<<"桃"; 
    				}
    				else if(mec[i]==4){
    					cout<<"过河拆桥"; 
    				}
    				else if(mec[i]==5){
    					cout<<"顺手牵羊";
    				}
    				else if(mec[i]==6){
    					cout<<"南蛮入侵";
    				}
    				else if(mec[i]==7){
    					cout<<"万箭齐发";
    				}
    				else if(mec[i]==8){
    					cout<<"决斗";
    				}
    				else if(mec[i]==9){
    					cout<<"乐不思蜀";
    				}
    				else if(mec[i]==10){
    					cout<<"青龙偃月刀(出牌阶段限一次,当你的【杀】被【闪】响应时,你可以继续出杀,攻击范围3)";
    				}
    				else if(mec[i]==11){
    					cout<<"诸葛连弩(你可以一直出【杀】,攻击范围1)";
    				}
    				else if(mec[i]==13){
    					cout<<"八卦阵(当你需要打出【闪】时,你可以进行判定,若结果为红色,则视为你打出了【闪】)";
    				}
    				else if(mec[i]==14){
    					cout<<"+1马(对手攻击范围-1)";
    				}
    				else if(mec[i]==15){
    					cout<<"-1马(对手攻击范围+1)";
    				}
    				else if(mec[i]==16){
    					cout<<"无懈可击";
    				}
    				else if(mec[i]==17){
    					cout<<"桃园结义";
    				}
    				else if(mec[i]==18){
    					cout<<"借刀杀人";
    				}
    				else{
    					cout<<"很抱歉,游戏出现异常……";
    					return 0;
    				}
    				cout<<"\n"; 
    			}	
    		}
    		int le;
    			if(mez[4]==1){
    				cout<<"【乐不思蜀】已生效"<<endl;
    				string I;cin>>I;
    				if(point[cards]==3){
    					cout<<"此牌是红桃,【乐不思蜀】无效"<<endl;
    				}
    				else{
    					cout<<"此牌不是红桃,【乐不思蜀】生效"<<endl;
    					does=0;
    					le++;
    				}
    			}
    			if(le==0){
    				cout<<"请输入要打出的牌的编号,要结束出牌阶段请按0"<<endl;
    				cin>>does;
    			}
    			if(does==0){
    				cout<<"已跳过出牌阶段"<<endl;
    			}
    			else{
    				for(int i=1;i<=95;i++){
    					if(does==i){
    						if(mec[i]<0){
    							cout<<"此牌不存在"<<endl;
    						}
    						else{
    							for(int j=does;j<mes;j++){
    								mec[j]=mec[j+1];
    								meo[j]=meo[j+1];
    								mep[j]=mep[j+1];
    							}
    							mec[mes]=mep[mes]=meo[mes]=-1;
    							mes--;
    							if(mec[i]==1){
    								if(kill==0 and sell==0){
    									cout<<"本回合你不能再使用【杀】!"<<endl;
    									for(int j=mes+1;j>does;j++){
    										mec[j]=mec[j-1];
    										meo[j]=meo[j-1];
    										mep[j]=mep[j-1];
    									}
    									mec[does]=1;
    									meo[does]=rand()%4;
    									mep[does]=rand()%13+1;
    									mes++;
    								}
    								else{
    									cout<<"请选择【杀】的目标"<<endl;
    									kill--;
    									cout<<"1 对手1"<<endl;
    									cout<<"其他 跳过"<<endl;
    									int doe;cin>>doe;
    									if(doe==0){
    										for(int j=1;j<=oths;j++){
    											if(othc[j]==2){
    												cout<<"对方使用【闪】响应了你的【杀】"<<endl;
    												no++;
    												for(int k=j;k<=oths;k++){
    													othc[k]=othc[k+1];
    													otho[k]=otho[k+1];
    													othp[k]=othp[k+1];
    												}
    												othc[oths]=otho[oths]=othp[oths]=-1;
    												oths--;
    												if(mez[1]==3){
    													cout<<"是否使用【青龙偃月刀】继续出【杀】?"<<endl;
    													cout<<"不出 0"<<endl;
    													cout<<"出 牌的编号"<<endl;
    													int qing;cin>>qing;
    													if(qing==0){
    														cout<<"好的,已跳过此轮出牌"<<endl; 
    													}
    													else{
    														if(mec[qing]==1){
    															int no_1=0;
    															for(int j=1;j<=oths;i++){
    																if(othc[j]==2){
    																	cout<<"对方使用【闪】响应了你的【杀】"<<endl;
    																	no_1++;
    																	for(int k=j;k<=oths;k++){
    																		othc[k]=othc[k+1];
    																		otho[k]=otho[k+1];
    																		othp[k]=othp[k+1];
    																	}
    																	othc[oths]=otho[oths]=othp[oths]=-1;
    																	oths--;
    																	continue;
    																}
    															}
    															if(no_1==0){
    																cout<<"对方受到1点伤害!"<<endl;
    															}
    														}
    														else{
    															cout<<"此牌不是【杀】"<<endl;
    														}
    													}
    												}
    											}
    										}
    										if(no==0){
    											cout<<"对方收到1点伤害!"<<endl;
    											othb--;
    										}
    									}
    									else{
    										cout<<"已跳过"<<endl;
    									}
    									
    								}
    							}
    							else if(mec[i]==2){
    								cout<<"不能主动打出【闪】!"<<endl;
    							}
    							else if(mec[i]==3){
    								if(meb==4){
    									cout<<"你目前是满血,不能使用【桃】"<<endl;
    								}
    								else{
    									cout<<"【桃】使用成功!"<<endl;
    									meb++;
    									for(int j=does;j<mes;j++){
    										mec[j]=mec[j+1];
    										mep[j]=mep[j+1];
    										meo[j]=meo[j+1];
    									}
    									mec[mes]=mep[mes]=meo[mes]=-1;
    									mes--;
    								}
    							}
    							else if(mec[i]==4){
    								cout<<"请选择【过河拆桥】的目标"<<endl;
    								cout<<"1 对手1"<<endl;
    								cout<<"其他 跳过"<<endl;
    								int doe;cin>>doe;
    								if(doe==1){
    									cout<<"请选择【过河拆桥】的区域"<<endl;
    									cout<<"1 手牌区"<<endl;
    									cout<<"2 武器"<<endl;
    									cout<<"3 防具"<<endl;
    									cout<<"4 坐骑"<<endl;
    									cout<<"5 判定区"<<endl;
    									cout<<"其他 跳过"<<endl;
    									int dos;cin>>dos;
    									if(dos==2){
    										othz[1]=0;
    									}
    									else if(dos==3){
    										othz[2]=0;
    									}
    									else if(dos==4){
    										othz[3]=0;
    									}
    									else if(dos==5){
    										othz[4]=0;
    									}
    									else if(dos==1){
    										cout<<"请输入弃置牌的编号"<<endl;
    										int doess;cin>>doess;
    										if(doess>oths){
    											cout<<"此牌不存在"<<endl;
    										}
    										else{
    											for(int i=doess;i<=oths-1;i++){
    												othc[i]=othc[i+1];
    												otho[i]=otho[i+1];
    												othp[i]=othp[i+1];
    											}
    											othc[oths]=othp[oths]=otho[oths];
    											oths--;
    										}
    									}
    									else{
    										cout<<"已跳过"<<endl;
    									}
    								}
    								else{
    									cout<<"已跳过"<<endl;
    								}
    							}
    							else if(mec[i]==5){
    								cout<<"请选择【顺手牵羊】的目标"<<endl;
    								cout<<"1 对手1"<<endl;
    								cout<<"其他 跳过"<<endl;
    								int doe;cin>>doe;
    								if(doe==1){
    									cout<<"请选择【顺手牵羊】的区域"<<endl;
    									cout<<"1 手牌区"<<endl;
    									cout<<"2 武器"<<endl;
    									cout<<"3 防具"<<endl;
    									cout<<"4 坐骑"<<endl;
    									cout<<"5 判定区"<<endl;
    									cout<<"其他 跳过"<<endl;
    									int dos;cin>>dos;
    									if(dos==2){
    										mes++;
    										mec[mes]=othz[1];
    										othz[1]=0;
    									}
    									else if(dos==3){
    										mes++;
    										mec[mes]=othz[2];
    										othz[2]=0;
    									}
    									else if(dos==4){
    										mes++;
    										mec[mes]=othz[3];
    										othz[3]=0;
    									}
    									else if(dos==5){
    										mes++;
    										mec[mes]=othz[4];
    										othz[4]=0;
    									}
    									else if(dos==1){
    										cout<<"请输入夺取牌的编号"<<endl;
    										int doess;cin>>doess;
    										if(doess>oths){
    											cout<<"此牌不存在"<<endl;
    										}
    										else{
    											mes++;
    											mec[mes]=oths[doess];
    											meo[mes]=otho[doess];
    											mep[mes]=othp[doess];
    											for(int i=doess;i<=oths-1;i++){
    												othc[i]=othc[i+1];
    												otho[i]=otho[i+1];
    												othp[i]=othp[i+1];
    											}
    											othc[oths]=othp[oths]=otho[oths];
    											oths--;
    										}
    									}
    									else{
    										cout<<"已跳过"<<endl;
    									}
    								}
    								else{
    									cout<<"已跳过"<<endl;
    								}
    							}
    							else if(mec[i]==6){
    								int nos=0;
    								for(int i=1;i<=oths;i++){
    									if(othc[i]==1){
    										cout<<"对方使用【杀】响应了你的【南蛮入侵】"<<endl;
    										nos++;
    										continue;
    									}
    									if(mec[i]==16 and nos==0){
    										cout<<"对方用【无懈可击】无效了ta所受到的【南蛮入侵】"<<endl;
    										nos++;
    										continue; 
    									}
    								}
    								if(nos==0){
    									cout<<"对方受到1点伤害!"<<endl;
    									oths--;
    								}
    							}
    							else if(mec[i]==7){
    								int nos=0;
    								for(int i=1;i<=oths;i++){
    									if(othc[i]==1){
    										cout<<"对方使用【闪】响应了你的【万箭齐发】"<<endl;
    										nos++;
    										continue;
    									}
    									if(mec[i]==16 and nos==0){
    										cout<<"对方用【无懈可击】无效了ta所受到的【万箭齐发】"<<endl;
    										nos++;
    										continue; 
    									}
    								}
    								if(nos==0){
    									cout<<"对方受到1点伤害!"<<endl;
    									oths--;
    								}
    							}
    							else if(mec[i]==8){
    								int nove=0;
    								for(int i=1;i<=oths;i++){
    									if(othc[i]==1){
    										cout<<"对方打出1张【杀】"<<endl;
    										for(int j=i;j<=oths;j++){
    											othc[j]=othc[j+1];
    											otho[j]=otho[j+1];
    											othp[j]=othp[j+1];
    										}
    										othc[oths]=otho[oths]=othp[oths]=0;
    										oths--;
    										nove++;
    										continue;
    									}
    								}
    								if(nove==0){
    									cout<<"对方受到1点伤害!"<<endl;
    									othb--;
    								}
    								else{
    									for(int i=1;i<=100;i++){
    										cout<<"你需要打出一张【杀】"<<endl;
    										cout<<"请输入打出【杀】的编号,输入0可以跳过"<<endl;
    										int deos;cin>>deos;
    										if(deos==0){
    											cout<<"你受到1点伤害!"<<endl;
    											meb--;
    											continue;
    										} 
    										do{
    											cout<<"这张牌不是【杀】"<<endl;
    											cin>>deos;
    											if(deos==0){
    												cout<<"你受到1点伤害!"<<endl;
    												meb--;
    											}
    										}while(!(mec[deos]==1));
    										if(mec[deos]==1){
    											for(int j=1;j<=mes-1;j++){
    												mec[j]=mec[j+1];
    												meo[j]=meo[j+1];
    												mep[j]=mep[j+1];
    											}
    											int nov=0;
    											for(int j=1;j<=oths;j++){
    												if(othc[j]==1){
    													cout<<"对方打出1张【杀】"<<endl;
    													for(int k=j;k<=oths-1;k++){
    														othc[k]=othc[k+1];
    														otho[k]=otho[k+1];
    														othp[k]=othp[k+1];
    													}
    													othc[oths]=otho[oths]=othp[oths]=0;
    													oths--;
    													nov++;
    													continue;
    												}
    											}
    											if(nov==0){
    												cout<<"对方受到1点伤害!"<<endl;
    												othb--;
    											}	
    										}
    									}
    								}
    							}
    						}
    					}
    				}
    			}
    		}while(does==0);
    	}while(meb<=0 or othb<=0);
    }
     
     
    

    附录

    1,Joy语言使用方法
    出现menu:后,在后面输入目录个数,一个一个输入目录;
    出现code:后,在后面输入代码行数(不得超过6500行),进行代码攥写(每行代码输入结束后须写一个';')
    攥写完毕后,程序会自动运行
    2,out[...]写法
    输入目录outin,在代码攥写过程中写out[...],会输出[]内的内容(长度不得超过15字符,若超过可以分开写)(不得在[]内输入中文)(输入|表示换行)
    例:
    1 out[hello|world];
    输出:
    hello
    world
    3,代码块字符(有改动)
    之前的方法固然可行,但过于麻烦,因此我发现了一种新方法
    ESC键下面有一个键盘,在DEV-C++软件中按这个键就会显示‘`’,有些懒的人我放在前面标一的代码块了,只需将上面代码块中的东西复制2行,每行3个,就可以在2行中间写入代码了
    

    以上就是我的个人主页了,非常感谢你能看到这里!

  • 通过的题目

  • 最近活动

  • 最近编写的题解

    This person is lazy and didn't write any solutions.

题目标签

普及-
32
语言入门
29
模拟
28
循环结构
16
字符串
14
顺序结构
14
分支结构
11
搜索
8
枚举
8
入门
6
其他
4
排序
4
数组
4
while循环
3
计算几何
3
数学
2
一本通
2
二维数组
2
运算
2
回文
2