#include<bits/stdc++.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h>
#include <fstream>
#include <windows.h>
#include <ctime>
#define MIN 0
#define MAX 10
using namespace std;
string name,libaoma,mn,zong="无",rw1,rw2,ji="无";
int linggen2,jixu,jihui=5,jingjie1,douji2,zhuang,rww,rrw,shua,gongxian;
int hp=100,lanliang=0,yisu=5,gongji=10,fangyu=1,nianling=7,jinbi=1,tian,tian2;
int yidong,nian,dong,jingyan,diqu,moshou,mhp,shanghui,douji[17],shenxian,zjy,renwu1,renwu2;
int wuji1,paimai,jishou1,shuliang,mai,biaoji1,biaoji2,biaoji3,mgong,zm,zzm,zj,cundang,zmm,zmmm;
void color(int a)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void doushang(int k)
{
if(zhuang==1)mhp-=100;
if(zhuang==2)mhp-=173;
if(zhuang==3)hp+=200;
if(zhuang==4)mhp-=220;
if(zhuang==5)mhp-=237;
if(zhuang==6)mhp-=283;
if(zhuang==7)hp+=298;
if(zhuang==8)mhp-=300;
if(zhuang==9)hp+=310;
if(zhuang==10)hp+=330;
if(zhuang==11)hp+=360;
if(zhuang==12)hp+=390;
if(zhuang==13)mhp-=410;
if(zhuang==14)mhp-=500;
if(zhuang==15)mhp-=600;
if(zhuang==16)mhp-=800;
}
void donghua(int k)
{
color(2);
Sleep(100);cout<<"===================================="<<endl;
while(hp>0&&mhp>0)
{
system("cls");
Sleep(100);cout<<"萧"<<name<<" VS "<<mn<<endl;
Sleep(100);cout<<"你的血量: "<<hp<<" "<<mn<<"的血量: "<<mhp<<endl;
Sleep(100);cout<<"你的攻击力: "<<gongji<<" "<<mn<<"的攻击力: "<<mgong<<endl;
Sleep(100);cout<<"========================"<<endl;
Sleep(100);cout<<"| |"<<endl;
Sleep(100);cout<<"| |"<<endl;
Sleep(100);cout<<"| |"<<endl;
Sleep(100);cout<<"| ( ) |"<<endl;
Sleep(100);cout<<"| ↙|↘ ( )_____ |"<<endl;
Sleep(100);cout<<"| | |_____| |"<<endl;
Sleep(100);cout<<"| /\ | | |"<<endl;
Sleep(100);cout<<"| |"<<endl;
Sleep(100);cout<<"========================"<<endl;
Sleep(100);cout<<"攻击!(按1)"<<endl;
Sleep(100);cout<<"使用斗技!(按2)"<<endl;
cin>>jixu;
if(jixu==1)
hp=hp-mgong;
if(jixu==2)
doushang(1);
mhp=mhp-gongji;
system("cls");
}
}
void goumai(int k)
{
if(mai==1&&jinbi>=15){jinbi-=15;douji[1]++;}
if(mai==2&&jinbi>=25){jinbi-=25;douji[2]++;}
if(mai==3&&jinbi>=55){jinbi-=55;douji[3]++;}
if(mai==4&&jinbi>=105){jinbi-=105;douji[4]++;}
if(mai==5&&jinbi>=130){jinbi-=130;douji[5]++;}
if(mai==6&&jinbi>=155){jinbi-=155;douji[6]++;}
if(mai==7&&jinbi>=180){jinbi-=180;douji[7]++;}
if(mai==8&&jinbi>=205){jinbi-=205;douji[8]++;}
if(mai==9&&jinbi>=230){jinbi-=230;douji[9]++;}
if(mai==10&&jinbi>=255){jinbi-=255;douji[10]++;}
if(mai==11&&jinbi>=280){jinbi-=280;douji[11]++;}
if(mai==12&&jinbi>=305){jinbi-=305;douji[12]++;}
if(mai==13&&jinbi>=405){jinbi-=405;douji[13]++;}
if(mai==14&&jinbi>=505){jinbi-=505;douji[14]++;}
if(mai==15&&jinbi>=605){jinbi-=605;douji[15]++;}
if(mai==16&&jinbi>=705){jinbi-=705;douji[16]++;}
if(mai==17&&jinbi>=200){jinbi-=200;shenxian++;}
}
void heishi(int k)
{
color(3);
Sleep(100);cout<<"1.黄阶下品—吹火掌 15 "<<endl;
Sleep(100);cout<<"2.黄阶中品—烈阳斩 25 "<<endl;
Sleep(100);cout<<"3.黄阶上品—生命回复 55 "<<endl;
Sleep(100);cout<<"4.黄阶极品—地刺 105"<<endl;
Sleep(100);cout<<"5.玄阶下品—金之斩 130"<<endl;
Sleep(100);cout<<"6.玄阶中品—水之波涛 155"<<endl;
Sleep(100);cout<<"7.玄阶上品—生生不息 180"<<endl;
Sleep(100);cout<<"8.玄阶极品—八级崩 205"<<endl;
Sleep(100);cout<<"9.地阶下品—木之铠甲 230"<<endl;
Sleep(100);cout<<"10.地阶中品—土之铠甲 255"<<endl;
Sleep(100);cout<<"11.地阶上品—金之铠甲 280"<<endl;
Sleep(100);cout<<"12.地阶极品—水火铠甲 305"<<endl;
Sleep(100);cout<<"13.天阶下品—万剑归宗 405"<<endl;
Sleep(100);cout<<"14.天阶中品—黄金之路 505"<<endl;
Sleep(100);cout<<"15.天阶上品—天帝之锤 605"<<endl;
Sleep(100);cout<<"16.天阶极品—佛怒火莲 705"<<endl;
Sleep(100);cout<<"17.升仙丹(突破小境界) 200"<<endl;
}
void jishou(int k)
{
if(jishou1==1&&douji[1]>=shuliang){douji[1]-=shuliang;jinbi+=10*shuliang;}
if(jishou1==2&&douji[2]>=shuliang){douji[2]-=shuliang;jinbi+=20*shuliang;}
if(jishou1==3&&douji[3]>=shuliang){douji[3]-=shuliang;jinbi+=50*shuliang;}
if(jishou1==4&&douji[4]>=shuliang){douji[4]-=shuliang;jinbi+=100*shuliang;}
if(jishou1==5&&douji[5]>=shuliang){douji[5]-=shuliang;jinbi+=125*shuliang;}
if(jishou1==6&&douji[6]>=shuliang){douji[6]-=shuliang;jinbi+=150*shuliang;}
if(jishou1==7&&douji[7]>=shuliang){douji[7]-=shuliang;jinbi+=175*shuliang;}
if(jishou1==8&&douji[8]>=shuliang){douji[8]-=shuliang;jinbi+=200*shuliang;}
if(jishou1==9&&douji[9]>=shuliang){douji[9]-=shuliang;jinbi+=225*shuliang;}
if(jishou1==10&&douji[10]>=shuliang){douji[10]-=shuliang;jinbi+=250*shuliang;}
if(jishou1==11&&douji[11]>=shuliang){douji[11]-=shuliang;jinbi+=275*shuliang;}
if(jishou1==12&&douji[12]>=shuliang){douji[12]-=shuliang;jinbi+=300*shuliang;}
if(jishou1==13&&douji[13]>=shuliang){douji[13]-=shuliang;jinbi+=400*shuliang;}
if(jishou1==14&&douji[14]>=shuliang){douji[14]-=shuliang;jinbi+=500*shuliang;}
if(jishou1==15&&douji[15]>=shuliang){douji[15]-=shuliang;jinbi+=600*shuliang;}
if(jishou1==16&&douji[16]>=shuliang){douji[16]-=shuliang;jinbi+=800*shuliang;}
color(4);
cout<<"寄售成功"<<endl;
}
void yizhuang(int k)
{
color(5);
if(zhuang==0)cout<<"无"<<endl;
if(zhuang==1)cout<<"1.黄阶下品—吹火掌 "<<endl;
if(zhuang==2)cout<<"2.黄阶中品—烈阳斩 "<<endl;
if(zhuang==3)cout<<"3.黄阶上品—生命回复 "<<endl;
if(zhuang==4)cout<<"4.黄阶极品—地刺 "<<endl;
if(zhuang==5)cout<<"5.玄阶下品—金之斩 "<<endl;
if(zhuang==6)cout<<"6.玄阶中品—水之波涛 "<<endl;
if(zhuang==7)cout<<"7.玄阶上品—生生不息 "<<endl;
if(zhuang==8)cout<<"8.玄阶极品—八级崩 "<<endl;
if(zhuang==9)cout<<"9.地阶下品—木之铠甲 "<<endl;
if(zhuang==10)cout<<"10.地阶中品—土之铠甲 "<<endl;
if(zhuang==11)cout<<"11.地阶上品—金之铠甲 "<<endl;
if(zhuang==12)cout<<"12.地阶极品—水火铠甲 "<<endl;
if(zhuang==13)cout<<"13.天阶下品—万剑归宗 "<<endl;
if(zhuang==14)cout<<"14.天阶中品—黄金之路 "<<endl;
if(zhuang==15)cout<<"15.天阶上品—天帝之锤 "<<endl;
if(zhuang==16)cout<<"16.天阶极品—佛怒火莲 "<<endl;
}
void zhuangwuji(int k)
{
color(6);
cin>>douji2;
if(douji2==1&&douji[1]!=0){zhuang=1;cout<<"成功"<<endl;douji[1]--;}
if(douji2==2&&douji[2]!=0){zhuang=2;cout<<"成功"<<endl;douji[2]--;}
if(douji2==3&&douji[3]!=0){zhuang=3;cout<<"成功"<<endl;douji[3]--;}
if(douji2==4&&douji[4]!=0){zhuang=4;cout<<"成功"<<endl;douji[4]--;}
if(douji2==5&&douji[5]!=0){zhuang=5;cout<<"成功"<<endl;douji[5]--;}
if(douji2==6&&douji[6]!=0){zhuang=6;cout<<"成功"<<endl;douji[6]--;}
if(douji2==7&&douji[7]!=0){zhuang=7;cout<<"成功"<<endl;douji[7]--;}
if(douji2==8&&douji[8]!=0){zhuang=8;cout<<"成功"<<endl;douji[8]--;}
if(douji2==9&&douji[9]!=0){zhuang=9;cout<<"成功"<<endl;douji[9]--;}
if(douji2==10&&douji[10]!=0){zhuang=10;cout<<"成功"<<endl;douji[10]--;}
if(douji2==11&&douji[11]!=0){zhuang=11;cout<<"成功"<<endl;douji[11]--;}
if(douji2==12&&douji[12]!=0){zhuang=12;cout<<"成功"<<endl;douji[12]--;}
if(douji2==13&&douji[13]!=0){zhuang=13;cout<<"成功"<<endl;douji[13]--;}
if(douji2==14&&douji[14]!=0){zhuang=14;cout<<"成功"<<endl;douji[14]--;}
if(douji2==15&&douji[15]!=0){zhuang=15;cout<<"成功"<<endl;douji[15]--;}
if(douji2==16&&douji[16]!=0){zhuang=16;cout<<"成功"<<endl;douji[16]--;}
}
void wuji(int k)
{
color(7);
if(douji[1]>=0)cout<<"1.黄阶下品—吹火掌 "<<douji[1]<<endl;
if(douji[2]>=0)cout<<"2.黄阶中品—烈阳斩 "<<douji[2]<<endl;
if(douji[3]>=0)cout<<"3.黄阶上品—生命回复 "<<douji[3]<<endl;
if(douji[4]>=0)cout<<"4.黄阶极品—地刺 "<<douji[4]<<endl;
if(douji[5]>=0)cout<<"5.玄阶下品—金之斩 "<<douji[5]<<endl;
if(douji[6]>=0)cout<<"6.玄阶中品—水之波涛 "<<douji[6]<<endl;
if(douji[7]>=0)cout<<"7.玄阶上品—生生不息 "<<douji[7]<<endl;
if(douji[8]>=0)cout<<"8.玄阶极品—八级崩 "<<douji[8]<<endl;
if(douji[9]>=0)cout<<"9.地阶下品—木之铠甲 "<<douji[9]<<endl;
if(douji[10]>=0)cout<<"10.地阶中品—土之铠甲 "<<douji[10]<<endl;
if(douji[11]>=0)cout<<"11.地阶上品—金之铠甲 "<<douji[11]<<endl;
if(douji[12]>=0)cout<<"12.地阶极品—水火铠甲 "<<douji[12]<<endl;
if(douji[13]>=0)cout<<"13.天阶下品—万剑归宗 "<<douji[13]<<endl;
if(douji[14]>=0)cout<<"14.天阶中品—黄金之路 "<<douji[14]<<endl;
if(douji[15]>=0)cout<<"15.天阶上品—天帝之锤 "<<douji[15]<<endl;
if(douji[16]>=0)cout<<"16.天阶极品—佛怒火莲 "<<douji[16]<<endl;
}
void jingjie(int k) //境界
{
color(8);
if(jingjie1==0)cout<<"凡人"<<endl;
if(jingjie1==1)cout<<"练气初期"<<endl;
if(jingjie1==2)cout<<"练气中期"<<endl;
if(jingjie1==3)cout<<"练气后期"<<endl;
if(jingjie1==4)cout<<"练气圆满"<<endl;
if(jingjie1==5)cout<<"筑基初期"<<endl;
if(jingjie1==6)cout<<"筑基中期"<<endl;
if(jingjie1==7)cout<<"筑基后期"<<endl;
if(jingjie1==8)cout<<"筑基圆满"<<endl;
if(jingjie1==9)cout<<"金丹初期"<<endl;
if(jingjie1==10)cout<<"金丹中期"<<endl;
if(jingjie1==11)cout<<"金丹后期"<<endl;
if(jingjie1==12)cout<<"金丹圆满"<<endl;
if(jingjie1==13)cout<<"元婴初期"<<endl;
if(jingjie1==14)cout<<"元婴中期"<<endl;
if(jingjie1==15)cout<<"元婴后期"<<endl;
if(jingjie1==16)cout<<"元婴圆满"<<endl;
if(jingjie1==17)cout<<"化神初期"<<endl;
if(jingjie1==18)cout<<"化神中期"<<endl;
if(jingjie1==19)cout<<"化神后期"<<endl;
if(jingjie1==20)cout<<"化神圆满"<<endl;
if(jingjie1==21)cout<<"炼虚初期"<<endl;
if(jingjie1==22)cout<<"炼虚中期"<<endl;
if(jingjie1==23)cout<<"炼虚后期"<<endl;
if(jingjie1==24)cout<<"炼虚圆满"<<endl;
if(jingjie1==25)cout<<"小乘初期"<<endl;
if(jingjie1==26)cout<<"小乘中期"<<endl;
if(jingjie1==27)cout<<"小乘后期"<<endl;
if(jingjie1==28)cout<<"小乘圆满"<<endl;
if(jingjie1==29)cout<<"大乘初期"<<endl;
if(jingjie1==30)cout<<"大乘中期"<<endl;
if(jingjie1==31)cout<<"大乘后期"<<endl;
if(jingjie1==32)cout<<"大乘圆满"<<endl;
if(jingjie1==33)cout<<"渡劫初期"<<endl;
if(jingjie1==34)cout<<"渡劫中期"<<endl;
if(jingjie1==35)cout<<"渡劫后期"<<endl;
if(jingjie1==36)cout<<"渡劫圆满"<<endl;
if(jingjie1==37)cout<<"飞升初期"<<endl;
if(jingjie1==38)cout<<"飞升中期"<<endl;
if(jingjie1==39)cout<<"飞升后期"<<endl;
if(jingjie1==40)cout<<"飞升圆满"<<endl;
if(jingjie1==41)
{
system("cls");
Sleep(100);cout<<" ______"<<endl;
Sleep(100);cout<<" | |"<<endl;
Sleep(100);cout<<" | |"<<endl;
Sleep(100);cout<<" | |"<<endl;
Sleep(100);cout<<" ======"<<endl;
Sleep(100);cout<<"你飞升到了仙界!"<<endl;
Sleep(100);cout<<"人界篇结束"<<endl;
Sleep(100);cout<<"CH工作室制作"<<endl;
Sleep(100);cout<<" ----"<<endl;
Sleep(100);cout<<" |CH|"<<endl;
Sleep(100);cout<<" ----"<<endl;
}
}
void linggen(int k)
{
color(9);
system("cls");
Sleep(100);cout<<"觉醒仪式开始了!"<<endl;
Sleep(100);cout<<"╭─╮⊙"<<endl;
Sleep(100);cout<<"│ │∣觉醒仪式"<<endl;
Sleep(100);cout<<"╰━╯八"<<endl;
Sleep(100);
srand(time(0));
int linggen1=rand()%7;
if(linggen1==0)
cout<<"你无灵根!"<<endl;
if(linggen1==1)
cout<<"觉醒出了金灵根"<<endl;
if(linggen1==2)
cout<<"觉醒出了木灵根"<<endl;
if(linggen1==3)
cout<<"觉醒出了水灵根"<<endl;
if(linggen1==4)
cout<<"觉醒出了火灵根"<<endl;
if(linggen1==5)
cout<<"觉醒出了土灵根"<<endl;
if(linggen1==6)
cout<<"天纵奇才,觉醒出了金木水火土灵根"<<endl;
linggen2=linggen1;
}
void linggenjianjie(int k)
{
color(10);
Sleep(100);cout<<"无灵根:终身无法修炼"<<endl;
Sleep(100);cout<<"金灵根:加移速减血量"<<endl;
Sleep(100);cout<<"木灵根:加血量减攻击"<<endl;
Sleep(100);cout<<"水灵根:加移速减攻击"<<endl;
Sleep(100);cout<<"火灵根:加攻击减血量"<<endl;
Sleep(100);cout<<"土灵根:加血量减移速"<<endl;
Sleep(100);cout<<"你知道了吗?(按1)"<<endl;
cin>>jixu;
system("cls");
}
void geren(int k)
{
color(1);
Sleep(100);cout<<"============="<<endl;
Sleep(100);cout<<"姓名:萧"<<name<<endl;
Sleep(100);cout<<"年龄:"<<nianling<<"岁"<<tian2<<"天"<<endl;
Sleep(100);cout<<"境界:";jingjie(1);
Sleep(100);cout<<"经验:"<<jingyan<<"/100"<<endl;
Sleep(100);cout<<"灵根:";
Sleep(100);if(linggen2==1)cout<<"金灵根"<<endl;
Sleep(100);if(linggen2==2)cout<<"木灵根"<<endl;
Sleep(100);if(linggen2==3)cout<<"水灵根"<<endl;
Sleep(100);if(linggen2==4)cout<<"火灵根"<<endl;
Sleep(100);if(linggen2==5)cout<<"土灵根"<<endl;
Sleep(100);if(linggen2==6)cout<<"金木水火土灵根"<<endl;
Sleep(100);cout<<"血量:"<<hp<<endl;
Sleep(100);cout<<"蓝量:"<<lanliang<<endl;
Sleep(100);cout<<"攻击:"<<gongji<<endl;
Sleep(100);cout<<"防御:"<<fangyu<<endl;
Sleep(100);cout<<"移速:"<<yisu<<endl;
Sleep(100);cout<<"金币:"<<jinbi<<endl;
}
int main()
{
color(11);
MessageBox(NULL,"欢迎来到 三界(人界篇) 体验版!\n 内容不全,更多精彩请见正式版","三界(修仙游戏) 游戏开始提示(CH工作室出版)",MB_OK);
Sleep(100);cout<<"脑海中有一个声音说:欢迎来到三界!"<<endl;
Sleep(100);cout<<"脑中的声音:此游戏分为三个世界,分别是:凡界,仙界,神界。"<<endl;
Sleep(100);cout<<"脑中的声音:凡界等级划分:练气,筑基,金丹,元婴,化神,炼虚,小乘,大乘,渡劫,飞升。"<<endl;
Sleep(100);cout<<"脑中的声音:每个境界都分为:初期,中期,后期,圆满。"<<endl;
Sleep(100);cout<<"脑中的声音:在这个世界还可以修炼武技。"<<endl;
Sleep(100);cout<<"脑中的声音:武技分为天地玄黄四个品级,每级又分为:下品,中品,上品,极品。"<<endl;
Sleep(100);cout<<"脑中的声音:你来自乌坦城萧家,族长叫萧战,据传闻描述萧家是萧族的一个分支。"<<endl;
Sleep(100);cout<<"脑中的声音:萧族,远古八族之一,原是八族中最强者,先祖萧长生想突破凡界,去到仙界。"<<endl;
Sleep(100);cout<<"脑中的声音:在最关键的一步时被人偷袭,导致萧族没落。"<<endl;
Sleep(100);cout<<"(突然,面前出现了一位老者)那老者问:道友你叫什么?"<<endl;
Sleep(100);cout<<"我:我叫萧";
cin>>name;
if(name=="培根")jingyan+=3900;
system("cls");
color(12);
Sleep(100);cout<<"(突然,面前的画面又一转,到了萧家的觉醒仪式上)"<<endl;
Sleep(100);cout<<"萧战:到了觉醒灵根的时候了"<<endl;
Sleep(100);cout<<"(第一个上去了,觉醒出了土灵根)"<<endl;
Sleep(100);cout<<"(不一会儿,就到你了)"<<endl;
Sleep(100);cout<<"萧战:下一个,萧"<<name<<endl;
Sleep(100);cout<<"你走了上去。(按1继续)"<<endl;
cin>>jixu;
linggen(1);
Sleep(100);cout<<"按1继续"<<endl;
cin>>jixu;
system("cls");
linggenjianjie(1);
Sleep(100);cout<<"你是否对你的灵根满意?"<<endl;
Sleep(100);cout<<"1.满意 2.再来一次 "<<endl;
Sleep(100);cout<<"还剩"<<jihui<<"次转换机会。"<<endl;
cin>>jixu;
while(jixu>=0&&jixu==2)
{
color(9);
Sleep(100);cout<<"时光回溯,又回到了觉醒仪式。"<<endl;
Sleep(100);cout<<" ╭─╮"<<endl;
Sleep(100);cout<<" │ │时光之门!"<<endl;
Sleep(100);cout<<" ╰━╯"<<endl;
Sleep(100);cout<<"按1继续"<<endl;
cin>>jixu;
linggen(1);
jihui--;
if(jihui==0)
break;
Sleep(100);cout<<"你是否对你的灵根满意? 1.满意 2.再来一次"<<endl;
Sleep(100);cout<<"还剩"<<jihui<<"次转换机会。"<<endl;
cin>>jixu;
if(jixu==1)
break;
}
color(1);
system("cls");
Sleep(100);cout<<"下面是你的个人属性:"<<endl;//个人
Sleep(100);cout<<"姓名:萧"<<name<<endl;
Sleep(100);cout<<"年龄:"<<nianling<<endl;
Sleep(100);cout<<"灵根:";
if(linggen2==1)cout<<"金灵根"<<endl;
if(linggen2==2)cout<<"木灵根"<<endl;
if(linggen2==3)cout<<"水灵根"<<endl;
if(linggen2==4)cout<<"火灵根"<<endl;
if(linggen2==5)cout<<"土灵根"<<endl;
if(linggen2==6)cout<<"金木水火土灵根(天纵奇才专属)"<<endl;
if(linggen2==0)cout<<"无灵根"<<endl;
Sleep(100);cout<<"境界:";jingjie(1);
if(linggen2==0)cout<<"(不可提升)";
if(linggen2==1)hp-=20;
if(linggen2==2)hp+=20;
if(linggen2==4)hp-=10;
if(linggen2==5)hp+=20;
if(linggen2==6)hp=hp+=40;
Sleep(100);cout<<"血量:"<<hp<<endl;
Sleep(100);cout<<"蓝量:"<<lanliang<<endl;
if(linggen2==3)gongji-=2;
if(linggen2==4)gongji+=5;
if(linggen2==6)gongji+=5;
Sleep(100);cout<<"攻击:"<<gongji<<endl;
if(linggen2==2)fangyu+=2;
if(linggen2==5)fangyu+=5;
if(linggen2==6)fangyu+=7;
Sleep(100);cout<<"防御:"<<fangyu<<endl;
if(linggen2==1)yisu+=2;
if(linggen2==2)yisu-=2;
if(linggen2==5)yisu-=2;
if(linggen2==6)yisu+=2;
Sleep(100);cout<<"移速:"<<yisu<<endl;
Sleep(100);cout<<"按1继续"<<endl;
cin>>jixu;
system("cls");
Sleep(100);cout<<" ⊙"<<endl;
Sleep(100);cout<<"║ ╈ ║"<<endl;
Sleep(100);cout<<" ┺"<<endl;
Sleep(100);cout<<" ║ ║"<<endl;
Sleep(100);cout<<"按下1开始游戏吧!"<<endl;
cin>>jixu;
system("cls");
while(linggen2!=0)
{
if(tian2>=365)
{
tian2-=365;
nianling+=1;
}
if(jingyan>=100)
{
jingyan-=100;
jingjie1++;
if(linggen2==1)
{
hp+=8;
lanliang+=10;
gongji+=11;
fangyu+=9;
yisu+=15;
}
if(linggen2==2)
{
hp+=15;
lanliang+=10;
gongji+=8;
fangyu+=11;
yisu+=8;
}
if(linggen2==3)
{
hp+=11;
lanliang+=10;
gongji+=8;
fangyu+=9;
yisu+=15;
}
if(linggen2==4)
{
hp+=9;
lanliang+=10;
gongji+=15;
fangyu+=9;
yisu+=11;
}
if(linggen2==5)
{
hp+=15;
lanliang+=10;
gongji+=8;
fangyu+=15;
yisu+=7;
}
if(linggen2==6)
{
hp+=15;
lanliang+=15;
gongji+=15;
fangyu+=15;
yisu+=15;
}
}
color(13);
Sleep(100);cout<<"========================================================================"<<endl;
Sleep(100);cout<<"1.移动 2.闭关 3.背包 4.个人信息 5.关于游戏 6.礼包码 7.宗门 8.存档 9.回档"<<endl;
if(jingjie1==41)
{
color(14);
system("cls");
Sleep(100);cout<<"______"<<endl;
Sleep(100);cout<<" | |"<<endl;
Sleep(100);cout<<" | |"<<endl;
Sleep(100);cout<<" | |"<<endl;
Sleep(100);cout<<"======"<<endl;
Sleep(100);cout<<"你飞升到了仙界!"<<endl;
Sleep(100);cout<<"人界篇结束"<<endl;
Sleep(100);cout<<"CH工作室制作"<<endl;
Sleep(100);cout<<" ----"<<endl;
Sleep(100);cout<<" |CH|"<<endl;
Sleep(100);cout<<" ----"<<endl;
return 0;
}
cin>>yidong;
if(yidong==1)
{
Sleep(100);cout<<"=================="<<endl;
Sleep(100);cout<<"1.魔兽森林 2.商城"<<endl;
cin>>dong;
if(dong==1)
{
color(4);//魔兽森林
Sleep(100);cout<<"============================="<<endl;
Sleep(100);cout<<"1.一星地区 ★"<<endl;
Sleep(100);cout<<"2.二星地区 ★★"<<endl;
Sleep(100);cout<<"3.三星地区 ★★★"<<endl;
Sleep(100);cout<<"4.四星地区 ★★★★"<<endl;
Sleep(100);cout<<"5.五星地区 ★★★★★"<<endl;
cin>>diqu;
if(diqu==1)
{
Sleep(100);cout<<"=================="<<endl;
tian=30;
tian=tian*10-yisu;
tian/=10;
Sleep(100);cout<<"你来到了一星区域,耗时"<<tian<<"天"<<endl;
tian2+=tian;
srand(time(0));
int moshou=rand()%3;
if(moshou==0)
{
mn="岩熊";
Sleep(100);cout<<"遭遇了一星三阶的"<<mn<<endl;
mhp=55;
mgong=15;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=50;
Sleep(100);cout<<"你赢了,得了50经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[1]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[2]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==1)
{
mn="烈焰马";
Sleep(100);cout<<"遭遇了一星七阶的"<<mn<<endl;
mhp=75;
mgong=20;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=60;
Sleep(100);cout<<"你赢了,得了60经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[3]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[4]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==2)
{
Sleep(100);cout<<"没有遇到魔兽"<<endl;
}
}
if(diqu==2)
{
Sleep(100);cout<<"=================="<<endl;
tian=45;
tian=tian*10-yisu;
tian/=10;
Sleep(100);cout<<"你来到了二星区域,耗时"<<tian<<"天"<<endl;
tian2+=tian;
srand(time(0));
int moshou=rand()%3;
if(moshou==0)
{
mn=="火熊";
Sleep(100);cout<<"遭遇了二星一阶的"<<mn<<endl;
mhp=123;
mgong=54;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=70;
Sleep(100);cout<<"你赢了,得了70经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[4]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[5]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==1)
{
mn=="人面魔蛛";
cout<<"遭遇了二星七阶的"<<mn<<endl;
mhp=387;
mgong=123;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=80;
Sleep(100);cout<<"你赢了,得了80经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[6]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[7]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==2)
{
Sleep(100);cout<<"没有遇到魔兽"<<endl;
}
}
if(diqu==3)
{
Sleep(100);cout<<"=================="<<endl;
tian=60;
tian=tian*10-yisu;
tian/=10;
Sleep(100);cout<<"你来到了三星区域,耗时"<<tian<<"天"<<endl;
tian2+=tian;
srand(time(0));
int moshou=rand()%3;
if(moshou==0)
{
mn=="鬼藤";
Sleep(100);cout<<"遭遇了三星二阶的"<<endl;
mhp=976;
mgong=287;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=85;
Sleep(100);cout<<"你赢了,得了85经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[8]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[9]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==1)
{
mn=="人面魔蛛王";
Sleep(100);cout<<"遭遇了三星八阶的"<<mn<<endl;
mhp=1823;
mgong=345;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=90;
Sleep(100);cout<<"你赢了,得了90经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[9]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[10]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==2)
{
Sleep(100);cout<<"没有遇到魔兽"<<endl;
}
}
if(diqu==4)
{
Sleep(100);cout<<"=================="<<endl;
tian=80;
tian=tian*10-yisu;
tian/=10;
Sleep(100);cout<<"你来到了四星区域,耗时"<<tian<<"天"<<endl;
tian2+=tian;
srand(time(0));
int moshou=rand()%3;
if(moshou==0)
{
mn=="暗魔邪神虎";
Sleep(100);cout<<"遭遇了四星一阶的"<<mn<<endl;
mhp=3167;
mgong=567;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=95;
Sleep(100);cout<<"你赢了,得了95经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[10]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[11]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==1)
{
mn=="蓝银皇";
Sleep(100);cout<<"遭遇了四星七阶的"<<mn<<endl;
mhp=1800;
mgong=605;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=100;
Sleep(100);cout<<"你赢了,得了100经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[12]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[13]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==2)
{
Sleep(100);cout<<"没有遇到魔兽"<<endl;
}
}
if(diqu==5)
{
Sleep(100);cout<<"=================="<<endl;
tian=100;
tian=tian*10-yisu;
tian/=10;
Sleep(100);cout<<"你来到了五星区域,耗时"<<tian<<"天"<<endl;
tian2+=tian;
srand(time(0));
int moshou=rand()%3;
if(moshou==0)
{
mn=="泰坦巨猿";
Sleep(100);cout<<"遭遇了五星八阶的"<<mn<<endl;
mhp=2000;
mgong=800;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=120;
Sleep(100);cout<<"你赢了,得了120经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[13]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[14]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100);cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==1)
{
mn=="天青牛蟒";
Sleep(100);cout<<"遭遇了五星九阶的"<<mn<<endl;
mhp=2300;
mgong=900;
Sleep(100);cout<<"血量:"<<mhp<<" 攻击力:"<<mgong<<endl;
Sleep(100);cout<<"请选择:1.决斗 2.逃跑"<<endl;
cin>>jixu;
if(jixu==1)
{
int thp=hp;
hp=hp+fangyu;
donghua(1);
if(mhp<=0&&hp<=0)
{
Sleep(100);cout<<"你和"<<mn<<"同归于尽,上天觉得你太可怜,没有夺走你的经验。"<<endl;
}
if(mhp<=0)
{
jingyan+=140;
Sleep(100);cout<<"你赢了,得了140经验"<<endl;
wuji1=rand()%4;
if(wuji1==0)
{
douji[15]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==2)
{
douji[16]++;
Sleep(100);cout<<"掉落了一本斗技。"<<endl;
}
if(wuji1==3||wuji1==1)
{
Sleep(100); cout<<"没有掉落斗技。"<<endl;
}
}
if(hp<=0)
{
jingyan=0;
Sleep(100);cout<<"你输了,失去当前所有经验"<<endl;
}
hp=thp;wuji1==0;
}
}
if(moshou==2)
{
Sleep(100);cout<<"没有遇到魔兽"<<endl;
}
}
}
if(dong==2)//拍卖会&&黑市
{
Sleep(100);cout<<"================"<<endl;
Sleep(100);cout<<"1.拍卖会 2.黑市"<<endl;
cin>>shanghui;
if(shanghui==1)
{
Sleep(100);cout<<"=============="<<endl;
Sleep(100);cout<<"1.寄售 2.参加"<<endl;
cin>>paimai;
if(paimai==1)
{
Sleep(100);cout<<"你背包中的斗技:"<<endl;
wuji(1);
Sleep(100);cout<<"你要寄售:";
cin>>jishou1;
Sleep(100);cout<<"数量:";
cin>>shuliang;
jishou(1);
Sleep(100);cout<<"你拥有金币:"<<jinbi<<endl;
}
if(paimai==2)
{
Sleep(100);cout<<"========="<<endl;
Sleep(100);cout<<"敬请期待"<<endl;
}
}
if(shanghui==2)
{
Sleep(100);cout<<"==============="<<endl;
heishi(1);
cin>>mai;
goumai(1);
}
}
}
if(yidong==2)//闭关
{
Sleep(100);cout<<"====================="<<endl;
Sleep(100);cout<<"1.一年 2.二年 3.三年"<<endl;
cin>>nian;
if(nian==1)
{
nianling+=1;
jingyan+=20;
}
if(nian==2)
{
nianling+=2;
jingyan+=30;
}
if(nian==3)
{
nianling+=3;
jingyan+=40;
}
}
if(yidong==3)
{
Sleep(100);cout<<"================================="<<endl;
Sleep(100);cout<<"1.查看斗技 2.装备斗技 3.服用丹药"<<endl;
cin>>wuji1;
if(wuji1==1)//斗技
wuji(1);
Sleep(100);cout<<"已装备斗技:";
yizhuang(1);
if(wuji1==2)
{
Sleep(100);cout<<"你拥有"<<endl;
wuji(1);
Sleep(100);cout<<"你要装备:";
zhuangwuji(1);
}
if(wuji1==3)//丹药
{
Sleep(100);cout<<"你拥有 升仙丹 "<<shenxian<<"枚"<<endl;
if(shenxian>0)
{
Sleep(100);cout<<"是否服用?1.是 2.否 3.全部使用"<<endl;
cin>>jixu;
if(jixu==1)
{
shenxian--;
jingyan++;
Sleep(100);cout<<"服用一枚成功"<<endl;
}
if(jixu==3)
{
jingyan+=shenxian*100;
shenxian=0;
Sleep(100);cout<<"服用全部成功"<<endl;
}
}
}
}
if(yidong==4)
{
geren(1);
}
if(yidong==5)//关于游戏
{
color(1);
Sleep(100);cout<<"此为《三界》1.23版本。"<<endl;
Sleep(100);cout<<"如果名字为 培根 即可触发BUG!"<<endl;
Sleep(100);cout<<"礼包码:"<<endl;
Sleep(100);cout<<"VIP666 金币礼包"<<endl;
Sleep(100);cout<<"VIP888 斗帝传承"<<endl;
Sleep(100);cout<<"VIP999 丹药礼包"<<endl;
}
if(yidong==6)//礼包码
{
color(2);
Sleep(100);cout<<"请输入礼包码:"<<endl;
cin>>libaoma;
if(libaoma=="VIP666"&&biaoji1==1)
{
Sleep(100);cout<<"已经领取过了!"<<endl;
}
if(libaoma=="VIP666"&&biaoji1!=1)
{
biaoji1=1;
Sleep(100);cout<<"金币礼包领取成功"<<endl;
jinbi+=666;
}
if(libaoma=="VIP888"&&biaoji2==1)
{
Sleep(100);cout<<"已经领取过了!"<<endl;
}
if(libaoma=="VIP888"&&biaoji2!=1)
{
biaoji2=1;
Sleep(100);cout<<"斗帝传承领取成功"<<endl;
for(int i=1;i<=16;i++)
douji[i]++;
}
if(libaoma=="VIP999"&&biaoji3==1)
{
Sleep(100);cout<<"已经领取过了!"<<endl;
}
if(libaoma=="VIP999"&&biaoji3!=1)
{
biaoji3=1;
Sleep(100);cout<<"丹药礼包领取成功"<<endl;
shenxian+=10;
}
}
if(yidong==7)//宗门
{
color(15);
Sleep(100);cout<<"============================"<<endl;
if(zong=="无"){Sleep(100);cout<<"2.创建 3.";}
else {Sleep(100);cout<<"1.";}
Sleep(100);cout<<"查看"<<endl;
cin>>zm;
if(zm==2&&zong=="无")
{
Sleep(100);cout<<"请输入宗的名字:"<<endl;
cin>>zong;
Sleep(100);cout<<"要花费1000金币"<<endl;
Sleep(100);cout<<"是否确定创建宗门?1.是 2.否"<<endl;
cin>>zzm;
if(zzm==1&&jinbi>=1000)
{
jinbi-=1000;
zj=1;
}
else if(zzm==1&&jinbi<1000)
{
Sleep(100);cout<<"金币不够!!!"<<endl;
zong="无";
}
}
if(zm==3||zm==1)
{
Sleep(100);cout<<"宗门:"<<zong<<endl;
Sleep(100);cout<<"等级:"<<zj<<endl;
Sleep(100);cout<<"经验:"<<zjy<<endl;
Sleep(100);cout<<"================================"<<endl;
Sleep(100);cout<<"1.提升等级 2.贡献商城 3.宗门任务"<<endl;
cin>>zmmm;
if(zmmm==1)
{
if(zjy>=200){zj++;zjy-=200;Sleep(100);cout<<"成功"<<endl;}
else
{
Sleep(100);cout<<"失败,要200经验"<<endl;
}
}
if(zmmm==2)
{
Sleep(100);cout<<"拥有贡献:"<<gongxian<<endl;
Sleep(100);cout<<"商品:"<<endl;
if(zj>=1){Sleep(100);cout<<"1.黄阶上品功法 100"<<endl;}
if(zj>=1){Sleep(100);cout<<"2.玄阶上品功法 300"<<endl;}
if(zj>=2){Sleep(100);cout<<"3.地阶上品功法 650"<<endl;}
if(zj>=2){Sleep(100);cout<<"4.天阶上品功法 800"<<endl;}
if(zj>=3){Sleep(100);cout<<"5.随机功法 700"<<endl;}
if(zj>=3){Sleep(100);cout<<"6.换宗卡 200"<<endl;}
cin>>shua;
if(shua==1&&gongxian>=100){gongxian-=100;douji[1]++;Sleep(100);cout<<"成功"<<endl;}
else if(shua==1&&gongxian<100){Sleep(100);cout<<"失败"<<endl;}
else if(shua==2&&gongxian>=300){gongxian-=300;douji[5]++;Sleep(100);cout<<"成功"<<endl;}
else if(shua==2&&gongxian<300){Sleep(100);cout<<"失败"<<endl;}
else if(shua==3&&gongxian>=650){gongxian-=650;douji[9]++;Sleep(100);cout<<"成功"<<endl;}
else if(shua==3&&gongxian<650){Sleep(100);cout<<"失败"<<endl;}
else if(shua==4&&gongxian>=800){gongxian-=800;douji[13]++;Sleep(100);cout<<"成功"<<endl;}
else if(shua==4&&gongxian<800){Sleep(100);cout<<"失败"<<endl;}
else if(shua==5&&gongxian>=700){gongxian-=700;jixu=rand()%15;douji[jixu+1]++;Sleep(100);cout<<"成功"<<endl;}
else if(shua==5&&gongxian<700){Sleep(100);cout<<"失败"<<endl;}
else if(shua==6&&gongxian>=200){gongxian-=200;zong="无";Sleep(100);cout<<"成功"<<endl;}
else if(shua==6&&gongxian<200){Sleep(100);cout<<"失败"<<endl;}
}
if(zmmm==3)
{
if(rww==0)
{
srand(time(0));
renwu1=rand()%3;
renwu2=rand()%3;
if(renwu1==0)rw1="一枚升仙丹";
if(renwu1==1)rw1="一本黄阶上品功法";
if(renwu1==2)rw1="一本地阶上品功法";
if(renwu2==0)rw2="一本黄阶中品功法";
if(renwu2==1)rw2="一本玄阶中品功法";
if(renwu2==2)rw2="一本地阶中品功法";
rww=1;
}
Sleep(100);cout<<"================================"<<endl;
Sleep(100);cout<<"1.查看 2.接取 3.提交"<<endl;
cin>>rrw;
if(rrw==1)
{
Sleep(100);cout<<"任务一:"<<rw1<<endl;
Sleep(100);cout<<"任务二:"<<rw2<<endl;
Sleep(100);cout<<"刷新 1.是 2.否"<<endl;
cin>>shua;
if(shua==1)
{
srand(time(0));
renwu1=rand()%3;
renwu2=rand()%3;
if(renwu1==0)rw1="一枚升仙丹";
if(renwu1==1)rw1="一本黄阶上品功法";
if(renwu1==2)rw1="一本地阶上品功法";
if(renwu2==0)rw2="一本黄阶中品功法";
if(renwu2==1)rw2="一本玄阶中品功法";
if(renwu2==2)rw2="一本地阶中品功法";
}
}
if(rrw==2)
{
if(ji=="无")
{
Sleep(100);cout<<"1.任务一:"<<rw1<<endl;
Sleep(100);cout<<"2.任务二:"<<rw2<<endl;
Sleep(100);cout<<"接哪一个?"<<endl;
cin>>shua;
if(shua==1)ji=rw1;
if(shua==2)ji=rw2;
Sleep(100);cout<<"接取成功!"<<endl;
}
else
{
Sleep(100);cout<<"已接取任务!"<<endl;
Sleep(100);cout<<"任务:"<<ji<<endl;
}
}
if(rrw==3)
{
Sleep(100);cout<<"任务:"<<ji<<endl;
Sleep(100);cout<<"是否完成任务?1.是 2.否"<<endl;
cin>>shua;
if(shua==1)
{
if(ji=="一枚升仙丹"&&shenxian>=1){Sleep(100);cout<<"成功"<<endl;shenxian--;gongxian+=400;zjy+=50;}
else if(ji=="一枚升仙丹"&&shenxian<1){Sleep(100);cout<<"失败"<<endl;}
else if(ji=="一本黄阶上品功法"&&douji[1]>=1){Sleep(100);cout<<"成功"<<endl;douji[1]--;gongxian+=100;zjy+=40;}
else if(ji=="一本黄阶上品功法"&&douji[1]<1){Sleep(100);cout<<"失败"<<endl;}
else if(ji=="一本地阶上品功法"&&douji[9]>=1){Sleep(100);cout<<"成功"<<endl;douji[9]--;gongxian+=1100;zjy+=190;}
else if(ji=="一本地阶上品功法"&&douji[9]<1){Sleep(100);cout<<"失败"<<endl;}
else if(ji=="一本黄阶中品功法"&&douji[2]>=1){Sleep(100);cout<<"成功"<<endl;douji[2]--;gongxian+=200;zjy+=45;}
else if(ji=="一本黄阶中品功法"&&douji[2]<1){Sleep(100);cout<<"失败"<<endl;}
else if(ji=="一本玄阶中品功法"&&douji[6]>=1){Sleep(100);cout<<"成功"<<endl;douji[6]--;gongxian+=600;zjy+=100;}
else if(ji=="一本玄阶中品功法"&&douji[6]<1){Sleep(100);cout<<"失败"<<endl;}
else if(ji=="一本地阶中品功法"&&douji[10]>=1){Sleep(100);cout<<"成功"<<endl;douji[10]--;gongxian+=1200;zjy+=200;}
else if(ji=="一本地阶中品功法"&&douji[10]<1){Sleep(100);cout<<"失败"<<endl;}
}
}
}
}
}
if(yidong==8)
{
cundang=1;
system("cls");
ofstream xxzlo;
xxzlo.open("xxzl.txt");
xxzlo<<hp<<" ";
xxzlo<<fangyu<<" ";
xxzlo<<gongji<<" ";
xxzlo<<jingjie<<" ";
xxzlo<<lanliang<<" ";
xxzlo<<yisu<<" ";
xxzlo<<biaoji1<<" ";
xxzlo<<zong<<" ";
xxzlo<<zj<<" ";
xxzlo<<jinbi<<" ";
xxzlo<<shenxian<<" ";
xxzlo<<jingyan<<" ";
xxzlo<<nianling<<" ";
xxzlo<<linggen2<<" ";
xxzlo<<zhuang<<" ";
xxzlo<<name<<" ";
xxzlo<<cundang<<" ";
for(int i=0; i<17; i++)
xxzlo<<douji[i]<<" ";
xxzlo.close();
cout<<"存档成功"<<endl;
system("pause");
}
if(yidong==9)
{
if(cundang==1){
fstream file("xxzl.txt");
if(file)
{
ifstream xxzli;
xxzli.open("xxzl.txt");
xxzli>>hp;
xxzli>>fangyu;
xxzli>>gongji;
xxzli>>jingjie1;
xxzli>>lanliang;
xxzli>>yisu;
xxzli>>biaoji1;
xxzli>>zong;
xxzli>>zj;
xxzli>>jinbi;
xxzli>>shenxian;
xxzli>>jingyan;
xxzli>>nianling;
xxzli>>linggen2;
xxzli>>zhuang;
xxzli>>name;
xxzli>>cundang;
for(int i=0; i<17; i++)
xxzli>>douji[i];
xxzli.close();
}
}
else
{
color(9);
Sleep(100);
cout<<"没有存档"<<endl;
}
}
}
return 0;
}
修仙小游戏3.0(更新了宗门,点赞破10个,立刻更新)
于 2024-07-02 21:43:35 首次发布