wyvern.lib.classes
Class Statue

java.lang.Object
  extended bywyvern.kernel.properties.PList
      extended bywyvern.kernel.maps.MapObject
          extended bywyvern.lib.classes.StaticObject
              extended bywyvern.lib.classes.Statue
All Implemented Interfaces:
Broadcaster, GameObject, MethodHookable, PropertyList

public class Statue
extends StaticObject

A petrified monster. You can create one from an existing (living) monster by calling wyvern.kernel.monsters.Petrifier.petrify() on monster.

Version:
1.0, Nov 7, 2000
Author:
Steve Yegge

Field Summary
 
Fields inherited from class wyvern.kernel.maps.MapObject
IN_MAP_EDITOR, listenerList_
 
Fields inherited from class wyvern.kernel.properties.PList
readOnly_
 
Fields inherited from interface wyvern.lib.PropertyList
PROPERTY_PACKAGE
 
Constructor Summary
Statue()
           
Statue(Monster mon)
          Constructs a new Statue from the specified monster.
 
Method Summary
 void createAndSetPetrifiedImage(Monster mon)
          Invokes a Petrifier to create the statue image on disk, then sets our appearance to point to it.
 java.lang.String getMonsterArchetype()
          Returns the path to the archetype of the monster that was turned to stone.
 void initialize()
          Initializes the object's default properties.
 void initWeightFromMonster(Monster mon)
          Sets the statue weight from the monster weight.
 void rememberMonsterArch(Monster mon)
          Remembers the monster type that was used, so we can reconstruct it if necessary.
protected  void setBlockingIfLarge()
          If the statue size is greater than 1x1, make it blocking.
 void setFrameAndDirection(Monster mon)
          Makes sure the statue's animation frame and direction are correct for where the monster was when it froze.
 void setMonster(Monster mon)
          Initializes the statue from the monster's appearance.
 void setShortDescFromMonsterName(Monster mon)
          Sets a short description like "statue of a goblin".
 
Methods inherited from class wyvern.kernel.maps.MapObject
addContainerChangeListener, addDefaultProperty, addMapChangeListener, addMapMotionListener, addMethodHook, addMotionTracker, addObjectTracker, addPrefix, addSuffix, addToMap, bless, broadcast, broadcast, broadcast, broadcast, broadcast, canEnter, canEnterBlockedBy, canMove, canMove, canMoveBlockedBy, canMoveBlockedBy, canMoveTo, canMoveToBlockedBy, checkDrop, curse, cycleFrame, destroy, ensureListenerList, ensureWeight, externalize, fireContainerEntered, fireContainerExited, fireEnteredMap, fireExitedMap, fireMovedInMap, getAlpha, getAppearance, getArchetype, getBaseName, getBaseWeight, getBitmap, getBounds, getCanonicalClassName, getCategory, getContainer, getCreator, getDamagedDescription, getDescription, getDirection, getGenderPossessive, getGenderPronoun, getImage, getImageDescriptor, getImageDescriptors, getLayer, getLocations, getMap, getMapLink, getMaterial, getMaterialDescription, getMover, getOwningPlayer, getParentMap, getPrefixes, getQuantity, getReferenceLoc, getRelativeLocs, getShortDesc, getSuffixes, getTile, getTile, getValue, getWeight, groupString, inContainer, initLocs, inMapEditor, invalidate, invalidateImage, invalidateParent, invalidateText, isAnimated, isAttackable, isBlessed, isCommandable, isCursed, isDamned, isGroupable, isIdentified, isMonster, isMonsterOrPlayer, isPlayer, isTerrain, isUncursed, isUnpaid, isWizard, makeClone, markPaid, markUnpaid, move, occupies, positionAt, positionAtMap, remove, removeContainerChangeListener, removeFromMap, removeMapChangeListener, removeMapMotionListener, removeMethodHook, removeMotionTracker, removeObjectTracker, removePrefix, removeSuffix, runMethodHook, setAlpha, setAnimated, setBitmap, setCategory, setContainer, setDefaultBitmap, setDefaultCategory, setDefaultDesc, setDefaultImage, setDefaultIntProperty, setDefaultLayer, setDefaultMaterial, setDefaultProperty, setDefaultShortDesc, setDirection, setImage, setImage, setLayer, setLocations, setMap, setMapLink, setQuantity, setShape, setSize, setTransientSize, setWeight, setWeight, teleport, toString, updateMapLocation
 
Methods inherited from class wyvern.kernel.properties.PList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, debugProperties, dismantlePropertyList, getDoubleProperty, getInheritedProperty, getInteger, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProfilingInfo, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, transientlyRemoveProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wyvern.lib.PropertyList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, getDoubleProperty, getInheritedProperty, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, transientlyRemoveProperty
 

Constructor Detail

Statue

public Statue()

Statue

public Statue(Monster mon)
Constructs a new Statue from the specified monster.

Method Detail

initialize

public void initialize()
Description copied from interface: GameObject
Initializes the object's default properties. Any GameObject implementation that wishes to initialize itself should do so here, rather than in the constructor. This is because nearly all game objects inherit from an archetype, and the archetype parent pointer isn't set until the object's constructor finishes. This is a good place to add any class-default properties for an object - properties that the object gets regardless of which archetype it inherits from. WARNING: don't forget to call the superclass' initialize() method, or the object may not function properly. For instance, it won't become animated even if it specifies animation parameters in the archetype.

Specified by:
initialize in interface GameObject
Overrides:
initialize in class StaticObject

setMonster

public void setMonster(Monster mon)
Initializes the statue from the monster's appearance. Called from the constructor if you pass in the monster. This should be called from the kernel thread, since it queries a bunch of properties on the monster that need to remain constant while this method is executing.


createAndSetPetrifiedImage

public void createAndSetPetrifiedImage(Monster mon)
Invokes a Petrifier to create the statue image on disk, then sets our appearance to point to it.


setShortDescFromMonsterName

public void setShortDescFromMonsterName(Monster mon)
Sets a short description like "statue of a goblin".

Parameters:
mon - the monster that was petrified

setFrameAndDirection

public void setFrameAndDirection(Monster mon)
Makes sure the statue's animation frame and direction are correct for where the monster was when it froze.


initWeightFromMonster

public void initWeightFromMonster(Monster mon)
Sets the statue weight from the monster weight.


rememberMonsterArch

public void rememberMonsterArch(Monster mon)
Remembers the monster type that was used, so we can reconstruct it if necessary. Sets the monster's archetype as a string property on the statue called "monster-arch".

Parameters:
mon - the monster used to create the statue

setBlockingIfLarge

protected void setBlockingIfLarge()
If the statue size is greater than 1x1, make it blocking.


getMonsterArchetype

public java.lang.String getMonsterArchetype()
Returns the path to the archetype of the monster that was turned to stone. Stored in the "monster-arch" property, which is set in setMonster() if the monster's archetype is non-null.