Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Friends | List of all members
SWRS::Character Class Reference

proper representation of a character in rules system More...

#include <character.hpp>

Inheritance diagram for SWRS::Character:
Inheritance graph
Collaboration diagram for SWRS::Character:
Collaboration graph

Public Member Functions

bool IsInValidState () const
 returns false if in unusable state
 
 Character (const Character &base)
 copy constructor. condition is copied, but ruleset is link-copied (multiple ownership)
 
int GetMaxWounds () const
 
int GetXP () const
 Amount of experience points accumulated by a particular character.
 
int SetMaxWounds (int _w)
 set max amount of wounds for character
 
int SetXP (int XP)
 set XP value for a character (effects of lowering XP rating are undefined);
 
int GrantXP (int XP)
 grant XP to a particular character
 
int GrantTrait (const std::string &id)
 add a trait
 
int RevokeTrait (const std::string &id)
 take trait away
 
int GrantPower (const std::string &id)
 add magical power
 
int RevokePower (const std::string &id)
 remove magical power
 
int IncreaseTrait (const std::string &id)
 increase trait a one die level
 
int DecreaseTrait (const std::string &id)
 decrease trait a one die level
 
int GrantHindrance (const std::string &id)
 add hindrance
 
int RevokeHindrance (const std::string &id)
 remove hindrance
 
int GrantEdge (const std::string &id)
 grant edge
 
int RevokeEdge (const std::string &id)
 revoke edge
 
int SetHindranceSeverity (const std::string &name, int severity)
 some hindrances can be added as minor or major
 
int PrintCharacterSheet () const
 onto stdout
 
const std::string GetCharacterSheet () const
 get character summary as a string
 
const PowerVectorGetPowerVector () const
 all magical powers
 
const PowerVectorGetPossiblePowerVector () const
 what powers are possible
 
const TraitVectorGetTraitVector () const
 return vector of all traits of character
 
const TraitVectorGetPossibleTraitVector () const
 which traits can be added
 
const FeatureVectorGetPossibleEdgeVector () const
 which edges can be added
 
const FeatureVectorGetPossibleHindranceVector () const
 which hindrances can be added
 
const FeatureVectorGetPossibleRaceVector () const
 which races can be selected
 
const FeatureVectorGetHindranceVector () const
 return vector of all edges of a character
 
const FeatureVectorGetEdgeVector () const
 return vector of all edges
 
int GetSkillsPointValue () const
 get value in point build system of allocated skills
 
int GetAttributesPointValue () const
 get value in point build system of allocated attributes
 
int GetSkillsPointsLeft () const
 get amount of points left for attributes
 
int GetAttributesPointsLeft () const
 for point build system
 
bool GetPointLimitEnabled () const
 is point limit enabled ? (for editor)
 
void SetPointLimitEnabled (bool pl)
 enable point limit
 
const TraitGetTrait (unsigned int id) const __attribute__((deprecated))
 
const TraitGetTrait (const std::string &name) const
 
int GetCharisma () const
 
int GetPace () const
 how fast does the character move
 
int GetParry () const
 defensive characteristic dependent of "Fighting" trait
 
int GetToughness () const
 defensive characteristic dependent of "Vigor" trait
 
int GetPowerPoints () const
 for point build system
 
int GetPowerAllowance () const
 for point build system - how many powers can be chosen
 
int GetPowerAllowanceLeft () const
 how many powers are allowed
 
const HindranceGetHindrance (const std::string &name) const
 return pointer to hindrance object of a particular name
 
const EdgeGetEdge (const std::string &name) const
 return pointer to edge object of a particular name
 
const PowerGetPower (const std::string &name) const
 return pointer to magical power object of a particular name
 
const std::string & GetName () const
 return individual name of a character
 
void SetName (const std::string &n)
 set name
 
const std::string & GetRace () const
 return race of a particular character (default is human)
 
void SetRace (const std::string &n)
 
int GetNumMinorHindrances () const
 how many major minor hindrances does the character have
 
int GetNumMajorHindrances () const
 how many major major hindrances does the character have
 
int GetEdgePointsLeft () const
 how many points are there left for edges
 
int GetSkillsPoints () const
 how many points can be allocated to skills
 
int GetAttributesPoints () const
 how many points can be allocated to attributes
 
int GetEdgesPoints () const
 how many points can be allocated to edges
 
int GetRequiredSkillsPerAttribute (const std::string &attr_name) const
 
int GetTraitLevelModifier (const std::string &trait_name) const
 
virtual int GetWounds () const
 get amount of wounds already suffered by a character
 
virtual void SetWounds (int amount)
 set amount of wounds (may decrease them to 0) suffered by character
 
virtual int Wound (int amount)
 inflicit wound upon a character
 
void LockLevel ()
 prevent from decreasing characteristics below current level (after rising they may however be decreaset down to current level)
 
void UnlockLevel ()
 cancel effects of LockLevel
 

Friends

class RulesSystem
 

Detailed Description

proper representation of a character in rules system

Member Function Documentation

int SWRS::Character::GetCharisma ( ) const
inlinevirtual

get charisma of a particular character. default is 0 but can be altered by edges

Implements SWRS::IConstCharacter.

int SWRS::Character::GetMaxWounds ( ) const
inlinevirtual

maximum amount of wounds character can suffer before being assumed as dead (default for savage worlds rules system is 3 but can be defined as more)

Implements SWRS::IConstCharacter.

int SWRS::Character::GetRequiredSkillsPerAttribute ( const std::string &  attr_name) const
inlinevirtual

some hindrances/edges require player to spend certain amount of skill points onto skills linked to particular attributes (i.e. Elderly grants 5 skill points that MUST be spent on skills linked to Smaers)

Implements SWRS::IConstCharacter.

const Trait* SWRS::Character::GetTrait ( unsigned int  id) const
inlinevirtual

return pointer to trait object of given trait ID (0 is returned if character has no such trait)

Implements SWRS::IConstCharacter.

const Trait* SWRS::Character::GetTrait ( const std::string &  name) const
inlinevirtual

return pointer to trait object of given trait name (0 is returned if character has no such trait)

Implements SWRS::IConstCharacter.

int SWRS::Character::GetTraitLevelModifier ( const std::string &  attr_name) const
inlinevirtual

some hindrances decrease particular attributes. I.e. elderly decreases Strength and Vigor by one;

  • this decrease can be also an effect of powers (i.e. debuff spells);

Implements SWRS::IConstCharacter.

void SWRS::Character::SetRace ( const std::string &  n)
inlinevirtual

set race (out of available ones; effects of setting race which doesn't exist in system are undefined)

Implements SWRS::ICharacter.


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