$bf is at 1.95 by default, $br > 90 is 4x
This commit is contained in:
		@@ -30,7 +30,7 @@ namespace NadekoBot.Migrations
 | 
			
		||||
                name: "Betroll91Multiplier",
 | 
			
		||||
                table: "BotConfig",
 | 
			
		||||
                nullable: false,
 | 
			
		||||
                defaultValue: 3f);
 | 
			
		||||
                defaultValue: 4f);
 | 
			
		||||
 | 
			
		||||
            migrationBuilder.AddColumn<int>(
 | 
			
		||||
                name: "CurrencyDropAmount",
 | 
			
		||||
 
 | 
			
		||||
@@ -145,6 +145,56 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                await Context.Channel.SendErrorAsync($"{Context.User.Mention} was unable to take {amount} {(amount == 1 ? CurrencyName : CurrencyPluralName)} from `{usrId}` because the user doesn't have that much {CurrencyPluralName}!").ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        [OwnerOnly]
 | 
			
		||||
        public async Task BrTest(int tests = 1000)
 | 
			
		||||
        {
 | 
			
		||||
            var t = Task.Run(async () =>
 | 
			
		||||
            {
 | 
			
		||||
                if (tests <= 0)
 | 
			
		||||
                    return;
 | 
			
		||||
                //multi vs how many times it occured
 | 
			
		||||
                var dict = new Dictionary<int, int>();
 | 
			
		||||
                var generator = new NadekoRandom();
 | 
			
		||||
                for (int i = 0; i < tests; i++)
 | 
			
		||||
                {
 | 
			
		||||
                    var rng = generator.Next(0, 101);
 | 
			
		||||
                    var mult = 0;
 | 
			
		||||
                    if (rng < 67)
 | 
			
		||||
                    {
 | 
			
		||||
                        mult = 0;
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (rng < 91)
 | 
			
		||||
                    {
 | 
			
		||||
                        mult = 2;
 | 
			
		||||
                    }
 | 
			
		||||
                    else if (rng < 100)
 | 
			
		||||
                    {
 | 
			
		||||
                        mult = 4;
 | 
			
		||||
                    }
 | 
			
		||||
                    else
 | 
			
		||||
                        mult = 10;
 | 
			
		||||
 | 
			
		||||
                    if (dict.ContainsKey(mult))
 | 
			
		||||
                        dict[mult] += 1;
 | 
			
		||||
                    else
 | 
			
		||||
                        dict.Add(mult, 1);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                var sb = new StringBuilder();
 | 
			
		||||
                const int bet = 1;
 | 
			
		||||
                int payout = 0;
 | 
			
		||||
                foreach (var key in dict.Keys.OrderByDescending(x => x))
 | 
			
		||||
                {
 | 
			
		||||
                    sb.AppendLine($"x{key} occured {dict[key]} times. {dict[key] * 1.0f / tests * 100}%");
 | 
			
		||||
                    payout += key * dict[key];
 | 
			
		||||
                }
 | 
			
		||||
                await Context.Channel.SendConfirmAsync("BetRoll Test Results", sb.ToString(),
 | 
			
		||||
                    footer: $"Total Bet: {tests * bet} | Payout: {payout * bet} | {payout * 1.0f / tests * 100}%");
 | 
			
		||||
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
			
		||||
        public async Task BetRoll(long amount)
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ namespace NadekoBot.Services.Database.Models
 | 
			
		||||
        public float BetflipMultiplier { get; set; } = 1.95f;
 | 
			
		||||
        public int CurrencyDropAmount { get; set; } = 1;
 | 
			
		||||
        public float Betroll67Multiplier { get; set; } = 2;
 | 
			
		||||
        public float Betroll91Multiplier { get; set; } = 3;
 | 
			
		||||
        public float Betroll91Multiplier { get; set; } = 4;
 | 
			
		||||
        public float Betroll100Multiplier { get; set; } = 10;
 | 
			
		||||
        //public HashSet<CommandCost> CommandCosts { get; set; } = new HashSet<CommandCost>();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user