Class ItemShielding

    • Constructor Detail

      • ItemShielding

        public ItemShielding()
        Creates a new ItemShielding.
    • Method Detail

      • getItemRating

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

        public int getShieldPower()
        Returns the shields power (which is same as duration). Per default, ItemShielding calculates the Shield power by energy/energyFactor, so subclasses might adjust the energyfactor for linear energy - shield power behaviour, or override getShieldPower.
        Returns:
        The gain.
      • calculateDuration

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

        protected void doSpecialUpdate​(AnimationInfo animation)
        Performs the update in each round in overridden classes. Recalculates duration.
        Overrides:
        doSpecialUpdate in class ItemPermanent
        Parameters:
        animation - The AnimationInfo