修复了以下BUG:
1.抽卡概率过高
2.抽卡意外中断
增添以下功能:
1.增添文字颜色
2.增添统计系统
话不多说,上代码!
#include<bits/stdc++.h>
#include<windows.h>
#include<stdlib.h>
using namespace std;
int main()
{int A,j=0,gzj=0,a1,ssp=0,gasp=0,asp=0,bzk=0,czk=0,bsp=0,csp=0,jj=0,gzjj=0;srand((UINT)GetCurrentTime());SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); cout<<"火影抽卡模拟器启动中……"<<endl;Sleep(2 * 1000); FLAG: cout<<"1.肝日常"<<endl<<"2.购买高招卷"<<endl<<"3.抽卡"<<endl<<"4.抽卡资料"<<endl;cin>>A;if(A==1){FLAG1:A=0; cout<<"1.肝一天"<<endl<<"2.肝一周"<<endl<<"3.肝一月"<<endl<<"4.肝一年"<<endl<<"5.退出日常"<<endl;cin>>A;if(A==1){A=0;cout<<"肝……"<<endl;Sleep(0.5 * 1000);j+=300;cout<<"你获得了300金币"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG1;}else{if(A==2){A=0;cout<<"肝……"<<endl;Sleep(1 * 1000);j+=2000;cout<<"你获得了2000金币"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG1;}else{if(A==3){A=0;cout<<"肝……"<<endl;Sleep(3 * 1000);j+=10000;cout<<"你获得了10000金币"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG1;}else{if(A==4){A=0;cout<<"肝……"<<endl;Sleep(4 * 1000);cout<<"肝……"<<endl;Sleep(4 * 1000);j+=150000;cout<<"你获得了150000金币"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG1;}else{if(A==5){A=0;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG;}else{cout<<"无效……"<<endl;Sleep(0.5 * 1000); goto FLAG1; } } } }}}else{if(A==2){FLAG2:A=0; cout<<"1.买一张"<<endl<<"2.买十张"<<endl<<"3.买五十张"<<endl<<"4.买一百张"<<endl<<"5.退出购买"<<endl;cin>>A;if(A==1){A=0;if(j>=168) {j-=168;jj+=168;gzj+=1;cout<<"你获得了1张高招卷"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2; }else{cout<<"你的金币不足"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2;}}else{if(A==2){A=0;if(j>=1680){j-=1680;jj+=1680;gzj+=10;cout<<"你获得了10张高招卷"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2;}else{cout<<"你的金币不足"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2;} }else{if(A==3){A=0;if(j>=8400){j-=8400;jj+=8400; gzj+=50;cout<<"你获得了50张高招卷"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2; }else{cout<<"你的金币不足"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2;} }else{if(A==4){A=0;if(j>=16800){j-=16800;jj+=16800; gzj+=100;cout<<"你获得了100张高招卷"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2; }else{cout<<"你的金币不足"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG2;}}else{if(A==5){A=0;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG;}else{cout<<"无效……"<<endl;Sleep(0.5 * 1000); goto FLAG2; } } } }} }else{if(A==3){FLAG3:A=0;cout<<"1.抽一次"<<endl<<"2.十连抽"<<endl<<"3.退出招募"<<endl;cin>>A;if(A==1){A=0;if(gzj>=1) {gzj-=1;gzjj+=1;a1=rand()%100+1;if(a1<=7){a1=rand()%100+1;if(a1<=30){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN); cout<<"秽土水门碎片*5"<<endl;ssp+=5;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN); cout<<"秽土水门碎片*1"<<endl;ssp+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }a1=0; }else{if(a1<=16){a1=rand()%100+1;if(a1<=10){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"半蛇兜碎片*4"<<endl;gasp+=4;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"半蛇兜碎片*1"<<endl; gasp+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }a1=0; }else{if(a1<=25){a1=rand()%100+1;if(a1<=20){Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"飞段碎片*4"<<endl; asp+=4;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"飞段碎片*1"<<endl;asp+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }a1=0; }else{if(a1<=100){a1=rand()%100+1;if(a1<=35){a1=rand()%100+1;if(a1<=5){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);cout<<"B忍整卡*1"<<endl;bzk+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{if(a1<=40){Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);cout<<"B忍碎片*2"<<endl;bsp+=2;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);cout<<"B忍碎片*1"<<endl;bsp+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); } }}else{a1=rand()%100+1;if(a1<=10){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout<<"C忍整卡*1"<<endl;czk+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{if(a1<=30){Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);cout<<"C忍碎片*5"<<endl;csp+=5;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{if(a1<=60){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout<<"C忍碎片*2"<<endl;csp+=2;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout<<"C忍碎片*1"<<endl;csp+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); } } } }a1=0; } } } }cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG3; }else{cout<<"你的高招卷不足"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG3;} }else{if(A==2){A=0;if(gzj>=10) {gzj-=10;gzjj+=10;for(int i=0;i<10;i++){a1=rand()%100+1;if(a1<=7){ a1=rand()%100+1;if(a1<=30){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN); cout<<"秽土水门碎片*5"<<endl;ssp+=5;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN); cout<<"秽土水门碎片*1"<<endl;ssp+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }a1=0; }else{if(a1<=16){a1=rand()%100+1;if(a1<=10){Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"半蛇兜碎片*4"<<endl; gasp+=4;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE); }else{Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"半蛇兜碎片*1"<<endl;gasp+=1; SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}a1=0; }else{if(a1<=25){a1=rand()%100+1;if(a1<=20){Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"飞段碎片*4"<<endl;asp+=4; SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}else{Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_BLUE); cout<<"飞段碎片*1"<<endl;asp+=1; SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}a1=0; }else{if(a1<=100){a1=rand()%100+1;if(a1<=35){a1=rand()%100+1;if(a1<=5){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);cout<<"B忍整卡*1"<<endl;bzk+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}else{if(a1<=40){Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);cout<<"B忍碎片*2"<<endl;bsp+=2;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}else{Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_BLUE);cout<<"B忍碎片*1"<<endl;bsp+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);} }}else{a1=rand()%100+1;if(a1<=10){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout<<"C忍整卡*1"<<endl;czk+=1;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}else{if(a1<=30){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout<<"C忍碎片*5"<<endl;csp+=5;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}else{if(a1<=60){Sleep(0.5 * 1000);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN); cout<<"C忍碎片*2"<<endl;csp+=2;SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);}else{Sleep(0.5 * 1000); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN);cout<<"C忍碎片*1"<<endl;csp+=1; SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN | FOREGROUND_BLUE);} } } }a1=0; } } } } }cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG3; }else{cout<<"你的高招卷不足"<<endl;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG3;}}else{if(A==3){A=0;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG;}else{cout<<"无效……"<<endl;Sleep(0.5 * 1000); goto FLAG3; }} } }else{if(A==4){FLAG4:A=0;cout<<"加载中……"<<endl;Sleep(0.5 * 1000); cout<<"你拥有的金币:"<<j<<endl;cout<<"你拥有的高招卷:"<<gzj<<endl;cout<<"你花费的金币:"<<jj<<endl;cout<<"你花费的高招卷:"<<gzjj<<endl;cout<<"你拥有的高招-S忍碎片:"<<ssp<<endl;cout<<"你拥有的高招-A忍碎片:"<<gasp<<endl;cout<<"你拥有的非高招-A忍碎片:"<<asp<<endl;cout<<"你拥有的B忍整卡:"<<bzk<<endl;cout<<"你拥有的C忍整卡:"<<czk<<endl;cout<<"你拥有的B忍碎片:"<<bsp<<endl;cout<<"你拥有的C忍碎片:"<<csp<<endl;cout<<"输入0退出"<<endl;cin>>A;if(A==0) {cout<<"加载中……"<<endl;Sleep(0.5 * 1000); goto FLAG; }else{cout<<"无效……"<<endl;Sleep(0.5 * 1000); goto FLAG4; }}else{cout<<"无效……"<<endl;Sleep(0.5 * 1000); goto FLAG;}} } }
}