Class Quest
java.lang.Object
com.csse3200.game.components.quests.Quest
A basic Quest class that stores quest and subtask progression (# of
subtasks completed), descriptions and hints.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder class for the quest, wrapping the private constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Earmarks quest as having failed.Returns the description of the current subtask being completed for a test or "QUEST COMPLETED" if the quest is completed.Returns the hint for the current subtask being completed for a test or "QUEST COMPLETED" if the quest is completed.String[]
Returns a list of strings indicating precursor quests.int
Returns the number of tasks for a quest.int
Returns the number of tasks to be completed for an individual test.int
Returns number of quest subtasks completed.Returns a description of the quest.Returns a list of DialogueKeys indicating the quest dialogue.Returns quest name.getTasks()
Returns task array for quest subtasks.boolean
isActive()
Returns true if the quest is activeboolean
isFailed()
Returns true if quest is failed.boolean
Returns true if quest is completed.boolean
progressQuest
(Entity player) Progress (increments) number of quest subtasks completed.void
setActive
(boolean active) Sets the active state of the quest.
-
Method Details
-
getQuestName
Returns quest name. -
getTasks
Returns task array for quest subtasks. -
isQuestCompleted
public boolean isQuestCompleted()Returns true if quest is completed. -
getProgression
public int getProgression()Returns number of quest subtasks completed. -
getCurrentTaskDescription
Returns the description of the current subtask being completed for a test or "QUEST COMPLETED" if the quest is completed. -
getCurrentTaskHint
Returns the hint for the current subtask being completed for a test or "QUEST COMPLETED" if the quest is completed. -
progressQuest
Progress (increments) number of quest subtasks completed. -
isFailed
public boolean isFailed()Returns true if quest is failed. -
failQuest
public void failQuest()Earmarks quest as having failed. -
getQuestDescription
Returns a description of the quest. -
getNumTasksToComplete
public int getNumTasksToComplete()Returns the number of tasks to be completed for an individual test. -
getNumQuestTasks
public int getNumQuestTasks()Returns the number of tasks for a quest. -
isActive
public boolean isActive()Returns true if the quest is active -
setActive
public void setActive(boolean active) Sets the active state of the quest.- Parameters:
active
- a boolean value indicating whether the quest is active or not.
-
getQuestDialogue
Returns a list of DialogueKeys indicating the quest dialogue.- Returns:
- the list of quest dialogue
-
getFollowQuests
Returns a list of strings indicating precursor quests.- Returns:
- the list of quests that must be completed for this one to become active
-