- 1 Static Public Methods
- 2 Public Methods
- 2.1 string getName()
- 2.2 string getLookDesc()
- 2.3 boolean isExaminable()
- 2.4 boolean isAttackable()
- 2.5 boolean isUseable()
- 2.6 boolean isPickupable()
- 2.7 boolean isDropable()
- 2.8 void deleteEntity()
- 2.9 boolean isPlayerHere()
- 2.10 int isPlayerAdjacent()
- 2.11 Location getLocation()
- 2.12 void moveEntity(string newMapName:String, int newRoomID)
- 2.13 void moveEntityToSameRoomAsPlayer()
- 2.14 void makeCursed()
- 2.15 boolean getCursed()
Static Public Methods
static Entity generate(string entityName)
Generate a new entity of the given type based on the entity type string. Null if unknown entity.
Gets name of entity
Gets look description(the text displayed when looking at item)
Allow player to examine object? If so, the item is shown in the room item list. Otherwise, the object is invisible
Is player allowed to (attempt) to do an attack on this object -- shown when looking at object
Is player shown a use button on this object -- shown when looking at object
Should object display a pick-up option if not yet in inventory? May or may not *actually* be pickupable. To do / attempt to do a pickup, use the Player class.
Should object display a drop item button if is in inventory? May or may not *actually* be dropable. Use Player class to make the actual attempt.
Removes entity from either the inventory or room that it exists in.
If entity is in world, is the player in this same room?
If entity is in the world, is the player in a room adjacent to the one entity is in? If so, which room ID?
If not, room ID is 0. If player is in the same room, then room ID 0 is also returned.
Gets location of this entity. Returns null if entity is in inventory, or otherwise not in world.
void moveEntity(string newMapName:String, int newRoomID)
Moves entity from whereever it is (including inventory) into a particular location. If picking up the item, should use the functions on the Player class instead.
Move entity from wherever it is (including inventory) into the same room as the player is in.
Marks this entity as cursed. In order for this to have any effect, you should write a custom function for playerAttemptDropCheck.
Generally this would be called on start-up. Curse status can be modified by NPCs that can perform purification.
See Weight Pendant for an example of cursed items.
Is this entity cursed?