Package com.starpoints.game.item
Class ItemChainExplosion
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Item
-
- com.starpoints.game.item.ItemBigMine
-
- com.starpoints.game.item.ItemChainExplosion
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class ItemChainExplosion extends ItemBigMine
Can be dropped like an ItemBigMine, but performs an chain explosion over all connected blue points starting at the droppoint.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
killCount
Counter for killed enemies.protected int
radius
Radius for painting during countdown.-
Fields inherited from class com.starpoints.game.item.ItemBigMine
clipStr, countDown, DEBUG, dropPoint, explosionSource, maxcountDown, state
-
Fields inherited from class com.starpoints.game.Item
affectsBlue, category, DEFAULT_ITEM_PAINTERCLASS, dieReason, isBomb, isWeapon, pickupClip, pickupText, pointBonus, useClip, user
-
Fields inherited from class com.starpoints.game.Thing
energy, energyFx, energyMaxSoundPlayed, energyModifications, explosionCounter, game, imageName, innerColor, invulnCount, isAffectedByBlack, isAffectedByGray, level, MAX_TEXTPAINT, maxEnergy, nextID, outerColor, p, shieldCount, status, text
-
-
Constructor Summary
Constructors Constructor Description ItemChainExplosion()
Creates a new ItemChainExplosion.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doDetonate()
Starts a chain explosion.protected void
doSpecialUpdate(AnimationInfo animation)
Updates the radius, if active.int
getItemRating()
Returns an item value for ComputerFigures rating in the items category.java.lang.String
getPainterClassname()
Gets the fully qualified classname of the Painter to use for this item (in 2D game).void
onEnemyKilled(Figure enemy, int round, DieReason reason, AnimationInfo animation)
Called, if the thing killed an enemy.-
Methods inherited from class com.starpoints.game.item.ItemBigMine
addStateProperties, detonate, die, getCategory, getCountDown, getDetonationPower, getPickupText, getState, isActive, isBomb, onBeHitByItem, onBePickedUp, onBeUsed, onExplode, performFieldEffect
-
Methods inherited from class com.starpoints.game.Item
affectsBlue, bePickedUp, beUsed, bombPlaced, createState, entersColor, explodes, gainsEnergy, gainsPermanentItem, gainsSlots, getDieReason, getDrawText, getItemRating, getMoveAnimationLength, getName, getPickUpClip, getPointBonus, getRamPower, getUseClip, getUser, heatChanges, is3DItem, isAffectedByColor, isAvailableInEditor, isRammed, isRocketTarget, isStunned, isWeapon, killedEnemy, losesEnergy, losesItem, losesPermanentItem, lostPermanentItem, onBeforeDie, onDrop, onHitItem, onLevelFinished, pickesUpBomb, pickesUpExplosive, pickesUpItem, pointsChange, pointSumChanges, removeAfterLevel, retrieveState, rocketStarted, setUser, startsHovering, staysOnColor, toString, updateExplodingStatus, updateThing, usesItem, visibilityChanges
-
Methods inherited from class com.starpoints.game.Thing
addEnergy, addShielding, clearTexts, displayText, displayText, entersColor, equals, getColor, getEnergy, getEnergyMaxCount, getExplosionCounter, getField, getGame, getID, getImageName, getInnerColor, getInvulnerableRounds, getLevel, getMaxEnergy, getNextID, getOuterColor, getPoint, getShadowColor, getShield, getStateObject, getStatus, getText, getTextColor, getTextPaintCount, getX, getY, hashCode, invulnerable, isAffectedByBlack, isAffectedByGray, isDestroyed, isExploding, isInvulnerable, isOK, isShowingEnergyFx, removeEnergy, retrieveState, setEnergy, setEnergyMaxCount, setGame, setMaxEnergy, setPoint, setStatus, staysOnColor, stepText, updateEnergy
-
-
-
-
Method Detail
-
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 classItemBigMine
- Returns:
- "com.starpoints.painter.arena2D.PainterItemChainExplosion"
-
getItemRating
public int getItemRating()
Returns an item value for ComputerFigures rating in the items category.- Overrides:
getItemRating
in classItemBigMine
- Returns:
- 1000.
-
onEnemyKilled
public void onEnemyKilled(Figure enemy, int round, DieReason reason, AnimationInfo animation)
Called, if the thing killed an enemy.- Overrides:
onEnemyKilled
in classItemBigMine
- Parameters:
enemy
- The killed enemyround
- The round count.reason
- The kill reason.animation
- The AnimationInfo.
-
doDetonate
protected void doDetonate()
Starts a chain explosion.- Overrides:
doDetonate
in classItemBigMine
-
doSpecialUpdate
protected void doSpecialUpdate(AnimationInfo animation)
Updates the radius, if active.- Overrides:
doSpecialUpdate
in classItemBigMine
- Parameters:
animation
- The AnimationInfo.
-
-