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.
25 lines
989 B
25 lines
989 B
import { aiLog } from './AiLog';
|
|
import type { AiHeroWeaponRecord } from '../types/AiHeroWeaponTypes';
|
|
import type { AiHeroWeaponRegistry } from './AiHeroWeaponRegistry';
|
|
|
|
/**
|
|
* AI 武将武器掷骰已下线(Hero.weapon / personalweapon / startweapon 字段已删)。
|
|
* 保留接口供 AiBattleBridge 注册 resolver;恒不分配,由 TowerLoadout 得到 0。
|
|
*/
|
|
export class AiHeroWeaponAssigner {
|
|
/**
|
|
* 获取或分配本局 AI 武将武器(已下线,恒 null)。
|
|
* @param _registry 局内存档
|
|
* @param heroId Hero.id
|
|
* @param _opponentRankId 对手段位
|
|
* @param _seed 随机种子
|
|
*/
|
|
resolveOrAssign(_registry: AiHeroWeaponRegistry, heroId: number, _opponentRankId: number, _seed: number): AiHeroWeaponRecord | null {
|
|
const hid = Math.floor(Number(heroId) || 0);
|
|
if (hid <= 0) {
|
|
aiLog('[AiHeroWeaponAssigner] invalid heroId', heroId);
|
|
return null;
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|