Base class describing a BB player. More...
#include <Player.hh>

Public Types | |
| typedef std::vector< enum eSkill > | SkillList |
Public Member Functions | |
| Player (const MsgPlayerCreate *m) | |
| int | getId () const |
| int | getTeamId () const |
| const Coordinates & | getCoordinates () const |
| const std::string & | getName () const |
| const std::string & | getPositionName () const |
| int | getMa () const |
| Get Movement Allowance. | |
| int | getMaRemain () const |
| Get Movement Allowance Remaining. | |
| int | getSt () const |
| Get Strenght. | |
| int | getAg () const |
| Get Agility. | |
| int | getAv () const |
| Get Armour Value. | |
| enum eStatus | getStatus () const |
| Get player status. | |
| bool | hasPlayed () const |
| Check if the player has performed an action this turn. | |
| void | setHasPlayed () |
| Set the 'has played this turn' marker. | |
| bool | hasBlocked () const |
| Check if the player has performed a block during a blitz action. | |
| void | setHasBlocked () |
| Set the 'has blocked during this blitz action' marker. | |
| enum eAction | getAction () const |
| Return the action of this player. | |
| void | setAction (enum eAction action) |
| Set the action. | |
| bool | hasSkill (enum eSkill skill) const |
| Check if this player has this skill. | |
| const SkillList & | getSkillList () const |
| Get the list of skills. | |
| bool | hasUsedSkill (enum eSkill skill) const |
| Check if this player has used this skill. | |
| void | useSkill (enum eSkill skill) |
| Mark the skill as used for this turn. | |
| bool | hasTackleZone () const |
| Check if this player has a tacle zone. | |
| void | lostTackleZone () |
| Set the 'has lost his tackle zone' marker with skills like "Bone-head" or "Really Stupid". | |
| void | resetTackleZone () |
| Reset the tackle zone marker. | |
| virtual void | resetTurn () |
| Called on new turn. | |
Static Public Member Functions | |
| static const char * | stringify (enum eStatus status) |
| Get a stringified version of enum eStatus. | |
| static const char * | stringify (enum eAction action) |
| Get a stringified version of enum eAction. | |
| static const char * | stringify (enum eEffort effort) |
| Get a stringified version of enum eEffort. | |
| static const char * | stringify (enum eSkill skill) |
| Get a stringified version of enum eSkill. | |
Protected Member Functions | |
| virtual void | printDebug (std::ostream &os) const |
Protected Attributes | |
| int | id_ |
| Player unique identifier. | |
| int | team_id_ |
| Team that this player belongs to (0 or 1). | |
| Coordinates | coord_ |
| Coordinates on the field. Read-only, please. | |
| std::string | name_ |
| Player name. | |
| std::string | position_name_ |
| Player position name (lineman, ...). | |
| enum eStatus | status_ |
| Current player status (standing/prone/Stunned/KO...). | |
| int | ma_ |
| int | st_ |
| int | ag_ |
| int | av_ |
| int | ma_remain_ |
| bool | has_blocked_ |
| bool | has_played_ |
| enum eAction | action_ |
| bool | will_prone_ |
| bool | has_tackle_zone_ |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Player &p) |
Base class describing a BB player.
| const Player::SkillList & Player::getSkillList | ( | ) | const [inline] |
Get the list of skills.
hasSkill. | enum eStatus Player::getStatus | ( | ) | const [inline] |
Get player status.
References status_.
Referenced by Api::actionPossibleNumber(), sdlvisu::VisuPlayer::beginTurn(), CPlayer::block(), Api::blockDicesNumber(), Api::doGiveBall(), Api::doPlaceTeam(), Api::effortPossibleNumber(), CPlayer::foul(), CPlayer::handoff(), sdlvisu::VisuPlayer::update(), and sdlvisu::VisuPlayer::updateStatus().
| bool Player::hasSkill | ( | enum eSkill | skill | ) | const [inline] |
Check if this player has this skill.
| skill | Skill to check for. |
Referenced by Api::doUseSkill(), SPlayer::finishBlockAction(), Api::moveDifficulty(), SPlayer::resolveBlockBothDownAttacker(), SPlayer::resolveBlockBothDownDefender(), SPlayer::resolveBlockDice(), Api::throwDifficulty(), SPlayer::tryDodge(), and SPlayer::tryThrow().
| bool Player::hasUsedSkill | ( | enum eSkill | skill | ) | const [inline] |
Check if this player has used this skill.
| skill | Skill to check for. |
Referenced by SPlayer::finishBlockAction(), SPlayer::resolveBlockBothDownAttacker(), and SPlayer::resolveBlockDice().
| void Player::lostTackleZone | ( | ) | [inline] |
Set the 'has lost his tackle zone' marker with skills like "Bone-head" or "Really Stupid".
1.6.3