Class Quest

  • Direct Known Subclasses:
    KillQuest, LocateQuest

    public abstract class Quest
    extends java.lang.Object
    Base class for all quests facilitates the checking of completion
    • Field Detail

      • name

        protected java.lang.String name
      • description

        protected java.lang.String description
      • plunderReward

        protected int plunderReward
      • pointReward

        protected int pointReward
      • isCompleted

        protected boolean isCompleted
    • Constructor Detail

      • Quest

        public Quest()
        Constructs a quest with base values filled in
    • Method Detail

      • checkCompleted

        public abstract boolean checkCompleted​(Player p)
        Checks if the given player has met the complete condition
        Parameters:
        p - the player
        Returns:
        has completed
      • getPlunderReward

        public int getPlunderReward()
        Returns:
        The plunder reward for this quest
      • getPointReward

        public int getPointReward()
        Returns:
        The point reward for this quest
      • isCompleted

        public boolean isCompleted()
        Returns:
        The completion status of the current quest
      • getName

        public java.lang.String getName()
        Returns:
        The name of this quest
      • getDescription

        public java.lang.String getDescription()
        Returns:
        The description of this quest