Пример #1
0
        /// <summary>
        /// Adds a kill objective to this quest state.
        /// </summary>
        /// <param name="group">The NPC group Id</param>
        /// <param name="amount">The number of NPCs in this group required to kill to complete the objective.</param>
        /// <returns>A QuestBuilder with the configured options.</returns>
        public QuestBuilder AddKillObjective(NPCGroupType group, int amount)
        {
            var killObjective = new KillTargetObjective(group, amount);

            _activeState.AddObjective(killObjective);

            return(this);
        }
Пример #2
0
        /// <summary>
        /// Retrieves the quests associated with an NPC group.
        /// If no quests are associated with this NPC group, an empty list will be returned.
        /// </summary>
        /// <param name="npcGroupType">The NPC group to search for</param>
        /// <returns>A list of quests associated with an NPC group.</returns>
        public static List <string> GetQuestsAssociatedWithNPCGroup(NPCGroupType npcGroupType)
        {
            if (!_npcsWithKillQuests.ContainsKey(npcGroupType))
            {
                return(new List <string>());
            }

            return(_npcsWithKillQuests[npcGroupType]);
        }
Пример #3
0
 // Convenience functions for commonly used objectives
 public IQuest AddObjectiveKillTarget(int state, NPCGroupType group, int amount)
 {
     AddObjective(state, new KillTargetObjective(group, amount));
     return(this);
 }
Пример #4
0
 void SetReputationField(Text field, NPCGroupType group, string displayName)
 {
     field.text = $"{displayName}: {player.Reputations[group].Value}";
 }
Пример #5
0
 /// <summary>
 /// Retrieves an NPC group detail by the type.
 /// </summary>
 /// <param name="npcGroupType">The type of NPC group to retrieve.</param>
 /// <returns>An NPC group detail</returns>
 public static NPCGroupAttribute GetNPCGroup(NPCGroupType npcGroupType)
 {
     return(_npcGroups[npcGroupType]);
 }
Пример #6
0
 public KillTargetObjective(NPCGroupType group, int amount)
 {
     Group   = group;
     _amount = amount;
 }
Пример #7
0
 public Reputation(NPCGroupType groupType, int value)
 {
     Value = Mathf.Clamp(value, valueRange.start, valueRange.end);
     group = groupType;
 }