DefaultBattleSessionCommandFactory

默认 battle session 命令工厂。

设计意图:

  • 集中承载 choice/action 两个命令族的数据对象创建逻辑。

  • 保证 session 层各个入口对命令对象的创建语义保持一致。

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

由统一 choice 创建对应的 action。

Link copied to clipboard
open override fun createCaptureAction(playerId: String, ballItemId: String, sourceUnitId: String, targetId: String, priority: Int, speed: Int): BattleSessionCaptureAction

创建一个 capture action。

Link copied to clipboard
open override fun createCaptureChoice(playerId: String, ballItemId: String, sourceUnitId: String, targetId: String, priority: Int, speed: Int): CaptureChoice

创建一个 capture choice。

Link copied to clipboard
open override fun createItemAction(itemId: String, actorUnitId: String, targetId: String, priority: Int, speed: Int, attributes: Map<String, Any?>): BattleSessionItemAction

创建一个 item action。

Link copied to clipboard
open override fun createItemChoice(itemId: String, actorUnitId: String, targetId: String, priority: Int, speed: Int, attributes: Map<String, Any?>): ItemChoice

创建一个 item choice。

Link copied to clipboard
open override fun createMoveAction(moveId: String, attackerId: String, targetId: String, priority: Int, speed: Int, accuracy: Int?, evasion: Int?, basePower: Int, damage: Int, attributes: Map<String, Any?>): BattleSessionMoveAction

创建一个 move action。

Link copied to clipboard
open override fun createMoveChoice(moveId: String, attackerId: String, targetId: String, priority: Int, speed: Int, accuracy: Int?, evasion: Int?, basePower: Int, damage: Int, attributes: Map<String, Any?>): MoveChoice

创建一个 move choice。

Link copied to clipboard
open override fun createRunAction(sideId: String, priority: Int, speed: Int): BattleSessionRunAction

创建一个 run action。

Link copied to clipboard
open override fun createRunChoice(sideId: String, priority: Int, speed: Int): RunChoice

创建一个 run choice。

Link copied to clipboard
open override fun createSwitchAction(sideId: String, outgoingUnitId: String, incomingUnitId: String, priority: Int, speed: Int): BattleSessionSwitchAction

创建一个 switch action。

Link copied to clipboard
open override fun createSwitchChoice(sideId: String, outgoingUnitId: String, incomingUnitId: String, priority: Int, speed: Int): SwitchChoice

创建一个 switch choice。

Link copied to clipboard
open override fun createWaitAction(unitId: String, priority: Int, speed: Int): BattleSessionWaitAction

创建一个 wait action。

Link copied to clipboard
open override fun createWaitChoice(unitId: String, priority: Int, speed: Int): WaitChoice

创建一个 wait choice。