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

Draft: ❌Broken: Completely messed auto battle refactor #63

Closed
wants to merge 156 commits into from

Conversation

40Cakes
Copy link
Owner

@40Cakes 40Cakes commented Oct 21, 2023

No description provided.

Mowlawner and others added 30 commits August 22, 2023 21:48
- added menuing file to store menu navigation functionality
- added select_battle_option function to facilitate battle menu navigation
- added FleeBattle function (self-explanatory)
- Ports from old code:
-- added getMovePower to calculate effective move power
-- added isValidMove to determine validity of move
-- added FindEffectiveMove to find the best move to use
-- added BattleOpponent to handle battling opponents
- New stuff:
-- added handle_move_learning to deal with learning new moves
-- added placeholder calculate_new_move_viability to be fleshed out later
- updated all instances of `select_battle_option` to `SelectBattleOption`
- updated all instances of `log.info` to `console.print`
- removed extraneous print statements
# Conflicts:
#	modules/Menuing.py
#	modules/Stats.py
# Conflicts:
#	config.yml
#	modules/Config.py
#	modules/Memory.py
#	modules/Stats.py
hanzi and others added 23 commits October 10, 2023 21:36
Some users had issues because they closed the console window (instead of the GUI window) to exit the bot.

By default, this interrupts the process and prevents the shutdown function from running, so the bot state is lost.

This PR adds a handler for that signal.
…bmgba (Linux users are probably gigabrain smart enough to figure it out)
…ttle

- added check to ensure `replace_battler` was only checked when battling is enabled
…her to print messages relating to switching a pokemon out

- added CheckBattleCanHappen func to prevent bot from doing battle-related stuff if the party doesn't allow it, but also to enable the bot to battle if, say, the user heals at a PC after the bot wass just spinning around because it couldn't battle
…at I don't let temporary turn into permanent) checks to make sure the bot mode isn't manual so that users can regain control at any time by switching to manual mode

- this is ugly and i don't like it but it fixes the issue quick so people can use it while i refactor this into a solution that uses fewer loops
…t doesn't display (since it's called like all the time)
@40Cakes 40Cakes changed the title Completely messed auto battle refactor Draft: ❌Broken: Completely messed auto battle refactor Oct 21, 2023
@40Cakes 40Cakes marked this pull request as draft October 21, 2023 05:32
This was referenced Oct 25, 2023
@40Cakes 40Cakes closed this Oct 30, 2023
@40Cakes 40Cakes deleted the completely-messed-auto-battle branch October 31, 2023 01:56
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.

None yet

5 participants