void skill_print(int x){//打印技能介绍
cout<<endl;
switch(x){
case 1:
cout<<"\n可以查看敌人的属性,对于比自己过于强大的敌人会侦察失败。"<<endl;
cout<<"提升自己的等级可以使自己的侦察能力增强。"<<endl;
break;
case 2:
cout<<"\n使自己造成一次重击。\n"<<endl;
cout<<"伤害比原来增加 "<<1+skill[2]<<" 点。"<<endl;
break;
case 3:
cout<<"\n使自己连续造成三次攻击。"<<endl;
cout<<"\n但伤害仅为原来的 "<<45+skill[3]*5<<"% 。"<<endl;
break;
case 4:
cout<<"\n射出一支穿透箭,无视敌人的防御,固定造成 "<<3+skill[4]*2<<" 点真实伤害。\n\nP.S.射程:10"<<endl;
break;
case 5:
cout<<"\n下次受到攻击时反弹伤害。"<<endl;
cout<<"\n伤害为敌人的 "<<25+skill[5]*5<<"% 。"<<endl;
break;
case 6:
cout<<"\n进入疯狂模式!"<<endl;
cout<<"\n防御减少 "<<6+skill[6]*3<<" 点,但增加攻击 "<<skill[6]<<" 点。"<<endl;
break;
case 7:
cout<<"\n增加防御 "<<1+skill[7]<<" 点,最多叠加 5 次。"<<endl;
break;
case 8:
cout<<"\n战斗时,攻击力增加 "<<skill[8]<<" 点。"<<endl;
break;
case 9:
cout<<"\n战斗时,魔力上限增加 "<<2+skill[9]<<" 点。"<<endl;
break;
case 10:
cout<<"\n战斗时,有 "<<2+skill[10]<<"% 的概率躲避敌人的攻击,关键时刻能救你一命。"<<endl;
break;
case 11:
cout<<"\n战斗时,主手攻击有 25% 的概率触发连击,\n\n对敌人额外造成 "<<2+skill[11]<<" 点伤害。"<<endl;
break;
case 12:
cout<<"\n战斗中,当生命≥70%时,\n\n额外增加 "<<1+skill[12]*3<<" 点防御。"<<endl;
break;
case 13:
cout<<"\n使自己造成一次攻击。"<<endl;
cout<<"\n攻击距离提升 "<<skill[13]+1<<" !"<<endl;
break;
case 14:
cout<<"\n向一个方向冲刺移动 "<<3+skill[14]<<" 格!"<<endl;
cout<<"PS:必须等于 "<<3+skill[14]<<" 格"<<endl;
break;
case 15:
cout<<"\n恢复 "<<3+skill[15]<<" 点生命。"<<endl;
break;
case 16:
cout<<"\n将一个主动技能的冷却回合减少 "<<2+(skill[16]==3)<<" !"<<endl;
break;
case 33:
cout<<"\n运用冰冻之力将敌人冰冻 " <<floor(2+skill[33]*0.6)<<" 回合,期间无法行动"<<endl;
cout<<"\n并且期间每回合对敌人造成真实伤害 "<<1+skill[33]*2<<" 点。"<<endl;
break;
}
}
void skilluse(){//技能
while(1){
SetConsoleTitle("--技能--");
system("cls");
cout<<"输入编号以查看/升级技能!\n"<<endl;
cout<<"显示顺序为 技能编号-技能名-等级-冷却-魔力"<<endl<<endl;
for(int i=1;i<=40;i++){
if(skill[i]>=1){
cout<<"技能编号 "<<i<<" ";
if(sk[i].rarity=='C') sc(7); //C级技能 白色
if(sk[i].rarity=='B') sc(1);//B 蓝
if(sk[i].rarity=='A') sc(5);//A 紫
if(sk[i].rarity=='S') sc(6);//S 黄
cout<<sk[i].skillname;
sc(7);//白
sc(4);//红
cout<<" Lv.";
if(skill[i]==sk[i].level_max) cout<<"MAX ";//判断满级
else cout<<skill[i]<<" ";
if(sk[i].magic[skill[i]]==0&&sk[i].cold[skill[i]]==0){//判断被动技能
sc(3);//浅蓝
cout<<" <被动技能>"<<endl;
}
if(sk[i].magic[max(skill[i],1)]!=0){
sc(3);//浅蓝
cout<<"冷却:";
cout<<sk[i].cold[max(1,skill[i])];
sc(1);//蓝
cout<<" 消耗魔力:";
cout<<sk[i].magic[max(1,skill[i])]<<endl;
}
if(wide) cout<<endl;
}else{
if(bag[i+64]>=1&&skill[i]!=sk[i].level_max){
cout<<"技能编号 "<<i<<" ";
if(sk[i].rarity=='C') sc(7);//C级技能 白色
if(sk[i].rarity=='B') sc(1);//B 蓝
if(sk[i].rarity=='A') sc(5);//A 紫
if(sk[i].rarity=='S') sc(6);//S 黄
cout<<sk[i].skillname;
sc(7);//白
cout<<" Lv.";
sc(2);//可升级 绿色
if(skill[i]<1) cout<<"可学习"<<endl;
else cout<<"可升级"<<endl;
if(wide) cout<<endl;
}
}
sc(7);//白
}
cout<<endl<<"0,返回 1,查看技能 2,装备技能"<<endl;
cin>>choose;
int n=0;//用于记录以前的选择
switch(choose){
case 0:
return;
break;
case 1:
cout<<"输入你要查看的技能的编号 0,返回"<<endl;
cin>>choose;
if(choose==0){
break;
}
n=choose;
if(bag[choose+64]>=1||skill[choose]>=1){
system("cls");
cout<<"技能名:";
if(sk[choose].rarity=='C') sc(7); //C级技能 白色
if(sk[choose].rarity=='B') sc(1);//B 蓝
if(sk[choose].rarity=='A') sc(5);//A 紫
if(sk[choose].rarity=='S') sc(6);//S 黄
cout<<sk[choose].skillname<<"\n";
cout<<sk[choose].rarity<<" ";
sc(7);//白
if(skill[choose]<sk[choose].level_max){
sc(2);//绿
cout<<"可升级";
sc(7);//白
}
sc(4);//红
cout<<" Lv.";
if(skill[choose]==sk[choose].level_max) cout<<"MAX"<<endl;//判断满级
else cout<<skill[choose]<<endl;
sc(7);
if(sk[choose].magic[max(1,skill[choose])]==0&&sk[choose].cold[max(1,skill[choose])]==0){//判断被动技能
sc(3);//浅蓝
cout<<" <被动技能>";
sc(7);//白
}
if(sk[choose].magic[max(skill[choose],1)]!=0){
sc(3);//浅蓝
cout<<"冷却:";
cout<<sk[choose].cold[max(1,skill[choose])];
sc(1);//蓝
cout<<" 消耗魔力:";
cout<<sk[choose].magic[max(1,skill[choose])];
sc(7);//白
}
bool a=false;//是否0级
if(skill[choose]==0) skill[choose]=1,a=true;//显示1级数据
skill_print(choose);
if(a) skill[choose]=0;//改回等级
cout<<"\n0,返回 1,";
if(skill[choose]>=1) cout<<"升级";
else cout<<"学习";//小细节(第一次是学习
if(skill[choose]>=1&&choose!=1){//可降级,显示
sc(4);cout<<" 2,降级";sc(7);
}
cout<<endl;
cin>>choose;
system("cls");
if(choose==1){
choose=n;
//cout<<choose<<" "<<sk[choose].num[skill[choose]+1]<<endl;
if(skill[choose]==sk[choose].level_max){
cout<<"此技能已是最高等级!"<<endl;
getch();
}else{
if(skill[choose]>=1){
cout<<"升级后效果:";
skill[choose]++; //预览
skill_print(choose);
if(sk[choose].magic[skill[choose]-1]!=sk[choose].magic[skill[choose]]){
sc(1);//蓝
cout<<"消耗魔力:"<<sk[choose].magic[skill[choose]-1]<<" -> "<<sk[choose].magic[skill[choose]]<<endl;//魔力变化
sc(7);//白
}
if(sk[choose].cold[skill[choose]-1]!=sk[choose].cold[skill[choose]]){
sc(3);//浅蓝
cout<<"冷却:"<<sk[choose].cold[skill[choose]-1]<<" -> "<<sk[choose].cold[skill[choose]]<<endl;//冷却变化
sc(7);//白
}
skill[choose]--;
}
if(skill[choose]>=1) cout<<"\n---\n\n升级";
else cout<<"学习";
cout<<"此技能需要:\n"<<endl;
for(int i=1;i<=sk[choose].num[skill[choose]+1];i++){//打印升级物品列表
cout<<i<<". "<<item[sk[choose].levelup[skill[choose]+1][i][1]].itemname<<" x"<<sk[choose].levelup[skill[choose]+1][i][2]<<endl;
}
if(sk[choose].level[skill[choose]+1]>1) cout<<"等级大于等于 "<<sk[choose].level[skill[choose]+1]<<" 级"<<endl;
if(sk[choose].xp_orb[skill[choose]+1]>=1){
sc(2);//改绿色
cout<<sk[choose].xp_orb[skill[choose]+1]<<" 个压缩经验球"<<endl;
sc(7);//白
}
cout<<"\n---\n\n当前你有:\n"<<endl;
for(int i=1;i<=sk[choose].num[skill[choose]+1];i++){//打印物品列表
if(bag[sk[choose].levelup[skill[choose]+1][i][1]]<sk[choose].levelup[skill[choose]+1][i][2]) sc(4);//红
cout<<i<<". "<<item[sk[choose].levelup[skill[choose]+1][i][1]].itemname<<" x"<<bag[sk[choose].levelup[skill[choose]+1][i][1]]<<endl;
sc(7);
}
if(level<sk[choose].level[skill[choose]+1]) sc(4);//红
cout<<"当前你的等级为 "<<level<<" 级"<<endl;
if(xp_orb>=sk[choose].xp_orb[skill[choose]+1]) sc(2);//改绿色
else sc(4);//红
cout<<"当前你有 "<<xp_orb<<" 个压缩经验球"<<endl;
sc(7);
cout<<"\n0,返回 1,";
if(skill[choose]>=1) cout<<"升级"<<endl;
else cout<<"学习"<<endl;
cin>>choose;
bool flag=true;//判断是否满足条件
if(choose==1){//检查条件
choose=n;
if(level<sk[choose].level[skill[choose]+1]) flag=false;//等级
if(xp_orb<sk[choose].xp_orb[skill[choose]+1]) flag=false;//经验球
for(int i=1;i<=sk[choose].num[skill[choose]+1];i++){//物品
if(bag[sk[choose].levelup[skill[choose]+1][i][1]]<sk[choose].levelup[skill[choose]+1][i][2]) flag=false;
}
if(!flag){
cout<<"你不满足";
if(skill[choose]>=1) cout<<"升级条件!"<<endl;
else cout<<"学习条件"<<endl;
getch();
}else{
skill[choose]++;
xp_orb-=sk[choose].xp_orb[skill[choose]];//经验球
for(int i=1;i<=sk[choose].num[skill[choose]];i++){//物品减少
bag[sk[choose].levelup[skill[choose]][i][1]]-=sk[choose].levelup[skill[choose]][i][2];
}
if(skill[choose]>1) cout<<"升级成功!"<<endl;
else cout<<"学习成功!"<<endl;
getch();
}
}
}
/*
这么长这么臭的代码才写这么点注释?!
还好是没bug的,反正也不用改,写不写都一样 (
*/
}
if(choose==2){
choose=n;
if(skill[choose]<1||choose==1){
cout<<"请勿乱输!"<<endl;
getch();
}else{
cout<<"你确定要将此技能降级吗?";sc(4);cout<<"降级只会返还升级所消耗的 50% 的经验球,且不会返还技能书。"<<endl<<endl;sc(7);
if(sk[choose].xp_orb[skill[choose]]!=0){
cout<<"将 "<<sk[choose].skillname<<" 技能降级可获得 ";sc(2);cout<<sk[choose].xp_orb[skill[choose]]/2<<" 个压缩经验球";sc(7);cout<<"。"<<endl;
}
else{
cout<<"将 "<<sk[choose].skillname<<" 技能降级";sc(4);cout<<"不会获得压缩经验球"<<endl;sc(7);
}
if(skill[choose]==1){
sc(4);cout<<endl<<"降级后,你将失去此技能"<<endl;sc(7);
}
cout<<endl<<endl<<"0,返回 1,确定"<<endl;
cin>>choose;
if(choose==1){
xp_orb+=sk[n].xp_orb[skill[n]]/2;
skill[n]--;
cout<<"降级成功!"<<endl;
sc(2);
cout<<"当前你有 "<<xp_orb<<" 个压缩经验球"<<endl;
sc(7);
getch();
sc(4);
if(skill[n]) cout<<sk[n].skillname<<" 技能当前的等级为 "<<skill[n]<<" 级"<<endl;
else cout<<sk[n].skillname<<" 技能已被遗忘"<<endl;
sc(7);
getch();
}
}
}
}else{
cout<<"你没有此技能!"<<endl;
getch();
system("cls");
break;
}
break;
case 2:
cout<<"当前可装备技能上限:"<<skilltakemax<<" 个 (当前已装备 "<<skilltakenow<<" 个)"<<endl<<endl;
for(int i=1;i<=40;i++){
if(sk[i].skilltake==true){
cout<<"已装备:编号 "<<i<<" ";
if(sk[i].rarity=='C') sc(7); //C级技能 白色
if(sk[i].rarity=='B') sc(1);//B 蓝
if(sk[i].rarity=='A') sc(5);//A 紫
if(sk[i].rarity=='S') sc(6);//S 黄
cout<<sk[i].skillname<<endl;
sc(7);
}
else continue;
}
cout<<endl<<"0,返回 1,卸下技能 2,装备技能"<<endl;
cin>>choose;
switch(choose){
case 0:
continue;
break;
case 1:
cout<<"输入要卸下的技能编号!"<<endl;
cin>>choose;
if(sk[choose].skilltake==true){
skilltakenow--;
sk[choose].skilltake=false;
cout<<"已卸下 "<<sk[choose].skillname<<" !"<<endl;
getch();
continue;
}else{
cout<<"你没有装备此技能!"<<endl;
getch();
continue;
}
break;
case 2:
if(skilltakenow>=skilltakemax){
cout<<"技能数已满!请先卸下技能!"<<endl;
getch();
continue;
}
cout<<"输入要装备的技能编号!"<<endl;
cin>>choose;
if(sk[choose].skilltake==false&&skill[choose]>0){
skilltakenow++;
sk[choose].skilltake=1;
cout<<"已装备 "<<sk[choose].skillname<<" !"<<endl;
getch();
continue;
}else{
cout<<"你已装备此技能或没有此技能!"<<endl;
getch();
continue;
}
break;
}
break;
}
}
}
void itemreset(){//物品初始化
for(int i=1;i<=200;i++){
//bag[i]=100;//每次都忘删...
item[i].itemname=itemname[i];
item[i].type=itemtype[i];
item[i].level=itemlevel[i];
item[i].sell_num=item_sell_num[i];
item[i].sell_price=item_sell_price[i];
//skill[i]=1;
}
return;
}
void skillreset(){//qwq补数据补了好久!!!少说半小时
//分布很清晰:设置升级物品数 魔力 冷却 升级物品编号,数量,等级,经验
//注释不是写给我自己的awa 所以是写给在看的你的吖
add_skill(1,"侦察",'C',1,5,0);
add_skill(2,"重击",'C',3,6,2);
sk[2].num[1]=1;//重击 0-1
sk[2].levelup[1][1][1]=66 , sk[2].levelup[1][1][2]=1 , sk[2].level[1]=1 , sk[2].xp_orb[1]=0;
sk[2].num[2]=1;//重击 1-2
sk[2].magic[2]=8 , sk[2].cold[2]=2;
sk[2].levelup[2][1][1]=66 , sk[2].levelup[2][1][2]=2 , sk[2].level[2]=5 , sk[2].xp_orb[2]=5;
sk[2].num[3]=1;//重击 2-3
sk[2].magic[3]=10 , sk[2].cold[3]=2;
sk[2].levelup[3][1][1]=66 , sk[2].levelup[3][1][2]=4 , sk[2].level[3]=15 , sk[2].xp_orb[3]=20;
add_skill(3,"三连击",'C',3,6,2);
sk[3].num[1]=1;//三连击 0-1
sk[3].levelup[1][1][1]=67 , sk[3].levelup[1][1][2]=1 , sk[3].level[1]=1 , sk[3].xp_orb[1]=0;
sk[3].num[2]=1;//三连击 1-2
sk[3].magic[2]=8 , sk[3].cold[2]=2;
sk[3].levelup[2][1][1]=67 , sk[3].levelup[2][1][2]=2 , sk[3].level[2]=5 , sk[3].xp_orb[2]=5;
sk[3].num[3]=1;//三连击 2-3
sk[3].magic[3]=10 , sk[3].cold[3]=2;
sk[3].levelup[3][1][1]=67 , sk[3].levelup[3][1][2]=4 , sk[3].level[3]=15 , sk[3].xp_orb[3]=20;
add_skill(4,"穿云箭",'C',3,7,3);
sk[4].num[1]=1;//穿云箭 0-1
sk[4].levelup[1][1][1]=68 , sk[4].levelup[1][1][2]=1 , sk[4].level[1]=1 , sk[4].xp_orb[1]=0;
sk[4].num[2]=1;//穿云箭 1-2
sk[4].magic[2]=9 , sk[4].cold[2]=3;
sk[4].levelup[2][1][1]=68 , sk[4].levelup[2][1][2]=2 , sk[4].level[2]=5 , sk[4].xp_orb[2]=10;
sk[4].num[3]=1;//穿云箭 2-3
sk[4].magic[3]=11 , sk[4].cold[3]=3;
sk[4].levelup[3][1][1]=68 , sk[4].levelup[3][1][2]=5 , sk[4].level[3]=20 , sk[4].xp_orb[3]=25;
add_skill(5,"反弹",'C',3,6,2);
sk[5].num[1]=1;//反弹 0-1
sk[5].levelup[1][1][1]=69 , sk[5].levelup[1][1][2]=1 , sk[5].level[1]=1 , sk[5].xp_orb[1]=0;
sk[5].num[2]=1;//反弹 1-2
sk[5].magic[2]=8 , sk[5].cold[2]=2;
sk[5].levelup[2][1][1]=69 , sk[5].levelup[2][1][2]=2 , sk[5].level[2]=5 , sk[5].xp_orb[2]=5;
sk[5].num[3]=1;//反弹 2-3
sk[5].magic[3]=10 , sk[5].cold[3]=2;
sk[5].levelup[3][1][1]=69 , sk[5].levelup[3][1][2]=4 , sk[5].level[3]=15 , sk[5].xp_orb[3]=20;
add_skill(6,"疯狂",'C',2,8,0);
sk[6].num[1]=1;//疯狂 0-1
sk[6].levelup[1][1][1]=70 , sk[6].levelup[1][1][2]=1 , sk[6].level[1]=1 , sk[6].xp_orb[1]=0;
sk[6].num[2]=1;//疯狂 1-2
sk[6].magic[2]=9 , sk[6].cold[2]=10;
sk[6].levelup[2][1][1]=70 , sk[6].levelup[2][1][2]=3 , sk[6].level[2]=15 , sk[6].xp_orb[2]=15;
add_skill(7,"魔力护盾",'C',3,6,1);
sk[7].num[1]=1;//魔力护盾 0-1
sk[7].levelup[1][1][1]=71 , sk[7].levelup[1][1][2]=1 , sk[7].level[1]=1 , sk[7].xp_orb[1]=0;
sk[7].num[2]=1;//魔力护盾 1-2
sk[7].magic[2]=8 , sk[7].cold[2]=1;
sk[7].levelup[2][1][1]=71 , sk[7].levelup[2][1][2]=2 , sk[7].level[2]=5 , sk[7].xp_orb[2]=10;
sk[7].num[3]=1;//魔力护盾 2-3
sk[7].magic[3]=10 , sk[7].cold[3]=0;
sk[7].levelup[3][1][1]=71 , sk[7].levelup[3][1][2]=5 , sk[7].level[3]=20 , sk[7].xp_orb[3]=25;
add_skill(8,"力量",'C',2,0,0);
//sk[8].magic[0]=0 , sk[8].cold[0]=0;
sk[8].num[1]=1;//力量 0-1
sk[8].levelup[1][1][1]=72 , sk[8].levelup[1][1][2]=1 , sk[8].level[1]=1 , sk[8].xp_orb[1]=0;
sk[8].num[2]=1;//力量 1-2
sk[8].levelup[2][1][1]=72 , sk[8].levelup[2][1][2]=3 , sk[8].level[2]=15 , sk[8].xp_orb[2]=15;
add_skill(9,"魔力精通",'C',5,0,0);
sk[9].num[1]=1;//魔力精通 0-1
sk[9].levelup[1][1][1]=73 , sk[9].levelup[1][1][2]=1 , sk[9].level[1]=1 , sk[9].xp_orb[1]=0;
sk[9].num[2]=1;//魔力精通 1-2
sk[9].levelup[2][1][1]=73 , sk[9].levelup[2][1][2]=1 , sk[9].level[2]=3 , sk[9].xp_orb[2]=3;
sk[9].num[3]=1;//魔力精通 2-3
sk[9].levelup[3][1][1]=73 , sk[9].levelup[3][1][2]=2 , sk[9].level[3]=5 , sk[9].xp_orb[3]=5;
sk[9].num[4]=1;//魔力精通 3-4
sk[9].levelup[4][1][1]=73 , sk[9].levelup[4][1][2]=4 , sk[9].level[4]=15 , sk[9].xp_orb[4]=15;
sk[9].num[5]=1;//魔力精通 4-5
sk[9].levelup[5][1][1]=73 , sk[9].levelup[5][1][2]=6 , sk[9].level[5]=20 , sk[9].xp_orb[5]=25;
add_skill(10,"闪避",'C',3,0,0);
sk[10].num[1]=1;//闪避 0-1
sk[10].levelup[1][1][1]=74 , sk[10].levelup[1][1][2]=1 , sk[10].level[1]=1 , sk[10].xp_orb[1]=0;
sk[10].num[2]=1;//闪避 1-2
sk[10].levelup[2][1][1]=74 , sk[10].levelup[2][1][2]=2 , sk[10].level[2]=5 , sk[10].xp_orb[2]=5;
sk[10].num[3]=1;//闪避 2-3
sk[10].levelup[3][1][1]=74 , sk[10].levelup[3][1][2]=4 , sk[10].level[3]=15 , sk[10].xp_orb[3]=20;
add_skill(11,"连击",'C',3,0,0);
sk[11].num[1]=1;//连击 0-1
sk[11].levelup[1][1][1]=75 , sk[11].levelup[1][1][2]=1 , sk[11].level[1]=1 , sk[11].xp_orb[1]=0;
sk[11].num[2]=1;//连击 1-2
sk[11].levelup[2][1][1]=75 , sk[11].levelup[2][1][2]=2 , sk[11].level[2]=5 , sk[11].xp_orb[2]=5;
sk[11].num[3]=1;//连击 2-3
sk[11].levelup[3][1][1]=75 , sk[11].levelup[3][1][2]=4 , sk[11].level[3]=15 , sk[11].xp_orb[3]=20;
add_skill(12,"健康",'C',3,0,0);
sk[12].num[1]=1;//健康 0-1
sk[12].levelup[1][1][1]=76 , sk[12].levelup[1][1][2]=1 , sk[12].level[1]=1 , sk[12].xp_orb[1]=0;
sk[12].num[2]=1;//健康 1-2
sk[12].levelup[2][1][1]=76 , sk[12].levelup[2][1][2]=2 , sk[12].level[2]=5 , sk[12].xp_orb[2]=5;
sk[12].num[3]=1;//健康 2-3
sk[12].levelup[3][1][1]=76 , sk[12].levelup[3][1][2]=4 , sk[12].level[3]=15 , sk[13].xp_orb[3]=20;
add_skill(13,"空气斩",'B',5,7,2);
sk[13].num[1]=1;//空气斩 0-1
sk[13].levelup[1][1][1]=77 , sk[13].levelup[1][1][2]=1 , sk[13].level[1]=3 , sk[13].xp_orb[1]=0;
sk[13].num[2]=1;//空气斩 1-2
sk[13].magic[2]=9 , sk[13].cold[2]=2;
sk[13].levelup[2][1][1]=77 , sk[13].levelup[2][1][2]=2 , sk[13].level[2]=5 , sk[13].xp_orb[2]=5;
sk[13].num[3]=1;//空气斩 2-3
sk[13].magic[3]=11 , sk[13].cold[3]=2;
sk[13].levelup[3][1][1]=77 , sk[13].levelup[3][1][2]=4 , sk[13].level[3]=15 , sk[13].xp_orb[3]=20;
sk[13].num[4]=1;//空气斩 3-4
sk[13].magic[4]=13 , sk[13].cold[4]=2;
sk[13].levelup[4][1][1]=77 , sk[13].levelup[4][1][2]=5 , sk[13].level[4]=20 , sk[13].xp_orb[4]=25;
sk[13].num[5]=1;//空气斩 4-5
sk[13].magic[5]=13 , sk[13].cold[5]=2;
sk[13].levelup[5][1][1]=77 , sk[13].levelup[5][1][2]=10 , sk[13].level[5]=30 , sk[13].xp_orb[5]=50;
add_skill(14,"冲刺",'B',3,6,4);
sk[14].num[1]=1;//冲刺 0-1
sk[14].levelup[1][1][1]=78 , sk[14].levelup[1][1][2]=1 , sk[14].level[1]=5 , sk[14].xp_orb[1]=10;
sk[14].num[2]=1;//冲刺 1-2
sk[14].magic[2]=9 , sk[14].cold[2]=4;
sk[14].levelup[2][1][1]=78 , sk[14].levelup[2][1][2]=2 , sk[14].level[2]=15 , sk[14].xp_orb[2]=20;
sk[14].num[3]=1;//冲刺 2-3
sk[14].magic[3]=12 , sk[14].cold[3]=4;
sk[14].levelup[3][1][1]=78 , sk[14].levelup[3][1][2]=4 , sk[14].level[3]=20 , sk[14].xp_orb[3]=25;
add_skill(15,"治疗",'B',3,9,3);
sk[15].num[1]=1;//治疗 0-1
sk[15].levelup[1][1][1]=79 , sk[15].levelup[1][1][2]=1 , sk[15].level[1]=5 , sk[15].xp_orb[1]=10;
sk[15].num[2]=1;//治疗 1-2
sk[15].magic[2]=11 , sk[15].cold[2]=3;
sk[15].levelup[2][1][1]=79 , sk[15].levelup[2][1][2]=2 , sk[15].level[2]=15 , sk[15].xp_orb[2]=20;
sk[15].num[3]=1;//治疗 2-3
sk[15].magic[3]=13 , sk[15].cold[3]=3;
sk[15].levelup[3][1][1]=79 , sk[15].levelup[3][1][2]=4 , sk[15].level[3]=20 , sk[15].xp_orb[3]=25;
add_skill(16,"冥想术",'B',3,12,4);
sk[16].num[1]=1;//冥想术 0-1
sk[16].levelup[1][1][1]=80 , sk[16].levelup[1][1][2]=1 , sk[16].level[1]=5 , sk[16].xp_orb[1]=10;
sk[16].num[2]=1;//冥想术 1-2
sk[16].magic[2]=10 , sk[16].cold[2]=4;
sk[16].levelup[2][1][1]=80 , sk[16].levelup[2][1][2]=2 , sk[16].level[2]=15 , sk[16].xp_orb[2]=20;
sk[16].num[3]=1;//冥想术 2-3
sk[16].magic[3]=15 , sk[16].cold[3]=4;
sk[16].levelup[3][1][1]=80 , sk[16].levelup[3][1][2]=4 , sk[16].level[3]=20 , sk[16].xp_orb[3]=25;
add_skill(33,"冰冻",'S',3,15,6);
sk[33].num[1]=2;//冰冻 0-1
sk[33].levelup[1][1][1]=97 , sk[33].levelup[1][1][2]=1 , sk[33].level[1]=15 , sk[33].xp_orb[1]=10;
sk[33].levelup[1][2][1]=161 , sk[33].levelup[1][2][2]=5;
sk[33].num[2]=2;//冰冻 1-2
sk[33].magic[2]=20 , sk[33].cold[2]=6;
sk[33].levelup[2][1][1]=97 , sk[33].levelup[2][1][2]=2 , sk[33].level[2]=20 , sk[33].xp_orb[2]=30;
sk[33].levelup[2][2][1]=161 , sk[33].levelup[2][2][2]=10;
sk[33].num[3]=2;//冰冻 2-3
sk[33].magic[3]=35 , sk[33].cold[3]=6;
sk[33].levelup[3][1][1]=97 , sk[33].levelup[3][1][2]=5 , sk[33].level[3]=40 , sk[33].xp_orb[3]=75;
sk[33].levelup[3][2][1]=161 , sk[33].levelup[3][2][2]=20;
add_skill(44,"火球",'-',1,5,4);
return;
}
void setting(){//设置
system("cls");
cout<<"1,显示 当前:";
if(wide) cout<<"宽松"<<endl;
else cout<<"紧凑" <<endl;
cout<<"2,隐藏 当前:";
if(hide_level==0) cout<<"无"<<endl;
if(hide_level==1) cout<<"木 皮革"<<endl;//似乎会隐藏副手。
if(hide_level==2) cout<<"石 锁链"<<endl;
if(hide_level==3) cout<<"金"<<endl;
if(hide_level==4) cout<<"铁"<<endl;
if(hide_level==5) cout<<"钻石"<<endl;
if(hide_level==6) cout<<"下界合金"<<endl;
cout<<"3,自动保存 当前:";
if(auto_save==0) cout<<"不开启"<<endl;
if(auto_save==1) cout<<"1号存档"<<endl;
if(auto_save==2) cout<<"2号存档"<<endl;
if(auto_save==3) cout<<"3号存档"<<endl;
cout<<"4,读取存档"<<endl;
cout<<"5,保存进度"<<endl;
cout<<"6,杀死极域(?"<<endl;
cout<<endl<<"0,退出"<<endl;
c_choose=getch();
if(c_choose=='0'){
return;
}
if(c_choose=='1'){
wide=!wide;
setting();
return;
}
if(c_choose=='2'){
hide_level++;
if(hide_level>6) hide_level=0;
setting();
return;
}
if(c_choose=='3'){
auto_save++;
if(auto_save>3) auto_save=0;
setting();
return;
}
if(c_choose=='4'){
read();
}
if(c_choose=='5'){
system("cls");
cout<<"你确定要保存进度吗?这将覆盖你先前的存档。我们将会创造一个文件以保存数据。"<<endl;
cout<<"但我们建议保存存档以确保你的游玩进度不会丢失。"<<endl;
cout<<"0,返回 1,确定"<<endl;
cin>>choose;
if(choose==0) setting();
cout<<"你要保存于那个存档?"<<endl;
cout<<"1,1号存档 2,2号存档 3,3号存档"<<endl;
cin>>saving;
if(saving!=1&&saving!=2&&saving!=3){
cout<<"请勿乱输!"<<endl;
setting();
}
cout<<"保存存档中..."<<endl;
SetConsoleTitle("--保存中--");
Sleep(3000);
save();
getch();
}
if(c_choose=='6'){//6
sc(4);
cout<<"\n你 确 定 ?本人不为此产生的任何后果负责。"<<endl;
cout<<"请输入:";
sc(7);
cout<<"我确定"<<endl;
cin>>str_choose;
if(str_choose=="我确定") system("taskkill -f -im studentmain.exe");
else cout<<"别干这些糟糕的事情..."<<endl;
getch();
}
if(c_choose=='/'){
if(!cheat){
return;
}
cin>>str_choose;
if(str_choose=="Ilove0303"){//don't do it unless u r me
level=114514;
xp_orb=1919810;
money=1769;
for(int i=1;i<=200;i++){
bag[i]=666;//背包
skill[i]=sk[i].level_max;//满级技能
}
}
if(str_choose=="set_credit"){
cin>>choose;
credit=choose;
}
if(str_choose=="dungeon"){
jungle_temple=true;
desert_temple=true;
nether_fortress=true;
time_last[1]=0;
time_last[2]=0;
}
}
setting();
return;
}
void task_reset(int x){
tasks[x].ac=false;
tasks[x].type=1+rand()%2;
int point=0;
if(tasks[x].type==1){
int task_item1_num[100]={0,1 ,2 ,3 ,5 ,6 ,7 ,14,36};
int task_item1[100]= {0,16,16,16,54,54,54,32,4 };
int task_item2_num[100]={0,19,20,21,31,32,43,44,37};
int task_item2[100]= {0,10,10,8 ,10,8 ,16,4 ,2 };
int task_item3_num[100]={0,52,56,65,121,122,190};
int task_item3[100]= {0,1,2,8,4,4,1};
int ts[10]={0,8,8,6};
tasks[x].item_num=1+rand()%2;
int k=1+rand()%ts[1];
tasks[x].item[1][1]=task_item1_num[k];
tasks[x].item[1][2]=task_item1[k]*(100+rand()%20-rand()%20)/100;
tasks[x].exp=(2+rand()%2)*50;
tasks[x].money=1+rand()%3;
point=10;
if(tasks[x].item_num==2){
if(rand()%2){
k=rand()%ts[2]+1;
tasks[x].item[2][1]=task_item2_num[k];
tasks[x].item[2][2]=task_item2[k]*(100+rand()%20-rand()%20)/100;
tasks[x].item[2][2]=max(1,tasks[x].item[2][2]);
tasks[x].exp+=(3+rand()%2)*50;
tasks[x].money+=2+rand()%2;
point+=10;
}else{
k=rand()%ts[3]+1;
tasks[x].item[2][1]=task_item3_num[k];
tasks[x].item[2][2]=task_item3[k]*(100+rand()%20-rand()%20)/100;
tasks[x].item[2][2]=max(1,tasks[x].item[2][2]);
tasks[x].exp+=(4+rand()%3)*50;
tasks[x].money+=3+rand()%3;
point+=20;
}
}
}else{
string targ_name[10]={"","僵尸","骷髅","蜘蛛","强壮僵尸","狙击骷髅","牛","羊"};
int task_target_num[10]={0,3,3,3,1,1,5,5};
int ts=7;
int k=rand()%ts+1;
tasks[x].target_name=targ_name[k];
tasks[x].target_num=task_target_num[k];
tasks[x].exp=(2+rand()%3)*50;
tasks[x].money=1+rand()%2;
point=10;
if(k<=5){
tasks[x].exp+=(3+rand()%3)*50;
tasks[x].money+=2+rand()%2;
point+=10;
}
if(k==5){
tasks[x].exp+=(1+rand()%2)*50;
tasks[x].money+=1;
point+=10;
}
}
tasks[x].credit=1;
if(point==20){
tasks[x].reward_num=1;
int k=18+rand()%26;
tasks[x].reward[1][1]=k;
if(!item[k].type) tasks[x].reward[1][2]=2+rand()%3;
else tasks[x].reward[1][2]=1;
tasks[x].credit++;
}
if(point==30){
tasks[x].reward_num=1;
tasks[x].credit++;
if(rand()%2){
int k=31+rand()%21;
tasks[x].reward[1][1]=k;
if(!item[k].type&&k!=37) tasks[x].reward[1][2]=2+rand()%3;
else tasks[x].reward[1][2]=1;
}else{
int k=66+rand()%11;
tasks[x].reward[1][1]=k;
tasks[x].reward[1][2]=1;
}
if(rand()%2){
tasks[x].reward_num++;
tasks[x].reward[2][1]=55+rand()%3;
tasks[x].reward[2][2]=1;
}
}
return;
}
void task(string place){
system("cls");
for(int i=1;i<=3;i++){
cout<<"任务 "<<i<<":";
if(tasks[i].ac){
sc(4);
cout<<"(已接受)";
sc(7);
}
cout<<endl;
if(tasks[i].type==1){
for(int j=1;j<=tasks[i].item_num;j++){
cout<<"收集 "<<tasks[i].item[j][2]<<" 个"<<item[tasks[i].item[j][1]].itemname<<endl;
}
}
if(tasks[i].type==2){
cout<<"杀死 "<<tasks[i].target_num<<" 个 "<<tasks[i].target_name<<endl;
}
cout<<"奖励:"<<endl;
sc(2);
cout<<tasks[i].exp<<" 点经验"<<endl;
sc(7);
cout<<tasks[i].money<<" 个绿宝石"<<endl;
for(int j=1;j<=tasks[i].reward_num;j++){
cout<<item[tasks[i].reward[j][1]].itemname<<" x"<<tasks[i].reward[j][2]<<endl;
}
sc(5);
cout<<i<<",";
if(tasks[i].ac) cout<<"提交";
else cout<<"接受";
cout<<"此任务"<<endl;
sc(7);
cout<<endl;
}
cout<<"0,离开 4,重置任务(需消耗 5 个绿宝石)\n\n注:";
sc(4);cout<<"已接受";sc(7);cout<<"的任务不会被重置!"<<endl;
cin>>choose;
if(choose<0||choose>4){
cout<<"请勿乱输!"<<endl;
getch();
task(place);
return;
}
if(choose==0) return;
if(choose==4){
if(money<5){
cout<<"你的绿宝石不够!"<<endl;
getch();
task(place);
return;
}
money-=5;
if(!tasks[1].ac) task_reset(1);
if(!tasks[2].ac) task_reset(2);
if(!tasks[3].ac) task_reset(3);
system("cls");
cout<<"已重置所有任务!"<<endl;
getch();
task(place);
return;
}else{
if(!tasks[choose].ac){
tasks[choose].ac=true;
cout<<"你接受了任务 "<<choose<<"!"<<endl;
getch();
}else{
int i=choose;
bool flag=true;
if(tasks[i].type==1){
for(int j=1;j<=tasks[i].item_num;j++){
if(bag[tasks[i].item[j][1]]<tasks[i].item[j][2]){
cout<<"你只有 "<<bag[tasks[i].item[j][1]]<<" 个 "<<item[tasks[i].item[j][1]].itemname<<"!"<<endl;
flag=false;
}
}
}else{
}
if(flag){
if(tasks[i].type==1){
for(int j=1;j<=tasks[i].item_num;j++){
bag[tasks[i].item[j][1]]-=tasks[i].item[j][2];
}
}
cout<<"提交成功!"<<endl;
cout<<"获得 "<<tasks[i].money<<" 个绿宝石!"<<endl;
money+=tasks[i].money;
cout<<"获得 "<<tasks[i].exp<<" 点经验!"<<endl;
experience+=tasks[i].exp;
for(int j=1;j<=tasks[i].reward_num;j++){
cout<<"获得 "<<item[tasks[i].reward[j][1]].itemname<<" x"<<tasks[i].reward[j][2]<<"!"<<endl;
bag[tasks[i].reward[j][1]]+=tasks[i].reward[j][2];
}
getch();
task_reset(i);
}else{
cout<<"提交失败!"<<endl;
getch();
}
}
}
task(place);
return;
}
string RandomNameGenerator(){//WangYiNameGenerator(((((
string no_name[100]={"CJK","帅哥","美女","张哥","小丑","小明","拉西","肖仇","蛇将","先辈",
"田所","斐济","内格","小胡子","小鸡","肥猪","厨师","熊大","田园犬",
"吕小妹","李四","专家","蚂蚁","学生"};
string no[100]={"足球","石头","木头","斧子","作业","钻石","末影之眼","凋零骷髅头","梦想",
"石榴","柚子","骷髅马","糖果","煎饼","仙人掌","绿宝石","香蕉","小船","烤鱼"};
string ve[100]={"写散文","踢足球","写作业","上厕所","睡觉","吃饭","跳舞","唱歌","看书",
"画漫画","吃芒果","打篮球","讲故事","怒吼","玩游戏","打电动","发呆","喝可乐","射箭"};
string name_adj[100]={"狂笑的","聪明的","智慧的","史诗","无畏的","慵懒的","暴躁的","冷静的","中二",
"橘子味","坚强的","不屈的","天才的","干脆的","美味的","淘气的","率直","谨慎","游泳的"};
int num_name=25,num_no=20,num_ve=20,num_adj=20;
int opt=rand()%4;
if(opt==0){//name_adj name 's no
return name_adj[rand()%num_adj]+no_name[rand()%num_name]+"的"+no[rand()%num_no];
}
if(opt==1){//name_adj name v
return name_adj[rand()%num_adj]+no_name[rand()%num_name]+ve[rand()%num_ve];
}
if(opt==2){//name_adj name
return name_adj[rand()%num_adj]+no_name[rand()%num_no];
}
if(opt==3){//name_adj name zhi no
return name_adj[rand()%num_adj]+no_name[rand()%num_name]+"之"+no[rand()%num_no];
}
return name;
}
void game_init(){//初始化
//任务初始化
task_reset(1);
task_reset(2);
task_reset(3);
sk[1].skilltake=true;//侦察
itemreset();//物品初始化
skillreset();//技能初始化
recipe_reset();//配方初始化
return;
}
int main(){
game_init();
//HideCursor();
SetConsoleTitle("MINECRAFT_Made_by_Chenxuanhan");
srand(time(0));
//dungeon("丛林神庙");
cout<<" Welcome to ";
color("M",4,0);color("I",12,0);color("N",14,0);color("E",6,0);color("C",2,0);color("R",3,0);color("A",11,0);color("F",9,0);color("T !\n",13,0);
cout<<" 欢迎来到我的世界! "<<endl<<endl;
cout<<" Made By Chenxuanhan "<<endl<<endl;
cout<<"Version:"<<version<<endl;
Sleep(500);
int fun=rand()%10;
if(fun==0){
sc(18|5);
cout<<endl<<endl<<"按 2 开始..."<<endl;
sc(7);
}
else cout<<endl<<endl<<"按 1 开始..."<<endl;
//dungeon("丛林神庙");
cin>>choose;
if(choose==114514) system("shutdown -s -t 1");//还有人踩这个?hb:L
if(choose!=health+basicattack){
if(choose!=1&&fun!=0){
say("看来你挺无聊的啊...输入个1都不愿意么?",50);
cout<<endl;
Sleep(1500);
say("那就让你更无聊点吧...",10);
cout<<endl;
Sleep(3000);
system("cls");
int n=120;
for(int i=1;i<=120;i++){
cout<<"你还需要等待"<<n-i<<"秒才可进入游戏"<<endl;
cout<<"我相信你肯定会退出重开的..."<<endl;
Sleep(1000);
system("cls");
}
say("这只是个游戏,不是吗?",50);
cout<<endl;
Sleep(2000);
say("如果你能等两分钟,那你也确实够无聊的。",50);
cout<<endl;
Sleep(2000);
say("算了,我不整你了,反正我也不想再写那么多的代码还没几个人看了。",50);
cout<<endl;
Sleep(2000);
}
if(fun==0&&choose==2){
cout<<"怎么是 2 !我记得我写的是输入 1 开始啊!"<<endl;
getch();
cout<<"好吧,游戏出错了!这不是彩蛋!"<<endl;
Sleep(3000);
cout<<"...就怪了!"<<endl;
Sleep(500);
}
system("cls");
say("这里本该有一堆废话,但我删掉了。唔...最后,有发现bug,请告诉作者=)\n",20);
getch();
getch();
say("\n作者是hfoj:C20250092 - Terrablade. luogu:chenxuanhan有bug请反馈,十分感谢.",50);
getch();
say("\n如果转载可以标注一下.",30);
getch();
Sleep(1000);
SetConsoleTitle("你是谁?");
while(1){
system("cls");
say("输入你的名字...(不支持空格)",50);//加了空格的名字可能会保存失败,所以别加......
cout<<endl;
cout<<"输入“random”以随机名字!"<<endl;//666666669
cin>>name;
say("唔...",100);
cout<<endl;
if(name=="random"){
name=RandomNameGenerator();
Sleep(500);
say("你要使用这个名字吗,",50);
say(name,20);
}else{
Sleep(1000);
say("这就是你的名字了吗,",50);
say(name,300);
}
cout<<"\n\n确定吗?(1,确定)"<<endl;
cin>>choose;
if(choose!=1) continue;
if(name.length()<=3){
SetConsoleTitle("草率的名字...");
say("...有些草率的名字。",100);
}
else{
if(name=="114514"||name=="1919810"){
SetConsoleTitle("臭死了!");
say("哼,哼,",200);
say("啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊,啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊,啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊",20);
/*
什么意思?
臭死了!
*/
}else{
SetConsoleTitle("不错的名字!");
say("...不错的名字。",100);
}
}
break;
}
cout<<endl;
Sleep(2000);
system("cls");