public void GhostTypePokemonShouldNotTakeDamageFromPhysicalAttack() { IPokemon ghostTypePokemon = PokemonFactory.CreatePokemon <Gengar>(); IMove move = new Tackle(); Assert.True(TypeComparer.PokemonTypeDoesNotMakeContactWithMove(ghostTypePokemon?.Types, move)); }
public void GhostTypePokemonShouldTakeDamageFromSpecialAttack() { IPokemon ghostTypePokemon = PokemonFactory.CreatePokemon <Gengar>(); IMove move = new ShadowBall(); Assert.False(TypeComparer.PokemonTypeDoesNotMakeContactWithMove(ghostTypePokemon?.Types, move)); }
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(); }