#include <dungeon_monster.h>
Public Member Functions | |
DungeonMonster (Ultima1Game *game, Maps::MapBase *map, DungeonWidgetId monsterId, int hitPoints, const Point &pt) | |
DungeonMonster (Ultima1Game *game, Maps::MapBase *map) | |
~DungeonMonster () override | |
DungeonWidgetId | id () const |
bool | isBlockingView () const override |
void | synchronize (Common::Serializer &s) override |
void | draw (Shared::DungeonSurface &s, uint distance) override |
void | update (bool isPreUpdate) override |
CanMove | canMoveTo (const Point &destPos) override |
void | attackParty () override |
void | attackMonster (uint effectNum, uint agility, uint damage) |
Public Member Functions inherited from Ultima::Ultima1::Widgets::DungeonWidget | |
DungeonWidget (Ultima1Game *game, Maps::MapBase *map, DungeonWidgetId widgetId, const Point &pt) | |
DungeonWidget (Ultima1Game *game, Maps::MapBase *map) | |
void | draw (Shared::DungeonSurface &s, uint distance) override |
Public Member Functions inherited from Ultima::Shared::Maps::DungeonWidget | |
DungeonWidget (Game *game, Maps::MapBase *map) | |
DungeonWidget (Game *game, Maps::MapBase *map, const Point &pt, Direction dir=DIR_NONE) | |
DungeonWidget (Game *game, Maps::MapBase *map, const Common::String &name, const Point &pt, Direction dir=DIR_NONE) | |
~DungeonWidget () override | |
Public Member Functions inherited from Ultima::Shared::Maps::MapWidget | |
MapWidget (Game *game, MapBase *map) | |
MapWidget (Game *game, MapBase *map, const Point &pt, Direction dir=DIR_NONE) | |
MapWidget (Game *game, MapBase *map, const Common::String &name, const Point &pt, Direction dir=DIR_NONE) | |
~MapWidget () override | |
virtual const char * | getClassName () const |
void | addInfoMsg (const Common::String &text, bool newLine=true, bool replaceLine=false) |
virtual uint | getTileNum () const |
virtual bool | isBlocking () const |
virtual void | moveTo (const Point &destPos, Direction dir=DIR_NONE) |
Public Member Functions inherited from Ultima::Shared::BaseObject | |
virtual ::Ultima::Shared::ClassDef | getType () const |
bool | isInstanceOf (const ClassDef &classDef) const |
Public Member Functions inherited from Ultima::Shared::Maps::DungeonCreature | |
DungeonCreature (Game *game, MapBase *map) | |
DungeonCreature (Game *game, MapBase *map, int hitPoints) | |
~DungeonCreature () override | |
Public Member Functions inherited from Ultima::Shared::Maps::Creature | |
Creature (Game *game, MapBase *) | |
Creature (Game *game, MapBase *, int hitPoints) | |
virtual | ~Creature () |
void | synchronize (Common::Serializer &s) |
bool | isDead () const |
virtual bool | subtractHitPoints (uint amount) |
Static Public Member Functions | |
static Shared::Maps::MapWidget::CanMove | canMoveTo (Shared::Maps::MapBase *map, MapWidget *widget, const Point &destPos) |
Static Public Member Functions inherited from Ultima::Ultima1::Widgets::DungeonWidget | |
static void | drawWidget (Graphics::ManagedSurface &s, DungeonWidgetId widgetId, uint distance, byte color) |
Static Public Member Functions inherited from Ultima::Shared::Maps::MapWidget | |
static Direction | directionFromKey (Common::KeyCode keycode) |
Static Public Member Functions inherited from Ultima::Shared::BaseObject | |
::Ultima::Shared::ClassDef | type () |
Protected Member Functions | |
void | movement () override |
Protected Member Functions inherited from Ultima::Ultima1::Widgets::DungeonWidget | |
Ultima1Game * | getGame () const |
Maps::MapBase * | getMap () const |
Protected Member Functions inherited from Ultima::Shared::Maps::Creature | |
virtual uint | attackDistance () const |
Additional Inherited Members | |
Public Types inherited from Ultima::Shared::Maps::MapWidget | |
enum | CanMove { UNSET = 0, YES = 1, NO = 2 } |
Public Attributes inherited from Ultima::Ultima1::Widgets::DungeonWidget | |
Common::String | _name |
Public Attributes inherited from Ultima::Shared::Maps::MapWidget | |
Point | _position |
Direction | _direction |
Common::String | _name |
CLASSDEF | |
Protected Attributes inherited from Ultima::Ultima1::Widgets::DungeonWidget | |
DungeonWidgetId | _widgetId |
Protected Attributes inherited from Ultima::Shared::Maps::MapWidget | |
Game * | _game |
MapBase * | _map |
Protected Attributes inherited from Ultima::Shared::Maps::Creature | |
int | _hitPoints |
bool | _isAttacking |
Implements monsters within the dungeons
Ultima::Ultima1::Widgets::DungeonMonster::DungeonMonster | ( | Ultima1Game * | game, |
Maps::MapBase * | map, | ||
DungeonWidgetId | monsterId, | ||
int | hitPoints, | ||
const Point & | pt | ||
) |
Constructor
Ultima::Ultima1::Widgets::DungeonMonster::DungeonMonster | ( | Ultima1Game * | game, |
Maps::MapBase * | map | ||
) |
Constructor
|
inlineoverride |
Destructor
|
overrideprotectedvirtual |
Handles moving creatures
Reimplemented from Ultima::Shared::Maps::Creature.
|
static |
Returns true if the given widget can move to a given position on the map
|
inline |
Returns the monster's type
|
overridevirtual |
Returns true if a monster blocks the background behind him
Implements Ultima::Shared::Maps::DungeonCreature.
|
overridevirtual |
Handles loading and saving games
Reimplemented from Ultima::Shared::Maps::MapWidget.
|
overridevirtual |
Draw a monster
Implements Ultima::Shared::Maps::DungeonCreature.
|
overridevirtual |
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 from Ultima::Shared::Maps::Creature.
|
overridevirtual |
Returns true if the given widget can move to a given position on the map
Reimplemented from Ultima::Shared::Maps::MapWidget.
|
overridevirtual |
Handles attacking the player
Reimplemented from Ultima::Shared::Maps::Creature.
void Ultima::Ultima1::Widgets::DungeonMonster::attackMonster | ( | uint | effectNum, |
uint | agility, | ||
uint | damage | ||
) |
Handles the player attacking the monster