Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. #ifndef BATTLE_LOCAL_RESOURCES
  2. #define BATTLE_LOCAL_RESOURCES
  3.  
  4. /* Battle setup structs */
  5.  
  6. #define poke_size 0x64
  7.  
  8.  
  9. struct battle_config {
  10. // will convert to bits laterrrrr
  11. u8 type;
  12. u8 purge_switch;
  13. u32 *callback_return;
  14. u8 whiteout_switch;
  15. u8 money_switch;
  16. u8 exp_switch;
  17. u8 tut_mode;
  18. u8 ai_difficulty;
  19. u8 env_by_map;
  20. u8 frontier_mode;
  21. u8 opponent_count;
  22. u8 player_control_ally_count;
  23. u8 ai_control_ally_count;
  24. u8 ally_backsprites[3];
  25. };
  26.  
  27. struct battler {
  28. u16 species; // for my laziness
  29. u16 weight;
  30. u8 level;
  31. u8 types[3]; // 3 types, yay gen 6!
  32. u8 ability;
  33. u16 item;
  34. u16 moves_used[4];
  35. u16 move_used_last;
  36. u8 last_move_target
  37. u16 damage_taken;
  38. u8 damage_taken_type;
  39. u8 damaged_by_whom; // u8 damager ID
  40. u16 damage_done; // turn basis
  41. u16 queued_move;
  42. u8 multi_hit; // how many hits so far
  43. u8 stock_pile;
  44. u8 pokemon_bank_id;
  45.  
  46.  
  47. u8 metronome;
  48. u8 toxic; // turns count
  49. u8 leech_seed; //pokemon in which slot gets the HP
  50. u8 disable; // turns remaining
  51. u8 taunt; // turns remaining
  52. u8 torment; // turns remaining
  53. u8 encore; // turns remaining
  54. u8 bide; // turns remaining
  55. u8 mirrorcoat_counter; // activated. 1 = mirror, 2 = counter, 0 = inactive
  56.  
  57. u8 furry_cutter; // times used
  58. u8 rollout_iceball; // times used
  59.  
  60. u8 trap; // duration + dmg
  61. u16 trap_dmg;
  62.  
  63. u32 attack_multiplier : 2;
  64. u32 attack_divider : 2;
  65. u32 defence_multiplier : 2;
  66. u32 defence_divider : 2;
  67. u32 special_attack_multiplier : 2;
  68. u32 special_attack_divider : 2;
  69. u32 special_defence_multiplier : 2;
  70. u32 special_defence_divider : 2;
  71. u32 speed_multiplier : 2;
  72. u32 speed_divider : 2;
  73. u32 evasion_multiplier : 2;
  74. u32 evasion_divider : 2;
  75. u32 accuracy_multiplier : 2;
  76. u32 accuracy_divider : 2;
  77. u32 crit_multiplier : 2;
  78. u32 crit_divider : 2;
  79.  
  80. // statuses and things the user can be under
  81. u16 substitute : 1;
  82. u16 perish_song : 1;
  83. u16 electrify : 1;
  84. u16 bounce : 1;
  85. u16 dig : 1;
  86. u16 dive : 1;
  87. u16 fly : 1;
  88. u16 phantom_force : 1;
  89. u16 shadow_force : 1;
  90. u16 sky_drop : 1;
  91. u16 lock_on_mind_reader : 1;
  92. u16 wide_gaurd : 1;
  93. u16 protect : 1;
  94. u16 influation : 1;
  95. u16 floored : 1; // gravity, magnet rise, ect.
  96. u16 battle_side : 1; // 0 = player side, 1 = opponent side
  97.  
  98. u16 minimize : 1;
  99. u16 defense_curl : 1;
  100. u16 confused : 1;
  101. u16 odor_sleuth : 1;
  102. u16 helping_hand : 1;
  103. u16 charge : 1;
  104. u16 turn_skip : 1;
  105. u16 focus_punch : 1;
  106. u16 outrage : 1;
  107. u16 me_first : 1;
  108. u16 attacked : 1;
  109. u16 gender : 1;
  110. u16 free_space : 5;
  111. };
  112.  
  113. struct field_modifiers {
  114. // holds layers count/activated count per side
  115. u8 spikes[2];
  116. u8 toxic_spikes[2];
  117. u8 stealth_2,ks[2];
  118. u8 sticky_web[2];
  119. u8 fairy_lock[2];
  120. u8 magnetic_flux;
  121. u8 fainted[2]; // something fainted on side
  122.  
  123.  
  124. // turns count or team-wide status inducers
  125. u8 trick_room;
  126. u8 ion_deluge;
  127. u8 gaurd[4]; // [0] used player side, [1] type, ...
  128.  
  129. // type and durations
  130. u8 weather[2];
  131.  
  132. // durations
  133. u8 mud_sport;
  134. u8 water_sport;
  135.  
  136. /*
  137. these arrays are of style:
  138.  
  139. tailwind[0] = 1 if player's side has wind
  140. tailwind[1] = Duration counter for tailwind player
  141. tailwind[2] = 1 if opponent's side has wind
  142. tailwind[3] = Duration counter for tailwind opponent
  143. */
  144. u8 tailwind[4];
  145. u8 reflect[4];
  146. u8 lightscreen[4];
  147. u8 safeguard[4];
  148. u8 terrain[4];
  149. u8 pledge[4];
  150. u8 wish[12];
  151.  
  152. /*
  153. move[0] = 1 if pokemon at slot was choosen as target to recieve
  154. move[1] = duration till attack
  155. */
  156. u8 future_sight[12];
  157. u8 doomdesire[12];
  158. u8 echoed_voice[2]; // times used successively
  159. u8 round[2]; // allies used round.
  160. };
  161.  
  162. struct battle_field {
  163. u8 battle_type;
  164. u8 turn_counter;
  165. struct field_modifiers modifiers;
  166. struct battler battlers[6]; // potential for 6 on field at once
  167. struct pokemon *battle_data[6];
  168. u8 ally[6] : 6;
  169. u8 ally_padding : 2;
  170. };
  171.  
  172. struct pokemon {
  173. u32 PID;
  174. u32 OTID;
  175. u8 name[10];
  176. u16 language;
  177. u8 OT_name[7];
  178. u8 markings;
  179. u16 checksum;
  180. u16 padding_maybe;
  181. u8 data[48];
  182. u32 ailment;
  183. u8 level;
  184. u8 pokerus;
  185. u16 current_hp;
  186. u16 total_hp;
  187. u16 attack;
  188. u16 defense;
  189. u16 speed;
  190. u16 sp_attack;
  191. u16 sp_defense;
  192. };
  193.  
  194. struct pokemon pokemon_bank[12];
  195.  
  196. #endif /* BATTLE_LOCAL_RESOURCES */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement