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/heros/HeroActorRes.ts

64 lines
2.0 KiB

3 weeks ago
/** 英雄 Hero.id 常量与字形资源集合(与 Hero.json 对齐) */
2 weeks ago
import { membershipFromArray, type ReadonlyMembershipSet } from '../../../mx/tools/MembershipSet';
3 weeks ago
export const DAO_WEAPON1_ID = 1;
/** 枪 */
export const QIANG_WEAPON1_ID = 2;
/** 棍 */
export const GUN_WEAPON1_ID = 3;
export const GONG_WEAPON1_ID = 4;
export const WU_KONG_WEAPON1_ID = 11;
/** 悟能 */
export const WU_NENG_WEAPON1_ID = 12;
/** 悟净 */
export const WU_JING_WEAPON1_ID = 13;
export const NEZHA_WEAPON1_ID = 14;
export const JIN_ZHA_WEAPON1_ID = 15;
export const MU_ZHA_WEAPON1_ID = 16;
export const YANGJIAN_WEAPON1_ID = 17;
export const WANG_MU_WEAPON1_ID = 18;
export const YU_DI_WEAPON1_ID = 19;
export const YAN_WANG_WEAPON1_ID = 20;
export const CHANG_E_WEAPON1_ID = 21;
export const LI_JING_WEAPON1_ID = 22;
/** 已接 HeroActor 的 Hero.id(含通用壳) */
const HERO_ACTOR_WEAPON1_IDS: ReadonlyMembershipSet<number> = membershipFromArray([
DAO_WEAPON1_ID,
QIANG_WEAPON1_ID,
GUN_WEAPON1_ID,
GONG_WEAPON1_ID,
WU_KONG_WEAPON1_ID,
WU_NENG_WEAPON1_ID,
WU_JING_WEAPON1_ID,
NEZHA_WEAPON1_ID,
JIN_ZHA_WEAPON1_ID,
MU_ZHA_WEAPON1_ID,
YANGJIAN_WEAPON1_ID,
WANG_MU_WEAPON1_ID,
YU_DI_WEAPON1_ID,
YAN_WANG_WEAPON1_ID,
CHANG_E_WEAPON1_ID,
LI_JING_WEAPON1_ID,
]);
/**
* 新表字形 resource(Hero.res / Text.icon)。
* 不含已删老英雄:白龙马、观音、如来、电母、风、轮、火、斧等。
*/
export const HERO_GLYPH_RESOURCES: ReadonlyMembershipSet<string> = membershipFromArray([
2 weeks ago
'刀', '枪', '棍', '弓', '桃',
3 weeks ago
'悟', '空', '能', '净',
'哪', '吒', '金', '木',
'杨', '戬', '王', '母', '玉', '帝', '阎',
'嫦', '娥', '李', '靖',
]);
2 weeks ago
/** heros/prefab/text 预制体(英雄字形) */
export const TEXT_CHAR_RESOURCES: ReadonlyMembershipSet<string> = HERO_GLYPH_RESOURCES;
3 weeks ago
/** 是否已接 HeroActor 的英雄 */
export function isHeroActorWeapon1(weapon1Id: number): boolean {
return weapon1Id > 0 && HERO_ACTOR_WEAPON1_IDS.has(weapon1Id);
}