Package com.starpoints.game.figure
Class BigBoss
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Figure
-
- com.starpoints.game.ComputerFigure
-
- com.starpoints.game.figure.BigBoss
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class BigBoss extends ComputerFigure
The Boss enemy (surrounded by 4 BigBossDrones). Fires FlameThrower to diagonal directions if enemy would be affected. No rocket target.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intBOTTOMLEFTDirection constant for fire animation.static intBOTTOMRIGHTDirection constant for fire animation.static intFIRE_FREQUENCYFire frequency constant.static intNOFIREConstant for fire animation.static intTOPLEFTDirection constant for fire animation.static intTOPRIGHTDirection constant for fire animation.-
Fields inherited from class com.starpoints.game.ComputerFigure
pointList, speedCount, wantsToEnterBlue
-
Fields inherited from class com.starpoints.game.Figure
ABSMAXENERGY, affectsBlue, alreadyKilled, colorlistener, DEFAULT_FIGURE_PAINTERCLASS, dieListener, dieReason, DOWN, energylistener, heatLevel, heatlistener, hoverCount, hoverHeight, hoverlistener, imageName, initialEnergy, INITIALRAMPOWER, isRocketTarget, item, itemlistener, killer, LEFT, lives, MAXHOVERHEIGHT, maxRadius, MAXSLOTS, money, moved, movelistener, name, NONE, number, oldItem, oldRocketXP, oldRocketYP, PANIC, penalty, permItems, pointBonus, pointlistener, points, ramlistener, ramPower, RIGHT, side, sinker, slots, STEPLEFT, STEPRIGHT, stunCount, stunlistener, sumPoints, UP, USE_ITEM, viewDir, visibilitylistener, visibleCount, wantsToUseItem, winCounter
-
Fields inherited from class com.starpoints.game.Thing
energy, energyFx, energyMaxSoundPlayed, energyModifications, explosionCounter, game, innerColor, invulnCount, isAffectedByBlack, isAffectedByGray, level, MAX_TEXTPAINT, maxEnergy, nextID, outerColor, p, shieldCount, status, text
-
-
Constructor Summary
Constructors Constructor Description BigBoss(Game game, FigureInfo f)Creates The last Enemy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddStateProperties(ThingState state, AnimationInfo animation)Adds properties necessary for BigBoss painting.protected intcalculatePointRating(Point p)Gets the point rating for a given point during next point calculation - Returns -100000 for points on the edge of the field, otherwise supermethods return value.protected PointdoCalculateNextPoint()This method is called each round, to get the next point for this figure when playing.protected voiddoSpecialUpdate(AnimationInfo animation)Updates after each round.intgetHasFiredDirection()Gets the direction constant in which big boss has fired.PointgetNextPoint()Gets the next point BigBoss wants to move to.java.lang.StringgetPainterClassname()Gets the fully qualified classname of the Painter to use for this item (in 2D game).booleanhasJustFired()Checks, if BigBoss has just fired.booleanisAvailableInEditor()Checks, if this figure is available in level editor.protected intonAddHeat(int heat, boolean internal, Thing source)Returns a fifth of original heat gain.protected voidonAfterDeath(Point p, AnimationInfo animation)Called, directly after the figure dies and its point is unoccupied.protected voidreInit(Field field)Reinitializes the figure after each level.booleanwantsToUseItem()This method is called each round, if the figure has an item, to check, if the item should be used.-
Methods inherited from class com.starpoints.game.ComputerFigure
calculateItemRating, calculateNextPoint, checkEnemy, entersExplosion, findClosestEnemy, getDistance, getDistance, getIq, isApplyingLevelInfoIQ, isDummy, isForbiddenItem, isRamTarget, isUnwantedItem, isVisible, modifyByColor, wantsToMove
-
Methods inherited from class com.starpoints.game.Figure
addEnergy, addFigureColorListener, addFigureEnergyListener, addFigureHeatListener, addFigureHoverListener, addFigureItemListener, addFigureKillListener, addFigureMoveListener, addFigurePointListener, addFigureRamListener, addFigureStunListener, addFigureVisibilityListener, addHeat, addInitialEnergy, addLife, addMaxEnergy, addMoney, addPenalty, addPermanentItem, addPoints, addSlots, affectsBlue, beforeMove, beRammed, createState, determineIQ, determineIQ, die, drawState, entersColor, fireColorEnterEvent, fireColorStayEvent, fireDieEvent, fireEnergyChangeEvent, fireEnergyLossEvent, fireGainPermanentItemEvent, fireHeatChangeEvent, fireHoverEvent, fireKillsEnemy, fireLoseItemEvent, fireLosePermanentItemEvent, fireLostPermanentItemEvent, fireMoveEvent, firePickesUpBombEvent, firePickesUpExplosiveEvent, firePickesUpItemEvent, firePointsChangeEvent, firePointSumChangeEvent, fireRamEvent, fireRamPowerEvent, fireSlotsChangeEvent, fireStunEvent, fireUseItemEvent, fireVisibilityChangesEvent, getDieReason, getDyingClip, getExplosionClip, getFreeSlots, getHeatLevel, getHoverHeight, getHoverRounds, getImageName, getInitialEnergy, getInvisibilityRounds, getItem, getKillBonus, getLifes, getMaxSlots, getMoney, getName, getNumber, getPermanentItems, getPoints, getPointSum, getRamPower, getSlots, getSpeed, getStunCount, getWinCount, hasMoved, hasPermanentItem, hasPermanentItem, hover, increasePointSum, invulnerable, isAffectedByBlack, isAffectedByGray, isApplyingLevelInfoSpeed, isDrawingNumber, isHovering, isRocketTarget, isSinking, isStunned, isVisible, loseItem, losePermanentItem, losePermanentItem, losePermanentItemInternal, onBeforeDie, onBeforeRemoveEnergy, onEnemyKilled, onExplode, onRoundBegin, playDyingSound, removeEnergy, removeFigureColorListener, removeFigureEnergyListener, removeFigureHeatListener, removeFigureHoverListener, removeFigureItemListener, removeFigureKillListener, removeFigureMoveListener, removeFigurePointListener, removeFigureRamListener, removeFigureStunListener, removeFigureVisibilityListener, removeMoney, removePoints, retrieveNextPoint, sellPermanentItem, setHoverCount, setHoverHeight, setInitialEnergy, setInvisible, setIq, setIsRocketTarget, setItem, setMaxEnergy, setMoney, setName, setNumber, setPoint, setSlots, setSpeed, setVisible, sink, staysOnColor, stopHover, stopSink, stun, takeItem, toString, updateExplodingStatus, updatePoints, updateThing, useItem, win
-
Methods inherited from class com.starpoints.game.Thing
addShielding, clearTexts, displayText, displayText, equals, getColor, getEnergy, getEnergyMaxCount, getExplosionCounter, getField, getGame, getID, getInnerColor, getInvulnerableRounds, getLevel, getMaxEnergy, getNextID, getOuterColor, getPoint, getShadowColor, getShield, getStateObject, getStatus, getText, getTextColor, getTextPaintCount, getX, getY, hashCode, isDestroyed, isExploding, isInvulnerable, isOK, isShowingEnergyFx, retrieveState, setEnergy, setEnergyMaxCount, setGame, setStatus, stepText, updateEnergy
-
-
-
-
Field Detail
-
NOFIRE
public static final int NOFIRE
Constant for fire animation.- See Also:
- Constant Field Values
-
TOPLEFT
public static final int TOPLEFT
Direction constant for fire animation.- See Also:
- Constant Field Values
-
TOPRIGHT
public static final int TOPRIGHT
Direction constant for fire animation.- See Also:
- Constant Field Values
-
BOTTOMLEFT
public static final int BOTTOMLEFT
Direction constant for fire animation.- See Also:
- Constant Field Values
-
BOTTOMRIGHT
public static final int BOTTOMRIGHT
Direction constant for fire animation.- See Also:
- Constant Field Values
-
FIRE_FREQUENCY
public static final int FIRE_FREQUENCY
Fire frequency constant.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BigBoss
public BigBoss(Game game, FigureInfo f)
Creates The last Enemy.- Parameters:
game- The game.f- The figure info.
-
-
Method Detail
-
addStateProperties
protected void addStateProperties(ThingState state, AnimationInfo animation)
Adds properties necessary for BigBoss painting.- Overrides:
addStatePropertiesin classThing- 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:
getPainterClassnamein classFigure- Returns:
- "com.starpoints.painter.arena2D.PainterBigBoss"
-
isAvailableInEditor
public boolean isAvailableInEditor()
Checks, if this figure is available in level editor.- Overrides:
isAvailableInEditorin classFigure- Returns:
- false.
-
doCalculateNextPoint
protected Point doCalculateNextPoint()
This method is called each round, to get the next point for this figure when playing. If any drone explodes, the BigBoss does not move. Otherwise superclasses method is called. Stores the next point for acccess by drones.- Overrides:
doCalculateNextPointin classComputerFigure- Returns:
- This figures next point
-
onAddHeat
protected int onAddHeat(int heat, boolean internal, Thing source)Returns a fifth of original heat gain. Big Boss is almost immune to heat.
-
onAfterDeath
protected void onAfterDeath(Point p, AnimationInfo animation)
Called, directly after the figure dies and its point is unoccupied. Places an ItemSecretLevel, that is activated for 8 rounds.- Overrides:
onAfterDeathin classFigure- Parameters:
p- The pointanimation- T-he AnimationInfo
-
calculatePointRating
protected int calculatePointRating(Point p)
Gets the point rating for a given point during next point calculation - Returns -100000 for points on the edge of the field, otherwise supermethods return value.- Overrides:
calculatePointRatingin classComputerFigure- Parameters:
p- the point.- Returns:
- The point rating.
-
getNextPoint
public Point getNextPoint()
Gets the next point BigBoss wants to move to.- Returns:
- The next point.
-
wantsToUseItem
public boolean wantsToUseItem()
This method is called each round, if the figure has an item, to check, if the item should be used.- Overrides:
wantsToUseItemin classFigure- Returns:
- true, if this figure wants to use it's item.
-
doSpecialUpdate
protected void doSpecialUpdate(AnimationInfo animation)
Updates after each round. Drops any item that might have been picked up. Checks for the FlameThrower effect and loads a rocket, if all drones are dead.- Overrides:
doSpecialUpdatein classComputerFigure- Parameters:
animation- The AnimationInfo.
-
reInit
protected void reInit(Field field)
Reinitializes the figure after each level.
-
getHasFiredDirection
public int getHasFiredDirection()
Gets the direction constant in which big boss has fired.- Returns:
- Direction in which BigBoss has fired.
-
hasJustFired
public boolean hasJustFired()
Checks, if BigBoss has just fired.- Returns:
- true, if has just fired.
-
-