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 move flags and bans into GCC bitfields #2952

Merged

Conversation

AsparagusEduardo
Copy link
Collaborator

@AsparagusEduardo AsparagusEduardo commented Apr 25, 2023

Description

This PR converts all move flags and banned moves into GCC bitfields.

Based on @SBird1337's suggestion

This PR also:

  • Adds bitfields for Me First and Gravity.
  • Updates Pollen Puff's flag with Gen 9's flag change.
  • Removes unused BattleScript_EffectStomp and EFFECT_FLINCH_MINIMIZE_HIT.
  • Removes unused BattleScript_FlinchEffect
  • Removes reduntant EFFECT_TWISTER which was a copy of EFFECT_FLINCH_HIT.
  • Inverted Protect and Mirror Move flags and logic, since there were more moves that were affected by these moves than not.
  • Made a separate config for move flag changes: B_UPDATED_MOVE_FLAGS.
  • Fixes missing uses of MOVE_UNAVAILABLE in battle_ai_util.c
  • Fixes Wandering Spirit skipping contact checks.
  • Fixes Stench/King's Rock interaction
    • Removed sMovesNotAffectedByStench in favor of checking for moves with Flinch chance
  • Adds IS_MOVE_RECOIL to help recoil move checks.
  • Adds functions to account for the flags field being removed alongside TestMoveFlags and TestMoveFlagsInMoveset
    • HasSoundMove
    • HasHighCritRatioMove
    • HasMagicCoatAffectedMove
    • HasSnatchAffectedMove
    • They all use a CHECK_MOVE_FLAG macro
  • Adds sParentalBondBannedEffects to streamline adding new moves.
  • Assist uses Copycat's flag + the 2 additional move effects banned by it.
  • Added EFFECT_GEOMANCY to IsTwoTurnsMove.

Discord contact info

AsparagusEduardo#6051

@AsparagusEduardo AsparagusEduardo changed the title [WIP] Convert move flags and bans into GCC bitfields Convert move flags and bans into GCC bitfields May 31, 2023
@AsparagusEduardo AsparagusEduardo marked this pull request as ready for review June 1, 2023 12:29
@AsparagusEduardo
Copy link
Collaborator Author

Ready for review, updated description with all changes.

@AsparagusEduardo
Copy link
Collaborator Author

Updated description again because I forgor more stuff I did.

@cfmnephrite cfmnephrite mentioned this pull request Jun 19, 2023
Closed
# Conflicts:
#	include/constants/battle_move_effects.h
#	src/data/battle_moves.h
@AsparagusEduardo
Copy link
Collaborator Author

Conflicts solved.

@DizzyEggg
Copy link
Collaborator

New conflicts 👀

# Conflicts:
#	src/battle_ai_util.c
#	test/ability_damp.c
#	test/move_effect_beak_blast.c
@AsparagusEduardo
Copy link
Collaborator Author

Conflicts solved 👀

@DizzyEggg DizzyEggg merged commit 1fa9a05 into rh-hideout:upcoming Jul 3, 2023
@AsparagusEduardo AsparagusEduardo deleted the RHH/pr/feature/extendMoveFlags branch July 3, 2023 18:46
@AsparagusEduardo AsparagusEduardo mentioned this pull request Sep 27, 2023
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

Successfully merging this pull request may close these issues.

2 participants