Contains a collection of helper methods for types.
More...
#include <Type.hpp>
Contains a collection of helper methods for types.
Definition at line 57 of file Type.hpp.
◆ 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
-
defenderType | The 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
-
moveType | The type of move being used |
defenderType | The 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
-
type | The 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
-
type | The 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
-
type | The type being searched |
check | The 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
-
- 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: