Exemplo n.º 1
0
        public override void SetDetailsFromSetup(Detail detail, CoreDetails core)
        {
            // Routes
            RouteManager  router    = new RouteManager();
            List <string> eneRoutes = router.GetRouteNames(core.routeName);

            eneRoutes.AddRange(EnemyInfo.GetCP(core.CPName).CPsoldierRoutes);
            routes = eneRoutes;

            // Bodies
            List <string> eneBodies = NPCBodyInfo.GetRegionBodies(core.locationID).ToList();

            bodies = eneBodies;

            // SubTypes
            List <string> eneSubTypes = NPCBodyInfo.GetRegionSubTypes(core.locationID).ToList();

            subtypes = eneSubTypes;

            // Add/remove/modify detail soldiers
            string[] soldiers = new string[0];
            if (core.CPName != "NONE" || core.routeName != "NONE")
            {
                soldiers = EnemyInfo.GetQuestSoldierNames(core.CPName, core.locationID);
            }

            List <Enemy> qObjects     = detail.GetQuestObjects().Cast <Enemy>().ToList();
            int          soldierCount = soldiers.Length;
            int          objectCount  = qObjects.Count;

            for (int i = 0; i < soldierCount; i++)
            {
                if (i >= objectCount) // add
                {
                    qObjects.Add(new Enemy(soldiers[i]));
                }
                else // modify
                {
                    qObjects[i].name = soldiers[i];
                }
            }

            for (int i = objectCount - 1; i >= soldierCount; i--) //remove
            {
                qObjects.RemoveAt(i);
            }

            detail.SetQuestObjects(qObjects.Cast <QuestObject>().ToList());
            EnemyBox.ResetFovaCounts();
        }
Exemplo n.º 2
0
        public Enemy(EnemyBox box)
        {
            name = box.groupBox_main.Text;

            spawn     = box.checkBox_spawn.Checked;
            isTarget  = box.checkBox_target.Checked;
            balaclava = box.checkBox_balaclava.Checked;
            zombie    = box.checkBox_zombie.Checked;

            cRoute    = box.comboBox_cautionroute.Text;
            dRoute    = box.comboBox_sneakroute.Text;
            skill     = box.comboBox_skill.Text;
            staffType = box.comboBox_staff.Text;

            armored = box.checkBox_armor.Checked;
            body    = box.comboBox_body.Text;
            powers  = box.listBox_power.Items.OfType <string>().ToArray();
        }