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.
 
 
 
 
AdLike2048/assets/script/battle/ai/runtime/AiActiveSkillHost.ts

89 lines
2.7 KiB

import type { BattleGameSkillDragKind } from '../../../manager/battleBuff/BattleBuffActiveSkillUtil';
import type { MapManager } from '../../map/legacy/MapManager';
import type { ProjectBattleHandle } from '../../runtime/BattleRuntime';
import type { AiHeadlessBagHost } from './AiHeadlessBagHost';
/** AI 主动 skill UI 槽快照 */
export type AiActiveSkillUiSlot = {
/** buff id */
buffId: number;
/** CD 剩余秒 */
cdLeftSec: number;
/** CD 总秒 */
cdTotalSec: number;
};
/** AI 主动施放受体(Phase1 未使用) */
export type AiActiveSkillCastReceptor =
| { kind: 'map'; gridIndex: number }
| { kind: 'steal'; gridIndex: number }
| { kind: 'spawn'; spawnPort: number }
| { kind: 'confuse'; target: import('../../view/TextGrid').TextGrid }
| { kind: 'bag'; slotIndex: number };
/** AI 主动施放表现信息(Phase1 未使用) */
export type AiActiveSkillCastFxInfo = {
/** buff id */
buffId: number;
/** 槽下标 */
slotIndex: number;
/** 拖拽种类 */
kind?: BattleGameSkillDragKind;
/** 受体 */
receptor: AiActiveSkillCastReceptor;
};
/** AI 主动施放表现回调 */
export type AiActiveSkillCastFxHandler = (info: AiActiveSkillCastFxInfo) => void;
/** AI 妙手神偷表现回调(Phase1 未使用) */
export type AiStealGlyphFxHandler = (
playerGridIndex: number,
placement: { kind: 'map'; gridIndex: number } | { kind: 'bag'; slotIndex: number },
onExtracted: (tile: import('db://assets/mx/module/merge').MapTileRecord) => void,
) => boolean;
/** AI 幻魂镜表现回调(Phase1 未使用) */
export type AiConfuseHeroFxHandler = (
target: import('../../view/TextGrid').TextGrid,
durationSec: number,
) => boolean;
/**
* AI 局内主动 buff(Phase1 空实现:新表无 AI 主动槽)。
*/
export class AiActiveSkillHost {
/** 绑定(无操作) */
bind(_bagHost: AiHeadlessBagHost, _battle: ProjectBattleHandle, _map: MapManager, _onBoardChanged: () => void): void {
}
/** 解除绑定 */
dispose(): void {
}
/** 帧更新(无操作) */
tick(_dtSec: number): void {
}
/** UI 快照:始终空 */
snapshotUiSlots(): AiActiveSkillUiSlot[] {
return [];
}
/** 注册施放表现(无操作) */
setCastFxHandler(_handler: AiActiveSkillCastFxHandler | null): void {
}
/** 注册神偷表现(无操作) */
setStealFxHandler(_handler: AiStealGlyphFxHandler | null): void {
}
/** 注册幻魂镜表现(无操作) */
setConfuseFxHandler(_handler: AiConfuseHeroFxHandler | null): void {
}
/** 乾坤袋回收(Phase1 不支持) */
tryRecycleSurplusBag(): boolean {
return false;
}
}