自编游戏,全新升级更新,欢迎私信或评论,提供建议、bug和不足之处。
更新日志:新增了领主黑湖藤
目录
一、核心代码
1.1 灵宠
代码:
while(1){
system("cls");
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 灵 宠 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.宠物图鉴 3.";
LC_xhl_dj();
cin>>LC_chose;
cout<<"\n========================================================================================"<<endl;
if(LC_chose==1){
clean1();
break;
}
if(LC_chose==2){
while(1){
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 宠 物 图 鉴 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.小火龙 3.神木猿 ";
scta(236);
cout<<"4.九天寒冰鹿 "<<endl;
cin>>aa;
if(bj==4){
system("color E1");
}
if(bj==2){
system("color F1");
}
if(bj==3){
system("color 07");
}
if(aa==1){
break;
}
}
}
if(LC_chose==3){
while(1){
LC_xhl_dj();
xhl_zdl=sh_xhl1+sh_xhl2+sh_xhl3;
cout<<"等级:"<<xhl_dj<<endl;
cout<<"生命值:"<<sm1<<endl;
cout<<"战斗力:"<<xhl_zdl<<endl;
cout<<"========================================================================================\n"<<endl;
cout<<"1.返回 2.使用秘籍 3.技能 4.装备 5.食物 6.升级"<<endl;
cin>>LC_chose;
if(LC_chose==1) {
clean1();
break;
}
if(LC_chose==2) {
if(LC_mj==0){
cout<<"========================================================================================\n"<<endl;
cout<<"暂无秘籍可用!";
clean();
}
}
if(LC_chose==3) {
while(1){
cout<<"========================================================================================\n"<<endl;
cout<<"1.火球"<<xhl1<<"级 伤害"<<sh_xhl1<<endl;
cout<<"2.拳击"<<xhl2<<"级 伤害"<<sh_xhl2<<endl;
if(ft==1){
cout<<"3.焚天"<<xhl3<<"级 伤害"<<sh_xhl3<<endl;
}
cout<<"========================================================================================\n"<<endl;
cout<<"1.返回 2.升级技能" <<endl;
cin>>LC_chose;
if(LC_chose==1) {
clean1();
break;
}
if(LC_chose==2) {
while(1){
cout<<"========================================================================================\n"<<endl;
cout<<"1.返回 \n";
cout<<"2.火球 "<<nn<<"金币 "<<endl<<"3.拳击 "<<oo<<"金币"<<endl;
if(ft==1){
cout<<"4.焚天 "<<pp<<"金币"<<endl;
}
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
if(jbb<nn){
cout<<"金币不足"<<endl;
continue;
}
if(jbb>=nn){
cout<<"升级成功!"<<endl;
xhl1++;
sh_xhl1+=80;
jbb-=nn;
nn+=110;
}
}
if(aa==3){
if(jbb<mm){
cout<<"金币不足"<<endl;
continue;
}
if(jbb>=mm){
cout<<"升级成功!"<<endl;
xhl2++;
sh_xhl2+=50;
jbb-=oo;
oo+=80;
}
}
if(aa==4&&ft==1){
if(jbb<pp){
cout<<"金币不足"<<endl;
continue;
}
if(jbb>=pp){
cout<<"升级成功!"<<endl;
xhl3++;
sh_xhl3+=100;
jbb-=pp;
pp+=160;
}
}
}
}
}
}
if(LC_chose==4) {
cout<<"暂无装备可用!";
clean();
}
if(LC_chose==5) {
while(1){
if(sw==0){
cout<<"无食物可喂食"<<endl;
clean();
break;
}
if(sw>0){
cout<<"1.返回 ";
if(sw==1){
cout<<"2.";
if(sw_nr>0){
cout<<"牛肉 "<<sw_nr<<"个 使用1个"<<endl;
}
if(sw_mxsy>0){
cout<<"满血盛宴 "<<sw_mxsy<<"个 使用1个"<<endl;
}
cin>>aa;
if(aa==1){
break;
}
if(aa==2){
if(sm1==sm1_b){
cout<<"生命值已满!"<<endl;
}
if(sm1<sm1_b){
if(sw_nr>0) {
sw_nr--;
if(sw_nr==0){
sw--;
}
sm1+=100;
if(sm1>sm1_b){
sm1=sm1_b;
}
cout<<"已使用"<<endl;
}
if(sw_mxsy){
sw_mxsy--;
if(sw_mxsy==0){
sw--;
}
sm1=sm1_b;
cout<<"已使用"<<endl;
}
}
}
}
}
}
}
//升级
if(LC_chose==6) {
while(1){
cout<<"1.返回 2.升级 需要"<<jj<<"金币"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
if(jj>jbb){
cout<<"金币不足!"<<endl;
clean();
break;
}
if(jj<=jbb){
cout<<"升级成功!"<<endl;
xhl_dj++;
jbb-=jj;
if(xhl_dj<10){
jj+=80;
}
if(xhl_dj>=10){
jj+=110;
}
sm1_b+=50;
sm1_1=sm1=sm1_b;
sh_xhl1+=30;
sh_xhl2+=15;
sh_xhl2+=70;
clean();
}
}
}
}
}
}
}
1.2 试炼塔
代码:
while(1){
clean1();
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 试 炼 塔 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始试炼"<<endl;
cin>>aa;
cout<<"\n========================================================================================"<<endl;
if(aa==1){
clean1();
break;
}
if(aa==2){
while(1){
cout<<"\n=====================================第 "<<ee<<" 层===========================================\n"<<endl;
srand(time(0));
gg=rand()%4;
cout<<"\n "<<gw[gg]<<" "<<endl;
if(f>0){
dd+=20*ee;
sm_1=dd;
sh_src1+=25*ee;
f=0;
}
cout<<"生命值:"<<dd<<endl;
cout<<"技能:毒液 伤害:"<<sh_src1;
cout<<"\n----------------------------------------------------------------------------------------"<<endl;
cout<<"选择灵宠出战:";
if(LC_num==1){
cout<<"1.返回 2.小火龙"<<endl;
}
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
while(1){
if(sm1>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
sm_1-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
sm_1-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
sm_1-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(sm_1>0&&sm1>0){
cout<<"\n-------------------------------------敌方对战-------------------------------------------"<<endl;
cout<<"食人草\n"<<"生命值:"<<sm_1 <<endl;
cout<<"释放技能:毒液\n伤害:"<<sh_src1<<endl;
sm1-=sh_src1;
}
if(sm1<=0&&sm_1>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(sm_1<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=20*ee;
jyy+=10*ee;
cout<<"获得:\n金币+"<<20*ee<<endl<<"经验值+"<<10*ee<<endl;
ee++;
f++;
cout<<"1.下一关"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
}
}
}
1.3 对战
代码:
while(1){
system("cls");
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 对 战 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始匹配对手"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
//smm1,zdl1
if(aa==2){
ab:
cout<<"\n========================================================================================\n"<<endl;
cout<<"您的当前";
Duan();
cout<<"\n========================================================================================\n"<<endl;
Sleep(1000);
cout<<"匹配成功!"<<endl;
sm1_=sm1_b;
clean();
cout<<"\n========================================================================================\n"<<endl;
srand(time(0));
ll=rand()%9999+1000;
cout<<"游客_"<<ll<<endl;
srand(time(0));
mm=rand()%4+1;
if(mm<=3){
if(Dw=="青铜"){
smm1=150+50*mm;
zdl1=100+35*mm;
}
if(Dw=="白银"){
smm1=450+50*mm;
zdl1=350+35*mm;
}
if(Dw=="黄金"){
smm1=850+50*mm;
zdl1=550+35*mm;
}
if(Dw=="铂金"){
smm1=1000+50*mm;
zdl1=600+35*mm;
}
if(Dw=="钻石"){
smm1=2000+200*mm;
zdl1=1000+350*mm;
}
if(Dw=="星耀"){
smm1=3000+500*mm;
zdl1=1900+350*mm;
}
if(Dw=="王者"){
smm1=4000+500*mm;
zdl1=2900+350*mm;
}
if(Dw=="星光"){
smm1=5000+500*mm;
zdl1=4000+350*mm;
}
}
if(mm==4){
smm1=sm1_+655;
zdl1=xhl_zdl+700;
}
cout<<"生命值:"<<smm1<<endl;
cout<<"战斗力:"<<zdl1<<endl;
cout<<"\n========================================================================================\n"<<endl;
while(1){
if(sm1_>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
smm1-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
smm1-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
smm1-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(smm1>0&&sm1_>0){
cout<<"\n-------------------------------------"<<"游客_"<<ll<<"对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<smm1 <<endl;
cout<<"释放技能:火球\n伤害:"<<zdl1<<endl;
sm1_-=zdl1;
}
if(sm1_<=0&&smm1>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
DWW--;
Dw_1--;
if(DWW<=0){
DWW=0;
}
if(Dw_1<=0){
Dw_1=0;
dw_();
dW_2();
}
dw_();
dW_2();
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(smm1<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
DWW++;
Dw_1++;
if(Dw=="青铜"){
jbb+=50;
}
if(Dw!="青铜")
jbb+=100;
smm1=0;
if(Dw=="青铜"){
cout<<"获得:\n金币+"<<50<<endl;
}
if(Dw!="青铜"){
cout<<"获得:\n金币+"<<100<<endl;
}
// HH++;
// ff++;
cout<<"1.返回 2.匹配对手"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
if(bb==2){
goto ab;
}
}
}
}
}
1.4 野外探索
代码:
while(1){
clean1();
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 野 外 探 索 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始探索 3.怪兽领主"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
while(1){
cout<<"\n=====================================第 "<<ff<<" 米==========================================="<<endl;
srand(time(0));
gg=rand()%4;
cout<<"\n "<<gw[gg]<<" "<<endl;
sm1_=sm1_1;
smm=70+15*HH;
zdl=30+10*HH;
cout<<"生命值:"<<smm<<endl;
cout<<"战斗力:"<<zdl<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始 "<<endl;
cin>>aa;
while(aa<=0||aa>2){
if(aa<=0||aa>2){
cout<<"输入错误,请重新输入!\n"<<endl;
}
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始 "<<endl;
cin>>aa;
}
if(aa==1){
break;
}
if(aa==2){
while(1){
if(sm1_>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
smm-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
smm-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
smm-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(smm>0&&sm1_>0){
cout<<"\n-------------------------------------敌方对战-------------------------------------------"<<endl;
cout<<"食人草\n"<<"生命值:"<<smm <<endl;
cout<<"释放技能:毒液\n伤害:"<<sh_src1<<endl;
sm1_-=sh_src1;
}
if(sm1_<=0&&smm>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(smm<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=10+1*HH;
jyy+=5+1*HH;
smm=0;
cout<<"获得:\n金币+"<<10+1*HH<<endl<<"经验值+"<<5+1*HH<<endl;
HH++;
ff++;
cout<<"1.继续前进"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
}
}
if(aa==3){
while(1){
clean1();
sm1_=sm1_b;
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 怪 兽 领 主 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.普通领主 3.宇宙领主"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
if(bb==2){
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.金角巨兽 2.黑湖藤"<<endl;
cin>>bb;
if(bb==1){
clean1();
cout<<"\n========================================================================================\n"<<endl;
cout<<"金角巨兽\n生命值:"<<Sm_p1<<"\n攻击力:"<<Sh_p1<<endl;
cout<<"\n========================================================================================\n"<<endl;
while(1){
if(Sm_p1>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
Sm_p1-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
Sm_p1-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
Sm_p1-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(sm1_>0&&Sm_p1){
cout<<"\n-------------------------------------领主对战-------------------------------------------"<<endl;
cout<<"金角巨兽\n生命值:"<<Sm_p1<<endl;
cout<<"释放技能:斩空\n伤害:"<<Sh_p1<<endl;
sm1_-=Sh_p1;
}
if(sm1_<=0&&Sm_p1>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(Sm_p1<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=750;
jyy+=350;
cout<<"获得:\n金币+"<<750<<endl<<"经验值+"<<350<<endl;
cout<<"1.返回"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
if(bb==2){
clean1();
int Sm_p2=10000,Sh_p2=4500;
cout<<"\n========================================================================================\n"<<endl;
cout<<"黑湖藤\n生命值:"<<Sm_p2<<"\n攻击力:"<<Sh_p2<<endl;
cout<<"\n========================================================================================\n"<<endl;
while(1){
if(Sm_p2>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
Sm_p2-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
Sm_p2-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
Sm_p2-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(sm1_>0&&Sm_p2){
cout<<"\n-------------------------------------领主对战-------------------------------------------"<<endl;
cout<<"黑湖藤\n生命值:"<<Sm_p2<<endl;
int aaaa;
srand(time(0)) ;
aaaa=rand()%aaaa+1000;
cout<<"释放技能:粘液\n伤害:"<<aaaa<<endl;
sm1_-=aaaa;
}
if(sm1_<=0&&Sm_p2>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(Sm_p2<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=750;
jyy+=350;
cout<<"获得:\n金币+"<<750<<endl<<"经验值+"<<350<<endl;
cout<<"1.返回"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
}
}
}
}
1.5 数据的保存与读取
1.5.1 保存数据
代码:
将每个数据之间空一格存入"灵 宠 世 界.txt"中。
ofstream is;
is.open("灵 宠 世 界.txt",ios::out);
is <<LC_num<<" "<<xhl_dj<<" "<<xhl_zdl<<" " <<LC_mj<<" "<<DWW<<" " <<Dw_1<<" "<<djj<<" "<<Dw_2<<" " <<sm1<<" "<<sh_xhl1<<" "<<sm_1<<" " <<sh_xhl2<<" "<<sh_src1<<" "<<dd<<" "<<ee<<" "<<jbb<<" "<<djj<<" "<<jyy<<" "<<HH<<" "<<sm1_b<<" "<<ff<<" "<<jj<<" "<<sw<<" "<<sw_nr<<" "<<kk<<" "<<xhl1<<" "<<xhl2<<" "<<nn<<" "<<oo<<" "<<bj<<" "<<xhl3<<" "<<sh_xhl3<<" "<<pp; //写入 cin>>
is.close();// 关闭文件,可不写 =1,=1,nn=100,oo=50
cout<<"数据保存成功!\n";
1.5.2 读取数据
代码:
打开文件,读取数据储存在字符串put中,将其以空格为界限分割,存入向量temp中,再用stringstream通过for循环,每个进行数据类型转换存入每个游戏变量中即可。
vector<string>test;
ifstream os;
os.open("灵 宠 世 界.txt",std::ios::in);
string put;
while (getline(os,put)){
}
stringstream ss;
ss<<put;
string temp;
while(getline(ss,temp,' '))
test.push_back(temp); //向量
stringstream sss,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27,s28,s29,s30,s31,s32,s33;
for(int i=0;i<test.size();i++){
if(i==0){
sss<<test[i];
sss>>LC_num;
}
if(i==1){
s1<<test[i];
s1>>xhl_dj;
}
if(i==2){
s2<<test[i];
s2>>xhl_zdl;
}
if(i==3){
s3<<test[i];
s3>>LC_mj;
}
if(i==4){
s4<<test[i];
s4>>DWW; //>>>>>>>>>>>>>>
}
if(i==5){
s5<<test[i];
s5>>Dw_1;
}
if(i==6){
s6<<test[i];
s6>>djj;
}
if(i==7){
s7<<test[i];
s7>>Dw_2;
}
if(i==8){
s8<<test[i];
s8>>sm1;
}
if(i==9){
s9<<test[i];
s9>>sh_xhl1; //sm_1
}
if(i==10){
s10<<test[i];
s10>>sm_1;
}
if(i==11){
s11<<test[i];
s11>>sh_xhl2;
}
if(i==12){
s12<<test[i];
s12>>sh_src1;
}
if(i==13){
s13<<test[i];
s13>>dd;
}
if(i==14){
s14<<test[i];
s14>>ee;
}
if(i==15){
s15<<test[i];
s15>>jbb;
}
if(i==16){
s16<<test[i];
s16>>djj;
}
if(i==17){
s17<<test[i];
s17>>jyy;
}
if(i==18){
s18<<test[i];
s18>>HH;
}
if(i==19){
s19<<test[i];
s19>>sm1_b;
}
if(i==20){
s20<<test[i];
s20>>ff;
}
if(i==21){
s21<<test[i];
s21>>jj;
}
if(i==22){
s22<<test[i];
s22>>sw;
}
if(i==23){
s23<<test[i];
s23>>sw_nr;
}
if(i==24){
s24<<test[i];
s24>>kk;
}
if(i==25){
s25<<test[i];
s25>>xhl1;
}
if(i==26){
s26<<test[i];
s26>>xhl2;
}
if(i==27){
s27<<test[i];
s27>>nn;
}
if(i==28){
s28<<test[i];
s28>>oo;
}
if(i==29){
s29<<test[i];
s29>>bj;
}
if(i==30){
s30<<test[i];
s30>>xhl3;
}
if(i==31){
s31<<test[i];
s31>>sh_xhl3;
}
if(i==32){
s32<<test[i];
s32>>pp;
}
if(i==33){
s33<<test[i];
s33>>sw_mxsy;
}
}
二、完整代码
代码:
#include<bits/stdc++.h>
#include <windows.h>
using namespace std;
#define scta(a) SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE),a);
void clean1();
void clean();
void Duan();
void DJJ();
void dW_1();
void dw_();
void DQ_sj();
void dW_2();
void PM_zzl();
void LC_xhl_dj();
void qt();
void xy(int y,int x);
long long LC_chose,LC_num=1, LC_zzl=0,LC_zzl_pm=0, LC_num_pm=0,xhl_dj=1,xhl_zdl=100,LC_mj,aa,bb,sm1=150,cc,sh_xhl1=100,sm_1,sh_xhl2=50,sh_src1=30,dd=70,f,sm1_1,smm1,zdl1,Sm_p1=8000,Sh_p1=2200;
long long ee=1,jbb=0,djj=0,jyy,Dw_2,DWW,Dw_1,ff,gg,smm=10,zdl,sm1_,sm1_b=150,sw,sw_nr,kk=20,xhl1=1,xhl2=1,nn=100,oo=50,bj=4,xhl3=1,sh_xhl3=200,pp=150,sw_mxsy;
long long HH=1,jj=50,ll,mm;
long long h_ly,ft;
string Name,xhl_xt="幼兽",Dw="青铜";
string gw[]={"食人草","尖牙怪","僵尸","丧尸"};
int main(){
DQ_sj();
dw_();
sm1_1=sm1_b;
if(bj==4){
system("color E1");
}
if(bj==2){
system("color F1");
}
if(bj==3){
system("color 07");
}
if(bj==5){
system("color 97");
}
clean1();
while(1){
dW_2();
LC_zzl=xhl_zdl;
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 灵 宠 世 界 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"======================================================================================================"<<endl;
DJJ();
dW_1();
cout<<"||";
Duan();
cout<<"||等级:"<<djj<<endl;
cout<<"||金币:"<<jbb<<endl;
cout<<"||灵宠:"<< LC_num<<endl;
cout<<"||经验值:"<<jyy<<endl;
cout<<"||总战力:"<< LC_zzl<<endl;
cout<<"||灵宠排名:";
if(LC_num==1){
srand(time(0));
LC_num_pm=rand()%9999+90000;
cout<<LC_num_pm<<endl;
}
cout<<"||总战力排名:";
PM_zzl();
cout<<"======================================================================================================"<<endl;
cout<<"|| || || || || || || || ||"<<endl;
cout<<"|| 1. 灵宠 || 2. 试炼塔 || 3. 对战 || 4. 背包 || 5.野外探索 || 6.退出 || 7.商店 || 8.设置 ||"<<endl;
cout<<"|| || || || || || || || ||"<<endl;
cin>>LC_chose;
if(LC_chose==1){
while(1){
system("cls");
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 灵 宠 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.宠物图鉴 3.";
LC_xhl_dj();
cin>>LC_chose;
cout<<"\n========================================================================================"<<endl;
if(LC_chose==1){
clean1();
break;
}
if(LC_chose==2){
while(1){
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 宠 物 图 鉴 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.小火龙 3.神木猿 ";
scta(236);
cout<<"4.九天寒冰鹿 "<<endl;
cin>>aa;
if(bj==4){
system("color E1");
}
if(bj==2){
system("color F1");
}
if(bj==3){
system("color 07");
}
if(aa==1){
break;
}
}
}
if(LC_chose==3){
while(1){
LC_xhl_dj();
xhl_zdl=sh_xhl1+sh_xhl2+sh_xhl3;
cout<<"等级:"<<xhl_dj<<endl;
cout<<"生命值:"<<sm1<<endl;
cout<<"战斗力:"<<xhl_zdl<<endl;
cout<<"========================================================================================\n"<<endl;
cout<<"1.返回 2.使用秘籍 3.技能 4.装备 5.食物 6.升级"<<endl;
cin>>LC_chose;
if(LC_chose==1) {
clean1();
break;
}
if(LC_chose==2) {
if(LC_mj==0){
cout<<"========================================================================================\n"<<endl;
cout<<"暂无秘籍可用!";
clean();
}
}
if(LC_chose==3) {
while(1){
cout<<"========================================================================================\n"<<endl;
cout<<"1.火球"<<xhl1<<"级 伤害"<<sh_xhl1<<endl;
cout<<"2.拳击"<<xhl2<<"级 伤害"<<sh_xhl2<<endl;
if(ft==1){
cout<<"3.焚天"<<xhl3<<"级 伤害"<<sh_xhl3<<endl;
}
cout<<"========================================================================================\n"<<endl;
cout<<"1.返回 2.升级技能" <<endl;
cin>>LC_chose;
if(LC_chose==1) {
clean1();
break;
}
if(LC_chose==2) {
while(1){
cout<<"========================================================================================\n"<<endl;
cout<<"1.返回 \n";
cout<<"2.火球 "<<nn<<"金币 "<<endl<<"3.拳击 "<<oo<<"金币"<<endl;
if(ft==1){
cout<<"4.焚天 "<<pp<<"金币"<<endl;
}
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
if(jbb<nn){
cout<<"金币不足"<<endl;
continue;
}
if(jbb>=nn){
cout<<"升级成功!"<<endl;
xhl1++;
sh_xhl1+=80;
jbb-=nn;
nn+=110;
}
}
if(aa==3){
if(jbb<mm){
cout<<"金币不足"<<endl;
continue;
}
if(jbb>=mm){
cout<<"升级成功!"<<endl;
xhl2++;
sh_xhl2+=50;
jbb-=oo;
oo+=80;
}
}
if(aa==4&&ft==1){
if(jbb<pp){
cout<<"金币不足"<<endl;
continue;
}
if(jbb>=pp){
cout<<"升级成功!"<<endl;
xhl3++;
sh_xhl3+=100;
jbb-=pp;
pp+=160;
}
}
}
}
}
}
if(LC_chose==4) {
cout<<"暂无装备可用!";
clean();
}
if(LC_chose==5) {
while(1){
if(sw==0){
cout<<"无食物可喂食"<<endl;
clean();
break;
}
if(sw>0){
cout<<"1.返回 ";
if(sw==1){
cout<<"2.";
if(sw_nr>0){
cout<<"牛肉 "<<sw_nr<<"个 使用1个"<<endl;
}
if(sw_mxsy>0){
cout<<"满血盛宴 "<<sw_mxsy<<"个 使用1个"<<endl;
}
cin>>aa;
if(aa==1){
break;
}
if(aa==2){
if(sm1==sm1_b){
cout<<"生命值已满!"<<endl;
}
if(sm1<sm1_b){
if(sw_nr>0) {
sw_nr--;
if(sw_nr==0){
sw--;
}
sm1+=100;
if(sm1>sm1_b){
sm1=sm1_b;
}
cout<<"已使用"<<endl;
}
if(sw_mxsy){
sw_mxsy--;
if(sw_mxsy==0){
sw--;
}
sm1=sm1_b;
cout<<"已使用"<<endl;
}
}
}
}
}
}
}
//升级
if(LC_chose==6) {
while(1){
cout<<"1.返回 2.升级 需要"<<jj<<"金币"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
if(jj>jbb){
cout<<"金币不足!"<<endl;
clean();
break;
}
if(jj<=jbb){
cout<<"升级成功!"<<endl;
xhl_dj++;
jbb-=jj;
if(xhl_dj<10){
jj+=80;
}
if(xhl_dj>=10){
jj+=110;
}
sm1_b+=50;
sm1_1=sm1=sm1_b;
sh_xhl1+=30;
sh_xhl2+=15;
sh_xhl2+=70;
clean();
}
}
}
}
}
}
}
}
//二
if(LC_chose==2){
while(1){
clean1();
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 试 炼 塔 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始试炼"<<endl;
cin>>aa;
cout<<"\n========================================================================================"<<endl;
if(aa==1){
clean1();
break;
}
if(aa==2){
while(1){
cout<<"\n=====================================第 "<<ee<<" 层===========================================\n"<<endl;
srand(time(0));
gg=rand()%4;
cout<<"\n "<<gw[gg]<<" "<<endl;
if(f>0){
dd+=20*ee;
sm_1=dd;
sh_src1+=25*ee;
f=0;
}
cout<<"生命值:"<<dd<<endl;
cout<<"技能:毒液 伤害:"<<sh_src1;
cout<<"\n----------------------------------------------------------------------------------------"<<endl;
cout<<"选择灵宠出战:";
if(LC_num==1){
cout<<"1.返回 2.小火龙"<<endl;
}
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
while(1){
if(sm1>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
sm_1-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
sm_1-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
sm_1-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(sm_1>0&&sm1>0){
cout<<"\n-------------------------------------敌方对战-------------------------------------------"<<endl;
cout<<"食人草\n"<<"生命值:"<<sm_1 <<endl;
cout<<"释放技能:毒液\n伤害:"<<sh_src1<<endl;
sm1-=sh_src1;
}
if(sm1<=0&&sm_1>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(sm_1<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=20*ee;
jyy+=10*ee;
cout<<"获得:\n金币+"<<20*ee<<endl<<"经验值+"<<10*ee<<endl;
ee++;
f++;
cout<<"1.下一关"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
}
}
}
}
if(LC_chose==3){
while(1){
system("cls");
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 对 战 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始匹配对手"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
//smm1,zdl1
if(aa==2){
ab:
cout<<"\n========================================================================================\n"<<endl;
cout<<"您的当前";
Duan();
cout<<"\n========================================================================================\n"<<endl;
Sleep(1000);
cout<<"匹配成功!"<<endl;
sm1_=sm1_b;
clean();
cout<<"\n========================================================================================\n"<<endl;
srand(time(0));
ll=rand()%9999+1000;
cout<<"游客_"<<ll<<endl;
srand(time(0));
mm=rand()%4+1;
if(mm<=3){
if(Dw=="青铜"){
smm1=150+50*mm;
zdl1=100+35*mm;
}
if(Dw=="白银"){
smm1=450+50*mm;
zdl1=350+35*mm;
}
if(Dw=="黄金"){
smm1=850+50*mm;
zdl1=550+35*mm;
}
if(Dw=="铂金"){
smm1=1000+50*mm;
zdl1=600+35*mm;
}
if(Dw=="钻石"){
smm1=2000+200*mm;
zdl1=1000+350*mm;
}
if(Dw=="星耀"){
smm1=3000+500*mm;
zdl1=1900+350*mm;
}
if(Dw=="王者"){
smm1=4000+500*mm;
zdl1=2900+350*mm;
}
if(Dw=="星光"){
smm1=5000+500*mm;
zdl1=4000+350*mm;
}
}
if(mm==4){
smm1=sm1_+655;
zdl1=xhl_zdl+700;
}
cout<<"生命值:"<<smm1<<endl;
cout<<"战斗力:"<<zdl1<<endl;
cout<<"\n========================================================================================\n"<<endl;
while(1){
if(sm1_>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
smm1-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
smm1-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
smm1-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(smm1>0&&sm1_>0){
cout<<"\n-------------------------------------"<<"游客_"<<ll<<"对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<smm1 <<endl;
cout<<"释放技能:火球\n伤害:"<<zdl1<<endl;
sm1_-=zdl1;
}
if(sm1_<=0&&smm1>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
DWW--;
Dw_1--;
if(DWW<=0){
DWW=0;
}
if(Dw_1<=0){
Dw_1=0;
dw_();
dW_2();
}
dw_();
dW_2();
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(smm1<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
DWW++;
Dw_1++;
if(Dw=="青铜"){
jbb+=50;
}
if(Dw!="青铜")
jbb+=100;
smm1=0;
if(Dw=="青铜"){
cout<<"获得:\n金币+"<<50<<endl;
}
if(Dw!="青铜"){
cout<<"获得:\n金币+"<<100<<endl;
}
// HH++;
// ff++;
cout<<"1.返回 2.匹配对手"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
if(bb==2){
goto ab;
}
}
}
}
}
}
//野 外 探 索
if(LC_chose==5){
while(1){
clean1();
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 野 外 探 索 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始探索 3.怪兽领主"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
while(1){
cout<<"\n=====================================第 "<<ff<<" 米==========================================="<<endl;
srand(time(0));
gg=rand()%4;
cout<<"\n "<<gw[gg]<<" "<<endl;
sm1_=sm1_1;
smm=70+15*HH;
zdl=30+10*HH;
cout<<"生命值:"<<smm<<endl;
cout<<"战斗力:"<<zdl<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始 "<<endl;
cin>>aa;
while(aa<=0||aa>2){
if(aa<=0||aa>2){
cout<<"输入错误,请重新输入!\n"<<endl;
}
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.开始 "<<endl;
cin>>aa;
}
if(aa==1){
break;
}
if(aa==2){
while(1){
if(sm1_>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
smm-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
smm-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
smm-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(smm>0&&sm1_>0){
cout<<"\n-------------------------------------敌方对战-------------------------------------------"<<endl;
cout<<"食人草\n"<<"生命值:"<<smm <<endl;
cout<<"释放技能:毒液\n伤害:"<<sh_src1<<endl;
sm1_-=sh_src1;
}
if(sm1_<=0&&smm>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(smm<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=10+1*HH;
jyy+=5+1*HH;
smm=0;
cout<<"获得:\n金币+"<<10+1*HH<<endl<<"经验值+"<<5+1*HH<<endl;
HH++;
ff++;
cout<<"1.继续前进"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
}
}
if(aa==3){
while(1){
clean1();
sm1_=sm1_b;
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 怪 兽 领 主 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.普通领主 3.宇宙领主"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
if(bb==2){
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.金角巨兽 2.黑湖藤"<<endl;
cin>>bb;
if(bb==1){
clean1();
cout<<"\n========================================================================================\n"<<endl;
cout<<"金角巨兽\n生命值:"<<Sm_p1<<"\n攻击力:"<<Sh_p1<<endl;
cout<<"\n========================================================================================\n"<<endl;
while(1){
if(Sm_p1>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
Sm_p1-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
Sm_p1-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
Sm_p1-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(sm1_>0&&Sm_p1){
cout<<"\n-------------------------------------领主对战-------------------------------------------"<<endl;
cout<<"金角巨兽\n生命值:"<<Sm_p1<<endl;
cout<<"释放技能:斩空\n伤害:"<<Sh_p1<<endl;
sm1_-=Sh_p1;
}
if(sm1_<=0&&Sm_p1>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(Sm_p1<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=750;
jyy+=350;
cout<<"获得:\n金币+"<<750<<endl<<"经验值+"<<350<<endl;
cout<<"1.返回"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
if(bb==2){
clean1();
int Sm_p2=10000,Sh_p2=4500;
cout<<"\n========================================================================================\n"<<endl;
cout<<"黑湖藤\n生命值:"<<Sm_p2<<"\n攻击力:"<<Sh_p2<<endl;
cout<<"\n========================================================================================\n"<<endl;
while(1){
if(Sm_p2>0){
cout<<"\n-------------------------------------玩家对战-------------------------------------------"<<endl;
cout<<"小火龙\n"<<"生命值:"<<sm1_<<endl;
cout<<"释放技能:1.火球 2.拳击";
if(ft==1){
cout<<" 3.焚天";
}
cout<<endl;
cin>>aa;
if(aa==1){
cout<<"伤害:"<<sh_xhl1<<endl;
Sm_p2-=sh_xhl1;
}
if(aa==2){
cout<<"伤害:"<<sh_xhl2<<endl;
Sm_p2-=sh_xhl2;
}
if(ft==1&&aa==3){
cout<<"伤害:"<<sh_xhl3<<endl;
Sm_p2-=sh_xhl3;
}
}
cout<<"\n----------------------------------------------------------------------------------------\n"<<endl;
if(sm1_>0&&Sm_p2){
cout<<"\n-------------------------------------领主对战-------------------------------------------"<<endl;
cout<<"黑湖藤\n生命值:"<<Sm_p2<<endl;
int aaaa;
srand(time(0)) ;
aaaa=rand()%aaaa+1000;
cout<<"释放技能:粘液\n伤害:"<<aaaa<<endl;
sm1_-=aaaa;
}
if(sm1_<=0&&Sm_p2>0){
cout<<"\n========================================================================================"<<endl;
cout<<"你输了!"<<endl;
sm1_=0;
cout<<"1.返回\n";
cin>>aa;
if(aa==1){
clean1() ;
break;
}
}
if(Sm_p2<=0){
cout<<"\n========================================================================================"<<endl;
cout<<"你赢了!"<<endl;
jbb+=750;
jyy+=350;
cout<<"获得:\n金币+"<<750<<endl<<"经验值+"<<350<<endl;
cout<<"1.返回"<<endl;
cin>>bb;
if(bb==1){
clean1();
break;
}
}
}
}
}
}
}
}
}
//数据
if(LC_chose==6){
clean1();
cout<<"1.保存数据 2.清除数据 3.不保存数据 4.返回"<<endl;
cin>>aa;
if(aa==1){
ofstream is;
is.open("灵 宠 世 界.txt",ios::out);
is <<LC_num<<" "<<xhl_dj<<" "<<xhl_zdl<<" " <<LC_mj<<" "<<DWW<<" " <<Dw_1<<" "<<djj<<" "<<Dw_2<<" " <<sm1<<" "<<sh_xhl1<<" "<<sm_1<<" " <<sh_xhl2<<" "<<sh_src1<<" "<<dd<<" "<<ee<<" "<<jbb<<" "<<djj<<" "<<jyy<<" "<<HH<<" "<<sm1_b<<" "<<ff<<" "<<jj<<" "<<sw<<" "<<sw_nr<<" "<<kk<<" "<<xhl1<<" "<<xhl2<<" "<<nn<<" "<<oo<<" "<<bj<<" "<<xhl3<<" "<<sh_xhl3<<" "<<pp; //写入 cin>>
is.close();// 关闭文件,可不写 =1,=1,nn=100,oo=50
cout<<"数据保存成功!\n";
clean();
qt();
break;
}
if(aa==2){
cout<<"提示:是否确认要删除所有数据\n\n1.返回 2.确认\n";
cin>>aa;
if(aa==1){
continue;
}
if(aa==2){
ofstream outfile("灵 宠 世 界.txt",ios::trunc);//灵 宠 世 界.txt里面的内容会被清空
}
clean1();
qt();
break;
}
if(aa==3){
clean1();
qt();
break;
}
if(aa==4){
clean1();
continue;
}
}
if(LC_chose==7) {
while(1){
system("cls");
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 商 店 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.食物 3.秘籍 4.药水 5.装备 "<<endl;
cin>>aa;
cout<<"\n========================================================================================"<<endl;
if(aa==1){
clean1();
break;
}
if(aa==2){
while(1){
cout<<"1.返回 2.牛肉 60金币 3.苹果 20金币 4.金苹果 50金币 5.小零食10金币 6.满血盛宴 140金币"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
if(jbb<60){
cout<<"金币不足!"<<endl;
}
if(jbb>=60){
sw++;
jbb-=60;
sw_nr++;
cout<<"购买成功!"<<endl;
}
clean();
}
if(aa==6){
if(jbb<140){
cout<<"金币不足!"<<endl;
}
if(jbb>=140){
sw++;
jbb-=140;
sw_mxsy++;
cout<<"购买成功!"<<endl;
}
clean();
}
}
}
}
}
if(LC_chose==8){
while(1){
ac:
system("cls");
cout<<" ======================================================================="<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || 设 置 ||"<<endl;
cout<<" || ||"<<endl;
cout<<" || ||"<<endl;
cout<<" ======================================================================="<<endl;
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回\n\n2.寻找作者(作者主页)\n\n3.背景颜色\n"<<endl;
cin>>aa;
if(aa==1){
clean1();
break;
}
if(aa==2){
system("start https://blog.csdn.net/m0_66072738?type=blog");//打开网站
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回"<<endl;
cin>>aa;
if(aa==1){
goto ac;
}
}
if(aa==3){
cout<<"\n========================================================================================\n"<<endl;
cout<<"1.返回 2.灰色 3.黑白 4.黄色 5.蓝色"<<endl;
cin>>aa;
if(aa==1){
goto ac;
}
if(aa==2){
system("color F1");
bj=2;;
}
if(aa==3){
system("color 07");
bj=3;
}
if(aa==4){
system("color E1");
bj=4;
}
if(aa==5){
system("color 97");
bj=5;
}
}
}
}
}
return 0;
}
void qt(){
for (int i=1;i<=50;i++)
{
xy(3,i);
cout <<"Tommy6gn独家出品";
Sleep(70);
xy(3,i);
cout <<" ";
}
Sleep(500);
for (int i=20;i>0;i--)
{
xy(i,i);
cout <<"欢迎提供建议";
Sleep(110);
xy(i,i);
cout <<" \n";
}
Sleep(500);
}
void xy(int y,int x)
{
COORD coord;
coord.X=x;
coord.Y=y;
HANDLE a=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(a,coord);
}
void LC_xhl_dj(){
if(xhl_dj<=3){ //
cout<<"小火龙\n";
}
if(xhl_dj>3&&xhl_dj<10){ //
cout<<"大火龙\n";
}
if(xhl_dj>=10){ //
cout<<"焚天巨龙\n";
ft=1;
}
if(xhl_dj>=18){ //
cout<<"焚天神龙\n";
h_ly=1;
}
}
void PM_zzl(){
if(LC_zzl>=100&&LC_zzl<150){
srand(time(0));
LC_zzl_pm=rand()%9100+90000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=150&&LC_zzl<=500){
srand(time(0));
LC_zzl_pm=rand()%9000+80000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=500&&LC_zzl<=900){
srand(time(0));
LC_zzl_pm=rand()%9000+70000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=900&&LC_zzl<=1300){
srand(time(0));
LC_zzl_pm=rand()%9000+60000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=1300&&LC_zzl<=1700){
srand(time(0));
LC_zzl_pm=rand()%9000+50000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=1700&&LC_zzl<=2100){
srand(time(0));
LC_zzl_pm=rand()%9000+40000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=2100&&LC_zzl<=2500){
srand(time(0));
LC_zzl_pm=rand()%9000+30000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=2500&&LC_zzl<=3500){
srand(time(0));
LC_zzl_pm=rand()%9000+20000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=3500&&LC_zzl<=4500){
srand(time(0));
LC_zzl_pm=rand()%9000+10000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=4500&&LC_zzl<=5500){
srand(time(0));
LC_zzl_pm=rand()%1000+9000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=5500&&LC_zzl<=6500){
srand(time(0));
LC_zzl_pm=rand()%1000+8000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=6500&&LC_zzl<=8000){
srand(time(0));
LC_zzl_pm=rand()%1000+7000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=8000&&LC_zzl<=10000){
srand(time(0));
LC_zzl_pm=rand()%1000+6000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=10000&&LC_zzl<=12000){
srand(time(0));
LC_zzl_pm=rand()%1000+5000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=12000&&LC_zzl<=14000){
srand(time(0));
LC_zzl_pm=rand()%1000+4000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=14000&&LC_zzl<=16000){
srand(time(0));
LC_zzl_pm=rand()%1000+3000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=16000&&LC_zzl<=18000){
srand(time(0));
LC_zzl_pm=rand()%1000+2000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=18000&&LC_zzl<=20000){
srand(time(0));
LC_zzl_pm=rand()%1000+1000;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=20000&&LC_zzl<=22000){
srand(time(0));
LC_zzl_pm=rand()%500;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=22000&&LC_zzl<=24000){
srand(time(0));
LC_zzl_pm=rand()%200;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>=24000&&LC_zzl<=26000){
srand(time(0));
LC_zzl_pm=rand()%100;
cout<<LC_zzl_pm<<endl;
}
if(LC_zzl>26000){
LC_zzl_pm=1;
cout<<LC_zzl_pm<<endl;
}
}
void dW_2(){
if(Dw=="青铜"&&Dw_1==3){
DWW=3;
}
if(Dw=="白银"&&Dw_1==8){
DWW=4;
}
if(Dw=="黄金"&&Dw_1==14){
DWW=5;
}
if(Dw=="铂金"&&Dw_1==21){
DWW=6;
}
if(Dw=="钻石"&&Dw_1==29){
DWW=7;
}
if(Dw=="星耀"&&Dw_1==38){
DWW=8;
}
if(Dw=="王者"&&Dw_1==48){
DWW=9;
}
if(Dw=="星光"&&Dw_1==59){
DWW=10;
}
}
void DQ_sj(){ //>>>>
vector<string>test;
ifstream os;
os.open("灵 宠 世 界.txt",std::ios::in);
string put;
while (getline(os,put)){
}
stringstream ss;
ss<<put;
string temp;
while(getline(ss,temp,' '))
test.push_back(temp); //向量
stringstream sss,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27,s28,s29,s30,s31,s32,s33;
for(int i=0;i<test.size();i++){
if(i==0){
sss<<test[i];
sss>>LC_num;
}
if(i==1){
s1<<test[i];
s1>>xhl_dj;
}
if(i==2){
s2<<test[i];
s2>>xhl_zdl;
}
if(i==3){
s3<<test[i];
s3>>LC_mj;
}
if(i==4){
s4<<test[i];
s4>>DWW; //>>>>>>>>>>>>>>
}
if(i==5){
s5<<test[i];
s5>>Dw_1;
}
if(i==6){
s6<<test[i];
s6>>djj;
}
if(i==7){
s7<<test[i];
s7>>Dw_2;
}
if(i==8){
s8<<test[i];
s8>>sm1;
}
if(i==9){
s9<<test[i];
s9>>sh_xhl1; //sm_1
}
if(i==10){
s10<<test[i];
s10>>sm_1;
}
if(i==11){
s11<<test[i];
s11>>sh_xhl2;
}
if(i==12){
s12<<test[i];
s12>>sh_src1;
}
if(i==13){
s13<<test[i];
s13>>dd;
}
if(i==14){
s14<<test[i];
s14>>ee;
}
if(i==15){
s15<<test[i];
s15>>jbb;
}
if(i==16){
s16<<test[i];
s16>>djj;
}
if(i==17){
s17<<test[i];
s17>>jyy;
}
if(i==18){
s18<<test[i];
s18>>HH;
}
if(i==19){
s19<<test[i];
s19>>sm1_b;
}
if(i==20){
s20<<test[i];
s20>>ff;
}
if(i==21){
s21<<test[i];
s21>>jj;
}
if(i==22){
s22<<test[i];
s22>>sw;
}
if(i==23){
s23<<test[i];
s23>>sw_nr;
}
if(i==24){
s24<<test[i];
s24>>kk;
}
if(i==25){
s25<<test[i];
s25>>xhl1;
}
if(i==26){
s26<<test[i];
s26>>xhl2;
}
if(i==27){
s27<<test[i];
s27>>nn;
}
if(i==28){
s28<<test[i];
s28>>oo;
}
if(i==29){
s29<<test[i];
s29>>bj;
}
if(i==30){
s30<<test[i];
s30>>xhl3;
}
if(i==31){
s31<<test[i];
s31>>sh_xhl3;
}
if(i==32){
s32<<test[i];
s32>>pp;
}
if(i==33){
s33<<test[i];
s33>>sw_mxsy;
}
}
}
void clean1(){
system("cls");
}
void clean(){
Sleep(1100);
system("cls");
}
void Duan(){
if(Dw=="青铜"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆\n";
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆\n";
// Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆\n";
// Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★\n";
// Dw_1++;
}
if(DWW>=4){
Dw="白银";
DWW-=4;
// Dw_1++;
}
}
if(Dw=="白银"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆ ☆\n";
// Dw_1++;
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆ ☆\n";
// Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆ ☆\n";
// Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ☆\n";
// Dw_1++;
}
if(DWW==4){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★\n";
// Dw_1++;
}
if(DWW>=5){
Dw="黄金";
DWW-=5;
// Dw_1++;//9
}
}
if(Dw=="黄金"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆ ☆ ☆\n";
// Dw_1++;
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆ ☆ ☆\n";
// Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆ ☆ ☆\n";
// Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ☆ ☆\n";
// Dw_1++;
}
if(DWW==4){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ☆\n";
// Dw_1++;
}
if(DWW==5){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★\n";
// //Dw_1++;
}
if(DWW>=6){
Dw="铂金";
DWW-=6;
//Dw_1++;//15
}
}
if(Dw=="铂金"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==4){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ☆ ☆\n";
//Dw_1++;
}
if(DWW==5){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ☆\n";
//Dw_1++;
}
if(DWW==6){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★\n";
//Dw_1++;
}
if(DWW>=7){
Dw="钻石";
DWW-=7;
//Dw_1++;//22
}
}
if(Dw=="钻石"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==4){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==5){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ☆ ☆\n";
//Dw_1++;
}
if(DWW==6){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ☆\n";
//Dw_1++;
}
if(DWW==7){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★\n";
//Dw_1++;
}
if(DWW>=8){
Dw="星耀";
DWW-=8;
//Dw_1++;//30
}
}
if(Dw=="星耀"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==4){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==5){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==6){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ☆ ☆\n";
//Dw_1++;
}
if(DWW==7){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ☆\n";
//Dw_1++;
}
if(DWW==8){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ★\n";
//Dw_1++;
}
if(DWW>=9){
Dw="王者";
DWW-=9;
//Dw_1++;//39
}
}
if(Dw=="王者"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==4){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==5){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==6){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==7){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ☆ ☆\n";
//Dw_1++;
}
if(DWW==8){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ★ ☆\n";
//Dw_1++;
}
if(DWW==9){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ★ ★\n";
//Dw_1++;
}
if(DWW>=10){
Dw="星光";
DWW-=10;
//Dw_1++;//49
}
}
if(Dw=="星光"){
if(DWW==0){
cout<<"段位:"<<Dw;
cout<<" ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==1){
cout<<"段位:"<<Dw;
cout<<" ★ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==2){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==3){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ☆ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==4){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ☆ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==5){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ☆ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==6){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ☆ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==7){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ☆ ☆ ☆\n";
//Dw_1++;
}
if(DWW==8){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ★ ☆ ☆\n";
//Dw_1++;
}
if(DWW==9){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ★ ★ ☆\n";
//Dw_1++;
}
if(DWW==10){
cout<<"段位:"<<Dw;
cout<<" ★ ★ ★ ★ ★ ★ ★ ★ ★ ★\n";
//Dw_1++;
}
if(DWW>=11){
Dw="宇宙";
DWW-=11;
//Dw_1++;//60
}
}
}
void dW_1(){
for(int q=0;q<=10;q++){
if(Dw_2/3>=1){
DWW++;
Dw_2-=3;
}
}
}
void DJJ(){
for(int j=0;j<=10;j++){
if(jyy/kk>=1){
djj++;
jyy-=kk;
Dw_2++;
kk+=5;
}
}
}
void dw_(){
if(Dw_1<4){
Dw="青铜";
}
if(Dw_1>=4&&Dw_1<9){
Dw="白银";
}
if(Dw_1>=9&&Dw_1<15){
Dw="黄金";
}
if(Dw_1>=15&&Dw_1<22){
Dw="铂金";
}
if(Dw_1>=22&&Dw_1<30){
Dw="钻石";
}
if(Dw_1>=30&&Dw_1<39){
Dw="星耀";
}
if(Dw_1>=39&&Dw_1<49){
Dw="王者";
}
if(Dw_1>=49&&Dw_1<60){
Dw="星光";
}
}
业精于勤,荒于嬉; 行成于思,毁于随。 6gn.