这次也是有更新了内容,还是那句话:详见公告!
#include <iostream>
#include <bits/stdc++.h>
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <time.h>
#include <stdlib.h>
using namespace std;
char a[13];
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<<"========================================="<<endl<<endl;
cout<<" 袁坤"<<endl<<" 1.1版本"<<endl;
Sleep(2000);
system("cls");
cout<<"========================================="<<endl<<endl;
cout<<" 抵制不良游戏,拒绝盗版游戏。"<<endl;
cout<<" 注意自我保护,谨防受骗上当。"<<endl;
cout<<" 适度游戏益脑,沉迷游戏伤身。"<<endl;
cout<<" 合理安排时间,享受健康生活。"<<endl<<endl;
cout<<" 初始化资源中..."<<endl;
int n=20;
cout<<" _____________________"<<endl;
cout<<" ";
while(n--){
cout<<"█";
Sleep(300);
}
system("cls");
//====================================================
cout<<"========================================="<<endl<<endl;
cout<<" 抵制不良游戏,拒绝盗版游戏。"<<endl;
cout<<" 注意自我保护,谨防受骗上当。"<<endl;
cout<<" 适度游戏益脑,沉迷游戏伤身。"<<endl;
cout<<" 合理安排时间,享受健康生活。"<<endl<<endl;
cout<<" 加载客户端数据中..." <<endl;
n=20;
cout<<" _____________________"<<endl;
cout<<" ";
while(n--){
cout<<"█";
Sleep(300);
}
system("cls");
char x;
cout<<"========================================="<<endl;
cout<<" 公告"<<endl;
cout<<" 本游戏于12月3日更新后,有如下改动:"<<endl;
cout<<" 1.华为手机建模BUG已修复。"<<endl;
cout<<" 2.新增“物品”功能,可装备购买过的武"<<endl;
cout<<"器。"<<endl;
cout<<"(按任意键继续)"<<endl;
cin>>x;
system("cls");
//====================================================
cout<<"========================================="<<endl<<endl;
cout<<" 欢迎来到坤瓦特大陆,rap者,请问你叫什"<<endl;
cout<<"么名字?"<<endl;
cout<<"请输入你的名字(仅限中文,3个字符):"<<endl;
for(int i=0;i<6;i++){
cin>>a[i];
}
cout<<" "<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<a[5];
cout<<",这是你的坤瓦特通行证,"<<endl;
cout<<"有了它,你就能通行坤瓦特大部分地区了。"<<endl;
Sleep(2000);
system("cls");
//====================================================
cout<<"========================================="<<endl;
cout<<" "<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<a[5];
cout<<" 等级:"<<L<<" 财产:"<<s<<endl;
cout<<"选择要做的事情:(输入对应的序号)"<<endl;
cout<<"A.移动 B.购买 C.出售 D.查看物品 E.探索"<<endl;
cout<<"F.关于 G.退出"<<endl;
while(cin>>x){
life=100+lifej;
dlife=100+L*5;
if(x=='A'){//移动
system("cls");
cout<<"========================================="<<endl;
cout<<"选择要去的地方:"<<endl;
cout<<"A.饭店 B.手机店 C.野外 D.家"<<endl;
cin>>x;
system("cls");
if(x=='A'){//饭店
system("cls");
cout<<"========================================="<<endl;
cout<<"饭店正在装修,敬请期待。"<<endl;
Sleep(1000);
system("cls");
} else if(x=='B'){//手机店
cout<<"========================================="<<endl;
cout<<"请问您要买什么手机?"<<endl;
cout<<"A.小米($1000) B.苹果($1500)"<<endl;
cout<<"C.华为($1550) D.离开"<<endl;
cin>>x;
if(x=='A'){//小米
if(s>=1000){
cout<<"恭喜您喜提新机!"<<endl;
sj=1;
}else{
cout<<"余额不足!"<<endl;
}
}
if(x=='B'){//苹果
if(s>=1500){
cout<<"恭喜您喜提新机!"<<endl;
sj=2;
}else{
cout<<"余额不足!"<<endl;
}
}
if(x=='C'){//华为
if(s>=1550){
cout<<"恭喜您喜提新机!"<<endl;
sj=3;
}else{
cout<<"余额不足!"<<endl;
}
}
Sleep(1000);
system("cls");
}else if(x=='C'){//野外
system("cls");
cout<<"========================================="<<endl;
cout<<"一只野生坤坤向你扑了过来!"<<endl;
while(dlife>0){
if(life<=0){
cout<<"你死了!!!"<<endl;
cout<<"You died!"<<endl;
Sleep(3000);
system("cls");
cout<<"========================================="<<endl;
cout<<" rap者信息:"<<endl;
cout<<"名字:"<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<a[5]<<"等级:"<<L<<"财产:"<<s<<endl;
cout<<" 死于与坤坤的战斗"<<endl;
return 0;
}
if(dlife>0){
cout<<"坤坤攻击,你的血量-10。"<<endl;
life-=10;
}
if(life>0){
cout<<"你反击,坤坤血量-"<<sh<<"。"<<endl;
dlife-=sh;
}
if(dlife<=0){
cout<<"坤坤被击败,你的等级+2,财产+100。"<<endl;
L+=2;
s+=100;
break;
}
}
}else if(x=='D'){//家
cout<<"========================================="<<endl;
cout<<"请选择要做的事情:"<<endl;
cout<<"A.吃饭 B.睡觉"<<endl;
cin>>x;
if(x=='A'){
Sleep(3000);
cout<<"吃完了"<<endl;
} else if(x=='B'){
Sleep(5000);
cout<<"睡醒了"<<endl;
}
Sleep(1000);
system("cls");
}
}else if(x=='B'){//购买
system("cls");
cout<<"========================================="<<endl;
cout<<"要买什么?"<<endl;
cout<<"步枪"<<endl;
cout<<" ▃▃"<<endl;
cout<<"==-===▅==▅==▌"<<endl;
cout<<" █ *▋ ▍"<<endl;
cout<<"A.H416 B.AK74N C.SCAR D.AUG"<<endl;
cout<<"($3000) ($2000) ($2500) ($3000)"<<endl;
cout<<"手枪"<<endl;
cout<<"=-▅▅▅"<<endl;
cout<<" *▌"<<endl;
cout<<"E.G18c F.M1911"<<endl;
cout<<"($1500) ($1000)"<<endl;
cout<<"防弹衣"<<endl;
cout<<"G.标准安保防弹衣(防弹等级:1)"<<endl;
cout<<"($500)"<<endl;
cout<<"H.特勤防弹衣(防弹等级:2)"<<endl;
cout<<"($1000)"<<endl;
cout<<"I.战术防弹衣(防弹等级:3)"<<endl;
cout<<"($1500)"<<endl;
cout<<"J.高级防弹衣(防弹等级:4)"<<endl;
cout<<"($2000)"<<endl;
cin>>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<<"========================================="<<endl;
cout<<"此功能正在开发中,敬请期待。"<<endl; Sleep(1000);
system("cls");
} else if(x=='D'){
system("cls");
cout<<"========================================="<<endl;
cout<<"武器:"<<endl;
cout<<"A.H416:"<<h416<<" B.AK74N:"<<ak74n<<" C.SCAR:"<<scar<<" D.AUG:"<<aug<<endl;
cout<<"E.G18c:"<<g18c<<" F.M1911:"<<m1911<<"G.退出"<<endl;
cout<<"(防弹衣以最后购买为准)" <<endl;
cin>>x;
if(x=='A'){
if(h416>0){
cout<<"装备成功!"<<endl;
sh=80;
}else{
cout<<"该武器未拥有!!!"<<endl;
}
}else if(x=='B'){
if(ak74n>0){
cout<<"装备成功!"<<endl;
sh=85;
}else{
cout<<"该武器未拥有!!!"<<endl;
}
}else if(x=='C'){
if(scar>0){
cout<<"装备成功!"<<endl;
sh=79;
}else{
cout<<"该武器未拥有!!!"<<endl;
}
}else if(x=='D'){
if(aug>0){
cout<<"装备成功!"<<endl;
sh=80;
}else{
cout<<"该武器未拥有!!!"<<endl;
}
}else if(x=='E'){
if(g18c>0){
cout<<"装备成功!"<<endl;
sh=60;
}else{
cout<<"该武器未拥有!!!"<<endl;
}
}else if(x=='F'){
if(m1911>0){
cout<<"装备成功!"<<endl;
sh=59;
}else{
cout<<"该武器未拥有!!!"<<endl;
}
}
Sleep(1000);
system("cls");
}else if(x=='F'){
system("cls");
cout<<"========================================="<<endl<<endl;
cout<<" 关于此游戏:"<<endl;
cout<<" 《袁坤》是一款由原神启动(袁*杰)制作"<<endl;
cout<<"的C++小游戏,在游戏中,玩家将扮演一名rap"<<endl;
cout<<"者,探索坤瓦特大陆。"<<endl;
cout<<" 更新于2023年11月26日"<<endl<<endl;
cout<<"(按任意键继续)"<<endl;
cin>>x;
system("cls");
} else if(x=='E'){
system("cls");
cout<<"========================================="<<endl;
cout<<"此功能正在开发中,敬请期待。"<<endl; Sleep(1000);
system("cls");
}else if(x=='G'){
cout<<"========================================="<<endl<<endl<<endl<<endl;
cout<<" 正在退出..."<<endl;
int n=20;
cout<<" _____________________"<<endl;
cout<<" ";
while(n--){
cout<<"█";
Sleep(300);
}
return 0;
} else if(sj!=0&&x=='H'){
if(sj==3){
cout<<"┍-----------------┑"<<endl;
cout<<" | 12:00 |"<<endl;
cout<<" | ┎┒① ┎┒ |"<<endl;
cout<<" | ┖┚ ┖┚ |"<<endl;
cout<<" | 邮件应用 |"<<endl;
cout<<" | 商城 |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<"┖-----------------┚"<<endl;
cout<<"按1打开邮件,按2关闭手机。"<<endl;
cin>>x;
if(x=='1'){
cout<<"┍-----------------┑"<<endl;
cout<<" | 12:00 |"<<endl;
cout<<" |-----------------|"<<endl;
cout<<" |华为官方 9:00 |"<<endl;
cout<<" |亲爱的用户...... |"<<endl;
cout<<" | (按1打开)|"<<endl;
cout<<" |-----------------|"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | 没有其他消息了。|"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<"┖-----------------┚"<<endl;
cin>>x;
if(x=='1'){
cout<<"┍-----------------┑"<<endl;
cout<<" | 12:00 |"<<endl;
cout<<" |-----------------|"<<endl;
cout<<" |华为官方 9:00 |"<<endl;
cout<<" |亲爱的用户,您好! |"<<endl;
cout<<" |欢迎购买本手机, |"<<endl;
cout<<" |这是一份无限的钱 |"<<endl;
cout<<" |财,请笑纳! |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" |-----------------|"<<endl;
cout<<" | |"<<endl;
cout<<" |财产*1000 |"<<endl;
cout<<" | (按1领取) |"<<endl;
cout<<" | |"<<endl;
cout<<"┖-----------------┚"<<endl;
cin>>x;
if(x=='1'){
s+=1000;
system("cls");
}
}
}
if(x=='2'){
system("cls");
}
}
if(sj==2){
cout<<"╭-----------------╮"<<endl;
cout<<" | 12:00 |"<<endl;
cout<<" | ┎┒ ┎┒ |"<<endl;
cout<<" | ┖┚ ┖┚ |"<<endl;
cout<<" | 邮件应用 |"<<endl;
cout<<" | 商城 |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<"├-----------------┤"<<endl;
cout<<" | ○ |"<<endl;
cout<<"╰-----------------╯"<<endl;
cout<<"按任意键继续"<<endl;
cin>>x;
system("cls");
}
if(sj==1){
cout<<"┍-----------------┑"<<endl;
cout<<" | 12:00 |"<<endl;
cout<<" | ┎┒ ┎┒ |"<<endl;
cout<<" | ┖┚ ┖┚ |"<<endl;
cout<<" | 邮件应用 |"<<endl;
cout<<" | 商城 |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | |"<<endl;
cout<<" | △ ○ □ |"<<endl;
cout<<"┖-----------------┚"<<endl;
cout<<"按任意键继续"<<endl;
cin>>x;
system("cls");
}
}
cout<<"========================================="<<endl;
cout<<" "<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<a[5];
cout<<" 等级:"<<L<<" 财产:"<<s<<endl;
cout<<"选择要做的事情:(输入对应的序号)"<<endl;
cout<<"A.移动 B.购买 C.出售 D.查看物品 E.探索"<<endl;
cout<<"F.关于 G.退出"<<endl;
if(sj!=0){
cout<<"H.手机";
}
}
}
调试手机建模时我不得不新建了一个文件用来运行手机的输出。
后续将会持续更新,欲知其他版本,请关注我的账号。
---------------------------------------------------------------------------------------------------------------------------------(转载请标明作者和原文地址。)