Exemplo n.º 1
0
        public void SetRewardLimitByStageDrop()
        {
            var row = new StageSheet.Row();

            row.Set(new List <string>
            {
                "1", "5", "100", "0", "0", "0", "0", "0", "0", "chapter_1_1", "bgm_stage_green", "306043", "1", "2",
                "2", "303000", "0.01", "2", "2", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, "1", "1",
            });
            var itemSelector = StageSimulator.SetItemSelector(row, _random);
            var reward       = Simulator.SetReward(itemSelector, _random.Next(1, 1), _random, _materialItemSheet);

            Assert.Single(reward);
        }
Exemplo n.º 2
0
        public void SetRewardDuplicateItem()
        {
            var row = new StageSheet.Row();

            row.Set(new List <string>
            {
                "1", "5", "100", "0", "0", "0", "0", "0", "0", "chapter_1_1", "bgm_stage_green", "306043", "1", "2",
                "2", "303000", "0.01", "2", "2", string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, "2", "2",
            });
            var itemSelector = StageSimulator.SetItemSelector(row, _random);
            var reward       = Simulator.SetReward(itemSelector, _random.Next(2, 2), _random, _materialItemSheet);

            Assert.Equal(2, reward.Count);
            Assert.NotEmpty(reward);
            Assert.Single(reward.Select(i => i.Id).ToImmutableHashSet());
        }