Package com.starpoints.game.item
Class ItemJungleTree
- java.lang.Object
-
- com.starpoints.game.Thing
-
- com.starpoints.game.Item
-
- com.starpoints.game.item.ItemJungleTree
-
- All Implemented Interfaces:
ItemRammable,java.io.Serializable,java.lang.Cloneable
public class ItemJungleTree extends Item implements ItemRammable
Item that blocks the point it occupies. If any damage is done to the JungleTree, the damage source gets a penalty depending on the damage stregth.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.starpoints.game.Item
affectsBlue, category, DEBUG, 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 ItemJungleTree()Creates a new ItemJungleTree.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbeRammed(Figure rammer, AnimationInfo animation)Called, if the item is rammed by a figure.java.lang.StringgetImageName(AnimationInfo animation)Returns image name.intgetItemRating()Returns an item value for ComputerFigures rating in the items category.intgetRamPower()Gets this items ram power.voidremoveEnergy(int min, Thing source, DieReason reason, AnimationInfo animation)Gives a point penalty to the source (if its a figure).-
Methods inherited from class com.starpoints.game.Item
affectsBlue, bePickedUp, beUsed, bombPlaced, createState, die, doSpecialUpdate, entersColor, explodes, gainsEnergy, gainsPermanentItem, gainsSlots, getCategory, getDieReason, getDrawText, getItemRating, getMoveAnimationLength, getName, getPainterClassname, getPickUpClip, getPickupText, getPointBonus, getRamPower, getUseClip, getUser, heatChanges, is3DItem, isAffectedByColor, isAvailableInEditor, isBomb, isRammed, isRocketTarget, isStunned, isWeapon, killedEnemy, losesEnergy, losesItem, losesPermanentItem, lostPermanentItem, onBeforeDie, onBeHitByItem, onBePickedUp, onBeUsed, onDrop, onEnemyKilled, onHitItem, onLevelFinished, performFieldEffect, 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, addStateProperties, clearTexts, displayText, displayText, entersColor, 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, invulnerable, isAffectedByBlack, isAffectedByGray, isDestroyed, isExploding, isInvulnerable, isOK, isShowingEnergyFx, onExplode, retrieveState, setEnergy, setEnergyMaxCount, setGame, setMaxEnergy, setPoint, setStatus, staysOnColor, stepText, updateEnergy
-
-
-
-
Method Detail
-
getItemRating
public int getItemRating()
Returns an item value for ComputerFigures rating in the items category.- Overrides:
getItemRatingin classItem- Returns:
- -100000.
-
getImageName
public java.lang.String getImageName(AnimationInfo animation)
Returns image name.- Overrides:
getImageNamein classThing- Parameters:
animation- The AnimationInfo.- Returns:
- "item_tree"+imgIndex
-
getRamPower
public int getRamPower()
Gets this items ram power.- Specified by:
getRamPowerin interfaceItemRammable- Returns:
- energy/2.
-
beRammed
public boolean beRammed(Figure rammer, AnimationInfo animation)
Called, if the item is rammed by a figure. Removes rampower/3 energy.- Specified by:
beRammedin interfaceItemRammable- Parameters:
rammer- The rammeranimation- the AnimationInfo.- Returns:
- false because the figure can't enter the items point.
-
removeEnergy
public void removeEnergy(int min, Thing source, DieReason reason, AnimationInfo animation)Gives a point penalty to the source (if its a figure).- Overrides:
removeEnergyin classThing- Parameters:
min- The energy to remove.source- The source for the energy loss.reason- The reason for the energy loss.animation- The AnimationInfo.
-
-