Skip to content

RSE : Implement catching strategy & Safari mode #637

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

Merged
merged 11 commits into from
Jan 28, 2025

Conversation

ThibaultLassiaz
Copy link
Collaborator

Description

This PR add support for auto catching in RSE and support for Safari mode in RSE

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%.

Since we don't read the Pokémon nature to mimic a real user behavior we will follow this pattern :

If the Pokémon's catch rate is higher than 200, throw Safari Balls. Otherwise, we throw the lowest feel Pokéblock (aka a random one).

  1. If the Pokémon is curious (escape factor = 0), throw Safari Balls.
  2. If the Pokémon ignores the Pokéblock, throw a different Pokéblock than the first one.
    2a) If the Pokémon is enthralled (escape factor = 0), throw Safari Balls.
    2b) If the Pokémon is curious (escape factor = 1), throw Safari Balls.
  3. If the Pokémon is enthralled (escape factor = 1), throw Safari Balls.

If we don't have any Pokeblock in our case, just throw balls

Just like FR/LG, if you're using catching modes such as spin, fishing or sweet scent, the bot will auto catch shinies if your auto_catch config is set to true, but will stop if your safari ball counter is less than 15.

Safari mode

Safari mode works the same as Safari mode in FR/LG, I just reduced the number of run from 50 to 30.
As we can only have 40 Pokéblocks in our Pokeblock case, and we can use 1-2 Pokéblocks (or 0 depending on the encounter), 30 runs will guarantee that we almost never run out of Pokéblocks when hunting.

Warning

Rock smash mode for Shuckle or geodude (route not implemented) is not supported on safari mode. For Shuckle people will still have to use Rock Smash mode for now, that works on Emerald for every languages.

Safari Mode is supported in all languages for RSE :

🟥 Ruby 🔷 Sapphire 🟢 Emerald
English Supported ✅ Supported ✅ Supported ✅
German Supported ✅ Supported ✅ Supported ✅
Spanish Supported ✅ Supported ✅ Supported ✅
French Supported ✅ Supported ✅ Supported ✅
Italian Supported ✅ Supported ✅ Supported ✅
Japanese Supported ✅ Supported ✅ Supported ✅

Notes

I updated the master sets with Safari mode test states

Checklist

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

@ThibaultLassiaz ThibaultLassiaz changed the title Implement catching safari rse RSE : Implement catching strategy & Safari mode Jan 22, 2025
@ThibaultLassiaz ThibaultLassiaz force-pushed the implement-catching-safari-rse branch from 7a44c20 to 1f4c84e Compare January 28, 2025 01:16
@hanzi hanzi merged commit c4dd4d3 into 40Cakes:main Jan 28, 2025
1 check passed
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