/// <summary>
        /// Get all the monsters for a set specific monster type
        /// </summary>
        /// <param name="location"></param>
        /// <returns></returns>
        public List <MonsterModel> GetTypeMonsters(SpecificMonsterTypeEnum MonsterType)
        {
            List <MonsterModel> data = null;

            // Find the Items that meet the criteria
            data = Dataset.Where(m => m.SpecificMonsterTypeEnum == MonsterType).ToList();

            return(data);
        }
        /// <summary>
        /// Get the ID of the Default Monster for the Specific Monster Type
        /// The Default monster is the first Monster in the List
        /// </summary>
        /// <param name="location"></param>
        /// <returns></returns>
        public string GetDefaultMonsterId(SpecificMonsterTypeEnum MonsterType)
        {
            var data = GetDefaultMonster(MonsterType);

            if (data == null)
            {
                return(null);
            }

            return(data.Id);
        }
        /// <summary>
        /// Get the First monster of the specific monster type from the list
        /// </summary>
        /// <param name="location"></param>
        /// <returns></returns>
        public MonsterModel GetDefaultMonster(SpecificMonsterTypeEnum MonsterType)
        {
            var dataList = GetTypeMonsters(MonsterType);

            if (dataList.Count() == 0)
            {
                return(null);
            }

            var data = dataList.FirstOrDefault();

            return(data);
        }
예제 #4
0
        /// <summary>
        /// Given the inputed Monster, updates the image URI based on the SpecificMonsterTypeEnum.
        /// </summary>
        /// <param name="newData">Character to update</param>
        public ItemModel DropItemBasedOnCharacterType(SpecificMonsterTypeEnum monsterType)
        {
            ItemModel uniqueDrop = null;

            switch (monsterType)
            {
            case SpecificMonsterTypeEnum.TeachingAssistant:
                uniqueDrop     = new ItemModel(ItemTypeEnum.IndexCards);
                UniqueDropItem = uniqueDrop.Id;
                break;

            case SpecificMonsterTypeEnum.AdjunctFaculty:
                UniqueDropItem = null;
                break;

            case SpecificMonsterTypeEnum.AssistantProfessor:
                uniqueDrop     = new ItemModel(ItemTypeEnum.Laptop);
                UniqueDropItem = uniqueDrop.Id;
                break;

            case SpecificMonsterTypeEnum.AssociateProfessor:
                uniqueDrop     = new ItemModel(ItemTypeEnum.Textbooks);
                UniqueDropItem = uniqueDrop.Id;
                break;

            case SpecificMonsterTypeEnum.Professor:
                UniqueDropItem = null;
                break;

            case SpecificMonsterTypeEnum.HRAdministrator:
                uniqueDrop     = new ItemModel(ItemTypeEnum.FinancialAid);
                UniqueDropItem = uniqueDrop.Id;
                break;

            case SpecificMonsterTypeEnum.RegistrationAdministrator:
                UniqueDropItem = null;
                break;

            case SpecificMonsterTypeEnum.GraduationOfficeAdministrator:
                uniqueDrop     = new ItemModel(ItemTypeEnum.GraduationCapAndRobe);
                UniqueDropItem = uniqueDrop.Id;
                break;
            }
            return(uniqueDrop);
        }
예제 #5
0
        /// <summary>
        /// Any time picker changes, items reset based on player type
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnPickerSelectedIndexChanged(object sender, EventArgs e)
        {
            var picker = (Picker)sender;
            SpecificMonsterTypeEnum SpecificMonsterTypeEnum = SpecificMonsterTypeEnumHelper.ConvertMessageStringToEnum((string)picker.SelectedItem);

            //get the items based on monster
            dropItem = ViewModel.Data.DropItemBasedOnCharacterType(SpecificMonsterTypeEnum);

            //remove items from page
            var FlexList = ItemBox.Children.ToList();

            foreach (var data in FlexList)
            {
                ItemBox.Children.Remove(data);
            }
            if (dropItem != null)
            {
                ItemBox.Children.Add(LoadItem(dropItem));
            }
        }