Farigh / pokeclicker-automation

An automation script suite for pokeclicker.com
GNU General Public License v3.0
37 stars 19 forks source link

Hatchery doesn't focus on subsequent mega evolution attack requirements in Real Evolutions challenge. #283

Closed cfedey closed 1 year ago

cfedey commented 1 year ago

Describe the bug

This is only applicable to the Real Evolutions challenge.

Currently, with the "Focus on mega evolution requirements unlock" toggle enabled in the Hatchery settings, the script will breed the required attacks for those that need it, the first time around.

However, once a mega evolution is obtained, and a new prerequisite form is obtained, the hatchery ignores it for purposes of reaching the attack requirement again for subsequent evolutions.

I believe the hatchery should go through and get these attack requirements again, so EVs can be accumulated on mega evolutions. This process would only need to be done twice, as the prerequisite form isn't lost on subsequent evolutions like it is the first time around.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Set hatchery to focus on mega evolution requirements.
  2. Wait for all attack requirements to be met.
  3. Mega evolve.
  4. Obtain replacement prerequisite form.
  5. Hatchery ignores the new prerequisite form.

Expected behavior

Expected behavior would be for it to continue focusing on the mega evolution requirements, as once the prerequisite form is consumed for the mega evolution, the requirement is no longer met and must be met again.

Additional context

Not sure why, but it might have been focusing on a second round of attack requirements for a short time. I have a few prerequisite forms that have inflated attack, even after the mega form has been obtained. Maybe it did start working on the second round of attack requirements but stopped when all of the remaining first round requirements were met and it thought it was done?

MatPietrzyk commented 1 year ago

Seems like this actually was the intended behaviour, but then it was changed at someone's request to NOT breed mega evolutions again in the real evolutions challenge. The change is posted here: https://github.com/Farigh/pokeclicker-automation/commit/a0db7196b6a48650361ff5ad772bf5aa5cf9025b Could warrant a toggle, or just going back to your solution, because it is better for long-term playing and doesn't require much chnage.

cfedey commented 1 year ago

I saw that and thought it meant that it wouldn't build up the attack of prerequisite forms beyond the needed attack value for the purpose of increasing damage in general, because that attack would be transferred to the mega form and "lost", so the effort would be wasted, but I don't know what the code says so I wasn't sure.

Regardless, a toggle would definitely be a good solution that makes everyone happy. I can see people not wanting to waste time getting attack values up a second time when they have more important things to be using the hatchery for.

I'll try editing the scripts to be like the old revision and see what happens.

EDIT: Yes, reverting the above change does make the hatchery start breeding mega prerequisites again. Now we just need to figure out how to add a toggle.

Farigh commented 1 year ago

This was indeed introduced to address the issue #238. As I'm not using this challenge mode, I did not think about this case... I could add a toggle for this for sure, I'll try to do it later this week (unless you wish to push a PR for it before I do)

cfedey commented 1 year ago

Thanks for the reply. I don't think I could learn how to code within the week, so I'll leave it to the expert. I'm using the above workaround for now, so no rush.

Farigh commented 1 year ago

@cfedey I added the setting, it should work properly. However I only did some basic tests, forging a save from my regular one, so I might have missed something.

Don't hesitate to open an issue in such case.

cfedey commented 1 year ago

Thanks for the update. I did some tests as well, and it seems to be working as expected. If I notice anything out of the ordinary I'll post about it. Thanks again.