Exemple #1
0
 /// <summary>
 /// Calculates potential damage whith a specified attacking and defending Micromon
 /// </summary>
 /// <param name="attacker">Attacking Micromon</param>
 /// <param name="defender">Defending Micromon</param>
 /// <returns>The results of the simulated attack</returns>
 private static ProbeResults CalculateDamage(Micromon attacker, Micromon defender)
 {
     //Damage shoud not be any lower than 1
     return(new ProbeResults(Math.Max(1d, (attacker.Attack - (defender.Defense / 2d)) * Typing.CalculateEffectiveness(attacker, defender)), defender));
 }