BattleStoredBoostSupport

既有 stored boosts 的读取、筛选与迁移支持组件。

设计意图:

  • psych-up / power-swap / guard-swap / heart-swap / topsy-turvy / spectral-thief 这类基于“当前已持有能力阶级”的规则收口到统一 helper;

  • 避免多个 action executor 各自重复实现 boost map 归一、过滤、交换和偷取逻辑;

  • 保持所有 stored boost 改写都共享同一套别名、上下限和 0 值清理规则。

Types

Link copied to clipboard
data class TransferResult(val sourceBoosts: Map<String, Int>, val targetBoosts: Map<String, Int>, val transferredBoosts: Map<String, Int>)

一次 boost 转移的结果。

Functions

Link copied to clipboard
fun invert(boosts: Map<String, Int>, stats: Set<String> = emptySet()): Map<String, Int>

把指定 stat 子集取反。

Link copied to clipboard
fun normalize(boosts: Map<String, Int>): Map<String, Int>

读取并规范化一份 stored boosts。

Link copied to clipboard
fun replaceSelected(current: Map<String, Int>, replacement: Map<String, Int>, selectedStats: Set<String>): Map<String, Int>

用 replacement 替换 current 中指定 stat 子集的 boosts。

Link copied to clipboard
fun select(boosts: Map<String, Int>, selection: String = BattleBoostRelaySelectionValues.ALL, stats: Set<String> = emptySet()): Map<String, Int>

按 selection 与 stats 子集筛选 stored boosts。

Link copied to clipboard
fun steal(source: Map<String, Int>, target: Map<String, Int>, selection: String = BattleBoostRelaySelectionValues.POSITIVE, stats: Set<String> = emptySet()): BattleStoredBoostSupport.TransferResult

从 source 中取出指定 boosts,并把它们加到 target 身上。

Link copied to clipboard

统计当前 boosts 中全部正向 stage 的总和。

Link copied to clipboard
fun swap(left: Map<String, Int>, right: Map<String, Int>, stats: Set<String> = emptySet()): Pair<Map<String, Int>, Map<String, Int>>

交换两份 boosts 的指定 stat 子集。