C++自制游戏《袁坤》1.2版本发布!

大家好,我是派蒙,关于《袁坤》这个系列,我已经10天没有更新了(详见《c++自制游戏《袁坤》1.1版本发布啦!-CSDN博客》发布于2023年12月3日),那么下面就是源代码:

#include 
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
string a;
int main(){
	int L=1,life=100,dlife=100,J=1,s=1000,sj=0,sh=50,lifej=0;
	int h416=0,ak74n=0,scar=0,aug=0,g18c=0,m1911=0;
	cout<<"========================================="<>a;
	cout<<"    "<>x;
			system("cls");
			if(x=='A'){//饭店 
				system("cls");
				cout<<"========================================="<>x; 
				if(x=='A'){//小米 
					if(s>=1000){
						cout<<"恭喜您喜提新机!"<=1500){
						cout<<"恭喜您喜提新机!"<=1550){
						cout<<"恭喜您喜提新机!"<0){
					if(life<=0){
						cout<<"你死了!!!"<>x;
						return 0; 
					}
					if(dlife>0){
						cout<<"坤坤攻击,你的血量-10。"<0){
						cout<<"你反击,坤坤血量-"<>x;
				if(x=='A'){
					Sleep(3000);
					cout<<"吃完了"<>x;
				if(x=='A'){
					cout<<"购买成功!";
					h416++;
					s-=3000;
				} 
				if(x=='B'){
					cout<<"购买成功!";
					ak74n++;
					s-=2000;
				} 
				if(x=='C'){
					cout<<"购买成功!";
					scar++;
					s-=2500;
				} 
				if(x=='D'){
					cout<<"购买成功!";
					aug++;
					s-=3000;
				} 
				if(x=='E'){
					cout<<"购买成功!";
					g18c++;
					s-=1500;
				} 
				if(x=='F'){
					cout<<"购买成功!";
					m1911++;
					s-=1000;
				}  
				if(x=='G'){
					cout<<"购买成功!";
					s-=500;
					lifej=20;
				}  
				if(x=='H'){
					cout<<"购买成功!";
					s-=1000;
					lifej=40;
				}  
				if(x=='I'){
					cout<<"购买成功!";
					s-=1500;
					lifej=60;
				}  
				if(x=='J'){
					cout<<"购买成功!";
					s-=2000;
					lifej=80;
				} 
			Sleep(1000); 
				system("cls");
		}else if(x=='C'){
			system("cls");
			cout<<"========================================="<>x;
			if(x=='A'){
				if(h416>0){
					cout<<"装备成功!"<0){
					cout<<"装备成功!"<0){
					cout<<"装备成功!"<0){
					cout<<"装备成功!"<0){
					cout<<"装备成功!"<0){
					cout<<"装备成功!"<>x; 
				system("cls");
		} else if(x=='E'){
				system("cls");
				cout<<"========================================="<>x;
				if(x=='1'){
				cout<<"┍-----------------┑"<>x;
				if(x=='1'){
				cout<<"┍-----------------┑"<>x;
				if(x=='1'){
					s+=1000;
					system("cls");
				} 
				}
				}
				if(x=='2'){
					system("cls");
				} 
			}
			if(sj==2){ 
				cout<<"╭-----------------╮"<>x;
				system("cls");
			}
			if(sj==1){
				cout<<"┍-----------------┑"<>x;
				system("cls");
			}
		}
	}	
}

------------------------------------------------------------------

(转载请标明原作者)

你可能感兴趣的:(游戏,c++)