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

#include <player.h>

Inheritance diagram for Ultima::Ultima4::PartyMember:
Ultima::Ultima4::Creature Ultima::Ultima4::Script::Provider Ultima::Ultima4::Object

Public Member Functions

 PartyMember (Party *p, SaveGamePlayerRecord *pr)
 
void notifyOfChange ()
 
Common::String translate (Std::vector< Common::String > &parts) override
 
int getHp () const override
 
int getMaxHp () const
 
int getExp () const
 
int getStr () const
 
int getDex () const
 
int getInt () const
 
int getMp () const
 
int getMaxMp () const
 
const WeapongetWeapon () const
 
const ArmorgetArmor () const
 
Common::String getName () const override
 
SexType getSex () const
 
ClassType getClass () const
 
CreatureStatus getState () const override
 
int getRealLevel () const
 
int getMaxLevel () const
 
void addStatus (StatusType status) override
 
void adjustMp (int pts)
 
void advanceLevel ()
 
void applyEffect (TileEffect effect)
 
void awardXp (int xp)
 
bool heal (HealType type)
 
void removeStatus (StatusType status) override
 
void setHp (int hp) override
 
void setMp (int mp)
 
EquipError setArmor (const Armor *a)
 
EquipError setWeapon (const Weapon *w)
 
bool applyDamage (int damage, bool byplayer=false) override
 
int getAttackBonus () const override
 
int getDefense () const override
 
bool dealDamage (Creature *m, int damage) override
 
int getDamage ()
 
const Common::StringgetHitTile () const override
 
const Common::StringgetMissTile () const override
 
bool isDead ()
 
bool isDisabled ()
 
int loseWeapon ()
 
void putToSleep () override
 
void wakeUp () override
 
- Public Member Functions inherited from Ultima::Ultima4::Creature
 Creature (MapTile tile=MapTile(0))
 
void load (const ConfigElement &conf)
 
CreatureId getId () const
 
CreatureId getLeader () 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)
 
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)
 
void applyTileEffect (TileEffect effect)
 
bool divide ()
 
bool spawnOnDeath ()
 
StatusType getStatus () const
 
bool isAsleep () const
 
bool hideOrShow ()
 
CreaturenearestOpponent (int *dist, bool ranged)
 
virtual void setStatus (StatusType status)
 
- 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 ()
 

Static Protected Member Functions

static MapTile tileForClass (int klass)
 

Protected Attributes

SaveGamePlayerRecord_player
 
class Party_party
 
- Protected Attributes inherited from Ultima::Ultima4::Creature
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

Member Function Documentation

◆ notifyOfChange()

void Ultima::Ultima4::PartyMember::notifyOfChange ( )

Notify the party that this player has changed somehow

◆ translate()

Common::String Ultima::Ultima4::PartyMember::translate ( Std::vector< Common::String > &  parts)
overridevirtual

Used to translate script values into something useful

Implements Ultima::Ultima4::Script::Provider.

◆ getMaxMp()

int Ultima::Ultima4::PartyMember::getMaxMp ( ) const

Determine the most magic points a character could have given his class and intelligence.

◆ getRealLevel()

int Ultima::Ultima4::PartyMember::getRealLevel ( ) const

Determine what level a character has.

◆ getMaxLevel()

int Ultima::Ultima4::PartyMember::getMaxLevel ( ) const

Determine the highest level a character could have with the number of experience points he has.

◆ addStatus()

void Ultima::Ultima4::PartyMember::addStatus ( StatusType  status)
overridevirtual

Adds a status effect to the player

Reimplemented from Ultima::Ultima4::Creature.

◆ adjustMp()

void Ultima::Ultima4::PartyMember::adjustMp ( int  pts)

Adjusts the player's mp by 'pts'

◆ advanceLevel()

void Ultima::Ultima4::PartyMember::advanceLevel ( )

Advances the player to the next level if they have enough experience

◆ applyEffect()

void Ultima::Ultima4::PartyMember::applyEffect ( TileEffect  effect)

Apply an effect to the party member

◆ awardXp()

void Ultima::Ultima4::PartyMember::awardXp ( int  xp)

Award a player experience points. Maxs out the players xp at 9999.

◆ heal()

bool Ultima::Ultima4::PartyMember::heal ( HealType  type)

Perform a certain type of healing on the party member

◆ removeStatus()

void Ultima::Ultima4::PartyMember::removeStatus ( StatusType  status)
overridevirtual

Remove status effects from the party member

Reimplemented from Ultima::Ultima4::Creature.

◆ applyDamage()

bool Ultima::Ultima4::PartyMember::applyDamage ( int  damage,
bool  byplayer = false 
)
overridevirtual

Applies damage to a player, and changes status to dead if hit points drop below zero.

Byplayer is ignored for now, since it should always be false for U4. (Is there anything special about being killed by a party member in U5?) Also keeps interface consistent for virtual base function Creature::applydamage()

Reimplemented from Ultima::Ultima4::Creature.

◆ getDamage()

int Ultima::Ultima4::PartyMember::getDamage ( )

Calculate damage for an attack.

◆ getHitTile()

const Common::String& Ultima::Ultima4::PartyMember::getHitTile ( ) const
overridevirtual

Returns the tile that will be displayed when the party member's attack hits

Reimplemented from Ultima::Ultima4::Creature.

◆ getMissTile()

const Common::String& Ultima::Ultima4::PartyMember::getMissTile ( ) const
overridevirtual

Returns the tile that will be displayed when the party member's attack fails

Reimplemented from Ultima::Ultima4::Creature.

◆ loseWeapon()

int Ultima::Ultima4::PartyMember::loseWeapon ( )

Lose the equipped weapon for the player (flaming oil, ranged daggers, etc.) Returns the number of weapons left of that type, including the one in the players hand

◆ putToSleep()

void Ultima::Ultima4::PartyMember::putToSleep ( )
overridevirtual

Put the party member to sleep

Reimplemented from Ultima::Ultima4::Creature.

◆ wakeUp()

void Ultima::Ultima4::PartyMember::wakeUp ( )
overridevirtual

Wakes up the party member

Reimplemented from Ultima::Ultima4::Creature.


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