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

Backwards-compatible BoxPokémon Refactor #3438

Merged
merged 9 commits into from
Dec 27, 2023

Conversation

mrgriffin
Copy link
Collaborator

@mrgriffin mrgriffin commented Oct 20, 2023

@AsparagusEduardo's #2372, but maintaining compatibility with existing saves. This means that the structures end up being a fair bit uglier than in Edu's PR, and also we can't ever reclaim bits that may be non-zero so things like the second isEgg, hasSpecies, etc have stayed.

Mostly the change is simple, just trim the size of existing members and make use of the known-zeros. It should go without saying that if any of the repurposed bits are not zero, things will go wrong.
The three complicated cases were:

  • Shinyness and hidden natures which are implemented as a modifier which is xored onto the value computed from the personality. 0 ^ x = x so this means existing Pokémon keep their shinyness and have a hidden nature equal to their nature. Note that Pokémon made shiny this way do not have a shiny PID+OTID combination.
  • Tera types which are implemented as 1 + type, with 0 being interpreted as choosing the Tera type based on the personality. This uses bit 2 instead of bit 1 so that Dustox/Beautify can have either Tera type.
  • HP. We store the HP lost in BoxPokemon so that all existing boxed Pokémon have max HP, instead of zero HP.

There's 35 bits free, spread out all over the place. Because GetMonData/SetMonData exist, if we needed e.g. 10 bits for a single value we could use two of the 5s and some bitwise operations.

Note that this is not compatible with trading to vanilla, PKHeX, the GameCube games, etc. This is because those games will a) read new data in the upper bits of things like moves and PP, and b) write over the same upper bits. For the same reason, we aren't able to trade with earlier versions of a hack. It may be possible to get battles working.

  • I haven't tested this yet.
  • I'd like to write some tests to check that all the new behaviors work.
  • Feel free to point out a Pokémon species that is biased by having Tera type come from bit 2 and I'll hash the personality or something.
  • Any other feedback welcome.

I can only apologize if you've been pointed at this PR due to a merge conflict arising from you modifying the BoxPokemon struct. If you want to keep your players' saves then you'll need to find new locations for the changes in this PR, because you mustn't shift your own data.

@mrgriffin
Copy link
Collaborator Author

mrgriffin commented Oct 20, 2023

I'll rebase this down into a sensible history if/when it's accepted :)

Important changes:

  • Prevent losing G-Max form through evolution
  • Support Tera, Dynamax, Gigantamax Factor, and Shadow in Trainer Control
  • Implement Nature MInts and Dynamax Candy
  • Support Dynamax and Gigantamax Factor in battles
  • Support Tera, Dynamax, Gigantamax Factor, and Shadow in battle tests
  • Show Tera type on summary screen
  • Some script commands for manipulating Hyper Training and Gigantamax Factor.

Not done:

  • Show Gigantamax Factor on summary screen

@mrgriffin mrgriffin marked this pull request as ready for review October 21, 2023 10:30
@mrgriffin
Copy link
Collaborator Author

Ready for review!

Some notes for reviewers:

  • isShadow/teraType are in TrainerMon, but maybe that should wait until the Shadow Pokémon/Terastallization PRs are merged?
  • formCountdown is not used. A follow-up PR is needed to make it work (IDK what it actually does).
  • The Terastallization type is chosen by PID bit 1 (& 0x1). The idea is that this is a random value that already exists, but please double-check that there's no species which has a biased bit 1 (e.g. Wurmple would if bit 1 controlled Silcoon vs Cascoon).
  • We need to show the Gigantamax Factor on the summary screen (like we do for the Tera Type).
  • I think we should probably have a config to choose between healing when Pokémon are placed in the box, and healing boxes only when the player uses a Pokémon Center. Edu implemented that side of things, so I'm not sure exactly where to start with that; I can probably figure it out, but I would appreciate it if somebody else could contribute that change.

@AsparagusEduardo
Copy link
Collaborator

AsparagusEduardo commented Oct 21, 2023

  • isShadow/teraType are in TrainerMon, but maybe that should wait until the Shadow Pokémon/Terastallization PRs are merged?

I feel so as well. No point confusing users with unused fields.

  • formCountdown is not used. A follow-up PR is needed to make it work (IDK what it actually does).

Hoopa and Furfrou revert to their base forms after 3/7 days in the party. However, according to Serebii, Hoopa no longer reverts after 3 days. Couldn't find find this fact in Bulbapedia, so maybe we could remove this field.

  • I think we should probably have a config to choose between healing when Pokémon are placed in the box, and healing boxes only when the player uses a Pokémon Center. Edu implemented that side of things, so I'm not sure exactly where to start with that; I can probably figure it out, but I would appreciate it if somebody else could contribute that change.

It should be simple enough to heal the mon upon placing it on the PC.

@mrgriffin mrgriffin mentioned this pull request Oct 21, 2023
27 tasks
@mrgriffin
Copy link
Collaborator Author

mrgriffin commented Oct 21, 2023

Hoopa and Furfrou revert to their base forms after 3/7 days in the party. However, according to Serebii, Hoopa no longer reverts after 3 days. Couldn't find find this fact in Bulbapedia, so maybe we could remove this field.

Ah interesting! I've removed it for now until we decide what we want to do with it :)

@mrgriffin mrgriffin marked this pull request as draft October 24, 2023 09:52
@mrgriffin mrgriffin marked this pull request as ready for review October 24, 2023 10:19
@mrgriffin
Copy link
Collaborator Author

mrgriffin commented Oct 24, 2023

Rebased to clean up the history, implemented an OW_PC_HEAL config. Ready for review!

EDIT: Made a few other reverts, so I'll need to rebase again before this is merged.

@AsparagusEduardo AsparagusEduardo self-assigned this Oct 24, 2023
Copy link
Collaborator

