Skip to contents

A damage calculation

calculate_damage_range will give the expected range that the damage to the opposing Pokémon might be. There will be the assumption that no critical hit has been landed

Usage

calculate_damage(move, attacker, defender, generation = 1L)

calculate_damage_range(move, attacker, defender, generation = 1L)

Arguments

move

Name of the move that the atttacker is using

attacker

The attacking Pokemon

defender

The defending Pokemon

generation

The generation that the battle is happening in

Value

An integer value of the amount of damage dealt to the defending Pokémon