#include <creature.h>
Public Member Functions | |
Creature (Game *game, MapBase *) | |
Creature (Game *game, MapBase *, int hitPoints) | |
virtual | ~Creature () |
void | synchronize (Common::Serializer &s) |
virtual void | update (bool isPreUpdate) |
bool | isDead () const |
virtual bool | subtractHitPoints (uint amount) |
Protected Member Functions | |
virtual uint | attackDistance () const |
virtual void | movement () |
virtual void | attackParty () |
Protected Attributes | |
int | _hitPoints |
bool | _isAttacking |
Base class for creatures that can be killed
|
inlinevirtual |
Destructor
|
inlineprotectedvirtual |
Returns either the maximum attack distance for a monster, or 0 if the monster is beyond that distance from the player
Reimplemented in Ultima::Ultima1::Widgets::OverworldMonster, and Ultima::Ultima1::Widgets::Guard.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Handles attacking the player
Reimplemented in Ultima::Ultima1::Widgets::DungeonMonster, Ultima::Ultima1::Widgets::Guard, and Ultima::Ultima1::Widgets::OverworldMonster.
void Ultima::Shared::Maps::Creature::synchronize | ( | Common::Serializer & | s | ) |
Handles loading and saving games
|
virtual |
Called to update the widget at the end of a turn
isPreUpdate | Update is called twice in succession during the end of turn update. Once with true for all widgets, then with it false |
Reimplemented in Ultima::Ultima1::Widgets::DungeonMonster.
|
inline |
True true if the creature is dead
|
virtual |
Removes hit points from a creature
amount | Amount to remove |
Reimplemented in Ultima::Ultima1::Widgets::Person, Ultima::Ultima1::Widgets::Bard, Ultima::Ultima1::Widgets::King, and Ultima::Ultima1::Widgets::Princess.