pokemon_attribute.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef POKEMON_ATTRIBUTE_H
  2. #define POKEMON_ATTRIBUTE_H
  3. #pragma once
  4. #include <src/include/pokemon_data.h>
  5. typedef enum {
  6. GENDER_MALE,
  7. GENDER_FEMALE,
  8. } Gender;
  9. typedef enum {
  10. GENDER_F0 = 0x00,
  11. GENDER_F12_5 = 0x1F,
  12. GENDER_F25 = 0x3F,
  13. GENDER_F50 = 0x7F,
  14. GENDER_F75 = 0xBF,
  15. GENDER_F100 = 0xFE,
  16. GENDER_UNKNOWN = 0xFF,
  17. } GenderRatio;
  18. /* The gender ratio is a bit value, and if the ATK_IV is less than or equal to
  19. * the gender ratio, the gender is female.
  20. *
  21. * A ratio of 0xff means gender is unknown.
  22. * A ratio of 0x00 is annoyingly special. It either means that pokemon can be
  23. * male only -OR- there is a very small chance the pokemon is female. The
  24. * male only pokemon need to be specifically checked for.
  25. */
  26. const char* pokemon_gender_is_static(PokemonData* pdata, uint8_t ratio);
  27. /* This will return a pointer to a string of the pokemon's current gender */
  28. const char* pokemon_gender_get(PokemonData* pdata);
  29. void pokemon_gender_set(PokemonData* pdata, Gender gender);
  30. const char* pokerus_get_status_str(PokemonData* pdata);
  31. void pokerus_set_strain(PokemonData* pdata, uint8_t strain);
  32. void pokerus_set_days(PokemonData* pdata, uint8_t days);
  33. bool pokemon_is_shiny(PokemonData* pdata);
  34. void pokemon_set_shiny(PokemonData* pdata, bool shiny);
  35. /* Returns ascii char, or 0 if unown is not the current pokemon */
  36. char unown_form_get(PokemonData* pdata);
  37. void unown_form_set(PokemonData* pdata, char letter);
  38. #endif // POKEMON_ATTRIBUTE_H