public static QuestInstance GenerateQuest(int difficulty, QuestMakeupType makeup)
        {
            string        questName = NameDatabase.GetQuestName();
            QuestInstance quest     = new QuestInstance(questName, difficulty, QuestMakeup.GetMakeup(makeup));

            quest.Duration.OriginalValue   = UnityEngine.Random.Range(TimeUtilities.GetSecondsInDays(0.1f), TimeUtilities.GetSecondsInDays(0.4f));
            quest.TravelTime.OriginalValue = UnityEngine.Random.Range(TimeUtilities.GetSecondsInDays(0.2f), TimeUtilities.GetSecondsInDays(0.4f));
            quest.ExpireTime = UnityEngine.Random.Range(TimeUtilities.MIN_QUEST_EXPIRE_TIME, TimeUtilities.MAX_QUEST_EXPIRE_TIME);
            return(quest);
        }
Example #2
0
        public QuestInstance(string displayName, int difficulty, QuestMakeup questMakeup)
        {
            DisplayName = displayName;
            Difficulty  = difficulty;

            QuestClause goldClause = QuestClause.GetAllClauses()[QuestClauseTypes.ADVENTURER_GOLD];

            goldClause.EffectCount = 0;
            AddClause(goldClause);

            Makeup = questMakeup;
        }
Example #3
0
        private static void BuildMakeups()
        {
            m_Makeups = new Dictionary <QuestMakeupType, QuestMakeup>();

            foreach (QuestMakeupType type in Enum.GetValues(typeof(QuestMakeupType)))
            {
                QuestMakeup makeup;
                switch (type)
                {
                default:
                case QuestMakeupType.SOLO:
                    makeup = new QuestMakeup();
                    break;

                case QuestMakeupType.DUNGEON:
                    makeup = new QuestMakeup(new Dictionary <int, HeroSlot>()
                    {
                        [0] = new HeroSlot(SELECT_TANK_TEXT, HeroType.TANK),
                        [1] = new HeroSlot(SELECT_HEALER_TEXT, HeroType.HEALER),
                        [2] = new HeroSlot(SELECT_DPS_TEXT, HeroType.MAGICAL_DAMAGE, HeroType.PHYSICAL_DAMAGE),
                        [3] = new HeroSlot(SELECT_DPS_TEXT, HeroType.MAGICAL_DAMAGE, HeroType.PHYSICAL_DAMAGE),
                    });
                    break;

                case QuestMakeupType.RAID:
                    makeup = new QuestMakeup(new Dictionary <int, HeroSlot>()
                    {
                        [0] = new HeroSlot(SELECT_TANK_TEXT, HeroType.TANK),
                        [1] = new HeroSlot(SELECT_TANK_TEXT, HeroType.TANK),
                        [2] = new HeroSlot(SELECT_HEALER_TEXT, HeroType.HEALER),
                        [3] = new HeroSlot(SELECT_HEALER_TEXT, HeroType.HEALER),
                        [4] = new HeroSlot(SELECT_DPS_TEXT, HeroType.MAGICAL_DAMAGE, HeroType.PHYSICAL_DAMAGE),
                        [5] = new HeroSlot(SELECT_DPS_TEXT, HeroType.MAGICAL_DAMAGE, HeroType.PHYSICAL_DAMAGE),
                        [6] = new HeroSlot(SELECT_DPS_TEXT, HeroType.MAGICAL_DAMAGE, HeroType.PHYSICAL_DAMAGE),
                        [7] = new HeroSlot(SELECT_DPS_TEXT, HeroType.MAGICAL_DAMAGE, HeroType.PHYSICAL_DAMAGE),
                    });
                    break;
                }
                m_Makeups[type] = makeup;
            }
        }