C++#include<bits/stdc++.h>
#include<windows.h>
#include<time.h>
#include<conio.h>
#include<cstdio>
#include<cstdlib>
#include<ctime>
using namespace std;
bool xue_in() ;
int cnt;
void tiao_in();
int cnt1=2,cnt2=0,cnt3=0,cnt4=0,cnt5=0;//各个事件的数量
void Rand_things_in(int x);
void yi_cont_in(int x);
struct aaa {
int money;//财富
int wise;//智慧
int lucky;//运气
int appear;//魅力
int strong;//体质
int magic_small;//魔抗
int think;//意念
int small;//物抗
int ji; //等级
int ans;//剩余点数
} shen;
struct bbb {
int money;//财富
int wise;//智慧
int lucky;//运气
int appear;//魅力
int strong;//体质
int magic_small;//魔抗
int think;//意念
int small;//物抗
int ji; //等级
int now_money;//(游戏中)当前拥有钱数
int jin_small;//金 减伤
int mu_small;//木 减伤
int shuei_small;//水 减伤
int huo_small;//火 减伤
int tu_small;//土 减伤
int feng_small;//风 减伤
int lei_small;//雷 减伤
int guang_small;//光减伤
int dark_small;//暗减伤
int money_add;//财富
int wise_add;//智慧
int lucky_add;//运气
int appear_add;//魅力
int strong_add;//体质
int magic_small_add;//魔抗
int think_add;//意念
int small_add;//物抗
int all_small;//全部减免
int money_month;//月收入
int xue;//血量
} I;
struct y {
string name;//名字
int money;//财富
int wise;//智慧
int lucky;//运气
int appear;//魅力
int strong;//体质
int magic_small;//魔抗
int think;//意念
int small;//物抗
int ji; //等级
int dj;//蓝0紫1橙2红3
int number;//碎片数
int jin_small;//金 减伤
int mu_small;//木 减伤
int shuei_small;//水 减伤
int huo_small;//火 减伤
int tu_small;//土 减伤
int feng_small;//风 减伤
int lei_small;//雷 减伤
int guang_small;//光减伤
int dark_small;//暗减伤
int money_add;//财富
int wise_add;//智慧
int lucky_add;//运气
int appear_add;//魅力
int strong_add;//体质
int magic_small_add;//魔抗
int think_add;//意念
int small_add;//物抗
int money_use;//用钱数
int all_small;//全部减免
int money_month_add;//月收入
} yi[999];
struct zzz {
bool guei_huen=false;
int month;
void cont() {
cout<<"魅力:"<<I.appear<<"运气:"<<I.lucky<<"智慧:"<<I.wise<<"财富:"<<I.money<<endl;
cout<<"意念:"<<I.think<<"魔抗:"<<I.magic_small<<"体质:"<<I.strong<<"物抗:"<<I.small<<endl;
} bool xue() {
return xue_in();
} void tiao() {
tiao_in();
}
int yi_number[999];
void yi_cont(int x) {
yi_cont_in(x);
} int xue_jian(int x,bool magic_yes) {
if(magic_yes) {
return int((x-I.magic_small*100-I.think*10)*(100-I.all_small)/100.0);
} else {
return int((x-I.small*100-I.think*10)*(100-I.all_small)/100.0);
}
} void Rand_things(int xxx) {
Rand_things_in(xxx);
}
} strat;
int f[999],shen1[999]= {},j,x;//j是古代经验
int Rand(int x) {
return rand()%(x+1);
}
void Read() {
ifstream in("克苏鲁.in");
in>>shen.appear>>shen.lucky>>shen.magic_small>>shen.money>>shen.strong>>shen.think>>shen.wise>>shen.small>>j;
for(int i=1; i<999; i++) {
in>>yi[i].ji>>yi[i].number;
}
in.close();
}
void Save() {
ofstream out("克苏鲁.in");
out<<shen.appear<<' '<<shen.lucky<<' '<<shen.magic_small<<' '<<shen.money<<' '<<shen.strong<<' '<<shen.think<<' '<<shen.wise<<' '<<shen.small<<' '<<j;
for(int i=1; i<999; i++) {
out<<yi[i].ji<<' '<<yi[i].number<<' ';
}
out.close();
}
void yiwu() {
cnt++;
yi[cnt].name="平衡之手";
yi[cnt].dj=1;
yi[cnt].money=15;
yi[cnt].appear=15;
yi[cnt].strong=15;
yi[cnt].small=15;
yi[cnt].magic_small_add=3;
yi[cnt].small_add=3;
yi[cnt].all_small=1;
cnt++;
yi[cnt].dj=2;
yi[cnt].name="骨灰匣";
yi[cnt].money=20;
yi[cnt].wise=20;
yi[cnt].magic_small=20;
yi[cnt].small=20;
yi[cnt].feng_small=10;
yi[cnt].wise_add=4;
yi[cnt].lucky_add=4;
yi[cnt].all_small=5;
cnt++;
yi[cnt].name="德勒丝";
yi[cnt].dj=1;
yi[cnt].money=15;
yi[cnt].appear=15;
yi[cnt].magic_small=15;
yi[cnt].small=15;
yi[cnt].tu_small=6;
yi[cnt].strong_add=8;
cnt++;
yi[cnt].name="灰之斗蓬";
yi[cnt].money=30;
yi[cnt].appear=30;
yi[cnt].money_add=5;
yi[cnt].appear_add=7;
yi[cnt].money_month_add=4;
cnt++;
yi[cnt].name="死之门";
yi[cnt].lucky=15;
yi[cnt].appear=15;
yi[cnt].strong=15;
yi[cnt].magic_small=15;
yi[cnt].feng_small=6;
yi[cnt].small_add=10;
yi[cnt].dj=0;
cnt++;
yi[cnt].name="红石圣辉";
yi[cnt].money=30;
yi[cnt].strong=30;
yi[cnt].strong_add=3;
yi[cnt].dj=0;
cnt++;
yi[cnt].name="德拉帖";
yi[cnt].money=15;
yi[cnt].wise=15;
yi[cnt].magic_small=15;
yi[cnt].think=15;
yi[cnt].guang_small=12;
yi[cnt].lucky_add=10;
yi[cnt].small_add=4;
yi[cnt].dj=1;
cnt++;
yi[cnt].name="黑恶布偶";
yi[cnt].wise=30;
yi[cnt].small=30;
yi[cnt].dark_small=6;
yi[cnt].money_add=4;
yi[cnt].appear_add=10;
yi[cnt].dj=0;
cnt++;
yi[cnt].name="暮光之物";
yi[cnt].wise=20;
yi[cnt].lucky=20;
yi[cnt].strong=20;
yi[cnt].magic_small=20;
yi[cnt].lei_small=15;
yi[cnt].strong_add=4;
yi[cnt].dj=2;
cnt++;
yi[cnt].name="癫狂之盔";
yi[cnt].money=20;
yi[cnt].lucky=20;
yi[cnt].think=20;
yi[cnt].small=20;
yi[cnt].money_add=6;
yi[cnt].wise_add=4;
yi[cnt].money_month_add=10;
yi[cnt].dj=2;
cnt++;
yi[cnt].name="吊诡油画";
yi[cnt].lucky=25;
yi[cnt].appear=25;
yi[cnt].strong=25;
yi[cnt].think=25;
yi[cnt].strong_add=15;
yi[cnt].magic_small_add=5;
yi[cnt].small_add=5;
yi[cnt].all_small=3;
yi[cnt].dj=3;
cnt++;
yi[cnt].name="红圆";
yi[cnt].lucky=15;
yi[cnt].appear=15;
yi[cnt].magic_small=15;
yi[cnt].small=15;
yi[cnt].shuei_small=15;
yi[cnt].lucky_add=5;
yi[cnt].appear_add=3;
yi[cnt].dj=1;
cnt++;
yi[cnt].name="祭品铜哨";
yi[cnt].lucky=20;
yi[cnt].appear=20;
yi[cnt].strong=20;
yi[cnt].think=20;
yi[cnt].money_add=12;
yi[cnt].wise_add=6;
yi[cnt].small_add=4;
yi[cnt].dj=2;
cnt++;
yi[cnt].name="水晶之圆";
yi[cnt].appear=30;
yi[cnt].small=30;
yi[cnt].dark_small=6;
yi[cnt].dj=0;
} /*
cnt++;
yi[cnt].name="死之门";
yi[cnt].money=;
yi[cnt].wise=;
yi[cnt].lucky=;
yi[cnt].appear=;
yi[cnt].strong=;
yi[cnt].magic_small=;
yi[cnt].think=;
yi[cnt].small=;
yi[cnt].ji=;
yi[cnt].number=;
yi[cnt].jin_small=;
yi[cnt].mu_small=;
yi[cnt].shuei_small=;
yi[cnt].huo_small=;
yi[cnt].tu_small=;
yi[cnt].feng_small=;
yi[cnt].lei_small=;
yi[cnt].guang_small=;
yi[cnt].dark_small=;
yi[cnt].money_add=;
yi[cnt].wise_add=;
yi[cnt].lucky_add=;
yi[cnt].appear_add=;
yi[cnt].strong_add=;
yi[cnt].magic_small_add=;
yi[cnt].think_add=;
yi[cnt].small_add=;
yi[cnt].money_month=;
yi[cnt].all_small=;
yi[cnt].dj=;
*/
int main() {
Read();
yiwu();
begin:
x=time(0);
srand(x);
system("cls");
cout<<"1.开始游戏"<<endl<<endl;
cout<<"2.升级神像"<<endl<<endl;
cout<<"3.升级遗物"<<endl<<endl;
cout<<"4.打开商店"<<endl<<endl;
cout<<"5.保存"<<endl<<endl;
cout<<"6.查看成就";
cin>>x;
for(int i=0; i<=998; i++) {
shen1[i]=i*500+1000;
}
if(x==1) {
cout<<"1.规律"<<endl;
cout<<"2.混沌"<<endl;
cin>>x;
if(x==1) {
strat.guei_huen=true;
}
cout<<"1月,你出生了"<<endl;
I.money+=10;
I.strong+=1;
strat.month=1;
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
aaa_1:
int x=Rand(2);
if(x==1) {
cout<<"2月,你爸爸要送你一个东西,你选择;"<<endl;
cout<<"1.一根笔"<<endl;
cout<<"2.一本书"<<endl;
cout<<"3.一个硬币"<<endl;
cout<<"4.一把刀"<<endl;
cin>>x;
if(x==1) {
cout<<"魅力+10"<<endl;
I.appear+=10*(I.appear_add+100)/100.0;
} else if(x==2) {
cout<<"智慧+10"<<endl;
I.wise+=10*(I.wise_add+100)/100.0;
} else if(x==3) {
cout<<"运气+10"<<endl;
I.lucky+=10*(I.lucky_add+100)/100.0;
} else {
cout<<"体质加10"<<endl;
I.strong+=10*(I.strong_add+100)/100.0;
}
x=getchar();
strat.month=2;
strat.cont();
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
cout<<"3月,意念加十"<<endl;
I.think+=10*(I.think_add+100)/100.0;
x=getchar();
strat.cont();
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
cout<<"4月,你看见了一个歹徒"<<endl;
cout<<"你选择:"<<endl;
cout<<"1.打"<<endl;
cout<<"2.跑"<<endl;
cin>>x;
if(x==1) {
I.xue=I.strong*100;
strat.xue();
cout<<"歹徒给你一刀"<<"造成"<<max(0,100-(I.small*100)-I.think*10)<<"伤害"<<endl;
I.xue-=max(0,100-(I.small*100)-I.think*10);
if(strat.xue()) {
goto begin;
}
cout<<"歹徒给你一刀"<<"造成"<<max(0,200-(I.small*100)-I.think*10)<<"伤害"<<endl;
I.xue-=max(0,200-(I.small*100)-I.think*10);
if(strat.xue()) {
goto begin;
}
cout<<"歹徒给你一刀"<<"造成"<<max(0,300-(I.small*100)-I.think*10)<<"伤害"<<endl;
I.xue-=max(0,300-(I.small*100)-I.think*10);
if(strat.xue()) {
goto begin;
}
cout<<"歹徒给你一刀"<<"造成"<<max(0,400-(I.small*100)-I.think*10)<<"伤害"<<endl;
I.xue-=max(0,400-(I.small*100)-I.think*10);
if(strat.xue()) {
goto begin;
}
if(I.xue<300) {
cout<<"失败,你跑掉了"<<endl;
} else {
cout<<"成功,意念加10,体质加10"<<endl;
I.strong+=10*(I.strong_add+100)/100.0;
I.think+=10*(I.think_add+100)/100.0;
}
} else {
cout<<"你跑了"<<endl;
cout<<"意念减10"<<endl;
I.think-=10;
}
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
cout<<"5月,有一个大师的演讲,"<<endl;
cout<<"1.去"<<endl;
cout<<"2.不去"<<endl;
cin>>x;
if(x==1) {
cout<<"大师的演讲不错,意念加15,"<<endl;
I.think+=15*(I.think_add+100)/100.0;
} else {
cout<<"你没去"<<endl;
}
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
} else {
cout<<"2月,你在地上发现了100元"<<endl;
cout<<"财富加10"<<endl;
I.money+=10*(I.money_add+100)/100.0;
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
cout<<"3月,你家里进了贼,你要"<<endl;
cout<<"1.报警"<<endl;
cout<<"2.和贼打起来"<<endl;
cout<<"3.跑"<<endl;
cin>>x;
if(x==1) {
cout<<"警察来了"<<endl;
cout<<"但是他们被小偷收买了"<<endl;
cout<<"他们对你置之不理"<<endl;
cout<<"1.打"<<endl;
cout<<"2.跑"<<endl;
cin>>x;
if(x==1) {
cout<<"你被打了一棍,血量-100"<<endl;
I.xue-=strat.xue_jian(100,false);
strat.xue();
if(strat.xue()) {
goto begin;
}
cout<<"你挨了一枪,血量-200"<<endl;
I.xue-=strat.xue_jian(200,false);
if(strat.xue()) {
goto begin;
}
if(I.xue*10>=I.strong*10) {
cout<<"你打跑了警察"<<endl;
cout<<"意念+10"<<endl;
I.think+=10*(I.think_add+100)/100.0;
} else {
cout<<"你失败了"<<endl;
cout<<"财富-10"<<endl;
I.money-=10;
}
} else {
cout<<"财富-10"<<endl;
I.money-=10;
}
} else if(x==2) {
cout<<"你把他打跑了,警察来了,但他们是来抓你的"<<endl;
cout<<"1.打"<<endl;
cout<<"2.跑"<<endl;
cin>>x;
if(x==1) {
cout<<"你被打了一棍,血量-100"<<endl;
I.xue-=strat.xue_jian(100,false);
strat.xue();
if(strat.xue()) {
goto begin;
}
cout<<"你挨了一枪,血量-200"<<endl;
I.xue-=strat.xue_jian(200,false);
if(strat.xue()) {
goto begin;
}
if(I.xue*10>=I.strong*10) {
cout<<"你打跑了警察"<<endl;
cout<<"意念+10"<<endl;
I.think+=10*(I.think_add+100)/100.0;
} else {
cout<<"你失败了"<<endl;
cout<<"财富-10"<<endl;
I.money-=10;
}
} else {
cout<<"警察没收了你的财产,财富-10"<<endl;
I.money-=10;
}
} else {
cout<<"财富-10"<<endl;
I.money-=10;
}
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
cout<<"4月,你想调配一个药剂"<<endl;
cout<<"但你不会"<<endl;
cout<<"你想找"<<endl;
cout<<"1.老魔药师"<<endl;
cout<<"2.年轻的女魔药师"<<endl;
cin>>x;
bool b=false;
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
if(x==1) {
if(I.wise>10) {
cout<<"智慧>10,老魔药师教了你"<<endl;
b=true;
} else {
cout<<"智慧<10,老魔药师拒绝了你"<<endl;
}
} else {
if(I.appear>10) {
cout<<"魅力>10,年轻的女魔药师教了你"<<endl;
b=true;
} else {
cout<<"智慧<10,年轻的女魔药师拒绝了你"<<endl;
}
}
if(b) {
cout<<"5月,你手里有一瓶药"<<endl;
cout<<"1.喝了它"<<endl;
cout<<"2.卖了它"<<endl;
}
I.now_money+=I.money*100.0*(I.money_add/100.0+1);
}
strat.tiao();
if(I.xue<0)goto begin;
cout<<"6月,你时常感觉外面有些危险,你"<<endl;
cout<<"1.外出"<<endl;
cout<<"2.苟在家里"<<endl;
cin>>x;
if(x==1) {
if(I.lucky>10) {
cout<<"运气>10,你在地上发现了100元"<<endl;
cout<<"财富加10"<<endl;
I.money+=10*(I.money_add+100)/100.0;
} else {
cout<<"运气<10,出门摔了一跤,意念-10"<<endl;
I.think-=10;
}
} else {
cout<<"你平安无事"<<endl;
}
} else if(x==2) {
shen_1:
system("cls");
cout<<"1.神像财富提升值"<<shen.money<<endl;
cout<<"1.神像智慧提升值"<<shen.wise<<endl;
cout<<"1.神像运气提升值"<<shen.lucky<<endl;
cout<<"1.神像魅力提升值"<<shen.appear<<endl;
cout<<"1.神像体质提升值"<<shen.strong<<endl;
cout<<"1.神像魔抗提升值"<<shen.magic_small<<endl;
cout<<"1.神像意念提升值"<<shen.think<<endl;
cout<<"1.神像物抗提升值"<<shen.small<<endl;
cout<<"神像等级"<<shen.ji<<endl;
cout<<"当前古代经验"<<j<<endl;
cout<<"升级需"<<shen1[shen.ji]<<"点经验"<<endl;
cout<<"你还剩" <<shen.ans<<"个点"<<endl;
cout<<"1.升级"<<endl;
cout<<"2.加点"<<endl;
cout<<"3.使用书籍"<<endl;
cin>>x;
if(1<=x&&x<=3) {
if(x==1) {
if(j>=shen1[shen.ji]) {
j-=shen1[shen.ji++];
cout<<"升级成功"<<endl;
Sleep(1000);
shen.ans++;
goto begin;
} else {
cout<<"古代知识不足"<<endl;
x=getchar();
goto begin;
}
} else if(x==2) {
if(shen.ans==0) {
cout<<"点不足"<<endl;
Sleep(1000);
goto begin;
}
cout<<"你需要加点到哪"<<endl;
cout<<"1.财富"<<endl;
cout<<"2.智慧"<<endl;
cout<<"3.运气"<<endl;
cout<<"4.魅力"<<endl;
cout<<"5.体质"<<endl;
cout<<"6.魔抗"<<endl;
cout<<"7.意念"<<endl;
cout<<"8.物抗"<<endl;
cin>>x;
shen.ans--;
if(x==1) {
shen.money++;
} else if(x==2) {
shen.wise++;
} else if(x==3) {
shen.lucky++;
} else if(x==4) {
shen.appear++;
} else if(x==5) {
shen.strong++;
} else if(x==6) {
shen.magic_small++;
} else if(x==7) {
shen.think++;
} else if(x==8) {
shen.small++;
} else {
cout<<"错误"<<endl;
shen.ans++;
Sleep(1000);
goto begin;
}
} else {
} goto begin;
} else {
cout<<"输入错误^-^"<<endl;
goto begin;
}
} else if(x==3) {
} else if(x==4) {
} else if(x==5) {
Save();
} else {
}
goto begin;
}
bool xue_in() {
cout<<"血量"<<I.xue;
if(I.xue<=0) {
cout<<"You died被打死"<<endl;
for(int i=1; i<999; i++) {
yi[i].number+=strat.yi_number[i];
if(strat.yi_number[i]!=0) {
cout<<"获得"<<yi[i].name<<strat.yi_number[i]<<"个"<<endl;
}
}
j+=strat.month*I.think;
cout<<"获得古代知识"<<strat.month*I.think<<endl;
x=getchar();
x=getchar();
return true;
}
return false;
}
void tiao_in() {
int b=false;
tiao_in:
while(true) {
cout<<"1.查看属性"<<endl;
cout<<endl;
if(!b) {
cout<<"2.购买遗物"<<endl;
cout<<endl;
}
cout<<"3.存档"<<endl;
cout<<"4.清空屏幕"<<endl;
cout<<"5.改造"<<endl;
cout<<"6.结束"<<endl;
cin>>x;
if(x==1) {
cout<<"财富:"<<I.money<<endl;
cout<<"智慧:"<<I.wise<<endl;
cout<<"运气:"<<I.lucky<<endl;
cout<<"魅力:"<<I.appear<<endl;
cout<<"体质:"<<I.strong<<endl;
cout<<"魔抗:"<<I.magic_small<<endl;
cout<<"意念:"<<I.think<<endl;
cout<<"物抗:"<<I.small<<endl;
cout<<"等级:";
if(I.ji==0) {
cout<<"人类";
} else if(I.ji==1) {
cout<<"感知者";
} else if(I.ji==2) {
cout<<"窥视者";
} else if(I.ji==3) {
cout<<"探求者";
} else if(I.ji==4) {
cout<<"虚无者";
} else if(I.ji==5) {
cout<<"混沌崇拜者";
} else if(I.ji==6) {
cout<<"混沌造物";
} else if(I.ji==7) {
cout<<"疯狂信徒";
} else if(I.ji==8) {
cout<<"邪神侍者";
} else if(I.ji==9) {
cout<<"邪神之子";
} else if(I.ji==10) {
cout<<"旧神";
} else if(I.ji==11) {
cout<<"旧日支配者";
} else if(I.ji==12) {
cout<<"外神";
}
cout<<endl;
cout<<"当前拥有钱数:"<<I.now_money<<endl;
cout<<"金 减伤:"<<I.jin_small<<endl;
cout<<"木 减伤:"<<I.mu_small<<endl;
cout<<"水 减伤:"<<I.shuei_small<<endl;
cout<<"火 减伤:"<<I.huo_small<<endl;
cout<<"土 减伤:"<<I.tu_small<<endl;
cout<<"风 减伤:"<<I.feng_small<<endl;
cout<<"雷 减伤:"<<I.lei_small<<endl;
cout<<"光减伤:"<<I.guang_small<<endl;
cout<<"暗减伤:"<<I.dark_small<<endl;
cout<<"财富加成:"<<I.money_add<<endl;
cout<<"智慧加成:"<<I.wise_add<<endl;
cout<<"运气加成:"<<I.lucky_add<<endl;
cout<<"魅力加成:"<<I.appear_add<<endl;
cout<<"体质加成:"<<I.strong_add<<endl;
cout<<"魔抗加成:"<<I.magic_small_add<<endl;
cout<<"意念加成:"<<I.think_add<<endl;
cout<<"物抗加成:"<<I.small_add<<endl;
cout<<"最终伤害减免:"<<I.all_small<<endl;
} else if(x==2) {
if(b) {
cout<<"已购买"<<endl;
goto tiao_in;
}
int nnn=0;
yi_find:
b=true;
nnn++;
srand(time(0));
int x1[4],x2[4];
x1[1]=Rand(100);
x1[2]=Rand(100);
x1[3]=Rand(100);
x1[0]=Rand(100);
for(int i=0; i<4; i++) {
yi_find_no:
x2[i]=Rand(cnt);
cout<<x1[i]<<" "<<x2[i]<<" "<<i<<endl;
if(strat.month<=20) {
if(x1[i]<=60) {
if(yi[x2[i]].dj!=0) {
goto yi_find_no;
} else {
continue;
}
} else {
if(yi[x2[i]].dj!=1) {
goto yi_find_no;
} else {
continue;
}
}
} else if(strat.month<=50) {
if(x1[i]<=50) {
if(yi[x2[i]].dj!=0) {
goto yi_find_no;
} else {
continue;
}
} else if(x<=95) {
if(yi[x2[i]].dj!=1) {
goto yi_find_no;
} else {
continue;
}
} else {
if(yi[x2[i]].dj!=2) {
goto yi_find_no;
} else {
continue;
}
}
} else if(strat.month<=100) {
if(x1[i]<=50) {
if(yi[x2[i]].dj!=0) {
goto yi_find_no;
} else {
continue;
}
} else if(x1[i]<=90) {
if(yi[x2[i]].dj!=1) {
goto yi_find_no;
} else {
continue;
}
} else {
if(yi[x2[i]].dj!=2) {
goto yi_find_no;
} else {
continue;
}
}
} else if(strat.month<=200) {
if(x1[i]<=40) {
if(yi[x2[i]].dj!=0) {
goto yi_find_no;
} else {
continue;
}
} else if(x1[i]<=75) {
if(yi[x2[i]].dj!=1) {
goto yi_find_no;
} else {
continue;
}
} else if(x1[i]<=90) {
if(yi[x2[i]].dj!=2) {
goto yi_find_no;
} else {
continue;
}
} else {
if(yi[x2[i]].dj!=3) {
goto yi_find_no;
} else {
continue;
}
}
} else {
if(x1[i]<=25) {
if(yi[x2[i]].dj!=0) {
goto yi_find_no;
} else {
continue;
}
} else if(x1[i]<=50) {
if(yi[x2[i]].dj!=1) {
goto yi_find_no;
} else {
continue;
}
} else if(x1[i]<=75) {
if(yi[x2[i]].dj!=2) {
goto yi_find_no;
} else {
continue;
}
} else {
if(yi[x2[i]].dj!=3) {
goto yi_find_no;
} else {
continue;
}
}
}
}
strat.yi_cont(x2[0]);
strat.yi_cont(x2[1]);
strat.yi_cont(x2[2]);
strat.yi_cont(x2[3]);
yi_buy:
cout<<"1.刷新"<<nnn*100<<"元"<<endl;
cout<<"2.购买"<<endl;
cout<<"3.退出"<<endl;
cin>>x;
if(x==1) {
if(I.now_money>=nnn*100) {
goto yi_find;
} else {
cout<<"财富不足"<<endl;
goto yi_buy;
}
} else if(x==2) {
cout<<"购买第几件"<<endl;
cin>>x;
if(I.now_money>=yi[x2[x]].money_use) {
I.money+=(yi[x2[x]].money+yi[x2[x]].ji)*(yi[x2[x]].money_add+100)/100.0;
I.wise+=yi[x2[x]].wise+yi[x2[x]].ji*(yi[x2[x]].wise_add+100)/100.0;
I.lucky+=yi[x2[x]].lucky+yi[x2[x]].ji*(yi[x2[x]].lucky_add+100)/100.0;
I.appear+=yi[x2[x]].appear+yi[x2[x]].ji*(yi[x2[x]].appear_add+100)/100.0;
I.strong+=yi[x2[x]].strong+yi[x2[x]].ji*(yi[x2[x]].strong_add+100)/100.0;
I.magic_small+=yi[x2[x]].magic_small+yi[x2[x]].ji*(yi[x2[x]].magic_small_add+100)/100.0;
I.think+=yi[x2[x]].think+yi[x2[x]].ji*(yi[x2[x]].think_add+100)/100.0;
I.small+=yi[x2[x]].small+yi[x2[x]].ji*(yi[x2[x]].small_add+100)/100.0;
I.jin_small+=yi[x2[x]].jin_small+yi[x2[x]].ji/5;
I.mu_small+=yi[x2[x]].mu_small+yi[x2[x]].ji/5;
I.shuei_small+=yi[x2[x]].shuei_small+yi[x2[x]].ji/5;
I.huo_small+=yi[x2[x]].huo_small+yi[x2[x]].ji/5;
I.tu_small+=yi[x2[x]].tu_small+yi[x2[x]].ji/5;
I.feng_small+=yi[x2[x]].feng_small+yi[x2[x]].ji/5;
I.lei_small+=yi[x2[x]].lei_small+yi[x2[x]].ji/5;
I.guang_small+=yi[x2[x]].guang_small+yi[x2[x]].ji/5;
I.dark_small+=yi[x2[x]].dark_small+yi[x2[x]].ji/5;
I.money_add+=yi[x2[x]].money_add+yi[x2[x]].ji/5;
I.wise_add+=yi[x2[x]].wise_add+yi[x2[x]].ji/5;
I.lucky_add+=yi[x2[x]].lucky_add+yi[x2[x]].ji/5;
I.appear_add+=yi[x2[x]].appear_add+yi[x2[x]].ji/5;
I.strong_add+=yi[x2[x]].strong_add+yi[x2[x]].ji/5;
I.magic_small_add+=yi[x2[x]].magic_small_add+yi[x2[x]].ji/5;
I.think_add+=yi[x2[x]].think_add+yi[x2[x]].ji/5;
I.small_add+=yi[x2[x]].small_add+yi[x2[x]].ji/5;
I.all_small+=yi[x2[x]].all_small+yi[x2[x]].ji/5;
f[x2[x]]++;
} else {
cout<<"金钱不足"<<endl;
goto yi_buy;
}
} else {
1+1;
}
} else if(x==3) {
} else if(x==4) {
system("cls");
} else if(x==5) {
I.xue=I.strong*100;
if(j==0) {
if(I.think>=60) {
cout<<"感知者改造开始"<<endl;
cout<<"你被剖开了,血量-1000"<<endl;
I.xue-=strat.xue_jian(1000,false);
if(strat.xue()) {
cout<<"你的肉体陷入了无尽的痛苦,你的精神变得无比混乱,你迷失了"<<endl;
return;
}
cout<<"祂割开了你的精神,血量-500"<<endl;
I.xue-=500-I.think*10;
if(strat.xue()) {
cout<<"你的肉体陷入了无尽的痛苦,你的精神变得无比混乱,你迷失了"<<endl;
return;
}
cout<<"祂对你的精神进行改造,血量-500"<<endl;
I.xue-=500-I.think*10;
if(strat.xue()) {
cout<<"你的肉体陷入了无尽的痛苦,你的精神变得无比混乱,你迷失了"<<endl;
return;
}
cout<<"改造成功,全属性+10"<<endl;
I.money+=10;
I.wise+=10;
I.appear+=10;
I.lucky+=10;
I.strong+=10;
I.magic_small+=10;
I.think+=10;
I.small+=10;
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==1) {
if(I.think>=200) {
} else {
cout<<"意念不足200"<<endl;
}
} else if(j==2) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==3) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==4) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==5) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==6) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==7) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==8) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==9) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==10) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==11) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
} else if(j==12) {
if(I.think>=60) {
} else {
cout<<"意念不足60"<<endl;
}
}
} else {
return;
}
}
}
void yi_cont_in(int x) {
cout<<yi[x].name<<endl;
if(yi[x].money)cout<<"财富:"<<yi[x].money+yi[x].ji<<endl;
if(yi[x].wise) cout<<"智慧:"<<yi[x].wise+yi[x].ji<<endl;
if(yi[x].lucky)cout<<"运气:"<<yi[x].lucky+yi[x].ji<<endl;
if(yi[x].appear)cout<<"魅力:"<<yi[x].appear+yi[x].ji<<endl;
if(yi[x].strong)cout<<"体质:"<<yi[x].strong+yi[x].ji<<endl;
if(yi[x].magic_small)cout<<"魔抗:"<<yi[x].magic_small+yi[x].ji<<endl;
if(yi[x].think)cout<<"意念:"<<yi[x].think+yi[x].ji<<endl;
if(yi[x].small)cout<<"物抗:"<<yi[x].small+yi[x].ji<<endl;
if(yi[x].jin_small)cout<<"金 减伤:"<<yi[x].jin_small+yi[x].ji/5<<endl;
if(yi[x].mu_small)cout<<"木 减伤:"<<yi[x].mu_small+yi[x].ji/5<<endl;
if(yi[x].shuei_small)cout<<"水 减伤:"<<yi[x].shuei_small+yi[x].ji/5<<endl;
if(yi[x].huo_small)cout<<"火 减伤:"<<yi[x].huo_small+yi[x].ji/5<<endl;
if(yi[x].tu_small)cout<<"土 减伤:"<<yi[x].tu_small+yi[x].ji/5<<endl;
if(yi[x].feng_small)cout<<"风 减伤:"<<yi[x].feng_small+yi[x].ji/5<<endl;
if(yi[x].lei_small)cout<<"雷 减伤:"<<yi[x].lei_small+yi[x].ji/5<<endl;
if(yi[x].guang_small)cout<<"光减伤:"<<yi[x].guang_small+yi[x].ji/5<<endl;
if(yi[x].dark_small)cout<<"暗减伤:"<<yi[x].dark_small+yi[x].ji/5<<endl;
if(yi[x].money_add) cout<<"财富加成:"<<yi[x].money_add+yi[x].ji/5<<endl;
if(yi[x].wise_add)cout<<"智慧加成:"<<yi[x].wise_add+yi[x].ji/5<<endl;
if(yi[x].lucky_add) cout<<"运气加成:"<<yi[x].lucky_add+yi[x].ji/5<<endl;
if(yi[x].appear_add)cout<<"魅力加成:"<<yi[x].appear_add+yi[x].ji/5<<endl;
if(yi[x].strong_add)cout<<"体质加成:"<<yi[x].strong_add+yi[x].ji/5<<endl;
if(yi[x].magic_small)cout<<"魔抗加成:"<<yi[x].magic_small_add+yi[x].ji/5<<endl;
if(yi[x].think_add)cout<<"意念加成:"<<yi[x].think_add+yi[x].ji/5<<endl;
if(yi[x].small_add)cout<<"物抗加成:"<<yi[x].small_add+yi[x].ji/5<<endl;
if(yi[x].all_small)cout<<"最终伤害减免:"<<yi[x].all_small+yi[x].ji/5<<endl;
yi[x].money_use=pow(2,f[x])*(600+yi[x].dj*300);
if(yi[x].money_use)cout<<"价值:"<<yi[x].money_use*pow(2,f[x]+1)<<endl;
}
void Rand_things_in(int n) {
srand(time(0));
if(n==1) { //1到50月
cnt1=4;
int y=Rand(cnt1);
if(y==1) {
cout<<"你锻炼了一会,体质+5"<<endl;
I.strong+=int(5*(I.strong_add+100.0)/100.0);
} else if(y==2) {
cout<<"你在地上捡到了一本书,你"<<endl;
cout<<"1.看"<<endl;
cout<<"2.不看"<<endl;
cin>>x;
if(x==1) {
int z=Rand(20);
if(z==1) {
cout<<"这本书里面含有强大的能量,你看了之后意念+100"<<endl;
I.think+=int(100*(I.think_add+100.0)/100.0);
} else {
cout<<"智慧+10"<<endl;
}
} else {
int z=Rand(2);
if(z==1) {
cout<<"你没看"<<endl;
} else {
cout<<"这本书里面含有邪恶的力量,你刚好没看,运气+10"<<endl;
I.lucky+=int(10*(I.lucky_add+100.0)/100.0);
}
}
} else if(y==3) {
cout<<"有一个大师的演讲,你"<<endl;
cout<<"1.去"<<endl;
cout<<"2.不去"<<endl;
cin>>x;
if(x==1) {
cout<<"大师的演讲不错,意念加15,"<<endl;
I.think+=15*(I.think_add+100)/100.0;
} else {
cout<<"你没去"<<endl;
}
} else if(y==1) {
cout<<"你今天下楼的时候遇到了一个穿着西装的男人,他问你,你愿不愿意花一些钱了解世界的真相"<<endl;
cout<<"1.愿意"<<endl;
cout<<"不愿意"<<endl;
cin>>x;
if(x==1) {
cout<<"你被骗了,财富-5"<<endl;
I.money-=5;
} else {
cout<<"两天后,他不见了,你庆兴你没交钱"<<endl;
}
}
} else if(n==2) { //50到100月
} else if(n==3) { //100到300月
} else { //300到500月
}
}