refactor: 重构复活机制,将复活逻辑整合到dead触发组
1. 新增SkillOverrides的revive_hp和revive_count配置项,替代原独立复活字段 2. 移除所有revive相关的旧配置、解析函数和UI展示逻辑 3. 调整战斗逻辑,从dead触发组的overrides中读取复活配置 4. 更新文档说明,统一复活机制的配置方式 5. 清理冗余的导入和类型定义
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { HeroDisVal, HeroInfo, HSkillInfo, HType, SkillTriggerType, TriggerGrouped, LvFieldEntry, LvReviveEntry, LvBonusEntry, FieldEntry, HRole } from "../common/config/heroSet";
|
||||
import { HeroDisVal, HeroInfo, HSkillInfo, HType, SkillTriggerType, TriggerGrouped, LvFieldEntry, LvBonusEntry, FieldEntry, HRole } from "../common/config/heroSet";
|
||||
import { mLogger } from "../common/Logger";
|
||||
import { FacSet, FightSet } from "../common/config/GameSet";
|
||||
import { FieldSkillSet, FieldSkillType, SkillOverrides } from "../common/config/SkillSet";
|
||||
@@ -53,7 +53,6 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
[SkillTriggerType.Atked]?: TriggerGrouped;
|
||||
/** 驻场光环(按 lv 解锁,存活期间全局生效) */
|
||||
[SkillTriggerType.Field]?: LvFieldEntry[];
|
||||
[SkillTriggerType.Revive]?: LvReviveEntry[];
|
||||
/** 额外攻击/生命/防御加成(按 lv 累加) */
|
||||
ap_bonus?: LvBonusEntry[];
|
||||
hp_bonus?: LvBonusEntry[];
|
||||
@@ -72,8 +71,6 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
runtime_fstart?: { s_uuid: number; t_num: number; overrides?: SkillOverrides }[];
|
||||
/** 当前等级下生效的驻场光环词条列表 */
|
||||
runtime_field?: FieldEntry[];
|
||||
/** 当前等级下生效的复活配置 */
|
||||
runtime_revive?: { s_uuid: number; r_num: number; upr: number };
|
||||
|
||||
// ==================== 特殊属性 ====================
|
||||
critical: number = 0; // 暴击率
|
||||
@@ -95,7 +92,8 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
heal_power: number = 0; // 治疗强化(百分点;放大该英雄施放技能的治疗量,辅助专精天赋写入)
|
||||
buff_power: number = 0; // buff 强化(百分点;放大该英雄施加的友方 buff 数值,辅助专精天赋写入)
|
||||
|
||||
revived_count: number = 0; // 已复活次数
|
||||
revived_count: number = 0; // 已复活次数(从 dead 触发配置的 revive_count 限制)
|
||||
death_count: number = 0; // 本回合死亡次数(用于 dead 触发统计)
|
||||
invincible_time: number = 0;// 无敌时间
|
||||
|
||||
|
||||
@@ -631,7 +629,6 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
this.atking = undefined;
|
||||
this.atked = undefined;
|
||||
this.field = undefined;
|
||||
this.revive = undefined;
|
||||
this.ap_bonus = undefined;
|
||||
this.hp_bonus = undefined;
|
||||
this.def_bonus = undefined;
|
||||
@@ -641,7 +638,6 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
this.runtime_dead = undefined;
|
||||
this.runtime_fstart = undefined;
|
||||
this.runtime_field = undefined;
|
||||
this.runtime_revive = undefined;
|
||||
this.critical = 0;
|
||||
this.critical_res = 0;
|
||||
this.freeze_chance = 0;
|
||||
@@ -654,6 +650,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
||||
this.knockback_res = 0;
|
||||
this.critical_damage = 0;
|
||||
this.revived_count = 0;
|
||||
this.death_count = 0;
|
||||
this.invincible_time = 0;
|
||||
this.puncture_chance = 0;
|
||||
this.puncture_dmg_bonus = 0;
|
||||
|
||||
Reference in New Issue
Block a user