--- Seeker-8.6.cpp 2024-01-30 11:51:48.932992500 +0900 +++ normal-seeker.cpp 2024-01-30 21:27:10.412269700 +0900 @@ -1,70 +1,75 @@ #include #include #include //I need some global variables for making this work using namespace std; //this isn't a variable but it gets the code shorter typedef unsigned int seet_t; -int numberRare = 0, numberSuperRare = 0, numberUber = 0, numberLegend = 0, superRareChance = 0, uberRareChance = 0, legendaryRareChance = 0; -vector testGetInt; +//int numberRare = 18; + // 0:ネコ + // 1:タンクネコ + // 2:バトルネコ + // 3:キモネコ + // 4:ウシネコ + // 5:ネコノトリ + // 6:ネコフィッシュ + // 7:ネコトカゲ + // 8:巨神ネコ + // 9:にゃんこ砲攻撃力 + // 10:にゃんこ砲チャージ + // 11:働きネコ仕事効率 + // 12:働きネコお財布 + // 13:お城体力 + // 14:研究力 + // 15:会計力 + // 16:勉強力 + // 17:統率力 +int numberRare = 19; + // 0:ネコ + // 1:タンクネコ + // 2:バトルネコ + // 3:キモネコ + // 4:ウシネコ + // 5:ネコノトリ + // 6:ネコフィッシュ + // 7:ネコトカゲ + // 8:巨神ネコ + // 9:ネコ超人 + // 10:にゃんこ砲攻撃力 + // 11:にゃんこ砲チャージ + // 12:働きネコ仕事効率 + // 13:働きネコお財布 + // 14:お城体力 + // 15:研究力 + // 16:会計力 + // 17:勉強力 + // 18:統率力 + vector> catList = {}; pair seedIter(pair start) { //.first=seed .second=modulo auto seed = start.first, modulo = start.second; //that's where the seed evolves seed ^= seed << 13; seed ^= seed >> 17; seed ^= seed << 15; pair returnedPair(seed, seed % modulo); return returnedPair; } -int rem2(int r, int y) { - y = abs(y); - if (r == 3) { - return y % numberLegend; - } - else if (r == 2) { - return y % numberUber; - } - else if (r == 1) { - return y % numberSuperRare; - } - else { - return y % numberRare; - } -} - int getSlot(int rarity) { //we technically need the number of legends, but it's always 1 - if (rarity == 0) - return numberRare; - else if (rarity == 1) - return numberSuperRare; - else if (rarity == 2) - return numberUber; - else return numberLegend; + // change slot # for normal gacha/normal gacha+ + return numberRare; } int rem1(int x) { //turns score into rarity - x = abs(x); - x = x % 10000; - if (x >= legendaryRareChance) { - return 3; - } - else if (x >= uberRareChance) { - return 2; - } - else if (x >= superRareChance) { - return 1; - } - else { - return 0; - } + // disable rarity check for normal gacha/normal gacha+ + return 0; } pair calculateSeedThread(seet_t begin, seet_t end) { pair unit; int rarity; for (seet_t i = begin; i < end; i++) { unit.first = i; seet_t j = 0; auto currentCouple = unit; while (j < catList.size() + 1) { @@ -95,34 +100,27 @@ return pair(i, currentCouple.first); } j++; } } return pair(0,0); } int main(int argc, char** argv) { - if (argc % 2 == 1 || argc < 9) //can't be correct if this is true - return -1; - numberRare = atoi(argv[6]); - numberSuperRare = atoi(argv[7]); - numberUber = atoi(argv[8]); - numberLegend = atoi(argv[9]); - legendaryRareChance = 10000 - atoi(argv[5]); - uberRareChance = legendaryRareChance - atoi(argv[4]); - superRareChance = uberRareChance - atoi(argv[3]); - auto numberOfPull = (argc - 9) / 2; + // argv[1]- : just input charactor numbers + // no error check :-p + auto numberOfPull = argc - 1; for (seet_t i = 0; i < numberOfPull; i++) { //getting the rolls, supports holes vectortemp; - temp.push_back(atoi(argv[10 + 2 * i])-2); //rarity - temp.push_back(atoi(argv[11 + 2 * i])); //slotcode + temp.push_back(0); //rarity should be 0 for normal gacha/normal gacha+ + temp.push_back(atoi(argv[1 + i])); //slotcode catList.push_back(temp); } auto result = calculateSeedThread(1, UINT32_MAX-2); if (result.first != 0) cout << result.first << endl << result.second << endl; return 0; }