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

skills, traits that depends on atteibutes More...

#include <trait.hpp>

Inheritance diagram for SWRS::Skill:
Inheritance graph
Collaboration diagram for SWRS::Skill:
Collaboration graph

Public Member Functions

int GetPointValue () const
 in point build system;
const AttributeGetParent () const
 get parent attribute of skill
const std::string & GetBaseName () const
 Generic name of trait.
void LockLevel ()
 make it impossible to decrease trait below current level
void UnlockLevel ()
 cancel effect of LockLevel;
const std::string & GetRequiredEdge () const
 if an edge is required to posess a trait
const std::string & GetCustomName () const
 return customized name (if exists);
const std::string & GetFlavorText () const
 Get fluff description.
void SetLevelModifier (int i)
const std::string & GetName () const
virtual bool Increase ()
virtual bool Decrease ()
int GetMainDie () const
 if trait is at d6 level, 6 is returned; for d12+2, 12 is returned
bool SetHeroic (bool heroic)
 set if heroic die is used
int Roll (int modifier) const
std::string GetSW () const
 Returns SW description of trait level.
std::string GetSWVerbose () const
 returns detailet version of GetSW()
int PrintSW () const
 print GetSW() to stdout
int PrintVerbal () const
 Print verbal representation of a trait (i.e. "novice (1)" or "skilled (3)")
std::string GetVerbal () const
 Get verbal representation of a trait (i.e. "novice (1)" or "skilled (3)")
int PrintVerbatim () const
 data dump, all modifiers etc to stdout
int GetHalfNumericValue () const
 0-2-3-4-5-6 ; i.e. for purpose of parry/toughness calculation
bool IsUntrained () const
 if it is an untrained characteristic, return true

Protected Member Functions

int GetObjectiveLevel () const
 0 - untrained; 1-d4, 2-d6, 3-d8, 4-d10, 5-d12
void SetCustomName (std::string s)
 set custom name (see above)
virtual int GetMaxObjectiveLevel () const
 For limitations in point build system.
virtual int GetMinObjectiveLevel () const
 For limitations in point build system.

Protected Attributes

int constant_modifier
 from race/edges/whatever
int heroic_die
 roll additional d6 to chose higher result?
int main_die
 proper trait value
bool untrained
 untrained? If so, -2 to both main and heroic die
int level_modifier
 For point build system; affects how real level is calculated.
int min_level
 cannot be decreased below
std::string custom_name
 alternative names of traits
const TraitRecordtrait_record
 data record pointer


class TraitMap

Detailed Description

skills, traits that depends on atteibutes

Member Function Documentation

bool Trait::Decrease ( )

decrease by one level; true is returned if it was impossible; false is returned upon success

const std::string& SWRS::Trait::GetName ( ) const

get trait name; if custom name is set, it is returned; otherwise default name is returned

Implements SWRS::IOption.

bool Trait::Increase ( )

increase by one level; true is returned if it was impossible; false is returned upon success

int Trait::Roll ( int  modifier) const

if roll is marginally successful - result is 0; if roll is failed - result is negative (amount of pips missing to success) if roll is successful over requirement - result is positive (as above).

void Trait::SetLevelModifier ( int  i)

Set level modifier for particular trait (i.e. it may always count as one die higher)

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