public static void ShowInflictedStatuses(IPokemon pokemonThatHadItsStatusInflicted, StatusMove[] arrayOfInflictedStatuses) { for (int i = 0; i < arrayOfInflictedStatuses.Length; i++) { switch (arrayOfInflictedStatuses[i]) { case StatusMove.ATTACK_UP: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s attack went up!"); break; case StatusMove.ATTACK_DOWN: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s attack went down!"); break; case StatusMove.DEFENSE_UP: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s defense went up!"); break; case StatusMove.DEFENSE_DOWN: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s defense went down!"); break; case StatusMove.SPECIALATTACK_UP: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s special attack went up!"); break; case StatusMove.SPECIALATTACK_DOWN: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s special attack went down!"); break; case StatusMove.SPECIALDEFENSE_UP: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s special defense went up!"); break; case StatusMove.SPECIALDEFENSE_DOWN: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s special defense went down!"); break; case StatusMove.SPEED_UP: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s speed went up!"); break; case StatusMove.SPEED_DOWN: ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{pokemonThatHadItsStatusInflicted.GetType().Name}'s speed went down!"); break; } } }
public static void EnemyTrainerDrawsbackPokemon(IPokemon pokemon) { ConsoleUtils.WaitOneSecond(); ConsoleUtils.TrainerAction <EnemyAction>($"{pokemon?.GetType().Name}, come back!"); ConsoleUtils.WaitOneSecond(); ConsoleUtils.ClearScreen(); }
public static void PlayerSendsPokemon(IPokemon pokemon) { ConsoleUtils.WaitOneSecond(); ConsoleUtils.TrainerAction <PlayerAction>($"Go, {pokemon.GetType().Name}!"); ConsoleUtils.WaitOneSecond(); ConsoleUtils.ClearScreen(); }
public static void PlayerDrawsbackPokemon(IPokemon pokemon) { ConsoleUtils.WaitOneSecond(); ConsoleUtils.TrainerAction <PlayerAction>($"Great job, {pokemon.GetType().Name}. Come back!"); ConsoleUtils.WaitOneSecond(); ConsoleUtils.ClearScreen(); }
public object Clone() { IPokemon pokemon = PokemonFactory.CreatePokemon(); foreach (PropertyInfo property in pokemon.GetType().GetProperties()) { property.SetValue(pokemon, property.GetValue(this, null), null); } pokemon.ResetStats(); return(pokemon); }
public void SetPokemonAsCurrent(IPokemon pokemon) { Parallel.ForEach(PokemonTeam, pkmn => { if (pkmn.Current) { pkmn.Current = false; } if (pkmn.Pokemon.GetType().Name == pokemon.GetType().Name) { pkmn.Current = true; } }); }
private void PokemonAttack(IPokemon attackingPokemon, IPokemon targetPokemon, int chosenMove) { IMove move = attackingPokemon.Moves[chosenMove]; if (ConsoleBattleInfoMove.MoveDoesNotHavePowerPointsLeft(move)) { PromptTrainerForPokemonMove(); return; } ConsoleBattleInfoPokemon.ShowPokemonUsedMove(attackingPokemon, move.GetType().Name); if (TypeComparer.PokemonTypeDoesNotMakeContactWithMove(targetPokemon.Types, move)) { ConsoleUtils.ShowMessageAndWaitOneSecond($"It didn't affect {targetPokemon.GetType().Name}!"); } else { ProcessAttack(attackingPokemon, targetPokemon, move); } ConsoleUtils.ClearScreen(); }
public TelaPokemonDetalhes(IPokemon pokemon) { InitializeComponent(); Id = Convert.ToInt32(pokemon.Id); this.lblNome.Text = pokemon.Nome; foreach (PropertyInfo pi in pokemon.GetType().GetProperties()) { if (pi.Name != "Nome" && pi.Name != "Foto") { pnlDetalhes.Controls.Add(new Label() { Text = $"{pi.Name} : {pi.GetValue(pokemon).ToString()}", Location = new Point(20, 30 + ((pnlDetalhes.Controls.Count) * 30)), Font = new Font(lblNome.Font.FontFamily, 10), Size = new Size(pnlDetalhes.Size.Width - 30, 30) }); } } this.ptbFoto.Load(pokemon.Foto); }
public static void ShowItemWasUsedOnPokemon(IItem item, IPokemon pokemon) { ConsoleUtils.ShowMessageAndWaitTwoSeconds($"{item.GetType().Name} was used on {pokemon.GetType().Name}!"); ConsoleUtils.ClearScreen(); }