-
Notifications
You must be signed in to change notification settings - Fork 87
Allow IV filters to ignore inherited stats #398
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
base: master
Are you sure you want to change the base?
Conversation
|
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. |
|
I get side tracked easily. I'll try to look this weekend at this |
Admiral-Fish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the formatting stuff will likely be fixed if you run clang format
|
|
||
| for (int i = 0; i < 6; i++) | ||
| { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space
|
|
||
| for (int i = 0; i < 6; i++) | ||
| { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces
| class DaycareFilter : public StateFilter | ||
| { | ||
| public: | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space
| #include <Core/Global.hpp> | ||
| #include <array> | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space
| /** | ||
| * @brief Enum that lists the different Filter types | ||
| */ | ||
| enum filter_types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum class FilterTypes
Might be worth putting this in its own header like Controls.hpp
| FILTER_STATE_FILTER = 0, | ||
| FILTER_WILD_FILTER = 1, | ||
| FILTER_DAYCARE_FILTER = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static,
Wild,
Daycare
| * @return Filter object | ||
| */ | ||
| template <class FilterType, bool wild = false> | ||
| template <class FilterType, u16 type> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FilterTypes type
| if constexpr (wild) | ||
| { | ||
|
|
||
| if constexpr(type == 1){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type == FilterType::Wild
| } | ||
| else | ||
| { | ||
| else if constexpr(type == 2){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type == FilterType::Daycare
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.