@AsparagusEduardo AsparagusEduardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review.
Looking back at this with what I've learned, I think I would change all instances of bool8 isShiny to bool32 isShiny, so I'll likely make a PR to this PR.

src/pokeblock_feed.c Outdated Show resolved Hide resolved
src/pokemon_summary_screen.c Outdated Show resolved Hide resolved
include/global.h Outdated Show resolved Hide resolved
include/pokemon.h Show resolved Hide resolved
include/test/battle.h Outdated Show resolved Hide resolved
include/test/battle.h Outdated Show resolved Hide resolved
src/script_pokemon_util.c Show resolved Hide resolved
Reuses space that contains zeros to provide space for:
- HP/status in the box
- 12-character nicknames
- Up to 63 PokéBalls
- Shininess separate from PID
- Hidden Nature
- Hyper Training
- Dynamax Level
- Gigantamax Factor
- Terastallization Types
- Shadow

Implements:
- OW_PC_HEAL to switch between Gen7- and Gen8+ behavior
- Nature Mints
- Dynamax Candy
- Hyper Training commands (canhypertrain/hypertrain)
- Gigantamax Factor commands (hasgigantamaxfactor/togglegigantamaxfactor)
- Terastallization Type on the summary screen
- Prevents Gigantamax Factor Pokémon from evolving into a species without a Gigantamax form
@mrgriffin
Copy link
Collaborator Author

Ready for re-review. Rebased onto upcoming and conflicts fixed.

@kleeenexfeu
Copy link

We could get rid of the encryption entirely and keep save compatibility by just using one flag. It would also provide more freedom to reorganize the whole structure.

It would go like this :
-Upon loading a save, we would check if the flag is set. If it is, them load the save as usual using @AsparagusEduardo's #2372 new Get/Set(Box)MonData.
-If not, do a giant loop to decrypt the party and the whole PC (the game will clearly freeze for a few seconds, no doubt) using the old Get(Box)MonData, and the new Set(Box)MonData.

The downside if keeping the old functions in the ROM, but we'd save a lot of space in the RAM.

I know it works because I've done it in ASM many years ago, but I wanted to make the suggestion before making a PR in case it has already been discussed

@mrgriffin
Copy link
Collaborator Author

mrgriffin commented Nov 10, 2023

I think the big difficulty with migration is that we don't exist in isolation. If a developer has made their own changes to the structure then they need to edit the save migration code to replicate those changes or else all their additions will silently vanish and all affected saves will be unrecoverable.

Obviously with this PR it's still possible for people to lose their changes, but they'll at least be prompted to solve a merge conflict.

That said, I'm not opposed to trying to come up with a user-friendly way to migrate saves. This PR was just borne out of that approach stalling, and the desire to actually land these new features now. Edu's PR was parked for just over a year.

EDIT: Also if save migration ever comes in the future then we can clean up the structure. I don't think accepting this PR introduces any new difficulties for migration?

@mrgriffin
Copy link
Collaborator Author

mrgriffin commented Nov 10, 2023

See also #3081, its discussion on Discord, and Tustin's article that inspired it.

Having a single flag just for BoxPokemon definitely does avoid some of the pitfalls of being totally generic for the whole save.

@mrgriffin
Copy link
Collaborator Author

mrgriffin commented Nov 11, 2023

Oh actually, one last thing @AsparagusEduardo togglegigantamaxfactor should fail for Melmetal... but should it also fail for species that can't Gigantamax? Or can any Pokémon have the G-max factor, it's just that it doesn't do anything for most of them?

EDIT: Forgot to add a test for togglegigantamaxfactor, so I'd like to rebase before it's merged please :)

@mrgriffin
Copy link
Collaborator Author

Conflicts hopefully resolved, but needs testing in-game of all the scenes where a shiny Pokémon is shown. The species refactor conflicted in a load of places that Edu changed 😭

@Bassoonian
Copy link
Collaborator

There's some more conflicts. I'll try to test all the shiny possibilities this weekend and then we should merge this in :)

@mrgriffin
Copy link
Collaborator Author

mrgriffin commented Dec 23, 2023

Conflicts resolved (hopefully correctly!), this will conflict again if somebody fixes the bug in https://github.com/rh-hideout/pokeemerald-expansion/blob/upcoming/src/battle_tower.c#L2992-L2995 before this is merged.
EDIT: Hmm, src/data/text/item_descriptions.h is still considered conflicting 🤔

@GraionDilach
Copy link

Yeah, that conflict comes from the PR trying to edit the Serious Mint's description there, but upcoming dropped the file as part of the COMPOUND_STRING unification.

@mrgriffin
Copy link
Collaborator Author

Ah, I failed to fetch before merging, I see. I thought it would have been Lunos' PR, and was confused when nothing seemed to have changed.

@Bassoonian
Copy link
Collaborator

Conflicts resolved (hopefully correctly!), this will conflict again if somebody fixes the bug in https://github.com/rh-hideout/pokeemerald-expansion/blob/upcoming/src/battle_tower.c#L2992-L2995 before this is merged.

It was :) I've been checking in-game and all the shiny sprites seem to be fine from what I can gather, so if you fix the conflict I think we can happily merge this in!

@Bassoonian
Copy link
Collaborator

Oh, I found one! Catching a Pokémon, seeing its dex entry and then getting the nickname option turns it into a shiny:
refactorshiny

Everything else seems fine though, contests included!

