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

class representing character hindrances [interface] More...

#include <hindrance.hpp>

Inheritance diagram for SWRS::Hindrance:
Inheritance graph
Collaboration diagram for SWRS::Hindrance:
Collaboration graph

Public Types

typedef std::pair< bool,
std::string > 
 first field: do we meet requirements; second: why not?

Public Member Functions

 Hindrance (pFeatureImpl impl)
 default constructor
int GetSeverity () const
 minor or major (or varying/unset)
const HindranceGetHindrance (const std::string &name) const
 return hindrance object of given name. if name matches, return this; 0 otherwise
bool IsSeverityVarying () const
 some hindrances can be defined as minor or major (don't use this in videogame implementations)
void SetMajor ()
 set as major hindrance
void SetMinor ()
void SetLowerInChain (IConstCharacter *lic)
 features are chained so that they can be recursively called to calculate modifiers
const TraitGetTrait (unsigned int id) const
 return trait object - lower in chain
const TraitGetTrait (const std::string &name) const
 return trait - lower in chain
const std::string & GetName () const
 return individual name of a character
const std::string & GetRace () const
 return race of a particular character (default is human)
const std::string & GetFlavorText () const
 return flavor text ("fluff") to be displayed in character editor
int GetCharisma () const
int GetToughness () const
 defensive characteristic dependent of "Vigor" trait
int GetParry () const
 defensive characteristic dependent of "Fighting" trait
int GetPace () const
 how fast does the character move
int GetPowerPoints () const
 for point build system
int GetPowerAllowance () const
 for point build system - how many powers can be chosen
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
const FeatureVectorGetHindranceVector () const
 return vector of all edges of a character
const FeatureVectorGetEdgeVector () const
 return vector of all edges
const TraitVectorGetTraitVector () const
 return vector of all traits of character
const PowerVectorGetPowerVector () const
 all magical powers
int GetMaxWounds () const
int GetXP () const
 Amount of experience points accumulated by a particular character.
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
RequirementsCheckResult DoesCharacterMeetRequirements (const ICharacter &c) const
 check whenever character meets requirements of this particular feature. See documentation for RequrementsCheckResult

Protected Attributes

pFeatureImpl pimpl
 pointer to implementation (PIMPL idiom)

Detailed Description

class representing character hindrances [interface]

Member Function Documentation

int SWRS::Feature::GetCharisma ( ) const

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

Implements SWRS::IConstCharacter.

int SWRS::Feature::GetMaxWounds ( ) const

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::Feature::GetRequiredSkillsPerAttribute ( const std::string &  attr_name) const

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.

int SWRS::Feature::GetTraitLevelModifier ( const std::string &  attr_name) const

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.

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