Skip to content
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

Fling is only working for items with flingPower equal to 0 #2407

Closed
AsparagusEduardo opened this issue Oct 22, 2022 · 1 comment
Closed

Fling is only working for items with flingPower equal to 0 #2407

AsparagusEduardo opened this issue Oct 22, 2022 · 1 comment

Comments

@AsparagusEduardo
Copy link
Collaborator

To fix:

bool32 CanFling(u8 battlerId)
{
    u16 item = gBattleMons[battlerId].item;
    u16 itemEffect = ItemId_GetHoldEffect(item);

    if (item == ITEM_NONE
      #if B_KLUTZ_FLING_INTERACTION >= GEN_5
      || GetBattlerAbility(battlerId) == ABILITY_KLUTZ
      #endif
      || gFieldStatuses & STATUS_FIELD_MAGIC_ROOM
      || gDisableStructs[battlerId].embargoTimer != 0
-      || GetFlingPowerFromItemId(item) != 0
+      || GetFlingPowerFromItemId(item) == 0
      || !CanBattlerGetOrLoseItem(battlerId, item))
        return FALSE;

    return TRUE;
}
@AsparagusEduardo
Copy link
Collaborator Author

#2408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant