-
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
Battle Weather Refactor #5833
base: upcoming
Are you sure you want to change the base?
Battle Weather Refactor #5833
Conversation
Hm looks like it messed up an AI calc
|
Fixed. For Some reason reordering flags caused the AI not seeing that Solar Beam can be used without a charge in weather.
This part was responsible. I hard-coded the solar beam check for sun and it passed fine. |
@ghoulslash thoughts on consolidating
into just |
Pushed a draft version. Still need to clean up and handle damaging weather but let me know if this is acceptable. |
src/battle_util.c
Outdated
#define BATTLE_WEATHER_MESSAGE_STOPPED 0 | ||
#define BATTLE_WEATHER_MESSAGE_TURN 1 | ||
#define BATTLE_WEATHER_ANIMATION 2 | ||
static const u32 sBattleWeatherAttributes[][3] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better as a struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you give me a hint on how I should structure it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to a struct. Let me know if this is what you imagined
(still no clean up)
data/battle_scripts_1.s
Outdated
BattleScript_RainContinuesOrEnds:: | ||
printfromtable gRainContinuesStringIds | ||
@printfromtable gRainContinuesStringIds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those scripts are unused. I just commented stuff out that I already deleted but I didn't want to do any further clean up.
Ready for re-review |
Description
Battler Weather Refactor
Simplifies battle weather flags by removing perma and temp flags. Permanence is checked with
weatherDuration > 0
The advantage is that it is much easier to add new weather flags and it cleans up some code.
Small problem I had that I couldn't solve:
The compiler didn't want to cooperate with this change with the following error message: