/**
 * A game developer needs to calculate the damage dealt to a character. The damage depends on the health, armor, and dodge chance of the character.
 * If the character's health is above 50 and armor is above 10, the damage is determined based on the armor value.
 * If the health is below or equal to 50, the damage calculation depends on the dodge chance.
 * If the dodge chance is below 0.5, the damage is equal to the health multiplied by the dodge chance.
 * Otherwise, the damage is equal to the health divided by the dodge chance.
 *
 * @param health The health of the character.
 * @param armor The armor value of the character.
 * @param dodgeChance The dodge chance of the character.
 * @return The calculated damage.
 *
 * Example:
 * calculateDamage(80.0, 15.0, 0.2)
 * Expected Output:
 * 12.0
 */
fun calculateDamage(health: Double, armor: Double, dodgeChance: Double): Double {

    return if (health > 50) {
        if (armor > 10) {
            armor * 0.5
        } else {
            armor * 0.3
        }
    } else {
        if (dodgeChance < 0.5) {
            health * dodgeChance
        } else {
            health / dodgeChance
        }
    }
}
/**
 * A game developer needs to calculate the damage dealt to a character. The damage depends on the health, armor, and dodge chance of the character.
 * If the character's health is above 50 and armor is above 10, the damage is determined based on the armor value.
 * If the health is below or equal to 50, the damage calculation depends on the dodge chance.
 * If the dodge chance is below 0.5, the damage is equal to the health multiplied by the dodge chance.
 * Otherwise, the damage is equal to the health divided by the dodge chance.
 *
 * @param health The health of the character.
 * @param armor The armor value of the character.
 * @param dodgeChance The dodge chance of the character.
 * @return The calculated damage.
 *
 * Example:
 * calculateDamage(80.0, 15.0, 0.2)
 * Expected Output:
 * 12.0
 */
fun calculateDamage(health: Double, armor: Double, dodgeChance: Double): Double {
/**
 * A game developer needs to calculate the damage dealt to a character. The damage depends on the health, armor, and dodge chance of the character.
 * If the character's health is above 50 and armor is above 10, the damage is determined based on the armor value.
 * If the health is below or equal to 50, the damage calculation depends on the dodge chance.
 * If the dodge chance is below 0.5, the damage is equal to the health multiplied by the dodge chance.
 * Otherwise, the damage is equal to the health divided by the dodge chance.
 *
 * @param health The health of the character.
 * @param armor The armor value of the character.
 * @param dodgeChance The dodge chance of the character.
 * @return The calculated damage.
 *
 * Example:
 * calculateDamage(80.0, 15.0, 0.2)
 * Expected Output:
 * 12.0
 */
fun calculateDamage(health: Double, armor: Double, dodgeChance: Double): Double {

    return if (health > 50) {
        if (armor > 10) {
            armor * 0.5
        } else {
            armor * 0.3
        }
    } else {
        if (dodgeChance < 0.5) {
            health * dodgeChance
        } else {
            health / dodgeChance
        }
    }
}