WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Public Member Functions | Public Attributes | List of all members
Character Class Reference

#include <Character.hpp>

Inheritance diagram for Character:
Inheritance graph
[legend]
Collaboration diagram for Character:
Collaboration graph
[legend]

Public Member Functions

 Character ()
 
void init (int _sex=0)
 
void incrementTicks (int=1)
 
virtual void wander ()
 
Texture * currentTexture ()
 
void useItem (Item *item)
 
void giveItem (Item *_item)
 
void consume (Item *_item)
 
void removeFromInventoryGrid (Item *_item)
 
bool marry (Character *)
 
bool canMarry (Character *)
 
CharactergiveBirth ()
 
Vector< Character * > * getDescendants (Vector< Character *> *vDescendants)
 
Vector< Character * > * getRelatives ()
 
void die (enumCauseOfDeath=UNKNOWN)
 
void starve ()
 
std::string getBiography ()
 
std::string getFullName () const
 
std::string getName ()
 
bool isOnMap (int, int)
 
char hasSeen (World_Local *, int, int, bool isSubterranean=false)
 
void revealMap (unsigned int _range)
 
std::string getColumn (std::string _column)
 
std::string getColumnType (std::string _column)
 
void attack (Character *)
 
void getAttacked (Creature *, Creature_Attack *)
 
void initialiseKnowledge ()
 
void updateKnowledge ()
 
bool updateKnowledgeIdle ()
 
- Public Member Functions inherited from WorldObject
 WorldObject ()
 
virtual ~WorldObject ()
 
virtual std::string getExtendedInfo ()
 
int distanceTo (WorldObject *)
 
int distanceFrom (WorldObject *)
 
int distanceTo (int, int)
 
std::string getBaseData ()
 
std::string getSaveData ()
 
void loadData (std::string)
 

Public Attributes

std::string firstName
 
std::string lastName
 
std::string epithet
 
long unsigned int id
 
bool isMale
 
int age
 
int daysCounter
 
int secondsCounter
 
int actionPoints
 
bool isPregnant
 
int pregnantCounter
 
bool isAlive
 
bool isMarried
 
int money
 
short int maxHealth
 
short int health
 
short int hunger
 
short int thirst
 
short int strength
 
short int agility
 
short int charisma
 
short int intelligence
 
short int perception
 
short int endurance
 
short int courage
 
unsigned char skillFishing
 
unsigned char skillMarksmanship
 
bool isFavourite
 
char idleCounter
 
Vector< HasXY2< unsigned long int > *> vMovesToProcess
 
Vector< HasXY2< unsigned long int > *> vMovesToProcessSneak
 
Vector< Item * > vInventory
 
int nPelt
 
int nMeat
 
bool isSneaking
 
Characterfather
 
Charactermother
 
Characterspouse
 
Vector< Character * > vChildren
 
Vector< Character * > vSiblings
 
Vector< Character * > vKills
 
Calendar dateOfBirth
 
Calendar dateOfMarriage
 
Calendar dateOfDeath
 
HasXY birthLocation
 
HasXY deathLocation
 
Tribetribe
 
enumCauseOfDeath causeOfDeath
 
World_Localmap
 
Character_Knowledgeknowledge
 
- Public Attributes inherited from WorldObject
short int x
 
short int y
 
bool isUnderground
 
long unsigned int fullX
 
long unsigned int fullY
 
int worldX
 
int worldY
 
bool stackable
 
double weight
 
double bulk
 
bool blocksView
 
bool blocksMovement
 
bool canCook
 
int chopAmount
 
bool canHarvest
 

Constructor & Destructor Documentation

◆ Character()

Character::Character ( )

Member Function Documentation

◆ attack()

void Character::attack ( Character target)

◆ canMarry()

bool Character::canMarry ( Character c)

◆ consume()

void Character::consume ( Item _item)

◆ currentTexture()

Texture * Character::currentTexture ( )
virtual

Reimplemented from WorldObject.

◆ die()

void Character::die ( enumCauseOfDeath  _causeOfDeath = UNKNOWN)

◆ getAttacked()

void Character::getAttacked ( Creature _creature,
Creature_Attack _atk 
)

◆ getBiography()

std::string Character::getBiography ( )

