/// <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); }
/// <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]); }
// Convenience functions for commonly used objectives public IQuest AddObjectiveKillTarget(int state, NPCGroupType group, int amount) { AddObjective(state, new KillTargetObjective(group, amount)); return(this); }
void SetReputationField(Text field, NPCGroupType group, string displayName) { field.text = $"{displayName}: {player.Reputations[group].Value}"; }
/// <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]); }
public KillTargetObjective(NPCGroupType group, int amount) { Group = group; _amount = amount; }
public Reputation(NPCGroupType groupType, int value) { Value = Mathf.Clamp(value, valueRange.start, valueRange.end); group = groupType; }