Ejemplo n.º 1
0
        private static void RandomizeElixir(Player Player, BrawlBox Box)
        {
            Box.ResourceData = (Resources)CSV.Tables.Get(Gamefile.Resources).GetDataWithInstanceID(6);

            int Random = Player.Device.Random.Next(0, 1000);

            if (Random >= 1000 - BigDustPackChance * 10)
            {
                Box.Count        = 10;
                Box.BackgroundId = 3;

                return;
            }

            if (Random >= 1000 - MediumDustPackChance * 10)
            {
                Box.Count        = 5;
                Box.BackgroundId = 2;

                return;
            }

            if (Random >= 1000 - SmallDustPackChance * 10)
            {
                Box.Count        = 2;
                Box.BackgroundId = 1;

                return;
            }


            Box.Count        = 1;
            Box.BackgroundId = 0;
        }
Ejemplo n.º 2
0
        internal static BrawlBox RandomizeBox(Player Player)
        {
            BrawlBox Box = new BrawlBox();

            if (Player.Device.Random.Next(100) >= 100 - CardChance)
            {
                Box.CardData = Reward.RandomizeCard(Player);
            }
            else
            {
                Reward.RandomizeElixir(Player, Box);
            }

            return(Box);
        }
 /// <summary>
 /// Decodes this instance.
 /// </summary>
 internal override void Decode()
 {
     this.Box = new BrawlBox();
     this.Box.Decode(this.Reader);
     this.ReadHeader();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Buy_Brawl_Box_Callback"/> class.
 /// </summary>
 /// <param name="Device">The device.</param>
 public Buy_Brawl_Box_Callback(Device Device, BrawlBox Box) : base(Device)
 {
     this.Identifier = 203;
     this.Box        = Box;
 }