3 #include <BLIB/Logging.hpp>
12 float compareSingleEffective(
Type move,
Type ppl) {
89 std::string singleTypeString(
Type type) {
104 return "Party Animal";
116 for (
unsigned int i = 0; i <= 6; ++i) {
117 const Type type =
static_cast<Type>(0x1 << i);
118 if (
isType(ppl, type)) { m *= compareSingleEffective(move, type); }
148 if (ogType < 8)
return static_cast<Type>(0x1 << ogType);
155 for (
Type c : TypeList) {
162 BL_LOG_WARN <<
"Type " << type <<
" contains more than two types";
171 for (
Type t : TypeList) {
173 ts = ts.empty() ? singleTypeString(t) : ts +
" / " + singleTypeString(t);
176 return ts.empty() ?
"???" : ts;
Type
Represents a type that a move or Peoplemon can be. Types may be combined.
Core classes and functionality for both the editor and game.
static std::pair< Type, Type > getTypes(Type type)
Returns the primary and secondary type of the given composite type.
static std::string getTypeString(Type type)
Returns the type as a user-facing text string.
static float getStab(Type moveType, Type userType)
Returns the STAB multiplier for a move.
static float getSuperMult(Type moveType, Type defenderType)
Returns the multiplier for if/when a move is super effective.
static bool isType(Type type, Type check)
Checks whether the given type contains the type to check.
static Type legacyTypeToNew(unsigned int ogType)
Helper method to convert old type ids to the new.