fix
This commit is contained in:
parent
4c62f9f7ef
commit
75dafc17b2
@ -16,7 +16,7 @@ namespace Campofinale.Game.Gacha
|
||||
|
||||
public Player player;
|
||||
internal ulong upSeqId;
|
||||
const double fiftyfifty = 0.45; // 50% (make it less than real 50, because the randomness make win fifty fifty every time
|
||||
const double fiftyfifty = 0.50;
|
||||
|
||||
private static readonly Random random = new Random();
|
||||
public GachaManager(Player player)
|
||||
@ -219,11 +219,7 @@ namespace Campofinale.Game.Gacha
|
||||
}
|
||||
else
|
||||
{
|
||||
int index = random.Next(0,items.Count); // Miglior randomizzazione
|
||||
// index = (int)((1 - Math.Pow(random.NextDouble(), 2)) * (items.Count - 1));
|
||||
|
||||
// Se vuoi evitare di prendere spesso i primi 2-3 elementi:
|
||||
// index = (int)Math.Pow(random.NextDouble(), 1.5) * items.Count;
|
||||
int index = random.Next(0,items.Count);
|
||||
if (index > items.Count-1)
|
||||
{
|
||||
index = items.Count-1;
|
||||
|
Loading…
Reference in New Issue
Block a user