Open dcarpenter31 opened 3 years ago
Since we're still iterating over the battle architecture, and I'm not satisfied with my attempts to implement RunTurn in a way that covers cases where the turn is not passed by selecting Run, I'm going to drop this issue for now and move to something else.
This will represent a turn where a Trainer or Pokemon attempts to leave a battle.
See: https://github.com/StevensSEC/pokemonbattlelib/wiki/Requirements#run-running-away
This option has different behavior depending on if the battle is between a player Trainer and another player Trainer, a player Trainer and an NPC Trainer, or a Trainer and a wild Pokemon:
In a battle between two player Trainers, this option is equivalent to attempt to forfeit the match. The match ends in a loss for the player Trainer who selected this option if the other Trainer selects any other option. The match ends in a draw if both Trainers select this option on the same turn.
In a battle between a player Trainer and an NPC Trainer, this option cannot be selected, and a message is displayed to warn the player Trainer without passing their turn. NPC Trainers will not select this option.
In a battle between a player Trainer and a wild Pokemon, if the player Trainer attempts to flee, the Speeds of the two Pokemon active in the battle are compared and success is determined using the formula linked above. If the wild Pokemon attempts to flee, it succeeds without needing to compare its Speed. If either Pokemon has an effect that prevents them from fleeing, selecting this option fails. This will not pass the turn for the Trainer, and the wild Pokemon cannot select this option.
[ ] Multi player Trainer case functional
[ ] Trainer and NPC case functional
[ ] Trainer and wild Pokemon case functional
[ ] Add case to
SimulateRound()
[ ] Running takes precedence over
FightTurn
s