Ejemplo n.º 1
0
        // Party Commands
        private List <BattleCommand> GetPartyCommands(
            Pokemon pokemon,
            Trainer trainer,
            List <BattleCommand> setCommands,
            List <Pokemon> otherCommandablePokemon,
            bool forceReplace = false)
        {
            List <BattleCommand> commands         = new List <BattleCommand>();
            List <Pokemon>       availablePokemon = model.GetTrainerFirstXAvailablePokemon(trainer, trainer.party.Count);

            for (int i = 0; i < availablePokemon.Count; i++)
            {
                BattleCommand partyCommand = (forceReplace) ?
                                             BattleCommand.CreateReplaceCommand(
                    switchPosition,
                    trainer,
                    availablePokemon[i],
                    true)
                    :
                                             BattleCommand.CreateSwitchCommand(
                    pokemon,
                    switchPosition,
                    trainer,
                    availablePokemon[i],
                    true);
                commands.Add(partyCommand);
            }
            return(commands);
        }