Peoplemon  0.1.0
Peoplemon 3 game source documentation
Static Public Member Functions | List of all members
core::pplmn::Move Class Reference

Encapsulates the move datastore. More...

#include <Move.hpp>

Static Public Member Functions

static MoveId cast (unsigned int id)
 Converts the given raw id to a move id, or Unknown if invalid. More...
 
static const std::vector< MoveId > & validIds ()
 Returns the list of all valid move ids. More...
 
static void setDataSource (file::MoveDB &source)
 Set the data source for each method. More...
 
static const std::string & name (MoveId move)
 Returns the name of the given move. More...
 
static const std::string & description (MoveId move)
 Returns the description of the given move. More...
 
static Type type (MoveId move)
 Returns the type of the given move. More...
 
static int damage (MoveId move)
 Returns the damage of the given move. More...
 
static int accuracy (MoveId move)
 Returns the accuracy of the given move. More...
 
static int priority (MoveId move)
 Returns the priority of the given move. More...
 
static unsigned int pp (MoveId move)
 Returns the max pp of the given move. More...
 
static bool makesContact (MoveId move)
 Returns whether or not the given move makes physical contact when used. More...
 
static bool isSpecial (MoveId move)
 Returns whether or not the given move is special. More...
 
static MoveEffect effect (MoveId move)
 Returns the effect of the given move. More...
 
static int effectChance (MoveId move)
 Returns the effect chance of the given move. More...
 
static int effectIntensity (MoveId move)
 Returns the effect intensity of the given move. More...
 
static bool affectsUser (MoveId move)
 Returns whether or not the given move affects the user or the opponent. More...
 
static std::string playerAnimationBackground (MoveId move)
 Returns the path to the animation for when the local player uses the move. More...
 
static std::string playerAnimationForeground (MoveId move)
 Returns the path to the animation for when the local player uses the move. More...
 
static std::string opponentAnimationBackground (MoveId move)
 Returns the path to the animation for when the opponent uses the move. More...
 
static std::string opponentAnimationForeground (MoveId move)
 Returns the path to the animation for when the opponent uses the move. More...
 
static MoveId getRandomMove (bool allowRandomEffect=false)
 Returns a random, valid move. Optionally filters moves that have the Random effect. More...
 

Detailed Description

Encapsulates the move datastore.

Definition at line 21 of file Move.hpp.

Member Function Documentation

◆ accuracy()

int core::pplmn::Move::accuracy ( MoveId  move)
static

Returns the accuracy of the given move.

Definition at line 91 of file Move.cpp.

◆ affectsUser()

bool core::pplmn::Move::affectsUser ( MoveId  move)
static

Returns whether or not the given move affects the user or the opponent.

Definition at line 131 of file Move.cpp.

◆ cast()

MoveId core::pplmn::Move::cast ( unsigned int  id)
static

Converts the given raw id to a move id, or Unknown if invalid.

Parameters
idThe id to convert
Returns
MoveId The converted id

Definition at line 37 of file Move.cpp.

◆ damage()

int core::pplmn::Move::damage ( MoveId  move)
static

Returns the damage of the given move.

Definition at line 86 of file Move.cpp.

◆ description()

const std::string & core::pplmn::Move::description ( MoveId  move)
static

Returns the description of the given move.

Definition at line 76 of file Move.cpp.

◆ effect()

MoveEffect core::pplmn::Move::effect ( MoveId  move)
static

Returns the effect of the given move.

Definition at line 116 of file Move.cpp.

◆ effectChance()

int core::pplmn::Move::effectChance ( MoveId  move)
static

Returns the effect chance of the given move.

Definition at line 121 of file Move.cpp.

◆ effectIntensity()

int core::pplmn::Move::effectIntensity ( MoveId  move)
static

Returns the effect intensity of the given move.

Definition at line 126 of file Move.cpp.

◆ getRandomMove()

MoveId core::pplmn::Move::getRandomMove ( bool  allowRandomEffect = false)
static

Returns a random, valid move. Optionally filters moves that have the Random effect.

Parameters
allowRandomEffectTrue to filter randoms, false for all moves
Returns
MoveId A random move

Definition at line 160 of file Move.cpp.

◆ isSpecial()

bool core::pplmn::Move::isSpecial ( MoveId  move)
static

Returns whether or not the given move is special.

Definition at line 111 of file Move.cpp.

◆ makesContact()

bool core::pplmn::Move::makesContact ( MoveId  move)
static

Returns whether or not the given move makes physical contact when used.

Definition at line 106 of file Move.cpp.

◆ name()

const std::string & core::pplmn::Move::name ( MoveId  move)
static

Returns the name of the given move.

Definition at line 71 of file Move.cpp.

◆ opponentAnimationBackground()

std::string core::pplmn::Move::opponentAnimationBackground ( MoveId  move)
static

Returns the path to the animation for when the opponent uses the move.

Parameters
moveThe move to get the animation for
Returns
std::string The full path to the move animation

Definition at line 148 of file Move.cpp.

◆ opponentAnimationForeground()

std::string core::pplmn::Move::opponentAnimationForeground ( MoveId  move)
static

Returns the path to the animation for when the opponent uses the move.

Parameters
moveThe move to get the animation for
Returns
std::string The full path to the move animation

Definition at line 154 of file Move.cpp.

◆ playerAnimationBackground()

std::string core::pplmn::Move::playerAnimationBackground ( MoveId  move)
static

Returns the path to the animation for when the local player uses the move.

Parameters
moveThe move to get the animation for
Returns
std::string The full path to the move animation

Definition at line 136 of file Move.cpp.

◆ playerAnimationForeground()

std::string core::pplmn::Move::playerAnimationForeground ( MoveId  move)
static

Returns the path to the animation for when the local player uses the move.

Parameters
moveThe move to get the animation for
Returns
std::string The full path to the move animation

Definition at line 142 of file Move.cpp.

◆ pp()

unsigned int core::pplmn::Move::pp ( MoveId  move)
static

Returns the max pp of the given move.

Definition at line 101 of file Move.cpp.

◆ priority()

int core::pplmn::Move::priority ( MoveId  move)
static

Returns the priority of the given move.

Definition at line 96 of file Move.cpp.

◆ setDataSource()

void core::pplmn::Move::setDataSource ( file::MoveDB source)
static

Set the data source for each method.

Parameters
sourceThe data source. Must remain in scope

Definition at line 46 of file Move.cpp.

◆ type()

Type core::pplmn::Move::type ( MoveId  move)
static

Returns the type of the given move.

Definition at line 81 of file Move.cpp.

◆ validIds()

const std::vector< MoveId > & core::pplmn::Move::validIds ( )
static

Returns the list of all valid move ids.

Returns
const std::vector<MoveId>& The list of all valid move ids

Definition at line 64 of file Move.cpp.


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