Closed caymansimpson closed 7 months ago
Yeah, this is pretty bad in terms of usability.
What do you think would be the clearest API? Imo, it would be ideal to abstract away positions, for instance by intelligently handling the move_target
arg in BattleOrder
. Does that make sense?
I think that makes sense -- so people will just use the index in provided in poke-env, and we will handle everything else? If so, how do we handle self-targets? (when battle.opponent_active_pokemon is 0 or 1, mapping to 1 and 2, and self-targets are -1 or -2)
Maybe enums would be best?
Combining with: https://github.com/hsahovic/poke-env/pull/529
Right now, it's very hard to specify what mon should be targeting what other mon in double, since showdown targets don't map cleanly to arrays. I had to do a workaround mapping function solution in a forked version of poke-env here: https://github.com/caymansimpson/poke-env/blob/5f09a6d814b294c0c6827131485101afa2f64668/src/poke_env/utils.py#L90
I think it would be great to have "/move hyperbeam 0" to target the mon in the 0th position of the opponent's team's tuple