◆ getColumn()

std::string Character::getColumn ( std::string  _column)

◆ getColumnType()

std::string Character::getColumnType ( std::string  _column)

◆ getDescendants()

Vector< Character * > * Character::getDescendants ( Vector< Character *> *  vDescendants)

◆ getFullName()

std::string Character::getFullName ( ) const

◆ getName()

std::string Character::getName ( )
virtual

Reimplemented from WorldObject.

◆ getRelatives()

Vector< Character * > * Character::getRelatives ( )

◆ giveBirth()

Character * Character::giveBirth ( )

◆ giveItem()

void Character::giveItem ( Item _item)

◆ hasSeen()

char Character::hasSeen ( World_Local _map,
int  _x,
int  _y,
bool  isSubterranean = false 
)

◆ incrementTicks()

void Character::incrementTicks ( int  nTicks = 1)

◆ init()

void Character::init ( int  _sex = 0)

◆ initialiseKnowledge()

void Character::initialiseKnowledge ( )

◆ isOnMap()

bool Character::isOnMap ( int  _mapX,
int  _mapY 
)

◆ marry()

bool Character::marry ( Character c)

◆ removeFromInventoryGrid()

void Character::removeFromInventoryGrid ( Item _item)

◆ revealMap()

void Character::revealMap ( unsigned int  _range)

◆ starve()

void Character::starve ( )

◆ updateKnowledge()

void Character::updateKnowledge ( )

◆ updateKnowledgeIdle()

bool Character::updateKnowledgeIdle ( )

◆ useItem()

void Character::useItem ( Item item)
inline

◆ wander()

void Character::wander ( )
virtual

Member Data Documentation

◆ actionPoints

int Character::actionPoints

◆ age

int Character::age

◆ agility

short int Character::agility

◆ birthLocation

HasXY Character::birthLocation

◆ causeOfDeath

enumCauseOfDeath Character::causeOfDeath

◆ charisma

short int Character::charisma

◆ courage

short int Character::courage

◆ dateOfBirth

Calendar Character::dateOfBirth

◆ dateOfDeath

Calendar Character::dateOfDeath

◆ dateOfMarriage

Calendar Character::dateOfMarriage

◆ daysCounter

int Character::daysCounter

◆ deathLocation

HasXY Character::deathLocation

◆ endurance

short int Character::endurance

◆ epithet

std::string Character::epithet

◆ father

Character* Character::father

◆ firstName

std::string Character::firstName

◆ health

short int Character::health

◆ hunger

short int Character::hunger

◆ id

long unsigned int Character::id

◆ idleCounter

char Character::idleCounter

◆ intelligence

short int Character::intelligence

◆ isAlive

bool Character::isAlive

◆ isFavourite

bool Character::isFavourite

◆ isMale

bool Character::isMale

◆ isMarried

bool Character::isMarried

◆ isPregnant

bool Character::isPregnant

◆ isSneaking

bool Character::isSneaking

◆ knowledge

Character_Knowledge* Character::knowledge

◆ lastName

std::string Character::lastName

◆ map

World_Local* Character::map

◆ maxHealth

short int Character::maxHealth

◆ money

int Character::money

◆ mother

Character* Character::mother

◆ nMeat

int Character::nMeat

◆ nPelt

int Character::nPelt

◆ perception

short int Character::perception

◆ pregnantCounter

int Character::pregnantCounter

◆ secondsCounter

int Character::secondsCounter

◆ skillFishing

unsigned char Character::skillFishing

◆ skillMarksmanship

unsigned char Character::skillMarksmanship

◆ spouse

Character* Character::spouse

◆ strength

short int Character::strength

◆ thirst

short int Character::thirst

◆ tribe

Tribe* Character::tribe

◆ vChildren

Vector<Character*> Character::vChildren

◆ vInventory

Vector<Item*> Character::vInventory

◆ vKills

Vector<Character*> Character::vKills

◆ vMovesToProcess

Vector<HasXY2 <unsigned long int> * > Character::vMovesToProcess

◆ vMovesToProcessSneak

Vector<HasXY2 <unsigned long int> * > Character::vMovesToProcessSneak

◆ vSiblings

Vector<Character*> Character::vSiblings

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