DefaultBattleFlowEngine
class DefaultBattleFlowEngine(effectRepository: EffectDefinitionRepository, phaseProcessor: BattleFlowPhaseProcessor, moveResolutionPipeline: BattleMoveResolutionPipeline) : BattleFlowEngine
默认 battle 主流程实现。
设计意图:
在 battle 层真正消费 effect 定义,而不只停留在规则处理器单测。
通过 move resolution pipeline、mutation interceptor chain 和 hit policy 拆解 battle flow 主流程。
Constructors
Link copied to clipboard
constructor(effectRepository: EffectDefinitionRepository, phaseProcessor: BattleFlowPhaseProcessor, moveResolutionPipeline: BattleMoveResolutionPipeline)
Functions
Link copied to clipboard
open override fun resolveMoveAction(snapshot: BattleRuntimeSnapshot, moveId: String, attackerId: String, targetId: String, accuracy: Int? = null, evasion: Int? = null, basePower: Int, damage: Int, attributes: Map<String, Any?> = emptyMap()): MoveResolutionResult
推进一次完整的 move resolution。
Link copied to clipboard
open override fun resolveMoveHit(snapshot: BattleRuntimeSnapshot, moveId: String, attackerId: String, targetId: String, attributes: Map<String, Any?> = emptyMap()): BattleRuntimeSnapshot
以只关心命中与 hook 的简化参数推进一次 move resolution。
Link copied to clipboard
推进一次 residual phase。