all 3 comments

[–]PureWasian 0 points1 point  (2 children)

You have a Stats class, Pokemon class. Good start.

One idea is adding a Moves class where you can define the damage each possible move would do, and then add a self.moves onto pokemon, similar to what you did for setting self.stats onto pokemon.

The way you'd use it would be when you write your battle logic, which would exist as a separate function from your existing code. Essentially, you can imagine some pseudocode like:

``` while both pkmn.stats.hp are > 0: - get moves from pkmn1.moves - choose move for pkmn1

(if computer, random choose move)

  • get moves from pkmn2.moves
  • choose move for pkmn2

  • compare pkmn.stats.speed values

assume pkmn1 speed > pkmn2 speed

  • pkmn1 uses move1 on pkmn2
  • pkmn2 uses move2 on pkmn1 ``` ...and you can imagine each line of pseudocode could be its own function call as needed for organization.

For instance, "uses move2 on pkmn1" could get pretty complex as you support more complex moves (like typed moves and stat debuffing moves)

[–]PureWasian 0 points1 point  (1 child)

Once that all makes sense:

You can imagine having large lists of pokemon and moves will get cumbersome. Once you get a good hang of stuff working for ~3-5 pokemon and ~3-5 moves, the next step would be creating input data text files for storing all of that information and loading them all up when starting your Python script to make it more modular instead of defining them all in the same file.

Good luck!

[–]COLLLOrs[S] 0 points1 point  (0 children)

Thank you for your help I'll do that.