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

EV Training ready for testing #447

Closed
wants to merge 0 commits into from
Closed

EV Training ready for testing #447

wants to merge 0 commits into from

Conversation

hosch-m
Copy link
Contributor

@hosch-m hosch-m commented Oct 17, 2024

Notes

The EV target GUI window is buggy. It does not disappear after selecting the target. Closing the window before pressing the 'EV Train' button also causes the bot to freeze.

Checklist

Haven't done these

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

Comment on lines 49 to 54
Label(window, text="HP").grid(row=0, column=1)
Label(window, text="Atk").grid(row=0, column=2)
Label(window, text="Def").grid(row=0, column=3)
Label(window, text="SpA").grid(row=0, column=4)
Label(window, text="SpD").grid(row=0, column=5)
Label(window, text="Spe").grid(row=0, column=6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mapping is wrong on the UI, causing data to be mapped to the wrong stats in the code. Here's the correct UI -> Code mapping

Label(window, text="HP").grid(row=0, column=1)
Label(window, text="Atk").grid(row=0, column=2)
Label(window, text="Def").grid(row=0, column=3)
Label(window, text="Spe").grid(row=0, column=4)
Label(window, text="SpA").grid(row=0, column=5)
Label(window, text="SpD").grid(row=0, column=6)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but it is in non-standard EV ordering. If you choose to implement this solution, please do not implement any of my suggested changes.

}


_list_of_stats = ("hp", "attack", "defence", "speed", "special_attack", "special_defence")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to be in the standard EV order

Suggested change
_list_of_stats = ("hp", "attack", "defence", "speed", "special_attack", "special_defence")
_list_of_stats = ("hp", "attack", "defence", "special_attack", "special_defence", "speed")

Label(window, text="SpD").grid(row=0, column=5)
Label(window, text="Spe").grid(row=0, column=6)

for stat in ("hp", "attack", "defence", "speed", "special_attack", "special_defence"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to be in the standard EV order for the UI input with correct mapping:

Suggested change
for stat in ("hp", "attack", "defence", "speed", "special_attack", "special_defence"):
for stat in ("hp", "attack", "defence", "special_attack", "special_defence", "speed"):

window.destroy()
window = None

def return_selection():
Copy link
Contributor

@orchi orchi Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to be in the standard EV order for the UI input with correct mapping:

Suggested change
def return_selection():
def return_selection():
nonlocal spinboxes, selected_ev_targets
selected_ev_targets = StatsValues(
hp=int(spinboxes[0].get()),
attack=int(spinboxes[1].get()),
defence=int(spinboxes[2].get()),
speed=int(spinboxes[5].get()),
special_attack=int(spinboxes[3].get()),
special_defence=int(spinboxes[4].get()),
)
window.after(50, remove_window)

Comment on lines 49 to 54
Label(window, text="HP").grid(row=0, column=1)
Label(window, text="Atk").grid(row=0, column=2)
Label(window, text="Def").grid(row=0, column=3)
Label(window, text="SpA").grid(row=0, column=4)
Label(window, text="SpD").grid(row=0, column=5)
Label(window, text="Spe").grid(row=0, column=6)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but it is in non-standard EV ordering. If you choose to implement this solution, please do not implement any of my suggested changes.

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.

3 participants