Class ItemBlasterGenerator

    • Field Detail

      • fireFrequency

        protected int fireFrequency
        Fire frequency in rounds.
      • blasterEnergy

        protected int blasterEnergy
        Initial blaster (and fireball) energy. Default is 200.
    • Constructor Detail

      • ItemBlasterGenerator

        public ItemBlasterGenerator()
        Creates a new ItemRocketGenerator.
    • Method Detail

      • addStateProperties

        protected void addStateProperties​(ThingState state,
                                          AnimationInfo animation)
        Adds properties necessary for blaster generator painting.
        Overrides:
        addStateProperties in class Thing
        Parameters:
        state - The state to add properties to.
        animation - The current AnimationInfo.
      • getItemRating

        public int getItemRating()
        Returns an item value for ComputerFigures rating in the items category.
        Overrides:
        getItemRating in class Item
        Returns:
        energy * 10.
      • getDrawText

        public java.lang.String getDrawText()
        Returns a display string for UI.
        Overrides:
        getDrawText in class Item
        Returns:
        DURATIONx.
      • getFigureOverlayImageName

        public java.lang.String getFigureOverlayImageName​(AnimationInfo animation)
        Gets an image name for painting on the figure.
        Overrides:
        getFigureOverlayImageName in class ItemPermanent
        Parameters:
        animation - The AnimationInfo.
        Returns:
        "item_rocketgenerator_sm".
      • performPermanentEffect

        public void performPermanentEffect​(Figure owner,
                                           AnimationInfo animation)
        If this is the first rocket generator, and the owners item is null, the internal round counter is increased. If the fireFrequency value is reached, a new item is produced and given to the owner.
        Overrides:
        performPermanentEffect in class ItemPermanent
        Parameters:
        owner - The owner of the rocket generator.
        animation - The AnimationInfo.