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

Contains a collection of helper methods for types. More...

#include <Type.hpp>

Static Public Member Functions

static float getSuperMult (Type moveType, Type defenderType)
 Returns the multiplier for if/when a move is super effective. More...
 
static float getStab (Type moveType, Type userType)
 Returns the STAB multiplier for a move. More...
 
static Type legacyTypeToNew (unsigned int ogType)
 Helper method to convert old type ids to the new. More...
 
static bool isType (Type type, Type check)
 Checks whether the given type contains the type to check. More...
 
static std::pair< Type, TypegetTypes (Type type)
 Returns the primary and secondary type of the given composite type. More...
 
static std::string getTypeString (Type type)
 Returns the type as a user-facing text string. More...
 

Detailed Description

Contains a collection of helper methods for types.

Definition at line 57 of file Type.hpp.

Member Function Documentation

◆ getStab()

float core::pplmn::TypeUtil::getStab ( Type  moveType,
Type  userType 
)
static

Returns the STAB multiplier for a move.

@param moveType The type of move being used

Parameters
defenderTypeThe type the attacker is
Returns
float The multiplier for STAB

Definition at line 112 of file Type.cpp.

◆ getSuperMult()

float core::pplmn::TypeUtil::getSuperMult ( Type  moveType,
Type  defenderType 
)
static

Returns the multiplier for if/when a move is super effective.

Parameters
moveTypeThe type of move being used
defenderTypeThe type the defender is
Returns
float The multiplier for if the move is super effective

Definition at line 114 of file Type.cpp.

◆ getTypes()

std::pair< Type, Type > core::pplmn::TypeUtil::getTypes ( Type  type)
static

Returns the primary and secondary type of the given composite type.

Parameters
typeThe type to breakdown
Returns
std::pair<Type, Type> The types contained. May be None

Definition at line 153 of file Type.cpp.

◆ getTypeString()

std::string core::pplmn::TypeUtil::getTypeString ( Type  type)
static

Returns the type as a user-facing text string.

Parameters
typeThe type to get the string for
Returns
std::string The string to show to the user

Definition at line 169 of file Type.cpp.

◆ isType()

static bool core::pplmn::TypeUtil::isType ( Type  type,
Type  check 
)
inlinestatic

Checks whether the given type contains the type to check.

Parameters
typeThe type being searched
checkThe type to check for
Returns
True if type contains the types in check, false otherwise

Definition at line 91 of file Type.hpp.

◆ legacyTypeToNew()

Type core::pplmn::TypeUtil::legacyTypeToNew ( unsigned int  ogType)
static

Helper method to convert old type ids to the new.

Parameters
ogTypeThe old type id
Returns
Type The corresponding new type value

Definition at line 123 of file Type.cpp.


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