Package com.starpoints.game.figure
Class BigBossDrone
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Figure
-
- com.starpoints.game.ComputerFigure
-
- com.starpoints.game.figure.CleverComputerFigure
-
- com.starpoints.game.figure.Rocketeer
-
- com.starpoints.game.figure.BigBossDrone
-
- All Implemented Interfaces:
FieldListener,java.io.Serializable,java.lang.Cloneable
public class BigBossDrone extends Rocketeer
Drone Figure for BigBoss. The Drones spawn rockets like Rocketeers, but additionally check, if any other BigBossDrone or the BigBoss is in line of fire before using.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.starpoints.game.figure.Rocketeer
CLEVERROCKET, DROPROCKET, FASTROCKET, figureCount, fireFrequency, GRAYROCKET, itemNr, ROCKET, roundCount, SWIRLROCKET
-
Fields inherited from class com.starpoints.game.figure.CleverComputerFigure
aggressiveness, bigMine, BIGMINE_PLACED, danger, ENEMY_NEARBY, hurryingReason, hurrySpeed, INVULNERABLE, nearestEnemy, purposefulness, ratingModifier, rocket, ROCKET_ACTIVE, target, targetCountDown, targetRadius, targetRating, targets
-
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 BigBossDrone(Game game, FigureInfo fi)Creates a BigBossDrone.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ItemRocketcreateRocket(AnimationInfo animation)Creates a rocketprotected PointdoCalculateNextPoint()This method is called each round, to get the next point for this figure when playing.protected voiddoSpecialUpdate(AnimationInfo animation)This method is called at the end of the regular updateThing()-method.BigBossgetBoss()Gets the boss.java.lang.StringgetImageName(AnimationInfo animation)Gets the image name for this figure.java.lang.StringgetPainterClassname()Gets the fully qualified classname of the Painter to use for this item (in 2D game).protected booleanhasJustFired()Checks, if this drone has just fired.booleanisAvailableInEditor()Checks, if this figure is available in level editor.booleanisDummy()Returns true.protected intonAddHeat(int heat, boolean internal, Thing source)Reduces the heat by factor 5 to prevent drones from heat death.protected voidperformExplodingEffect(AnimationInfo animation)Performs the explosion effect.protected booleanwantsToFire(ItemRocket rocket)Checks, if the drone wants to fire a rocket.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.figure.Rocketeer
addStateProperties, checkRocketUsage, isApplyingLevelInfoIQ, reInit
-
Methods inherited from class com.starpoints.game.figure.CleverComputerFigure
bombPlaced, calculatePointRating, checkBigMineUsage, checkHurryingBecauseOfEnemyNearby, checkHurryingBecauseOfPointColor, checkIfNewTargetShouldBeSelected, checkRamPowerForUsage, checkShieldingForUsage, determineItemUsage, entersExplosion, findPanicTargetPoint, getBigMineRadius, getFogRating, getHurryReasonString, getIq, getPointRatingInternal, getTargetRating, handleBigMineDetection, handleRocketDetection, hasBombKit, hasCoolGenerator, hasFireExtinguisher, hurry, hurry, isAffectedByBlackInternal, isAffectedByGrayInternal, isDangerous, isHeatSource, isHurryingReason, isInLead, isInTargetDirX, isInTargetDirY, isRocketFirePoint, isVisible, modifyBaseRatingByHeatEffect, modifyBaseRatingByTargetDirection, modifyByBlueColor, modifyByColor, modifyByItem, modifyByRatingModifiers, modifyByUnignorableColors, moveFast, rateOtherItem, ratePermanentItem, rateWeapon, rocketStarted, selectNewTargetPoint, selectPanicTarget, selectSafeTargetAfterBigMinePlacement, selectTarget, setTarget, stay, stopHurry, updateRatingModifiers, wantsToMove
-
Methods inherited from class com.starpoints.game.ComputerFigure
calculateItemRating, calculateNextPoint, checkEnemy, entersExplosion, findClosestEnemy, getDistance, getDistance, isForbiddenItem, isRamTarget, isUnwantedItem
-
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, 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, onAfterDeath, 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
-
-
-
-
Constructor Detail
-
BigBossDrone
public BigBossDrone(Game game, FigureInfo fi)
Creates a BigBossDrone.- Parameters:
game- The game.fi- The figure info.
-
-
Method Detail
-
getImageName
public java.lang.String getImageName(AnimationInfo animation)
Gets the image name for this figure.- Overrides:
getImageNamein classFigure- Parameters:
animation- AnimationInfo.- Returns:
- "bb_"+getDirString()
-
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.PainterBigBossDrone"
-
isAvailableInEditor
public boolean isAvailableInEditor()
Checks, if this figure is available in level editor.- Overrides:
isAvailableInEditorin classFigure- Returns:
- false.
-
createRocket
protected ItemRocket createRocket(AnimationInfo animation)
Creates a rocket- Overrides:
createRocketin classRocketeer- Parameters:
animation- The AnimationInfo.- Returns:
- The rocket.
-
doCalculateNextPoint
protected Point doCalculateNextPoint()
This method is called each round, to get the next point for this figure when playing. This dummy figure does nothing the whole game (except for exploding maybe...)- Overrides:
doCalculateNextPointin classComputerFigure- Returns:
- This figures current point
-
onAddHeat
protected int onAddHeat(int heat, boolean internal, Thing source)Reduces the heat by factor 5 to prevent drones from heat death.
-
doSpecialUpdate
protected void doSpecialUpdate(AnimationInfo animation)
This method is called at the end of the regular updateThing()-method. If the number of rounds equal to the fire frequency has passed, since the last item was used, the figure gains a new rocket of the type depending on this rocketeers item nr setting.- Overrides:
doSpecialUpdatein classRocketeer- Parameters:
animation- The AnimationInfo.
-
hasJustFired
protected boolean hasJustFired()
Checks, if this drone has just fired.- Returns:
- Flag, if drone has just fired a rocket.
-
performExplodingEffect
protected void performExplodingEffect(AnimationInfo animation)
Performs the explosion effect.- Overrides:
performExplodingEffectin classRocketeer- Parameters:
animation- The AnimationInfo.
-
getBoss
public BigBoss getBoss()
Gets the boss.- Returns:
- The BigBoss.
-
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.
-
isDummy
public boolean isDummy()
Returns true.- Overrides:
isDummyin classComputerFigure- Returns:
- true.
-
wantsToFire
protected boolean wantsToFire(ItemRocket rocket)
Checks, if the drone wants to fire a rocket.- Parameters:
rocket- The rocket.- Returns:
- false, if the targetline crosses the BigBoss.
-
-