#include <creature.h>
Public Member Functions | |
Creature (MapTile tile=MapTile(0)) | |
void | load (const ConfigElement &conf) |
virtual Common::String | getName () const |
virtual const Common::String & | getHitTile () const |
virtual const Common::String & | getMissTile () const |
CreatureId | getId () const |
CreatureId | getLeader () const |
virtual int | getHp () const |
virtual int | getXp () const |
virtual const Common::String & | getWorldrangedtile () 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::String & | getCamouflageTile () 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 () |
Creature * | nearestOpponent (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) | |
MapTile & | getTile () |
MapTile & | getPrevTile () |
const Coords & | getCoords () const |
const Coords & | getPrevCoords () 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) |
Map * | getMap () |
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 } |
Creature Class Definition
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 can't move afterwards)
bool Ultima::Ultima4::Creature::specialEffect | ( | ) |
Performs a special effect for the creature Returns true if something special happened, or false if nothing happened
|
virtual |
Add status effects to the creature, in order of importance
Reimplemented in Ultima::Ultima4::PartyMember.
bool Ultima::Ultima4::Creature::hideOrShow | ( | ) |
Hides or shows a camouflaged creature, depending on its distance from the nearest opponent
|
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.