Class Quest

  • Direct Known Subclasses:
    WizardHatQuest

    public class Quest
    extends java.lang.Object
    A list of tasks, or objectives, the player should complete. Shown in the player menu in the quests tab
    • Constructor Summary

      Constructors 
      Constructor Description
      Quest​(byte id, java.lang.String title, java.lang.String description)  
      Quest​(byte id, java.lang.String title, java.lang.String description, java.util.ArrayList<QuestObjective> objectives)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void complete()
      Marks the quest as complete, and makes sure all objectives are complete as well
      boolean inProgress()
      Returns true if the quest has started, but not completed, false otherwise
      void onComplete()  
      void onStart()  
      void start()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • id

        public byte id
      • isComplete

        public boolean isComplete
      • didStart

        public boolean didStart
      • title

        public java.lang.String title
      • description

        public java.lang.String description
    • Constructor Detail

      • Quest

        public Quest​(byte id,
                     java.lang.String title,
                     java.lang.String description)
      • Quest

        public Quest​(byte id,
                     java.lang.String title,
                     java.lang.String description,
                     java.util.ArrayList<QuestObjective> objectives)
    • Method Detail

      • onStart

        public void onStart()
      • onComplete

        public void onComplete()
      • start

        public void start()
      • complete

        public void complete()
        Marks the quest as complete, and makes sure all objectives are complete as well
      • inProgress

        public boolean inProgress()
        Returns true if the quest has started, but not completed, false otherwise
        Returns:
        True if the quest has started but not completed, false otherwise
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object