stats.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef __STATS_H__
  2. #define __STATS_H__
  3. #pragma once
  4. typedef enum {
  5. /* Base stats */
  6. STAT_BASE = 0, // Sentry value
  7. STAT_BASE_ATK = 0,
  8. STAT_BASE_DEF,
  9. STAT_BASE_SPD,
  10. /* NOTE! While accessing SPC/APC_AT will do the correct thing for both
  11. * Gen I and Gen II, accessing SPC_DEF for Gen I will return a value
  12. * that is not used in Gen I games. This normally isn't an issue, but
  13. * is a potential gotcha to be aware of.
  14. */
  15. STAT_BASE_SPC,
  16. STAT_BASE_SPC_ATK,
  17. STAT_BASE_SPC_DEF,
  18. STAT_BASE_HP,
  19. STAT_BASE_TYPE,
  20. STAT_BASE_MOVE,
  21. STAT_BASE_GROWTH,
  22. STAT_BASE_GENDER_RATIO,
  23. STAT_BASE_INDEX,
  24. STAT_BASE_END, // Sentry value
  25. /* In-party stats */
  26. STAT = 0, // Sentry value
  27. STAT_ATK = 0,
  28. STAT_DEF,
  29. STAT_SPD,
  30. /* Gen I uses SPC, Gen II uses SPC_ATK and SPC_DEF */
  31. STAT_SPC,
  32. STAT_SPC_ATK,
  33. STAT_SPC_DEF,
  34. STAT_HP,
  35. STAT_END = 7, // Sentry value
  36. STAT_TYPE = 7,
  37. /* Move is left here to line up with the table base stats */
  38. STAT_MOVE,
  39. STAT_EV = 10, // Sentry value
  40. STAT_EV_OFFS = 10,
  41. STAT_ATK_EV = 10,
  42. STAT_DEF_EV,
  43. STAT_SPD_EV,
  44. /* There is only SPC EV, there is no SPC_ATK/DEF. However, for the sake
  45. * of making calculations easier, we pretend there are. This means that
  46. * SPC/SPC_ATK/SPC_DEF calculations all grab the SPC EV.
  47. */
  48. STAT_SPC_EV,
  49. STAT_SPC_ATK_EV,
  50. STAT_SPC_DEF_EV,
  51. STAT_HP_EV = 16,
  52. STAT_EV_END, // Sentry value
  53. STAT_IV = 19,
  54. STAT_IV_OFFS = 20, // Sentry value
  55. STAT_ATK_IV = 20,
  56. STAT_DEF_IV,
  57. STAT_SPD_IV,
  58. /* There is only SPC IV, there is no SPC_ATK/DEF. However, for the sake
  59. * of making calculations easier, we pretend there are. This means that
  60. * SPC/SPC_ATK/SPC_DEF calculations all grab the SPC IV.
  61. */
  62. STAT_SPC_IV,
  63. STAT_SPC_ATK_IV,
  64. STAT_SPC_DEF_IV,
  65. STAT_HP_IV = 26,
  66. STAT_IV_END, // Sentry value
  67. /* These won't ever really be needed in groups */
  68. STAT_LEVEL = 28,
  69. STAT_INDEX,
  70. STAT_NUM,
  71. STAT_CONDITION,
  72. STAT_NICKNAME,
  73. STAT_OT_NAME,
  74. STAT_OT_ID,
  75. STAT_TRAINER_NAME,
  76. STAT_SEL, // which EV/IV calc to use
  77. STAT_EXP,
  78. STAT_HELD_ITEM,
  79. STAT_POKERUS,
  80. } DataStat;
  81. typedef enum {
  82. MOVE_0 = 0,
  83. MOVE_1,
  84. MOVE_2,
  85. MOVE_3,
  86. TYPE_0 = 0,
  87. TYPE_1,
  88. EXP_0 = 0,
  89. EXP_1,
  90. EXP_2,
  91. NONE = 0, // Just a filler value
  92. } DataStatSub;
  93. #endif // __STATS_H__