RogueEdit / pyRogue

Educational Project
GNU Affero General Public License v3.0
51 stars 37 forks source link

Add a feature to show the current pokemon and moveset when modifying #152

Closed jemajet closed 1 month ago

jemajet commented 1 month ago

When modifying a slot's party it will now show the current pokemon and moveset of that pokemon when selecting. This should alleviate having to know exactly where each of your pokemon is ordered and help prevent accidental overwrites.

I achieved it creating some reverse of the enums in EnumLoader where you can look up the move or pokemon name by it's ID.

I also added a few Quality of Life changes:

  1. Made all slots ignored in the .gitignore
  2. Parsed the dictionaries for EnumLoader in the load instead of later on, preventing having to use the qualifier afterwards.

As an aside, the current list in pokemon.json is incomplete. I'm not sure where it's pulled from, but this code works by finding the closest started or pokemon in the current list if it doesn't find the actual pokemon.

Example of it working:

Command: 16
Current Pokemon (starters, not current form) are:
-----------------------------------------------------------------
0: Latias
1: Kartana
2: Tinkatink
3: Meowth
4: Magikarp
5: Mesprit
-----------------------------------------------------------------
Select the party slot of the Pokémon you want to edit (0-5): 2
Selected Pokemon: Tinkatink
-----------------------------------------------------------------
1: Change species
2: Set it shiny
3: Set Level
4: Set Luck
5: Set IVs
6: Change a move on a pokemon in your team
7: Change nature of a pokemon in your team
-----------------------------------------------------------------
Option: 6
Current moves on Tinkatink
-----------------------------------------------------------------
0: THIEF
1: COVET
2: LEECH_SEED
3: SALT_CURE
-----------------------------------------------------------------
Select the move you want to change (from 0 to 3): 2
....
914: ALLURING_VOICE
915: TEMPER_FLARE
916: SUPERCELL_SLAM
917: PSYCHIC_NOISE
918: UPPER_HAND
919: MALIGNANT_CHAIN
You are editing LEECH_SEED in slot 2
Write the name of the move, it will recommend for auto completion.
JulianStiebler commented 1 month ago

Mhhh this looks really cool - problem is im currently rewriting like everything on 0.3.3 - and bidirectional enum support you can achievewithout specifically having to specify every dict.

If i merge it now, people will download an update which they got notified for to just get another one later.

At best, commit this to another branch, i created dev for that matter which currently originates from main.

I tested it and im expected to finish 0.3.3 later today. I will accept this once im nearly done, accepting you as contributor and then merge it to 0.3.3 directly.


For that matter, i added currently Central Exception/Response Handling, better sanitzed inputs and many bugfixes. Aswell as renamed like everything, restructured the program flow and added exception and error decorators and improved every control flow.

I tested it and im expected to finish 0.3.3 later today. I will accept this once im nearly done, accepting you as contributor and then merge it to 0.3.3 directly.

JulianStiebler commented 1 month ago

I added a new pokemon.json (to 0.3.3)

The new one now has all evolutins included which should solve most of the problems. I referenced them as two different enums; starter and pokemon

JulianStiebler commented 1 month ago

Had 8 Conflicts aswell after 0.4 release, i closed it for now since v0.4 is here anyway (was supposed to be 0.3.3 but since huge update)