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

convert a few various to callnatives #2465

Merged
merged 6 commits into from
May 15, 2023

Conversation

ghoulslash
Copy link
Collaborator

Convert the following various to callnatives

  • VARIOUS_SET_Z_EFFECT
  • VARIOUS_TRY_SYMBIOSIS
  • VARIOUS_CAN_TELEPORT
  • VARIOUS_GET_BATTLER_SIDE
  • VARIOUS_CHECK_PARENTAL_BOND_COUNTER

@ghoulslash ghoulslash added the category: battle-mechanic Pertains to battle mechanics label Nov 28, 2022
@Jaizu
Copy link

Jaizu commented Feb 16, 2023

Please fix conflicts.

@AsparagusEduardo
Copy link
Collaborator

Please solve conflicts.

@ghoulslash
Copy link
Collaborator Author

Please solve conflicts.

Done

@equezada-jej
Copy link

I know this was introduced later, but we should use NATIVE_ARGS ^^;

@LOuroboros
Copy link
Collaborator

LOuroboros commented May 15, 2023

Also, instead of increasing gBattlescriptCurrInstr by arbitrary amounts, wouldn't it be better to do gBattlescriptCurrInstr = cmd->nextInstr;? 👀

EDIT: I know they're not arbitrary per se, but still. Is it not possible to do that in these cases?

@rh-hideout rh-hideout deleted a comment from equezada-jej May 15, 2023
@AsparagusEduardo
Copy link
Collaborator

Also, instead of increasing gBattlescriptCurrInstr by arbitrary amounts, wouldn't it be better to do gBattlescriptCurrInstr = cmd->nextInstr;? 👀

EDIT: I know they're not arbitrary per se, but still. Is it not possible to do that in these cases?

This is part of what I mean by using NATIVE_ARGS ^^;

@ghoulslash
Copy link
Collaborator Author

I know this was introduced later, but we should use NATIVE_ARGS ^^;

good call. just updated with them. The SetZEffect one still uses the old method but is a special case. would probably need a separate PR to clean it up if we wanted to down the line.

src/battle_script_commands.c Outdated Show resolved Hide resolved
src/battle_script_commands.c Outdated Show resolved Hide resolved
src/battle_script_commands.c Outdated Show resolved Hide resolved
@ghoulslash
Copy link
Collaborator Author

ready for review

@AsparagusEduardo AsparagusEduardo merged commit 15b122b into rh-hideout:upcoming May 15, 2023
@ghoulslash ghoulslash deleted the be/convert_various branch May 15, 2023 19:36
@AsparagusEduardo AsparagusEduardo mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: battle-mechanic Pertains to battle mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants