暫無描述

battle_structs.h 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #ifndef BATTLE_STRUCT_H_
  2. #define BATTLE_STRUCT_H_
  3. #include <types.h>
  4. struct side_affecting_hword{
  5. u16 reflect_on : 1;
  6. u16 light_screen_on : 1;
  7. u16 unkown1 : 2;
  8. u16 spikes_on : 1;
  9. u16 safeguard_on : 1;
  10. u16 unkown2 : 2;
  11. u16 mist_on : 1;
  12. u16 spikes_damage_done : 1;
  13. };
  14. extern struct side_affecting_hword side_affecting_halfword[2];
  15. struct status_main{
  16. u32 sleep : 3;
  17. u32 poison : 1;
  18. u32 burn : 1;
  19. u32 freeze : 1;
  20. u32 paralysis: 1;
  21. u32 toxic_poison : 1;
  22. u32 poison_counter : 4;
  23. };
  24. union main_status{
  25. u32 int_status;
  26. struct status_main flags;
  27. };
  28. #define STATUS_SLEEP 0x7
  29. #define STATUS_POISON 0x8
  30. #define STATUS_BURN 0x10
  31. #define STATUS_FREEZE 0x20
  32. #define STATUS_PARALYSIS 0x40
  33. #define STATUS_TOXIC_POISON 0x80
  34. struct flags2{
  35. u32 confusion : 3;
  36. u32 flinched : 1;
  37. u32 uproar : 3;
  38. u32 flag_x80 : 1;
  39. u32 bide : 2;
  40. u32 locked_and_confuse : 2;
  41. u32 multiple_turn_move : 1;
  42. u32 trapped_in_wrap : 3;
  43. u32 in_love : 4;
  44. u32 focus_energy : 1;
  45. u32 transformed : 1;
  46. u32 recharge : 1;
  47. u32 raged : 1;
  48. u32 substitute : 1;
  49. u32 destinny_bond : 1;
  50. u32 cant_escape : 1;
  51. u32 nightmare : 1;
  52. u32 cursed : 1;
  53. u32 foresight : 1;
  54. u32 defense_curled : 1;
  55. u32 tormented : 1;
  56. };
  57. struct iv_set
  58. {
  59. u32 iv_hp: 5;
  60. u32 iv_atk: 5;
  61. u32 iv_def: 5;
  62. u32 iv_spd: 5;
  63. u32 iv_sp_atk: 5;
  64. u32 iv_sp_def: 5;
  65. };
  66. struct battle_participant {
  67. u16 poke_species;
  68. u16 atk;
  69. u16 def;
  70. u16 spd;
  71. u16 sp_atk;
  72. u16 sp_def;
  73. u16 moves[4];
  74. struct iv_set ivs;
  75. u8 hp_buff;
  76. u8 atk_buff;
  77. u8 def_buff;
  78. u8 spd_buff;
  79. u8 sp_atk_buff;
  80. u8 sp_def_buff;
  81. u8 acc_buff;
  82. u8 evasion_buff;
  83. u8 ability_id;
  84. u8 type1;
  85. u8 type2;
  86. u8 padd;
  87. u8 current_pp[4];
  88. u16 current_hp;
  89. u8 level;
  90. u8 happiness;
  91. u16 max_hp;
  92. u16 held_item;
  93. u8 poke_name[12];
  94. u8 trainer_name[8];
  95. u32 padd2;
  96. u32 pid;
  97. union main_status status;
  98. struct flags2 status2;
  99. u32 otid;
  100. };
  101. extern struct battle_participant battle_participants[4];
  102. struct side_timer{
  103. u8 reflect_timer;
  104. u8 reflect_bank;
  105. u8 lightscreen_timer;
  106. u8 lightscreen_bank;
  107. u8 mist_timer;
  108. u8 mist_bank;
  109. u8 safeguard_timer;
  110. u8 safeguard_bank;
  111. u8 followme_timer;
  112. u8 followme_target;
  113. u8 spikes_amount;
  114. u8 fieldB;
  115. };
  116. extern struct side_timer battle_side_timers[2];
  117. #endif