예제 #1
0
        public void NestedRollTrapsTest()
        {
            DiceCup.SetRandom(new Random(600));
            var architect = new TrapArchitect();
            var traps = new List<Trap>();

            var riddleTrapKey = 5;
            var lockEntranceKey = 46;
            var lockExitKey = 47;
            var rollTwiceKey = 99;
            var rollThriceKey = 100;

            var iterator = 20;
            for (int i = 0; i < iterator; i++)
            {
                var riddleTrapBase = architect.GetTrapBaseFactory();
                var riddleTrapEffect = architect.GetSpecificTrapEffect(riddleTrapKey);
                var riddleTrapDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(riddleTrapBase, riddleTrapEffect, riddleTrapDamage));

                var lockEntranceBase = architect.GetTrapBaseFactory();
                var lockEntranceEffect = architect.GetSpecificTrapEffect(lockEntranceKey);
                var lockEntranceDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(lockEntranceBase, lockEntranceEffect, lockEntranceDamage));

                var lockExitBase = architect.GetTrapBaseFactory();
                var lockExitEffect = architect.GetSpecificTrapEffect(lockExitKey);
                var lockExitDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(lockExitBase, lockExitEffect, lockExitDamage));

                var rollTwiceBase = architect.GetTrapBaseFactory();
                var rollTwiceEffect = architect.GetSpecificTrapEffect(rollTwiceKey);
                var rollTwiceDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(rollTwiceBase, rollTwiceEffect, rollTwiceDamage));

                var rollThriceBase = architect.GetTrapBaseFactory();
                var rollThriceEffect = architect.GetSpecificTrapEffect(rollThriceKey);
                var rollThriceDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(rollThriceBase, rollThriceEffect, rollThriceDamage));
            }

            Approvals.VerifyAll(traps, "Nested Trap!");
        }
예제 #2
0
        public void GasTrapTest()
        {
            DiceCup.SetRandom(new Random(500));
            var architect = new TrapArchitect();
            var traps = new List<Trap>();

            var gasTrapKey = 38;
            var iterator = 100;
            for (int i = 0; i < iterator; i++)
            {
                var gasTrapBase = architect.GetTrapBaseFactory();
                var gasTrapEffect = architect.GetSpecificTrapEffect(gasTrapKey);
                var gasTrapDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(gasTrapBase, gasTrapEffect, gasTrapDamage));
            }

            Approvals.VerifyAll(traps, "Gas Trap!");
        }
예제 #3
0
        public void SpeceficTrapTest()
        {
            DiceCup.SetRandom(new Random(4));
            var architect = new TrapArchitect();

            var trapBase = architect.GetSpecificTrapBase(15);
            var trapEffect = architect.GetSpecificTrapEffect(33);
            var trapDamage = architect.GetSpecificTrapDamage(8);
            var trap = new Trap(trapBase, trapEffect, trapDamage);

            Approvals.Verify(trap);
        }
예제 #4
0
        public void PitTrapTest()
        {
            DiceCup.SetRandom(new Random(400));
            var architect = new TrapArchitect();
            var traps = new List<Trap>();

            var floodAreaKey = 36; // Flood area uses the pit trap subtable
            var pitTrapOpenKey = 89;
            var pitTrapTumbleKey = 94;

            var iterator = 33;
            for (int i = 0; i < iterator; i++)
            {

                var floodTrapBase = architect.GetTrapBaseFactory();
                var floodTrapEffect = architect.GetSpecificTrapEffect(floodAreaKey);
                var floodTrapDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(floodTrapBase, floodTrapEffect, floodTrapDamage));

                var pitTrapOpenBase = architect.GetTrapBaseFactory();
                var pitTrapOpenEffect = architect.GetSpecificTrapEffect(pitTrapOpenKey);
                var pitTrapOpenDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(pitTrapOpenBase, pitTrapOpenEffect, pitTrapOpenDamage));

                var pitTrapTumbleBase = architect.GetTrapBaseFactory();
                var pitTrapTumbleEffect = architect.GetSpecificTrapEffect(pitTrapTumbleKey);
                var pitTrapTumbleDamage = architect.GetTrapDamageFactory();
                traps.Add(new Trap(pitTrapTumbleBase, pitTrapTumbleEffect, pitTrapTumbleDamage));
            }

            Approvals.VerifyAll(traps, "Pit Trap!");
        }