|
@@ -0,0 +1,122 @@
|
|
1
|
+#ifndef B_NEW_STRUCT
|
|
2
|
+#define B_NEW_STRUCT
|
|
3
|
+
|
|
4
|
+#include <types.h>
|
|
5
|
+
|
|
6
|
+struct bank_affecting {
|
|
7
|
+ u8 embargo : 3;
|
|
8
|
+ u8 electrify : 1;
|
|
9
|
+ u8 telekinesis: 3;
|
|
10
|
+ u8 magnet_rise : 3;
|
|
11
|
+ u8 heal_block : 3;
|
|
12
|
+ u8 aqua_ring : 1;
|
|
13
|
+ u8 powder : 1;
|
|
14
|
+ u8 smacked_down : 1;
|
|
15
|
+ u8 quashed : 1;
|
|
16
|
+ u8 just_switched_in : 1;
|
|
17
|
+ u8 ally_fainted_last_turn : 1;
|
|
18
|
+ u8 miracle_eyed : 1;
|
|
19
|
+ u8 spiky_shield : 1;
|
|
20
|
+ u8 kings_shield : 1;
|
|
21
|
+ u8 life_orbed : 1;
|
|
22
|
+ u8 sheerforce_bonus : 1;
|
|
23
|
+ u8 eaten_berry : 1;
|
|
24
|
+ u8 sunshine_form : 1;
|
|
25
|
+ u8 cherrim_transformed : 1;
|
|
26
|
+ u8 gastro_acided : 1;
|
|
27
|
+ u8 sky_drop_attacker : 1;
|
|
28
|
+ u8 sky_drop_target : 1;
|
|
29
|
+ u8 gem_boost : 1;
|
|
30
|
+ u8 me_first : 1;
|
|
31
|
+ u8 weakness2 : 1;
|
|
32
|
+ u8 ate_bonus : 1;
|
|
33
|
+ u8 entry_message : 1;
|
|
34
|
+ u8 powertrick : 1;
|
|
35
|
+ u8 kingsshield_damage : 1;
|
|
36
|
+ u8 spikyshield_damage : 1;
|
|
37
|
+ u8 grassyterrain_heal : 1;
|
|
38
|
+ u8 item_used : 1;
|
|
39
|
+ u8 slowstart_duration : 3;
|
|
40
|
+ u8 aegislash_form : 2; //0 = not aegi, 1 = defensive, 2 = attacking
|
|
41
|
+ u8 killer_bank : 2;
|
|
42
|
+ u8 same_move_used : 3;
|
|
43
|
+ u8 wrap_bank : 2;
|
|
44
|
+ u8 move_failed : 1;
|
|
45
|
+ u8 type3 : 5;
|
|
46
|
+ u8 stat_lowered : 1;
|
|
47
|
+ u8 roost : 3;
|
|
48
|
+ u8 bugbite : 1;
|
|
49
|
+ s8 stockpile_def_changes;
|
|
50
|
+ s8 stockpile_sp_def_changes;
|
|
51
|
+ u8 autonomize_uses;
|
|
52
|
+ u16 wish_hp;
|
|
53
|
+};
|
|
54
|
+
|
|
55
|
+struct side_affecting {
|
|
56
|
+ u8 sticky_web : 1;
|
|
57
|
+ u8 sticky_web_done : 1;
|
|
58
|
+ u8 toxic_spikes_psn : 1;
|
|
59
|
+ u8 toxic_spikes_badpsn : 1;
|
|
60
|
+ u8 toxic_spikes_done : 1;
|
|
61
|
+ u8 stealthrock : 1;
|
|
62
|
+ u8 stealthrock_done : 1;
|
|
63
|
+ u8 lucky_chant : 3;
|
|
64
|
+ u8 lucky_chant_bank : 2;
|
|
65
|
+ u8 tailwind : 3;
|
|
66
|
+ u8 tailwind_bank : 2;
|
|
67
|
+ u8 wide_guard : 1;
|
|
68
|
+ u8 quick_guard : 1;
|
|
69
|
+ u8 crafty_shield : 1;
|
|
70
|
+ u8 combo_waterpledge : 1;
|
|
71
|
+ u8 combo_firepledge : 1;
|
|
72
|
+ u8 combo_grasspledge : 1;
|
|
73
|
+ u8 swamp_spd_halving : 3;
|
|
74
|
+ u8 sea_of_fire : 3;
|
|
75
|
+ u8 rainbow : 3;
|
|
76
|
+ u8 mat_block : 1;
|
|
77
|
+ u8 lunardance : 1;
|
|
78
|
+ u8 lunardance_done : 1;
|
|
79
|
+ u8 echo_voice_counter : 3;
|
|
80
|
+ u8 mega_evo_state : 2; //0 = neither mega evolved nor triggered, 1 = triggered to mega evolve(if set, should reset next turn in case poke didn't mega evolve), 2 = mega evolved
|
|
81
|
+};
|
|
82
|
+
|
|
83
|
+struct field_affecting {
|
|
84
|
+ u8 trick_room : 3;
|
|
85
|
+ u8 wonder_room : 3;
|
|
86
|
+ u8 magic_room : 3;
|
|
87
|
+ u8 grassy_terrain : 3;
|
|
88
|
+ u8 electic_terrain : 3;
|
|
89
|
+ u8 misty_terrain : 3;
|
|
90
|
+ u8 ion_deluge : 3;
|
|
91
|
+ u8 gravity : 3;
|
|
92
|
+ u8 round_chosen : 1;
|
|
93
|
+ u8 fairy_lock : 1;
|
|
94
|
+};
|
|
95
|
+
|
|
96
|
+struct various {
|
|
97
|
+ u8 eaten_berry_player : 6;
|
|
98
|
+ u8 eaten_berry_opponent : 6;
|
|
99
|
+ u8 active_bank : 2;
|
|
100
|
+ u8 inverse_battle : 1;
|
|
101
|
+ u8 magicbounce : 1;
|
|
102
|
+ u8 stormdrain : 1;
|
|
103
|
+ u16 var1;
|
|
104
|
+ u16 var2;
|
|
105
|
+ u16 recently_used_item;
|
|
106
|
+ u16 previous_move;
|
|
107
|
+};
|
|
108
|
+
|
|
109
|
+struct custom_battle_struct{
|
|
110
|
+ struct bank_affecting bank_affecting[4];
|
|
111
|
+ struct side_affecting side_affecting[2];
|
|
112
|
+ struct field_affecting field_affecting;
|
|
113
|
+ struct various various;
|
|
114
|
+};
|
|
115
|
+
|
|
116
|
+struct custom_battle_struct_ptr{
|
|
117
|
+ struct custom_battle_struct *ptr;
|
|
118
|
+};
|
|
119
|
+
|
|
120
|
+extern struct custom_battle_struct_ptr custom_battle_struct;
|
|
121
|
+
|
|
122
|
+#endif
|