Allow IV filters to ignore inherited stats#398
Open
c-poole wants to merge 2 commits intoAdmiral-Fish:masterfrom
Open
Allow IV filters to ignore inherited stats#398c-poole wants to merge 2 commits intoAdmiral-Fish:masterfrom
c-poole wants to merge 2 commits intoAdmiral-Fish:masterfrom
Conversation
Contributor
Author
|
Is this feature not desired? I personally often want to use the egg page as a way to both find egg targets but also identify what parents need to be to reach desired goals, which this facilitates better options for. It is an additional "thing for the user to think about" which may not be desired. Can definitely adjust implementation as needed if it is desired. |
Owner
|
I get side tracked easily. I'll try to look this weekend at this |
Admiral-Fish
requested changes
Jul 18, 2024
Owner
Admiral-Fish
left a comment
There was a problem hiding this comment.
Most of the formatting stuff will likely be fixed if you run clang format
|
|
||
| for (int i = 0; i < 6; i++) | ||
| { | ||
|
|
|
|
||
| for (int i = 0; i < 6; i++) | ||
| { | ||
|
|
Comment on lines
+261
to
+262
|
|
||
|
|
| class DaycareFilter : public StateFilter | ||
| { | ||
| public: | ||
|
|
| #include <Core/Global.hpp> | ||
| #include <array> | ||
|
|
||
|
|
| /** | ||
| * @brief Enum that lists the different Filter types | ||
| */ | ||
| enum filter_types |
Owner
There was a problem hiding this comment.
enum class FilterTypes
Might be worth putting this in its own header like Controls.hpp
Comment on lines
+39
to
+41
| FILTER_STATE_FILTER = 0, | ||
| FILTER_WILD_FILTER = 1, | ||
| FILTER_DAYCARE_FILTER = 2 |
| * @return Filter object | ||
| */ | ||
| template <class FilterType, bool wild = false> | ||
| template <class FilterType, u16 type> |
| if constexpr (wild) | ||
| { | ||
|
|
||
| if constexpr(type == 1){ |
| } | ||
| else | ||
| { | ||
| else if constexpr(type == 2){ |
Owner
There was a problem hiding this comment.
type == FilterType::Daycare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a third filter class DaycareFilter that each of the egg tabs now use, which has the option to ignore inherited stats for the purposes of filtering the results.
The primary utility I see for this feature is to make it so that searches for targets do not explicitly depend on the provided values of the parent IVs and instead provides a blueprint for what the parent IVs need to be to match the filters. This allows for a workflow pattern of identifying a target -> identifying parent targets to allow you to hit said target -> getting target parents/egg. This flexibility specifically allows for finding parent targets where you don't need to engineer both parents to have identical IV spreads to what you want your target to have, or to find options when you don't need an exact set of 6IVs on the egg and therefore fixing the parents to specific stats could filter out possibilities.
It also has some utility in gen 3 where there is an incomplete enumeration of the possible VBlank signatures, and therefore even if the user provides all the correct information for an egg they produced, they may not get a hit on any of the provided methods.