ScummVM API documentation
Ultima::Ultima4::Creature Class Reference

#include <creature.h>

Inheritance diagram for Ultima::Ultima4::Creature:
Ultima::Ultima4::Object Ultima::Ultima4::PartyMember Ultima::Ultima4::Person

Public Member Functions

 Creature (MapTile tile=MapTile(0))
 
void load (const ConfigElement &conf)
 
virtual Common::String getName () const
 
virtual const Common::StringgetHitTile () const
 
virtual const Common::StringgetMissTile () const
 
CreatureId getId () const
 
CreatureId getLeader () const
 
virtual int getHp () const
 
virtual int getXp () const
 
virtual const Common::StringgetWorldrangedtile () const
 
SlowedType getSlowedType () const
 
int getEncounterSize () const
 
byte getResists () const
 
void setName (Common::String s)
 
void setHitTile (const Common::String &t)
 
void setMissTile (const Common::String &t)
 
virtual void setHp (int points)
 
bool isGood () const
 
bool isEvil () const
 
bool isUndead () const
 
bool leavesChest () const
 
bool isAquatic () const
 
bool wanders () const
 
bool isStationary () const
 
bool flies () const
 
bool teleports () const
 
bool swims () const
 
bool sails () const
 
bool walks () const
 
bool divides () const
 
bool spawnsOnDeath () const
 
bool canMoveOntoCreatures () const
 
bool canMoveOntoPlayer () const
 
bool isAttackable () const
 
bool willAttack () const
 
bool stealsGold () const
 
bool stealsFood () const
 
bool negates () const
 
bool camouflages () const
 
bool ambushes () const
 
bool isIncorporeal () const
 
bool hasRandomRanged () const
 
bool leavesTile () const
 
bool castsSleep () const
 
bool isForceOfNature () const
 
int getDamage () const
 
const Common::StringgetCamouflageTile () const
 
void setRandomRanged ()
 
int setInitialHp (int hp=-1)
 
bool specialAction ()
 
bool specialEffect ()
 
void act (CombatController *controller)
 
virtual void addStatus (StatusType status)
 
void applyTileEffect (TileEffect effect)
 
virtual int getAttackBonus () const
 
virtual int getDefense () const
 
bool divide ()
 
bool spawnOnDeath ()
 
virtual CreatureStatus getState () const
 
StatusType getStatus () const
 
bool isAsleep () const
 
bool hideOrShow ()
 
CreaturenearestOpponent (int *dist, bool ranged)
 
virtual void putToSleep ()
 
virtual void removeStatus (StatusType status)
 
virtual void setStatus (StatusType status)
 
virtual void wakeUp ()
 
virtual bool applyDamage (int damage, bool byplayer=true)
 
virtual bool dealDamage (Creature *m, int damage)
 
- Public Member Functions inherited from Ultima::Ultima4::Object
 Object (Type type=UNKNOWN)
 
MapTilegetTile ()
 
MapTilegetPrevTile ()
 
const CoordsgetCoords () const
 
const CoordsgetPrevCoords () const
 
ObjectMovementBehavior getMovementBehavior () const
 
Type getType () const
 
bool hasFocus () const
 
bool isVisible () const
 
bool isAnimated () const
 
void setTile (MapTile t)
 
void setTile (Tile *t)
 
void setPrevTile (MapTile t)
 
void setCoords (Coords c)
 
void setPrevCoords (Coords c)
 
void setMovementBehavior (ObjectMovementBehavior b)
 
void setType (Type t)
 
void setFocus (bool f=true)
 
void setVisible (bool v=true)
 
void setAnimated (bool a=true)
 
void setMap (class Map *m)
 
MapgetMap ()
 
void remove ()
 
bool setDirection (Direction d)
 
void animateMovement ()
 

Protected Attributes

Common::String _name
 
Common::String _rangedHitTile
 
Common::String _rangedMissTile
 
CreatureId _id
 
Common::String _camouflageTile
 
CreatureId _leader
 
int _baseHp
 
int _hp
 
StatusList _status
 
int _xp
 
byte _ranged
 
Common::String _worldRangedTile
 
bool _leavesTile
 
CreatureAttrib _mAttr
 
CreatureMovementAttrib _movementAttr
 
SlowedType _slowedType
 
int _encounterSize
 
byte _resists
 
CreatureId _spawn
 
- Protected Attributes inherited from Ultima::Ultima4::Object
MapTile _tile
 
MapTile _prevTile
 
Coords _coords
 
Coords _prevCoords
 
ObjectMovementBehavior _movementBehavior
 
Type _objType
 
Std::deque< class Map * > _maps
 
bool _focused
 
bool _visible
 
bool _animated
 

Additional Inherited Members

- Public Types inherited from Ultima::Ultima4::Object
enum  Type { UNKNOWN, CREATURE, PERSON }
 

Detailed Description

Creature Class Definition

  • split into a CreatureType (all the settings for a particular creature e.g. orc) and Creature (a specific creature instance)
  • creatures can be looked up by name, ids can probably go away

Constructor & Destructor Documentation

◆ Creature()

Ultima::Ultima4::Creature::Creature ( MapTile  tile = MapTile(0))

Creature class implementation

Member Function Documentation

◆ specialAction()

bool Ultima::Ultima4::Creature::specialAction ( )

Performs a special action for the creature Returns true if the action takes up the creatures whole turn (i.e. it cant move afterwords)

◆ specialEffect()

bool Ultima::Ultima4::Creature::specialEffect ( )

Performs a special effect for the creature Returns true if something special happened, or false if nothing happened

◆ addStatus()

virtual void Ultima::Ultima4::Creature::addStatus ( StatusType  status)
virtual

Add status effects to the creature, in order of importance

Reimplemented in Ultima::Ultima4::PartyMember.

◆ hideOrShow()

bool Ultima::Ultima4::Creature::hideOrShow ( )

Hides or shows a camouflaged creature, depending on its distance from the nearest opponent

◆ applyDamage()

virtual bool Ultima::Ultima4::Creature::applyDamage ( int  damage,
bool  byplayer = true 
)
virtual

Applies damage to the creature. Returns true if the creature still exists after the damage has been applied or false, if the creature was destroyed

If byplayer is false (when a monster is killed by walking through fire or poison, or as a result of jinx) we don't report experience on death

Reimplemented in Ultima::Ultima4::PartyMember.


The documentation for this class was generated from the following file: