-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moved scripts array to src/data/battle_move_effects.h #3994
Moved scripts array to src/data/battle_move_effects.h #3994
Conversation
What's the benefit of this? you're just moving scripts from one array to another |
The benefit is that effects will always point to the right script - you won't get errors from the array in BS1 and the EFFECT enums being out of sync and the ide will tell you if there any undefined effects. EDIT: with an array in C, we can also move effect-specific information to it by using structs (such as battle TV scores) but that's just an extra. |
Applied array in battle_util.c and battle_script_commands.c; doesn't build yet...
I'm an idiot sometimes
All works and builds just fine
e0bcc66
to
45eca79
Compare
45eca79
to
2a62e2a
Compare
Also tweaked struct, added macro
Instead of an array in
battle_scripts_1.s
that has to be kept in sync with the enums ininclude/constants/battle_move_effects.h
, defined a structBattleMoveEffect
and created an array of those insrc/data/battle_move_effects.h
.The ordered array in
battle_scripts_1.s
always causes problems whenever there are merges. With the array defined here, the order no longer matters and pain caused by merges should be greatly reduced - and since it's an array in C, it can be expanded to a struct with more information.Description
BattleMoveEffect
struct defined like so for now - makes a reference to the relevant battle script and contains other information such as battle TV scores and AI flags.Discord contact info
The Cancer Fairy/thechurchofcage