Florr.io

· · 个人记录

#include<bits/stdc++.h>
using namespace std;
int your[8][47];
float lv=1;
string level[8]={"Common","Unusual","Rare","Epic","Legendary","Mythic","Ultra","Super"};
string thing[47]={"Air","Antennae","Basil","Bubble","Cactus","Claw","Clover","Corn","Cutter","Dahlia","Dandelion","Egg","Fangs","Faster","Heavy","Honey","Iris","Jelly","Leaf","Lightning","Magnet","Missile","Orange","Pearl","Peas","Pincer","Pollen","Poo","Powder","Rice","Rock","Rose","Salt","Sand","Shell","Soil","Sponge","Square","Starfish","Stringer","Stick","Uranium","Web","Wing","Yggdrasil","YinYang","Yucca"};
void stt(){
    srand(time(NULL));

    cout<<"1.Play(kill Bugs),2.Crafing,3.Bag\nlv."<<lv<<endl;
    int op;
    cin>>op;
    if(op==1){
        system("cls");
        int hp=rand()%30;
        while(hp--){
            //cout<<hp;
            int p=rand();
            p=p-p/lv;
            cout<<p<<' ';
            int q=rand()%47;
//          cout<<hp;
//      cout<<hp;
            if(p<200){
                cout<<level[0]<<"!"<<' '<<thing[q]<<endl;
                your[0][q]++;
                lv+=0.001;
            }
            else if(p<800){
                cout<<level[1]<<"!"<<' '<<thing[q]<<endl;
                your[1][q]++;
                lv+=0.005;
            }
            else if(p<1600){
                cout<<level[2]<<"!"<<' '<<thing[q]<<endl;
                your[2][q]++;
                lv+=0.025;
            }
            else if(p<3000){
                cout<<level[3]<<"!"<<' '<<thing[q]<<endl;
                your[3][q]++;
                lv+=0.05;
            }
            else if(p<5000){
                cout<<level[4]<<"!"<<' '<<thing[q]<<endl;
                your[4][q]++;
                lv+=0.1;
            }
            else if(p<8000){
                cout<<level[5]<<"!"<<' '<<thing[q]<<endl;
                your[5][q]++;
                lv+=0.2;
            }
            else if(p<20000){
                cout<<level[6]<<"!"<<' '<<thing[q]<<endl;
                your[6][q]++;
                lv+=0.5;
            }
            else{
                cout<<level[7]<<"!"<<' '<<thing[q]<<endl;
                your[7][q]++;
                lv+=1;
            }
            _sleep(10);
        }
        lv+=rand()%2;
        system("cls");
        stt();
        return;
    }
    if(op==3){
        for(int i=0;i<=7;i++){
            for(int j=0;j<47;j++){
                cout<<level[i]<<' '<<thing[j]<<':'<<your[i][j]<<endl;
                _sleep(20);
            }
        }
        system("pause");
        system("cls");
        stt();
        return;
    }
    if(op==2){
        for(int i=0;i<7;i++){
            for(int j=0;j<47;j++){
                cout<<j<<" "<<level[i]<<' '<<thing[j]<<':'<<your[i][j]<<endl;
                if(your[i][j]<5){
            cout<<"No!\n";
        }
        else {
            int cnt=your[i][j]/5;
            your[i][j]-=cnt*5;
            int ps;
            if(i==0){
                ps=40;
            }
            else if(i==1){
                ps=30;
            }
            else if(i==2){
                ps=20;
            }
            else if(i==3){
                ps=10;
            }
            else if(i==4){
                ps=5;
            }
            else if(i==5){
                ps=2;
            }
            else ps=1;
            int Sug,No;
            while(cnt--){
                int kkk=rand()%100;
                if(kkk<ps){
                    Sug++;
                }
                else {
                    No+=rand()%4+1;
                }
            }
            your[i][j]+=No;
            your[i+1][j]+=Sug;
            cout<<level[i+1]<<" "<<thing[j]<<'*'<<Sug<<'!';
            cout<<"Last"<<level[i]<<" "<<thing[j]<<'*'<<your[i][j]<<'!';
                system("pause");
            }
        }
            system("pause");
        }
    }
}
int main(){
    cout<<"Florr!\n";
    system("pause");
    stt();
}