ScummVM API documentation
MM::MM1::Character Struct Reference
Inheritance diagram for MM::MM1::Character:
MM::MM1::PrimaryAttributes

Classes

struct  LevelIncrease
 

Public Types

enum  TradeResult { TRADE_SUCCESS, TRADE_NO_ITEM, TRADE_FULL }
 
enum  BuyResult { BUY_SUCCESS, BUY_NOT_ENOUGH_GOLD, BUY_BACKPACK_FULL }
 

Public Member Functions

int spellNumber () const
 
void setSpellNumber (int spellNum)
 
void synchronize (Common::Serializer &s, int portraitNum=-1)
 
bool operator== (const Character &rhs) const
 
void clear ()
 
void gatherGold ()
 
TradeResult trade (int whoTo, int itemIndex)
 
LevelIncrease increaseLevel ()
 
BuyResult buyItem (byte itemId)
 
void updateAttributes ()
 
void updateAC ()
 
void updateSP ()
 
void updateResistances ()
 
Common::String getConditionString () const
 
void rest ()
 
bool hasItem (byte itemId) const
 
size_t getPerformanceTotal () const
 
void loadFaceSprites ()
 
byte statColor (int amount, int threshold) const
 
byte conditionColor () const
 
ConditionEnum worstCondition () const
 
bool hasBadCondition () const
 
- Public Member Functions inherited from MM::MM1::PrimaryAttributes
AttributePairgetAttribute (uint i)
 

Static Public Member Functions

static Common::String getConditionString (ConditionEnum cond)
 

Public Attributes

char _name [16] = { 0 }
 
Sex _sex = MALE
 
Alignment _alignmentInitial = GOOD
 
Alignment _alignment = GOOD
 
Race _race = HUMAN
 
CharacterClass _class = NONE
 
byte _age = 0
 
int _ageDayCtr = 0
 
AttributePair16 _sp
 
AttributePair _spellLevel
 
AttributePair _ac
 
uint32 _exp = 0
 
uint16 _gems = 0
 
uint16 _hpCurrent = 0
 
uint16 _hp = 0
 
uint16 _hpMax = 0
 
uint32 _gold = 0
 
uint8 _food = 0
 
uint8 _condition = 0
 
Inventory _equipped
 
Inventory _backpack
 
Resistances _resistances
 
AttributePair _physicalAttr
 
AttributePair _missileAttr
 
byte _trapCtr = 0
 
byte _quest = 0
 
byte _worthiness = 0
 
byte _alignmentCtr = 0
 
byte _flags [14]
 
byte _portrait = 0
 
Shared::Xeen::SpriteResource _faceSprites
 
byte _numDrinks = 0
 
bool _checked = false
 
bool _canAttack = false
 
int _nonCombatSpell = -1
 
int _combatSpell = -1
 
- Public Attributes inherited from MM::MM1::PrimaryAttributes
AttributePair _intelligence
 
AttributePair _might
 
AttributePair _personality
 
AttributePair _endurance
 
AttributePair _speed
 
AttributePair _accuracy
 
AttributePair _luck
 
AttributePair _level
 

Member Enumeration Documentation

◆ TradeResult

Trade an item to another

◆ BuyResult

Member Function Documentation

◆ spellNumber()

int MM::MM1::Character::spellNumber ( ) const

Get the selected combat/noncombat spell number

◆ setSpellNumber()

void MM::MM1::Character::setSpellNumber ( int  spellNum)

Sets the selected spell

◆ synchronize()

void MM::MM1::Character::synchronize ( Common::Serializer s,
int  portraitNum = -1 
)

Handles save/loading a character

Parameters
portraitNumOverride for portrait to use for a character being loaded from the game defaults

◆ operator==()

bool MM::MM1::Character::operator== ( const Character rhs) const
inline

Equality test

◆ clear()

void MM::MM1::Character::clear ( )

Clearing the character

◆ gatherGold()

void MM::MM1::Character::gatherGold ( )

Gathers the party gold into the character

◆ updateAttributes()

void MM::MM1::Character::updateAttributes ( )

Updates the current attribute levels to match their base values

◆ updateAC()

void MM::MM1::Character::updateAC ( )

Updates the character's AC

◆ updateSP()

void MM::MM1::Character::updateSP ( )

Updates the character's SP

◆ getConditionString() [1/2]

Common::String MM::MM1::Character::getConditionString ( ) const

Gets a character's condition string

◆ rest()

void MM::MM1::Character::rest ( )

Rest the character

◆ hasItem()

bool MM::MM1::Character::hasItem ( byte  itemId) const

Returns true if the character has a given item

◆ getPerformanceTotal()

size_t MM::MM1::Character::getPerformanceTotal ( ) const

Gets the numeric value of every property a character has and totals it up to give a stupid 'performance' value for the party at the end of the game

◆ loadFaceSprites()

void MM::MM1::Character::loadFaceSprites ( )

Loads the face sprites for the character

◆ statColor()

byte MM::MM1::Character::statColor ( int  amount,
int  threshold 
) const

Returns the color to use in enhanced mode to represent the color of a character attribute

◆ conditionColor()

byte MM::MM1::Character::conditionColor ( ) const

Returns the condition color for display

◆ worstCondition()

ConditionEnum MM::MM1::Character::worstCondition ( ) const

Returns the worst condition, if any, a character currently has.

◆ getConditionString() [2/2]

static Common::String MM::MM1::Character::getConditionString ( ConditionEnum  cond)
static

Returns a string for a given condition

◆ hasBadCondition()

bool MM::MM1::Character::hasBadCondition ( ) const
inline

Returns true if the character has a fatal condition


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