Interface BattleEvaluationModule
- All Known Implementing Classes:
BoardControlEvaluationModule,FlexibilityEvaluationModule,MatchUpEvaluationModule,ResourceEvaluationModule,RiskEvaluationModule,StatusEvaluationModule
Evaluation modules are intentionally small, focused units of logic. Each module is responsible for scoring one aspect of the current battle, such as resources, matchup pressure, board control, status conditions, or flexibility. The final battle evaluation can then combine the scores from multiple modules.
Implementations are datapack-serializable through their registered
BattleEvaluationModuleType. The CODEC dispatches on the module type registered in
PixelmonRegistry.getBattleEvaluationModuleTypeRegistry(), allowing different module
implementations to define their own configuration codecs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BattleEvaluationModule> -
Method Summary
Modifier and TypeMethodDescriptiondoubleevaluate(BattleEvaluationContext context) Evaluates the current battle state from the perspective provided by the context.default Stringkey()Gets the registry key for this evaluation module's type.type()Gets the registered type for this evaluation module.
-
Field Details
-
CODEC
-
-
Method Details
-
type
BattleEvaluationModuleType<?> type()Gets the registered type for this evaluation module.- Returns:
- the module type that provides this module's codec and registry identity
-
key
Gets the registry key for this evaluation module's type.- Returns:
- the string representation of this module type's registry key
-
evaluate
Evaluates the current battle state from the perspective provided by the context.Positive scores should generally represent favourable outcomes for the evaluated team, while negative scores should represent unfavourable outcomes. The exact scale is defined by the module implementation and its configuration.
- Parameters:
context- the battle evaluation context containing the battle state and team perspective- Returns:
- the score contributed by this module for the current battle state
-