Skip to content

Automatically collect items obtained through Thief/Covet - #817

Merged
hanzi merged 1 commit into
40Cakes:mainfrom
hanzi:better-thief-handling
May 1, 2026
Merged

Automatically collect items obtained through Thief/Covet#817
hanzi merged 1 commit into
40Cakes:mainfrom
hanzi:better-thief-handling

Conversation

@hanzi

@hanzi hanzi commented May 1, 2026

Copy link
Copy Markdown
Collaborator

Description

This introduces a result dataclass for handle_battle() that reports things that have changed in that battle, such as Pokémon having taking damage -- or Pokémon having obtained new items through Pickup, Thief, or Covet.

It then uses this result to automatically take any items that Pokémon have obtained using Thief or Covet.

Fixes #664

Also, I noticed that there is actually a difference in the game data between RSE and FRLG with regards to held item tables for different species. For example, Meowth may hold a Nugget on FRLG but not on RSE.

I've updated the species data file (and extract script) to reflect that.

Fixes #781

Checklist

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

This  introduces a result dataclass for `handle_battle()` that reports things that have changed in that battle, such as Pokémon having taking damage -- or Pokémon having obtained new items through Pickup, Thief, or Covet.

It then uses this result to automatically take any items that Pokémon have obtained using Thief or Covet.

Fixes 40Cakes#664

Also, I noticed that there is actually a difference in the game data between RSE and FRLG with regards to held item tables for different species. For example, Meowth may hold a Nugget on FRLG but not on RSE.

I've updated the species data file (and extract script) to reflect that.

Fixes 40Cakes#781
@hanzi
hanzi merged commit 9333333 into 40Cakes:main May 1, 2026
1 check passed
@hanzi
hanzi deleted the better-thief-handling branch May 1, 2026 21:17
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.

Item Steal doesn’t work in English LeafGreen Bot does not retrieve item that has been stolen by Thief or Covet after battle

2 participants