Interface EvolutionEntity

All Superinterfaces:
IEntity

public interface EvolutionEntity extends IEntity
Interface for representing an entity that can evolve.
  • Method Details

    • getNextEvolutions

      List<String> getNextEvolutions()
      Get the list of evolution conditions that can be applied to this entity.
      Returns:
      the list of evolution conditions that can be applied to this entity.
    • getPreviousEvolutions

      List<String> getPreviousEvolutions()
      Get the list of evolution conditions that can be applied to this entity.
      Returns:
      the list of evolution conditions that can be applied to this entity.
    • canEvolveTo

      default boolean canEvolveTo(EvolutionCondition evolutionCondition)
      Checks if this entity can evolve to the given evolution condition.
      Parameters:
      evolutionCondition - the evolution condition to check.
      Returns:
      true if this entity can evolve to the given evolution condition, false otherwise.
    • getEvolutionCondition

      default EvolutionCondition getEvolutionCondition(String evolutionConditionID)
      Gets the evolution condition associated with the given evolution condition ID.
      Parameters:
      evolutionConditionID - the unique identifier of the evolution condition to retrieve.
      Returns:
      the evolution condition associated with the given evolution condition ID, or null if no such evolution condition exists.
    • evolveTo

      default boolean evolveTo(String evolutionConditionID)
      Evolves this entity to the given evolution condition ID if possible.
      Parameters:
      evolutionConditionID - the unique identifier of the evolution condition to evolve to.
      Returns:
      true if this entity was successfully evolved to the given evolution condition ID, false otherwise.
    • mergeData

      default void mergeData(IEntity other)
      Merges the data of this entity with the given entity. This method is called when evolving to a new entity, and allows to transfer any relevant data from the old entity to the new one. Can be overridden by implementing classes to provide custom merging logic. By default, this method does nothing.
      Parameters:
      other - the entity to merge data with. This is the new entity that is being evolved to.