Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Weapon_Gacha
- {
- class Program
- {
- static public int weaponBanner()
- {
- //not rate up
- int notRate = 0;
- //wrong rate up
- int wrongWeap = 0;
- //right weapon- end loop when we get it
- int rightWeap = 0;
- //out epimitmized path progress; set epiPath >3 to simulate it not existing.
- int epiPath = 0;
- //total five star weapons obtained
- int fiveStars = 0;
- //starting with pity?
- bool pity = true;
- var rand = new Random();
- while (rightWeap == 0)
- {
- if (epiPath != 2 && pity == false && rand.NextDouble() > .75)
- {
- pity = true;
- notRate += 1;
- epiPath += 1;
- fiveStars += 1;
- }
- else
- {
- if (epiPath != 2 && rand.NextDouble() > .5)
- {
- wrongWeap += 1;
- epiPath += 1;
- pity = false;
- fiveStars += 1;
- }
- else
- {
- rightWeap += 1;
- epiPath = 0;
- pity = false;
- fiveStars += 1;
- }
- }
- }
- return fiveStars;
- }
- static void Main(string[] args)
- {
- int i = 0;
- int received = 0;
- while (i < 10000000)
- {
- received += weaponBanner();
- i++;
- //Console.WriteLine("hello");
- }
- float rate = received / 10000000;
- Console.WriteLine(received + " out of 10,000,000, at a rate of " + (float)received/10000000);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement