Class ItemAntiKill

    • Constructor Detail

      • ItemAntiKill

        public ItemAntiKill()
        Creates new ItemAntiKill.
    • Method Detail

      • calculateDuration

        protected int calculateDuration()
        Calculates the duration. Returns 0.
        Overrides:
        calculateDuration in class ItemPermanent
        Returns:
        0.
      • getItemRating

        public int getItemRating()
        Returns an item value for ComputerFigures rating in the items category.
        Overrides:
        getItemRating in class Item
        Returns:
        100000.
      • isAvailableInEditor

        public boolean isAvailableInEditor()
        Checks, if this item is available in level editor.
        Overrides:
        isAvailableInEditor in class Item
        Returns:
        false.
      • explodes

        public boolean explodes​(Figure f,
                                Thing source,
                                DieReason reason,
                                AnimationInfo animation)
        FigureListener method that prevents explosion.
        Specified by:
        explodes in interface FigureKillListener
        Overrides:
        explodes in class Item
        Parameters:
        f - The figure
        source - The explosion source
        animation - The AnimationInfo.
        reason - The reason for the explosion.
        Returns:
        false (to prevent explosion of owner).
      • registerUser

        public void registerUser​(Figure figure)
        Registers this item as listener for figures die events. Does not add the item to the inventory.
        Parameters:
        figure - the figure.