Class Survivor


  • public final class Survivor
    extends PerkUser
    Represents a Survivor.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static double INTERACT_DISTANCE
      Determines how much distance is needed for interacting with the Generators and the Chests.
      static int START_BLEEDOOUT_VALUE
      Determines how many ticks does it take for Survivors to bleed out on the ground.
    • Field Detail

      • INTERACT_DISTANCE

        public static final double INTERACT_DISTANCE
        Determines how much distance is needed for interacting with the Generators and the Chests. Equals 1.4.
        See Also:
        Constant Field Values
      • START_BLEEDOOUT_VALUE

        public static int START_BLEEDOOUT_VALUE
        Determines how many ticks does it take for Survivors to bleed out on the ground. This is the value of the bleed out progress at the beginning of the Game. Equals 1200.
    • Method Detail

      • resetScratchMarkDuration

        public void resetScratchMarkDuration()
        Forces Dead by Moonlight to fire GetScratchMarkEvent again. Must be called if you want to modify the Scratch Mark duration when the Survivor might be running.
      • getStatus

        public Health getStatus()
        Gets the Health state of the Survivor.
        Returns:
        The Health state.
      • getBleedOutProgress

        public int getBleedOutProgress()
        Gets the bleed out progress value. The Survivor dies if this value hits 0.
        Returns:
        The bleed out progress value.
      • getItem

        public java.util.Optional<Item> getItem()
        Gets the Item the Survivor currently owns. Null if the Survivor does not have an Item.
        Returns:
        The Survivor's Item.
      • isRepairing

        public boolean isRepairing()
        Checks if the Survivor is repairing a Generator.
        Returns:
        True if the Survivor is repairing.
      • isHoldingItem

        public boolean isHoldingItem()
        Checks if the Survivor is holding an Item in their hands.
        Returns:
        True if the Survivor has an Item and they are holding it currently.
      • instantHeal

        public void instantHeal()
        Instantly heals one Health State for this Survivor. Unhooks the Survivor if they are on a Hook.
      • canInteract

        public boolean canInteract()
        Checks if the Survivor can interact.
        Returns:
        True if the Survivor can interact.
      • stun

        public void stun​(int duration,
                         org.kikikan.deadbymoonlight.util.StunReason stunReason)
        Stuns the Killer
        Parameters:
        duration - The duration in ticks. GetStunDurationEvent and StunnedKillerEvent gets called here.
        stunReason - The reason for the stun.
      • setHealProgress

        public void setHealProgress​(double value)
      • notifyHex

        public void notifyHex​(Perk perk)
        Notifies the Survivor about the existence of a Hex Perk. It's common courtesy to notify the Survivors if there's a Hex: Perk in the Trial.
        Parameters:
        perk - The Perk which uses at least one Perk.
      • isNotified

        public boolean isNotified​(Perk perk)
        Checks if the Survivor was notified about the existence of the Perk.
        Parameters:
        perk - The Perk
        Returns:
        True if the Survivor knows about this Perk.
      • isInventoryOpen

        public boolean isInventoryOpen()
        Checks if the Survivor has any DbM inventory open. (So just viewing their own inventory does not count.)
        Returns:
        True if the Survivor is either repairing, healing, cleansing, opening a chest, or in a Skill Check.
      • hasSkillCheck

        public boolean hasSkillCheck()
        Checks whether this Survivor is currently experiencing a Skill Check.
        Returns:
        True if the Survivor is seeing the Skill Check's inventory.
      • init

        protected void init()
        Overrides:
        init in class PerkUser