import { getBattleBuffDigitStatHost } from './BattleBuffDigitStatHost'; import { getBattleBuffUnitAttackSpeedHost } from './BattleBuffUnitAttackSpeedHost'; import { getBattleBuffMoveSpeedHost } from './BattleBuffMoveSpeedHost'; import { getBattleBuffBaseThunderHost } from './BattleBuffBaseThunderHost'; /** afterPick 所需最小战斗句柄 */ interface InGameRefreshBattle { /** 本机 */ localPlayerId: number; /** 取玩家 */ getPlayer(playerId: number): { deployedUnits: readonly number[] } | null | undefined; /** 会话 */ session: import('db://assets/mx/module/battle').BattleSession; /** * 气血丸/双生盾增量加基地血。 * @param playerId 携带方 */ applyInGameBaseHpCarry(playerId: number): boolean; } /** * 局内获得 buff 后刷新战斗侧效果。 */ export class BattleBuffInGameRefresh { /** * @param battle 战斗句柄 * @param playerId 玩家 */ static afterPick(battle: InGameRefreshBattle, playerId: number): void { getBattleBuffDigitStatHost().bind(battle); getBattleBuffDigitStatHost().reapplyPlayer(playerId); getBattleBuffUnitAttackSpeedHost().bind(battle as never); getBattleBuffMoveSpeedHost().bind(battle as never); getBattleBuffBaseThunderHost().refreshCarry(battle as never); battle.applyInGameBaseHpCarry(playerId); } }