Interface AttackDamageCalculator
- All Known Implementing Classes:
AverageAttackDamageCalculator,MaximumAttackDamageCalculator,MinimumAttackDamageCalculator,StandardAttackDamageCalculator
public interface AttackDamageCalculator
Calculates the random damage modifier for an attack.
By default this is a random value between 0.85 and 1.00, but it can be overridden to always return the minimum (0.85), average (0.925), or maximum (1.00) value for testing purposes.
By default this is a random value between 0.85 and 1.00, but it can be overridden to always return the minimum (0.85), average (0.925), or maximum (1.00) value for testing purposes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttackDamageCalculatoraverage()doublegetRandomDamageModifier(PixelmonWrapper userWrapper) Gets the random damage modifier for an attack.static AttackDamageCalculatormaximum()static AttackDamageCalculatorminimum()static AttackDamageCalculatorstandard()
-
Method Details
-
getRandomDamageModifier
Gets the random damage modifier for an attack. This is a value between 0.85 and 1.00 that is multiplied with the final damage calculation to add some variability to the damage dealt.- Parameters:
userWrapper- The PixelmonWrapper of the attacking Pokemon, which can be used to access the battle controller's random number generator and simulate mode.- Returns:
- A double value between 0.85 and 1.00 representing the random damage modifier for the attack.
-
standard
-
minimum
-
average
-
maximum
-