Class MissionCompleteQuest


public class MissionCompleteQuest extends Quest
A MissionCompleteQuest class for when a quest which is based around completing a number of missions
  • Constructor Details

    • MissionCompleteQuest

      public MissionCompleteQuest(String name, Reward reward, int numberOfQuestsToComplete)
      Creates a new MissionCompleteQuest with the given name, reward and number of quests to complete
      Parameters:
      name - The name of the quest
      reward - The reward for completing the quest
      numberOfQuestsToComplete - The number of quests to complete
    • MissionCompleteQuest

      public MissionCompleteQuest(String name, Reward reward, int expiryDuration, boolean isMandatory, int numberOfQuestsToComplete)
      Creates a new MissionCompleteQuest with the given name, reward, expiry duration, whether the quest is mandatory and number of quests to complete
      Parameters:
      name - The name of the quest
      reward - The reward for completing the quest
      expiryDuration - The expiry duration of the quest
      isMandatory - Whether the quest is mandatory
      numberOfQuestsToComplete - The number of quests to complete
  • Method Details

    • registerMission

      public void registerMission(EventHandler missionManagerEvents)
      Registers the mission
      Specified by:
      registerMission in class Mission
      Parameters:
      missionManagerEvents - A reference to the EventHandler on the MissionManager, with which relevant events should be listened to.
    • isCompleted

      public boolean isCompleted()
      Returns whether the quest is completed
      Specified by:
      isCompleted in class Mission
      Returns:
      Whether the quest is completed
    • getDescription

      public String getDescription()
      Returns the description of the quest
      Specified by:
      getDescription in class Mission
      Returns:
      The description of the quest
    • getShortDescription

      public String getShortDescription()
      Returns the short description of the quest
      Specified by:
      getShortDescription in class Mission
      Returns:
      The short description of the quest
    • readProgress

      public void readProgress(com.badlogic.gdx.utils.JsonValue progress)
      Reads the progress of the quest
      Specified by:
      readProgress in class Mission
      Parameters:
      progress - jsonValue of the progress
    • getProgress

      public Object getProgress()
      Returns the progress of the quest
      Specified by:
      getProgress in class Mission
      Returns:
      The progress of the quest
    • resetState

      protected void resetState()
      Resets the state of the quest
      Specified by:
      resetState in class Quest