Exemplo n.º 1
0
 public static int GetRandomScalar(this PokeSize size)
 {
     return(size switch
     {
         PokeSize.XS => (Util.Rand.Next(0x10) + 0x00),
         PokeSize.S => (Util.Rand.Next(0x20) + 0x10),
         PokeSize.AV => (Util.Rand.Next(0xA0) + 0x30),
         PokeSize.L => (Util.Rand.Next(0x20) + 0xD0),
         PokeSize.XL => (Util.Rand.Next(0x10) + 0xF0),
         _ => GetRandomPokeSize() // Official code sums two randoms for triangular distribution.
     });
Exemplo n.º 2
0
 public static int GetRandomScalar(this PokeSize size)
 {
     return(size switch
     {
         PokeSize.XS => (Util.Rand.Next(0x10) + 0x00),
         PokeSize.S => (Util.Rand.Next(0x20) + 0x10),
         PokeSize.AV => (Util.Rand.Next(0xA0) + 0x30),
         PokeSize.L => (Util.Rand.Next(0x20) + 0xD0),
         PokeSize.XL => (Util.Rand.Next(0x10) + 0xF0),
         _ => GetRandomScalar()
     });