예제 #1
0
        public void Setup()
        {
            GlobalReference.GlobalValues = new GlobalValues();

            random          = new Mock <IRandom>();
            performer       = new Mock <IMobileObject>();
            item            = new Mock <IItem>();
            container       = new Mock <IContainer>();
            containerObject = container.As <IBaseObject>();
            effectParameter = new Mock <IEffectParameter>();
            room            = new Mock <IRoom>();
            effect          = new Mock <IEffect>();
            objectId        = new Mock <IBaseObjectId>();
            enchantment     = new PutEnchantment();

            random.Setup(e => e.PercentDiceRoll(100)).Returns(true);
            performer.Setup(e => e.Room).Returns(room.Object);
            containerObject.Setup(e => e.Id).Returns(1);
            containerObject.Setup(e => e.Zone).Returns(2);
            objectId.Setup(e => e.Id).Returns(1);
            objectId.Setup(e => e.Zone).Returns(2);
            enchantment.ActivationPercent = 100;
            enchantment.Parameter         = effectParameter.Object;
            enchantment.Effect            = effect.Object;

            GlobalReference.GlobalValues.Random = random.Object;
        }
예제 #2
0
        private IRoom GenerateRoom3()
        {
            IRoom     room  = Plateau();
            Container chest = Chest();

            chest.ExamineDescription = "The carvings show a mighty lion roaring into the distant.";
            room.AddItemToRoom(chest);
            IItem lion = Lion();

            chest.Items.Add(lion);

            IEnchantment get       = new GetEnchantment();
            CloseDoor    closeDoor = new CloseDoor();

            closeDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 1
            };
            closeDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 6
            };
            closeDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 3
            };
            get.Effect            = closeDoor;
            get.ActivationPercent = 100;
            chest.Enchantments.Add(get);

            IEnchantment put      = new PutEnchantment();
            OpenDoor     openDoor = new OpenDoor();

            openDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 1
            };
            openDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 6
            };
            openDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 3
            };
            put.Effect            = openDoor;
            put.ActivationPercent = 100;
            chest.Enchantments.Add(put);

            return(room);
        }
예제 #3
0
        private IRoom GenerateRoom15()
        {
            IRoom     room  = Plateau();
            Container chest = Chest();

            chest.ExamineDescription = "The carvings show a large fish swallowing the world.";
            room.AddItemToRoom(chest);
            chest.Items.Add(Fish());

            IEnchantment get       = new GetEnchantment();
            CloseDoor    closeDoor = new CloseDoor();

            closeDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 7
            };
            closeDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 4
            };
            closeDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 15
            };
            get.Effect            = closeDoor;
            get.ActivationPercent = 100;
            chest.Enchantments.Add(get);

            IEnchantment put      = new PutEnchantment();
            OpenDoor     openDoor = new OpenDoor();

            openDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 7
            };
            openDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 4
            };
            openDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 15
            };
            put.Effect            = openDoor;
            put.ActivationPercent = 100;
            chest.Enchantments.Add(put);

            return(room);
        }
예제 #4
0
        private IRoom GenerateRoom11()
        {
            IRoom     room  = Plateau();
            Container chest = Chest();

            chest.ExamineDescription = "The carvings show a bear climbing the tree of life.";
            room.AddItemToRoom(chest);
            chest.Items.Add(Bear());

            IEnchantment get       = new GetEnchantment();
            CloseDoor    closeDoor = new CloseDoor();

            closeDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 5
            };
            closeDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 2
            };
            closeDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 11
            };
            get.Effect            = closeDoor;
            get.ActivationPercent = 100;
            chest.Enchantments.Add(get);

            IEnchantment put      = new PutEnchantment();
            OpenDoor     openDoor = new OpenDoor();

            openDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 5
            };
            openDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 2
            };
            openDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 11
            };
            put.Effect            = openDoor;
            put.ActivationPercent = 100;
            chest.Enchantments.Add(put);

            return(room);
        }
예제 #5
0
        private IRoom GenerateRoom7()
        {
            IRoom     room  = Plateau();
            Container chest = Chest();

            chest.ExamineDescription = "The carvings show a majestic eagle soaring in the clouds.";
            room.AddItemToRoom(chest);
            chest.Items.Add(Eagle());

            IEnchantment get       = new GetEnchantment();
            CloseDoor    closeDoor = new CloseDoor();

            closeDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 3
            };
            closeDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 8
            };
            closeDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 7
            };
            get.Effect            = closeDoor;
            get.ActivationPercent = 100;
            chest.Enchantments.Add(get);

            IEnchantment put      = new PutEnchantment();
            OpenDoor     openDoor = new OpenDoor();

            openDoor.Chest = new BaseObjectId()
            {
                Zone = 22, Id = 3
            };
            openDoor.Statue = new BaseObjectId()
            {
                Zone = 22, Id = 8
            };
            openDoor.Door = new BaseObjectId()
            {
                Zone = 22, Id = 7
            };
            put.Effect            = openDoor;
            put.ActivationPercent = 100;
            chest.Enchantments.Add(put);

            return(room);
        }