Class ItemChainExplosion

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class ItemChainExplosion
    extends ItemBigMine
    Can be dropped like an ItemBigMine, but performs an chain explosion over all connected blue points starting at the droppoint.
    See Also:
    Serialized Form
    • Field Detail

      • killCount

        protected int killCount
        Counter for killed enemies.
      • radius

        protected int radius
        Radius for painting during countdown.
    • Constructor Detail

      • ItemChainExplosion

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

      • getPainterClassname

        public java.lang.String getPainterClassname()
        Gets the fully qualified classname of the Painter to use for this item (in 2D game).
        Overrides:
        getPainterClassname in class ItemBigMine
        Returns:
        "com.starpoints.painter.arena2D.PainterItemChainExplosion"
      • getItemRating

        public int getItemRating()
        Returns an item value for ComputerFigures rating in the items category.
        Overrides:
        getItemRating in class ItemBigMine
        Returns:
        1000.
      • onEnemyKilled

        public void onEnemyKilled​(Figure enemy,
                                  int round,
                                  DieReason reason,
                                  AnimationInfo animation)
        Called, if the thing killed an enemy.
        Overrides:
        onEnemyKilled in class ItemBigMine
        Parameters:
        enemy - The killed enemy
        round - The round count.
        reason - The kill reason.
        animation - The AnimationInfo.
      • doDetonate

        protected void doDetonate()
        Starts a chain explosion.
        Overrides:
        doDetonate in class ItemBigMine
      • doSpecialUpdate

        protected void doSpecialUpdate​(AnimationInfo animation)
        Updates the radius, if active.
        Overrides:
        doSpecialUpdate in class ItemBigMine
        Parameters:
        animation - The AnimationInfo.