-
个人简介
大黑塔将给我她的iQ\
oi-wiki.org弹窗(学校电脑误用)
#include<bits/stdc++.h> #include<windows.h> using namespace std;main(){ while(1) system("start"); }死机(电脑误用,亲测)
#include<windows.h> #include<cstdlib> #include<ctime> using namespace std; int main() { int x=GetSystemMetrics(SM_CXSCREEN); int y=GetSystemMetrics(SM_CYSCREEN); srand(time(0)); while(1)SetCursorPos(999,999); return 0; }腐朽(淘来的)
#include<windows.h> #include<bits/stdc++.h> using namespace std; string xz; bool p,tz[41][10]; short sum; string dj[10]={"","普通","罕见","稀有","史诗","传奇","神话","究极","超级","唯一"}; short num[10]={0,1,3,9,27,81,243,729,2187,6561}; namespace flhb{ string hbname[41]={"","基本","尾刺","轻","石头","玻璃","蜂蜡","碎纸片","血刺","玫瑰","土","电","金币","魔法球","魔法刺","世界树之叶","叶子","魔法叶子","金盔","血祭","锯齿","齿轮"}; short lqtime[41]={0,2,10,1,4,1,30,1,6,4,5,1,1,4,0,512,1,1,60,0,0,2}; short hbsh[41]={0,10,100,13,15,15,2,1,100,5,10,15,5,0,250,0,13,13,0,0,0,50}; short nj[41]={0,10,2,5,45,1,0,1,2,5,10,100,15,10,2,10,12,12,243,0,10,2}; short starnum[41]={0,0,4,2,3,2,3,0,3,3,8,4,0,5,4,90,2,2,10,3,10,1}; int star[10]={0,0,0,0,0,20,500,15000,750000,0}; } namespace moster{ short dlexp[41]={0,1,1,1,1,1,1,1,1,1,1,1,1,1}; string dlname[41]={"","岩石","商人","资本家","蜜蜂","瓢虫","泥土","变异瓢虫","幼蚁","工蚁","泰坦","重组机","盲盒机","机器"}; int hpnum[10]={0,1,3,12,60,480,4320,43200,1296000,12960000}; int expnum[10]={0,1,2,10,60,480,3820,38200,528000,1280000}; short hp[41]={0,30,1,0,20,25,15,35,10,35,1,1,1,35}; short dlsh[41]={0,10,0,0,50,30,5,50,5,5,0,0,0,50}; short hj[41]={0,1,1,0,1,2,1,3,1,1,1,1,1,4}; short gg[41]={0,1,5,2,2,2,1,2,1,2,5,5,5,1};//1是被动,2是中立,3是敌对,4是召唤,5是NPC,6是友善 short dlstar[10]={0,0,0,0,0,10,20,40,160,640}; } using namespace flhb; using namespace moster; struct flower{ string ID; float hp,gamehp,gamemaxhp; short lv,maxmana,mana; int sxexp,exp,mark,star,gamestsh,stsh; bool xj; }fl; struct Moster{ string name; int hp,sh,exp,gamehp; short dltime,gg,star,hj; }dl[41][10]; struct Flower{ string name; int sh,nj,sum,zl,maxhp,gamenj,star,stsh; short lqtime,zwsh,maxmana,mana,sxmana; bool live,maxnj,xj,lq; }hb[41][10],cw[11],ccw[11],cccw; void print(){ for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].sum>0){ cout<<hb[i][j].name; if(hb[i][j].sxmana)cout<<"\n魔力消耗:"<<hb[i][j].sxmana; if(hb[i][j].lqtime)cout<<"\n冷却时间:"<<hb[i][j].lqtime<<"秒"; if(hb[i][j].sh)cout<<"\n伤害:"<<hb[i][j].sh; if(hb[i][j].stsh)cout<<"\n身体伤害:+"<<hb[i][j].stsh; if(hb[i][j].nj)cout<<"\n耐久:"<<hb[i][j].nj; if(hb[i][j].zl)cout<<"\n治疗:"<<hb[i][j].zl; if(hb[i][j].maxhp)cout<<"\n花朵最大生命值:"<<hb[i][j].maxhp; if(hb[i][j].zwsh)cout<<"\n自我伤害:"<<hb[i][j].zwsh; if(hb[i][j].maxmana)cout<<"\n基础魔力上限:"<<hb[i][j].maxmana; if(hb[i][j].mana)cout<<"\n魔力:"<<hb[i][j].mana; if(i==18)cout<<"\n耐久上限:"<<hb[i][j].nj; if(i==19)cout<<"\n死亡后,召唤1只生物(超级)"; cout<<"\n数量:"<<hb[i][j].sum<<"\n\n"; } } } } void printdl(short a,short b){ cout<<dl[a][b].name<<"\n经验:"<<dl[a][b].exp<<"\n生命值:"<<dl[a][b].gamehp<<"\n伤害:"<<dl[a][b].sh<<"\n护甲:"<<dl[a][b].hj<<"\n\n"; } void printme(){ cout<<"用户名:"<<fl.ID<<"\n等级:"<<fl.lv<<"\n花朵最大生命值:"<<fl.gamemaxhp<<"\n花朵当前生命值:" <<fl.gamehp<<"\n身体伤害:"<<fl.gamestsh; if(fl.maxmana){ cout<<"\n魔力上限:"<<fl.maxmana<<"\n魔力:"<<fl.mana; } cout<<"\n\n"; } void printcw(short a){ cout<<"槽位"<<a<<":\n"; cout<<cw[a].name; if(cw[a].sxmana)cout<<"\n魔力消耗:"<<cw[a].sxmana; if(cw[a].lqtime)cout<<"\n冷却时间:"<<cw[a].lqtime<<"秒"; if(cw[a].sh)cout<<"\n伤害:"<<cw[a].sh; if(cw[a].stsh)cout<<"\n身体伤害:+"<<cw[a].stsh; if(cw[a].nj)cout<<"\n耐久:"<<cw[a].nj; if(cw[a].zl)cout<<"\n治疗:"<<cw[a].zl; if(cw[a].maxhp)cout<<"\n花朵最大生命值:"<<cw[a].maxhp; if(cw[a].zwsh)cout<<"\n自我伤害:"<<cw[a].zwsh; if(cw[a].maxmana)cout<<"\n基础魔力上限:"<<cw[a].maxmana; if(cw[a].mana)cout<<"\n魔力:"<<cw[a].mana; if(cw[a].maxnj)cout<<"\n耐久上限:"<<cw[a].nj; if(cw[a].xj)cout<<"\n死亡后,召唤1只生物(超级)"; cout<<"\n\n"; } void _(){ for(short i=1;i<121;i++)cout<<'_'; cout<<endl; } void flush(){ srand(time(0)); short s=0; while(fl.exp>=fl.sxexp){ fl.exp-=fl.sxexp; s++; fl.sxexp=7*fl.sxexp/6; fl.stsh=10*fl.stsh/9; fl.hp=11*fl.hp/10; } fl.lv+=s; if(s){ system("cls"); system("color 2f"); cout<<"你升了"<<s<<"级,生命:"<<fl.hp<<",身体伤害:"<<fl.stsh<<",升级所需经验:"<<fl.sxexp; Sleep(rand()%3333+1000); } } void shezhi(){ srand(time(0)); hb[20][1].stsh=27; hb[16][1].zl=1; hb[14][1].sxmana=27; hb[13][1].maxmana=hb[17][1].maxmana=30; hb[13][1].mana=5; hb[17][1].mana=2; hb[10][1].maxhp=50; hb[9][1].zl=8; hb[8][1].zwsh=4; hb[6][3].nj=12000; for(short i=1;i<41;i++){ hb[i][1].sh=hbsh[i]; hb[i][1].nj=nj[i]; } for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j-1].sh&&j>1)hb[i][j].sh=hb[i][j-1].sh*3; hb[i][j].name=hbname[i]+'('+dj[j]+')'; if(hb[i][j-1].nj&&j>1)hb[i][j].nj=hb[i][j-1].nj*3; if(hb[i][j-1].zl&&j>1)hb[i][j].zl=hb[i][j-1].zl*3; if(i!=15||(i==15&&j<2))hb[i][j].lqtime=lqtime[i]; else hb[i][j].lqtime=hb[i][j-1].lqtime/2; if(hb[i][j-1].maxhp&&j>1)hb[i][j].maxhp=hb[i][j-1].maxhp*3; if(hb[i][j-1].zwsh&&j>1)hb[i][j].zwsh=hb[i][j-1].zwsh*3; if(hb[i][j-1].maxmana&&j>1)hb[i][j].maxmana=hb[i][j-1].maxmana*2; if(hb[i][j-1].mana&&j>1)hb[i][j].mana=hb[i][j-1].mana*2; if(hb[i][j-1].sxmana&&j>1)hb[i][j].sxmana=hb[i][j-1].sxmana*2; hb[15][j].live=hb[18][j].maxnj=hb[19][j].xj=hb[21][j].lq=1; if(hb[i][j-1].stsh&&j>1)hb[i][j].stsh=hb[i][j-1].stsh*3; } } } void ID(){ fl.lv=1; fl.sxexp=30; fl.hp=100; fl.stsh=10; sum=5; system("color 2f"); cout<<setw(65)<<"欢迎游玩flower.io!\n"; _(); cout<<"请输入ID:"; cin>>fl.ID; cout<<"\n注册成功!送你5个"<<hb[1][1].name<<",送你1个"<<hb[9][1].name; Sleep(500); hb[1][1].sum=5; hb[9][1].sum=1; } void shezhidl(){ for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ dl[i][j].exp=dlexp[i]*expnum[j]; dl[i][j].name=dlname[i]+'('+dj[j]+')'; dl[i][j].hj=hj[i]*num[j]; dl[i][j].hp=hp[i]*hpnum[j]; dl[i][j].sh=dlsh[i]*num[j]; dl[i][j].gg=gg[i]; dl[2][j].exp=dl[3][j].exp=dl[10][j].exp=dl[11][j].exp=dl[12][j].exp=1; } } } void shop(){ bool a[41][10]; pp:; memset(tz,0,sizeof(tz)); memset(a,0,sizeof(a)); srand(time(0)); system("cls"); system("color 2f"); cout<<setw(65)<<"flower商店界面\n"; _(); cout<<"用户名:"<<fl.ID<<"\n星星数量:"<<fl.star; cout<<"\n\n商店:\n\n"; for(int i=1;i<rand()%8+5;i++){ short x=rand()%21+1,y=rand()%4+5; while(a[x][y]||!starnum[x]||(x==19&&y<8))x=rand()%20+1,y=rand()%4+5; a[x][y]=1; cout<<hb[x][y].name; if(hb[x][y].sxmana)cout<<"\n魔力消耗:"<<hb[x][y].sxmana; if(hb[x][y].lqtime)cout<<"\n冷却时间:"<<hb[x][y].lqtime<<"秒"; if(hb[x][y].sh)cout<<"\n伤害:"<<hb[x][y].sh; if(hb[x][y].stsh)cout<<"\n身体伤害:+"<<hb[x][y].stsh; if(hb[x][y].nj)cout<<"\n耐久:"<<hb[x][y].nj; if(hb[x][y].zl)cout<<"\n治疗:"<<hb[x][y].zl; if(hb[x][y].maxhp)cout<<"\n花朵最大生命值:"<<hb[x][y].maxhp; if(hb[x][y].zwsh)cout<<"\n自我伤害:"<<hb[x][y].zwsh; if(hb[x][y].maxmana)cout<<"\n基础魔力上限:"<<hb[x][y].maxmana; if(hb[x][y].mana)cout<<"\n魔力:"<<hb[x][y].mana; if(x==18)cout<<"\n耐久上限:"<<hb[x][y].nj; if(hb[x][y].xj)cout<<"\n死亡后,召唤1只生物(超级)"; cout<<"\n所需星星数:"<<starnum[x]*star[y]<<"\n\n"; } cout<<"挑战:\n\n"; for(int i=1;i<5;i++){ short x=rand()%13+1,y=rand()%5+5; while(x==2||x==3||x==10||x==11||x==12||tz[x][y])x=rand()%12+1,y=rand()%5+5; cout<<dl[x][y].name<<"\n经验:"<<dl[x][y].exp<<"\n生命值:"<<dl[x][y].hp<<"\n伤害:"<<dl[x][y].sh<<"\n护甲:"<<dl[x][y].hj<<"\n星星数:"<<dlstar[y]<<"\n\n"; tz[x][y]=1; } cout<<"\n你要购买什么花瓣?或按0键退出\n"; string name; re:; cin>>name; if(name=="0")return; for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].name==name){ if(fl.star<starnum[i]*star[j]){ cout<<"星星不够!\n"; goto re; }if(!a[i][j]){ cout<<"不能购买!\n"; goto re; }else{ fl.star-=starnum[i]*star[j]; hb[i][j].sum++; } cout<<"你获得了1个"<<hb[i][j].name; goto r; } } } cout<<"没有这个花瓣!\n"; goto re; r:; Sleep(500); goto pp; } void hcjm(){ short s; string name; srand(time(0)); pp:; system("cls"); system("color 2f"); cout<<setw(65)<<"flower合成界面\n"; _(); print(); cout<<"需要至少5个花瓣合成,合成罕见、稀有、史诗、传奇、神话、究极、超级的概率是64%、32%、16%、8%、4%、2%、1%\n你要用什么花瓣合成?或按0键退出\n"; re:; cin>>name; if(name=="0")return; short dd=0,sq=0; for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].name==name){ if(hb[i][j].sum<5){ cout<<"花瓣不够!\n"; goto re; }if(j>7||(i<2&&j<2)){ cout<<"不能合成!\n"; goto re; }else{ while(hb[i][j].sum>=5){ short x=rand()%200+1; if(x<=pow(2,8-j)){ hb[i][j].sum-=5; hb[i][j+1].sum++; dd++; }else{ s=rand()%4+1; hb[i][j].sum-=s; sq+=s; } } } cout<<"你合成了"<<dd<<"个"<<hb[i][j+1].name<<",损失了"<<sq<<"个"<<hb[i][j].name; goto r; } } } cout<<"没有这个花瓣!\n"; goto re; r:; Sleep(500); goto pp; } void ballgame(){ string name; srand(time(0)); pp:; system("cls"); system("color 2f"); cout<<setw(65)<<"flower弹珠游戏\n"; _(); print(); cout<<"需要至少1个非唯一花瓣游玩,有概率获得1、2、3、5、20、500个花瓣\n你要用什么花瓣进行弹珠游戏?或按0键退出\n"; re:; cin>>name; if(name=="0")return; short dd=0,sq=0; for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].name==name){ if(hb[i][j].sum<1){ cout<<"花瓣不够!\n"; goto re; }if(j>8){ cout<<"不能游玩!\n"; goto re; }else{ for(short i1=1;i1<=hb[i][j].sum;i1++){ hb[i][j].sum--; int x=rand()%10000+1; if(x<2201){ sq++; dl[3][1].hp+=hb[i][j].nj; dl[3][1].sh+=hb[i][j].sh; }if(x>2200&&x<9001){ dd++; }if(x>9000&&x<9801){ dd+=2; }if(x>9800&&x<9901){ dd+=3; }if(x>9900&&x<9991){ dd+=5; }if(x>9990&&x<10000){ dd+=20; }if(x>9999){ dd+=500; } } hb[i][j].sum+=dd; } cout<<"你获得了"<<dd<<"个"<<hb[i][j].name<<",损失了"<<sq<<"个"<<hb[i][j].name; goto r; } } } cout<<"没有这个花瓣!\n"; goto re; r:; Sleep(500); goto pp; } void gamebegin(){ string a,name; tt:; system("cls"); system("color 2f"); cout<<setw(65)<<"flower游戏界面\n"; _(); print(); if(!p){ cout<<"你有10个槽位,你要装备哪些花瓣?按0键结束配装\n"; for(short k=0;k<11;k++){ ss:; cin>>name; if(name=="0")break; for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].name==name){ if(hb[i][j].sum<1){ cout<<"花瓣不够!\n"; goto ss; }else{ if(k<10){ hb[i][j].sum--; cw[++k]=hb[i][j]; system("cls"); system("color 2f"); cout<<setw(65)<<"flower游戏界面\n"; _(); print(); for(int i=1;i<11;i++){ if(cw[i].name!="")printcw(i); } cout<<"你有10个槽位,你要装备哪些花瓣?按0键结束配装\n"; }else{ p=1; goto aa; } goto ss; } } } } cout<<"没有这个花瓣!\n"; Sleep(5000); goto tt; } p=1; } aa:; system("cls"); system("color 2f"); cout<<setw(65)<<"flower游戏界面\n"; _(); print(); for(short i=1;i<11;i++){ if(cw[i].name!="")printcw(i); } cout<<"请选择:\n 1.保存配装\n 2.取消配装\n"; cin>>a; while(a!="1"&&a!="2"){ cout<<"请重新输入!\n"; cin>>a; } if(a=="1")return; p=0; for(short i1=1;i1<11;i1++){ for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].name==cw[i1].name){ hb[i][j].sum++; } } } cw[i1]=cccw; } goto tt; } void game(){ string a; for(short i=1;i<11;i++)cw[i].gamenj=cw[i].nj; system("cls"); system("color 2f"); cout<<setw(65)<<"flower游戏界面\n"; _(); cout<<"请选择:\n 1.开始游戏\n 2.退出游戏\n"; cin>>a; while(a!="1"&&a!="2"){ cout<<"请重新输入!\n"; cin>>a; } if(a=="2")return; else{ fl.maxmana=fl.mark=fl.gamemaxhp=0; for(short i=1;i<11;i++){ fl.gamemaxhp=max(fl.gamemaxhp,(float)cw[i].maxhp); fl.maxmana=max(fl.maxmana,cw[i].maxmana); fl.gamestsh=max(fl.gamestsh,fl.stsh+cw[i].stsh); } fl.gamemaxhp=max(fl.hp,fl.gamemaxhp); fl.gamehp=fl.gamemaxhp; aa:; short a=rand()%3+1; fl.gamemaxhp=0; fl.gamemaxhp=max(fl.hp,fl.gamemaxhp); for(short i=1;i<11;i++){ fl.gamemaxhp=max(fl.gamemaxhp,(float)cw[i].maxhp); fl.maxmana=max(fl.maxmana,cw[i].maxmana); fl.gamestsh=max(fl.gamestsh,fl.stsh+cw[i].stsh); } system("cls"); system("color 2f"); cout<<setw(65)<<"flower游戏界面\n"; _(); srand(time(0)); if(a==2){ short x1,y1; if(fl.lv<2)x1=rand()%4+2,y1=1; if(fl.lv>1&&fl.lv<6)x1=rand()%4+2,y1=rand()%3+1; if(fl.lv>5&&fl.lv<21)x1=rand()%9+2,y1=rand()%2+3; if(fl.lv>20)x1=rand()%9+2,y1=rand()%3+3; for(short i=1;i<11;i++){ if(cw[i].name==""&&cw[i].nj<1){ cw[i]=hb[x1][y1]; goto ww; } } hb[x1][y1].sum++; ww:; cout<<"\n你获得了1个"<<hb[x1][y1].name; Sleep(500); goto aa; } short x=rand()%13+1,y; if(fl.lv<2)y=1; if(fl.lv>1&&fl.lv<6){ short x=rand()%10+1; if(x<7)y=1; if(x>6&&x<10)y=2; if(x>9)y=3; }if(fl.lv>5&&fl.lv<11){ short x=rand()%100+1; if(x<41)y=1; if(x>40&&x<71)y=2; if(x>70&&x<93)y=3; if(x>92)y=4; }if(fl.lv>10&&fl.lv<21){ short x=rand()%100+1; if(x<41)y=rand()%2+1; if(x>40&&x<71)y=3; if(x>70&&x<93)y=4; if(x>92)y=5; } if(fl.lv>20&&fl.lv<51){ short x=rand()%100+1; if(x<41)y=rand()%3+1; if(x>40&&x<71)y=4; if(x>70&&x<93)y=5; if(x>92)y=rand()%2+6; } if(fl.lv>50){ short x=rand()%100+1; if(x<41)y=rand()%4+1; if(x>40&&x<71)y=5; if(x>70&&x<93)y=6; if(x>92)y=rand()%3+7; } if(fl.xj){ y=8; while(x==3)x=rand()%12+1; fl.xj=0; } if(x==3)dl[3][y]=dl[3][1]; for(short i=1;i<11;i++){ if(cw[i].xj){ cw[i]=cccw; fl.xj=1; cout<<"你死了\n"; Sleep(1000); short x=0; system("cls"); system("color 2f"); if(fl.mark>30&&fl.mark<100)x=2; if(fl.mark>99&&fl.mark<1000)x=3; if(fl.mark>999&&fl.mark<5000)x=4; if(fl.mark>4999&&fl.mark<200000)x=5; if(fl.mark>199999)x=6; hb[1][x].sum++; cout<<"游戏结束!"; if(x)cout<<"你获得了1个"<<hb[1][x].name; Sleep(250); return; } } dl[x][y].gamehp=dl[x][y].hp; printdl(x,y); printme(); for(short i=1;i<11;i++){ if(cw[i].name>"")printcw(i); } if(dl[x][y].gg<3){ cout<<"请选择:\n 1.开始攻击\n 2.取消攻击\n 3.退出界面\n"; int lq[11]; string a; cin>>a; while(a!="1"&&a!="2"&&a!="3"){ cout<<"请重新输入!\n"; cin>>a; } if(a=="2")goto aa; if(a=="3"){ aaa:; short x=0; system("cls"); system("color 2f"); if(fl.mark>30&&fl.mark<100)x=2; if(fl.mark>99&&fl.mark<1000)x=3; if(fl.mark>999&&fl.mark<5000)x=4; if(fl.mark>4999&&fl.mark<200000)x=5; if(fl.mark>199999)x=6; hb[1][x].sum++; cout<<"游戏结束!"; if(x)cout<<"你获得了1个"<<hb[1][x].name; Sleep(rand()%3000+1234); return; } while(dl[x][y].gamehp>0){ dd:; for(short i=1;i<11;i++){ if(cw[i].nj&&cw[i].name==""&&time(0)-lq[i]>=cw[i].lqtime){ if(cw[i].sxmana&&fl.mana>=cw[i].sxmana){ fl.mana-=cw[i].sxmana; cout<<"你消耗了"<<cw[i].sxmana<<"点魔力\n"; Sleep(500); goto out; }if(cw[i].sxmana&&fl.mana<cw[i].sxmana)continue; out:; cw[i]=ccw[i]; ccw[i]=cccw; cw[i].gamenj=cw[i].nj; for(short j=1;j<11;j++){ if(cw[j].maxnj)cw[i].gamenj=max(cw[i].gamenj,cw[j].nj); } if(cw[i].zwsh){ fl.gamehp-=cw[i].zwsh; cout<<"你受到了"<<cw[i].zwsh<<"点伤害\n"; Sleep(500); short s=0; for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].zl){ if(fl.gamehp+cw[i].zl>fl.gamemaxhp){ s+=fl.gamemaxhp-fl.gamehp; fl.gamehp=fl.gamemaxhp; }else{ fl.gamehp+=cw[i].zl; s+=cw[i].zl; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你回复了"<<s<<"点体力\n"; Sleep(500); if(fl.gamehp<=0){ cout<<"你死了\n"; Sleep(1000); for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].live){ fl.gamehp=fl.gamemaxhp*2/10; cout<<"你使用了"<<cw[i].name<<",将血量回复至20%\n"; cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); Sleep(500); goto bbb; } } goto aaa; } } if(fl.mana<fl.maxmana){ short s=0; for(int i=1;i<11;i++){ if(cw[i].name>""&&cw[i].mana){ if(fl.mana+cw[i].mana>fl.maxmana){ s+=fl.maxmana-fl.mana; fl.mana=fl.maxmana; }else{ s+=cw[i].mana; fl.mana+=cw[i].mana; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你增加了"<<s<<"点魔力\n"; Sleep(500); } } } int s; system("cls"); system("color 2f"); cout<<setw(65)<<"flower游戏界面\n"; _(); printdl(x,y); printme(); for(short i=1;i<11;i++){ if(cw[i].name>"")printcw(i); } cout<<"你要使用第几个槽位的花瓣攻击?按0取消,按11进行碰撞\n"; cin>>a; if(a=="0")goto dd; if(a=="11")goto eee; while((a!="1"&&a!="2"&&a!="3"&&a!="4"&&a!="5"&&a!="6"&&a!="7"&&a!="8"&&a!="9"&&a!="10")||(a!="10"&&cw[a[0]-'0'].name==""||(a=="10"&&cw[10].name==""))){ cout<<"请重新输入!\n"; cin>>a; if(a=="0")goto dd; if(a=="11")goto eee; } if(a!="10"&&a!="11"){ if(cw[a[0]-'0'].sh>dl[x][y].hj)s=cw[a[0]-'0'].sh-dl[x][y].hj; else s=0; dl[x][y].gamehp-=s; cw[a[0]-'0'].gamenj-=dl[x][y].sh; if(cw[a[0]-'0'].gamenj<=0){ ccw[a[0]-'0']=cw[a[0]-'0']; cw[a[0]-'0'].name=""; lq[a[0]-'0']=time(0); if(cw[a[0]-'0'].lq){ for(short i=1;i<11;i++){ if(cw[i].name>""){ cw[i].name=""; lq[i]=time(0); cw[i].gamenj=0; } } } } cout<<dl[x][y].name<<"受到了"<<s<<"点伤害\n"; Sleep(500); s=0; if(fl.gamehp<fl.gamemaxhp){ for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].zl){ if(fl.gamehp+cw[i].zl>fl.gamemaxhp){ s+=fl.gamemaxhp-fl.gamehp; fl.gamehp=fl.gamemaxhp; }else{ fl.gamehp+=cw[i].zl; s+=cw[i].zl; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你回复了"<<s<<"点体力\n"; Sleep(500); if(fl.gamehp<=0){ cout<<"你死了\n"; Sleep(1000); for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].live){ fl.gamehp=fl.gamemaxhp*2/10; cout<<"你使用了"<<cw[i].name<<",将血量回复至20%\n"; cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); Sleep(500); goto bbb; } } goto aaa; } } if(fl.mana<fl.maxmana){ short s=0; for(int i=1;i<11;i++){ if(cw[i].name>""&&cw[i].mana){ if(fl.mana+cw[i].mana>fl.maxmana){ s+=fl.maxmana-fl.mana; fl.mana=fl.maxmana; }else{ s+=cw[i].mana; fl.mana+=cw[i].mana; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你增加了"<<s<<"点魔力\n"; Sleep(500); } }if(a=="10"){ if(cw[10].sh>dl[x][y].hj)s=cw[10].sh-dl[x][y].hj; else s=0; cw[10].gamenj-=dl[x][y].sh; if(cw[10].gamenj<=0&&cw[10].nj){ ccw[10]=cw[10]; cw[10].name=""; lq[10]=time(0); if(cw[10].lq){ for(short i=1;i<11;i++){ if(cw[i].name>""){ cw[i].name=""; lq[i]=time(0); cw[i].gamenj=0; } } } } cout<<dl[x][y].name<<"受到了"<<s<<"点伤害\n"; dl[x][y].gamehp-=s; Sleep(500); s=0; if(fl.gamehp<fl.gamemaxhp){ for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].zl){ if(fl.gamehp+cw[i].zl>fl.gamemaxhp){ s+=fl.gamemaxhp-fl.gamehp; fl.gamehp=fl.gamemaxhp; }else{ fl.gamehp+=cw[i].zl; s+=cw[i].zl; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你回复了"<<s<<"点体力\n"; Sleep(500); if(fl.gamehp<=0){ cout<<"你死了"; Sleep(1000); for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].live){ fl.gamehp=fl.gamemaxhp*2/10; cout<<"你使用了"<<cw[i].name<<",将血量回复至20%\n"; cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); Sleep(500); goto bbb; } } goto aaa; } } if(fl.mana<fl.maxmana){ short s=0; for(int i=1;i<11;i++){ if(cw[i].name>""&&cw[i].mana){ if(fl.mana+cw[i].mana>fl.maxmana){ s+=fl.maxmana-fl.mana; fl.mana=fl.maxmana; }else{ s+=cw[i].mana; fl.mana+=cw[i].mana; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你增加了"<<s<<"点魔力\n"; Sleep(500); } }if(a=="11"){ eee:; fl.gamehp-=dl[x][y].sh; int a=dl[x][y].sh,b; if(dl[x][y].hj<fl.gamestsh)b=fl.gamestsh-dl[x][y].hj; else b=0; cout<<"你受到"<<a<<"点伤害,"<<dl[x][y].name<<"受到"<<b<<"点伤害\n"; dl[x][y].gamehp-=b; Sleep(500); short s=0; for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].zl){ if(fl.gamehp+cw[i].zl>fl.gamemaxhp){ s+=fl.gamemaxhp-fl.gamehp; fl.gamehp=fl.gamemaxhp; }else{ fl.gamehp+=cw[i].zl; s+=cw[i].zl; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你回复了"<<s<<"点体力\n"; Sleep(500); if(fl.gamehp<=0){ cout<<"你死了\n"; Sleep(1000); for(short i=1;i<11;i++){ if(cw[i].name>""&&cw[i].live){ fl.gamehp=fl.gamemaxhp*2/10; cout<<"你使用了"<<cw[i].name<<",将血量回复至20%\n"; cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); Sleep(500); goto bbb; } } goto aaa; } if(fl.mana<fl.maxmana){ short s=0; for(int i=1;i<11;i++){ if(cw[i].name>""&&cw[i].mana){ if(fl.mana+cw[i].mana>fl.maxmana){ s+=fl.maxmana-fl.mana; fl.mana=fl.maxmana; }else{ s+=cw[i].mana; fl.mana+=cw[i].mana; } cw[i].gamenj=0; ccw[i]=cw[i]; cw[i].name=""; lq[i]=time(0); } } cout<<"你增加了"<<s<<"点魔力\n"; Sleep(500); } } bbb:; } cout<<"你击败了"<<dl[x][y].name; short y1=0,x1=0,x2=0,y2=0,x3=0,y3=0; if(x==1){ x1=4; x2=6; x3=5; if(y==1){ short x=rand()%2+1; if(x<2)y1=1; else y1=2; y3=1; }if(y==2){ short x=rand()%10+1; if(x<3)y1=1; else y1=2; y3=1; }if(y==3){ short x=rand()%10+1; if(x<7)y1=2; else y1=3; if(x>3)y2=3; if(x<7)y3=2; else y3=3; }if(y==4){ short x=rand()%10+1; if(x<8)y1=3; else y1=4; if(x<9)y2=3; else y2=4; y3=3; }if(y==5){ short x=rand()%100+1; if(x<11)y1=3; if(x>10&&x<95)y1=4; if(x>94)y1=5; if(x<6)y2=3; if(x>5&&x<90)y2=4; if(x>89)y2=5; if(x<4)y3=3; if(x>3&&x<93)y3=4; if(x>92)y3=5; }if(y==6){ short x=rand()%100+1; if(x<41)y1=4; if(x>=41&&x<98)y1=5; if(x>97)y1=6; if(x<50)y2=4; if(x>49&&x<97)y2=5; if(x>96)y2=6; if(x<6)y3=4; if(x>5&&x<99)y3=5; if(x>98)y3=6; }if(y==7){ short x=rand()%100+1; if(x<92)y1=5; else y1=6; if(x<54)y2=5; else y2=6; if(x<7)y3=5; else y3=6; }if(y==8){ short x=rand()%100+1; if(x<86)y1=6; else y1=7; if(x<76)y2=6; else y2=7; if(x<70)y3=6; else y3=7; }if(y==9){ short x=rand()%100+1; if(x<55)y1=6; else y1=7; if(x<51)y2=6; else y2=7; if(x<49)y3=6; else y3=7; } }if(x==3){ x1=12; y1=rand()%4+1; }if(x==4){ x1=2; x2=8; if(fl.maxmana)x1=x2=14; if(y==1)y1=y2=1; if(y==2){ short x=rand()%10+1; if(x<5)y1=y2=1; else y1=y2=2; }if(y==3){ short x=rand()%10+1; if(x<5)y1=y2=2; else y1=y2=3; }if(y==4){ short x=rand()%10+1; if(x<8)y1=y2=3; else y1=y2=4; }if(y==5){ short x=rand()%100+1; if(x<12)y1=y2=3; if(x>11&&x<93)y1=y2=4; if(x>92)y1=y2=5; }if(y==6){ short x=rand()%100+1; if(x<41)y1=y2=4; if(x>=41&&x<98)y1=y2=5; if(x>97)y1=y2=6; }if(y==7){ short x=rand()%100+1; if(x<90)y1=y2=5; else y1=y2=6; }if(y==8){ short x=rand()%100+1; if(x<89)y1=y2=6; else y1=y2=7; }if(y==9){ short x=rand()%100+1; if(x<57)y1=y2=6; else y1=y2=7; } }if(x==5){ x1=3; x2=9; x3=16; if(fl.maxmana)x3=17; if(y==1){ y1=1; y2=1; }if(y==2){ y1=2; y2=1; y3=2; }if(y==3){ short x=rand()%10+1; if(x<3)y1=2; else y1=3; if(x<5)y2=y3=2; else y2=y3=3; }if(y==4){ short x=rand()%10+1; if(x<7)y1=3; else y1=4; if(x<8)y2=y3=3; else y2=y3=4; }if(y==5){ short x=rand()%100+1; if(x<90)y1=4; else y1=5; if(x<95)y2=y3=4; else y2=y3=5; }if(y==6){ short x=rand()%1000+1; if(x<992)y1=5; else y1=6; if(x<997)y2=y3=5; else y2=y3=6; }if(y==7){ short x=rand()%1000+1; if(x<992)y1=6; else y1=7; if(x<333)y2=y3=5; else y2=y3=6; }if(y==8){ short x=rand()%100+1; if(x<88)y1=6; else y1=7; if(x<92)y2=y3=6; else y2=y3=7; }if(y==9){ short x=rand()%100+1; if(x<43)y1=6; else y1=7; if(x<44)y2=y3=6; else y2=y3=7; } }if(x==6){ x1=10; if(y<2){ short a=rand()%10+1; if(a<5)y1=1; }if(y>1&&y<8)y1=y-1; if(y>7)y1=y-2; }if(x==7){ x1=3; x2=13; x3=15; if(y==1)y1=1; if(y==2)y1=2; if(y==3){ short x=rand()%10+1; if(x<3)y1=2; else y1=3; if(x<4)y2=1; if(x>3&&x<7)y2=2; if(x>6)y2=3; }if(y==4){ short x=rand()%10+1; if(x<7)y1=3; else y1=4; if(x<9)y2=2; else y2=3; }if(y==5){ short x=rand()%100+1; if(x<90)y1=4; else y1=5; if(x<98)y2=4; else y2=5; if(x<5)y3=1; }if(y==6){ short x=rand()%1000+1; if(x<992)y1=5; else y1=6; if(x<997)y2=5; else y2=6; if(x<20)y3=1; if(x>19&&x<25)y3=2; }if(y==7){ short x=rand()%1000+1; if(x<992)y1=6; else y1=7; if(x<666)y2=5; else y2=6; if(x<100)y3=1; if(x>99&&x<666)y3=2; if(x>665&&x<777)y3=3; }if(y==8){ short x=rand()%100+1; if(x<88)y1=6; else y1=7; if(x<97)y2=6; else y2=7; if(x<23)y3=2; if(x>22&&x<95)y3=3; if(x>94)y3=4; }if(y==9){ short x=rand()%100+1; if(x<43)y1=6; else y1=7; if(x<89)y2=6; else y2=7; if(x<92)y3=3; else y3=4; } }if(x==8){ x1=7; if(y<9)y1=y; else y1=8; }if(x==9){ x1=3; x2=5; if(y==1)y1=1; if(y==2)y2=2; if(y==3){ short x=rand()%10+1; if(x<3)y1=3; if(x<4)y2=3; }if(y==4){ short x=rand()%10+1; if(x<7)y1=3; else y1=4; if(x<9)y2=2; else y2=3; }if(y==5){ short x=rand()%100+1; if(x<90)y1=4; else y1=5; if(x<98)y2=4; else y2=5; }if(y==6){ short x=rand()%1000+1; if(x<666)y1=5; else y1=6; if(x<622)y2=5; else y2=6; }if(y==7){ short x=rand()%1000+1; if(x<666)y1=6; else y1=7; if(x<677)y2=5; else y2=6; }if(y==8){ short x=rand()%100+1; if(x<66)y1=6; else y1=7; if(x<67)y2=6; else y2=7; }if(y==9){ short x=rand()%100+1; if(x<21)y1=6; else y1=7; if(x<32)y2=6; else y2=7; } }if(x==13){ x1=21; x2=20; x3=18; if(y<4){ short x=rand()%10+1; y1=1; if(x<3)y2=1; }if(y>3&&y<8){ short x=rand()%10+1; y1=4; if(x<3)y2=4; else y2=1; if(x<5)y3=2; else y3=1; }if(y>7){ short x=rand()%100+1; if(x<20)y2=7; else y2=4; if(x<2)y2=7; else y2=4; if(x<96)y3=5; else y3=1; } } if(x1>0&&y1>0){ for(short i=1;i<11;i++){ if(cw[i].name==""&&cw[i].nj<1){ cw[i]=hb[x1][y1]; goto w; } } hb[x1][y1].sum++; w:; cout<<"\n你获得了1个"<<hb[x1][y1].name; } if(x2>0&&y2>0){ for(short i=1;i<11;i++){ if(cw[i].name==""&&cw[i].nj<1){ cw[i]=hb[x2][y2]; goto w2; } } hb[x2][y2].sum++; w2:; cout<<"\n你获得了1个"<<hb[x2][y2].name; } if(x3>0&&y3>0){ for(short i=1;i<11;i++){ if(cw[i].name==""&&cw[i].nj<1){ cw[i]=hb[x3][y3]; goto w3; } } hb[x3][y3].sum++; w3:; cout<<"\n你获得了1个"<<hb[x3][y3].name; } if(tz[x][y]){ cout<<"\n你获得了"<<dlstar[y]<<"个星星"; fl.star+=dlstar[y]; } Sleep(1000); fl.exp+=dl[x][y].exp; fl.mark+=dl[x][y].exp/2; flush(); goto aa; }if(dl[x][y].gg==5){ Sleep(2000); system("cls"); system("color 2f"); if(x==2){ string name; cout<<setw(65)<<"flower兑换界面\n"; _(); print(); cout<<"你可以用1个非唯一花瓣兑换金币\n你要用什么花瓣兑换?或按0键退出\n"; re:; cin>>name; if(name=="0")goto aa;; for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].name==name){ if(hb[i][j].sum<1){ cout<<"花瓣不够!\n"; goto re; }if(j>8||i<2){ cout<<"不能兑换!\n"; goto re; }else{ hb[i][j].sum--; hb[12][j].sum++; } cout<<"你获得了1个"<<hb[12][j].name; goto aaaa; } } } cout<<"没有这个花瓣!\n"; goto re; }if(x==10){ string name; cout<<setw(65)<<"flower锻造界面\n"; _(); print(); cout<<"你可以用"<<sum<<"个超级花瓣锻造唯一花瓣\n你要用什么花瓣锻造?或按0键退出\n"; rrr:; cin>>name; if(name=="0")goto aa; for(int i=1;i<41;i++){ if(name==hb[i][8].name){ if(hb[i][8].sum<sum){ cout<<"花瓣不够!\n"; goto rrr; }else{ if(hb[i][9].sum||i==19){ cout<<"不能锻造!\n"; goto rrr; } hb[i][8].sum-=sum; hb[i][9].sum=1; cout<<"你锻造了1个"<<hb[i][9].name; sum++; goto aaaa; } } } cout<<"不能锻造!\n"; goto rrr; }if(x==11){ string a; srand(time(0)); cout<<setw(65)<<"flower重组界面\n"; _(); print(); short x=rand()%8+1; cout<<"请选择:\n 1.使用10000个"<<hb[16][x].name<<"重组1个"<<hb[15][x].name<<"\n 2.使用1000个"<<hb[12][x].name<<"重组1个"<<hb[18][x].name<<"\n 3.使用2个"<<hb[8][x].name<<"重组1个"<<hb[2][x].name<<"\n 4.使用1个"<<hb[6][x].name<<"重组1个"<<hb[4][x].name<<"和1个"<<hb[5][x].name<<"\n 5.使用100个"<<hb[7][x].name<<"重组1个"<<hb[3][x].name<<"\n 6.退出界面\n"; abc:; cin>>a; while(a!="1"&&a!="2"&&a!="3"&&a!="4"&&a!="5"&&a!="6"){ cout<<"请重新输入!\n"; cin>>a; } if(a=="6")goto aa; if(a=="1"){ if(hb[16][x].sum<10000){ cout<<"花瓣不够!\n"; goto abc; }else{ hb[16][x].sum-=10000; hb[15][x].sum++; cout<<"你重组了1个"<<hb[15][x].name; } }if(a=="2"){ if(hb[12][x].sum<1000){ cout<<"花瓣不够!\n"; goto abc; }else{ hb[12][x].sum-=1000; hb[18][x].sum++; cout<<"你重组了1个"<<hb[2][x].name; } }if(a=="3"){ if(hb[8][x].sum<2){ cout<<"花瓣不够!\n"; goto abc; }else{ hb[8][x].sum-=2; hb[2][x].sum++; cout<<"你重组了1个"<<hb[2][x].name; } }if(a=="4"){ if(hb[6][x].sum<1){ cout<<"花瓣不够!\n"; goto abc; }else{ hb[6][x].sum--; hb[4][x].sum++; hb[5][x].sum++; cout<<"你重组了1个"<<hb[4][x].name<<"和1个"<<hb[5][x].name; } }if(a=="5"){ if(hb[7][x].sum<100){ cout<<"花瓣不够!\n"; goto abc; }else{ hb[7][x].sum-=100; hb[3][x].sum++; cout<<"你重组了1个"<<hb[3][x].name; } goto aaaa; } }if(x==12){ string a; cout<<setw(65)<<"flower盲盒界面\n"; _(); print(); srand(time(0)); if(y<9)cout<<"请选择:\n 1.使用5个"<<hb[12][y].name<<"购买1个盲盒\n 2.退出界面\n"; else cout<<"请选择:\n 1.使用2个"<<hb[12][8].name<<"购买1个盲盒\n 2.退出界面\n"; q:; cin>>a; while(a!="1"&&a!="2"){ cout<<"请重新输入!\n"; cin>>a; } if(a=="2")goto aa; else{ if((y<9&&hb[12][y].sum<5)||(y>8&&hb[12][8].sum<2)){ cout<<"花瓣不够!\n"; goto q; }else{ if(y<9)hb[12][y].sum-=5; else hb[12][8].sum-=2; short r; if(rand()%3+1<2)r=rand()%4+2; else r=rand()%8+7; hb[r][(y<9)?y:8].sum++; cout<<"你抽到了1个"<<hb[r][(y<9)?y:8].name; } goto aaaa; } } aaaa:; Sleep(500); fl.exp++; goto aa; } } } string zjm(){ system("cls"); system("color 2f"); cout<<setw(64)<<"flower主页\n"; _(); cout<<"请选择:\n 1.开始游戏\n 2.合成花瓣\n 3.弹珠游戏\n 4.查询商店\n 5.退出游戏\n"; cin>>xz; while(xz!="1"&&xz!="2"&&xz!="3"&&xz!="4"&&xz!="5"){ cout<<"请重新输入!\n"; cin>>xz; } return xz; } void guocheng(){ pp:; if(zjm()=="5")return; else{ if(xz=="2"){ hcjm(); goto pp; }if(xz=="1"){ gamebegin(); game(); goto pp; }if(xz=="3"){ ballgame(); goto pp; }if(xz=="4"){ shop(); goto pp; } } } int main(){ ifstream fin; ofstream fout; fin.open("flower.txt"); fin>>fl.ID>>fl.lv>>fl.sxexp>>fl.exp>>fl.hp>>fl.stsh>>fl.star>>sum; for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ fin>>hb[i][j].sum; } } shezhidl(); shezhi(); fin>>dl[3][1].hp>>dl[3][1].sh; if(!dl[3][1].hp)dl[3][1].hp=dl[3][1].sh=1; fin.close(); if(fl.lv<1)ID(); guocheng(); for(short i1=1;i1<11;i1++){ for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ if(hb[i][j].name==cw[i1].name){ hb[i][j].sum++; } } } cw[i1]=cccw; } fout.open("flower.txt"); fout<<fl.ID<<'\n'<<fl.lv<<'\n'<<fl.sxexp<<'\n'<<fl.exp<<'\n'<<fl.hp<<'\n'<<fl.stsh<<'\n'<<fl.star<<'\n'<<sum; for(short i=1;i<41;i++){ for(short j=1;j<10;j++){ fout<<'\n'<<hb[i][j].sum; } } fout<<'\n'<<dl[3][1].hp<<'\n'<<dl[3][1].sh; fout.close(); }// 万能转十进制通式
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,sum=0,pw=1; cin>>a>>b; // a--数 b---进制 在3进制里面 (22101)3 转化进制 while(a!=0){ sum=sum+a%10*pw; // 取末尾 乘以位权 再相加 a/=10; // 去末尾 pw*=b; } cout<<sum;}
2024tysc0092 -
最近活动
- 铁外信息学BC班限时比赛20251126 IOI(严格)
- 20251120铁外信息学BC班位运算练习 作业
- 2025.11.18-铁外信息学BC班限时比赛 IOI
- 铁外信息学BC班进制转化作业20251111 作业
- 铁外信息学BC班函数作业20251104 作业
- 铁外信息学B班字符串20251021 作业
- 20250814铁外信息学夏令营测试2 IOI
- 20250811铁外信息学夏令营测试1 IOI
- 第六届oiclass信息学夏令营Class9-一维数组的定义和基础应用 作业
- 20250808铁外夏令营作业-循环结构3 作业
- 第六届oiclass信息学夏令营Class5-循环结构-for语句基础 作业
- 第六届oiclass信息学夏令营Class3作业-if语句 作业
- 第六届oiclass信息学夏令营Class2作业-表达式 作业
-
Stat
-
Rating