@Bassoonian Bassoonian merged commit 3ad6602 into rh-hideout:upcoming Dec 27, 2023
1 check passed
@Bassoonian Bassoonian mentioned this pull request Dec 27, 2023
Fervstheone added a commit to Fervstheone/pokeemerald-expansion that referenced this pull request Jan 7, 2024
commit dbad66e
Author: LOuroboros <[email protected]>
Date:   Fri Jan 5 12:09:39 2024 -0300

    Applied a number of changes to the debug menu (rh-hideout#3926)

    * Renamed the Party/Boxes section of the debug menu to just Party

    Misc:
    -Relabeled the enums containing the constants for the different features in each main section of the menu.
     -The reason why is that "enum PartyMenu" was throwing a compiler error for whatever reason, so I renamed the other labels to keep them consistent with it.

    * Renamed the debug menu's 'Fill PC/Pockets' to 'PC/Bag'

    * Moved PC/Bar higher in the debug menu's list

    * Added a debug feature to clear the bag

    * Moved 'Access PC' and 'Clear Boxes' to PC/Bag

    * Relocated the GivePCBagDebugMenu enum

    * Packed the debug menu's 'Fill' options into a PC/Bag category of their own
    And reupdated a lot of labels that I previously renamed. I shouldn't have removed the "Fill" in them when I renamed PC/Pockets to PC/Bag..

    * Fixed alignment in sDebugMenu_Items_Utilities

    * Shuffled the positions of the debug menu's 'Access PC' and 'Clear Bag'

    * Made the B button take you back to PC/Bag from Fill, instead of taking you to the main debug menu

    * Updated alignment in sDebugMenu_Items_Utilities again

    ---------

    Co-authored-by: DizzyEggg <[email protected]>

commit 9c07718
Author: Gabriel Cowley <[email protected]>
Date:   Fri Jan 5 14:30:25 2024 +0000

    Fix debug action SelectShiny tInput value toggle (rh-hideout#3930)

commit 48c26f7
Author: Bassoonian <[email protected]>
Date:   Fri Jan 5 12:36:28 2024 +0000

    Update README.md (rh-hideout#3929)

    Add Dynamic Multichoice to upcoming readme

    Co-authored-by: DizzyEggg <[email protected]>

commit b5252c4
Merge: 10b37d9 889234d
Author: DizzyEggg <[email protected]>
Date:   Fri Jan 5 13:34:03 2024 +0100

    Berry Expansion (rh-hideout#3618)

commit 889234d
Merge: 7b0904c 10b37d9
Author: DizzyEggg <[email protected]>
Date:   Fri Jan 5 13:22:16 2024 +0100

    Merge branch 'upcoming' into berryexpansion

commit 7b0904c
Author: Bassoonian <[email protected]>
Date:   Fri Jan 5 11:32:59 2024 +0100

    Fix extended berry stage palettes

commit 10b37d9
Author: aronson <[email protected]>
Date:   Fri Jan 5 02:39:32 2024 -0600

    Remove --no-warn-rwx-segments from linker flags (rh-hideout#3903)

    Co-authored-by: DizzyEggg <[email protected]>

commit 41ce8e8
Merge: 418e551 84d4009
Author: Bassoonian <[email protected]>
Date:   Fri Jan 5 00:32:23 2024 +0100

    Merge branch 'berryexpansion' of https://github.com/Bassoonian/pokeemerald-expansion into berryexpansion

commit 418e551
Merge: 1ee568a 8b80a54
Author: Bassoonian <[email protected]>
Date:   Fri Jan 5 00:32:21 2024 +0100

    Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into berryexpansion

commit 8b80a54
Author: BiffaloXIII <[email protected]>
Date:   Thu Jan 4 17:54:03 2024 -0300

    Removed footprint field when P_FOOTPRINTS is FALSE (rh-hideout#3925)

commit 1ee568a
Author: Bassoonian <[email protected]>
Date:   Thu Jan 4 16:12:39 2024 +0000

    Remove leftover code for myself

commit b948acc
Author: Bassoonian <[email protected]>
Date:   Thu Jan 4 16:07:12 2024 +0000

    Remove redundant table

commit b56a9e6
Author: Bassoonian <[email protected]>
Date:   Thu Jan 4 16:04:00 2024 +0000

    Remove unused function

commit 52eeca6
Author: Bassoonian <[email protected]>
Date:   Thu Jan 4 16:02:21 2024 +0000

    Replace berry descriptions with compound strings

commit bfe3e76
Author: Frank DeBlasio <[email protected]>
Date:   Thu Jan 4 09:39:26 2024 -0500

    Fixed Battle AI debug screen shiny sprites (rh-hideout#3922)

    * Switched gBattleMons.isShiny to GetMonData

    * Simplified getting party of Pokemon

    ---------

    Co-authored-by: Alex <[email protected]>

commit 4d5c572
Author: Frank DeBlasio <[email protected]>
Date:   Thu Jan 4 07:30:42 2024 -0500

    Refactor trainer classes (rh-hideout#3875)

    * Created TrainerClass struct

    * Added money multiplier to TrainerClass struct

    * Added Poke Balls to struct

    * Condensed gTrainerClasses

    * Simplified trainer Poke Balls

    * Moved trainer classes into battle_main.c

    * Removed complicated ball macro

    ---------

    Co-authored-by: Bassoonian <[email protected]>
    Co-authored-by: Alex <[email protected]>

commit 6cb89ef
Author: Frank DeBlasio <[email protected]>
Date:   Wed Jan 3 17:49:11 2024 -0500

    Update debug menu text (rh-hideout#3919)

    * Updated capitalization and abbrevations in debug menu

    * Updated spacing in debug.c

commit d7cdf41
Author: LOuroboros <[email protected]>
Date:   Wed Jan 3 18:28:55 2024 -0300

    Added EV setters to the debug menu's "Give Pokémon Complex" (rh-hideout#3566)

    * Added EV setters to the debug menu's "Give Pokémon Complex"

    Misc. Changes:
    -Updated the text strings for the 2 "Give Pokémon" options used by the debug menu.

    * Optimized DebugAction_Give_Pokemon_SelectShiny and made some debug functions use relevant constants

    * Removed extra call to CalculateMonStats in DebugAction_Give_Pokemon_ComplexCreateMon

    * Made the EV selection go back to the start if the sum of EV is > 510

    ---------

    Co-authored-by: Bassoonian <[email protected]>

commit f94e65a
Author: Bassoonian <[email protected]>
Date:   Wed Jan 3 20:24:45 2024 +0000

    Footprint config (rh-hideout#3902)

    * Footprint config

    * Don't enable by default

commit e7fac02
Author: Bassoonian <[email protected]>
Date:   Wed Jan 3 17:48:09 2024 +0100

    Fix summary screen nature colours after mints (rh-hideout#3898)

commit cb89df8
Merge: 9f09309 34f51da
Author: Alex <[email protected]>
Date:   Wed Jan 3 16:07:11 2024 +0100

    Dynamic Multichoices (rh-hideout#3826)

commit 34f51da
Merge: 15fa85c 9f09309
Author: Alex <[email protected]>
Date:   Wed Jan 3 15:54:39 2024 +0100

    Merge branch 'upcoming' into feature/dynmulti-expansion

commit 9f09309
Author: Bassoonian <[email protected]>
Date:   Tue Jan 2 23:29:46 2024 +0100

    Remove comment from pokemon_icon.c (rh-hideout#3896)

commit 84d4009
Merge: 1662dc3 3c21e23
Author: Bassoonian <[email protected]>
Date:   Tue Jan 2 22:47:32 2024 +0100

    Merge branch 'upcoming' into berryexpansion

commit 3c21e23
Author: aronson <[email protected]>
Date:   Tue Jan 2 08:24:52 2024 -0600

    Allocate initialized sections for EWRAM and IWRAM (rh-hideout#3892)

commit 7aaefe7
Author: Nephrite <[email protected]>
Date:   Mon Jan 1 18:58:29 2024 +0000

    Receiver/Power of Alchemy (rh-hideout#3889)

commit ab75ad6
Author: Nephrite <[email protected]>
Date:   Mon Jan 1 14:03:34 2024 +0000

    Ability flags update (rh-hideout#3886)

    * Added five ability flags

    Omitted duplicate flags that are basically "can't copy" (Role Play, Receiver, Entrainment, Skill Swap), didn't bother adding Neutralizing Gas flag,

    * Mold Breaker and Trace

    * Gastro Acid, Simple Beam, Worry Seed

    Decided to keep the Simple Beam/Worry Seed functions

    * Entrainment done

    * Skill Swap

    * Doodle/Role Play + flag descriptions

    Also adjusted Doodle test

    * Wandering Spirit, Mummy, Neutralizing Gas

    Neutralizing Gas really only needs to check for other mons with Neutralizing Gas, otherwise unsuppressable abilities are handled separately.

    * Renamed flags

commit f6f287d
Author: kittenchilly <[email protected]>
Date:   Sun Dec 31 18:38:50 2023 -0600

    Add Indigo Disk Pokemon data (rh-hideout#3878)

    * Archaludon?

    * more archuladon stuff

    * Hydrapple and Gouging Fire

    * Raging Bolt

    * Iron Boulder and Iron Crown

    * Terapagos

    * Pecharunt

    * Update gen_9.h

    * Pokedex orders

commit f31b4f3
Author: Bassoonian <[email protected]>
Date:   Sun Dec 31 11:33:52 2023 +0100

    Turn nature names into compound strings (rh-hideout#3871)

    * Turn nature names into compound strings

    * Move nature names out of dedicated file

commit 15fa85c
Merge: b83b1f7 a32e2cc
Author: Alex <[email protected]>
Date:   Sun Dec 31 00:16:44 2023 +0100

    Merge branch 'upcoming' into feature/dynmulti-expansion

commit a32e2cc
Author: Bassoonian <[email protected]>
Date:   Sat Dec 30 23:07:18 2023 +0100

    Move Ability AI scores to gAbilities (rh-hideout#3862)

    * Ability refactor

    * Adds abilities to RHH rom header

    * Move Ability Ratings to gAbilities

    * Add previously unknown ai ratings

    ---------

    Co-authored-by: Martin Griffin <[email protected]>
    Co-authored-by: DizzyEggg <[email protected]>

commit b83b1f7
Merge: 7f3264c a094266
Author: DizzyEggg <[email protected]>
Date:   Sat Dec 30 22:41:59 2023 +0100

    Merge branch 'upcoming' into feature/dynmulti-expansion

commit a094266
Merge: cc32e37 9e051aa
Author: Bassoonian <[email protected]>
Date:   Sat Dec 30 22:40:29 2023 +0100

    2023's last pret merge (rh-hideout#3869)

commit 9e051aa
Merge: cc32e37 6c96641
Author: Bassoonian <[email protected]>
Date:   Sat Dec 30 20:49:05 2023 +0100

    Merge branch 'master' of https://github.com/pret/pokeemerald into pretmergenewyears

commit cc32e37
Author: Alex <[email protected]>
Date:   Sat Dec 30 20:20:12 2023 +0100

    Adds some Indigo Disk moves (rh-hideout#3853)

    * Burning Bulwark

    * Fickle Beam

    * Alluring Voice

    * Electro Shot

    * forgot sheer force flag for alluring voice

    * review changes

    * additional alluring voice test

    * Simple Allruing Voice animation

    * Update battle.h

    ---------

    Co-authored-by: Bassoonian <[email protected]>

commit 66a638f
Author: kittenchilly <[email protected]>
Date:   Sat Dec 30 04:40:58 2023 -0600

    Change Ivy Cudgel to be based on Ogerpon form rather than held item (rh-hideout#3865)

    * Change Ivy Cudgel to be based on Ogerpon form rather than held item

    * Update ivy_cudgel.c

    * Address reviews

    * Update test/battle/move_effect/ivy_cudgel.c

    ---------

    Co-authored-by: Bassoonian <[email protected]>

commit ed850d3
Author: Martin Griffin <[email protected]>
Date:   Sat Dec 30 10:10:40 2023 +0000

    VSync BENCHMARKs and avoid AdvanceRandom in tests (rh-hideout#3866)

commit ab900e3
Merge: 6bc0bf9 2450263
Author: Martin Griffin <[email protected]>
Date:   Fri Dec 29 19:46:24 2023 +0000

    Merge remote-tracking branch 'rhh/master' into upcoming

commit 1662dc3
Merge: a4b819a 6bc0bf9
Author: Bassoonian <[email protected]>
Date:   Fri Dec 29 14:32:10 2023 +0100

    Merge branch 'upcoming' into berryexpansion

commit 6bc0bf9
Author: Bassoonian <[email protected]>
Date:   Fri Dec 29 14:25:24 2023 +0100

    Ability refactor (rh-hideout#3861)

    * Ability refactor

    * Adds abilities to RHH rom header

    ---------

    Co-authored-by: Martin Griffin <[email protected]>

commit 16a3954
Author: Ninjdai <[email protected]>
Date:   Fri Dec 29 14:12:17 2023 +0100

    Add MOVES_COUNT and NUM_SPECIES to RHH rom header (rh-hideout#3831)

    * Add MOVES_COUNT and NUM_SPECIES to RHH rom header

commit 94a650a
Author: kittenchilly <[email protected]>
Date:   Thu Dec 28 16:27:09 2023 -0600

    Add Fillet Away + Belly Drum tweaks (rh-hideout#3616)

    * Add Fillet Away

    * Fillet Away and Belly Drum tests

    * More tests

    * Update fillet_away.c

    * Update fillet_away.c

    * Newlines

    * Update battle_scripts_1.s

    * Update belly_drum.c

    * Address reviews

    * Fix order

    * Swords Dance assume

    * Update belly_drum.c

    * Try some stuff

    * Fix hp not being halved in certain cases

    * Update battle_scripts_1.s

    * AI stuff

commit 1e958ad
Author: kittenchilly <[email protected]>
Date:   Thu Dec 28 16:00:34 2023 -0600

    Add Indigo Disk item data (rh-hideout#3854)

commit bc37377
Author: Bassoonian <[email protected]>
Date:   Thu Dec 28 12:33:29 2023 +0100

    Define new abilities (rh-hideout#3838)

    Co-authored-by: Alex <[email protected]>

commit 872ddf3
Author: Bassoonian <[email protected]>
Date:   Thu Dec 28 12:21:52 2023 +0100

    The Indigo Disk Moves (rh-hideout#3704)

    * Draft Indigo Disk move data

    * Add basic defines (flags, targets and priority missing)

    * Update move flags

    * Temper Flare is Stomping Tantrum

    * Forgot to push, please squash :D

    * Fix failing tests

commit 28f1777
Author: kittenchilly <[email protected]>
Date:   Thu Dec 28 04:47:00 2023 -0600

    Implement Pokemon Box Link functionality (rh-hideout#3837)

    * Implement Pokemon Box Link functionality

    * Update item_use.c

    * Update item_use.c

    * Can only use box link if the map allows escape

    * Revert "Can only use box link if the map allows escape"

    This reverts commit be5b46b.

    * Overworld_IsEscapingAllowed

    ---------

    Co-authored-by: Alex <[email protected]>

commit c57b154
Author: tertu <[email protected]>
Date:   Thu Dec 28 03:58:35 2023 -0600

    Replace at least some shuffle algorithms with Shuffle (rh-hideout#3801)

    Most of these are the poor-quality and slow "naive shuffle", but some might be better.
    In any case, Shuffle is known good.

commit 4f61d44
Author: kittenchilly <[email protected]>
Date:   Wed Dec 27 17:02:51 2023 -0600

    Add Treasure Factor to Nugget and Tiny Mushroom (rh-hideout#3836)

commit 6c96641
Merge: 6385f04 7567b0a
Author: GriffinR <[email protected]>
Date:   Wed Dec 27 17:39:37 2023 -0500

    Merge pull request rh-hideout#1969 from Kurausukun/macros

    Safeguard SQUARE and CUBE Macro Arguments in Parentheses

commit 7567b0a
Author: Kurausukun <[email protected]>
Date:   Wed Dec 27 17:29:35 2023 -0500

    safeguard SQUARE and CUBE macro arguments in parentheses

commit 88b0bd6
Author: Bassoonian <[email protected]>
Date:   Wed Dec 27 22:48:56 2023 +0100

    Add gen9 item prices + configs (rh-hideout#3834)

    * Add gen9 item prices + configs

    * Adjust gen 1 PP item costs

    ---------

    Co-authored-by: Alex <[email protected]>

commit 3e321d1
Author: DizzyEggg <[email protected]>
Date:   Wed Dec 27 21:35:42 2023 +0100

    fix ally switch dig issue (rh-hideout#3835)

commit f5e0b3d
Author: Frank DeBlasio <[email protected]>
Date:   Wed Dec 27 14:28:44 2023 -0500

    Changed SHINY_ODDS to FALSE in pokedex_plus_hgss.c (rh-hideout#3832)

commit 3ad6602
Author: Martin Griffin <[email protected]>
Date:   Wed Dec 27 16:48:17 2023 +0000

    Backwards-compatible BoxPokémon Refactor (rh-hideout#3438)

    * Check progress in non-battle PARAMETRIZEd tests

    * Overworld Script Tests

    * Backward-compatible BoxPokemon Refactor

    Reuses space that contains zeros to provide space for:
    - HP/status in the box
    - 12-character nicknames
    - Up to 63 PokéBalls
    - Shininess separate from PID
    - Hidden Nature
    - Hyper Training
    - Dynamax Level
    - Gigantamax Factor
    - Terastallization Types
    - Shadow

    Implements:
    - OW_PC_HEAL to switch between Gen7- and Gen8+ behavior
    - Nature Mints
    - Dynamax Candy
    - Hyper Training commands (canhypertrain/hypertrain)
    - Gigantamax Factor commands (hasgigantamaxfactor/togglegigantamaxfactor)
    - Terastallization Type on the summary screen
    - Prevents Gigantamax Factor Pokémon from evolving into a species without a Gigantamax form

    * fixup! Backward-compatible BoxPokemon Refactor

    * displaydexinfo fix from Jasper

commit a4b819a
Merge: 77f0ab8 a9d6832
Author: Bassoonian <[email protected]>
Date:   Wed Dec 27 14:00:12 2023 +0100

    Merge branch 'upcoming' into berryexpansion

commit a9d6832
Author: ghoulslash <[email protected]>
Date:   Wed Dec 27 07:54:37 2023 -0500

    Separate AI flags by battler position (rh-hideout#3003)

    * ai flags by battlerId

    * fix recoded battle saved ai flags

    * update aiFlags check in OpponentHandleChoosePokemon

    * add header for TRAINER_CUSTOM_PARTNER define

    * initialize flags in BattleAI_SetupAIData

    * fix usage of TRAINER_CUSTOM_PARTNER

    * remove whitespace

    ---------

    Co-authored-by: ghoulslash <[email protected]>

commit 7f3264c
Author: sbird <[email protected]>
Date:   Tue Dec 26 14:26:07 2023 +0100

    [dynamic multichoice] fix -Wall warnings / errors

commit c27ea10
Merge: 166a1a4 acab86d
Author: sbird <[email protected]>
Date:   Tue Dec 26 14:22:49 2023 +0100

    Merge branch 'feature/dynmulti' into feature/dynmulti-expansion

commit 166a1a4
Author: Alex <[email protected]>
Date:   Mon Dec 25 18:28:16 2023 +0100

    Adds ability Embody Aspect + minor fix to Hospitality (rh-hideout#3821)

    * Adds ability Embody Aspect + minor fix to Hospitality

    * comment out failing tests related to neutralizing gas

    * fixes neutralizing gas bug

    * leftover

commit 1339256
Author: Alex <[email protected]>
Date:   Mon Dec 25 01:43:57 2023 +0100

    Adds Ability Hospitality (rh-hideout#3818)

    * Adds Ability Hospitality

    * fix agbcc

commit 77f0ab8
Merge: c2a5b71 58b03cb
Author: Bassoonian <[email protected]>
Date:   Sun Dec 24 23:17:58 2023 +0100

    Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into berryexpansion

commit c2a5b71
Author: Bassoonian <[email protected]>
Date:   Sun Dec 24 23:17:05 2023 +0100

    Fix six stage berry graphical issues

commit c115649
Author: Bassoonian <[email protected]>
Date:   Sun Dec 24 23:08:15 2023 +0100

    Fix 6 stage Berry trees not growing properly

commit 9be8fed
Author: Bassoonian <[email protected]>
Date:   Sun Dec 24 22:59:43 2023 +0100

    Fix string with duplicate berry berry

commit 58b03cb
Author: LOuroboros <[email protected]>
Date:   Sun Dec 24 18:10:01 2023 -0300

    Implemented a CannotUseItemsInBattle function (rh-hideout#3524)

    * Implemented a CannotUseItemsInBattle function
    This fucntion is the result of merging CannotUseBagBattleItem and CannotUsePartyBattleItem. No reason to split the work between 2 functions when you can do it all with just 1.

    Misc. Changes:
    -Turned most of the if statements inside the function into "else if" statements for performance reasons.
    -Refactored how the local variable "cannotUse" was used turning it into a bool.

    * Made CannotUseItemsInBattle use a switch statement

    Misc. Changes:
    -Removed pointless parentheses from case EFFECT_ITEM_SET_FOCUS_ENERGY
    -Removed pointless i loop variable from case EFFECT_ITEM_INCREASE_ALL_STATS and replaced a hardcoded 1 in its for loop.
    -Turned the i loop variable declared at the top of the function into a u32 variable
    -Removed pointless comments. The EFFECT_ITEM constants are readable enough to convey what sort of items they affect.

    ---------

    Co-authored-by: Alex <[email protected]>

commit f700466
Author: Zimmermann Gyula <[email protected]>
Date:   Sat Dec 23 16:34:24 2023 +0100

    Implement optional Gen1 type immunity logic. (rh-hideout#3627)

    * Implement optional Gen1 type immunity logic.

    * Add tests against Gen1 burn, freeze and paralysis.

    * !fixup Expand tests with Gen1 paths.

    * Fixup tests.

    Remove superflous defines.
    Explicitly ASSUME used move type and effect.

    * Fix flipped definitions on Freezing Glare test.

    ---------

    Co-authored-by: Bassoonian <[email protected]>

commit 72615a7
Author: Zimmermann Gyula <[email protected]>
Date:   Sat Dec 23 12:29:12 2023 +0100

    Prevent infinite loop. (rh-hideout#3808)

    Regression caused by rh-hideout@fe1bad6

commit 662939d
Author: Bassoonian <[email protected]>
Date:   Sat Dec 23 00:41:47 2023 +0100

    Add family defines

commit db0a948
Merge: 4f66ac4 1a7166c
Author: Bassoonian <[email protected]>
Date:   Sat Dec 23 00:39:10 2023 +0100

    Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into berryexpansion

commit 1a7166c
Author: DizzyEggg <[email protected]>
Date:   Sat Dec 23 00:27:40 2023 +0100

    Tests do not allow to use SEND_OUT if the chosen mon is fainted (rh-hideout#3752)

    * Tests dont allow to send out pokemon with 0 hp

    * remove test test

    * handle in-game 0 hp sent out

    ---------

    Co-authored-by: Bassoonian <[email protected]>

commit fb28ce5
Author: tertu <[email protected]>
Date:   Fri Dec 22 11:39:15 2023 -0600

    Optional high-quality RNG (rh-hideout#3780)

    High-quality RNG, behind the HQ_RANDOM flag, enabled by default

    Makes the shuffle test error a bit more tolerant

commit 63316da
Author: Alex <[email protected]>
Date:   Fri Dec 22 18:25:23 2023 +0100

    Adds missing Doodle tests and fix (rh-hideout#3800)

commit 505b8b6
Author: kittenchilly <[email protected]>
Date:   Fri Dec 22 09:45:55 2023 -0600

    Add Doodle + update ability banlists (rh-hideout#3609)

    * Add Doodle

    * Doodle test

    * Oops

    * Update battle_util.c

    ---------

    Co-authored-by: Bassoonian <[email protected]>

commit 83e2f4b
Author: Alex <[email protected]>
Date:   Fri Dec 22 16:22:53 2023 +0100

    Adds ability Minds Eye + Tests (rh-hideout#3782)

    * Implemented Mind's Eye with tests + Keen Eye tests

    * AI test

    * fix AI minds eye test

    * Adds ability Minds Eye + Tests

    * fix tests

    ---------

    Co-authored-by: Eduardo Quezada <[email protected]>
    Co-authored-by: Bassoonian <[email protected]>

commit 566653a
Author: Alex <[email protected]>
Date:   Fri Dec 22 15:05:35 2023 +0100

    Replace mons for gen9 abilities (rh-hideout#3740)

commit f866487
Author: Bassoonian <[email protected]>
Date:   Fri Dec 22 14:11:02 2023 +0100

    Fix Mega Stone descriptions (rh-hideout#3797)

commit 2af6d65
Author: fakuzatsu <[email protected]>
Date:   Thu Dec 21 13:01:13 2023 +0000

    added ability to set flags in tests (rh-hideout#3786)

commit 698e69f
Author: DizzyEggg <[email protected]>
Date:   Thu Dec 21 11:40:04 2023 +0100

    add emitResult argument to ShouldSwitch AI functions (rh-hideout#3784)

commit 5cdee87
Author: Frank DeBlasio <[email protected]>
Date:   Wed Dec 20 17:14:33 2023 -0500

    Refactor Trainer sprites (rh-hideout#3597)

    * Added TrainerSprite struct with coordinates

    * Added .frontPic to struct

    * Added .palette to TrainerSprite struct

    * Added .animation to the struct

    * Added define for sprite size

    * Condensed animations since they were all the same

    * Improved TRAINER_SPRITE/PAL defines

    * Simplified seemingly unused .y_offset and TRAINER_PIC_SIZE values

    * Condensed TRAINER_SPRITE and TRAINER_PAL into TRAINER_PIC

    * Renamed .size to .y_offset since that what it appears to actually be

    * Moved y_offset into TRAINER_PIC

    * Moved animation inside of TRAINER_PIC

    * Added array number to preproc

    * Removed trailing spaces

    * Added sprite/palette files to preproc

    * Revert adding sprites to preproc as it fails agbcc

    This reverts commit dce57f8.

    * Added backsprite struct

    * Added animations to backsprite struct

    * Changed TRAINER_PIC to TRAINER_SPRITE

    * Added animation to backsprite preproc

    * Added .backPic to struct

    * Moved array number into backsprite preproc

    * Removed definitions for trainer sprites

    * Hardcoded sAnims_Trainer into struct since every sprite uses it

    * Fixed TRAINER_SPRITE arguments

commit 6385f04
Merge: 0e10fc3 027dccf
Author: GriffinR <[email protected]>
Date:   Wed Dec 20 09:03:35 2023 -0500

    Merge pull request rh-hideout#1968 from Jaizu/patch-5

    Missing constant

commit 027dccf
Author: Jaizu <[email protected]>
Date:   Wed Dec 20 12:24:52 2023 +0100

    Missing constant

commit 0e10fc3
Merge: e4149e8 f8a4cf9
Author: GriffinR <[email protected]>
Date:   Wed Dec 13 13:30:32 2023 -0500

    Merge pull request rh-hideout#1966 from Bassoonian/pokeacutemonpret

    Clean up pokemon/ball/dex mentions in comments

commit f8a4cf9
Author: Bassoonian <[email protected]>
Date:   Wed Dec 13 09:52:04 2023 +0100

    Update pokedex.c

commit 6365431
Author: Bassoonian <[email protected]>
Date:   Tue Dec 12 23:20:22 2023 +0100

    Add PokéNav too

commit bc2a745
Author: Bassoonian <[email protected]>
Date:   Tue Dec 12 23:18:35 2023 +0100

    Fix accidental symbol replacements

commit e5ac2fe
Author: Bassoonian <[email protected]>
Date:   Tue Dec 12 19:02:36 2023 +0100

    Clean up pokemon/ball/dex mentions in comments

commit 4f66ac4
Merge: ffb16c0 7016f25
Author: Bassoonian <[email protected]>
Date:   Fri Dec 8 12:03:44 2023 +0100

    Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into berryexpansion

commit ffb16c0
Author: Bassoonian <[email protected]>
Date:   Fri Dec 8 12:03:16 2023 +0100

    ORAS drain rate

commit 1e0b895
Author: Bassoonian <[email protected]>
Date:   Fri Dec 8 01:05:54 2023 +0100

    Add missing check to prevents water grinding

commit 6173f9b
Author: Bassoonian <[email protected]>
Date:   Fri Dec 8 01:01:01 2023 +0100

    Add soil moisturing config

commit 061e56a
Author: Bassoonian <[email protected]>
Date:   Fri Dec 8 00:22:12 2023 +0100

    Make weeds and pests affect yield

commit 2b71187
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 23:50:08 2023 +0100

    Add caretaking bonuses to berry data

commit d795987
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 18:06:20 2023 +0100

    Preset yield config

commit ccb0e11
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 14:18:54 2023 +0100

    Add generation-based growth rate config

commit 9d09b36
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 13:22:01 2023 +0100

    Refactor growth time and add six stage toggle

commit c8d356a
Merge: 9be5d4f 8ac66cd
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 12:18:50 2023 +0100

    Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into berryexpansion

commit 9be5d4f
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 12:05:12 2023 +0100

    Add single stage growth to debug menu

commit 9fa811d
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 11:54:07 2023 +0100

    Mulches affect gradient watering

commit 6ba4ec7
Author: Bassoonian <[email protected]>
Date:   Thu Dec 7 11:46:44 2023 +0100

    Small change to debug script for clarity

commit 8e43b7d
Author: Bassoonian <[email protected]>
Date:   Wed Dec 6 21:08:09 2023 +0100

    Debug Berry functions

commit 3e1c04c
Author: Bassoonian <[email protected]>
Date:   Tue Dec 5 22:13:21 2023 +0100

    Allow pests and weeds interaction

commit 36befdc
Author: Bassoonian <[email protected]>
Date:   Tue Dec 5 21:54:17 2023 +0100

    Add moisture clock, weeds and pest generation

commit 5f2c8df
Author: Bassoonian <[email protected]>
Date:   Tue Dec 5 20:24:03 2023 +0100

    Replace watered bits with a single equivalent field

commit e4fd784
Author: Bassoonian <[email protected]>
Date:   Tue Dec 5 20:07:00 2023 +0100

    Store mutation as mutation id instead of berry id

commit ddcd0db
Author: Bassoonian <[email protected]>
Date:   Tue Dec 5 20:02:11 2023 +0100

    Weeds and Pests strings

commit 6da03e6
Author: Bassoonian <[email protected]>
Date:   Tue Dec 5 02:16:22 2023 +0100

    Add Berry color and drain rate

commit 0d70d99
Author: Bassoonian <[email protected]>
Date:   Mon Dec 4 00:33:25 2023 +0100

    Put Mulch behind config

commit bd354f2
Author: Bassoonian <[email protected]>
Date:   Mon Dec 4 00:17:41 2023 +0100

    Allow for storing bonus Berries in Berry Yield

commit 45e19d2
Author: Bassoonian <[email protected]>
Date:   Sun Dec 3 13:22:58 2023 +0100

    Remove lost comment

commit b02b3d0
Author: Bassoonian <[email protected]>
Date:   Sun Dec 3 13:17:34 2023 +0100

    Add Mulch effects

commit 4628af3
Author: Bassoonian <[email protected]>
Date:   Thu Nov 30 13:34:33 2023 +0100

    Non-watering mulch effects

commit a517e14
Author: Bassoonian <[email protected]>
Date:   Wed Nov 29 13:26:43 2023 +0100

    Berry Mutations

commit acab86d
Merge: cefb05b 693f750
Author: sbird <[email protected]>
Date:   Wed Nov 29 13:20:03 2023 +0100

    Merge branch 'feature/dynmulti' of github.com:SBird1337/pokeemerald into feature/dynmulti

commit cefb05b
Author: sbird <[email protected]>
Date:   Wed Nov 29 13:19:37 2023 +0100

    [dynmulti] left/top read from variables

commit ecab5cc
Merge: 6a622eb 15e1cd8
Author: sbird <[email protected]>
Date:   Wed Nov 29 13:06:18 2023 +0100

    Merge remote-tracking branch 'pret/master' into feature/dynmulti

commit 693f750
Author: Jaizu <[email protected]>
Date:   Wed Aug 16 14:49:44 2023 +0200

    Make use of MULTI_B_PRESSED constant. (rh-hideout#4)

commit 6a622eb
Merge: 47f71a1 4c2b125
Author: sbird <[email protected]>
Date:   Mon Aug 14 13:20:03 2023 +0200

    Merge remote-tracking branch 'pret/master' into feature/dynmulti

commit 47f71a1
Author: sbird <[email protected]>
Date:   Wed Apr 26 03:53:52 2023 +0200

    [dynmulti] fix ignoreBPress semantics

commit a2dfc7c
Author: sbird <[email protected]>
Date:   Mon Apr 24 19:13:39 2023 +0200

    [dynmulti] fix second scroll arrow y offset

commit 12d4b43
Merge: 7669643 73a6a58
Author: sbird <[email protected]>
Date:   Mon Apr 24 18:30:30 2023 +0200

    Merge remote-tracking branch 'pret/master' into feature/dynmulti

commit 7669643
Merge: bfc6619 0851e55
Author: sbird <[email protected]>
Date:   Wed Jan 18 23:39:31 2023 +0100

    Merge branch 'master' into feature/dynmulti

commit bfc6619
Author: sbird <[email protected]>
Date:   Wed Jan 18 23:34:27 2023 +0100

    [script-command, dynmultichoice] early expand placeholders

commit 4fad6b3
Author: sbird <[email protected]>
Date:   Wed Jan 18 23:25:19 2023 +0100

    [script-command, dynmultichoice] load message box and border gfx

commit a7cd4ca
Author: sbird <[email protected]>
Date:   Tue Jan 17 21:21:07 2023 +0100

    [script-command, dynmultichoice] implement event handler

commit 276ce62
Author: sbird <[email protected]>
Date:   Mon Jan 16 22:40:36 2023 +0100

    [script-command, dynmultichoice] add shouldSort, initialSelected arguments. read pushed arguments front to back

commit 569fa0a
Author: sbird <[email protected]>
Date:   Sun Jan 15 13:41:10 2023 +0100

    [script-command] add dynmultichoice

     * supports variable length arguments
     * automatically scrolls
     * supports building list menus from a stack
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.

5 participants