You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.2 KiB
32 lines
1.2 KiB
|
4 days ago
|
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;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 局内获得 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);
|
||
|
|
}
|
||
|
|
}
|