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

implementation of a character in rules system[pIMPL idiom] More...

#include <characterimpl.hpp>

Inheritance diagram for SWRS::CharacterImpl:
Inheritance graph
Collaboration diagram for SWRS::CharacterImpl:
Collaboration graph

Public Member Functions

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
 
 CharacterImpl (const TraitMap &TM, const HindranceMap &HM, const EdgeMap &EM, const RaceMap &RM, const PowerMap &PM)
 constructor (only possible)
 
 ~CharacterImpl ()
 destructor
 
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
 
bool SetHeroic (bool heroic)
 set if character counts as heroic (it affects advancement options etc.)
 
const std::string & GetRace () const
 return race of a particular character (default is human)
 
void SetRace (const std::string &n)
 
int GrantTrait (unsigned int id)
 add a trait
 
int RevokeTrait (unsigned int id)
 take trait away
 
int IncreaseTrait (unsigned int id)
 increase trait a one die level
 
int DecreaseTrait (unsigned int id)
 decrease trait a one die level
 
int GrantTrait (const std::string &id)
 add a trait
 
int RevokeTrait (const std::string &id)
 take trait away
 
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 &name)
 add hindrance
 
int RevokeHindrance (const std::string &name)
 remove hindrance
 
int GrantEdge (const std::string &name)
 grant edge
 
int RevokeEdge (const std::string &name)
 revoke edge
 
int RequestRoll (unsigned int trait_id, int modifier)
 roll on a trait by id
 
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 TraitVectorGetPossibleTraitVector () const
 which traits can be added
 
const TraitVectorGetTraitVector () const
 return vector of all traits of character
 
const FeatureVectorGetPossibleHindranceVector () const
 which hindrances can be added
 
const FeatureVectorGetPossibleEdgeVector () const
 which edges 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
 
bool GetPointLimitEnabled () const
 is point limit enabled ? (for editor)
 
void SetPointLimitEnabled (bool pl)
 enable point limit
 
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
 
int AreAttributesWithinLimits () const
 
const TraitGetTrait (unsigned int id) const
 
const TraitGetTrait (const std::string &name) const
 
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
 
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 std::string & GetName () const
 return individual name of a character
 
void SetName (const std::string &n)
 set name
 
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
 
const PowerVectorGetPowerVector () const
 all magical powers
 
const PowerVectorGetPossiblePowerVector () const
 what powers are possible
 
int GrantPower (const std::string &id)
 add magical power
 
int RevokePower (const std::string &id)
 remove magical power
 
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
 

Protected Member Functions

const std::string & GetTraitName (int id) const
 name of trait by id
 
int GetTraitId (const std::string &name) const
 id of trait by name
 
int GetDefaultSkillsPoints () const
 how many points for skills
 
int GetDefaultAttributesPoints () const
 how many points for attributes
 
int GetDefaultEdgesPoints () const
 how many points for edges
 
int GetExtraPointsFromHindrances () const
 any extra points from having hindrances?
 
int GetExtraPointsFromXP () const
 character advancement
 
int GetExtraPointsUsedOnSkills () const
 how many extra points are already used on skills
 
int GetExtraPointsUsedOnAttributes () const
 how many extra points are already used on attributes
 
int GetExtraPointsUsedOnEdges () const
 how many extra points are already used on edges
 
int GetExtraPointsForSkills () const
 how many extra points are left for skils
 
int GetExtraPointsForAttributes () const
 how many extra points are left for attributes
 
int GetExtraPointsForEdges () const
 how many extra points are left for edges
 

Friends

class Character
 

Detailed Description

implementation of a character in rules system[pIMPL idiom]

Member Function Documentation

int SWRS::CharacterImpl::AreAttributesWithinLimits ( ) const
inline

if both skills and attributes are within point build system limitations?

int CharacterImpl::GetCharisma ( ) const
virtual

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

Implements SWRS::IConstCharacter.

int SWRS::CharacterImpl::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 CharacterImpl::GetRequiredSkillsPerAttribute ( const std::string &  attr_name) const
virtual

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::CharacterImpl::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 * CharacterImpl::GetTrait ( const std::string &  name) const
virtual

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

Implements SWRS::IConstCharacter.

int CharacterImpl::GetTraitLevelModifier ( const std::string &  trait_name) const
virtual

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 CharacterImpl::SetRace ( const std::string &  n)
virtual

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: