ScummVM API documentation
Ultima::Shared::Creature Class Reference
Inheritance diagram for Ultima::Shared::Creature:
Ultima::Shared::StandardWidget Ultima::Shared::MapWidget

Public Member Functions

 Creature (Game *game, Map::MapBase *map)
 
 Creature (Game *game, Map::MapBase *map, int hitPoints)
 
 Creature (Game *game, Map::MapBase *map, int hitPoints, const Point &pt, Direction dir=DIR_NONE)
 
 ~Creature () override
 
void synchronize (Common::Serializer &s) override
 
void update (bool isPreUpdate) override
 
bool isDead () const
 
- Public Member Functions inherited from Ultima::Shared::StandardWidget
 StandardWidget (Game *game, Map::MapBase *map)
 
 StandardWidget (Game *game, Map::MapBase *map, const Point &pt, Direction dir=DIR_NONE)
 
 ~StandardWidget () override
 
- Public Member Functions inherited from Ultima::Shared::MapWidget
 MapWidget (Game *game, Map::MapBase *map)
 
 MapWidget (Game *game, Map::MapBase *map, const Point &pt, Direction dir=DIR_NONE)
 
 MapWidget (Game *game, Map::MapBase *map, const Common::String &name, const Point &pt, Direction dir=DIR_NONE)
 
virtual ~MapWidget ()
 
virtual const char * getClassName () const
 
void addInfoMsg (const Common::String &text, bool newLine=true)
 
virtual uint getTileNum () const
 
virtual bool isBlocking () const
 
virtual CanMove canMoveTo (const Point &destPos)
 
virtual void moveTo (const Point &destPos, Direction dir=DIR_NONE)
 

Protected Member Functions

virtual uint attackDistance () const
 
virtual void movement ()
 
virtual void attack ()
 

Protected Attributes

int _hitPoints
 
bool _isAttacking
 
- Protected Attributes inherited from Ultima::Shared::MapWidget
Game_game
 
Map::MapBase_map
 

Additional Inherited Members

- Public Types inherited from Ultima::Shared::MapWidget
enum  CanMove { UNSET = 0, YES = 1, NO = 2 }
 
- Public Attributes inherited from Ultima::Shared::MapWidget
Point _position
 
Direction _direction
 
Common::String _name
 

Constructor & Destructor Documentation

◆ Creature()

Ultima::Shared::Creature::Creature ( Game game,
Map::MapBase map 
)
inline

Constructor

◆ ~Creature()

Ultima::Shared::Creature::~Creature ( )
inlineoverride

Destructor

Member Function Documentation

◆ attackDistance()

virtual uint Ultima::Shared::Creature::attackDistance ( ) const
inlineprotectedvirtual

Returns either the maximum attack distance for a monster, or 0 if the monster is beyond that distance from the player

◆ movement()

virtual void Ultima::Shared::Creature::movement ( )
inlineprotectedvirtual

Handles moving creatures

◆ attack()

virtual void Ultima::Shared::Creature::attack ( )
inlineprotectedvirtual

Handles attacks

◆ synchronize()

void Ultima::Shared::Creature::synchronize ( Common::Serializer s)
overridevirtual

Handles loading and saving games

Reimplemented from Ultima::Shared::MapWidget.

◆ update()

void Ultima::Shared::Creature::update ( bool  isPreUpdate)
overridevirtual

Called to update the widget at the end of a turn

Parameters
isPreUpdateUpdate is called twice in succession during the end of turn update. Once with true for all widgets, then with it false

Reimplemented from Ultima::Shared::MapWidget.

◆ isDead()

bool Ultima::Shared::Creature::isDead ( ) const
inline

True true if the creature is dead


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