Class ChaosDuck

    • Constructor Detail

      • ChaosDuck

        public ChaosDuck​(Game game,
                         FigureInfo figureInfo)
        Creates a new ChaosDuck.
        Parameters:
        game - The game.
        figureInfo - The FigureInfo.
    • Method Detail

      • addStateProperties

        protected void addStateProperties​(ThingState state,
                                          AnimationInfo animation)
        Adds properties necessary for ChaosDuck painting.
        Overrides:
        addStateProperties in class Thing
        Parameters:
        state - The state to add properties to.
        animation - The current AnimationInfo.
      • 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 Figure
        Returns:
        "com.starpoints.painter.arena2D.PainterChaosDuck"
      • getIq

        public int getIq()
        Gets the IQ of this figure. If the background is flickering, the figures iq is reduced by 20.
        Overrides:
        getIq in class CleverComputerFigure
        Returns:
        The IQ.
      • getShootDirection

        public int getShootDirection()
        Gets the current shoot direction.
        Returns:
        The shoot direction.
      • doSpecialUpdate

        protected void doSpecialUpdate​(AnimationInfo animation)
        Special updates. Updates the shoot direction. Any rocket is dropped, since flamer does not use rockets.
        Overrides:
        doSpecialUpdate in class CleverComputerFigure
        Parameters:
        animation - The AnimationInfo.
      • addPenalty

        public void addPenalty​(int penalty,
                               AnimationInfo animation)
        Does nothing - ChaosDuck does not get penalties (for killing JungleTrees especially).
        Overrides:
        addPenalty in class Figure
        Parameters:
        penalty - The penalty.
        animation - The AnimationInfo.
      • checkEnemy

        protected boolean checkEnemy​(Figure f)
        Checks, if a figure is relevant for the closest enemy determination.
        Overrides:
        checkEnemy in class ComputerFigure
        Parameters:
        f - The figure.
        Returns:
        true, if figure is not another ChaosDuck AND super.checkEnemy().
      • shoot

        protected void shoot​(int xdif,
                             int ydif)
        Performs the flame thrower effect.
        Parameters:
        xdif - X addition depending on shoot direction.
        ydif - y addition depending on shoot direction.