Package com.starpoints.game.figure
Class GreenChrystalFigure
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Figure
-
- com.starpoints.game.ComputerFigure
-
- com.starpoints.game.figure.CleverComputerFigure
-
- com.starpoints.game.figure.GreenChrystalFigure
-
- All Implemented Interfaces:
FieldListener
,java.io.Serializable
,java.lang.Cloneable
public class GreenChrystalFigure extends CleverComputerFigure
Computer figure that only works in the green chrystal zone. Destroys a rock on (7/9) and creates a driller on (4/4) 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 GreenChrystalFigure(Game game, FigureInfo figureInfo)
Creates a new GreenChrystalFigure figure on the field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addHeat(int heat, boolean internal, Thing source)
boolean
isAvailableInEditor()
Checks, if this figure is available in level editor.protected boolean
isForbiddenItem(Item i)
Checks, if the item is not allowed to be picked up by this figure.protected boolean
isRamTarget(Figure f)
Checks, if the figure is a good ram target (because it is weaker than this figure).protected void
onAfterDeath(Point p, AnimationInfo animation)
Called, directly after a figure dies and its point is unoccupied.int
onBeforeRemoveEnergy(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, doSpecialUpdate, 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, 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, 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, onAddHeat, 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
-
GreenChrystalFigure
public GreenChrystalFigure(Game game, FigureInfo figureInfo)
Creates a new GreenChrystalFigure figure on the field.- Parameters:
game
- The game.figureInfo
- The FigureInfo.
-
-
Method Detail
-
isForbiddenItem
protected boolean isForbiddenItem(Item i)
Checks, if the item is not allowed to be picked up by this figure.- Overrides:
isForbiddenItem
in 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:
isAvailableInEditor
in classFigure
- Returns:
- false.
-
addHeat
public int addHeat(int heat, boolean internal, Thing source)
-
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 green chrystal, damage is doubled.- Overrides:
onBeforeRemoveEnergy
in 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:
isRamTarget
in classComputerFigure
- Parameters:
f
- The figure- Returns:
- true, if the figure is a good ram target
-
onAfterDeath
protected void onAfterDeath(Point p, AnimationInfo animation)
Called, directly after a figure dies and its point is unoccupied. Places the Driller on (4/4), destroys a rock on (7/9).- Overrides:
onAfterDeath
in classFigure
- Parameters:
p
- The pointanimation
- T-he AnimationInfo
-
-