Package com.starpoints.game.figure
Class BlueChrystalFigure
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Figure
-
- com.starpoints.game.ComputerFigure
-
- com.starpoints.game.figure.CleverComputerFigure
-
- com.starpoints.game.figure.BlueChrystalFigure
-
- All Implemented Interfaces:
FieldListener,java.io.Serializable,java.lang.Cloneable
public class BlueChrystalFigure extends CleverComputerFigure
Computer figure that only works in the blue chrystal zone. Destroys a rock on (9/8) and creates a driller on (8/2) when dying.- See Also:
- Serialized Form
-
-
Field Summary
-
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 BlueChrystalFigure(Game game, FigureInfo figureInfo)Creates a new BlueChrystalFigure figure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeRammed(Figure rammer, int energyLoss, AnimationInfo animation)Performs the effect when this figure is rammed by the rammer or rams him.protected voiddoSpecialUpdate(AnimationInfo animation)This method is called at the end of the regular updateThing()-method.booleandrawState()Checks, if the figure draws items and on figure shielding in 2Dprotected FiguregetClosestEnemy()booleanisAvailableInEditor()Checks, if this figure is available in level editor.protected booleanisForbiddenItem(Item i)Checks, if the item is not allowed to be picked up by this figure.protected booleanisRamTarget(Figure f)Checks, if the figure is a good ram target (because it is weaker than this figure).protected intonAddHeat(int heat, boolean internal, Thing source)Adds no heat - chrystal monsters are immune to heat.protected voidonAfterDeath(Point p, AnimationInfo animation)Called, directly after a figure dies and its point is unoccupied.intonBeforeRemoveEnergy(int min, Thing source, DieReason reason, AnimationInfo animation)Overheat-damage is ignored.-
Methods inherited from class com.starpoints.game.figure.CleverComputerFigure
bombPlaced, calculatePointRating, checkBigMineUsage, checkHurryingBecauseOfEnemyNearby, checkHurryingBecauseOfPointColor, checkIfNewTargetShouldBeSelected, checkRamPowerForUsage, checkRocketUsage, checkShieldingForUsage, determineItemUsage, entersExplosion, findPanicTargetPoint, getBigMineRadius, getFogRating, getHurryReasonString, getIq, getPointRatingInternal, getTargetRating, handleBigMineDetection, handleRocketDetection, hasBombKit, hasCoolGenerator, hasFireExtinguisher, hurry, hurry, isAffectedByBlackInternal, isAffectedByGrayInternal, isApplyingLevelInfoIQ, isDangerous, isHeatSource, isHurryingReason, isInLead, isInTargetDirX, isInTargetDirY, isRocketFirePoint, isVisible, modifyBaseRatingByHeatEffect, modifyBaseRatingByTargetDirection, modifyByBlueColor, modifyByColor, modifyByItem, modifyByRatingModifiers, modifyByUnignorableColors, moveFast, rateOtherItem, ratePermanentItem, rateWeapon, reInit, rocketStarted, selectNewTargetPoint, selectPanicTarget, selectSafeTargetAfterBigMinePlacement, selectTarget, setTarget, stay, stopHurry, updateRatingModifiers, wantsToMove
-
Methods inherited from class com.starpoints.game.ComputerFigure
calculateItemRating, calculateNextPoint, checkEnemy, doCalculateNextPoint, entersExplosion, findClosestEnemy, getDistance, getDistance, isDummy, 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, createState, determineIQ, determineIQ, die, 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, getPainterClassname, 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, 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, wantsToUseItem, win
-
Methods inherited from class com.starpoints.game.Thing
addShielding, addStateProperties, 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
-
BlueChrystalFigure
public BlueChrystalFigure(Game game, FigureInfo figureInfo)
Creates a new BlueChrystalFigure figure.- Parameters:
game- The game.figureInfo- The figure info.
-
-
Method Detail
-
isForbiddenItem
protected boolean isForbiddenItem(Item i)
Checks, if the item is not allowed to be picked up by this figure.- Overrides:
isForbiddenItemin classComputerFigure- Parameters:
i- The item.- Returns:
- true, if item must not be picked up.
-
isAvailableInEditor
public boolean isAvailableInEditor()
Checks, if this figure is available in level editor.- Overrides:
isAvailableInEditorin classFigure- Returns:
- false.
-
getClosestEnemy
protected Figure getClosestEnemy()
-
beRammed
public void beRammed(Figure rammer, int energyLoss, AnimationInfo animation)
Performs the effect when this figure is rammed by the rammer or rams him.
-
onAddHeat
protected int onAddHeat(int heat, boolean internal, Thing source)Adds no heat - chrystal monsters are immune to heat.
-
onBeforeRemoveEnergy
public int onBeforeRemoveEnergy(int min, Thing source, DieReason reason, AnimationInfo animation)Overheat-damage is ignored. Otherwise, if the source is a figure with the blue chrystal, damage is doubled.- Overrides:
onBeforeRemoveEnergyin classFigure- Parameters:
min- The energy to removesource- The source for the energy removalreason- The energy removal reason.animation- The AnimationInfo- Returns:
- The modified energy loss.
-
isRamTarget
protected boolean isRamTarget(Figure f)
Checks, if the figure is a good ram target (because it is weaker than this figure).- Overrides:
isRamTargetin classComputerFigure- Parameters:
f- The figure- Returns:
- true, if the figure is a good ram target
-
drawState
public boolean drawState()
Checks, if the figure draws items and on figure shielding in 2D
-
doSpecialUpdate
protected void doSpecialUpdate(AnimationInfo animation)
This method is called at the end of the regular updateThing()-method. Override this for special update needs.- Overrides:
doSpecialUpdatein classCleverComputerFigure- Parameters:
animation- The AnimationInfo.
-
onAfterDeath
protected void onAfterDeath(Point p, AnimationInfo animation)
Called, directly after a figure dies and its point is unoccupied. Places the Driller on (8/2), destroys a rock on (9/8).- Overrides:
onAfterDeathin classFigure- Parameters:
p- The pointanimation- T-he AnimationInfo
-
-