40Cakes / pokebot-gen3

PokéBot Gen3 is a shiny hunting bot, written in Python that runs libmgba + mGBA Python bindings under the hood. Pokémon Ruby, Sapphire, Emerald, FireRed and LeafGreen are supported.
https://www.youtube.com/@40_Cakes/streams
GNU General Public License v3.0
178 stars 54 forks source link

Add lookup function whether a trainer has been defeated #338

Closed hanzi closed 4 months ago

hanzi commented 4 months ago

Description

This adds a lookup method to ObjectEventTemplate to see whether a trainer (map object) has already been defeated.

Since this is only available for ObjectEventTemplate and not for ObjectEvent itself, I have added a lookup function to get the former from the latter.

This has no immediate use (though it could be used in some modes to verify that relevant trainers have been defeated) but chesta provided that code in the development-chat Discord channel and I didn't want to let it go to waste.

I have added a 'defeated' indicator to the object list in the Map debug tab.

Checklist