java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.species.aggression.AggressionChances

public class AggressionChances extends Object
Representing the chances of a Species being aggressive, timid or passive. By default passive = 100 - (timid + aggressive)
  • Constructor Details

    • AggressionChances

      public AggressionChances(int timid, int passive, int aggressive)
      Constructor taking all three values
      Parameters:
      timid - Chance of being timid
      passive - Chance of being passive
      aggressive - Chance of being aggressive
    • AggressionChances

      public AggressionChances(int timid, int aggressive)
      Default constructor for calculating passive
      Parameters:
      timid -
      aggressive -
  • Method Details

    • calculateAggression

      public Aggression calculateAggression()
      Calculates the Aggression for a pokemon using these chances assuming the owner is null (i.e. wild pokemon)
      Returns:
      The new Aggression
    • calculateAggression

      public Aggression calculateAggression(UUID owner)
      Calculates the Aggression for the pokemon using these chances
      Parameters:
      owner - The owner - if not null will always return Aggression.PASSIVE
      Returns:
      The new Aggression
    • getTimid

      public int getTimid()
    • getPassive

      public int getPassive()
    • getAggressive

      public int getAggressive()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object