Skip to contents

Function that calculates the damages of an attack on a given opponent

Usage

calculate_damages(current_attack, current_pokemon, opponent, types)

Arguments

current_attack

The currently selected attack.

current_pokemon

Id of the randomly generated pokemon who is attacking.

opponent

Opponent type. Useful for effectiveness calculations.

types

Object containing all pokemons types strenght and weaknesses.

Note

As already explained, I only consider physical attacks...