/// <summary> /// /// </summary> /// <param name="defenseCharacter"></param> /// <returns></returns> private AttackResult Attack(Character defenseCharacter) { AttackInformation attackInformation = CalculateAttackInformation(defenseCharacter); AttackResult attackResult = ApplyAttack( attackInformation.AttackWeapon, attackInformation.AttackHitPercentage, attackInformation.AttackDamage, attackInformation.AttackCriticalPercentage, defenseCharacter); if (defenseCharacter.CurrentHp == 0) { return(attackResult); } if (attackInformation.DefenseCanAttack) { attackResult.Add(defenseCharacter.ApplyAttack( attackInformation.DefenseWeapon, attackInformation.DefenseHitPercentage, attackInformation.DefenseDamage, attackInformation.DefenseCriticalPercentage, this)); if (CurrentHp == 0) { return(attackResult); } } if (attackInformation.AttackNumberOfAttacks == 2) { attackResult.Add(ApplyAttack( attackInformation.AttackWeapon, attackInformation.AttackHitPercentage, attackInformation.AttackDamage, attackInformation.AttackCriticalPercentage, defenseCharacter)); } return(attackResult); }