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

Implement catching strategy in safari for RSE #477

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ThibaultLassiaz
Copy link
Contributor

@ThibaultLassiaz ThibaultLassiaz commented Oct 25, 2024

Description

Handle catching Strategy in Safari for RSE

SRE Safari zone unlike FR/LG is kinda straight forward.

How flee system works

There's a grade from 0 to 20 for the flee chance, which 0 is 0% and 20 equals 100%.
On the start of a fight the Pokémon flee chance is 3 (15%).
So we can NEVER avoid that flee chance of 15% at the end of the first turn, whatever we do.

Flee chance variation depending on the Pokéblock thrown :

image

Throwing a liked Pokeblock will get him to -2 (3 - 5). But if the value is negative the game will put the cursor to 1 (5% flee chance). And once it's at 1 it can NEVER go lower.

BUT, if we stat at 3 and we throw a neutral Pokéblock (not liked/disliked) then it can go to zero, and our Pokémon flee chance is now reduce to 0%.

Throwing a disliked Pokeblock doesn't have any effect so we don't want that.

Also some natures doesn't have some liked/disliked Pokeblock, so we can throw whatever we want, it will always be a neutral Pokeblock

At last, the "Go near" option increase the catch rate, but also increase the flee rate of the Pokémon, which is a very risky and mathematically not worth it strategy since we can reduce the flee rate to zero.

Implemented strategy

  • Turn 1 : Throw a neutral Pokéblock, if there's none throw a liked (Reducing flee chance from 15% to 5%), if there's none just spam the balls
  • Turn 2 and so : Spam balls

Changes

Updated nature JSON and class with Pokeblock like/dislike
Implemented the decide_turn_in_safari_zone in catch mode

Notes

Checklist

  • Black Linter has been ran, using --line-length 120 argument
  • Wiki has been updated (if relevant)

@ThibaultLassiaz
Copy link
Contributor Author

ThibaultLassiaz commented Oct 27, 2024

As we talked previously on discord I think this is the best implementation for the cheats.yml version as it reads the Pokémon nature. So I could add this check to the PR and keep this for the cheat part

Copy link
Collaborator

@pekempy pekempy left a comment

Choose a reason for hiding this comment

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

Please chat in #development-chat as neka said it needs changes :)

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