refactor: 将代码中的card_lv统一替换为rarity
本次提交完成了全项目范围内术语的统一替换,将原本指代卡牌品质/等级的card_lv字段全部重命名为rarity,对齐了设计文档中的命名规范,避免了术语混淆: 1. 更新了所有配置文件、组件类、数据结构中的字段定义 2. 同步修改了注释、文档说明中的相关表述 3. 修正了英雄、技能、装备卡牌的品质显示逻辑 4. 调整了背景颜色切换、属性计算等相关业务逻辑
This commit is contained in:
@@ -117,15 +117,15 @@ export const HERO_GROW_COEF: Record<HGrowType, { hp: number; ap: number; def: nu
|
||||
};
|
||||
|
||||
/**
|
||||
* 英雄品质系数步长:相邻品质(card_lv)基础属性相差 5%。
|
||||
* 系数 = 1 + HERO_QUALITY_STEP × (card_lv - 1),lv1~lv5 → 1.00/1.05/1.10/1.15/1.20。
|
||||
* 英雄品质系数步长:相邻品质(rarity)基础属性相差 5%。
|
||||
* 系数 = 1 + HERO_QUALITY_STEP × (rarity - 1),lv1~lv5 → 1.00/1.05/1.10/1.15/1.20。
|
||||
* 仅作用于 lv1 初始基础属性(AP/HP/DEF),成长与等级 bonus 不随品质缩放。
|
||||
*/
|
||||
export const HERO_QUALITY_STEP = 0.05;
|
||||
|
||||
/** 计算英雄品质系数(相邻品质基础属性差 5%) */
|
||||
export function getHeroQualityCoef(cardLv: number): number {
|
||||
return 1 + HERO_QUALITY_STEP * (Math.max(1, cardLv) - 1);
|
||||
export function getHeroQualityCoef(rarity: number): number {
|
||||
return 1 + HERO_QUALITY_STEP * (Math.max(1, rarity) - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -308,7 +308,7 @@ export interface heroInfo {
|
||||
fac: FacSet; // 阵营(FacSet.HERO 或 FacSet.MON)
|
||||
kind?: number; // 未使用
|
||||
lv: number; // 英雄等级
|
||||
card_lv?: number; // 卡牌等级(驱动 bg_node 颜色:1=green 2=blue 3=purple 4=red 5=yellow)
|
||||
rarity?: number; // 卡牌等级(驱动 bg_node 颜色:1=green 2=blue 3=purple 4=red 5=yellow)
|
||||
type: HType; // 攻击定位(近战/中程/远程)
|
||||
grow_type?: HGrowType; // 成长类型(决定每级 hp/ap 标准增量,默认 Warrior)
|
||||
role?: HRole; // 位置类型/职业定位(英雄专用,怪物用 monType 表达)
|
||||
@@ -346,8 +346,8 @@ export interface HeroCardConfig {
|
||||
name?: string;
|
||||
info?: string;
|
||||
cost: number;
|
||||
card_lv: number;
|
||||
base_card_lv?: number;
|
||||
rarity: number;
|
||||
base_rarity?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -357,7 +357,7 @@ export interface HeroCardPoolEntry {
|
||||
uuid: number;
|
||||
cost: number;
|
||||
weight: number;
|
||||
card_lv: number;
|
||||
rarity: number;
|
||||
}
|
||||
|
||||
/** 英雄卡池:由 HeroList 动态生成(见文件末尾初始化代码) */
|
||||
@@ -459,9 +459,9 @@ export interface LvBonusEntry {
|
||||
* 规则:lv1 激活 skills[0]/skills[1],lv6 解锁 atking/atked/fstart/dead/field 触发技能(触发类统一 lv6 激活),
|
||||
* 大招(skills[1])lv9/lv16 走 lv_entries 分档成长,lv12 按职业对单项基础属性 +50%(基数取 lv11 有效值),
|
||||
* revive[0] 与 skills[1] 互斥二选一(配置 revive 时按 lv1/lv9/lv16 走 lv_entries 3 级成长),
|
||||
* lv6 card_lv 4/5 配 field 光环,card_lv 1/2/3 配 ap_bonus/hp_bonus 基础属性+30/40/50%,
|
||||
* 品质(card_lv)相邻基础属性差 5%(仅 lv1 初始 AP/HP/DEF)
|
||||
* 编号:本批复刻英雄集中于 5001~5009,card_lv 按配置(不遵循段位规则)
|
||||
* lv6 rarity 4/5 配 field 光环,rarity 1/2/3 配 ap_bonus/hp_bonus 基础属性+30/40/50%,
|
||||
* 品质(rarity)相邻基础属性差 5%(仅 lv1 初始 AP/HP/DEF)
|
||||
* 编号:本批复刻英雄集中于 5001~5009,rarity 按配置(不遵循段位规则)
|
||||
*/
|
||||
|
||||
// @hero-setup:region-begin
|
||||
@@ -470,7 +470,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
|
||||
// 5001 紫电魔女 — atking 麻痹 + 大招 6203 大能量波(击退/麻痹)+ 攻击光环(深渊女王复刻)
|
||||
5001: {
|
||||
uuid: 5001, name: "紫电魔女", path: "hm1", fac: FacSet.HERO, card_lv: 4, lv: 1, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, hp: HERO_ROLE_BASE[HRole.Mage].hp - 5, ap: HERO_ROLE_BASE[HRole.Mage].ap + 10, def: HERO_ROLE_BASE[HRole.Mage].def,
|
||||
uuid: 5001, name: "紫电魔女", path: "hm1", fac: FacSet.HERO, rarity: 4, lv: 1, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, hp: HERO_ROLE_BASE[HRole.Mage].hp - 5, ap: HERO_ROLE_BASE[HRole.Mage].ap + 10, def: HERO_ROLE_BASE[HRole.Mage].def,
|
||||
skills: {
|
||||
// 普攻:紫魔球底座 + overrides 注入麻痹
|
||||
6010: { uuid: 6010, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100, para: 30 }, desc: "掷出紫魔球,对{target}造成攻击力{ap}%伤害,{para}%概率麻痹目标" },
|
||||
@@ -497,7 +497,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
// 5002 刀刀暴击 — atking 暴击 + 大招 6100 光闪(出血/多段)+ 暴击/暴伤双光环(剑圣复刻)
|
||||
5002: {
|
||||
uuid: 5002, name: "刀刀暴击", path: "hk2", fac: FacSet.HERO, card_lv: 5, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 15, def: HERO_ROLE_BASE[HRole.Warrior].def,
|
||||
uuid: 5002, name: "刀刀暴击", path: "hk2", fac: FacSet.HERO, rarity: 5, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 15, def: HERO_ROLE_BASE[HRole.Warrior].def,
|
||||
skills: {
|
||||
6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, desc: "挥刀对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招:光闪,独立 cd,按英雄等级分档成长
|
||||
@@ -523,7 +523,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
// 5003 格挡反杀 — fstart 剑气 + atked 护盾 + 大招 6103 闪电斩(减攻)(剑豪复刻)
|
||||
5003: {
|
||||
uuid: 5003, name: "格挡反杀", path: "hk4", fac: FacSet.HERO, card_lv: 4, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp + 10, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 5, def: HERO_ROLE_BASE[HRole.Warrior].def + 5,
|
||||
uuid: 5003, name: "格挡反杀", path: "hk4", fac: FacSet.HERO, rarity: 4, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp + 10, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 5, def: HERO_ROLE_BASE[HRole.Warrior].def + 5,
|
||||
skills: {
|
||||
6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, desc: "挥刀对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招:闪电斩,独立 cd,按英雄等级分档成长
|
||||
@@ -554,7 +554,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
// 5004 冻住不谢 — atking 冰冻 + 大招 6203 大能量波(冰冻链)+ 击晕光环(巫妖王复刻)
|
||||
5004: {
|
||||
uuid: 5004, name: "冻住不谢", path: "hm2", fac: FacSet.HERO, card_lv: 4, lv: 1, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap + 5, def: HERO_ROLE_BASE[HRole.Mage].def + 5,
|
||||
uuid: 5004, name: "冻住不谢", path: "hm2", fac: FacSet.HERO, rarity: 4, lv: 1, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap + 5, def: HERO_ROLE_BASE[HRole.Mage].def + 5,
|
||||
skills: {
|
||||
6009: { uuid: 6009, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, desc: "射出寒冰珠,对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招:大能量波,独立 cd,按英雄等级分档成长
|
||||
@@ -580,7 +580,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
// 5005 叠甲骑士 — 护盾大招 + fstart 防御 + dead 治疗 + revive 回光返照(黑暗骑士复刻)
|
||||
5005: {
|
||||
uuid: 5005, name: "叠甲骑士", path: "hk1", fac: FacSet.HERO, card_lv: 5, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 20, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def + 10,
|
||||
uuid: 5005, name: "叠甲骑士", path: "hk1", fac: FacSet.HERO, rarity: 5, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 20, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def + 10,
|
||||
skills: {
|
||||
6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, desc: "挥剑对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招位辅助技能:护盾,按英雄等级分档成长(护盾层数)
|
||||
@@ -616,7 +616,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
// 5006 光明奶爸 — 治疗大招 + atking 自疗 + fstart 防御 + 生命光环(光明骑士复刻)
|
||||
5006: {
|
||||
uuid: 5006, name: "光明奶爸", path: "hh1", fac: FacSet.HERO, card_lv: 4, lv: 1, type: HType.Long, grow_type: HGrowType.Support, role: HRole.Support, hp: HERO_ROLE_BASE[HRole.Support].hp + 15, ap: HERO_ROLE_BASE[HRole.Support].ap, def: HERO_ROLE_BASE[HRole.Support].def + 10,
|
||||
uuid: 5006, name: "光明奶爸", path: "hh1", fac: FacSet.HERO, rarity: 4, lv: 1, type: HType.Long, grow_type: HGrowType.Support, role: HRole.Support, hp: HERO_ROLE_BASE[HRole.Support].hp + 15, ap: HERO_ROLE_BASE[HRole.Support].ap, def: HERO_ROLE_BASE[HRole.Support].def + 10,
|
||||
skills: {
|
||||
6012: { uuid: 6012, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0, desc: "投掷药瓶,对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招:治疗,独立 cd,按英雄等级分档成长
|
||||
@@ -647,7 +647,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
// 5007 微醺战神 — atking 击退 + 大招 6101 气斩(易伤),lv9 属性补偿(酒仙复刻)
|
||||
5007: {
|
||||
uuid: 5007, name: "微醺战神", path: "hk3", fac: FacSet.HERO, card_lv: 3, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 15, ap: HERO_ROLE_BASE[HRole.Tank].ap + 5, def: HERO_ROLE_BASE[HRole.Tank].def + 10,
|
||||
uuid: 5007, name: "微醺战神", path: "hk3", fac: FacSet.HERO, rarity: 3, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 15, ap: HERO_ROLE_BASE[HRole.Tank].ap + 5, def: HERO_ROLE_BASE[HRole.Tank].def + 10,
|
||||
skills: {
|
||||
6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, desc: "挥拳对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招:气斩,独立 cd,按英雄等级分档成长
|
||||
@@ -666,14 +666,14 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
{ lv: 6, s_lv: SkillLv.Lv1, name: "雷霆一击", t_num: 3, overrides: { bck: 40 }, desc: "重击{target},击退{bck}" },
|
||||
],
|
||||
},
|
||||
// card_lv 3:lv6 无光环,改为基础属性+50%
|
||||
// rarity 3:lv6 无光环,改为基础属性+50%
|
||||
ap_bonus: [{ lv: 6, value: 0.5 }],
|
||||
hp_bonus: [{ lv: 6, value: 0.5 }],
|
||||
info: "",
|
||||
},
|
||||
// 5008 眩晕暴击哥 — atking 暴击 + 大招 6104 开山斧(击晕)+ 暴伤光环(齐天大圣复刻)
|
||||
5008: {
|
||||
uuid: 5008, name: "眩晕暴击哥", path: "hk5", fac: FacSet.HERO, card_lv: 5, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp + 5, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 20, def: HERO_ROLE_BASE[HRole.Warrior].def,
|
||||
uuid: 5008, name: "眩晕暴击哥", path: "hk5", fac: FacSet.HERO, rarity: 5, lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, hp: HERO_ROLE_BASE[HRole.Warrior].hp + 5, ap: HERO_ROLE_BASE[HRole.Warrior].ap + 20, def: HERO_ROLE_BASE[HRole.Warrior].def,
|
||||
skills: {
|
||||
6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, desc: "挥斧对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招:开山斧,独立 cd,按英雄等级分档成长
|
||||
@@ -699,7 +699,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
},
|
||||
// 5009 铁壳斧弟 — atked 叠防 + atking 自疗 + 大招 6101 气斩,lv9 属性补偿(斧小王复刻)
|
||||
5009: {
|
||||
uuid: 5009, name: "铁壳斧弟", path: "hc1", fac: FacSet.HERO, card_lv: 3, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 10, ap: HERO_ROLE_BASE[HRole.Tank].ap + 5, def: HERO_ROLE_BASE[HRole.Tank].def + 15,
|
||||
uuid: 5009, name: "铁壳斧弟", path: "hc1", fac: FacSet.HERO, rarity: 3, lv: 1, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, hp: HERO_ROLE_BASE[HRole.Tank].hp + 10, ap: HERO_ROLE_BASE[HRole.Tank].ap + 5, def: HERO_ROLE_BASE[HRole.Tank].def + 15,
|
||||
skills: {
|
||||
6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, desc: "挥斧对{target}造成攻击力{ap}%伤害" },
|
||||
// 大招:气斩,独立 cd,按英雄等级分档成长
|
||||
@@ -724,7 +724,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
{ lv: 6, s_lv: SkillLv.Lv1, name: "坚硬皮肤", t_num: 2, overrides: { TGroup: TGroup.Self, timed_buff_id: 7023, buff_duration: 10 }, desc: "{target}防御提升{buff_value}%,持续{dur}秒" },
|
||||
],
|
||||
},
|
||||
// card_lv 3:lv6 无光环,改为基础属性+50%
|
||||
// rarity 3:lv6 无光环,改为基础属性+50%
|
||||
ap_bonus: [{ lv: 6, value: 0.5 }],
|
||||
hp_bonus: [{ lv: 6, value: 0.5 }],
|
||||
info: "",
|
||||
@@ -733,7 +733,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
|
||||
/*
|
||||
*=============怪物配置列表================
|
||||
* 怪物与英雄采用同一套设定体系:基础值 = HERO_ROLE_BASE[role],品质(card_lv)
|
||||
* 怪物与英雄采用同一套设定体系:基础值 = HERO_ROLE_BASE[role],品质(rarity)
|
||||
* 相邻基础属性差 5%,成长系数走 HERO_GROW_COEF[grow_type]。
|
||||
* 怪物普攻统一使用 SkillSet 基础单体攻击(6001~6012 段),
|
||||
* 并通过 overrides.ap=100 显式声明伤害为攻击力的 100%。
|
||||
@@ -744,63 +744,63 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
// 基础怪物 (全部固定点位站桩攻击,HType仅决定是前排还是后排)
|
||||
// 前排怪物 — 战士系基准(Warrior 模板),变体按品质微分定位
|
||||
6001: {
|
||||
uuid: 6001, name: "兽人战士", path: "m1", fac: FacSet.MON, lv: 1, card_lv: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, monType: MonType.Melee, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap, def: HERO_ROLE_BASE[HRole.Warrior].def, speed: 70,
|
||||
uuid: 6001, name: "兽人战士", path: "m1", fac: FacSet.MON, lv: 1, rarity: 1, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, monType: MonType.Melee, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap, def: HERO_ROLE_BASE[HRole.Warrior].def, speed: 70,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "基础前排怪, 战士系基准"
|
||||
},
|
||||
6002: {
|
||||
uuid: 6002, name: "兽人精锐战士", path: "m2", fac: FacSet.MON, lv: 1, card_lv: 2, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, monType: MonType.Melee, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap, def: HERO_ROLE_BASE[HRole.Warrior].def, speed: 110,
|
||||
uuid: 6002, name: "兽人精锐战士", path: "m2", fac: FacSet.MON, lv: 1, rarity: 2, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, monType: MonType.Melee, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap, def: HERO_ROLE_BASE[HRole.Warrior].def, speed: 110,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0 } }, info: "进阶前排怪, 品质2更快更痛"
|
||||
},
|
||||
6003: {
|
||||
uuid: 6003, name: "兽人重装兵", path: "m3", fac: FacSet.MON, lv: 1, card_lv: 2, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.Heavy, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 50,
|
||||
uuid: 6003, name: "兽人重装兵", path: "m3", fac: FacSet.MON, lv: 1, rarity: 2, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.Heavy, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 50,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.VerySlow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "重型坦克怪, 高HP低攻承伤位"
|
||||
},
|
||||
// 后排怪物 — 射手/刺客/法系基准,变体按品质微分定位
|
||||
6004: {
|
||||
uuid: 6004, name: "兽人射手", path: "m4", fac: FacSet.MON, lv: 1, card_lv: 1, type: HType.Long, grow_type: HGrowType.Archer, role: HRole.Archer, monType: MonType.Long, hp: HERO_ROLE_BASE[HRole.Archer].hp, ap: HERO_ROLE_BASE[HRole.Archer].ap, def: HERO_ROLE_BASE[HRole.Archer].def, speed: 70,
|
||||
uuid: 6004, name: "兽人射手", path: "m4", fac: FacSet.MON, lv: 1, rarity: 1, type: HType.Long, grow_type: HGrowType.Archer, role: HRole.Archer, monType: MonType.Long, hp: HERO_ROLE_BASE[HRole.Archer].hp, ap: HERO_ROLE_BASE[HRole.Archer].ap, def: HERO_ROLE_BASE[HRole.Archer].def, speed: 70,
|
||||
skills: { 6006: { uuid: 6006, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "后排输出怪, 射手系基准"
|
||||
},
|
||||
6005: {
|
||||
uuid: 6005, name: "兽人刺客", path: "m5", fac: FacSet.MON, lv: 1, card_lv: 1, type: HType.Long, grow_type: HGrowType.Assassin, role: HRole.Assassin, monType: MonType.Assassin, hp: HERO_ROLE_BASE[HRole.Assassin].hp, ap: HERO_ROLE_BASE[HRole.Assassin].ap, def: HERO_ROLE_BASE[HRole.Assassin].def, speed: 130,
|
||||
uuid: 6005, name: "兽人刺客", path: "m5", fac: FacSet.MON, lv: 1, rarity: 1, type: HType.Long, grow_type: HGrowType.Assassin, role: HRole.Assassin, monType: MonType.Assassin, hp: HERO_ROLE_BASE[HRole.Assassin].hp, ap: HERO_ROLE_BASE[HRole.Assassin].ap, def: HERO_ROLE_BASE[HRole.Assassin].def, speed: 130,
|
||||
skills: { 6002: { uuid: 6002, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Normal].cd, ccd: 0, overrides: { ap: 100, hit_count: 2 } } }, info: "高攻速低HP刺客"
|
||||
},
|
||||
// 特殊位怪物
|
||||
6006: {
|
||||
uuid: 6006, name: "骷髅领主", path: "m6", fac: FacSet.MON, lv: 1, card_lv: 3, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 60,
|
||||
uuid: 6006, name: "骷髅领主", path: "m6", fac: FacSet.MON, lv: 1, rarity: 3, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 60,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.VerySlow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "前排MiniBoss级坦克"
|
||||
},
|
||||
6007: {
|
||||
uuid: 6007, name: "兽人术士", path: "m7", fac: FacSet.MON, lv: 1, card_lv: 1, type: HType.Long, grow_type: HGrowType.Support, role: HRole.Support, monType: MonType.Support, hp: HERO_ROLE_BASE[HRole.Support].hp, ap: HERO_ROLE_BASE[HRole.Support].ap, def: HERO_ROLE_BASE[HRole.Support].def, speed: 70,
|
||||
uuid: 6007, name: "兽人术士", path: "m7", fac: FacSet.MON, lv: 1, rarity: 1, type: HType.Long, grow_type: HGrowType.Support, role: HRole.Support, monType: MonType.Support, hp: HERO_ROLE_BASE[HRole.Support].hp, ap: HERO_ROLE_BASE[HRole.Support].ap, def: HERO_ROLE_BASE[HRole.Support].def, speed: 70,
|
||||
skills: { 6009: { uuid: 6009, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100, hit_count: 2 } } }, info: "后排辅助法师怪"
|
||||
},
|
||||
6008: {
|
||||
uuid: 6008, name: "兽人火法", path: "m8", fac: FacSet.MON, lv: 1, card_lv: 1, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, monType: MonType.Summoner, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap, def: HERO_ROLE_BASE[HRole.Mage].def, speed: 70,
|
||||
uuid: 6008, name: "兽人火法", path: "m8", fac: FacSet.MON, lv: 1, rarity: 1, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, monType: MonType.Summoner, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap, def: HERO_ROLE_BASE[HRole.Mage].def, speed: 70,
|
||||
skills: { 6010: { uuid: 6010, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100, hit_count: 2 } } }, info: "后排召唤系法师怪"
|
||||
},
|
||||
|
||||
// BOSS怪物 — 与英雄同一套设定(role 模板 + 品质系数),高品质承伤/输出位
|
||||
6101: {
|
||||
uuid: 6101, name: "兽人首领-双刀战士", path: "mb1", fac: FacSet.MON, lv: 6, card_lv: 4, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap, def: HERO_ROLE_BASE[HRole.Warrior].def, speed: 120,
|
||||
uuid: 6101, name: "兽人首领-双刀战士", path: "mb1", fac: FacSet.MON, lv: 6, rarity: 4, type: HType.Melee, grow_type: HGrowType.Warrior, role: HRole.Warrior, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Warrior].hp, ap: HERO_ROLE_BASE[HRole.Warrior].ap, def: HERO_ROLE_BASE[HRole.Warrior].def, speed: 120,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "前排Boss, 攻速型"
|
||||
},
|
||||
6102: {
|
||||
uuid: 6102, name: "兽人首领-斧头战士", path: "mb2", fac: FacSet.MON, lv: 6, card_lv: 5, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 60,
|
||||
uuid: 6102, name: "兽人首领-斧头战士", path: "mb2", fac: FacSet.MON, lv: 6, rarity: 5, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 60,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.VerySlow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "前排Boss, 超高HP"
|
||||
},
|
||||
6103: {
|
||||
uuid: 6103, name: "兽人首领-魔法师", path: "mb3", fac: FacSet.MON, lv: 6, card_lv: 4, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, monType: MonType.LongBoss, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap, def: HERO_ROLE_BASE[HRole.Mage].def, speed: 110,
|
||||
uuid: 6103, name: "兽人首领-魔法师", path: "mb3", fac: FacSet.MON, lv: 6, rarity: 4, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, monType: MonType.LongBoss, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap, def: HERO_ROLE_BASE[HRole.Mage].def, speed: 110,
|
||||
skills: { 6009: { uuid: 6009, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100, hit_count: 2 } } }, info: "后排法系Boss"
|
||||
},
|
||||
6104: {
|
||||
uuid: 6104, name: "兽人首领-射手", path: "mb4", fac: FacSet.MON, lv: 6, card_lv: 4, type: HType.Long, grow_type: HGrowType.Archer, role: HRole.Archer, monType: MonType.LongBoss, hp: HERO_ROLE_BASE[HRole.Archer].hp, ap: HERO_ROLE_BASE[HRole.Archer].ap, def: HERO_ROLE_BASE[HRole.Archer].def, speed: 70,
|
||||
uuid: 6104, name: "兽人首领-射手", path: "mb4", fac: FacSet.MON, lv: 6, rarity: 4, type: HType.Long, grow_type: HGrowType.Archer, role: HRole.Archer, monType: MonType.LongBoss, hp: HERO_ROLE_BASE[HRole.Archer].hp, ap: HERO_ROLE_BASE[HRole.Archer].ap, def: HERO_ROLE_BASE[HRole.Archer].def, speed: 70,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "后排位Boss, 均衡型"
|
||||
},
|
||||
6105: {
|
||||
uuid: 6105, name: "亡灵首领-法师", path: "mb5", fac: FacSet.MON, lv: 6, card_lv: 5, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, monType: MonType.LongBoss, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap, def: HERO_ROLE_BASE[HRole.Mage].def, speed: 110,
|
||||
uuid: 6105, name: "亡灵首领-法师", path: "mb5", fac: FacSet.MON, lv: 6, rarity: 5, type: HType.Long, grow_type: HGrowType.Mage, role: HRole.Mage, monType: MonType.LongBoss, hp: HERO_ROLE_BASE[HRole.Mage].hp, ap: HERO_ROLE_BASE[HRole.Mage].ap, def: HERO_ROLE_BASE[HRole.Mage].def, speed: 110,
|
||||
skills: { 6011: { uuid: 6011, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.Slow].cd, ccd: 0, overrides: { ap: 100, hit_count: 2, timed_buff_id: 7002 } } }, info: "后排高AP Boss"
|
||||
},
|
||||
6106: {
|
||||
uuid: 6106, name: "亡灵首领-骑马战士", path: "mb6", fac: FacSet.MON, lv: 6, card_lv: 5, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 130,
|
||||
uuid: 6106, name: "亡灵首领-骑马战士", path: "mb6", fac: FacSet.MON, lv: 6, rarity: 5, type: HType.Melee, grow_type: HGrowType.Tank, role: HRole.Tank, monType: MonType.MeleeBoss, hp: HERO_ROLE_BASE[HRole.Tank].hp, ap: HERO_ROLE_BASE[HRole.Tank].ap, def: HERO_ROLE_BASE[HRole.Tank].def, speed: 130,
|
||||
skills: { 6004: { uuid: 6004, lv: 1, cd: AtkSpeedSet[AtkSpeedLv.VerySlow].cd, ccd: 0, overrides: { ap: 100 } } }, info: "前排终极Boss, 最高HP+高速"
|
||||
},
|
||||
|
||||
@@ -825,7 +825,7 @@ export interface HeroComboInfo {
|
||||
name: string; // 阵容名称(体现流派)
|
||||
heroes: number[]; // 英雄 uuid 列表,固定 3 个;索引 0=前排,其余按站位从近到远
|
||||
desc: string; // 配合思路说明(信息面板展示)
|
||||
low_heroes?: number[]; // 低配替代阵容(card_lv 1~2,供新手期引导)
|
||||
low_heroes?: number[]; // 低配替代阵容(rarity 1~2,供新手期引导)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -883,21 +883,21 @@ export const HeroComboList: number[] = [8001, 8002, 8003, 8004, 8005, 8006];
|
||||
* 英雄卡费用规则
|
||||
* lv1=5, lv2=10, lv3+=15
|
||||
*/
|
||||
function getHeroCost(cardLv: number): number {
|
||||
if (cardLv === 1) return 5;
|
||||
if (cardLv === 2) return 10;
|
||||
function getHeroCost(rarity: number): number {
|
||||
if (rarity === 1) return 5;
|
||||
if (rarity === 2) return 10;
|
||||
return 15;
|
||||
}
|
||||
|
||||
/**
|
||||
* 英雄卡按 card_lv 分配抽取权重(几何递减,高等级越稀有)
|
||||
* 英雄卡按 rarity 分配抽取权重(几何递减,高等级越稀有)
|
||||
* 梯度:lv1=40, lv2=25, lv3=15, lv4=8, lv5=3
|
||||
*/
|
||||
const HERO_WEIGHT_BY_LV: Record<number, number> = {
|
||||
1: 40, 2: 25, 3: 15, 4: 8, 5: 3,
|
||||
};
|
||||
function getHeroWeight(cardLv: number): number {
|
||||
return HERO_WEIGHT_BY_LV[cardLv] ?? HERO_WEIGHT_BY_LV[1];
|
||||
function getHeroWeight(rarity: number): number {
|
||||
return HERO_WEIGHT_BY_LV[rarity] ?? HERO_WEIGHT_BY_LV[1];
|
||||
}
|
||||
|
||||
// 动态生成英雄卡池:所有英雄统一生成 lv1 卡牌
|
||||
@@ -906,9 +906,9 @@ HeroList.forEach(uuid => {
|
||||
if (!hero) return;
|
||||
HeroCardPoolList.push({
|
||||
uuid: hero.uuid,
|
||||
cost: getHeroCost(hero.card_lv ?? 1),
|
||||
weight: getHeroWeight(hero.card_lv ?? 1),
|
||||
card_lv: hero.card_lv ?? 1,
|
||||
cost: getHeroCost(hero.rarity ?? 1),
|
||||
weight: getHeroWeight(hero.rarity ?? 1),
|
||||
rarity: hero.rarity ?? 1,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1039,7 +1039,7 @@ export function getEffectiveStats(hero: heroInfo, targetLv: number): { hp: numbe
|
||||
*/
|
||||
export function getHeroDisplayStats(hero: heroInfo, targetLv: number): { hp: number, ap: number, def: number } {
|
||||
const lv = Math.max(1, Math.floor(targetLv));
|
||||
const coef = getHeroQualityCoef(hero.card_lv ?? 1);
|
||||
const coef = getHeroQualityCoef(hero.rarity ?? 1);
|
||||
const eff = getEffectiveStats(hero, lv);
|
||||
const stats = {
|
||||
hp: Math.round(hero.hp * coef) + (eff.hp - hero.hp),
|
||||
@@ -1057,7 +1057,7 @@ export function getHeroDisplayStats(hero: heroInfo, targetLv: number): { hp: num
|
||||
|
||||
/** 内部:lv12 专项基数(不含 lv12 自身)的展示有效值 */
|
||||
function getHeroDisplayStatsBase(hero: heroInfo, targetLv: number): { hp: number, ap: number, def: number } {
|
||||
const coef = getHeroQualityCoef(hero.card_lv ?? 1);
|
||||
const coef = getHeroQualityCoef(hero.rarity ?? 1);
|
||||
const eff = getEffectiveStats(hero, targetLv);
|
||||
return {
|
||||
hp: Math.round(hero.hp * coef) + (eff.hp - hero.hp),
|
||||
|
||||
Reference in New Issue
Block a user