private static void ProcessAttack(IPokemon attackingPokemon, IPokemon targetPokemon, IMove move) { TypeEffect moveEffectOnPokemon = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(move.Type, targetPokemon.Types.FirstOrDefault()); int calculatedDamage = TypeDamageCalculator.CalculateDamage(attackingPokemon, targetPokemon, move, moveEffectOnPokemon); attackingPokemon.UseMove(move); if (move.StatusMoves != null) { BattleAux.ProcessStatusAttack(attackingPokemon, targetPokemon, move); } else { targetPokemon.ReceiveDamage(calculatedDamage); ConsoleBattleInfoPokemon.ShowPokemonReceivedDamage(targetPokemon, calculatedDamage); ConsoleBattleInfoTypes.ShowHowEffectiveTheMoveWas(moveEffectOnPokemon); } }
public void ElectricAgainstDragonShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(electricType, Type.DRAGON); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void GroundAgainstBugShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(groundType, Type.BUG); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void GhostAgainstFightingShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(ghostType, Type.FIGHTING); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void ElectricAgainstGroundShouldBeImmune() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(electricType, Type.GROUND); Assert.Equal(TypeEffect.IMMUNE, typeEffect); }
public void BugAgainstDarkShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(bugType, Type.DARK); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void GrassAgainstFlyingShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(grassType, Type.FLYING); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void DarkAgainstDarkShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(darkType, darkType); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void FlyingAgainstGrassShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(flyingType, Type.GRASS); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void RockAgainstGroundShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(rockType, Type.GROUND); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void DarkAgainstGhostShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(darkType, Type.GHOST); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void RockAgainstIceShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(rockType, Type.ICE); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void FightingAgainstRockShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(fightingType, Type.ROCK); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void FightingAgainstPsychicShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(fightingType, Type.PSYCHIC); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void FairyAgainstSteelShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(fairyType, Type.STEEL); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void FlyingAgainstRockShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(flyingType, Type.ROCK); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void DragonAgainstDragonShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(dragonType, dragonType); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void SteelAgainstElectricShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(steelType, Type.ELECTRIC); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void BugAgainstFairyShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(bugType, Type.FAIRY); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void SteelAgainstBugShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(steelType, Type.BUG); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void GrassAgainstDragonShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(grassType, Type.DRAGON); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void PoisonAgainstGhostShouldBeNotVeryEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(poisonType, Type.GHOST); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }
public void GhostAgainstPsychicShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(ghostType, Type.PSYCHIC); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void PoisonAgainstSteelShouldBeImmune() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(poisonType, Type.STEEL); Assert.Equal(TypeEffect.IMMUNE, typeEffect); }
public void ElectricAgainstFlyingShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(electricType, Type.FLYING); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void PoisonAgainstFairyShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(poisonType, Type.FAIRY); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void GroundAgainstFlyingShouldBeImmune() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(groundType, Type.FLYING); Assert.Equal(TypeEffect.IMMUNE, typeEffect); }
public void FairyAgainstFightingShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(fairyType, Type.FIGHTING); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void GroundAgainstSteelShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(groundType, Type.STEEL); Assert.Equal(TypeEffect.SUPER_EFFECTIVE, typeEffect); }
public void FireAgainstDragonShouldBeSuperEffective() { TypeEffect typeEffect = TypeComparer.GetMoveEffectivenessBasedOnPokemonType(FireType, Type.DRAGON); Assert.Equal(TypeEffect.NOT_VERY_EFFECTIVE, typeEffect); }