pokemon/pokemon.hpp
Zack Buhman abe7bde678 graphic: display nearly-complete stats page #1
Type is not displayed because the type names have no
parsers/generators yet.
2023-08-04 03:28:17 +00:00

84 lines
1.3 KiB
C++

#pragma once
#include <cstdint>
#include "gen/pokemon/moves.hpp"
#include "gen/pokemon/types.hpp"
#include "start_size.hpp"
enum struct stat_t {
hit_points,
attack,
defense,
speed,
special,
};
struct base_stat_values_t {
struct {
uint8_t hit_points;
uint8_t attack;
uint8_t defense;
uint8_t speed;
uint8_t special;
};
};
static_assert((sizeof (base_stat_values_t)) == 5);
struct level_move_t {
uint8_t level;
enum move_t::move move;
};
enum struct growth_t {
medium_fast,
slightly_fast,
slightly_slow,
medium_slow,
fast,
slow,
};
struct pokemon_t {
#include "gen/pokemon/pokemon_enum.inc.hpp"
struct evolution_t {
enum type {
item,
level,
trade
};
enum type type;
uint8_t required_item; // fixme
uint8_t required_level;
enum pokemon pokemon;
};
const uint8_t * name;
base_stat_values_t base_stat_values;
type_t types[2];
uint8_t catch_rate;
uint8_t base_exp;
growth_t growth_rate;
struct {
start_size_t front;
start_size_t back;
} pic;
struct {
const level_move_t * moves;
uint8_t length;
} by_level;
struct {
const enum move_t::move * moves;
uint8_t length;
} by_tmhm;
struct {
const evolution_t * evolution;
uint8_t length;
} evolutions;
};
extern const pokemon_t pokemon[];