feat(技能): 新增驻场技能系统并集成到游戏机制中

- 在英雄配置中增加驻场技能字段,支持八种全局加成类型
- 实现驻场技能数值计算,影响召唤/死亡/战斗开始结束技能触发次数
- 集成驻场技能到金币收益系统,提升每回合和卖出英雄的金币获取
- 为战斗结束治疗添加驻场技能加成,增强队伍恢复效果
This commit is contained in:
walkpan
2026-04-22 23:14:07 +08:00
parent 8df4d5169a
commit 100a520df1
8 changed files with 138 additions and 28 deletions

View File

@@ -25,6 +25,8 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
import { HeroInfo } from "../common/config/heroSet";
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
import { Hero } from "../hero/Hero";
import { FieldSkillType } from "../common/config/SkillSet";
import { GameEvent } from "../common/config/GameEvent";
import { oops } from "db://oops-framework/core/Oops";
import { UIID } from "../common/config/GameUIConfig";
import { mLogger } from "../common/Logger";
@@ -251,6 +253,13 @@ export class HInfoComp extends CCComp {
removed
});
if (!removed) return;
// 卖出英雄金币收益
const baseSellGold = 1; // 基础卖出金币
const goldBoost = HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.SellGold);
const totalSellGold = baseSellGold + goldBoost;
oops.message.dispatchEvent(GameEvent.CoinAdd, { delta: totalSellGold });
oops.gui.remove(UIID.IBox);
}