BattleLifecycle

战斗会话的全局生命周期。

设计意图:

  • 用一个显式阶段描述整场 battle 目前处于“初始化、运行、已结束待结算、已结算”中的哪一段;

  • 让上层不再通过 started / ended / settled 三个布尔字段自行拼装阶段语义;

  • 为 session API 的调用边界提供统一判定依据。

这里刻意只表达“全局稳定阶段”,不把 RESOLVING_TURN 这类同步瞬时过程态持久化进 state, 避免状态恢复时引入额外复杂度。

Entries

Link copied to clipboard

会话已创建,但仍处于 side/unit 注册与业务配置阶段。

Link copied to clipboard

战斗已经正式开始,允许进入回合循环。

Link copied to clipboard

胜负或结束原因已经确定,但战后资源、副作用尚未统一结算。

Link copied to clipboard

战后副作用已经全部完成,整场 battle 生命周期彻底结束。

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

当前 battle 是否已经结束。

Link copied to clipboard

当前 battle 是否仍处于建局阶段。

Link copied to clipboard

当前 battle 是否正处于回合循环阶段。

Link copied to clipboard

当前 battle 是否已经完成最终结算。

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.