-
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
Removed gFlingTable from comments and added .flingEffects to src/data/moves_info.h for ai use (and future use?) #6131
base: master
Are you sure you want to change the base?
Conversation
Can you also make it so that the actual effect also reads from this new field instead of just the AI? |
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.
Fill in the PR body.
@@ -4271,27 +4274,29 @@ static u32 AI_CalcMoveEffectScore(u32 battlerAtk, u32 battlerDef, u32 move) | |||
ADJUST_SCORE(DECENT_EFFECT); | |||
break; | |||
case EFFECT_FLING: | |||
/* TODO | |||
switch (gFlingTable[aiData->items[battlerAtk]].effect) | |||
u8 effect = gItemsInfo[gBattleMons[battlerAtk].item].flingEffect; |
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.
"Label followed by a declaration" will fail to compile on some compilers.
if (!CanBeFrozen(battlerDef, TRUE) | ||
|| MoveBlockedBySubstitute(move, battlerAtk, battlerDef)) | ||
ADJUST_SCORE(-10); | ||
case MOVE_EFFECT_FLINCH: |
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.
This should be filled in, other flinching effects already have score adjustments.
I didn't intend to include the truant stuff, but the ai stuff i didn't want to add anything into, i just uncommented everything that was there and fixed the burn code to compile for me. also i dont know how i missed that i skipped 88 |
I might be able to, but I would be better leaving that to someone else. I'll see what I can do. Where would I make changes though? |
I figured out why 88 was skipped in the include file. My branch has Rapid spin still in there, so when i copy pasted onto a fresh branch I didn't realize it wasnt there |
|
I would not accept it on this state, as you're adding unusable move effects. Search for Fling on the repo to see shere you need to do thr changes |
Thanks, completed. To be expanded |
I added actualy fuctionality for the .flingEffect
|
Description
It removes the commented out gFlingTable and instead adds .flingEffect into the moves_info.c file. It gets used by the AI and soon to be used to find the effect of a flung item (to be done)
Images
Shown in #6130 for code, may be slightly outdated
Issue(s) that this PR fixes
Completes the TODO section of the AI that uses Fling
People who collaborated with me in this PR
Do I mention reviewers? Also hopefully someone to finish this
Feature(s) this PR does NOT handle:
Completing the AI that uses Fling. This only allows people to be able to use fling in the AI and in other places.
Things to note in the release changelog:
Discord contact info
ShadowzLmao#3643